monacopilot 0.8.16 → 0.8.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -9,7 +9,7 @@ type EndpointType = string;
9
9
  type FilenameType = string;
10
10
  type FrameworkType = 'react' | 'angular' | 'vue.js' | 'express' | 'django' | 'flask' | 'spring boot' | 'asp.net core' | 'ruby on rails' | 'laravel' | 'node.js' | 'react native' | 'flutter' | 'tensorflow' | 'pytorch' | 'keras' | 'scikit-learn' | 'fastapi' | 'graphql' | 'redux' | 'electron' | 'next.js' | 'nuxt.js' | 'gatsby' | 'shopify' | 'woocommerce' | 'pandas' | 'numpy' | 'three.js' | 'jest' | 'cypress' | 'selenium' | 'playwright' | 'puppeteer' | 'material-ui' | 'vuetify' | 'ant design';
11
11
  type CompletionSpeedType = 'little-faster' | 'normal';
12
- type ExternalContextType = Array<{
12
+ type ExternalContextType = {
13
13
  /**
14
14
  * The relative path from the current editing code in the editor to an external file.
15
15
  *
@@ -23,7 +23,7 @@ type ExternalContextType = Array<{
23
23
  * The content of the external file as a string.
24
24
  */
25
25
  content: string;
26
- }>;
26
+ }[];
27
27
  /**
28
28
  * Themes available for the Rich Monaco Editor.
29
29
  */
@@ -70,7 +70,7 @@ type GroqCompletion = ChatCompletion & {
70
70
  interface CompletionRequestParams {
71
71
  completionMetadata: CompletionMetadata;
72
72
  }
73
- type CompletionMode = 'fill-in-the-middle' | 'continuation';
73
+ type CompletionMode = 'fill-in-the-middle' | 'completion';
74
74
  interface CompletionMetadata {
75
75
  language: string | undefined;
76
76
  filename: FilenameType | undefined;
@@ -93,12 +93,12 @@ interface CopilotOptions {
93
93
  *
94
94
  * @param {string} apiKey - The Groq API key.
95
95
  * @param {CopilotOptions} [options] - Optional parameters to configure the completion model,
96
- * such as the model ID. Defaults to `llama3-70b-8192` if not specified.
96
+ * such as the model ID. Defaults to `llama` if not specified.
97
97
  *
98
98
  * @example
99
99
  * ```typescript
100
100
  * const copilot = new Copilot(process.env.GROQ_API_KEY, {
101
- * model: 'llama3-70b-8192',
101
+ * model: 'llama',
102
102
  * });
103
103
  * ```
104
104
  */
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ type EndpointType = string;
9
9
  type FilenameType = string;
10
10
  type FrameworkType = 'react' | 'angular' | 'vue.js' | 'express' | 'django' | 'flask' | 'spring boot' | 'asp.net core' | 'ruby on rails' | 'laravel' | 'node.js' | 'react native' | 'flutter' | 'tensorflow' | 'pytorch' | 'keras' | 'scikit-learn' | 'fastapi' | 'graphql' | 'redux' | 'electron' | 'next.js' | 'nuxt.js' | 'gatsby' | 'shopify' | 'woocommerce' | 'pandas' | 'numpy' | 'three.js' | 'jest' | 'cypress' | 'selenium' | 'playwright' | 'puppeteer' | 'material-ui' | 'vuetify' | 'ant design';
11
11
  type CompletionSpeedType = 'little-faster' | 'normal';
12
- type ExternalContextType = Array<{
12
+ type ExternalContextType = {
13
13
  /**
14
14
  * The relative path from the current editing code in the editor to an external file.
15
15
  *
@@ -23,7 +23,7 @@ type ExternalContextType = Array<{
23
23
  * The content of the external file as a string.
24
24
  */
25
25
  content: string;
26
- }>;
26
+ }[];
27
27
  /**
28
28
  * Themes available for the Rich Monaco Editor.
29
29
  */
@@ -70,7 +70,7 @@ type GroqCompletion = ChatCompletion & {
70
70
  interface CompletionRequestParams {
71
71
  completionMetadata: CompletionMetadata;
72
72
  }
73
- type CompletionMode = 'fill-in-the-middle' | 'continuation';
73
+ type CompletionMode = 'fill-in-the-middle' | 'completion';
74
74
  interface CompletionMetadata {
75
75
  language: string | undefined;
76
76
  filename: FilenameType | undefined;
@@ -93,12 +93,12 @@ interface CopilotOptions {
93
93
  *
94
94
  * @param {string} apiKey - The Groq API key.
95
95
  * @param {CopilotOptions} [options] - Optional parameters to configure the completion model,
96
- * such as the model ID. Defaults to `llama3-70b-8192` if not specified.
96
+ * such as the model ID. Defaults to `llama` if not specified.
97
97
  *
98
98
  * @example
99
99
  * ```typescript
100
100
  * const copilot = new Copilot(process.env.GROQ_API_KEY, {
101
- * model: 'llama3-70b-8192',
101
+ * model: 'llama',
102
102
  * });
103
103
  * ```
104
104
  */
package/dist/index.js CHANGED
@@ -1,9 +1,13 @@
1
- "use strict";var pe=Object.create;var A=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var Fe=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var Ee=(e,o)=>{for(var r in o)A(e,r,{get:o[r],enumerable:!0})},B=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of me(o))!he.call(e,n)&&n!==r&&A(e,n,{get:()=>o[n],enumerable:!(t=ke(o,n))||t.enumerable});return e},y=(e,o,r)=>(B(e,o,"default"),r&&B(r,o,"default")),M=(e,o,r)=>(r=e!=null?pe(Fe(e)):{},B(o||!e||!e.__esModule?A(r,"default",{value:e,enumerable:!0}):r,e)),be=e=>B(A({},"__esModule",{value:!0}),e);var E={};Ee(E,{Copilot:()=>U,Editor:()=>fe});module.exports=be(E);var j={llama:"llama3-70b-8192"},D="llama",G="https://api.groq.com/openai/v1/chat/completions";var F="<|cursor|>",ye=e=>{switch(e){case"fill-in-the-middle":return"filling in the middle of code";case"continuation":return"continuing the code";default:return"unknown mode"}},W=e=>{let{language:o="the language",filename:r,framework:t,editorState:n}=e,i=`As an expert ${o} code completion assistant known for high accuracy in ${ye(n.completionMode)}, could you assist with the code at the cursor location marked '${F}'? This code is part of ${r?`the ${r} file`:"a larger project"}. Please `;switch(n.completionMode){case"fill-in-the-middle":i+=`generate a completion to fill the middle of the code surrounding '${F}'. Ensure the completion precisely replaces '${F}', maintaining consistency, semantic accuracy, and relevance to the context.`;break;case"continuation":i+=`provide a continuation from '${F}'. The completion should fluidly extend the existing code, precisely replacing '${F}' while adhering to ${o} standards and ensuring semantic correctness and contextual appropriateness.`;break}return i+=" Output only the necessary completion code, without additional explanations or content.",t?i+=` The code utilizes the ${t} framework in ${o}.`:i+=` The code is implemented in ${o}.`,i.endsWith(".")?i:i+"."},V=e=>{let{codeBeforeCursor:o,codeAfterCursor:r,externalContext:t}=e,n=`${o}${F}${r}
1
+ "use strict";var me=Object.create;var D=Object.defineProperty;var Fe=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var Ee=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var ye=(e,o)=>{for(var r in o)D(e,r,{get:o[r],enumerable:!0})},A=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of he(o))!be.call(e,n)&&n!==r&&D(e,n,{get:()=>o[n],enumerable:!(t=Fe(o,n))||t.enumerable});return e},b=(e,o,r)=>(A(e,o,"default"),r&&A(r,o,"default")),P=(e,o,r)=>(r=e!=null?me(Ee(e)):{},A(o||!e||!e.__esModule?D(r,"default",{value:e,enumerable:!0}):r,e)),Ce=e=>A(D({},"__esModule",{value:!0}),e);var F={};ye(F,{Copilot:()=>K,Editor:()=>ke});module.exports=Ce(F);var q={llama:"llama3-70b-8192"},T="llama",G="https://api.groq.com/openai/v1/chat/completions";var y="<<CURSOR>>",W=e=>e==="javascript"?"latest JavaScript":e,V=e=>{switch(e){case"fill-in-the-middle":return"filling in the middle of the code";case"completion":return"completing the code"}},U=e=>{let o=W(e.language),r=V(e.editorState.completionMode);return`You are an expert ${o||""} code completion assistant known for exceptional skill in ${r}.`},Q=e=>{let{filename:o,framework:r,editorState:t,codeBeforeCursor:n,codeAfterCursor:d,externalContext:i}=e,a=W(e.language),g=V(t.completionMode),s=o?`the file named ${o}`:"a larger project",c=r?` The code utilizes the ${r} framework in ${a}.`:` The code is implemented in ${a}.`,u=`You will be presented with a code snippet where the cursor location is marked with '${y}'. Your task is to assist with ${g}. This code is part of ${s}. Please `;switch(t.completionMode){case"fill-in-the-middle":u+=`generate a completion to fill the middle of the code around '${y}'. Ensure the completion replaces '${y}' precisely, maintaining consistency, semantic accuracy, and relevance to the context. The completion must start exactly from the cursor position without any preceding or following characters, and it should not introduce any syntactical or semantic errors to the existing code.`;break;case"completion":u+=`provide the necessary completion for '${y}' while ensuring consistency, semantic accuracy, and relevance to the context. The completion must start exactly from the cursor position without any preceding or following characters, and it should not introduce any syntactical or semantic errors to the existing code.`;break}u+=` Output only the necessary completion code, without additional explanations or content.${c}`;let f=`${n}${y}${d}
2
2
 
3
- `;return t&&t.length>0&&(n+=t.map(i=>`// Path: ${i.path}
4
- ${i.content}
3
+ `;return i&&i.length>0&&(f+=i.map(h=>`// Path: ${h.path}
4
+ ${h.content}
5
5
  `).join(`
6
- `)),n};async function Ce(e,o,r={}){let t={"Content-Type":"application/json",...r.headers},n=o==="POST"&&r.body?JSON.stringify(r.body):void 0,i=await fetch(e,{method:o,headers:t,body:n,signal:r.signal});if(!i.ok)throw new Error(`${r.error||"Network error"}: ${i.statusText}`);return i.json()}function T(e,o,r){return Ce(e,"POST",{...r,body:o})}var v=class{static getModel(){return this.model}static setModel(o){this.model=o}};v.model=D;var P=v;var I=class{constructor(o,r){if(!o)throw new Error("Groq API key is required to initialize Copilot.");this.apiKey=o,P.setModel(r?.model||D)}async complete({completionMetadata:o}){try{let r=P.getModel(),t={model:j[r],messages:[{role:"system",content:W(o)},{role:"user",content:V(o)}]},n={Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"};return await T(G,t,{headers:n,error:"Error while fetching from groq API"})}catch(r){return{error:`An unexpected error occurred: ${r}`}}}},U=I;var L=M(require("react")),le=require("@monaco-editor/react");var Q={scrollBeyondLastColumn:0,codeLens:!1,minimap:{enabled:!1},quickSuggestions:!1,folding:!1,foldingHighlight:!1,foldingImportsByDefault:!1,links:!1,fontSize:14,wordWrap:"on",automaticLayout:!0},K=["light","vs-dark"];var S=M(require("react"));var z={conso:"le.log($1)","new P":`romise((resolve, reject) => {
6
+ `)),u+=`
7
+
8
+ <code>
9
+ ${f}
10
+ </code>`,u.endsWith(".")?u:`${u}.`};async function Be(e,o,r={}){let t={"Content-Type":"application/json",...r.headers},n=o==="POST"&&r.body?JSON.stringify(r.body):void 0,d=await fetch(e,{method:o,headers:t,body:n,signal:r.signal});if(!d.ok)throw new Error(`${r.error||"Network error"}: ${d.statusText}`);return d.json()}function v(e,o,r){return Be(e,"POST",{...r,body:o})}var x=class{static getModel(){return this.model}static setModel(o){this.model=o}};x.model=T;var I=x;var R=class{constructor(o,r){if(!o)throw new Error("Groq API key is required to initialize Copilot.");this.apiKey=o,I.setModel(r?.model||T)}async complete({completionMetadata:o}){try{let r=I.getModel(),t={model:q[r],messages:[{role:"system",content:U(o)},{role:"user",content:Q(o)}]},n={Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"};return await v(G,t,{headers:n,error:"Error while fetching from groq API"})}catch(r){return{error:`An unexpected error occurred: ${r}`}}}},K=R;var M=P(require("react")),pe=require("@monaco-editor/react");var z={scrollBeyondLastColumn:0,codeLens:!1,minimap:{enabled:!1},quickSuggestions:!1,folding:!1,foldingHighlight:!1,foldingImportsByDefault:!1,links:!1,fontSize:14,wordWrap:"on",automaticLayout:!0},Y=["light","vs-dark"];var L=P(require("react"));var J={conso:"le.log($1)","new P":`romise((resolve, reject) => {
7
11
  $1
8
12
  })`,"new A":"rray","new S":"et","throw n":"ew Error($1)",setTimeout:`(() => {
9
13
  $1
@@ -15,5 +19,5 @@ ${i.content}
15
19
  $1
16
20
  }$0`,"async =>":` {
17
21
  $1
18
- }$0`,") =>":" {"};var X=[{language:"javascript",snippets:z}];var x=class{constructor(){this.predictions=new Map,this.loadPredictions()}loadPredictions(){X.forEach(o=>{this.predictions.set(o.language,o.snippets)})}predictCode(o,r){let t=this.predictions.get(o);if(!t)return"";r=r.split("").reverse().join("");for(let n in t)if(r.startsWith(n.split("").reverse().join("")))return t[n];return""}};var J=(e,o)=>e[o]||"",R=e=>{let o=e.split(`
19
- `);return o[o.length-1].length};var Y=(e,o)=>{let r=o.getLineContent(e.lineNumber),t=e.column-1,n=r.substring(t);return/\s/.test(n)},Z=(e,o)=>{let r=new Set(['"',"'","}","]",")",","," ",":","."]),t=o.getLineContent(e.lineNumber),n=J(t,e.column-1);return!r.has(n)&&!!n},h=(e,o)=>{let r=o.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:e.lineNumber,endColumn:e.column}),t=o.getValueInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:o.getLineCount(),endColumn:o.getLineMaxColumn(o.getLineCount())});return{codeBeforeCursor:r,codeAfterCursor:t}},ee=(e,o)=>{let r=o.getLineContent(e.lineNumber),t=r.slice(e.column-1).trim(),n=r.slice(0,e.column-1).trim();return e.column<=3&&(t!==""||n!=="")},oe=(e,o)=>{let{codeAfterCursor:r}=h(e,o),t=3;return[...r].reduce((i,d)=>d.trim()!==""&&i<t?i+1:i,0)>=t?"fill-in-the-middle":"continuation"};var re={javascript:1,typescript:2,typescriptreact:3,python:4,vue:5,php:6,dart:7,javascriptreact:8,go:9,css:10,cpp:11,html:12,scss:13,markdown:14,csharp:15,java:16,json:17,rust:18,ruby:19,c:20},O={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95},g=[.9978708359643611,.7001905605239328,-.1736749244124868,-.22994157947320112,.13406692641682572,-.007751370662011853,.0057783222035240715,.41910878254476003,-.1621657125711092,.13770814958908187,-.06036011308184006,-.07351180985800129,0,-.05584878151248109,.30618794079412015,-.1282197982598485,.10951859303997555,.1700461782788777,-.3346057842644757,.22497985923128136,0,-.44038101825774356,-.6540115939236782,.16595600081341702,.20733910722385135,-.1337033766105696,-.06923072125290894,-.05806684191976292,.3583334671633344,-.47357732824944315,.17810871365594377,.42268219963946685,0,0,-.16379620467004602,-.43893868831061167,0,.11570094006709251,.9326431262654882,-.9990110509203912,-.44125275652726503,-.15840786997162004,-.4600396256644451,-.018814811994044403,.09230944537175266,.025814790934742798,-1.0940162204190154,-.9407503631235489,-.9854303778694269,-1.1045822488262245,-1.1417299456573262,-1.5623704405345513,-.4157473855795939,-1.0244257735561713,-.7477401944601753,-1.1275109699068402,-.0714715633552533,-1.1408628006786907,-1.0409898655074672,-.2288889836518878,-.5469549893760344,-.181946611106845,.1264329316374918,0,0,.312206968554707,-.3656436392517924,.23655650686038968,.1014912419901576,0,.06287549221765308,0,0,.19027065218932154,-.8519502045974378,0,.23753599905971923,.2488809322489166,.019969251907983224,0,.06916505526229488,.29053356359188204,-.14484456555431657,.014768129429370188,-.15051464926341374,.07614835502776021,-.3317489901313935,0,0,.04921938684669103,-.28248576768353445,-.9708816204525345,-1.3560464522265527,.014165375212383239,-.23924166472544983,.10006595730248855,.09867233147279562,.32330430333220644,-.058625706114180595,.17149853105783947,.4436484054395367,.047189049576707255,.16832520944790552,.1117259900942179,-.35469010329927253,0,-.1528189124465582,-.3804848349564939,.07278077320753953,.13263786480064088,.22920682659292527,1.1512955314336537,0,.016939862282340023,.4242994650403408,.12759835577444986,-.5577261135825583,-.19764560943067672,-.4042102444736004,.12063461617733708,-.2933966817484834,.2715683893968593,0,-.7138548251238751,0,-.023066228703035277,0,-.06383043976746139,.09683723720709651,-.7337151424080791,0,-.27191370124625525,.2819781269656171,-.08711496549050252,.11048604909969338,-.0934849550450534,.0721001250772912,.2589126797890794,.6729582659532254,-.21921032738244908,-.21535277468651456,-.45474006124091354,-.05861820126419139,-.007875306207720204,-.056661261678809284,.17727881404222662,.23603713348534658,.17485861412377932,-.5737483768696752,-.38220029570342745,-.5202722985519168,-.37187947527657256,.47155277792990113,-.12077912346691123,.47825628981545326,.4736704404000214,-.1615218651546898,.18362447973513005,0,0,-.18183417425866824,0,0,-.2538532305733833,-.1303692690676528,-.4073577969188216,.04172985870928789,-.1704527388573901,0,0,.7536858953385828,-.44703159588787644,0,-.7246484085580873,-.21378128540782063,0,.037461090552656146,-.16205852364367032,-.10973952064404884,.017468043407647377,-.1288980387397392,0,0,0,-1.218692715379445,.05536949662193305,-.3763799844799116,-.1845001725624579,-.1615576298149558,0,-.15373262203249874,-.04603412604270418,0,-.3068149681460828,.09412352468269412,0,.09116543650609721,.06065865264082559,.05688267379386188,-.05873945477722306,0,.14532465133322153,.1870857769705463,.36304258043185555,.1411392422180405,.0630388629716367,0,-1.1170522012450395,.16133697772771127,.15908534390781448,-.23485453704002232,-.1419980841417892,.21909510179526218,.39948420260153766,.40802294284289187,.15403767653746853,0,.19764784115096676,.584914157527457,0,-.4573883817015294],te=-.3043572714994554,ne=.13;var H=class{constructor(){this.previousLabel=0,this.previousLabelTimestamp=Date.now()-3600*1e3,this.probabilityAccept=0}},ie=e=>{let o=new H,r=o.previousLabel,t=0;e.properties.afterCursorWhitespace==="true"&&(t=1);let n=(Date.now()-o.previousLabelTimestamp)/1e3,i=Math.log(1+n),d=0,a=0,u=0,c=0;if(e.prefix){d=Math.log(1+R(e.prefix));let m=e.prefix.slice(-1);a=O[m]??0}let l=e.prefix?.trimEnd();if(l){u=Math.log(1+R(l));let m=l.slice(-1);c=O[m]??0}let f=e.measurements.documentLength?Math.log(1+e.measurements.documentLength):0,k=e.measurements.promptEndPos?Math.log(1+e.measurements.promptEndPos):0,N=e.measurements.promptEndPos&&e.measurements.documentLength?(e.measurements.promptEndPos+.5)/(1+e.measurements.documentLength):0,C=e.properties.languageId?re[e.properties.languageId]:0,s=te;s+=g[0]*r+g[1]*t+g[2]*i,s+=g[3]*d+g[4]*u,s+=g[5]*f+g[6]*k,s+=g[7]*N,s+=g[8+C],s+=g[29+a],s+=g[125+c];let b=1/(1+Math.exp(-s));return o.probabilityAccept=b,b};var de=(e,o,r)=>Be(e,o,r)>ne&&!Z(e,o)&&!ee(e,o),Be=(e,o,r)=>{let{codeBeforeCursor:t}=h(e,o),n=Y(e,o),i=o.getValueLength(),d=o.getOffsetAt(e);return ie({properties:{afterCursorWhitespace:n?"true":"false",languageId:r},measurements:{documentLength:i,promptEndPos:d},prefix:t})};var ae=async({filename:e,endpoint:o,code:r,language:t,framework:n,externalContext:i,model:d,position:a,token:u})=>{if(!de(a,d,t)||!r)return null;let c=new AbortController,l=await T(o,{completionMetadata:Ae({filename:e,position:a,model:d,language:t,framework:n,externalContext:i})},{headers:{"Content-Type":"application/json"},error:"Error while fetching completion item",signal:c.signal});return u.isCancellationRequested?(c.abort(),null):l.error?null:l.choices[0].message.content},Ae=({filename:e,position:o,model:r,language:t,framework:n,externalContext:i})=>{let d=oe(o,r),{codeBeforeCursor:a,codeAfterCursor:u}=h(o,r);return{filename:e,language:t,framework:n||void 0,externalContext:i,codeBeforeCursor:a,codeAfterCursor:u,editorState:{completionMode:d}}},ue=(e,o)=>{let{codeBeforeCursor:r}=h(e,o);return`${e.lineNumber}:${e.column}:${r}`};var w=M(require("react")),De=(e,o=1e3)=>{let[r,t]=w.default.useState(null),n=w.default.useCallback((...i)=>(r&&clearTimeout(r),new Promise((d,a)=>{let u=setTimeout(()=>{e(...i).then(d).catch(a)},o);t(u)})),[e,o,r]);return w.default.useEffect(()=>()=>{r&&clearTimeout(r)},[r]),n},ge=De;var Te=new x,ve=(e,o,r,t,n,i,d)=>{let a=S.default.useRef(new Map),u=S.default.useRef(!1),c=ge(ae,n==="little-faster"?350:600);return S.default.useEffect(()=>{if(!d||!t||!o)return;let l=d.languages.registerInlineCompletionsProvider(t,{provideInlineCompletions:async(f,k,N,C)=>{if(u.current)return u.current=!1,{items:[]};let s=f.getValue(),b=new d.Range(k.lineNumber,k.column,k.lineNumber,k.column),m=ue(k,f);if(a.current.has(m)){let p=a.current.get(m);if(u.current=!0,p)return{items:[p],enableForwardStability:!0}}let $=Te.predictCode(t,s);if($){let p={insertText:{snippet:$},range:b,completeBracketPairs:!0};return a.current.set(m,p),{items:[p],enableForwardStability:!0}}if(C.isCancellationRequested)return{items:[]};try{let p=await c({filename:e,endpoint:o,code:s,language:t,framework:r,externalContext:i,model:f,position:k,token:C});if(p){let q={insertText:p,range:b};return a.current.set(m,q),u.current=!0,{items:[q],enableForwardStability:!0}}}catch{return{items:[]}}return{items:[]}},freeInlineCompletions:()=>{}});return()=>{l.dispose()}},[d,t,r,i,c,o,e]),null},se=ve;var ce={"codesandbox-dark":{base:"vs-dark",inherit:!0,rules:[{token:"string",foreground:"BFD084"},{token:"punctuation.definition.string",foreground:"BFD084"},{token:"constant.character.escape",foreground:"BFD084"},{token:"text.html constant.character.entity.named",foreground:"BFD084"},{token:"text.html.derivative",foreground:"E5E5E5"},{token:"punctuation.definition.entity.html",foreground:"BFD084"},{token:"template.expression.begin",foreground:"7AD9FB"},{token:"template.expression.end",foreground:"7AD9FB"},{token:"punctuation.definition.template-expression.begin",foreground:"7AD9FB"},{token:"punctuation.definition.template-expression.end",foreground:"7AD9FB"},{token:"constant",foreground:"7AD9FB"},{token:"keyword",foreground:"A390FF"},{token:"modifier",foreground:"A390FF"},{token:"storage",foreground:"A390FF"},{token:"punctuation.definition.block",foreground:"86897A"},{token:"punctuation.definition.parameters",foreground:"86897A"},{token:"meta.brace.round",foreground:"86897A"},{token:"meta.jsx.children",foreground:"E5E5E5"},{token:"punctuation.accessor",foreground:"86897A"},{token:"variable.other",foreground:"FFFFFF"},{token:"variable.parameter",foreground:"FFFFFF"},{token:"meta.embedded",foreground:"E5E5E5"},{token:"source.groovy.embedded",foreground:"E5E5E5"},{token:"meta.template.expression",foreground:"E5E5E5"},{token:"comment",foreground:"6F6F6F"},{token:"docblock",foreground:"6F6F6F"},{token:"meta.function-call",foreground:"CDF861"},{token:"meta.class entity.name.type.class",foreground:"FFFFFF",fontStyle:"underline"},{token:"meta.class entity.name.type.module",foreground:"CABEFF"},{token:"meta.class meta.type.annotation",foreground:"A390FF"},{token:"meta.class support.type.primitive",foreground:"A390FF"},{token:"meta.interface support.type.primitive",foreground:"A390FF"},{token:"meta.type.annotation support.type.primitive",foreground:"A390FF"},{token:"meta.type.annotation entity.name.type",foreground:"CABEFF"},{token:"variable.object.property",foreground:"FFFFFF"},{token:"entity.name.function",foreground:"CDF861"},{token:"meta.definition.variable",foreground:"FFFFFF"},{token:"modifier",foreground:"A390FF"},{token:"variable.language.this",foreground:"A390FF"},{token:"support.type.object",foreground:"A390FF"},{token:"support.module",foreground:"7AD9FB",fontStyle:"italic"},{token:"support.node",foreground:"7AD9FB",fontStyle:"italic"},{token:"support.type.ts",foreground:"7AD9FB"},{token:"entity.other.inherited-class",foreground:"7AD9FB"},{token:"meta.interface entity.name.type.interface",foreground:"7AD9FB"},{token:"keyword.operator",foreground:"B3E8B4"},{token:"storage.type.function.arrow",foreground:"B3E8B4"},{token:"variable.css",foreground:"7AD9FB"},{token:"source.css",foreground:"CDF861"},{token:"entity.other.attribute-name",foreground:"CDF861"},{token:"entity.name.tag.css",foreground:"CDF861"},{token:"entity.other.attribute-name.id",foreground:"CDF861"},{token:"entity.other.attribute-name.class",foreground:"CDF861"},{token:"source.css meta.selector.css",foreground:"CDF861"},{token:"support.type.property-name.css",foreground:"FFFFFF"},{token:"support.function.css",foreground:"A390FF"},{token:"support.constant.css",foreground:"A390FF"},{token:"keyword.css",foreground:"A390FF"},{token:"constant.numeric.css",foreground:"A390FF"},{token:"constant.other.color.css",foreground:"A390FF"},{token:"punctuation.section",foreground:"86897A"},{token:"punctuation.separator",foreground:"86897A"},{token:"punctuation.definition.entity.css",foreground:"86897A"},{token:"punctuation.terminator.rule.css",foreground:"E5E5E5"},{token:"source.css keyword.other.unit",foreground:"CABEFF"},{token:"string.css",foreground:"CABEFF"},{token:"punctuation.definition.string.css",foreground:"CABEFF"},{token:"support.type.property-name",foreground:"FFFFFF"},{token:"string.html",foreground:"CDF861"},{token:"punctuation.definition.tag",foreground:"86897A"},{token:"entity.other.attribute-name",foreground:"CABEFF"},{token:"entity.name.tag",foreground:"A390FF"},{token:"entity.name.tag.wildcard",foreground:"CDF861"},{token:"markup.markdown",foreground:"FFFFFF"},{token:"markup.heading.markdown",foreground:"B3E8B4"},{token:"punctuation.definition.bold.markdown",foreground:"B3E8B4"},{token:"meta.paragraph.markdown punctuation.definition.link.description",foreground:"B3E8B4"},{token:"punctuation.definition.raw.markdown",foreground:"B3E8B4"},{token:"meta.paragraph.markdown",foreground:"E5E5E5"},{token:"text.html.markdown meta.attribute",foreground:"CABEFF"},{token:"entity.name.section",foreground:"FFFFFF"},{token:"string.other",foreground:"FFFFFF"},{token:"string.other.link",foreground:"FFFFFF"},{token:"punctuation.definition.markdown",foreground:"B3E8B4"},{token:"punctuation.definition.string",foreground:"B3E8B4"},{token:"punctuation.definition.string.begin.shell",foreground:"B3E8B4"},{token:"markup.underline.link",foreground:"BFD084"},{token:"markup.inline.raw",foreground:"86897A"},{token:"text.html.vue variable.other.readwrite",foreground:"A390FF"},{token:"text.html.vue meta.object-literal.key",foreground:"FFFFFF"},{token:"text.html.vue entity.name.tag.css",foreground:"A390FF"},{token:"text.html.vue entity.other.attribute-name",foreground:"FFFFFF"},{token:"text.html.vue constant.numeric.css",foreground:"7AD9FB"},{token:"text.html.vue keyword.other.unit",foreground:"A390FF"},{token:"text.html.vue support.constant.property-value",foreground:"A390FF"},{token:"text.html.vue support.constant.color",foreground:"A390FF"},{token:"function.defaultLibrary"},{token:"class.defaultLibrary"}],colors:{foreground:"#E5E5E5",focusBorder:"#AD9CFF","selection.background":"#6F6F6F","scrollbar.shadow":"#0000007E","input.background":"#0F0E0E","input.foreground":"#999","button.background":"#EDFFA5","button.foreground":"#151515","button.hoverBackground":"#DCFF50","textLink.foreground":"#E5E5E5","list.dropBackground":"#151515","list.focusForeground":"#808080","list.focusBackground":"#E5E5E51A","list.highlightForeground":"#E5E5E5","editor.background":"#151515","editorLineNumber.foreground":"#858585","editorLineNumber.activeForeground":"#C6C6C6","scrollbarSlider.background":"#79797966","scrollbarSlider.hoverBackground":"#646464B3","scrollbarSlider.activeBackground":"#BFBFBF66","widget.shadow":"#0000005C","editorWidget.background":"#252526","pickerGroup.border":"#3F3F46","pickerGroup.foreground":"#3794FF",errorForeground:"#F48771","editorError.foreground":"#F48771","editorWarning.foreground":"#F7CC66"}},"github-dark-dimmed":{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"768390"},{token:"punctuation.definition.comment",foreground:"768390"},{token:"string.comment",foreground:"768390"},{token:"constant.other.placeholder",foreground:"F47067"},{token:"constant.character",foreground:"F47067"},{token:"constant",foreground:"6CB6FF"},{token:"entity.name.constant",foreground:"6CB6FF"},{token:"variable.other.constant",foreground:"6CB6FF"},{token:"variable.other.enummember",foreground:"6CB6FF"},{token:"variable.language",foreground:"6CB6FF"},{token:"entity",foreground:"6CB6FF"},{token:"entity.name",foreground:"F69D50"},{token:"meta.export.default",foreground:"F69D50"},{token:"meta.definition.variable",foreground:"F69D50"},{token:"variable.parameter.function",foreground:"ADBAC7"},{token:"meta.jsx.children",foreground:"ADBAC7"},{token:"meta.block",foreground:"ADBAC7"},{token:"meta.tag.attributes",foreground:"ADBAC7"},{token:"entity.name.constant",foreground:"ADBAC7"},{token:"meta.object.member",foreground:"ADBAC7"},{token:"meta.embedded.expression",foreground:"ADBAC7"},{token:"entity.name.function",foreground:"DCBDFB"},{token:"entity.name.tag",foreground:"8DDB8C"},{token:"support.class.component",foreground:"8DDB8C"},{token:"keyword",foreground:"F47067"},{token:"storage",foreground:"F47067"},{token:"storage.type",foreground:"F47067"},{token:"storage.modifier.package",foreground:"ADBAC7"},{token:"storage.modifier.import",foreground:"ADBAC7"},{token:"storage.type.java",foreground:"ADBAC7"},{token:"string",foreground:"96D0FF"},{token:"string punctuation.section.embedded source",foreground:"96D0FF"},{token:"support",foreground:"6CB6FF"},{token:"meta.property-name",foreground:"6CB6FF"},{token:"variable",foreground:"F69D50"},{token:"variable.other",foreground:"ADBAC7"},{token:"invalid.broken",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.illegal",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"FF938A",fontStyle:"italic"},{token:"carriage-return",foreground:"CDD9E5",fontStyle:"italic underline"},{token:"message.error",foreground:"FF938A"},{token:"string variable",foreground:"6CB6FF"},{token:"source.regexp",foreground:"96D0FF"},{token:"string.regexp",foreground:"96D0FF"},{token:"string.regexp.character-class",foreground:"96D0FF"},{token:"string.regexp constant.character.escape",foreground:"96D0FF"},{token:"string.regexp source.ruby.embedded",foreground:"96D0FF"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"96D0FF"},{token:"string.regexp constant.character.escape",foreground:"8DDB8C",fontStyle:"bold"},{token:"support.constant",foreground:"6CB6FF"},{token:"support.variable",foreground:"6CB6FF"},{token:"support.type.property-name.json",foreground:"8DDB8C"},{token:"meta.module-reference",foreground:"6CB6FF"},{token:"punctuation.definition.list.begin.markdown",foreground:"F69D50"},{token:"markup.heading",foreground:"6CB6FF",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"6CB6FF",fontStyle:"bold"},{token:"markup.quote",foreground:"8DDB8C"},{token:"markup.italic",foreground:"ADBAC7",fontStyle:"italic"},{token:"markup.bold",foreground:"ADBAC7",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"6CB6FF"},{token:"markup.deleted",foreground:"FF938A"},{token:"meta.diff.header.from-file",foreground:"FF938A"},{token:"punctuation.definition.deleted",foreground:"FF938A"},{token:"punctuation.section.embedded",foreground:"F47067"},{token:"markup.inserted",foreground:"8DDB8C"},{token:"meta.diff.header.to-file",foreground:"8DDB8C"},{token:"punctuation.definition.inserted",foreground:"8DDB8C"},{token:"markup.changed",foreground:"F69D50"},{token:"punctuation.definition.changed",foreground:"F69D50"},{token:"markup.ignored",foreground:"2D333B"},{token:"markup.untracked",foreground:"2D333B"},{token:"meta.diff.range",foreground:"DCBDFB",fontStyle:"bold"},{token:"meta.diff.header",foreground:"6CB6FF"},{token:"meta.separator",foreground:"6CB6FF",fontStyle:"bold"},{token:"meta.output",foreground:"6CB6FF"},{token:"brackethighlighter.tag",foreground:"768390"},{token:"brackethighlighter.curly",foreground:"768390"},{token:"brackethighlighter.round",foreground:"768390"},{token:"brackethighlighter.square",foreground:"768390"},{token:"brackethighlighter.angle",foreground:"768390"},{token:"brackethighlighter.quote",foreground:"768390"},{token:"brackethighlighter.unmatched",foreground:"FF938A"},{token:"constant.other.reference.link",foreground:"96D0FF"},{token:"string.other.link",foreground:"96D0FF"}],colors:{focusBorder:"#316DCA",foreground:"#ADBAC7",descriptionForeground:"#768390",errorForeground:"#E5534B","textLink.foreground":"#539BF5","textLink.activeForeground":"#539BF5","textBlockQuote.background":"#1C2128","textBlockQuote.border":"#444C56","textCodeBlock.background":"#636E7B66","textPreformat.foreground":"#768390","textSeparator.foreground":"#373E47","button.background":"#347D39","button.foreground":"#FFFFFF","button.hoverBackground":"#46954A","dropdown.background":"#2D333B","dropdown.border":"#444C56","dropdown.foreground":"#ADBAC7","input.background":"#22272E","input.border":"#444C56","input.foreground":"#ADBAC7","input.placeholderForeground":"#636E7B","badge.foreground":"#CDD9E5","badge.background":"#316DCA","progressBar.background":"#316DCA","list.hoverForeground":"#ADBAC7","list.inactiveSelectionForeground":"#ADBAC7","list.activeSelectionForeground":"#ADBAC7","list.hoverBackground":"#636E7B1A","list.inactiveSelectionBackground":"#636E7B66","list.activeSelectionBackground":"#636E7B66","list.focusForeground":"#ADBAC7","list.focusBackground":"#4184E426","list.highlightForeground":"#539BF5","pickerGroup.border":"#444C56","pickerGroup.foreground":"#768390","editor.foreground":"#ADBAC7","editor.background":"#22272E","editorWidget.background":"#2D333B","editor.lineHighlightBackground":"#636E7B1A","editorLineNumber.foreground":"#636E7B","editorLineNumber.activeForeground":"#ADBAC7","editorIndentGuide.background":"#ADBAC71F","editorWhitespace.foreground":"#545D68","editorCursor.foreground":"#539BF5","editor.findMatchBackground":"#966600","editor.findMatchHighlightBackground":"#EAC55F80","editor.selectionHighlightBackground":"#57AB5A40","editor.wordHighlightBackground":"#636E7B80","editor.wordHighlightStrongBackground":"#636E7B4D","editorBracketMatch.background":"#57AB5A40","editorBracketMatch.border":"#57AB5A99","editorInlayHint.background":"#76839033","editorInlayHint.foreground":"#768390","diffEditor.insertedTextBackground":"#57AB5A4D","diffEditor.removedTextBackground":"#F470674D","scrollbar.shadow":"#545D6833","scrollbarSlider.background":"#76839033","scrollbarSlider.hoverBackground":"#7683903D","scrollbarSlider.activeBackground":"#76839047","editorOverviewRuler.border":"#1C2128","peekViewEditor.matchHighlightBackground":"#AE7C1466","peekViewResult.matchHighlightBackground":"#AE7C1466","peekViewEditor.background":"#636E7B1A","peekViewResult.background":"#22272E"}},"github-dark":{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"8B949E"},{token:"punctuation.definition.comment",foreground:"8B949E"},{token:"string.comment",foreground:"8B949E"},{token:"constant.other.placeholder",foreground:"FF7B72"},{token:"constant.character",foreground:"FF7B72"},{token:"constant",foreground:"79C0FF"},{token:"entity.name.constant",foreground:"79C0FF"},{token:"variable.other.constant",foreground:"79C0FF"},{token:"variable.other.enummember",foreground:"79C0FF"},{token:"variable.language",foreground:"79C0FF"},{token:"entity",foreground:"79C0FF"},{token:"entity.name",foreground:"FFA657"},{token:"meta.export.default",foreground:"FFA657"},{token:"meta.definition.variable",foreground:"FFA657"},{token:"variable.parameter.function",foreground:"E6EDF3"},{token:"meta.jsx.children",foreground:"E6EDF3"},{token:"meta.block",foreground:"E6EDF3"},{token:"meta.tag.attributes",foreground:"E6EDF3"},{token:"entity.name.constant",foreground:"E6EDF3"},{token:"meta.object.member",foreground:"E6EDF3"},{token:"meta.embedded.expression",foreground:"E6EDF3"},{token:"entity.name.function",foreground:"D2A8FF"},{token:"entity.name.tag",foreground:"7EE787"},{token:"support.class.component",foreground:"7EE787"},{token:"keyword",foreground:"FF7B72"},{token:"storage",foreground:"FF7B72"},{token:"storage.type",foreground:"FF7B72"},{token:"storage.modifier.package",foreground:"E6EDF3"},{token:"storage.modifier.import",foreground:"E6EDF3"},{token:"storage.type.java",foreground:"E6EDF3"},{token:"string",foreground:"A5D6FF"},{token:"string punctuation.section.embedded source",foreground:"A5D6FF"},{token:"support",foreground:"79C0FF"},{token:"meta.property-name",foreground:"79C0FF"},{token:"variable",foreground:"FFA657"},{token:"variable.other",foreground:"E6EDF3"},{token:"invalid.broken",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.illegal",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"FFA198",fontStyle:"italic"},{token:"carriage-return",foreground:"F0F6FC",fontStyle:"italic underline"},{token:"message.error",foreground:"FFA198"},{token:"string variable",foreground:"79C0FF"},{token:"source.regexp",foreground:"A5D6FF"},{token:"string.regexp",foreground:"A5D6FF"},{token:"string.regexp.character-class",foreground:"A5D6FF"},{token:"string.regexp constant.character.escape",foreground:"A5D6FF"},{token:"string.regexp source.ruby.embedded",foreground:"A5D6FF"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"A5D6FF"},{token:"string.regexp constant.character.escape",foreground:"7EE787",fontStyle:"bold"},{token:"support.constant",foreground:"79C0FF"},{token:"support.variable",foreground:"79C0FF"},{token:"support.type.property-name.json",foreground:"7EE787"},{token:"meta.module-reference",foreground:"79C0FF"},{token:"punctuation.definition.list.begin.markdown",foreground:"FFA657"},{token:"markup.heading",foreground:"79C0FF",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"79C0FF",fontStyle:"bold"},{token:"markup.quote",foreground:"7EE787"},{token:"markup.italic",foreground:"E6EDF3",fontStyle:"italic"},{token:"markup.bold",foreground:"E6EDF3",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"79C0FF"},{token:"markup.deleted",foreground:"FFA198"},{token:"meta.diff.header.from-file",foreground:"FFA198"},{token:"punctuation.definition.deleted",foreground:"FFA198"},{token:"punctuation.section.embedded",foreground:"FF7B72"},{token:"markup.inserted",foreground:"7EE787"},{token:"meta.diff.header.to-file",foreground:"7EE787"},{token:"punctuation.definition.inserted",foreground:"7EE787"},{token:"markup.changed",foreground:"FFA657"},{token:"punctuation.definition.changed",foreground:"FFA657"},{token:"markup.ignored",foreground:"161B22"},{token:"markup.untracked",foreground:"161B22"},{token:"meta.diff.range",foreground:"D2A8FF",fontStyle:"bold"},{token:"meta.diff.header",foreground:"79C0FF"},{token:"meta.separator",foreground:"79C0FF",fontStyle:"bold"},{token:"meta.output",foreground:"79C0FF"},{token:"brackethighlighter.tag",foreground:"8B949E"},{token:"brackethighlighter.curly",foreground:"8B949E"},{token:"brackethighlighter.round",foreground:"8B949E"},{token:"brackethighlighter.square",foreground:"8B949E"},{token:"brackethighlighter.angle",foreground:"8B949E"},{token:"brackethighlighter.quote",foreground:"8B949E"},{token:"brackethighlighter.unmatched",foreground:"FFA198"},{token:"constant.other.reference.link",foreground:"A5D6FF"},{token:"string.other.link",foreground:"A5D6FF"}],colors:{focusBorder:"#1F6FEB",foreground:"#E6EDF3",descriptionForeground:"#7D8590",errorForeground:"#F85149","textLink.foreground":"#2F81F7","textLink.activeForeground":"#2F81F7","textBlockQuote.background":"#010409","textBlockQuote.border":"#30363D","textCodeBlock.background":"#6E768166","textPreformat.foreground":"#7D8590","textSeparator.foreground":"#21262D","button.background":"#238636","button.foreground":"#FFFFFF","button.hoverBackground":"#2EA043","dropdown.background":"#161B22","dropdown.border":"#30363D","dropdown.foreground":"#E6EDF3","input.background":"#0D1117","input.border":"#30363D","input.foreground":"#E6EDF3","input.placeholderForeground":"#6E7681","badge.foreground":"#FFFFFF","badge.background":"#1F6FEB","progressBar.background":"#1F6FEB","list.hoverForeground":"#E6EDF3","list.inactiveSelectionForeground":"#E6EDF3","list.activeSelectionForeground":"#E6EDF3","list.hoverBackground":"#6E76811A","list.inactiveSelectionBackground":"#6E768166","list.activeSelectionBackground":"#6E768166","list.focusForeground":"#E6EDF3","list.focusBackground":"#388BFD26","list.highlightForeground":"#2F81F7","pickerGroup.border":"#30363D","pickerGroup.foreground":"#7D8590","editor.foreground":"#E6EDF3","editor.background":"#0D1117","editorWidget.background":"#161B22","editor.lineHighlightBackground":"#6E76811A","editorLineNumber.foreground":"#6E7681","editorLineNumber.activeForeground":"#E6EDF3","editorIndentGuide.background":"#E6EDF31F","editorWhitespace.foreground":"#484F58","editorCursor.foreground":"#2F81F7","editor.findMatchBackground":"#9E6A03","editor.findMatchHighlightBackground":"#F2CC6080","editor.selectionHighlightBackground":"#3FB95040","editor.wordHighlightBackground":"#6E768180","editor.wordHighlightStrongBackground":"#6E76814D","editorBracketMatch.background":"#3FB95040","editorBracketMatch.border":"#3FB95099","editorInlayHint.background":"#8B949E33","editorInlayHint.foreground":"#7D8590","diffEditor.insertedTextBackground":"#3FB9504D","diffEditor.removedTextBackground":"#FF7B724D","scrollbar.shadow":"#484F5833","scrollbarSlider.background":"#8B949E33","scrollbarSlider.hoverBackground":"#8B949E3D","scrollbarSlider.activeBackground":"#8B949E47","editorOverviewRuler.border":"#010409","peekViewEditor.matchHighlightBackground":"#BB800966","peekViewResult.matchHighlightBackground":"#BB800966","peekViewEditor.background":"#6E76811A","peekViewResult.background":"#0D1117"}},"github-light":{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"6E7781"},{token:"punctuation.definition.comment",foreground:"6E7781"},{token:"string.comment",foreground:"6E7781"},{token:"constant.other.placeholder",foreground:"CF222E"},{token:"constant.character",foreground:"CF222E"},{token:"constant",foreground:"0550AE"},{token:"entity.name.constant",foreground:"0550AE"},{token:"variable.other.constant",foreground:"0550AE"},{token:"variable.other.enummember",foreground:"0550AE"},{token:"variable.language",foreground:"0550AE"},{token:"entity",foreground:"0550AE"},{token:"entity.name",foreground:"953800"},{token:"meta.export.default",foreground:"953800"},{token:"meta.definition.variable",foreground:"953800"},{token:"variable.parameter.function",foreground:"1F2328"},{token:"meta.jsx.children",foreground:"1F2328"},{token:"meta.block",foreground:"1F2328"},{token:"meta.tag.attributes",foreground:"1F2328"},{token:"entity.name.constant",foreground:"1F2328"},{token:"meta.object.member",foreground:"1F2328"},{token:"meta.embedded.expression",foreground:"1F2328"},{token:"entity.name.function",foreground:"8250DF"},{token:"entity.name.tag",foreground:"116329"},{token:"support.class.component",foreground:"116329"},{token:"keyword",foreground:"CF222E"},{token:"storage",foreground:"CF222E"},{token:"storage.type",foreground:"CF222E"},{token:"storage.modifier.package",foreground:"1F2328"},{token:"storage.modifier.import",foreground:"1F2328"},{token:"storage.type.java",foreground:"1F2328"},{token:"string",foreground:"0A3069"},{token:"string punctuation.section.embedded source",foreground:"0A3069"},{token:"support",foreground:"0550AE"},{token:"meta.property-name",foreground:"0550AE"},{token:"variable",foreground:"953800"},{token:"variable.other",foreground:"1F2328"},{token:"invalid.broken",foreground:"82071E",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"82071E",fontStyle:"italic"},{token:"invalid.illegal",foreground:"82071E",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"82071E",fontStyle:"italic"},{token:"carriage-return",foreground:"F6F8FA",fontStyle:"italic underline"},{token:"message.error",foreground:"82071E"},{token:"string variable",foreground:"0550AE"},{token:"source.regexp",foreground:"0A3069"},{token:"string.regexp",foreground:"0A3069"},{token:"string.regexp.character-class",foreground:"0A3069"},{token:"string.regexp constant.character.escape",foreground:"0A3069"},{token:"string.regexp source.ruby.embedded",foreground:"0A3069"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"0A3069"},{token:"string.regexp constant.character.escape",foreground:"116329",fontStyle:"bold"},{token:"support.constant",foreground:"0550AE"},{token:"support.variable",foreground:"0550AE"},{token:"support.type.property-name.json",foreground:"116329"},{token:"meta.module-reference",foreground:"0550AE"},{token:"punctuation.definition.list.begin.markdown",foreground:"953800"},{token:"markup.heading",foreground:"0550AE",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"0550AE",fontStyle:"bold"},{token:"markup.quote",foreground:"116329"},{token:"markup.italic",foreground:"1F2328",fontStyle:"italic"},{token:"markup.bold",foreground:"1F2328",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"0550AE"},{token:"markup.deleted",foreground:"82071E"},{token:"meta.diff.header.from-file",foreground:"82071E"},{token:"punctuation.definition.deleted",foreground:"82071E"},{token:"punctuation.section.embedded",foreground:"CF222E"},{token:"markup.inserted",foreground:"116329"},{token:"meta.diff.header.to-file",foreground:"116329"},{token:"punctuation.definition.inserted",foreground:"116329"},{token:"markup.changed",foreground:"953800"},{token:"punctuation.definition.changed",foreground:"953800"},{token:"markup.ignored",foreground:"EAEEF2"},{token:"markup.untracked",foreground:"EAEEF2"},{token:"meta.diff.range",foreground:"8250DF",fontStyle:"bold"},{token:"meta.diff.header",foreground:"0550AE"},{token:"meta.separator",foreground:"0550AE",fontStyle:"bold"},{token:"meta.output",foreground:"0550AE"},{token:"brackethighlighter.tag",foreground:"57606A"},{token:"brackethighlighter.curly",foreground:"57606A"},{token:"brackethighlighter.round",foreground:"57606A"},{token:"brackethighlighter.square",foreground:"57606A"},{token:"brackethighlighter.angle",foreground:"57606A"},{token:"brackethighlighter.quote",foreground:"57606A"},{token:"brackethighlighter.unmatched",foreground:"82071E"},{token:"constant.other.reference.link",foreground:"0A3069"},{token:"string.other.link",foreground:"0A3069"}],colors:{focusBorder:"#0969DA",foreground:"#1F2328",descriptionForeground:"#656D76",errorForeground:"#CF222E","textLink.foreground":"#0969DA","textLink.activeForeground":"#0969DA","textBlockQuote.background":"#F6F8FA","textBlockQuote.border":"#D0D7DE","textCodeBlock.background":"#AFB8C133","textPreformat.foreground":"#656D76","textSeparator.foreground":"#D8DEE4","button.background":"#1F883D","button.foreground":"#FFFFFF","button.hoverBackground":"#1A7F37","dropdown.background":"#FFFFFF","dropdown.border":"#D0D7DE","dropdown.foreground":"#1F2328","input.background":"#FFFFFF","input.border":"#D0D7DE","input.foreground":"#1F2328","input.placeholderForeground":"#6E7781","badge.foreground":"#FFFFFF","badge.background":"#0969DA","progressBar.background":"#0969DA","list.hoverForeground":"#1F2328","list.inactiveSelectionForeground":"#1F2328","list.activeSelectionForeground":"#1F2328","list.hoverBackground":"#EAEEF280","list.inactiveSelectionBackground":"#AFB8C133","list.activeSelectionBackground":"#AFB8C133","list.focusForeground":"#1F2328","list.focusBackground":"#DDF4FF","list.highlightForeground":"#0969DA","pickerGroup.border":"#D0D7DE","pickerGroup.foreground":"#656D76","editor.foreground":"#1F2328","editor.background":"#FFFFFF","editorWidget.background":"#FFFFFF","editor.lineHighlightBackground":"#EAEEF280","editorLineNumber.foreground":"#8C959F","editorLineNumber.activeForeground":"#1F2328","editorIndentGuide.background":"#1F23281F","editorWhitespace.foreground":"#AFB8C1","editorCursor.foreground":"#0969DA","editor.findMatchBackground":"#BF8700","editor.findMatchHighlightBackground":"#FAE17D80","editor.selectionHighlightBackground":"#4AC26B40","editor.wordHighlightBackground":"#EAEEF280","editor.wordHighlightStrongBackground":"#AFB8C14D","editorBracketMatch.background":"#4AC26B40","editorBracketMatch.border":"#4AC26B99","editorInlayHint.background":"#AFB8C133","editorInlayHint.foreground":"#656D76","diffEditor.insertedTextBackground":"#6FDD8B80","diffEditor.removedTextBackground":"#FF818266","scrollbar.shadow":"#6E778133","scrollbarSlider.background":"#8C959F33","scrollbarSlider.hoverBackground":"#8C959F3D","scrollbarSlider.activeBackground":"#8C959F47","editorOverviewRuler.border":"#FFFFFF"}},monokai:{base:"vs-dark",inherit:!0,rules:[{token:"meta.embedded",foreground:"F8F8F2"},{token:"source.groovy.embedded",foreground:"F8F8F2"},{token:"string meta.image.inline.markdown",foreground:"F8F8F2"},{token:"variable.legacy.builtin.python",foreground:"F8F8F2"},{token:"comment",foreground:"88846F"},{token:"string",foreground:"E6DB74"},{token:"punctuation.definition.template-expression",foreground:"F92672"},{token:"punctuation.section.embedded",foreground:"F92672"},{token:"meta.template.expression",foreground:"F8F8F2"},{token:"constant.numeric",foreground:"AE81FF"},{token:"constant.language",foreground:"AE81FF"},{token:"constant.character, constant.other",foreground:"AE81FF"},{token:"variable",foreground:"F8F8F2"},{token:"keyword",foreground:"F92672"},{token:"storage",foreground:"F92672"},{token:"storage.type",foreground:"66D9EF",fontStyle:"italic"},{token:"entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution",foreground:"A6E22E",fontStyle:"underline"},{token:"entity.other.inherited-class",foreground:"A6E22E",fontStyle:"italic underline"},{token:"entity.name.function",foreground:"A6E22E"},{token:"variable.parameter",foreground:"FD971F",fontStyle:"italic"},{token:"entity.name.tag",foreground:"F92672"},{token:"entity.other.attribute-name",foreground:"A6E22E"},{token:"support.function",foreground:"66D9EF"},{token:"support.constant",foreground:"66D9EF"},{token:"support.type, support.class",foreground:"66D9EF",fontStyle:"italic"},{token:"support.other.variable"},{token:"invalid",foreground:"F44747"},{token:"invalid.deprecated",foreground:"F44747"},{token:"meta.structure.dictionary.json string.quoted.double.json",foreground:"CFCFC2"},{token:"meta.diff, meta.diff.header",foreground:"75715E"},{token:"markup.deleted",foreground:"F92672"},{token:"markup.inserted",foreground:"A6E22E"},{token:"markup.changed",foreground:"E6DB74"},{token:"constant.numeric.line-number.find-in-files - match",foreground:"AE81FFA0"},{token:"entity.name.filename.find-in-files",foreground:"E6DB74"},{token:"markup.quote",foreground:"F92672"},{token:"markup.list",foreground:"E6DB74"},{token:"markup.bold, markup.italic",foreground:"66D9EF"},{token:"markup.inline.raw",foreground:"FD971F"},{token:"markup.heading",foreground:"A6E22E"},{token:"markup.heading.setext",foreground:"A6E22E",fontStyle:"bold"},{token:"markup.heading.markdown",fontStyle:"bold"},{token:"markup.quote.markdown",foreground:"75715E",fontStyle:"italic"},{token:"markup.bold.markdown",fontStyle:"bold"},{token:"string.other.link.title.markdown,string.other.link.description.markdown",foreground:"AE81FF"},{token:"markup.underline.link.markdown,markup.underline.link.image.markdown",foreground:"E6DB74"},{token:"markup.italic.markdown",fontStyle:"italic"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.list.unnumbered.markdown, markup.list.numbered.markdown",foreground:"F8F8F2"},{token:"punctuation.definition.list.begin.markdown",foreground:"A6E22E"},{token:"token.info-token",foreground:"6796E6"},{token:"token.warn-token",foreground:"CD9731"},{token:"token.error-token",foreground:"F44747"},{token:"token.debug-token",foreground:"B267E6"},{token:"variable.language",foreground:"FD971F"}],colors:{"dropdown.background":"#414339","list.activeSelectionBackground":"#75715E","list.inactiveSelectionBackground":"#414339","list.hoverBackground":"#3E3D32","list.dropBackground":"#414339","list.highlightForeground":"#F8F8F2","button.background":"#75715E","editor.background":"#272822","editor.foreground":"#F8F8F2","selection.background":"#878B9180","editor.selectionHighlightBackground":"#575B6180","editor.selectionBackground":"#878B9180","editor.wordHighlightBackground":"#4A4A7680","editor.wordHighlightStrongBackground":"#6A6A9680","editor.lineHighlightBackground":"#3E3D32","editorLineNumber.activeForeground":"#C2C2BF","editorCursor.foreground":"#F8F8F0","editorWhitespace.foreground":"#464741","editorIndentGuide.background":"#464741","widget.shadow":"#00000098","progressBar.background":"#75715E","badge.background":"#75715E","badge.foreground":"#F8F8F2","editorLineNumber.foreground":"#90908A","pickerGroup.foreground":"#75715E","input.background":"#414339","inputOption.activeBorder":"#75715E",focusBorder:"#99947C","editorWidget.background":"#1E1F1C","diffEditor.insertedTextBackground":"#4B661680","diffEditor.removedTextBackground":"#90274A70","inputValidation.errorBackground":"#90274A","inputValidation.errorBorder":"#F92672","inputValidation.warningBackground":"#848528","inputValidation.warningBorder":"#E2E22E","inputValidation.infoBackground":"#546190","inputValidation.infoBorder":"#819AFF","editorHoverWidget.background":"#414339","editorHoverWidget.border":"#75715E","editorSuggestWidget.background":"#272822","editorSuggestWidget.border":"#75715E","peekView.border":"#75715E","peekViewEditor.background":"#272822","peekViewResult.background":"#1E1F1C","peekViewTitle.background":"#1E1F1C","peekViewResult.selectionBackground":"#414339","peekViewResult.matchHighlightBackground":"#75715E","peekViewEditor.matchHighlightBackground":"#75715E"}}};function _(e,o){let r={...o};for(let t in e)typeof e[t]=="object"&&!Array.isArray(e[t])?o[t]&&typeof o[t]=="object"&&!Array.isArray(o[t])?r[t]=_(e[t],o[t]):r[t]={...e[t]}:r[t]=e[t];return r}var xe=({filename:e,endpoint:o,framework:r,theme:t,completionSpeed:n,externalContext:i,...d})=>{let[a,u]=L.default.useState(null),c=L.default.useCallback((l,f)=>{u(f),t&&!K.includes(t)&&(f.editor.defineTheme(t,ce[t]),f.editor.setTheme(t)),d.onMount?.(l,f)},[d,t]);return se(e,o,r,d.language,n,i,a),L.default.createElement(le.Editor,{...d,key:t,theme:t,onMount:c,options:_(d.options,Q)})},fe=xe;y(E,require("@monaco-editor/react"),module.exports);0&&(module.exports={Copilot,Editor,...require("@monaco-editor/react")});
22
+ }$0`,") =>":" {"};var X=[{language:"javascript",snippets:J}];var w=class{constructor(){this.predictions=new Map,this.loadPredictions()}loadPredictions(){X.forEach(o=>{this.predictions.set(o.language,o.snippets)})}predictCode(o,r){let t=this.predictions.get(o);if(!t)return"";r=r.split("").reverse().join("");for(let n in t)if(r.startsWith(n.split("").reverse().join("")))return t[n];return""}};var Z=(e,o)=>e[o]||"",O=e=>{let o=e.split(`
23
+ `);return o[o.length-1].length};var ee=(e,o)=>{let r=o.getLineContent(e.lineNumber),t=e.column-1,n=r.substring(t);return/\s/.test(n)},oe=(e,o)=>{let r=new Set(['"',"'","}","]",")",","," ",":","."]),t=o.getLineContent(e.lineNumber),n=Z(t,e.column-1);return!r.has(n)&&!!n},C=(e,o)=>{let r=o.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:e.lineNumber,endColumn:e.column}),t=o.getValueInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:o.getLineCount(),endColumn:o.getLineMaxColumn(o.getLineCount())});return{codeBeforeCursor:r,codeAfterCursor:t}},re=(e,o)=>{let r=o.getLineContent(e.lineNumber),t=r.slice(e.column-1).trim(),n=r.slice(0,e.column-1).trim();return e.column<=3&&(t!==""||n!=="")},te=(e,o)=>{let{lineNumber:r,column:t}=e,n=o.getLineContent(r),d=n.slice(0,t-1).trim(),i=n.slice(t-1).trim(),a=d.length>0,g=i.length>0;return a&&g?"fill-in-the-middle":"completion"};var ne={javascript:1,typescript:2,typescriptreact:3,python:4,vue:5,php:6,dart:7,javascriptreact:8,go:9,css:10,cpp:11,html:12,scss:13,markdown:14,csharp:15,java:16,json:17,rust:18,ruby:19,c:20},H={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95},l=[.9978708359643611,.7001905605239328,-.1736749244124868,-.22994157947320112,.13406692641682572,-.007751370662011853,.0057783222035240715,.41910878254476003,-.1621657125711092,.13770814958908187,-.06036011308184006,-.07351180985800129,0,-.05584878151248109,.30618794079412015,-.1282197982598485,.10951859303997555,.1700461782788777,-.3346057842644757,.22497985923128136,0,-.44038101825774356,-.6540115939236782,.16595600081341702,.20733910722385135,-.1337033766105696,-.06923072125290894,-.05806684191976292,.3583334671633344,-.47357732824944315,.17810871365594377,.42268219963946685,0,0,-.16379620467004602,-.43893868831061167,0,.11570094006709251,.9326431262654882,-.9990110509203912,-.44125275652726503,-.15840786997162004,-.4600396256644451,-.018814811994044403,.09230944537175266,.025814790934742798,-1.0940162204190154,-.9407503631235489,-.9854303778694269,-1.1045822488262245,-1.1417299456573262,-1.5623704405345513,-.4157473855795939,-1.0244257735561713,-.7477401944601753,-1.1275109699068402,-.0714715633552533,-1.1408628006786907,-1.0409898655074672,-.2288889836518878,-.5469549893760344,-.181946611106845,.1264329316374918,0,0,.312206968554707,-.3656436392517924,.23655650686038968,.1014912419901576,0,.06287549221765308,0,0,.19027065218932154,-.8519502045974378,0,.23753599905971923,.2488809322489166,.019969251907983224,0,.06916505526229488,.29053356359188204,-.14484456555431657,.014768129429370188,-.15051464926341374,.07614835502776021,-.3317489901313935,0,0,.04921938684669103,-.28248576768353445,-.9708816204525345,-1.3560464522265527,.014165375212383239,-.23924166472544983,.10006595730248855,.09867233147279562,.32330430333220644,-.058625706114180595,.17149853105783947,.4436484054395367,.047189049576707255,.16832520944790552,.1117259900942179,-.35469010329927253,0,-.1528189124465582,-.3804848349564939,.07278077320753953,.13263786480064088,.22920682659292527,1.1512955314336537,0,.016939862282340023,.4242994650403408,.12759835577444986,-.5577261135825583,-.19764560943067672,-.4042102444736004,.12063461617733708,-.2933966817484834,.2715683893968593,0,-.7138548251238751,0,-.023066228703035277,0,-.06383043976746139,.09683723720709651,-.7337151424080791,0,-.27191370124625525,.2819781269656171,-.08711496549050252,.11048604909969338,-.0934849550450534,.0721001250772912,.2589126797890794,.6729582659532254,-.21921032738244908,-.21535277468651456,-.45474006124091354,-.05861820126419139,-.007875306207720204,-.056661261678809284,.17727881404222662,.23603713348534658,.17485861412377932,-.5737483768696752,-.38220029570342745,-.5202722985519168,-.37187947527657256,.47155277792990113,-.12077912346691123,.47825628981545326,.4736704404000214,-.1615218651546898,.18362447973513005,0,0,-.18183417425866824,0,0,-.2538532305733833,-.1303692690676528,-.4073577969188216,.04172985870928789,-.1704527388573901,0,0,.7536858953385828,-.44703159588787644,0,-.7246484085580873,-.21378128540782063,0,.037461090552656146,-.16205852364367032,-.10973952064404884,.017468043407647377,-.1288980387397392,0,0,0,-1.218692715379445,.05536949662193305,-.3763799844799116,-.1845001725624579,-.1615576298149558,0,-.15373262203249874,-.04603412604270418,0,-.3068149681460828,.09412352468269412,0,.09116543650609721,.06065865264082559,.05688267379386188,-.05873945477722306,0,.14532465133322153,.1870857769705463,.36304258043185555,.1411392422180405,.0630388629716367,0,-1.1170522012450395,.16133697772771127,.15908534390781448,-.23485453704002232,-.1419980841417892,.21909510179526218,.39948420260153766,.40802294284289187,.15403767653746853,0,.19764784115096676,.584914157527457,0,-.4573883817015294],ie=-.3043572714994554,de=.15;var N=class{constructor(){this.previousLabel=0,this.previousLabelTimestamp=Date.now()-3600*1e3,this.probabilityAccept=0}},ae=e=>{let o=new N,r=o.previousLabel,t=0;e.properties.afterCursorWhitespace==="true"&&(t=1);let n=(Date.now()-o.previousLabelTimestamp)/1e3,d=Math.log(1+n),i=0,a=0,g=0,s=0;if(e.prefix){i=Math.log(1+O(e.prefix));let m=e.prefix.slice(-1);a=H[m]??0}let c=e.prefix?.trimEnd();if(c){g=Math.log(1+O(c));let m=c.slice(-1);s=H[m]??0}let u=e.measurements.documentLength?Math.log(1+e.measurements.documentLength):0,f=e.measurements.promptEndPos?Math.log(1+e.measurements.promptEndPos):0,h=e.measurements.promptEndPos&&e.measurements.documentLength?(e.measurements.promptEndPos+.5)/(1+e.measurements.documentLength):0,B=e.properties.languageId?ne[e.properties.languageId]:0,p=ie;p+=l[0]*r+l[1]*t+l[2]*d,p+=l[3]*i+l[4]*g,p+=l[5]*u+l[6]*f,p+=l[7]*h,p+=l[8+B],p+=l[29+a],p+=l[125+s];let E=1/(1+Math.exp(-p));return o.probabilityAccept=E,E};var ue=(e,o,r)=>Ae(e,o,r)>de&&!oe(e,o)&&!re(e,o),Ae=(e,o,r)=>{let{codeBeforeCursor:t}=C(e,o),n=ee(e,o),d=o.getValueLength(),i=o.getOffsetAt(e);return ae({properties:{afterCursorWhitespace:n?"true":"false",languageId:r},measurements:{documentLength:d,promptEndPos:i},prefix:t})};var ge=async({filename:e,endpoint:o,code:r,language:t,framework:n,externalContext:d,model:i,position:a,token:g})=>{if(!ue(a,i,t)||!r)return null;let s=new AbortController,c=await v(o,{completionMetadata:De({filename:e,position:a,model:i,language:t,framework:n,externalContext:d})},{headers:{"Content-Type":"application/json"},error:"Error while fetching completion item",signal:s.signal});return g.isCancellationRequested?(s.abort(),null):c.error?null:c.choices[0].message.content},De=({filename:e,position:o,model:r,language:t,framework:n,externalContext:d})=>{let i=te(o,r),{codeBeforeCursor:a,codeAfterCursor:g}=C(o,r);return{filename:e,language:t,framework:n||void 0,externalContext:d,codeBeforeCursor:a,codeAfterCursor:g,editorState:{completionMode:i}}},se=(e,o)=>{let{codeBeforeCursor:r}=C(e,o);return`${e.lineNumber}:${e.column}:${r}`};var S=P(require("react")),Te=(e,o=1e3)=>{let r=S.default.useRef(null),t=S.default.useCallback((...n)=>(r.current&&clearTimeout(r.current),new Promise((d,i)=>{r.current=setTimeout(()=>{e(...n).then(d).catch(i)},o)})),[e,o]);return S.default.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),t},ce=Te;var ve=new w,xe=(e,o,r,t,n,d,i)=>{let a=L.default.useRef(new Map),g=L.default.useRef(!1),s=ce(ge,n==="little-faster"?350:600);return L.default.useEffect(()=>{if(!i||!t||!o)return;let c=i.languages.registerInlineCompletionsProvider(t,{provideInlineCompletions:async(u,f,h,B)=>{if(g.current)return g.current=!1,{items:[]};let p=u.getValue(),E=new i.Range(f.lineNumber,f.column,f.lineNumber,f.column),m=se(f,u);if(a.current.has(m)){let k=a.current.get(m);if(g.current=!0,k)return{items:[k],enableForwardStability:!0}}let $=ve.predictCode(t,p);if($){let k={insertText:{snippet:$},range:E,completeBracketPairs:!0};return a.current.set(m,k),{items:[k],enableForwardStability:!0}}if(B.isCancellationRequested)return{items:[]};try{let k=await s({filename:e,endpoint:o,code:p,language:t,framework:r,externalContext:d,model:u,position:f,token:B});if(k){let j={insertText:k,range:E};return a.current.set(m,j),g.current=!0,{items:[j],enableForwardStability:!0}}}catch{return{items:[]}}return{items:[]}},freeInlineCompletions:()=>{}});return()=>{c.dispose()}},[i,t,r,d,s,o,e]),null},le=xe;var fe={"codesandbox-dark":{base:"vs-dark",inherit:!0,rules:[{token:"string",foreground:"BFD084"},{token:"punctuation.definition.string",foreground:"BFD084"},{token:"constant.character.escape",foreground:"BFD084"},{token:"text.html constant.character.entity.named",foreground:"BFD084"},{token:"text.html.derivative",foreground:"E5E5E5"},{token:"punctuation.definition.entity.html",foreground:"BFD084"},{token:"template.expression.begin",foreground:"7AD9FB"},{token:"template.expression.end",foreground:"7AD9FB"},{token:"punctuation.definition.template-expression.begin",foreground:"7AD9FB"},{token:"punctuation.definition.template-expression.end",foreground:"7AD9FB"},{token:"constant",foreground:"7AD9FB"},{token:"keyword",foreground:"A390FF"},{token:"modifier",foreground:"A390FF"},{token:"storage",foreground:"A390FF"},{token:"punctuation.definition.block",foreground:"86897A"},{token:"punctuation.definition.parameters",foreground:"86897A"},{token:"meta.brace.round",foreground:"86897A"},{token:"meta.jsx.children",foreground:"E5E5E5"},{token:"punctuation.accessor",foreground:"86897A"},{token:"variable.other",foreground:"FFFFFF"},{token:"variable.parameter",foreground:"FFFFFF"},{token:"meta.embedded",foreground:"E5E5E5"},{token:"source.groovy.embedded",foreground:"E5E5E5"},{token:"meta.template.expression",foreground:"E5E5E5"},{token:"comment",foreground:"6F6F6F"},{token:"docblock",foreground:"6F6F6F"},{token:"meta.function-call",foreground:"CDF861"},{token:"meta.class entity.name.type.class",foreground:"FFFFFF",fontStyle:"underline"},{token:"meta.class entity.name.type.module",foreground:"CABEFF"},{token:"meta.class meta.type.annotation",foreground:"A390FF"},{token:"meta.class support.type.primitive",foreground:"A390FF"},{token:"meta.interface support.type.primitive",foreground:"A390FF"},{token:"meta.type.annotation support.type.primitive",foreground:"A390FF"},{token:"meta.type.annotation entity.name.type",foreground:"CABEFF"},{token:"variable.object.property",foreground:"FFFFFF"},{token:"entity.name.function",foreground:"CDF861"},{token:"meta.definition.variable",foreground:"FFFFFF"},{token:"modifier",foreground:"A390FF"},{token:"variable.language.this",foreground:"A390FF"},{token:"support.type.object",foreground:"A390FF"},{token:"support.module",foreground:"7AD9FB",fontStyle:"italic"},{token:"support.node",foreground:"7AD9FB",fontStyle:"italic"},{token:"support.type.ts",foreground:"7AD9FB"},{token:"entity.other.inherited-class",foreground:"7AD9FB"},{token:"meta.interface entity.name.type.interface",foreground:"7AD9FB"},{token:"keyword.operator",foreground:"B3E8B4"},{token:"storage.type.function.arrow",foreground:"B3E8B4"},{token:"variable.css",foreground:"7AD9FB"},{token:"source.css",foreground:"CDF861"},{token:"entity.other.attribute-name",foreground:"CDF861"},{token:"entity.name.tag.css",foreground:"CDF861"},{token:"entity.other.attribute-name.id",foreground:"CDF861"},{token:"entity.other.attribute-name.class",foreground:"CDF861"},{token:"source.css meta.selector.css",foreground:"CDF861"},{token:"support.type.property-name.css",foreground:"FFFFFF"},{token:"support.function.css",foreground:"A390FF"},{token:"support.constant.css",foreground:"A390FF"},{token:"keyword.css",foreground:"A390FF"},{token:"constant.numeric.css",foreground:"A390FF"},{token:"constant.other.color.css",foreground:"A390FF"},{token:"punctuation.section",foreground:"86897A"},{token:"punctuation.separator",foreground:"86897A"},{token:"punctuation.definition.entity.css",foreground:"86897A"},{token:"punctuation.terminator.rule.css",foreground:"E5E5E5"},{token:"source.css keyword.other.unit",foreground:"CABEFF"},{token:"string.css",foreground:"CABEFF"},{token:"punctuation.definition.string.css",foreground:"CABEFF"},{token:"support.type.property-name",foreground:"FFFFFF"},{token:"string.html",foreground:"CDF861"},{token:"punctuation.definition.tag",foreground:"86897A"},{token:"entity.other.attribute-name",foreground:"CABEFF"},{token:"entity.name.tag",foreground:"A390FF"},{token:"entity.name.tag.wildcard",foreground:"CDF861"},{token:"markup.markdown",foreground:"FFFFFF"},{token:"markup.heading.markdown",foreground:"B3E8B4"},{token:"punctuation.definition.bold.markdown",foreground:"B3E8B4"},{token:"meta.paragraph.markdown punctuation.definition.link.description",foreground:"B3E8B4"},{token:"punctuation.definition.raw.markdown",foreground:"B3E8B4"},{token:"meta.paragraph.markdown",foreground:"E5E5E5"},{token:"text.html.markdown meta.attribute",foreground:"CABEFF"},{token:"entity.name.section",foreground:"FFFFFF"},{token:"string.other",foreground:"FFFFFF"},{token:"string.other.link",foreground:"FFFFFF"},{token:"punctuation.definition.markdown",foreground:"B3E8B4"},{token:"punctuation.definition.string",foreground:"B3E8B4"},{token:"punctuation.definition.string.begin.shell",foreground:"B3E8B4"},{token:"markup.underline.link",foreground:"BFD084"},{token:"markup.inline.raw",foreground:"86897A"},{token:"text.html.vue variable.other.readwrite",foreground:"A390FF"},{token:"text.html.vue meta.object-literal.key",foreground:"FFFFFF"},{token:"text.html.vue entity.name.tag.css",foreground:"A390FF"},{token:"text.html.vue entity.other.attribute-name",foreground:"FFFFFF"},{token:"text.html.vue constant.numeric.css",foreground:"7AD9FB"},{token:"text.html.vue keyword.other.unit",foreground:"A390FF"},{token:"text.html.vue support.constant.property-value",foreground:"A390FF"},{token:"text.html.vue support.constant.color",foreground:"A390FF"},{token:"function.defaultLibrary"},{token:"class.defaultLibrary"}],colors:{foreground:"#E5E5E5",focusBorder:"#AD9CFF","selection.background":"#6F6F6F","scrollbar.shadow":"#0000007E","input.background":"#0F0E0E","input.foreground":"#999","button.background":"#EDFFA5","button.foreground":"#151515","button.hoverBackground":"#DCFF50","textLink.foreground":"#E5E5E5","list.dropBackground":"#151515","list.focusForeground":"#808080","list.focusBackground":"#E5E5E51A","list.highlightForeground":"#E5E5E5","editor.background":"#151515","editorLineNumber.foreground":"#858585","editorLineNumber.activeForeground":"#C6C6C6","scrollbarSlider.background":"#79797966","scrollbarSlider.hoverBackground":"#646464B3","scrollbarSlider.activeBackground":"#BFBFBF66","widget.shadow":"#0000005C","editorWidget.background":"#252526","pickerGroup.border":"#3F3F46","pickerGroup.foreground":"#3794FF",errorForeground:"#F48771","editorError.foreground":"#F48771","editorWarning.foreground":"#F7CC66"}},"github-dark-dimmed":{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"768390"},{token:"punctuation.definition.comment",foreground:"768390"},{token:"string.comment",foreground:"768390"},{token:"constant.other.placeholder",foreground:"F47067"},{token:"constant.character",foreground:"F47067"},{token:"constant",foreground:"6CB6FF"},{token:"entity.name.constant",foreground:"6CB6FF"},{token:"variable.other.constant",foreground:"6CB6FF"},{token:"variable.other.enummember",foreground:"6CB6FF"},{token:"variable.language",foreground:"6CB6FF"},{token:"entity",foreground:"6CB6FF"},{token:"entity.name",foreground:"F69D50"},{token:"meta.export.default",foreground:"F69D50"},{token:"meta.definition.variable",foreground:"F69D50"},{token:"variable.parameter.function",foreground:"ADBAC7"},{token:"meta.jsx.children",foreground:"ADBAC7"},{token:"meta.block",foreground:"ADBAC7"},{token:"meta.tag.attributes",foreground:"ADBAC7"},{token:"entity.name.constant",foreground:"ADBAC7"},{token:"meta.object.member",foreground:"ADBAC7"},{token:"meta.embedded.expression",foreground:"ADBAC7"},{token:"entity.name.function",foreground:"DCBDFB"},{token:"entity.name.tag",foreground:"8DDB8C"},{token:"support.class.component",foreground:"8DDB8C"},{token:"keyword",foreground:"F47067"},{token:"storage",foreground:"F47067"},{token:"storage.type",foreground:"F47067"},{token:"storage.modifier.package",foreground:"ADBAC7"},{token:"storage.modifier.import",foreground:"ADBAC7"},{token:"storage.type.java",foreground:"ADBAC7"},{token:"string",foreground:"96D0FF"},{token:"string punctuation.section.embedded source",foreground:"96D0FF"},{token:"support",foreground:"6CB6FF"},{token:"meta.property-name",foreground:"6CB6FF"},{token:"variable",foreground:"F69D50"},{token:"variable.other",foreground:"ADBAC7"},{token:"invalid.broken",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.illegal",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"FF938A",fontStyle:"italic"},{token:"carriage-return",foreground:"CDD9E5",fontStyle:"italic underline"},{token:"message.error",foreground:"FF938A"},{token:"string variable",foreground:"6CB6FF"},{token:"source.regexp",foreground:"96D0FF"},{token:"string.regexp",foreground:"96D0FF"},{token:"string.regexp.character-class",foreground:"96D0FF"},{token:"string.regexp constant.character.escape",foreground:"96D0FF"},{token:"string.regexp source.ruby.embedded",foreground:"96D0FF"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"96D0FF"},{token:"string.regexp constant.character.escape",foreground:"8DDB8C",fontStyle:"bold"},{token:"support.constant",foreground:"6CB6FF"},{token:"support.variable",foreground:"6CB6FF"},{token:"support.type.property-name.json",foreground:"8DDB8C"},{token:"meta.module-reference",foreground:"6CB6FF"},{token:"punctuation.definition.list.begin.markdown",foreground:"F69D50"},{token:"markup.heading",foreground:"6CB6FF",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"6CB6FF",fontStyle:"bold"},{token:"markup.quote",foreground:"8DDB8C"},{token:"markup.italic",foreground:"ADBAC7",fontStyle:"italic"},{token:"markup.bold",foreground:"ADBAC7",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"6CB6FF"},{token:"markup.deleted",foreground:"FF938A"},{token:"meta.diff.header.from-file",foreground:"FF938A"},{token:"punctuation.definition.deleted",foreground:"FF938A"},{token:"punctuation.section.embedded",foreground:"F47067"},{token:"markup.inserted",foreground:"8DDB8C"},{token:"meta.diff.header.to-file",foreground:"8DDB8C"},{token:"punctuation.definition.inserted",foreground:"8DDB8C"},{token:"markup.changed",foreground:"F69D50"},{token:"punctuation.definition.changed",foreground:"F69D50"},{token:"markup.ignored",foreground:"2D333B"},{token:"markup.untracked",foreground:"2D333B"},{token:"meta.diff.range",foreground:"DCBDFB",fontStyle:"bold"},{token:"meta.diff.header",foreground:"6CB6FF"},{token:"meta.separator",foreground:"6CB6FF",fontStyle:"bold"},{token:"meta.output",foreground:"6CB6FF"},{token:"brackethighlighter.tag",foreground:"768390"},{token:"brackethighlighter.curly",foreground:"768390"},{token:"brackethighlighter.round",foreground:"768390"},{token:"brackethighlighter.square",foreground:"768390"},{token:"brackethighlighter.angle",foreground:"768390"},{token:"brackethighlighter.quote",foreground:"768390"},{token:"brackethighlighter.unmatched",foreground:"FF938A"},{token:"constant.other.reference.link",foreground:"96D0FF"},{token:"string.other.link",foreground:"96D0FF"}],colors:{focusBorder:"#316DCA",foreground:"#ADBAC7",descriptionForeground:"#768390",errorForeground:"#E5534B","textLink.foreground":"#539BF5","textLink.activeForeground":"#539BF5","textBlockQuote.background":"#1C2128","textBlockQuote.border":"#444C56","textCodeBlock.background":"#636E7B66","textPreformat.foreground":"#768390","textSeparator.foreground":"#373E47","button.background":"#347D39","button.foreground":"#FFFFFF","button.hoverBackground":"#46954A","dropdown.background":"#2D333B","dropdown.border":"#444C56","dropdown.foreground":"#ADBAC7","input.background":"#22272E","input.border":"#444C56","input.foreground":"#ADBAC7","input.placeholderForeground":"#636E7B","badge.foreground":"#CDD9E5","badge.background":"#316DCA","progressBar.background":"#316DCA","list.hoverForeground":"#ADBAC7","list.inactiveSelectionForeground":"#ADBAC7","list.activeSelectionForeground":"#ADBAC7","list.hoverBackground":"#636E7B1A","list.inactiveSelectionBackground":"#636E7B66","list.activeSelectionBackground":"#636E7B66","list.focusForeground":"#ADBAC7","list.focusBackground":"#4184E426","list.highlightForeground":"#539BF5","pickerGroup.border":"#444C56","pickerGroup.foreground":"#768390","editor.foreground":"#ADBAC7","editor.background":"#22272E","editorWidget.background":"#2D333B","editor.lineHighlightBackground":"#636E7B1A","editorLineNumber.foreground":"#636E7B","editorLineNumber.activeForeground":"#ADBAC7","editorIndentGuide.background":"#ADBAC71F","editorWhitespace.foreground":"#545D68","editorCursor.foreground":"#539BF5","editor.findMatchBackground":"#966600","editor.findMatchHighlightBackground":"#EAC55F80","editor.selectionHighlightBackground":"#57AB5A40","editor.wordHighlightBackground":"#636E7B80","editor.wordHighlightStrongBackground":"#636E7B4D","editorBracketMatch.background":"#57AB5A40","editorBracketMatch.border":"#57AB5A99","editorInlayHint.background":"#76839033","editorInlayHint.foreground":"#768390","diffEditor.insertedTextBackground":"#57AB5A4D","diffEditor.removedTextBackground":"#F470674D","scrollbar.shadow":"#545D6833","scrollbarSlider.background":"#76839033","scrollbarSlider.hoverBackground":"#7683903D","scrollbarSlider.activeBackground":"#76839047","editorOverviewRuler.border":"#1C2128","peekViewEditor.matchHighlightBackground":"#AE7C1466","peekViewResult.matchHighlightBackground":"#AE7C1466","peekViewEditor.background":"#636E7B1A","peekViewResult.background":"#22272E"}},"github-dark":{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"8B949E"},{token:"punctuation.definition.comment",foreground:"8B949E"},{token:"string.comment",foreground:"8B949E"},{token:"constant.other.placeholder",foreground:"FF7B72"},{token:"constant.character",foreground:"FF7B72"},{token:"constant",foreground:"79C0FF"},{token:"entity.name.constant",foreground:"79C0FF"},{token:"variable.other.constant",foreground:"79C0FF"},{token:"variable.other.enummember",foreground:"79C0FF"},{token:"variable.language",foreground:"79C0FF"},{token:"entity",foreground:"79C0FF"},{token:"entity.name",foreground:"FFA657"},{token:"meta.export.default",foreground:"FFA657"},{token:"meta.definition.variable",foreground:"FFA657"},{token:"variable.parameter.function",foreground:"E6EDF3"},{token:"meta.jsx.children",foreground:"E6EDF3"},{token:"meta.block",foreground:"E6EDF3"},{token:"meta.tag.attributes",foreground:"E6EDF3"},{token:"entity.name.constant",foreground:"E6EDF3"},{token:"meta.object.member",foreground:"E6EDF3"},{token:"meta.embedded.expression",foreground:"E6EDF3"},{token:"entity.name.function",foreground:"D2A8FF"},{token:"entity.name.tag",foreground:"7EE787"},{token:"support.class.component",foreground:"7EE787"},{token:"keyword",foreground:"FF7B72"},{token:"storage",foreground:"FF7B72"},{token:"storage.type",foreground:"FF7B72"},{token:"storage.modifier.package",foreground:"E6EDF3"},{token:"storage.modifier.import",foreground:"E6EDF3"},{token:"storage.type.java",foreground:"E6EDF3"},{token:"string",foreground:"A5D6FF"},{token:"string punctuation.section.embedded source",foreground:"A5D6FF"},{token:"support",foreground:"79C0FF"},{token:"meta.property-name",foreground:"79C0FF"},{token:"variable",foreground:"FFA657"},{token:"variable.other",foreground:"E6EDF3"},{token:"invalid.broken",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.illegal",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"FFA198",fontStyle:"italic"},{token:"carriage-return",foreground:"F0F6FC",fontStyle:"italic underline"},{token:"message.error",foreground:"FFA198"},{token:"string variable",foreground:"79C0FF"},{token:"source.regexp",foreground:"A5D6FF"},{token:"string.regexp",foreground:"A5D6FF"},{token:"string.regexp.character-class",foreground:"A5D6FF"},{token:"string.regexp constant.character.escape",foreground:"A5D6FF"},{token:"string.regexp source.ruby.embedded",foreground:"A5D6FF"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"A5D6FF"},{token:"string.regexp constant.character.escape",foreground:"7EE787",fontStyle:"bold"},{token:"support.constant",foreground:"79C0FF"},{token:"support.variable",foreground:"79C0FF"},{token:"support.type.property-name.json",foreground:"7EE787"},{token:"meta.module-reference",foreground:"79C0FF"},{token:"punctuation.definition.list.begin.markdown",foreground:"FFA657"},{token:"markup.heading",foreground:"79C0FF",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"79C0FF",fontStyle:"bold"},{token:"markup.quote",foreground:"7EE787"},{token:"markup.italic",foreground:"E6EDF3",fontStyle:"italic"},{token:"markup.bold",foreground:"E6EDF3",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"79C0FF"},{token:"markup.deleted",foreground:"FFA198"},{token:"meta.diff.header.from-file",foreground:"FFA198"},{token:"punctuation.definition.deleted",foreground:"FFA198"},{token:"punctuation.section.embedded",foreground:"FF7B72"},{token:"markup.inserted",foreground:"7EE787"},{token:"meta.diff.header.to-file",foreground:"7EE787"},{token:"punctuation.definition.inserted",foreground:"7EE787"},{token:"markup.changed",foreground:"FFA657"},{token:"punctuation.definition.changed",foreground:"FFA657"},{token:"markup.ignored",foreground:"161B22"},{token:"markup.untracked",foreground:"161B22"},{token:"meta.diff.range",foreground:"D2A8FF",fontStyle:"bold"},{token:"meta.diff.header",foreground:"79C0FF"},{token:"meta.separator",foreground:"79C0FF",fontStyle:"bold"},{token:"meta.output",foreground:"79C0FF"},{token:"brackethighlighter.tag",foreground:"8B949E"},{token:"brackethighlighter.curly",foreground:"8B949E"},{token:"brackethighlighter.round",foreground:"8B949E"},{token:"brackethighlighter.square",foreground:"8B949E"},{token:"brackethighlighter.angle",foreground:"8B949E"},{token:"brackethighlighter.quote",foreground:"8B949E"},{token:"brackethighlighter.unmatched",foreground:"FFA198"},{token:"constant.other.reference.link",foreground:"A5D6FF"},{token:"string.other.link",foreground:"A5D6FF"}],colors:{focusBorder:"#1F6FEB",foreground:"#E6EDF3",descriptionForeground:"#7D8590",errorForeground:"#F85149","textLink.foreground":"#2F81F7","textLink.activeForeground":"#2F81F7","textBlockQuote.background":"#010409","textBlockQuote.border":"#30363D","textCodeBlock.background":"#6E768166","textPreformat.foreground":"#7D8590","textSeparator.foreground":"#21262D","button.background":"#238636","button.foreground":"#FFFFFF","button.hoverBackground":"#2EA043","dropdown.background":"#161B22","dropdown.border":"#30363D","dropdown.foreground":"#E6EDF3","input.background":"#0D1117","input.border":"#30363D","input.foreground":"#E6EDF3","input.placeholderForeground":"#6E7681","badge.foreground":"#FFFFFF","badge.background":"#1F6FEB","progressBar.background":"#1F6FEB","list.hoverForeground":"#E6EDF3","list.inactiveSelectionForeground":"#E6EDF3","list.activeSelectionForeground":"#E6EDF3","list.hoverBackground":"#6E76811A","list.inactiveSelectionBackground":"#6E768166","list.activeSelectionBackground":"#6E768166","list.focusForeground":"#E6EDF3","list.focusBackground":"#388BFD26","list.highlightForeground":"#2F81F7","pickerGroup.border":"#30363D","pickerGroup.foreground":"#7D8590","editor.foreground":"#E6EDF3","editor.background":"#0D1117","editorWidget.background":"#161B22","editor.lineHighlightBackground":"#6E76811A","editorLineNumber.foreground":"#6E7681","editorLineNumber.activeForeground":"#E6EDF3","editorIndentGuide.background":"#E6EDF31F","editorWhitespace.foreground":"#484F58","editorCursor.foreground":"#2F81F7","editor.findMatchBackground":"#9E6A03","editor.findMatchHighlightBackground":"#F2CC6080","editor.selectionHighlightBackground":"#3FB95040","editor.wordHighlightBackground":"#6E768180","editor.wordHighlightStrongBackground":"#6E76814D","editorBracketMatch.background":"#3FB95040","editorBracketMatch.border":"#3FB95099","editorInlayHint.background":"#8B949E33","editorInlayHint.foreground":"#7D8590","diffEditor.insertedTextBackground":"#3FB9504D","diffEditor.removedTextBackground":"#FF7B724D","scrollbar.shadow":"#484F5833","scrollbarSlider.background":"#8B949E33","scrollbarSlider.hoverBackground":"#8B949E3D","scrollbarSlider.activeBackground":"#8B949E47","editorOverviewRuler.border":"#010409","peekViewEditor.matchHighlightBackground":"#BB800966","peekViewResult.matchHighlightBackground":"#BB800966","peekViewEditor.background":"#6E76811A","peekViewResult.background":"#0D1117"}},"github-light":{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"6E7781"},{token:"punctuation.definition.comment",foreground:"6E7781"},{token:"string.comment",foreground:"6E7781"},{token:"constant.other.placeholder",foreground:"CF222E"},{token:"constant.character",foreground:"CF222E"},{token:"constant",foreground:"0550AE"},{token:"entity.name.constant",foreground:"0550AE"},{token:"variable.other.constant",foreground:"0550AE"},{token:"variable.other.enummember",foreground:"0550AE"},{token:"variable.language",foreground:"0550AE"},{token:"entity",foreground:"0550AE"},{token:"entity.name",foreground:"953800"},{token:"meta.export.default",foreground:"953800"},{token:"meta.definition.variable",foreground:"953800"},{token:"variable.parameter.function",foreground:"1F2328"},{token:"meta.jsx.children",foreground:"1F2328"},{token:"meta.block",foreground:"1F2328"},{token:"meta.tag.attributes",foreground:"1F2328"},{token:"entity.name.constant",foreground:"1F2328"},{token:"meta.object.member",foreground:"1F2328"},{token:"meta.embedded.expression",foreground:"1F2328"},{token:"entity.name.function",foreground:"8250DF"},{token:"entity.name.tag",foreground:"116329"},{token:"support.class.component",foreground:"116329"},{token:"keyword",foreground:"CF222E"},{token:"storage",foreground:"CF222E"},{token:"storage.type",foreground:"CF222E"},{token:"storage.modifier.package",foreground:"1F2328"},{token:"storage.modifier.import",foreground:"1F2328"},{token:"storage.type.java",foreground:"1F2328"},{token:"string",foreground:"0A3069"},{token:"string punctuation.section.embedded source",foreground:"0A3069"},{token:"support",foreground:"0550AE"},{token:"meta.property-name",foreground:"0550AE"},{token:"variable",foreground:"953800"},{token:"variable.other",foreground:"1F2328"},{token:"invalid.broken",foreground:"82071E",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"82071E",fontStyle:"italic"},{token:"invalid.illegal",foreground:"82071E",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"82071E",fontStyle:"italic"},{token:"carriage-return",foreground:"F6F8FA",fontStyle:"italic underline"},{token:"message.error",foreground:"82071E"},{token:"string variable",foreground:"0550AE"},{token:"source.regexp",foreground:"0A3069"},{token:"string.regexp",foreground:"0A3069"},{token:"string.regexp.character-class",foreground:"0A3069"},{token:"string.regexp constant.character.escape",foreground:"0A3069"},{token:"string.regexp source.ruby.embedded",foreground:"0A3069"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"0A3069"},{token:"string.regexp constant.character.escape",foreground:"116329",fontStyle:"bold"},{token:"support.constant",foreground:"0550AE"},{token:"support.variable",foreground:"0550AE"},{token:"support.type.property-name.json",foreground:"116329"},{token:"meta.module-reference",foreground:"0550AE"},{token:"punctuation.definition.list.begin.markdown",foreground:"953800"},{token:"markup.heading",foreground:"0550AE",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"0550AE",fontStyle:"bold"},{token:"markup.quote",foreground:"116329"},{token:"markup.italic",foreground:"1F2328",fontStyle:"italic"},{token:"markup.bold",foreground:"1F2328",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"0550AE"},{token:"markup.deleted",foreground:"82071E"},{token:"meta.diff.header.from-file",foreground:"82071E"},{token:"punctuation.definition.deleted",foreground:"82071E"},{token:"punctuation.section.embedded",foreground:"CF222E"},{token:"markup.inserted",foreground:"116329"},{token:"meta.diff.header.to-file",foreground:"116329"},{token:"punctuation.definition.inserted",foreground:"116329"},{token:"markup.changed",foreground:"953800"},{token:"punctuation.definition.changed",foreground:"953800"},{token:"markup.ignored",foreground:"EAEEF2"},{token:"markup.untracked",foreground:"EAEEF2"},{token:"meta.diff.range",foreground:"8250DF",fontStyle:"bold"},{token:"meta.diff.header",foreground:"0550AE"},{token:"meta.separator",foreground:"0550AE",fontStyle:"bold"},{token:"meta.output",foreground:"0550AE"},{token:"brackethighlighter.tag",foreground:"57606A"},{token:"brackethighlighter.curly",foreground:"57606A"},{token:"brackethighlighter.round",foreground:"57606A"},{token:"brackethighlighter.square",foreground:"57606A"},{token:"brackethighlighter.angle",foreground:"57606A"},{token:"brackethighlighter.quote",foreground:"57606A"},{token:"brackethighlighter.unmatched",foreground:"82071E"},{token:"constant.other.reference.link",foreground:"0A3069"},{token:"string.other.link",foreground:"0A3069"}],colors:{focusBorder:"#0969DA",foreground:"#1F2328",descriptionForeground:"#656D76",errorForeground:"#CF222E","textLink.foreground":"#0969DA","textLink.activeForeground":"#0969DA","textBlockQuote.background":"#F6F8FA","textBlockQuote.border":"#D0D7DE","textCodeBlock.background":"#AFB8C133","textPreformat.foreground":"#656D76","textSeparator.foreground":"#D8DEE4","button.background":"#1F883D","button.foreground":"#FFFFFF","button.hoverBackground":"#1A7F37","dropdown.background":"#FFFFFF","dropdown.border":"#D0D7DE","dropdown.foreground":"#1F2328","input.background":"#FFFFFF","input.border":"#D0D7DE","input.foreground":"#1F2328","input.placeholderForeground":"#6E7781","badge.foreground":"#FFFFFF","badge.background":"#0969DA","progressBar.background":"#0969DA","list.hoverForeground":"#1F2328","list.inactiveSelectionForeground":"#1F2328","list.activeSelectionForeground":"#1F2328","list.hoverBackground":"#EAEEF280","list.inactiveSelectionBackground":"#AFB8C133","list.activeSelectionBackground":"#AFB8C133","list.focusForeground":"#1F2328","list.focusBackground":"#DDF4FF","list.highlightForeground":"#0969DA","pickerGroup.border":"#D0D7DE","pickerGroup.foreground":"#656D76","editor.foreground":"#1F2328","editor.background":"#FFFFFF","editorWidget.background":"#FFFFFF","editor.lineHighlightBackground":"#EAEEF280","editorLineNumber.foreground":"#8C959F","editorLineNumber.activeForeground":"#1F2328","editorIndentGuide.background":"#1F23281F","editorWhitespace.foreground":"#AFB8C1","editorCursor.foreground":"#0969DA","editor.findMatchBackground":"#BF8700","editor.findMatchHighlightBackground":"#FAE17D80","editor.selectionHighlightBackground":"#4AC26B40","editor.wordHighlightBackground":"#EAEEF280","editor.wordHighlightStrongBackground":"#AFB8C14D","editorBracketMatch.background":"#4AC26B40","editorBracketMatch.border":"#4AC26B99","editorInlayHint.background":"#AFB8C133","editorInlayHint.foreground":"#656D76","diffEditor.insertedTextBackground":"#6FDD8B80","diffEditor.removedTextBackground":"#FF818266","scrollbar.shadow":"#6E778133","scrollbarSlider.background":"#8C959F33","scrollbarSlider.hoverBackground":"#8C959F3D","scrollbarSlider.activeBackground":"#8C959F47","editorOverviewRuler.border":"#FFFFFF"}},monokai:{base:"vs-dark",inherit:!0,rules:[{token:"meta.embedded",foreground:"F8F8F2"},{token:"source.groovy.embedded",foreground:"F8F8F2"},{token:"string meta.image.inline.markdown",foreground:"F8F8F2"},{token:"variable.legacy.builtin.python",foreground:"F8F8F2"},{token:"comment",foreground:"88846F"},{token:"string",foreground:"E6DB74"},{token:"punctuation.definition.template-expression",foreground:"F92672"},{token:"punctuation.section.embedded",foreground:"F92672"},{token:"meta.template.expression",foreground:"F8F8F2"},{token:"constant.numeric",foreground:"AE81FF"},{token:"constant.language",foreground:"AE81FF"},{token:"constant.character, constant.other",foreground:"AE81FF"},{token:"variable",foreground:"F8F8F2"},{token:"keyword",foreground:"F92672"},{token:"storage",foreground:"F92672"},{token:"storage.type",foreground:"66D9EF",fontStyle:"italic"},{token:"entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution",foreground:"A6E22E",fontStyle:"underline"},{token:"entity.other.inherited-class",foreground:"A6E22E",fontStyle:"italic underline"},{token:"entity.name.function",foreground:"A6E22E"},{token:"variable.parameter",foreground:"FD971F",fontStyle:"italic"},{token:"entity.name.tag",foreground:"F92672"},{token:"entity.other.attribute-name",foreground:"A6E22E"},{token:"support.function",foreground:"66D9EF"},{token:"support.constant",foreground:"66D9EF"},{token:"support.type, support.class",foreground:"66D9EF",fontStyle:"italic"},{token:"support.other.variable"},{token:"invalid",foreground:"F44747"},{token:"invalid.deprecated",foreground:"F44747"},{token:"meta.structure.dictionary.json string.quoted.double.json",foreground:"CFCFC2"},{token:"meta.diff, meta.diff.header",foreground:"75715E"},{token:"markup.deleted",foreground:"F92672"},{token:"markup.inserted",foreground:"A6E22E"},{token:"markup.changed",foreground:"E6DB74"},{token:"constant.numeric.line-number.find-in-files - match",foreground:"AE81FFA0"},{token:"entity.name.filename.find-in-files",foreground:"E6DB74"},{token:"markup.quote",foreground:"F92672"},{token:"markup.list",foreground:"E6DB74"},{token:"markup.bold, markup.italic",foreground:"66D9EF"},{token:"markup.inline.raw",foreground:"FD971F"},{token:"markup.heading",foreground:"A6E22E"},{token:"markup.heading.setext",foreground:"A6E22E",fontStyle:"bold"},{token:"markup.heading.markdown",fontStyle:"bold"},{token:"markup.quote.markdown",foreground:"75715E",fontStyle:"italic"},{token:"markup.bold.markdown",fontStyle:"bold"},{token:"string.other.link.title.markdown,string.other.link.description.markdown",foreground:"AE81FF"},{token:"markup.underline.link.markdown,markup.underline.link.image.markdown",foreground:"E6DB74"},{token:"markup.italic.markdown",fontStyle:"italic"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.list.unnumbered.markdown, markup.list.numbered.markdown",foreground:"F8F8F2"},{token:"punctuation.definition.list.begin.markdown",foreground:"A6E22E"},{token:"token.info-token",foreground:"6796E6"},{token:"token.warn-token",foreground:"CD9731"},{token:"token.error-token",foreground:"F44747"},{token:"token.debug-token",foreground:"B267E6"},{token:"variable.language",foreground:"FD971F"}],colors:{"dropdown.background":"#414339","list.activeSelectionBackground":"#75715E","list.inactiveSelectionBackground":"#414339","list.hoverBackground":"#3E3D32","list.dropBackground":"#414339","list.highlightForeground":"#F8F8F2","button.background":"#75715E","editor.background":"#272822","editor.foreground":"#F8F8F2","selection.background":"#878B9180","editor.selectionHighlightBackground":"#575B6180","editor.selectionBackground":"#878B9180","editor.wordHighlightBackground":"#4A4A7680","editor.wordHighlightStrongBackground":"#6A6A9680","editor.lineHighlightBackground":"#3E3D32","editorLineNumber.activeForeground":"#C2C2BF","editorCursor.foreground":"#F8F8F0","editorWhitespace.foreground":"#464741","editorIndentGuide.background":"#464741","widget.shadow":"#00000098","progressBar.background":"#75715E","badge.background":"#75715E","badge.foreground":"#F8F8F2","editorLineNumber.foreground":"#90908A","pickerGroup.foreground":"#75715E","input.background":"#414339","inputOption.activeBorder":"#75715E",focusBorder:"#99947C","editorWidget.background":"#1E1F1C","diffEditor.insertedTextBackground":"#4B661680","diffEditor.removedTextBackground":"#90274A70","inputValidation.errorBackground":"#90274A","inputValidation.errorBorder":"#F92672","inputValidation.warningBackground":"#848528","inputValidation.warningBorder":"#E2E22E","inputValidation.infoBackground":"#546190","inputValidation.infoBorder":"#819AFF","editorHoverWidget.background":"#414339","editorHoverWidget.border":"#75715E","editorSuggestWidget.background":"#272822","editorSuggestWidget.border":"#75715E","peekView.border":"#75715E","peekViewEditor.background":"#272822","peekViewResult.background":"#1E1F1C","peekViewTitle.background":"#1E1F1C","peekViewResult.selectionBackground":"#414339","peekViewResult.matchHighlightBackground":"#75715E","peekViewEditor.matchHighlightBackground":"#75715E"}}};function _(e,o){let r={...o};for(let t in e)typeof e[t]=="object"&&!Array.isArray(e[t])?o[t]&&typeof o[t]=="object"&&!Array.isArray(o[t])?r[t]=_(e[t],o[t]):r[t]={...e[t]}:r[t]=e[t];return r}var we=({filename:e,endpoint:o,framework:r,theme:t,completionSpeed:n,externalContext:d,...i})=>{let[a,g]=M.default.useState(null),s=M.default.useCallback((c,u)=>{g(u),t&&!Y.includes(t)&&(u.editor.defineTheme(t,fe[t]),u.editor.setTheme(t)),i.onMount?.(c,u)},[i,t]);return le(e,o,r,i.language,n,d,a),M.default.createElement(pe.Editor,{...i,key:t,theme:t,onMount:s,options:_(i.options,z)})},ke=we;b(F,require("@monaco-editor/react"),module.exports);0&&(module.exports={Copilot,Editor,...require("@monaco-editor/react")});
package/dist/index.mjs CHANGED
@@ -1,9 +1,13 @@
1
- var H={llama:"llama3-70b-8192"},y="llama",_="https://api.groq.com/openai/v1/chat/completions";var F="<|cursor|>",de=e=>{switch(e){case"fill-in-the-middle":return"filling in the middle of code";case"continuation":return"continuing the code";default:return"unknown mode"}},N=e=>{let{language:o="the language",filename:t,framework:r,editorState:i}=e,n=`As an expert ${o} code completion assistant known for high accuracy in ${de(i.completionMode)}, could you assist with the code at the cursor location marked '${F}'? This code is part of ${t?`the ${t} file`:"a larger project"}. Please `;switch(i.completionMode){case"fill-in-the-middle":n+=`generate a completion to fill the middle of the code surrounding '${F}'. Ensure the completion precisely replaces '${F}', maintaining consistency, semantic accuracy, and relevance to the context.`;break;case"continuation":n+=`provide a continuation from '${F}'. The completion should fluidly extend the existing code, precisely replacing '${F}' while adhering to ${o} standards and ensuring semantic correctness and contextual appropriateness.`;break}return n+=" Output only the necessary completion code, without additional explanations or content.",r?n+=` The code utilizes the ${r} framework in ${o}.`:n+=` The code is implemented in ${o}.`,n.endsWith(".")?n:n+"."},$=e=>{let{codeBeforeCursor:o,codeAfterCursor:t,externalContext:r}=e,i=`${o}${F}${t}
1
+ var H={llama:"llama3-70b-8192"},C="llama",N="https://api.groq.com/openai/v1/chat/completions";var E="<<CURSOR>>",_=e=>e==="javascript"?"latest JavaScript":e,$=e=>{switch(e){case"fill-in-the-middle":return"filling in the middle of the code";case"completion":return"completing the code"}},j=e=>{let o=_(e.language),r=$(e.editorState.completionMode);return`You are an expert ${o||""} code completion assistant known for exceptional skill in ${r}.`},q=e=>{let{filename:o,framework:r,editorState:t,codeBeforeCursor:n,codeAfterCursor:d,externalContext:i}=e,a=_(e.language),g=$(t.completionMode),s=o?`the file named ${o}`:"a larger project",c=r?` The code utilizes the ${r} framework in ${a}.`:` The code is implemented in ${a}.`,u=`You will be presented with a code snippet where the cursor location is marked with '${E}'. Your task is to assist with ${g}. This code is part of ${s}. Please `;switch(t.completionMode){case"fill-in-the-middle":u+=`generate a completion to fill the middle of the code around '${E}'. Ensure the completion replaces '${E}' precisely, maintaining consistency, semantic accuracy, and relevance to the context. The completion must start exactly from the cursor position without any preceding or following characters, and it should not introduce any syntactical or semantic errors to the existing code.`;break;case"completion":u+=`provide the necessary completion for '${E}' while ensuring consistency, semantic accuracy, and relevance to the context. The completion must start exactly from the cursor position without any preceding or following characters, and it should not introduce any syntactical or semantic errors to the existing code.`;break}u+=` Output only the necessary completion code, without additional explanations or content.${c}`;let f=`${n}${E}${d}
2
2
 
3
- `;return r&&r.length>0&&(i+=r.map(n=>`// Path: ${n.path}
4
- ${n.content}
3
+ `;return i&&i.length>0&&(f+=i.map(F=>`// Path: ${F.path}
4
+ ${F.content}
5
5
  `).join(`
6
- `)),i};async function ae(e,o,t={}){let r={"Content-Type":"application/json",...t.headers},i=o==="POST"&&t.body?JSON.stringify(t.body):void 0,n=await fetch(e,{method:o,headers:r,body:i,signal:t.signal});if(!n.ok)throw new Error(`${t.error||"Network error"}: ${n.statusText}`);return n.json()}function C(e,o,t){return ae(e,"POST",{...t,body:o})}var B=class{static getModel(){return this.model}static setModel(o){this.model=o}};B.model=y;var D=B;var T=class{constructor(o,t){if(!o)throw new Error("Groq API key is required to initialize Copilot.");this.apiKey=o,D.setModel(t?.model||y)}async complete({completionMetadata:o}){try{let t=D.getModel(),r={model:H[t],messages:[{role:"system",content:N(o)},{role:"user",content:$(o)}]},i={Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"};return await C(_,r,{headers:i,error:"Error while fetching from groq API"})}catch(t){return{error:`An unexpected error occurred: ${t}`}}}},ue=T;import P from"react";import{Editor as pe}from"@monaco-editor/react";var q={scrollBeyondLastColumn:0,codeLens:!1,minimap:{enabled:!1},quickSuggestions:!1,folding:!1,foldingHighlight:!1,foldingImportsByDefault:!1,links:!1,fontSize:14,wordWrap:"on",automaticLayout:!0},j=["light","vs-dark"];import L from"react";var G={conso:"le.log($1)","new P":`romise((resolve, reject) => {
6
+ `)),u+=`
7
+
8
+ <code>
9
+ ${f}
10
+ </code>`,u.endsWith(".")?u:`${u}.`};async function ue(e,o,r={}){let t={"Content-Type":"application/json",...r.headers},n=o==="POST"&&r.body?JSON.stringify(r.body):void 0,d=await fetch(e,{method:o,headers:t,body:n,signal:r.signal});if(!d.ok)throw new Error(`${r.error||"Network error"}: ${d.statusText}`);return d.json()}function B(e,o,r){return ue(e,"POST",{...r,body:o})}var A=class{static getModel(){return this.model}static setModel(o){this.model=o}};A.model=C;var T=A;var v=class{constructor(o,r){if(!o)throw new Error("Groq API key is required to initialize Copilot.");this.apiKey=o,T.setModel(r?.model||C)}async complete({completionMetadata:o}){try{let r=T.getModel(),t={model:H[r],messages:[{role:"system",content:j(o)},{role:"user",content:q(o)}]},n={Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"};return await B(N,t,{headers:n,error:"Error while fetching from groq API"})}catch(r){return{error:`An unexpected error occurred: ${r}`}}}},ge=v;import I from"react";import{Editor as ke}from"@monaco-editor/react";var G={scrollBeyondLastColumn:0,codeLens:!1,minimap:{enabled:!1},quickSuggestions:!1,folding:!1,foldingHighlight:!1,foldingImportsByDefault:!1,links:!1,fontSize:14,wordWrap:"on",automaticLayout:!0},W=["light","vs-dark"];import M from"react";var V={conso:"le.log($1)","new P":`romise((resolve, reject) => {
7
11
  $1
8
12
  })`,"new A":"rray","new S":"et","throw n":"ew Error($1)",setTimeout:`(() => {
9
13
  $1
@@ -15,5 +19,5 @@ ${n.content}
15
19
  $1
16
20
  }$0`,"async =>":` {
17
21
  $1
18
- }$0`,") =>":" {"};var W=[{language:"javascript",snippets:G}];var A=class{constructor(){this.predictions=new Map,this.loadPredictions()}loadPredictions(){W.forEach(o=>{this.predictions.set(o.language,o.snippets)})}predictCode(o,t){let r=this.predictions.get(o);if(!r)return"";t=t.split("").reverse().join("");for(let i in r)if(t.startsWith(i.split("").reverse().join("")))return r[i];return""}};var V=(e,o)=>e[o]||"",v=e=>{let o=e.split(`
19
- `);return o[o.length-1].length};var U=(e,o)=>{let t=o.getLineContent(e.lineNumber),r=e.column-1,i=t.substring(r);return/\s/.test(i)},Q=(e,o)=>{let t=new Set(['"',"'","}","]",")",","," ",":","."]),r=o.getLineContent(e.lineNumber),i=V(r,e.column-1);return!t.has(i)&&!!i},h=(e,o)=>{let t=o.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:e.lineNumber,endColumn:e.column}),r=o.getValueInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:o.getLineCount(),endColumn:o.getLineMaxColumn(o.getLineCount())});return{codeBeforeCursor:t,codeAfterCursor:r}},K=(e,o)=>{let t=o.getLineContent(e.lineNumber),r=t.slice(e.column-1).trim(),i=t.slice(0,e.column-1).trim();return e.column<=3&&(r!==""||i!=="")},z=(e,o)=>{let{codeAfterCursor:t}=h(e,o),r=3;return[...t].reduce((n,d)=>d.trim()!==""&&n<r?n+1:n,0)>=r?"fill-in-the-middle":"continuation"};var X={javascript:1,typescript:2,typescriptreact:3,python:4,vue:5,php:6,dart:7,javascriptreact:8,go:9,css:10,cpp:11,html:12,scss:13,markdown:14,csharp:15,java:16,json:17,rust:18,ruby:19,c:20},x={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95},g=[.9978708359643611,.7001905605239328,-.1736749244124868,-.22994157947320112,.13406692641682572,-.007751370662011853,.0057783222035240715,.41910878254476003,-.1621657125711092,.13770814958908187,-.06036011308184006,-.07351180985800129,0,-.05584878151248109,.30618794079412015,-.1282197982598485,.10951859303997555,.1700461782788777,-.3346057842644757,.22497985923128136,0,-.44038101825774356,-.6540115939236782,.16595600081341702,.20733910722385135,-.1337033766105696,-.06923072125290894,-.05806684191976292,.3583334671633344,-.47357732824944315,.17810871365594377,.42268219963946685,0,0,-.16379620467004602,-.43893868831061167,0,.11570094006709251,.9326431262654882,-.9990110509203912,-.44125275652726503,-.15840786997162004,-.4600396256644451,-.018814811994044403,.09230944537175266,.025814790934742798,-1.0940162204190154,-.9407503631235489,-.9854303778694269,-1.1045822488262245,-1.1417299456573262,-1.5623704405345513,-.4157473855795939,-1.0244257735561713,-.7477401944601753,-1.1275109699068402,-.0714715633552533,-1.1408628006786907,-1.0409898655074672,-.2288889836518878,-.5469549893760344,-.181946611106845,.1264329316374918,0,0,.312206968554707,-.3656436392517924,.23655650686038968,.1014912419901576,0,.06287549221765308,0,0,.19027065218932154,-.8519502045974378,0,.23753599905971923,.2488809322489166,.019969251907983224,0,.06916505526229488,.29053356359188204,-.14484456555431657,.014768129429370188,-.15051464926341374,.07614835502776021,-.3317489901313935,0,0,.04921938684669103,-.28248576768353445,-.9708816204525345,-1.3560464522265527,.014165375212383239,-.23924166472544983,.10006595730248855,.09867233147279562,.32330430333220644,-.058625706114180595,.17149853105783947,.4436484054395367,.047189049576707255,.16832520944790552,.1117259900942179,-.35469010329927253,0,-.1528189124465582,-.3804848349564939,.07278077320753953,.13263786480064088,.22920682659292527,1.1512955314336537,0,.016939862282340023,.4242994650403408,.12759835577444986,-.5577261135825583,-.19764560943067672,-.4042102444736004,.12063461617733708,-.2933966817484834,.2715683893968593,0,-.7138548251238751,0,-.023066228703035277,0,-.06383043976746139,.09683723720709651,-.7337151424080791,0,-.27191370124625525,.2819781269656171,-.08711496549050252,.11048604909969338,-.0934849550450534,.0721001250772912,.2589126797890794,.6729582659532254,-.21921032738244908,-.21535277468651456,-.45474006124091354,-.05861820126419139,-.007875306207720204,-.056661261678809284,.17727881404222662,.23603713348534658,.17485861412377932,-.5737483768696752,-.38220029570342745,-.5202722985519168,-.37187947527657256,.47155277792990113,-.12077912346691123,.47825628981545326,.4736704404000214,-.1615218651546898,.18362447973513005,0,0,-.18183417425866824,0,0,-.2538532305733833,-.1303692690676528,-.4073577969188216,.04172985870928789,-.1704527388573901,0,0,.7536858953385828,-.44703159588787644,0,-.7246484085580873,-.21378128540782063,0,.037461090552656146,-.16205852364367032,-.10973952064404884,.017468043407647377,-.1288980387397392,0,0,0,-1.218692715379445,.05536949662193305,-.3763799844799116,-.1845001725624579,-.1615576298149558,0,-.15373262203249874,-.04603412604270418,0,-.3068149681460828,.09412352468269412,0,.09116543650609721,.06065865264082559,.05688267379386188,-.05873945477722306,0,.14532465133322153,.1870857769705463,.36304258043185555,.1411392422180405,.0630388629716367,0,-1.1170522012450395,.16133697772771127,.15908534390781448,-.23485453704002232,-.1419980841417892,.21909510179526218,.39948420260153766,.40802294284289187,.15403767653746853,0,.19764784115096676,.584914157527457,0,-.4573883817015294],J=-.3043572714994554,Y=.13;var w=class{constructor(){this.previousLabel=0,this.previousLabelTimestamp=Date.now()-3600*1e3,this.probabilityAccept=0}},Z=e=>{let o=new w,t=o.previousLabel,r=0;e.properties.afterCursorWhitespace==="true"&&(r=1);let i=(Date.now()-o.previousLabelTimestamp)/1e3,n=Math.log(1+i),d=0,a=0,u=0,c=0;if(e.prefix){d=Math.log(1+v(e.prefix));let m=e.prefix.slice(-1);a=x[m]??0}let l=e.prefix?.trimEnd();if(l){u=Math.log(1+v(l));let m=l.slice(-1);c=x[m]??0}let f=e.measurements.documentLength?Math.log(1+e.measurements.documentLength):0,k=e.measurements.promptEndPos?Math.log(1+e.measurements.promptEndPos):0,I=e.measurements.promptEndPos&&e.measurements.documentLength?(e.measurements.promptEndPos+.5)/(1+e.measurements.documentLength):0,b=e.properties.languageId?X[e.properties.languageId]:0,s=J;s+=g[0]*t+g[1]*r+g[2]*n,s+=g[3]*d+g[4]*u,s+=g[5]*f+g[6]*k,s+=g[7]*I,s+=g[8+b],s+=g[29+a],s+=g[125+c];let E=1/(1+Math.exp(-s));return o.probabilityAccept=E,E};var ee=(e,o,t)=>ge(e,o,t)>Y&&!Q(e,o)&&!K(e,o),ge=(e,o,t)=>{let{codeBeforeCursor:r}=h(e,o),i=U(e,o),n=o.getValueLength(),d=o.getOffsetAt(e);return Z({properties:{afterCursorWhitespace:i?"true":"false",languageId:t},measurements:{documentLength:n,promptEndPos:d},prefix:r})};var oe=async({filename:e,endpoint:o,code:t,language:r,framework:i,externalContext:n,model:d,position:a,token:u})=>{if(!ee(a,d,r)||!t)return null;let c=new AbortController,l=await C(o,{completionMetadata:se({filename:e,position:a,model:d,language:r,framework:i,externalContext:n})},{headers:{"Content-Type":"application/json"},error:"Error while fetching completion item",signal:c.signal});return u.isCancellationRequested?(c.abort(),null):l.error?null:l.choices[0].message.content},se=({filename:e,position:o,model:t,language:r,framework:i,externalContext:n})=>{let d=z(o,t),{codeBeforeCursor:a,codeAfterCursor:u}=h(o,t);return{filename:e,language:r,framework:i||void 0,externalContext:n,codeBeforeCursor:a,codeAfterCursor:u,editorState:{completionMode:d}}},re=(e,o)=>{let{codeBeforeCursor:t}=h(e,o);return`${e.lineNumber}:${e.column}:${t}`};import S from"react";var ce=(e,o=1e3)=>{let[t,r]=S.useState(null),i=S.useCallback((...n)=>(t&&clearTimeout(t),new Promise((d,a)=>{let u=setTimeout(()=>{e(...n).then(d).catch(a)},o);r(u)})),[e,o,t]);return S.useEffect(()=>()=>{t&&clearTimeout(t)},[t]),i},te=ce;var le=new A,fe=(e,o,t,r,i,n,d)=>{let a=L.useRef(new Map),u=L.useRef(!1),c=te(oe,i==="little-faster"?350:600);return L.useEffect(()=>{if(!d||!r||!o)return;let l=d.languages.registerInlineCompletionsProvider(r,{provideInlineCompletions:async(f,k,I,b)=>{if(u.current)return u.current=!1,{items:[]};let s=f.getValue(),E=new d.Range(k.lineNumber,k.column,k.lineNumber,k.column),m=re(k,f);if(a.current.has(m)){let p=a.current.get(m);if(u.current=!0,p)return{items:[p],enableForwardStability:!0}}let R=le.predictCode(r,s);if(R){let p={insertText:{snippet:R},range:E,completeBracketPairs:!0};return a.current.set(m,p),{items:[p],enableForwardStability:!0}}if(b.isCancellationRequested)return{items:[]};try{let p=await c({filename:e,endpoint:o,code:s,language:r,framework:t,externalContext:n,model:f,position:k,token:b});if(p){let O={insertText:p,range:E};return a.current.set(m,O),u.current=!0,{items:[O],enableForwardStability:!0}}}catch{return{items:[]}}return{items:[]}},freeInlineCompletions:()=>{}});return()=>{l.dispose()}},[d,r,t,n,c,o,e]),null},ne=fe;var ie={"codesandbox-dark":{base:"vs-dark",inherit:!0,rules:[{token:"string",foreground:"BFD084"},{token:"punctuation.definition.string",foreground:"BFD084"},{token:"constant.character.escape",foreground:"BFD084"},{token:"text.html constant.character.entity.named",foreground:"BFD084"},{token:"text.html.derivative",foreground:"E5E5E5"},{token:"punctuation.definition.entity.html",foreground:"BFD084"},{token:"template.expression.begin",foreground:"7AD9FB"},{token:"template.expression.end",foreground:"7AD9FB"},{token:"punctuation.definition.template-expression.begin",foreground:"7AD9FB"},{token:"punctuation.definition.template-expression.end",foreground:"7AD9FB"},{token:"constant",foreground:"7AD9FB"},{token:"keyword",foreground:"A390FF"},{token:"modifier",foreground:"A390FF"},{token:"storage",foreground:"A390FF"},{token:"punctuation.definition.block",foreground:"86897A"},{token:"punctuation.definition.parameters",foreground:"86897A"},{token:"meta.brace.round",foreground:"86897A"},{token:"meta.jsx.children",foreground:"E5E5E5"},{token:"punctuation.accessor",foreground:"86897A"},{token:"variable.other",foreground:"FFFFFF"},{token:"variable.parameter",foreground:"FFFFFF"},{token:"meta.embedded",foreground:"E5E5E5"},{token:"source.groovy.embedded",foreground:"E5E5E5"},{token:"meta.template.expression",foreground:"E5E5E5"},{token:"comment",foreground:"6F6F6F"},{token:"docblock",foreground:"6F6F6F"},{token:"meta.function-call",foreground:"CDF861"},{token:"meta.class entity.name.type.class",foreground:"FFFFFF",fontStyle:"underline"},{token:"meta.class entity.name.type.module",foreground:"CABEFF"},{token:"meta.class meta.type.annotation",foreground:"A390FF"},{token:"meta.class support.type.primitive",foreground:"A390FF"},{token:"meta.interface support.type.primitive",foreground:"A390FF"},{token:"meta.type.annotation support.type.primitive",foreground:"A390FF"},{token:"meta.type.annotation entity.name.type",foreground:"CABEFF"},{token:"variable.object.property",foreground:"FFFFFF"},{token:"entity.name.function",foreground:"CDF861"},{token:"meta.definition.variable",foreground:"FFFFFF"},{token:"modifier",foreground:"A390FF"},{token:"variable.language.this",foreground:"A390FF"},{token:"support.type.object",foreground:"A390FF"},{token:"support.module",foreground:"7AD9FB",fontStyle:"italic"},{token:"support.node",foreground:"7AD9FB",fontStyle:"italic"},{token:"support.type.ts",foreground:"7AD9FB"},{token:"entity.other.inherited-class",foreground:"7AD9FB"},{token:"meta.interface entity.name.type.interface",foreground:"7AD9FB"},{token:"keyword.operator",foreground:"B3E8B4"},{token:"storage.type.function.arrow",foreground:"B3E8B4"},{token:"variable.css",foreground:"7AD9FB"},{token:"source.css",foreground:"CDF861"},{token:"entity.other.attribute-name",foreground:"CDF861"},{token:"entity.name.tag.css",foreground:"CDF861"},{token:"entity.other.attribute-name.id",foreground:"CDF861"},{token:"entity.other.attribute-name.class",foreground:"CDF861"},{token:"source.css meta.selector.css",foreground:"CDF861"},{token:"support.type.property-name.css",foreground:"FFFFFF"},{token:"support.function.css",foreground:"A390FF"},{token:"support.constant.css",foreground:"A390FF"},{token:"keyword.css",foreground:"A390FF"},{token:"constant.numeric.css",foreground:"A390FF"},{token:"constant.other.color.css",foreground:"A390FF"},{token:"punctuation.section",foreground:"86897A"},{token:"punctuation.separator",foreground:"86897A"},{token:"punctuation.definition.entity.css",foreground:"86897A"},{token:"punctuation.terminator.rule.css",foreground:"E5E5E5"},{token:"source.css keyword.other.unit",foreground:"CABEFF"},{token:"string.css",foreground:"CABEFF"},{token:"punctuation.definition.string.css",foreground:"CABEFF"},{token:"support.type.property-name",foreground:"FFFFFF"},{token:"string.html",foreground:"CDF861"},{token:"punctuation.definition.tag",foreground:"86897A"},{token:"entity.other.attribute-name",foreground:"CABEFF"},{token:"entity.name.tag",foreground:"A390FF"},{token:"entity.name.tag.wildcard",foreground:"CDF861"},{token:"markup.markdown",foreground:"FFFFFF"},{token:"markup.heading.markdown",foreground:"B3E8B4"},{token:"punctuation.definition.bold.markdown",foreground:"B3E8B4"},{token:"meta.paragraph.markdown punctuation.definition.link.description",foreground:"B3E8B4"},{token:"punctuation.definition.raw.markdown",foreground:"B3E8B4"},{token:"meta.paragraph.markdown",foreground:"E5E5E5"},{token:"text.html.markdown meta.attribute",foreground:"CABEFF"},{token:"entity.name.section",foreground:"FFFFFF"},{token:"string.other",foreground:"FFFFFF"},{token:"string.other.link",foreground:"FFFFFF"},{token:"punctuation.definition.markdown",foreground:"B3E8B4"},{token:"punctuation.definition.string",foreground:"B3E8B4"},{token:"punctuation.definition.string.begin.shell",foreground:"B3E8B4"},{token:"markup.underline.link",foreground:"BFD084"},{token:"markup.inline.raw",foreground:"86897A"},{token:"text.html.vue variable.other.readwrite",foreground:"A390FF"},{token:"text.html.vue meta.object-literal.key",foreground:"FFFFFF"},{token:"text.html.vue entity.name.tag.css",foreground:"A390FF"},{token:"text.html.vue entity.other.attribute-name",foreground:"FFFFFF"},{token:"text.html.vue constant.numeric.css",foreground:"7AD9FB"},{token:"text.html.vue keyword.other.unit",foreground:"A390FF"},{token:"text.html.vue support.constant.property-value",foreground:"A390FF"},{token:"text.html.vue support.constant.color",foreground:"A390FF"},{token:"function.defaultLibrary"},{token:"class.defaultLibrary"}],colors:{foreground:"#E5E5E5",focusBorder:"#AD9CFF","selection.background":"#6F6F6F","scrollbar.shadow":"#0000007E","input.background":"#0F0E0E","input.foreground":"#999","button.background":"#EDFFA5","button.foreground":"#151515","button.hoverBackground":"#DCFF50","textLink.foreground":"#E5E5E5","list.dropBackground":"#151515","list.focusForeground":"#808080","list.focusBackground":"#E5E5E51A","list.highlightForeground":"#E5E5E5","editor.background":"#151515","editorLineNumber.foreground":"#858585","editorLineNumber.activeForeground":"#C6C6C6","scrollbarSlider.background":"#79797966","scrollbarSlider.hoverBackground":"#646464B3","scrollbarSlider.activeBackground":"#BFBFBF66","widget.shadow":"#0000005C","editorWidget.background":"#252526","pickerGroup.border":"#3F3F46","pickerGroup.foreground":"#3794FF",errorForeground:"#F48771","editorError.foreground":"#F48771","editorWarning.foreground":"#F7CC66"}},"github-dark-dimmed":{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"768390"},{token:"punctuation.definition.comment",foreground:"768390"},{token:"string.comment",foreground:"768390"},{token:"constant.other.placeholder",foreground:"F47067"},{token:"constant.character",foreground:"F47067"},{token:"constant",foreground:"6CB6FF"},{token:"entity.name.constant",foreground:"6CB6FF"},{token:"variable.other.constant",foreground:"6CB6FF"},{token:"variable.other.enummember",foreground:"6CB6FF"},{token:"variable.language",foreground:"6CB6FF"},{token:"entity",foreground:"6CB6FF"},{token:"entity.name",foreground:"F69D50"},{token:"meta.export.default",foreground:"F69D50"},{token:"meta.definition.variable",foreground:"F69D50"},{token:"variable.parameter.function",foreground:"ADBAC7"},{token:"meta.jsx.children",foreground:"ADBAC7"},{token:"meta.block",foreground:"ADBAC7"},{token:"meta.tag.attributes",foreground:"ADBAC7"},{token:"entity.name.constant",foreground:"ADBAC7"},{token:"meta.object.member",foreground:"ADBAC7"},{token:"meta.embedded.expression",foreground:"ADBAC7"},{token:"entity.name.function",foreground:"DCBDFB"},{token:"entity.name.tag",foreground:"8DDB8C"},{token:"support.class.component",foreground:"8DDB8C"},{token:"keyword",foreground:"F47067"},{token:"storage",foreground:"F47067"},{token:"storage.type",foreground:"F47067"},{token:"storage.modifier.package",foreground:"ADBAC7"},{token:"storage.modifier.import",foreground:"ADBAC7"},{token:"storage.type.java",foreground:"ADBAC7"},{token:"string",foreground:"96D0FF"},{token:"string punctuation.section.embedded source",foreground:"96D0FF"},{token:"support",foreground:"6CB6FF"},{token:"meta.property-name",foreground:"6CB6FF"},{token:"variable",foreground:"F69D50"},{token:"variable.other",foreground:"ADBAC7"},{token:"invalid.broken",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.illegal",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"FF938A",fontStyle:"italic"},{token:"carriage-return",foreground:"CDD9E5",fontStyle:"italic underline"},{token:"message.error",foreground:"FF938A"},{token:"string variable",foreground:"6CB6FF"},{token:"source.regexp",foreground:"96D0FF"},{token:"string.regexp",foreground:"96D0FF"},{token:"string.regexp.character-class",foreground:"96D0FF"},{token:"string.regexp constant.character.escape",foreground:"96D0FF"},{token:"string.regexp source.ruby.embedded",foreground:"96D0FF"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"96D0FF"},{token:"string.regexp constant.character.escape",foreground:"8DDB8C",fontStyle:"bold"},{token:"support.constant",foreground:"6CB6FF"},{token:"support.variable",foreground:"6CB6FF"},{token:"support.type.property-name.json",foreground:"8DDB8C"},{token:"meta.module-reference",foreground:"6CB6FF"},{token:"punctuation.definition.list.begin.markdown",foreground:"F69D50"},{token:"markup.heading",foreground:"6CB6FF",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"6CB6FF",fontStyle:"bold"},{token:"markup.quote",foreground:"8DDB8C"},{token:"markup.italic",foreground:"ADBAC7",fontStyle:"italic"},{token:"markup.bold",foreground:"ADBAC7",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"6CB6FF"},{token:"markup.deleted",foreground:"FF938A"},{token:"meta.diff.header.from-file",foreground:"FF938A"},{token:"punctuation.definition.deleted",foreground:"FF938A"},{token:"punctuation.section.embedded",foreground:"F47067"},{token:"markup.inserted",foreground:"8DDB8C"},{token:"meta.diff.header.to-file",foreground:"8DDB8C"},{token:"punctuation.definition.inserted",foreground:"8DDB8C"},{token:"markup.changed",foreground:"F69D50"},{token:"punctuation.definition.changed",foreground:"F69D50"},{token:"markup.ignored",foreground:"2D333B"},{token:"markup.untracked",foreground:"2D333B"},{token:"meta.diff.range",foreground:"DCBDFB",fontStyle:"bold"},{token:"meta.diff.header",foreground:"6CB6FF"},{token:"meta.separator",foreground:"6CB6FF",fontStyle:"bold"},{token:"meta.output",foreground:"6CB6FF"},{token:"brackethighlighter.tag",foreground:"768390"},{token:"brackethighlighter.curly",foreground:"768390"},{token:"brackethighlighter.round",foreground:"768390"},{token:"brackethighlighter.square",foreground:"768390"},{token:"brackethighlighter.angle",foreground:"768390"},{token:"brackethighlighter.quote",foreground:"768390"},{token:"brackethighlighter.unmatched",foreground:"FF938A"},{token:"constant.other.reference.link",foreground:"96D0FF"},{token:"string.other.link",foreground:"96D0FF"}],colors:{focusBorder:"#316DCA",foreground:"#ADBAC7",descriptionForeground:"#768390",errorForeground:"#E5534B","textLink.foreground":"#539BF5","textLink.activeForeground":"#539BF5","textBlockQuote.background":"#1C2128","textBlockQuote.border":"#444C56","textCodeBlock.background":"#636E7B66","textPreformat.foreground":"#768390","textSeparator.foreground":"#373E47","button.background":"#347D39","button.foreground":"#FFFFFF","button.hoverBackground":"#46954A","dropdown.background":"#2D333B","dropdown.border":"#444C56","dropdown.foreground":"#ADBAC7","input.background":"#22272E","input.border":"#444C56","input.foreground":"#ADBAC7","input.placeholderForeground":"#636E7B","badge.foreground":"#CDD9E5","badge.background":"#316DCA","progressBar.background":"#316DCA","list.hoverForeground":"#ADBAC7","list.inactiveSelectionForeground":"#ADBAC7","list.activeSelectionForeground":"#ADBAC7","list.hoverBackground":"#636E7B1A","list.inactiveSelectionBackground":"#636E7B66","list.activeSelectionBackground":"#636E7B66","list.focusForeground":"#ADBAC7","list.focusBackground":"#4184E426","list.highlightForeground":"#539BF5","pickerGroup.border":"#444C56","pickerGroup.foreground":"#768390","editor.foreground":"#ADBAC7","editor.background":"#22272E","editorWidget.background":"#2D333B","editor.lineHighlightBackground":"#636E7B1A","editorLineNumber.foreground":"#636E7B","editorLineNumber.activeForeground":"#ADBAC7","editorIndentGuide.background":"#ADBAC71F","editorWhitespace.foreground":"#545D68","editorCursor.foreground":"#539BF5","editor.findMatchBackground":"#966600","editor.findMatchHighlightBackground":"#EAC55F80","editor.selectionHighlightBackground":"#57AB5A40","editor.wordHighlightBackground":"#636E7B80","editor.wordHighlightStrongBackground":"#636E7B4D","editorBracketMatch.background":"#57AB5A40","editorBracketMatch.border":"#57AB5A99","editorInlayHint.background":"#76839033","editorInlayHint.foreground":"#768390","diffEditor.insertedTextBackground":"#57AB5A4D","diffEditor.removedTextBackground":"#F470674D","scrollbar.shadow":"#545D6833","scrollbarSlider.background":"#76839033","scrollbarSlider.hoverBackground":"#7683903D","scrollbarSlider.activeBackground":"#76839047","editorOverviewRuler.border":"#1C2128","peekViewEditor.matchHighlightBackground":"#AE7C1466","peekViewResult.matchHighlightBackground":"#AE7C1466","peekViewEditor.background":"#636E7B1A","peekViewResult.background":"#22272E"}},"github-dark":{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"8B949E"},{token:"punctuation.definition.comment",foreground:"8B949E"},{token:"string.comment",foreground:"8B949E"},{token:"constant.other.placeholder",foreground:"FF7B72"},{token:"constant.character",foreground:"FF7B72"},{token:"constant",foreground:"79C0FF"},{token:"entity.name.constant",foreground:"79C0FF"},{token:"variable.other.constant",foreground:"79C0FF"},{token:"variable.other.enummember",foreground:"79C0FF"},{token:"variable.language",foreground:"79C0FF"},{token:"entity",foreground:"79C0FF"},{token:"entity.name",foreground:"FFA657"},{token:"meta.export.default",foreground:"FFA657"},{token:"meta.definition.variable",foreground:"FFA657"},{token:"variable.parameter.function",foreground:"E6EDF3"},{token:"meta.jsx.children",foreground:"E6EDF3"},{token:"meta.block",foreground:"E6EDF3"},{token:"meta.tag.attributes",foreground:"E6EDF3"},{token:"entity.name.constant",foreground:"E6EDF3"},{token:"meta.object.member",foreground:"E6EDF3"},{token:"meta.embedded.expression",foreground:"E6EDF3"},{token:"entity.name.function",foreground:"D2A8FF"},{token:"entity.name.tag",foreground:"7EE787"},{token:"support.class.component",foreground:"7EE787"},{token:"keyword",foreground:"FF7B72"},{token:"storage",foreground:"FF7B72"},{token:"storage.type",foreground:"FF7B72"},{token:"storage.modifier.package",foreground:"E6EDF3"},{token:"storage.modifier.import",foreground:"E6EDF3"},{token:"storage.type.java",foreground:"E6EDF3"},{token:"string",foreground:"A5D6FF"},{token:"string punctuation.section.embedded source",foreground:"A5D6FF"},{token:"support",foreground:"79C0FF"},{token:"meta.property-name",foreground:"79C0FF"},{token:"variable",foreground:"FFA657"},{token:"variable.other",foreground:"E6EDF3"},{token:"invalid.broken",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.illegal",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"FFA198",fontStyle:"italic"},{token:"carriage-return",foreground:"F0F6FC",fontStyle:"italic underline"},{token:"message.error",foreground:"FFA198"},{token:"string variable",foreground:"79C0FF"},{token:"source.regexp",foreground:"A5D6FF"},{token:"string.regexp",foreground:"A5D6FF"},{token:"string.regexp.character-class",foreground:"A5D6FF"},{token:"string.regexp constant.character.escape",foreground:"A5D6FF"},{token:"string.regexp source.ruby.embedded",foreground:"A5D6FF"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"A5D6FF"},{token:"string.regexp constant.character.escape",foreground:"7EE787",fontStyle:"bold"},{token:"support.constant",foreground:"79C0FF"},{token:"support.variable",foreground:"79C0FF"},{token:"support.type.property-name.json",foreground:"7EE787"},{token:"meta.module-reference",foreground:"79C0FF"},{token:"punctuation.definition.list.begin.markdown",foreground:"FFA657"},{token:"markup.heading",foreground:"79C0FF",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"79C0FF",fontStyle:"bold"},{token:"markup.quote",foreground:"7EE787"},{token:"markup.italic",foreground:"E6EDF3",fontStyle:"italic"},{token:"markup.bold",foreground:"E6EDF3",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"79C0FF"},{token:"markup.deleted",foreground:"FFA198"},{token:"meta.diff.header.from-file",foreground:"FFA198"},{token:"punctuation.definition.deleted",foreground:"FFA198"},{token:"punctuation.section.embedded",foreground:"FF7B72"},{token:"markup.inserted",foreground:"7EE787"},{token:"meta.diff.header.to-file",foreground:"7EE787"},{token:"punctuation.definition.inserted",foreground:"7EE787"},{token:"markup.changed",foreground:"FFA657"},{token:"punctuation.definition.changed",foreground:"FFA657"},{token:"markup.ignored",foreground:"161B22"},{token:"markup.untracked",foreground:"161B22"},{token:"meta.diff.range",foreground:"D2A8FF",fontStyle:"bold"},{token:"meta.diff.header",foreground:"79C0FF"},{token:"meta.separator",foreground:"79C0FF",fontStyle:"bold"},{token:"meta.output",foreground:"79C0FF"},{token:"brackethighlighter.tag",foreground:"8B949E"},{token:"brackethighlighter.curly",foreground:"8B949E"},{token:"brackethighlighter.round",foreground:"8B949E"},{token:"brackethighlighter.square",foreground:"8B949E"},{token:"brackethighlighter.angle",foreground:"8B949E"},{token:"brackethighlighter.quote",foreground:"8B949E"},{token:"brackethighlighter.unmatched",foreground:"FFA198"},{token:"constant.other.reference.link",foreground:"A5D6FF"},{token:"string.other.link",foreground:"A5D6FF"}],colors:{focusBorder:"#1F6FEB",foreground:"#E6EDF3",descriptionForeground:"#7D8590",errorForeground:"#F85149","textLink.foreground":"#2F81F7","textLink.activeForeground":"#2F81F7","textBlockQuote.background":"#010409","textBlockQuote.border":"#30363D","textCodeBlock.background":"#6E768166","textPreformat.foreground":"#7D8590","textSeparator.foreground":"#21262D","button.background":"#238636","button.foreground":"#FFFFFF","button.hoverBackground":"#2EA043","dropdown.background":"#161B22","dropdown.border":"#30363D","dropdown.foreground":"#E6EDF3","input.background":"#0D1117","input.border":"#30363D","input.foreground":"#E6EDF3","input.placeholderForeground":"#6E7681","badge.foreground":"#FFFFFF","badge.background":"#1F6FEB","progressBar.background":"#1F6FEB","list.hoverForeground":"#E6EDF3","list.inactiveSelectionForeground":"#E6EDF3","list.activeSelectionForeground":"#E6EDF3","list.hoverBackground":"#6E76811A","list.inactiveSelectionBackground":"#6E768166","list.activeSelectionBackground":"#6E768166","list.focusForeground":"#E6EDF3","list.focusBackground":"#388BFD26","list.highlightForeground":"#2F81F7","pickerGroup.border":"#30363D","pickerGroup.foreground":"#7D8590","editor.foreground":"#E6EDF3","editor.background":"#0D1117","editorWidget.background":"#161B22","editor.lineHighlightBackground":"#6E76811A","editorLineNumber.foreground":"#6E7681","editorLineNumber.activeForeground":"#E6EDF3","editorIndentGuide.background":"#E6EDF31F","editorWhitespace.foreground":"#484F58","editorCursor.foreground":"#2F81F7","editor.findMatchBackground":"#9E6A03","editor.findMatchHighlightBackground":"#F2CC6080","editor.selectionHighlightBackground":"#3FB95040","editor.wordHighlightBackground":"#6E768180","editor.wordHighlightStrongBackground":"#6E76814D","editorBracketMatch.background":"#3FB95040","editorBracketMatch.border":"#3FB95099","editorInlayHint.background":"#8B949E33","editorInlayHint.foreground":"#7D8590","diffEditor.insertedTextBackground":"#3FB9504D","diffEditor.removedTextBackground":"#FF7B724D","scrollbar.shadow":"#484F5833","scrollbarSlider.background":"#8B949E33","scrollbarSlider.hoverBackground":"#8B949E3D","scrollbarSlider.activeBackground":"#8B949E47","editorOverviewRuler.border":"#010409","peekViewEditor.matchHighlightBackground":"#BB800966","peekViewResult.matchHighlightBackground":"#BB800966","peekViewEditor.background":"#6E76811A","peekViewResult.background":"#0D1117"}},"github-light":{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"6E7781"},{token:"punctuation.definition.comment",foreground:"6E7781"},{token:"string.comment",foreground:"6E7781"},{token:"constant.other.placeholder",foreground:"CF222E"},{token:"constant.character",foreground:"CF222E"},{token:"constant",foreground:"0550AE"},{token:"entity.name.constant",foreground:"0550AE"},{token:"variable.other.constant",foreground:"0550AE"},{token:"variable.other.enummember",foreground:"0550AE"},{token:"variable.language",foreground:"0550AE"},{token:"entity",foreground:"0550AE"},{token:"entity.name",foreground:"953800"},{token:"meta.export.default",foreground:"953800"},{token:"meta.definition.variable",foreground:"953800"},{token:"variable.parameter.function",foreground:"1F2328"},{token:"meta.jsx.children",foreground:"1F2328"},{token:"meta.block",foreground:"1F2328"},{token:"meta.tag.attributes",foreground:"1F2328"},{token:"entity.name.constant",foreground:"1F2328"},{token:"meta.object.member",foreground:"1F2328"},{token:"meta.embedded.expression",foreground:"1F2328"},{token:"entity.name.function",foreground:"8250DF"},{token:"entity.name.tag",foreground:"116329"},{token:"support.class.component",foreground:"116329"},{token:"keyword",foreground:"CF222E"},{token:"storage",foreground:"CF222E"},{token:"storage.type",foreground:"CF222E"},{token:"storage.modifier.package",foreground:"1F2328"},{token:"storage.modifier.import",foreground:"1F2328"},{token:"storage.type.java",foreground:"1F2328"},{token:"string",foreground:"0A3069"},{token:"string punctuation.section.embedded source",foreground:"0A3069"},{token:"support",foreground:"0550AE"},{token:"meta.property-name",foreground:"0550AE"},{token:"variable",foreground:"953800"},{token:"variable.other",foreground:"1F2328"},{token:"invalid.broken",foreground:"82071E",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"82071E",fontStyle:"italic"},{token:"invalid.illegal",foreground:"82071E",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"82071E",fontStyle:"italic"},{token:"carriage-return",foreground:"F6F8FA",fontStyle:"italic underline"},{token:"message.error",foreground:"82071E"},{token:"string variable",foreground:"0550AE"},{token:"source.regexp",foreground:"0A3069"},{token:"string.regexp",foreground:"0A3069"},{token:"string.regexp.character-class",foreground:"0A3069"},{token:"string.regexp constant.character.escape",foreground:"0A3069"},{token:"string.regexp source.ruby.embedded",foreground:"0A3069"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"0A3069"},{token:"string.regexp constant.character.escape",foreground:"116329",fontStyle:"bold"},{token:"support.constant",foreground:"0550AE"},{token:"support.variable",foreground:"0550AE"},{token:"support.type.property-name.json",foreground:"116329"},{token:"meta.module-reference",foreground:"0550AE"},{token:"punctuation.definition.list.begin.markdown",foreground:"953800"},{token:"markup.heading",foreground:"0550AE",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"0550AE",fontStyle:"bold"},{token:"markup.quote",foreground:"116329"},{token:"markup.italic",foreground:"1F2328",fontStyle:"italic"},{token:"markup.bold",foreground:"1F2328",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"0550AE"},{token:"markup.deleted",foreground:"82071E"},{token:"meta.diff.header.from-file",foreground:"82071E"},{token:"punctuation.definition.deleted",foreground:"82071E"},{token:"punctuation.section.embedded",foreground:"CF222E"},{token:"markup.inserted",foreground:"116329"},{token:"meta.diff.header.to-file",foreground:"116329"},{token:"punctuation.definition.inserted",foreground:"116329"},{token:"markup.changed",foreground:"953800"},{token:"punctuation.definition.changed",foreground:"953800"},{token:"markup.ignored",foreground:"EAEEF2"},{token:"markup.untracked",foreground:"EAEEF2"},{token:"meta.diff.range",foreground:"8250DF",fontStyle:"bold"},{token:"meta.diff.header",foreground:"0550AE"},{token:"meta.separator",foreground:"0550AE",fontStyle:"bold"},{token:"meta.output",foreground:"0550AE"},{token:"brackethighlighter.tag",foreground:"57606A"},{token:"brackethighlighter.curly",foreground:"57606A"},{token:"brackethighlighter.round",foreground:"57606A"},{token:"brackethighlighter.square",foreground:"57606A"},{token:"brackethighlighter.angle",foreground:"57606A"},{token:"brackethighlighter.quote",foreground:"57606A"},{token:"brackethighlighter.unmatched",foreground:"82071E"},{token:"constant.other.reference.link",foreground:"0A3069"},{token:"string.other.link",foreground:"0A3069"}],colors:{focusBorder:"#0969DA",foreground:"#1F2328",descriptionForeground:"#656D76",errorForeground:"#CF222E","textLink.foreground":"#0969DA","textLink.activeForeground":"#0969DA","textBlockQuote.background":"#F6F8FA","textBlockQuote.border":"#D0D7DE","textCodeBlock.background":"#AFB8C133","textPreformat.foreground":"#656D76","textSeparator.foreground":"#D8DEE4","button.background":"#1F883D","button.foreground":"#FFFFFF","button.hoverBackground":"#1A7F37","dropdown.background":"#FFFFFF","dropdown.border":"#D0D7DE","dropdown.foreground":"#1F2328","input.background":"#FFFFFF","input.border":"#D0D7DE","input.foreground":"#1F2328","input.placeholderForeground":"#6E7781","badge.foreground":"#FFFFFF","badge.background":"#0969DA","progressBar.background":"#0969DA","list.hoverForeground":"#1F2328","list.inactiveSelectionForeground":"#1F2328","list.activeSelectionForeground":"#1F2328","list.hoverBackground":"#EAEEF280","list.inactiveSelectionBackground":"#AFB8C133","list.activeSelectionBackground":"#AFB8C133","list.focusForeground":"#1F2328","list.focusBackground":"#DDF4FF","list.highlightForeground":"#0969DA","pickerGroup.border":"#D0D7DE","pickerGroup.foreground":"#656D76","editor.foreground":"#1F2328","editor.background":"#FFFFFF","editorWidget.background":"#FFFFFF","editor.lineHighlightBackground":"#EAEEF280","editorLineNumber.foreground":"#8C959F","editorLineNumber.activeForeground":"#1F2328","editorIndentGuide.background":"#1F23281F","editorWhitespace.foreground":"#AFB8C1","editorCursor.foreground":"#0969DA","editor.findMatchBackground":"#BF8700","editor.findMatchHighlightBackground":"#FAE17D80","editor.selectionHighlightBackground":"#4AC26B40","editor.wordHighlightBackground":"#EAEEF280","editor.wordHighlightStrongBackground":"#AFB8C14D","editorBracketMatch.background":"#4AC26B40","editorBracketMatch.border":"#4AC26B99","editorInlayHint.background":"#AFB8C133","editorInlayHint.foreground":"#656D76","diffEditor.insertedTextBackground":"#6FDD8B80","diffEditor.removedTextBackground":"#FF818266","scrollbar.shadow":"#6E778133","scrollbarSlider.background":"#8C959F33","scrollbarSlider.hoverBackground":"#8C959F3D","scrollbarSlider.activeBackground":"#8C959F47","editorOverviewRuler.border":"#FFFFFF"}},monokai:{base:"vs-dark",inherit:!0,rules:[{token:"meta.embedded",foreground:"F8F8F2"},{token:"source.groovy.embedded",foreground:"F8F8F2"},{token:"string meta.image.inline.markdown",foreground:"F8F8F2"},{token:"variable.legacy.builtin.python",foreground:"F8F8F2"},{token:"comment",foreground:"88846F"},{token:"string",foreground:"E6DB74"},{token:"punctuation.definition.template-expression",foreground:"F92672"},{token:"punctuation.section.embedded",foreground:"F92672"},{token:"meta.template.expression",foreground:"F8F8F2"},{token:"constant.numeric",foreground:"AE81FF"},{token:"constant.language",foreground:"AE81FF"},{token:"constant.character, constant.other",foreground:"AE81FF"},{token:"variable",foreground:"F8F8F2"},{token:"keyword",foreground:"F92672"},{token:"storage",foreground:"F92672"},{token:"storage.type",foreground:"66D9EF",fontStyle:"italic"},{token:"entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution",foreground:"A6E22E",fontStyle:"underline"},{token:"entity.other.inherited-class",foreground:"A6E22E",fontStyle:"italic underline"},{token:"entity.name.function",foreground:"A6E22E"},{token:"variable.parameter",foreground:"FD971F",fontStyle:"italic"},{token:"entity.name.tag",foreground:"F92672"},{token:"entity.other.attribute-name",foreground:"A6E22E"},{token:"support.function",foreground:"66D9EF"},{token:"support.constant",foreground:"66D9EF"},{token:"support.type, support.class",foreground:"66D9EF",fontStyle:"italic"},{token:"support.other.variable"},{token:"invalid",foreground:"F44747"},{token:"invalid.deprecated",foreground:"F44747"},{token:"meta.structure.dictionary.json string.quoted.double.json",foreground:"CFCFC2"},{token:"meta.diff, meta.diff.header",foreground:"75715E"},{token:"markup.deleted",foreground:"F92672"},{token:"markup.inserted",foreground:"A6E22E"},{token:"markup.changed",foreground:"E6DB74"},{token:"constant.numeric.line-number.find-in-files - match",foreground:"AE81FFA0"},{token:"entity.name.filename.find-in-files",foreground:"E6DB74"},{token:"markup.quote",foreground:"F92672"},{token:"markup.list",foreground:"E6DB74"},{token:"markup.bold, markup.italic",foreground:"66D9EF"},{token:"markup.inline.raw",foreground:"FD971F"},{token:"markup.heading",foreground:"A6E22E"},{token:"markup.heading.setext",foreground:"A6E22E",fontStyle:"bold"},{token:"markup.heading.markdown",fontStyle:"bold"},{token:"markup.quote.markdown",foreground:"75715E",fontStyle:"italic"},{token:"markup.bold.markdown",fontStyle:"bold"},{token:"string.other.link.title.markdown,string.other.link.description.markdown",foreground:"AE81FF"},{token:"markup.underline.link.markdown,markup.underline.link.image.markdown",foreground:"E6DB74"},{token:"markup.italic.markdown",fontStyle:"italic"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.list.unnumbered.markdown, markup.list.numbered.markdown",foreground:"F8F8F2"},{token:"punctuation.definition.list.begin.markdown",foreground:"A6E22E"},{token:"token.info-token",foreground:"6796E6"},{token:"token.warn-token",foreground:"CD9731"},{token:"token.error-token",foreground:"F44747"},{token:"token.debug-token",foreground:"B267E6"},{token:"variable.language",foreground:"FD971F"}],colors:{"dropdown.background":"#414339","list.activeSelectionBackground":"#75715E","list.inactiveSelectionBackground":"#414339","list.hoverBackground":"#3E3D32","list.dropBackground":"#414339","list.highlightForeground":"#F8F8F2","button.background":"#75715E","editor.background":"#272822","editor.foreground":"#F8F8F2","selection.background":"#878B9180","editor.selectionHighlightBackground":"#575B6180","editor.selectionBackground":"#878B9180","editor.wordHighlightBackground":"#4A4A7680","editor.wordHighlightStrongBackground":"#6A6A9680","editor.lineHighlightBackground":"#3E3D32","editorLineNumber.activeForeground":"#C2C2BF","editorCursor.foreground":"#F8F8F0","editorWhitespace.foreground":"#464741","editorIndentGuide.background":"#464741","widget.shadow":"#00000098","progressBar.background":"#75715E","badge.background":"#75715E","badge.foreground":"#F8F8F2","editorLineNumber.foreground":"#90908A","pickerGroup.foreground":"#75715E","input.background":"#414339","inputOption.activeBorder":"#75715E",focusBorder:"#99947C","editorWidget.background":"#1E1F1C","diffEditor.insertedTextBackground":"#4B661680","diffEditor.removedTextBackground":"#90274A70","inputValidation.errorBackground":"#90274A","inputValidation.errorBorder":"#F92672","inputValidation.warningBackground":"#848528","inputValidation.warningBorder":"#E2E22E","inputValidation.infoBackground":"#546190","inputValidation.infoBorder":"#819AFF","editorHoverWidget.background":"#414339","editorHoverWidget.border":"#75715E","editorSuggestWidget.background":"#272822","editorSuggestWidget.border":"#75715E","peekView.border":"#75715E","peekViewEditor.background":"#272822","peekViewResult.background":"#1E1F1C","peekViewTitle.background":"#1E1F1C","peekViewResult.selectionBackground":"#414339","peekViewResult.matchHighlightBackground":"#75715E","peekViewEditor.matchHighlightBackground":"#75715E"}}};function M(e,o){let t={...o};for(let r in e)typeof e[r]=="object"&&!Array.isArray(e[r])?o[r]&&typeof o[r]=="object"&&!Array.isArray(o[r])?t[r]=M(e[r],o[r]):t[r]={...e[r]}:t[r]=e[r];return t}var ke=({filename:e,endpoint:o,framework:t,theme:r,completionSpeed:i,externalContext:n,...d})=>{let[a,u]=P.useState(null),c=P.useCallback((l,f)=>{u(f),r&&!j.includes(r)&&(f.editor.defineTheme(r,ie[r]),f.editor.setTheme(r)),d.onMount?.(l,f)},[d,r]);return ne(e,o,t,d.language,i,n,a),P.createElement(pe,{...d,key:r,theme:r,onMount:c,options:M(d.options,q)})},me=ke;export*from"@monaco-editor/react";export{ue as Copilot,me as Editor};
22
+ }$0`,") =>":" {"};var U=[{language:"javascript",snippets:V}];var D=class{constructor(){this.predictions=new Map,this.loadPredictions()}loadPredictions(){U.forEach(o=>{this.predictions.set(o.language,o.snippets)})}predictCode(o,r){let t=this.predictions.get(o);if(!t)return"";r=r.split("").reverse().join("");for(let n in t)if(r.startsWith(n.split("").reverse().join("")))return t[n];return""}};var Q=(e,o)=>e[o]||"",x=e=>{let o=e.split(`
23
+ `);return o[o.length-1].length};var K=(e,o)=>{let r=o.getLineContent(e.lineNumber),t=e.column-1,n=r.substring(t);return/\s/.test(n)},z=(e,o)=>{let r=new Set(['"',"'","}","]",")",","," ",":","."]),t=o.getLineContent(e.lineNumber),n=Q(t,e.column-1);return!r.has(n)&&!!n},b=(e,o)=>{let r=o.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:e.lineNumber,endColumn:e.column}),t=o.getValueInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:o.getLineCount(),endColumn:o.getLineMaxColumn(o.getLineCount())});return{codeBeforeCursor:r,codeAfterCursor:t}},Y=(e,o)=>{let r=o.getLineContent(e.lineNumber),t=r.slice(e.column-1).trim(),n=r.slice(0,e.column-1).trim();return e.column<=3&&(t!==""||n!=="")},J=(e,o)=>{let{lineNumber:r,column:t}=e,n=o.getLineContent(r),d=n.slice(0,t-1).trim(),i=n.slice(t-1).trim(),a=d.length>0,g=i.length>0;return a&&g?"fill-in-the-middle":"completion"};var X={javascript:1,typescript:2,typescriptreact:3,python:4,vue:5,php:6,dart:7,javascriptreact:8,go:9,css:10,cpp:11,html:12,scss:13,markdown:14,csharp:15,java:16,json:17,rust:18,ruby:19,c:20},w={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95},l=[.9978708359643611,.7001905605239328,-.1736749244124868,-.22994157947320112,.13406692641682572,-.007751370662011853,.0057783222035240715,.41910878254476003,-.1621657125711092,.13770814958908187,-.06036011308184006,-.07351180985800129,0,-.05584878151248109,.30618794079412015,-.1282197982598485,.10951859303997555,.1700461782788777,-.3346057842644757,.22497985923128136,0,-.44038101825774356,-.6540115939236782,.16595600081341702,.20733910722385135,-.1337033766105696,-.06923072125290894,-.05806684191976292,.3583334671633344,-.47357732824944315,.17810871365594377,.42268219963946685,0,0,-.16379620467004602,-.43893868831061167,0,.11570094006709251,.9326431262654882,-.9990110509203912,-.44125275652726503,-.15840786997162004,-.4600396256644451,-.018814811994044403,.09230944537175266,.025814790934742798,-1.0940162204190154,-.9407503631235489,-.9854303778694269,-1.1045822488262245,-1.1417299456573262,-1.5623704405345513,-.4157473855795939,-1.0244257735561713,-.7477401944601753,-1.1275109699068402,-.0714715633552533,-1.1408628006786907,-1.0409898655074672,-.2288889836518878,-.5469549893760344,-.181946611106845,.1264329316374918,0,0,.312206968554707,-.3656436392517924,.23655650686038968,.1014912419901576,0,.06287549221765308,0,0,.19027065218932154,-.8519502045974378,0,.23753599905971923,.2488809322489166,.019969251907983224,0,.06916505526229488,.29053356359188204,-.14484456555431657,.014768129429370188,-.15051464926341374,.07614835502776021,-.3317489901313935,0,0,.04921938684669103,-.28248576768353445,-.9708816204525345,-1.3560464522265527,.014165375212383239,-.23924166472544983,.10006595730248855,.09867233147279562,.32330430333220644,-.058625706114180595,.17149853105783947,.4436484054395367,.047189049576707255,.16832520944790552,.1117259900942179,-.35469010329927253,0,-.1528189124465582,-.3804848349564939,.07278077320753953,.13263786480064088,.22920682659292527,1.1512955314336537,0,.016939862282340023,.4242994650403408,.12759835577444986,-.5577261135825583,-.19764560943067672,-.4042102444736004,.12063461617733708,-.2933966817484834,.2715683893968593,0,-.7138548251238751,0,-.023066228703035277,0,-.06383043976746139,.09683723720709651,-.7337151424080791,0,-.27191370124625525,.2819781269656171,-.08711496549050252,.11048604909969338,-.0934849550450534,.0721001250772912,.2589126797890794,.6729582659532254,-.21921032738244908,-.21535277468651456,-.45474006124091354,-.05861820126419139,-.007875306207720204,-.056661261678809284,.17727881404222662,.23603713348534658,.17485861412377932,-.5737483768696752,-.38220029570342745,-.5202722985519168,-.37187947527657256,.47155277792990113,-.12077912346691123,.47825628981545326,.4736704404000214,-.1615218651546898,.18362447973513005,0,0,-.18183417425866824,0,0,-.2538532305733833,-.1303692690676528,-.4073577969188216,.04172985870928789,-.1704527388573901,0,0,.7536858953385828,-.44703159588787644,0,-.7246484085580873,-.21378128540782063,0,.037461090552656146,-.16205852364367032,-.10973952064404884,.017468043407647377,-.1288980387397392,0,0,0,-1.218692715379445,.05536949662193305,-.3763799844799116,-.1845001725624579,-.1615576298149558,0,-.15373262203249874,-.04603412604270418,0,-.3068149681460828,.09412352468269412,0,.09116543650609721,.06065865264082559,.05688267379386188,-.05873945477722306,0,.14532465133322153,.1870857769705463,.36304258043185555,.1411392422180405,.0630388629716367,0,-1.1170522012450395,.16133697772771127,.15908534390781448,-.23485453704002232,-.1419980841417892,.21909510179526218,.39948420260153766,.40802294284289187,.15403767653746853,0,.19764784115096676,.584914157527457,0,-.4573883817015294],Z=-.3043572714994554,ee=.15;var S=class{constructor(){this.previousLabel=0,this.previousLabelTimestamp=Date.now()-3600*1e3,this.probabilityAccept=0}},oe=e=>{let o=new S,r=o.previousLabel,t=0;e.properties.afterCursorWhitespace==="true"&&(t=1);let n=(Date.now()-o.previousLabelTimestamp)/1e3,d=Math.log(1+n),i=0,a=0,g=0,s=0;if(e.prefix){i=Math.log(1+x(e.prefix));let m=e.prefix.slice(-1);a=w[m]??0}let c=e.prefix?.trimEnd();if(c){g=Math.log(1+x(c));let m=c.slice(-1);s=w[m]??0}let u=e.measurements.documentLength?Math.log(1+e.measurements.documentLength):0,f=e.measurements.promptEndPos?Math.log(1+e.measurements.promptEndPos):0,F=e.measurements.promptEndPos&&e.measurements.documentLength?(e.measurements.promptEndPos+.5)/(1+e.measurements.documentLength):0,y=e.properties.languageId?X[e.properties.languageId]:0,p=Z;p+=l[0]*r+l[1]*t+l[2]*d,p+=l[3]*i+l[4]*g,p+=l[5]*u+l[6]*f,p+=l[7]*F,p+=l[8+y],p+=l[29+a],p+=l[125+s];let h=1/(1+Math.exp(-p));return o.probabilityAccept=h,h};var re=(e,o,r)=>se(e,o,r)>ee&&!z(e,o)&&!Y(e,o),se=(e,o,r)=>{let{codeBeforeCursor:t}=b(e,o),n=K(e,o),d=o.getValueLength(),i=o.getOffsetAt(e);return oe({properties:{afterCursorWhitespace:n?"true":"false",languageId:r},measurements:{documentLength:d,promptEndPos:i},prefix:t})};var te=async({filename:e,endpoint:o,code:r,language:t,framework:n,externalContext:d,model:i,position:a,token:g})=>{if(!re(a,i,t)||!r)return null;let s=new AbortController,c=await B(o,{completionMetadata:ce({filename:e,position:a,model:i,language:t,framework:n,externalContext:d})},{headers:{"Content-Type":"application/json"},error:"Error while fetching completion item",signal:s.signal});return g.isCancellationRequested?(s.abort(),null):c.error?null:c.choices[0].message.content},ce=({filename:e,position:o,model:r,language:t,framework:n,externalContext:d})=>{let i=J(o,r),{codeBeforeCursor:a,codeAfterCursor:g}=b(o,r);return{filename:e,language:t,framework:n||void 0,externalContext:d,codeBeforeCursor:a,codeAfterCursor:g,editorState:{completionMode:i}}},ne=(e,o)=>{let{codeBeforeCursor:r}=b(e,o);return`${e.lineNumber}:${e.column}:${r}`};import L from"react";var le=(e,o=1e3)=>{let r=L.useRef(null),t=L.useCallback((...n)=>(r.current&&clearTimeout(r.current),new Promise((d,i)=>{r.current=setTimeout(()=>{e(...n).then(d).catch(i)},o)})),[e,o]);return L.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),t},ie=le;var fe=new D,pe=(e,o,r,t,n,d,i)=>{let a=M.useRef(new Map),g=M.useRef(!1),s=ie(te,n==="little-faster"?350:600);return M.useEffect(()=>{if(!i||!t||!o)return;let c=i.languages.registerInlineCompletionsProvider(t,{provideInlineCompletions:async(u,f,F,y)=>{if(g.current)return g.current=!1,{items:[]};let p=u.getValue(),h=new i.Range(f.lineNumber,f.column,f.lineNumber,f.column),m=ne(f,u);if(a.current.has(m)){let k=a.current.get(m);if(g.current=!0,k)return{items:[k],enableForwardStability:!0}}let R=fe.predictCode(t,p);if(R){let k={insertText:{snippet:R},range:h,completeBracketPairs:!0};return a.current.set(m,k),{items:[k],enableForwardStability:!0}}if(y.isCancellationRequested)return{items:[]};try{let k=await s({filename:e,endpoint:o,code:p,language:t,framework:r,externalContext:d,model:u,position:f,token:y});if(k){let O={insertText:k,range:h};return a.current.set(m,O),g.current=!0,{items:[O],enableForwardStability:!0}}}catch{return{items:[]}}return{items:[]}},freeInlineCompletions:()=>{}});return()=>{c.dispose()}},[i,t,r,d,s,o,e]),null},de=pe;var ae={"codesandbox-dark":{base:"vs-dark",inherit:!0,rules:[{token:"string",foreground:"BFD084"},{token:"punctuation.definition.string",foreground:"BFD084"},{token:"constant.character.escape",foreground:"BFD084"},{token:"text.html constant.character.entity.named",foreground:"BFD084"},{token:"text.html.derivative",foreground:"E5E5E5"},{token:"punctuation.definition.entity.html",foreground:"BFD084"},{token:"template.expression.begin",foreground:"7AD9FB"},{token:"template.expression.end",foreground:"7AD9FB"},{token:"punctuation.definition.template-expression.begin",foreground:"7AD9FB"},{token:"punctuation.definition.template-expression.end",foreground:"7AD9FB"},{token:"constant",foreground:"7AD9FB"},{token:"keyword",foreground:"A390FF"},{token:"modifier",foreground:"A390FF"},{token:"storage",foreground:"A390FF"},{token:"punctuation.definition.block",foreground:"86897A"},{token:"punctuation.definition.parameters",foreground:"86897A"},{token:"meta.brace.round",foreground:"86897A"},{token:"meta.jsx.children",foreground:"E5E5E5"},{token:"punctuation.accessor",foreground:"86897A"},{token:"variable.other",foreground:"FFFFFF"},{token:"variable.parameter",foreground:"FFFFFF"},{token:"meta.embedded",foreground:"E5E5E5"},{token:"source.groovy.embedded",foreground:"E5E5E5"},{token:"meta.template.expression",foreground:"E5E5E5"},{token:"comment",foreground:"6F6F6F"},{token:"docblock",foreground:"6F6F6F"},{token:"meta.function-call",foreground:"CDF861"},{token:"meta.class entity.name.type.class",foreground:"FFFFFF",fontStyle:"underline"},{token:"meta.class entity.name.type.module",foreground:"CABEFF"},{token:"meta.class meta.type.annotation",foreground:"A390FF"},{token:"meta.class support.type.primitive",foreground:"A390FF"},{token:"meta.interface support.type.primitive",foreground:"A390FF"},{token:"meta.type.annotation support.type.primitive",foreground:"A390FF"},{token:"meta.type.annotation entity.name.type",foreground:"CABEFF"},{token:"variable.object.property",foreground:"FFFFFF"},{token:"entity.name.function",foreground:"CDF861"},{token:"meta.definition.variable",foreground:"FFFFFF"},{token:"modifier",foreground:"A390FF"},{token:"variable.language.this",foreground:"A390FF"},{token:"support.type.object",foreground:"A390FF"},{token:"support.module",foreground:"7AD9FB",fontStyle:"italic"},{token:"support.node",foreground:"7AD9FB",fontStyle:"italic"},{token:"support.type.ts",foreground:"7AD9FB"},{token:"entity.other.inherited-class",foreground:"7AD9FB"},{token:"meta.interface entity.name.type.interface",foreground:"7AD9FB"},{token:"keyword.operator",foreground:"B3E8B4"},{token:"storage.type.function.arrow",foreground:"B3E8B4"},{token:"variable.css",foreground:"7AD9FB"},{token:"source.css",foreground:"CDF861"},{token:"entity.other.attribute-name",foreground:"CDF861"},{token:"entity.name.tag.css",foreground:"CDF861"},{token:"entity.other.attribute-name.id",foreground:"CDF861"},{token:"entity.other.attribute-name.class",foreground:"CDF861"},{token:"source.css meta.selector.css",foreground:"CDF861"},{token:"support.type.property-name.css",foreground:"FFFFFF"},{token:"support.function.css",foreground:"A390FF"},{token:"support.constant.css",foreground:"A390FF"},{token:"keyword.css",foreground:"A390FF"},{token:"constant.numeric.css",foreground:"A390FF"},{token:"constant.other.color.css",foreground:"A390FF"},{token:"punctuation.section",foreground:"86897A"},{token:"punctuation.separator",foreground:"86897A"},{token:"punctuation.definition.entity.css",foreground:"86897A"},{token:"punctuation.terminator.rule.css",foreground:"E5E5E5"},{token:"source.css keyword.other.unit",foreground:"CABEFF"},{token:"string.css",foreground:"CABEFF"},{token:"punctuation.definition.string.css",foreground:"CABEFF"},{token:"support.type.property-name",foreground:"FFFFFF"},{token:"string.html",foreground:"CDF861"},{token:"punctuation.definition.tag",foreground:"86897A"},{token:"entity.other.attribute-name",foreground:"CABEFF"},{token:"entity.name.tag",foreground:"A390FF"},{token:"entity.name.tag.wildcard",foreground:"CDF861"},{token:"markup.markdown",foreground:"FFFFFF"},{token:"markup.heading.markdown",foreground:"B3E8B4"},{token:"punctuation.definition.bold.markdown",foreground:"B3E8B4"},{token:"meta.paragraph.markdown punctuation.definition.link.description",foreground:"B3E8B4"},{token:"punctuation.definition.raw.markdown",foreground:"B3E8B4"},{token:"meta.paragraph.markdown",foreground:"E5E5E5"},{token:"text.html.markdown meta.attribute",foreground:"CABEFF"},{token:"entity.name.section",foreground:"FFFFFF"},{token:"string.other",foreground:"FFFFFF"},{token:"string.other.link",foreground:"FFFFFF"},{token:"punctuation.definition.markdown",foreground:"B3E8B4"},{token:"punctuation.definition.string",foreground:"B3E8B4"},{token:"punctuation.definition.string.begin.shell",foreground:"B3E8B4"},{token:"markup.underline.link",foreground:"BFD084"},{token:"markup.inline.raw",foreground:"86897A"},{token:"text.html.vue variable.other.readwrite",foreground:"A390FF"},{token:"text.html.vue meta.object-literal.key",foreground:"FFFFFF"},{token:"text.html.vue entity.name.tag.css",foreground:"A390FF"},{token:"text.html.vue entity.other.attribute-name",foreground:"FFFFFF"},{token:"text.html.vue constant.numeric.css",foreground:"7AD9FB"},{token:"text.html.vue keyword.other.unit",foreground:"A390FF"},{token:"text.html.vue support.constant.property-value",foreground:"A390FF"},{token:"text.html.vue support.constant.color",foreground:"A390FF"},{token:"function.defaultLibrary"},{token:"class.defaultLibrary"}],colors:{foreground:"#E5E5E5",focusBorder:"#AD9CFF","selection.background":"#6F6F6F","scrollbar.shadow":"#0000007E","input.background":"#0F0E0E","input.foreground":"#999","button.background":"#EDFFA5","button.foreground":"#151515","button.hoverBackground":"#DCFF50","textLink.foreground":"#E5E5E5","list.dropBackground":"#151515","list.focusForeground":"#808080","list.focusBackground":"#E5E5E51A","list.highlightForeground":"#E5E5E5","editor.background":"#151515","editorLineNumber.foreground":"#858585","editorLineNumber.activeForeground":"#C6C6C6","scrollbarSlider.background":"#79797966","scrollbarSlider.hoverBackground":"#646464B3","scrollbarSlider.activeBackground":"#BFBFBF66","widget.shadow":"#0000005C","editorWidget.background":"#252526","pickerGroup.border":"#3F3F46","pickerGroup.foreground":"#3794FF",errorForeground:"#F48771","editorError.foreground":"#F48771","editorWarning.foreground":"#F7CC66"}},"github-dark-dimmed":{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"768390"},{token:"punctuation.definition.comment",foreground:"768390"},{token:"string.comment",foreground:"768390"},{token:"constant.other.placeholder",foreground:"F47067"},{token:"constant.character",foreground:"F47067"},{token:"constant",foreground:"6CB6FF"},{token:"entity.name.constant",foreground:"6CB6FF"},{token:"variable.other.constant",foreground:"6CB6FF"},{token:"variable.other.enummember",foreground:"6CB6FF"},{token:"variable.language",foreground:"6CB6FF"},{token:"entity",foreground:"6CB6FF"},{token:"entity.name",foreground:"F69D50"},{token:"meta.export.default",foreground:"F69D50"},{token:"meta.definition.variable",foreground:"F69D50"},{token:"variable.parameter.function",foreground:"ADBAC7"},{token:"meta.jsx.children",foreground:"ADBAC7"},{token:"meta.block",foreground:"ADBAC7"},{token:"meta.tag.attributes",foreground:"ADBAC7"},{token:"entity.name.constant",foreground:"ADBAC7"},{token:"meta.object.member",foreground:"ADBAC7"},{token:"meta.embedded.expression",foreground:"ADBAC7"},{token:"entity.name.function",foreground:"DCBDFB"},{token:"entity.name.tag",foreground:"8DDB8C"},{token:"support.class.component",foreground:"8DDB8C"},{token:"keyword",foreground:"F47067"},{token:"storage",foreground:"F47067"},{token:"storage.type",foreground:"F47067"},{token:"storage.modifier.package",foreground:"ADBAC7"},{token:"storage.modifier.import",foreground:"ADBAC7"},{token:"storage.type.java",foreground:"ADBAC7"},{token:"string",foreground:"96D0FF"},{token:"string punctuation.section.embedded source",foreground:"96D0FF"},{token:"support",foreground:"6CB6FF"},{token:"meta.property-name",foreground:"6CB6FF"},{token:"variable",foreground:"F69D50"},{token:"variable.other",foreground:"ADBAC7"},{token:"invalid.broken",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.illegal",foreground:"FF938A",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"FF938A",fontStyle:"italic"},{token:"carriage-return",foreground:"CDD9E5",fontStyle:"italic underline"},{token:"message.error",foreground:"FF938A"},{token:"string variable",foreground:"6CB6FF"},{token:"source.regexp",foreground:"96D0FF"},{token:"string.regexp",foreground:"96D0FF"},{token:"string.regexp.character-class",foreground:"96D0FF"},{token:"string.regexp constant.character.escape",foreground:"96D0FF"},{token:"string.regexp source.ruby.embedded",foreground:"96D0FF"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"96D0FF"},{token:"string.regexp constant.character.escape",foreground:"8DDB8C",fontStyle:"bold"},{token:"support.constant",foreground:"6CB6FF"},{token:"support.variable",foreground:"6CB6FF"},{token:"support.type.property-name.json",foreground:"8DDB8C"},{token:"meta.module-reference",foreground:"6CB6FF"},{token:"punctuation.definition.list.begin.markdown",foreground:"F69D50"},{token:"markup.heading",foreground:"6CB6FF",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"6CB6FF",fontStyle:"bold"},{token:"markup.quote",foreground:"8DDB8C"},{token:"markup.italic",foreground:"ADBAC7",fontStyle:"italic"},{token:"markup.bold",foreground:"ADBAC7",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"6CB6FF"},{token:"markup.deleted",foreground:"FF938A"},{token:"meta.diff.header.from-file",foreground:"FF938A"},{token:"punctuation.definition.deleted",foreground:"FF938A"},{token:"punctuation.section.embedded",foreground:"F47067"},{token:"markup.inserted",foreground:"8DDB8C"},{token:"meta.diff.header.to-file",foreground:"8DDB8C"},{token:"punctuation.definition.inserted",foreground:"8DDB8C"},{token:"markup.changed",foreground:"F69D50"},{token:"punctuation.definition.changed",foreground:"F69D50"},{token:"markup.ignored",foreground:"2D333B"},{token:"markup.untracked",foreground:"2D333B"},{token:"meta.diff.range",foreground:"DCBDFB",fontStyle:"bold"},{token:"meta.diff.header",foreground:"6CB6FF"},{token:"meta.separator",foreground:"6CB6FF",fontStyle:"bold"},{token:"meta.output",foreground:"6CB6FF"},{token:"brackethighlighter.tag",foreground:"768390"},{token:"brackethighlighter.curly",foreground:"768390"},{token:"brackethighlighter.round",foreground:"768390"},{token:"brackethighlighter.square",foreground:"768390"},{token:"brackethighlighter.angle",foreground:"768390"},{token:"brackethighlighter.quote",foreground:"768390"},{token:"brackethighlighter.unmatched",foreground:"FF938A"},{token:"constant.other.reference.link",foreground:"96D0FF"},{token:"string.other.link",foreground:"96D0FF"}],colors:{focusBorder:"#316DCA",foreground:"#ADBAC7",descriptionForeground:"#768390",errorForeground:"#E5534B","textLink.foreground":"#539BF5","textLink.activeForeground":"#539BF5","textBlockQuote.background":"#1C2128","textBlockQuote.border":"#444C56","textCodeBlock.background":"#636E7B66","textPreformat.foreground":"#768390","textSeparator.foreground":"#373E47","button.background":"#347D39","button.foreground":"#FFFFFF","button.hoverBackground":"#46954A","dropdown.background":"#2D333B","dropdown.border":"#444C56","dropdown.foreground":"#ADBAC7","input.background":"#22272E","input.border":"#444C56","input.foreground":"#ADBAC7","input.placeholderForeground":"#636E7B","badge.foreground":"#CDD9E5","badge.background":"#316DCA","progressBar.background":"#316DCA","list.hoverForeground":"#ADBAC7","list.inactiveSelectionForeground":"#ADBAC7","list.activeSelectionForeground":"#ADBAC7","list.hoverBackground":"#636E7B1A","list.inactiveSelectionBackground":"#636E7B66","list.activeSelectionBackground":"#636E7B66","list.focusForeground":"#ADBAC7","list.focusBackground":"#4184E426","list.highlightForeground":"#539BF5","pickerGroup.border":"#444C56","pickerGroup.foreground":"#768390","editor.foreground":"#ADBAC7","editor.background":"#22272E","editorWidget.background":"#2D333B","editor.lineHighlightBackground":"#636E7B1A","editorLineNumber.foreground":"#636E7B","editorLineNumber.activeForeground":"#ADBAC7","editorIndentGuide.background":"#ADBAC71F","editorWhitespace.foreground":"#545D68","editorCursor.foreground":"#539BF5","editor.findMatchBackground":"#966600","editor.findMatchHighlightBackground":"#EAC55F80","editor.selectionHighlightBackground":"#57AB5A40","editor.wordHighlightBackground":"#636E7B80","editor.wordHighlightStrongBackground":"#636E7B4D","editorBracketMatch.background":"#57AB5A40","editorBracketMatch.border":"#57AB5A99","editorInlayHint.background":"#76839033","editorInlayHint.foreground":"#768390","diffEditor.insertedTextBackground":"#57AB5A4D","diffEditor.removedTextBackground":"#F470674D","scrollbar.shadow":"#545D6833","scrollbarSlider.background":"#76839033","scrollbarSlider.hoverBackground":"#7683903D","scrollbarSlider.activeBackground":"#76839047","editorOverviewRuler.border":"#1C2128","peekViewEditor.matchHighlightBackground":"#AE7C1466","peekViewResult.matchHighlightBackground":"#AE7C1466","peekViewEditor.background":"#636E7B1A","peekViewResult.background":"#22272E"}},"github-dark":{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"8B949E"},{token:"punctuation.definition.comment",foreground:"8B949E"},{token:"string.comment",foreground:"8B949E"},{token:"constant.other.placeholder",foreground:"FF7B72"},{token:"constant.character",foreground:"FF7B72"},{token:"constant",foreground:"79C0FF"},{token:"entity.name.constant",foreground:"79C0FF"},{token:"variable.other.constant",foreground:"79C0FF"},{token:"variable.other.enummember",foreground:"79C0FF"},{token:"variable.language",foreground:"79C0FF"},{token:"entity",foreground:"79C0FF"},{token:"entity.name",foreground:"FFA657"},{token:"meta.export.default",foreground:"FFA657"},{token:"meta.definition.variable",foreground:"FFA657"},{token:"variable.parameter.function",foreground:"E6EDF3"},{token:"meta.jsx.children",foreground:"E6EDF3"},{token:"meta.block",foreground:"E6EDF3"},{token:"meta.tag.attributes",foreground:"E6EDF3"},{token:"entity.name.constant",foreground:"E6EDF3"},{token:"meta.object.member",foreground:"E6EDF3"},{token:"meta.embedded.expression",foreground:"E6EDF3"},{token:"entity.name.function",foreground:"D2A8FF"},{token:"entity.name.tag",foreground:"7EE787"},{token:"support.class.component",foreground:"7EE787"},{token:"keyword",foreground:"FF7B72"},{token:"storage",foreground:"FF7B72"},{token:"storage.type",foreground:"FF7B72"},{token:"storage.modifier.package",foreground:"E6EDF3"},{token:"storage.modifier.import",foreground:"E6EDF3"},{token:"storage.type.java",foreground:"E6EDF3"},{token:"string",foreground:"A5D6FF"},{token:"string punctuation.section.embedded source",foreground:"A5D6FF"},{token:"support",foreground:"79C0FF"},{token:"meta.property-name",foreground:"79C0FF"},{token:"variable",foreground:"FFA657"},{token:"variable.other",foreground:"E6EDF3"},{token:"invalid.broken",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.illegal",foreground:"FFA198",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"FFA198",fontStyle:"italic"},{token:"carriage-return",foreground:"F0F6FC",fontStyle:"italic underline"},{token:"message.error",foreground:"FFA198"},{token:"string variable",foreground:"79C0FF"},{token:"source.regexp",foreground:"A5D6FF"},{token:"string.regexp",foreground:"A5D6FF"},{token:"string.regexp.character-class",foreground:"A5D6FF"},{token:"string.regexp constant.character.escape",foreground:"A5D6FF"},{token:"string.regexp source.ruby.embedded",foreground:"A5D6FF"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"A5D6FF"},{token:"string.regexp constant.character.escape",foreground:"7EE787",fontStyle:"bold"},{token:"support.constant",foreground:"79C0FF"},{token:"support.variable",foreground:"79C0FF"},{token:"support.type.property-name.json",foreground:"7EE787"},{token:"meta.module-reference",foreground:"79C0FF"},{token:"punctuation.definition.list.begin.markdown",foreground:"FFA657"},{token:"markup.heading",foreground:"79C0FF",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"79C0FF",fontStyle:"bold"},{token:"markup.quote",foreground:"7EE787"},{token:"markup.italic",foreground:"E6EDF3",fontStyle:"italic"},{token:"markup.bold",foreground:"E6EDF3",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"79C0FF"},{token:"markup.deleted",foreground:"FFA198"},{token:"meta.diff.header.from-file",foreground:"FFA198"},{token:"punctuation.definition.deleted",foreground:"FFA198"},{token:"punctuation.section.embedded",foreground:"FF7B72"},{token:"markup.inserted",foreground:"7EE787"},{token:"meta.diff.header.to-file",foreground:"7EE787"},{token:"punctuation.definition.inserted",foreground:"7EE787"},{token:"markup.changed",foreground:"FFA657"},{token:"punctuation.definition.changed",foreground:"FFA657"},{token:"markup.ignored",foreground:"161B22"},{token:"markup.untracked",foreground:"161B22"},{token:"meta.diff.range",foreground:"D2A8FF",fontStyle:"bold"},{token:"meta.diff.header",foreground:"79C0FF"},{token:"meta.separator",foreground:"79C0FF",fontStyle:"bold"},{token:"meta.output",foreground:"79C0FF"},{token:"brackethighlighter.tag",foreground:"8B949E"},{token:"brackethighlighter.curly",foreground:"8B949E"},{token:"brackethighlighter.round",foreground:"8B949E"},{token:"brackethighlighter.square",foreground:"8B949E"},{token:"brackethighlighter.angle",foreground:"8B949E"},{token:"brackethighlighter.quote",foreground:"8B949E"},{token:"brackethighlighter.unmatched",foreground:"FFA198"},{token:"constant.other.reference.link",foreground:"A5D6FF"},{token:"string.other.link",foreground:"A5D6FF"}],colors:{focusBorder:"#1F6FEB",foreground:"#E6EDF3",descriptionForeground:"#7D8590",errorForeground:"#F85149","textLink.foreground":"#2F81F7","textLink.activeForeground":"#2F81F7","textBlockQuote.background":"#010409","textBlockQuote.border":"#30363D","textCodeBlock.background":"#6E768166","textPreformat.foreground":"#7D8590","textSeparator.foreground":"#21262D","button.background":"#238636","button.foreground":"#FFFFFF","button.hoverBackground":"#2EA043","dropdown.background":"#161B22","dropdown.border":"#30363D","dropdown.foreground":"#E6EDF3","input.background":"#0D1117","input.border":"#30363D","input.foreground":"#E6EDF3","input.placeholderForeground":"#6E7681","badge.foreground":"#FFFFFF","badge.background":"#1F6FEB","progressBar.background":"#1F6FEB","list.hoverForeground":"#E6EDF3","list.inactiveSelectionForeground":"#E6EDF3","list.activeSelectionForeground":"#E6EDF3","list.hoverBackground":"#6E76811A","list.inactiveSelectionBackground":"#6E768166","list.activeSelectionBackground":"#6E768166","list.focusForeground":"#E6EDF3","list.focusBackground":"#388BFD26","list.highlightForeground":"#2F81F7","pickerGroup.border":"#30363D","pickerGroup.foreground":"#7D8590","editor.foreground":"#E6EDF3","editor.background":"#0D1117","editorWidget.background":"#161B22","editor.lineHighlightBackground":"#6E76811A","editorLineNumber.foreground":"#6E7681","editorLineNumber.activeForeground":"#E6EDF3","editorIndentGuide.background":"#E6EDF31F","editorWhitespace.foreground":"#484F58","editorCursor.foreground":"#2F81F7","editor.findMatchBackground":"#9E6A03","editor.findMatchHighlightBackground":"#F2CC6080","editor.selectionHighlightBackground":"#3FB95040","editor.wordHighlightBackground":"#6E768180","editor.wordHighlightStrongBackground":"#6E76814D","editorBracketMatch.background":"#3FB95040","editorBracketMatch.border":"#3FB95099","editorInlayHint.background":"#8B949E33","editorInlayHint.foreground":"#7D8590","diffEditor.insertedTextBackground":"#3FB9504D","diffEditor.removedTextBackground":"#FF7B724D","scrollbar.shadow":"#484F5833","scrollbarSlider.background":"#8B949E33","scrollbarSlider.hoverBackground":"#8B949E3D","scrollbarSlider.activeBackground":"#8B949E47","editorOverviewRuler.border":"#010409","peekViewEditor.matchHighlightBackground":"#BB800966","peekViewResult.matchHighlightBackground":"#BB800966","peekViewEditor.background":"#6E76811A","peekViewResult.background":"#0D1117"}},"github-light":{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"6E7781"},{token:"punctuation.definition.comment",foreground:"6E7781"},{token:"string.comment",foreground:"6E7781"},{token:"constant.other.placeholder",foreground:"CF222E"},{token:"constant.character",foreground:"CF222E"},{token:"constant",foreground:"0550AE"},{token:"entity.name.constant",foreground:"0550AE"},{token:"variable.other.constant",foreground:"0550AE"},{token:"variable.other.enummember",foreground:"0550AE"},{token:"variable.language",foreground:"0550AE"},{token:"entity",foreground:"0550AE"},{token:"entity.name",foreground:"953800"},{token:"meta.export.default",foreground:"953800"},{token:"meta.definition.variable",foreground:"953800"},{token:"variable.parameter.function",foreground:"1F2328"},{token:"meta.jsx.children",foreground:"1F2328"},{token:"meta.block",foreground:"1F2328"},{token:"meta.tag.attributes",foreground:"1F2328"},{token:"entity.name.constant",foreground:"1F2328"},{token:"meta.object.member",foreground:"1F2328"},{token:"meta.embedded.expression",foreground:"1F2328"},{token:"entity.name.function",foreground:"8250DF"},{token:"entity.name.tag",foreground:"116329"},{token:"support.class.component",foreground:"116329"},{token:"keyword",foreground:"CF222E"},{token:"storage",foreground:"CF222E"},{token:"storage.type",foreground:"CF222E"},{token:"storage.modifier.package",foreground:"1F2328"},{token:"storage.modifier.import",foreground:"1F2328"},{token:"storage.type.java",foreground:"1F2328"},{token:"string",foreground:"0A3069"},{token:"string punctuation.section.embedded source",foreground:"0A3069"},{token:"support",foreground:"0550AE"},{token:"meta.property-name",foreground:"0550AE"},{token:"variable",foreground:"953800"},{token:"variable.other",foreground:"1F2328"},{token:"invalid.broken",foreground:"82071E",fontStyle:"italic"},{token:"invalid.deprecated",foreground:"82071E",fontStyle:"italic"},{token:"invalid.illegal",foreground:"82071E",fontStyle:"italic"},{token:"invalid.unimplemented",foreground:"82071E",fontStyle:"italic"},{token:"carriage-return",foreground:"F6F8FA",fontStyle:"italic underline"},{token:"message.error",foreground:"82071E"},{token:"string variable",foreground:"0550AE"},{token:"source.regexp",foreground:"0A3069"},{token:"string.regexp",foreground:"0A3069"},{token:"string.regexp.character-class",foreground:"0A3069"},{token:"string.regexp constant.character.escape",foreground:"0A3069"},{token:"string.regexp source.ruby.embedded",foreground:"0A3069"},{token:"string.regexp string.regexp.arbitrary-repitition",foreground:"0A3069"},{token:"string.regexp constant.character.escape",foreground:"116329",fontStyle:"bold"},{token:"support.constant",foreground:"0550AE"},{token:"support.variable",foreground:"0550AE"},{token:"support.type.property-name.json",foreground:"116329"},{token:"meta.module-reference",foreground:"0550AE"},{token:"punctuation.definition.list.begin.markdown",foreground:"953800"},{token:"markup.heading",foreground:"0550AE",fontStyle:"bold"},{token:"markup.heading entity.name",foreground:"0550AE",fontStyle:"bold"},{token:"markup.quote",foreground:"116329"},{token:"markup.italic",foreground:"1F2328",fontStyle:"italic"},{token:"markup.bold",foreground:"1F2328",fontStyle:"bold"},{token:"markup.underline",fontStyle:"underline"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.inline.raw",foreground:"0550AE"},{token:"markup.deleted",foreground:"82071E"},{token:"meta.diff.header.from-file",foreground:"82071E"},{token:"punctuation.definition.deleted",foreground:"82071E"},{token:"punctuation.section.embedded",foreground:"CF222E"},{token:"markup.inserted",foreground:"116329"},{token:"meta.diff.header.to-file",foreground:"116329"},{token:"punctuation.definition.inserted",foreground:"116329"},{token:"markup.changed",foreground:"953800"},{token:"punctuation.definition.changed",foreground:"953800"},{token:"markup.ignored",foreground:"EAEEF2"},{token:"markup.untracked",foreground:"EAEEF2"},{token:"meta.diff.range",foreground:"8250DF",fontStyle:"bold"},{token:"meta.diff.header",foreground:"0550AE"},{token:"meta.separator",foreground:"0550AE",fontStyle:"bold"},{token:"meta.output",foreground:"0550AE"},{token:"brackethighlighter.tag",foreground:"57606A"},{token:"brackethighlighter.curly",foreground:"57606A"},{token:"brackethighlighter.round",foreground:"57606A"},{token:"brackethighlighter.square",foreground:"57606A"},{token:"brackethighlighter.angle",foreground:"57606A"},{token:"brackethighlighter.quote",foreground:"57606A"},{token:"brackethighlighter.unmatched",foreground:"82071E"},{token:"constant.other.reference.link",foreground:"0A3069"},{token:"string.other.link",foreground:"0A3069"}],colors:{focusBorder:"#0969DA",foreground:"#1F2328",descriptionForeground:"#656D76",errorForeground:"#CF222E","textLink.foreground":"#0969DA","textLink.activeForeground":"#0969DA","textBlockQuote.background":"#F6F8FA","textBlockQuote.border":"#D0D7DE","textCodeBlock.background":"#AFB8C133","textPreformat.foreground":"#656D76","textSeparator.foreground":"#D8DEE4","button.background":"#1F883D","button.foreground":"#FFFFFF","button.hoverBackground":"#1A7F37","dropdown.background":"#FFFFFF","dropdown.border":"#D0D7DE","dropdown.foreground":"#1F2328","input.background":"#FFFFFF","input.border":"#D0D7DE","input.foreground":"#1F2328","input.placeholderForeground":"#6E7781","badge.foreground":"#FFFFFF","badge.background":"#0969DA","progressBar.background":"#0969DA","list.hoverForeground":"#1F2328","list.inactiveSelectionForeground":"#1F2328","list.activeSelectionForeground":"#1F2328","list.hoverBackground":"#EAEEF280","list.inactiveSelectionBackground":"#AFB8C133","list.activeSelectionBackground":"#AFB8C133","list.focusForeground":"#1F2328","list.focusBackground":"#DDF4FF","list.highlightForeground":"#0969DA","pickerGroup.border":"#D0D7DE","pickerGroup.foreground":"#656D76","editor.foreground":"#1F2328","editor.background":"#FFFFFF","editorWidget.background":"#FFFFFF","editor.lineHighlightBackground":"#EAEEF280","editorLineNumber.foreground":"#8C959F","editorLineNumber.activeForeground":"#1F2328","editorIndentGuide.background":"#1F23281F","editorWhitespace.foreground":"#AFB8C1","editorCursor.foreground":"#0969DA","editor.findMatchBackground":"#BF8700","editor.findMatchHighlightBackground":"#FAE17D80","editor.selectionHighlightBackground":"#4AC26B40","editor.wordHighlightBackground":"#EAEEF280","editor.wordHighlightStrongBackground":"#AFB8C14D","editorBracketMatch.background":"#4AC26B40","editorBracketMatch.border":"#4AC26B99","editorInlayHint.background":"#AFB8C133","editorInlayHint.foreground":"#656D76","diffEditor.insertedTextBackground":"#6FDD8B80","diffEditor.removedTextBackground":"#FF818266","scrollbar.shadow":"#6E778133","scrollbarSlider.background":"#8C959F33","scrollbarSlider.hoverBackground":"#8C959F3D","scrollbarSlider.activeBackground":"#8C959F47","editorOverviewRuler.border":"#FFFFFF"}},monokai:{base:"vs-dark",inherit:!0,rules:[{token:"meta.embedded",foreground:"F8F8F2"},{token:"source.groovy.embedded",foreground:"F8F8F2"},{token:"string meta.image.inline.markdown",foreground:"F8F8F2"},{token:"variable.legacy.builtin.python",foreground:"F8F8F2"},{token:"comment",foreground:"88846F"},{token:"string",foreground:"E6DB74"},{token:"punctuation.definition.template-expression",foreground:"F92672"},{token:"punctuation.section.embedded",foreground:"F92672"},{token:"meta.template.expression",foreground:"F8F8F2"},{token:"constant.numeric",foreground:"AE81FF"},{token:"constant.language",foreground:"AE81FF"},{token:"constant.character, constant.other",foreground:"AE81FF"},{token:"variable",foreground:"F8F8F2"},{token:"keyword",foreground:"F92672"},{token:"storage",foreground:"F92672"},{token:"storage.type",foreground:"66D9EF",fontStyle:"italic"},{token:"entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution",foreground:"A6E22E",fontStyle:"underline"},{token:"entity.other.inherited-class",foreground:"A6E22E",fontStyle:"italic underline"},{token:"entity.name.function",foreground:"A6E22E"},{token:"variable.parameter",foreground:"FD971F",fontStyle:"italic"},{token:"entity.name.tag",foreground:"F92672"},{token:"entity.other.attribute-name",foreground:"A6E22E"},{token:"support.function",foreground:"66D9EF"},{token:"support.constant",foreground:"66D9EF"},{token:"support.type, support.class",foreground:"66D9EF",fontStyle:"italic"},{token:"support.other.variable"},{token:"invalid",foreground:"F44747"},{token:"invalid.deprecated",foreground:"F44747"},{token:"meta.structure.dictionary.json string.quoted.double.json",foreground:"CFCFC2"},{token:"meta.diff, meta.diff.header",foreground:"75715E"},{token:"markup.deleted",foreground:"F92672"},{token:"markup.inserted",foreground:"A6E22E"},{token:"markup.changed",foreground:"E6DB74"},{token:"constant.numeric.line-number.find-in-files - match",foreground:"AE81FFA0"},{token:"entity.name.filename.find-in-files",foreground:"E6DB74"},{token:"markup.quote",foreground:"F92672"},{token:"markup.list",foreground:"E6DB74"},{token:"markup.bold, markup.italic",foreground:"66D9EF"},{token:"markup.inline.raw",foreground:"FD971F"},{token:"markup.heading",foreground:"A6E22E"},{token:"markup.heading.setext",foreground:"A6E22E",fontStyle:"bold"},{token:"markup.heading.markdown",fontStyle:"bold"},{token:"markup.quote.markdown",foreground:"75715E",fontStyle:"italic"},{token:"markup.bold.markdown",fontStyle:"bold"},{token:"string.other.link.title.markdown,string.other.link.description.markdown",foreground:"AE81FF"},{token:"markup.underline.link.markdown,markup.underline.link.image.markdown",foreground:"E6DB74"},{token:"markup.italic.markdown",fontStyle:"italic"},{token:"markup.strikethrough",fontStyle:"strikethrough"},{token:"markup.list.unnumbered.markdown, markup.list.numbered.markdown",foreground:"F8F8F2"},{token:"punctuation.definition.list.begin.markdown",foreground:"A6E22E"},{token:"token.info-token",foreground:"6796E6"},{token:"token.warn-token",foreground:"CD9731"},{token:"token.error-token",foreground:"F44747"},{token:"token.debug-token",foreground:"B267E6"},{token:"variable.language",foreground:"FD971F"}],colors:{"dropdown.background":"#414339","list.activeSelectionBackground":"#75715E","list.inactiveSelectionBackground":"#414339","list.hoverBackground":"#3E3D32","list.dropBackground":"#414339","list.highlightForeground":"#F8F8F2","button.background":"#75715E","editor.background":"#272822","editor.foreground":"#F8F8F2","selection.background":"#878B9180","editor.selectionHighlightBackground":"#575B6180","editor.selectionBackground":"#878B9180","editor.wordHighlightBackground":"#4A4A7680","editor.wordHighlightStrongBackground":"#6A6A9680","editor.lineHighlightBackground":"#3E3D32","editorLineNumber.activeForeground":"#C2C2BF","editorCursor.foreground":"#F8F8F0","editorWhitespace.foreground":"#464741","editorIndentGuide.background":"#464741","widget.shadow":"#00000098","progressBar.background":"#75715E","badge.background":"#75715E","badge.foreground":"#F8F8F2","editorLineNumber.foreground":"#90908A","pickerGroup.foreground":"#75715E","input.background":"#414339","inputOption.activeBorder":"#75715E",focusBorder:"#99947C","editorWidget.background":"#1E1F1C","diffEditor.insertedTextBackground":"#4B661680","diffEditor.removedTextBackground":"#90274A70","inputValidation.errorBackground":"#90274A","inputValidation.errorBorder":"#F92672","inputValidation.warningBackground":"#848528","inputValidation.warningBorder":"#E2E22E","inputValidation.infoBackground":"#546190","inputValidation.infoBorder":"#819AFF","editorHoverWidget.background":"#414339","editorHoverWidget.border":"#75715E","editorSuggestWidget.background":"#272822","editorSuggestWidget.border":"#75715E","peekView.border":"#75715E","peekViewEditor.background":"#272822","peekViewResult.background":"#1E1F1C","peekViewTitle.background":"#1E1F1C","peekViewResult.selectionBackground":"#414339","peekViewResult.matchHighlightBackground":"#75715E","peekViewEditor.matchHighlightBackground":"#75715E"}}};function P(e,o){let r={...o};for(let t in e)typeof e[t]=="object"&&!Array.isArray(e[t])?o[t]&&typeof o[t]=="object"&&!Array.isArray(o[t])?r[t]=P(e[t],o[t]):r[t]={...e[t]}:r[t]=e[t];return r}var me=({filename:e,endpoint:o,framework:r,theme:t,completionSpeed:n,externalContext:d,...i})=>{let[a,g]=I.useState(null),s=I.useCallback((c,u)=>{g(u),t&&!W.includes(t)&&(u.editor.defineTheme(t,ae[t]),u.editor.setTheme(t)),i.onMount?.(c,u)},[i,t]);return de(e,o,r,i.language,n,d,a),I.createElement(ke,{...i,key:t,theme:t,onMount:s,options:P(i.options,G)})},Fe=me;export*from"@monaco-editor/react";export{ge as Copilot,Fe as Editor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monacopilot",
3
- "version": "0.8.16",
3
+ "version": "0.8.17",
4
4
  "description": "Extended Monaco Editor with AI auto-completion and new themes for React.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",