"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),S=require("react"),ie=require("@monaco-editor/react"),j=require("@ws-ui/shared"),je=require("monaco-languageclient"),ue=require("monaco-languageclient/vscode/services"),de=require("@codingame/monaco-vscode-configuration-service-override"),ke=require("@codingame/monaco-vscode-languages-service-override"),We=require("@codingame/monaco-vscode-textmate-service-override");require("@codingame/monaco-vscode-theme-defaults-default-extension");const Ee=require("@codingame/monaco-vscode-editor-service-override"),Ke=require("@codingame/monaco-vscode-theme-service-override"),Ze=require("@codingame/monaco-vscode-files-service-override"),te=require("vscode/vscode/vs/platform/files/common/files"),se=require("vscode/vscode/vs/base/common/event"),Te=require("monaco-languageclient/tools"),ae=require("vscode-languageclient"),N=require("monaco-editor"),oe=require("vscode-ws-jsonrpc"),D=require("vscode-languageserver-protocol"),le=require("vscode/services"),ne=require("vscode/monaco");require("@codingame/monaco-vscode-standalone-languages");require("@codingame/monaco-vscode-standalone-html-language-features");require("@codingame/monaco-vscode-standalone-css-language-features");require("@codingame/monaco-vscode-standalone-json-language-features");require("@codingame/monaco-vscode-standalone-typescript-language-features");require("@codingame/monaco-vscode-css-default-extension");require("@codingame/monaco-vscode-json-default-extension");require("@codingame/monaco-vscode-html-default-extension");require("@codingame/monaco-vscode-javascript-default-extension");const Xe=require("vscode/extensions");var X=typeof document<"u"?document.currentScript:null;function De(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const a=De(N),Be=()=>de(),Oe=()=>Ee(()=>Promise.resolve(void 0)),Me=()=>{const t=Ke(),e=t.themeService.ctor.prototype;return e.defineTheme=()=>{},t},Pe=`{
  "workbench.colorTheme": "Default Dark+",
  "workbench.iconTheme": "vs-seti",
  "editor.autoClosingBrackets": "languageDefined",
  "editor.autoClosingQuotes": "languageDefined",
  "editor.scrollBeyondLastLine": true,
  "editor.mouseWheelZoom": true,
  "editor.wordBasedSuggestions": false,
  "editor.acceptSuggestionOnEnter": "on",
  "editor.foldingHighlight": false,
  "editor.bracketPairColorization.enabled": false,
  "editor.fontSize": 12,
  "files.autoSave": "off",
  "editor.experimental.asyncTokenization": true,
  "editor.semanticHighlighting.enabled": true,
  "workbench.colorCustomizations": {
    "editor.background": "#313131"
  },
  "editor.semanticTokenColorCustomizations": {
    "[Default Light+]": {
      "enabled": true,
      "rules": {
        "*:4d": {
          "foreground": "#000000",
          "bold": false,
          "italic": false,
          "underline": false,
          "strikethrough": false
        },
        "method:4d": { "foreground": "#000088", "bold": true, "italic": true },
        "method.defaultLibrary:4d": {
          "foreground": "#068c00",
          "italic": false
        },
        "method.plugin:4d": { "foreground": "#000000" },
        "property:4d": { "foreground": "#a0806b" },
        "function:4d": { "foreground": "#5f8e5e", "italic": true },
        "parameter:4d": { "foreground": "#000b76", "bold": true },
        "variable.interprocess:4d": { "foreground": "#ff0088" },
        "variable.process:4d": { "foreground": "#0000ff" },
        "variable.local:4d": { "foreground": "#0031ff" },
        "keyword:4d": { "foreground": "#034d00", "bold": true },
        "table:4d": { "foreground": "#532300" },
        "field:4d": { "foreground": "#323232" },
        "comment:4d": { "foreground": "#535353" },
        "type:4d": { "foreground": "#068c00", "bold": true },
        "constant:4d": { "foreground": "#4d004d", "underline": true },
        "string:4d": { "foreground": "#000000" },
        "error:4d": { "foreground": "#ff0000", "bold": true, "italic": true }
      }
    },
    "[Default Dark+]": {
      "enabled": true,
      "rules": {
        "*:4d": {
          "foreground": "#FFFFFF",
          "bold": false,
          "italic": false,
          "underline": false,
          "strikethrough": false
        },
        "method:4d": { "foreground": "#1B79F3", "bold": true, "italic": true },
        "method.defaultLibrary:4d": {
          "foreground": "#59BB00",
          "italic": false
        },
        "method.plugin:4d": { "foreground": "#BFBFBF" },
        "property:4d": { "foreground": "#A0806B" },
        "function:4d": { "foreground": "#4EC36E", "italic": true },
        "parameter:4d": { "foreground": "#0C70FF", "bold": true },
        "variable.interprocess:4d": { "foreground": "#FF0088" },
        "variable.process:4d": { "foreground": "#53B0EB" },
        "variable.local:4d": { "foreground": "#18B3F1" },
        "keyword:4d": { "foreground": "#D0D0D0", "bold": true },
        "table:4d": { "foreground": "#CF5600" },
        "field:4d": { "foreground": "#9C6765" },
        "comment:4d": { "foreground": "#8F8F8F" },
        "type:4d": { "foreground": "#068C00", "bold": true },
        "constant:4d": { "foreground": "#FA647F", "underline": true },
        "string:4d": { "foreground": "#FFFFFF" },
        "error:4d": { "foreground": "#ff0000", "bold": true, "italic": true }
      }
    }
  }
}
`;class Ge{constructor(){this._onDidChangeCapabilities=new se.Emitter,this.onDidChangeCapabilities=this._onDidChangeCapabilities.event,this._onDidChangeFile=new se.Emitter,this.onDidChangeFile=this._onDidChangeFile.event,this.capabilities=te.FileSystemProviderCapabilities.FileReadWrite|te.FileSystemProviderCapabilities.FileOpenReadWriteClose,this.files=new Map}async stat(e){const n=this.files.get(e.fsPath),i=Date.now();return{type:te.FileType.File,ctime:0,mtime:i,size:n?n.byteLength:0}}async mkdir(e){}async readdir(e){return[]}async readFile(e){const i=e.toString().split("/"),o=i.length,[r,s]=i.slice(o-2),I=await j.getNodeInfo({verb:j.DesignerRequestVerb.GET_INFO,path:`${r}/${s}`,content:!0,as:"text"}),C=new TextEncoder().encode(I.content);return this.files.set(e.fsPath,C),C}async writeFile(e,n){const i=e.toString();this.files.set(i,n),this._onDidChangeFile.fire([{type:1,resource:e}])}async delete(e){const n=e.toString();this.files.delete(n)}async rename(e,n){const i=e.toString(),o=n.toString(),r=this.files.get(i);r&&(this.files.set(o,r),this.files.delete(i))}watch(e,n){return{dispose(){}}}}const Ie=()=>de.initUserConfiguration(Pe),Ce=async t=>{var o;const e=t.serviceConfig??{};e.debugLogging=((o=t.logger)==null?void 0:o.isEnabled())===!0&&(e.debugLogging===!0||t.logger.isDebugEnabled()===!0),await Ie(),e.userServices=e.userServices??{};const n=e.userServices.configurationService??void 0,i=e.workspaceConfig??void 0;if(n===void 0){if(i)throw new Error("You provided a workspaceConfig without using the configurationServiceOverride");const r={...Be(),...Me(),...We(),...ke(),...Oe()};ue.mergeServices(r,e.userServices)}return Ze.registerFileSystemOverlay(1,new Ge),e};class Je extends oe.WebSocketMessageReader{constructor(e,n){super(e),this.onMessage=n}readMessage(e){this.onMessage&&this.onMessage();const[,n]=e.split(`\r
\r
`);if(this.state==="initial")this.events.splice(0,0,{message:n});else if(this.state==="listening"){const i=JSON.parse(n);this.callback(i)}}}class Ve extends oe.WebSocketMessageWriter{constructor(e,n){super(e),this.onSend=n}async write(e){try{const n=JSON.stringify(e);this.socket.send(n),this.onSend&&this.onSend()}catch(n){this.errorCount++,this.fireError(n,e,this.errorCount)}}}function T(t,e=!0){const n=`/PACKAGE/Project/Sources/${t}`;return e?`file://${n}`:n}function re(t,e=0){setTimeout(t,e)}function me(t,e){const n=new N.Selection(e.startLineNumber,e.startColumn,e.endLineNumber||e.startLineNumber,e.endColumn||e.startColumn);re(()=>{t.setSelection(n),t.revealRangeInCenter(n),t.focus()})}function fe(t,e,n=0){n>0&&(e=n+e),re(()=>{t.setPosition({lineNumber:e,column:1}),t.revealLineInCenter(e),t.focus()})}function _e(t,e,n){const o=t.getModel();if(o&&e){const r=o.getLineCount();for(let s=1;s<=r;s++){const I=o.getLineContent(s);if(new RegExp(`(?:Function|function) ${n}`).test(I))return s}}return 0}const pe=t=>{const e=t==null?void 0:t.getLanguageId();return e&&["css","scss","less"].includes(e)},qe={provideCompletionItems:async(t,e)=>{const n=t.getWordUntilPosition(e);return{suggestions:[{label:"var",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["var ${1:var_name} : ${2:var_type}"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"While",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["While(${1:expression})","	${2:body}","End while"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"Case of",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["Case of","	:(${1:boolean_expression})","		${2:body}","End case"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"Else",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["Else","	"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"If",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["If (${1:expression})","	${5:body}","End if"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"For",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["For(${1:counter};${2:start};${3:end}${4:;increment})","	${5:body}","End for"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"Function",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["Function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}","	${5:body}"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet}]}}},Ye={provideCompletionItems:async(t,e)=>{const n=t.getWordUntilPosition(e);return{suggestions:[{label:"var",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["var ${1:var_name} : ${2:var_type}"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"while",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["while(${1:expression})","	${2:body}","end"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"switch",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["switch","	:(${1:boolean_expression})","		${2:body}","end"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"else",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["else","	"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"if",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["if (${1:expression})","	${5:body}","end"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"for",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["for(${1:counter},${2:start},${3:end}${4:,increment})","	${5:body}","end"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"function",kind:a.languages.CompletionItemKind.Snippet,range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}","	${5:body}"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet}]}}},He=[{keybinding:N.KeyMod.CtrlCmd|N.KeyCode.NumpadAdd,command:"editor.action.fontZoomIn"},{keybinding:N.KeyMod.CtrlCmd|N.KeyCode.Equal,command:"editor.action.fontZoomIn"},{keybinding:N.KeyMod.CtrlCmd|N.KeyCode.NumpadSubtract,command:"editor.action.fontZoomOut"},{keybinding:N.KeyMod.CtrlCmd|N.KeyCode.Minus,command:"editor.action.fontZoomOut"},{keybinding:N.KeyMod.CtrlCmd|N.KeyCode.Numpad0,command:"editor.action.fontZoomReset"},{keybinding:N.KeyMod.CtrlCmd|N.KeyCode.Digit0,command:"editor.action.fontZoomReset"},{keybinding:N.KeyMod.CtrlCmd|N.KeyCode.F12,command:"editor.action.revealDefinition"}],ze=({defaultZoom:t})=>(S.useEffect(()=>{t!==void 0&&N.editor.EditorZoom.setZoomLevel(t)},[]),null);ie.loader.config({monaco:a});var q=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(q||{}),Ae=(t=>(t[t.None=0]="None",t[t.DefaultForeground=1]="DefaultForeground",t[t.DefaultBackground=2]="DefaultBackground",t))(Ae||{}),be=(t=>(t[t.Other=0]="Other",t[t.Comment=1]="Comment",t[t.String=2]="String",t[t.RegEx=3]="RegEx",t))(be||{});class V{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let i="mtk"+this.getForeground(e);const o=this.getFontStyle(e);return o&1&&(i+=" mtki"),o&2&&(i+=" mtkb"),o&4&&(i+=" mtku"),o&8&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,n){const i=this.getForeground(e),o=this.getFontStyle(e);let r=`color: ${n[i]};`;o&1&&(r+="font-style: italic;"),o&2&&(r+="font-weight: bold;");let s="";return o&4&&(s+=" underline"),o&8&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){const n=this.getForeground(e),i=this.getFontStyle(e);return{foreground:n,italic:!!(i&1),bold:!!(i&2),underline:!!(i&4),strikethrough:!!(i&8)}}}function Ue(t,e,n,i){const o=n.tokens.data,r=t.getLanguageId();let s=0,I=0;const C=i.lineNumber-1,v=i.column-1;for(let f=0;f<o.length;f+=5){const A=o[f],p=o[f+1],k=o[f+2],L=o[f+3],y=o[f+4],R=s+A,h=A===0?I+p:p;if(C===R&&h<=v&&v<h+k){const c=n.legend.tokenTypes[L]||"not in legend (ignored)",W=[];let l=y;for(let J=0;l>0&&J<n.legend.tokenModifiers.length;J++)l&1&&W.push(n.legend.tokenModifiers[J]),l=l>>1;l>0&&W.push("not in legend (ignored)");const g=new N.Range(R+1,h+1,R+1,h+1+k),w={},E=e.getColorTheme().tokenColorMap,b=e.getColorTheme().getTokenStyleMetadata(c,W,r,!0,w);let Y;return b&&(Y={languageId:void 0,tokenType:be.Other,bold:b==null?void 0:b.bold,italic:b==null?void 0:b.italic,underline:b==null?void 0:b.underline,strikethrough:b==null?void 0:b.strikethrough,foreground:E[(b==null?void 0:b.foreground)||Ae.None],background:void 0}),{type:c,modifiers:W,range:g,metadata:Y,definitions:w}}s=R,I=h}return null}function $e(t,e,n){let i=null;for(let o=1;o<n;o++)i=e.tokenizeLine(t.getLineContent(o),i).ruleStack;return i}function Qe(t,e,n){const i=t.getColorTheme().tokenColorMap,o=V.getLanguageId(n),r=V.getTokenType(n),s=V.getFontStyle(n),I=V.getForeground(n),C=V.getBackground(n);return{languageId:e.languageIdCodec.decodeLanguageId(o),tokenType:r,bold:s&q.Bold?!0:void 0,italic:s&q.Italic?!0:void 0,underline:s&q.Underline?!0:void 0,strikethrough:s&q.Strikethrough?!0:void 0,foreground:i[I],background:i[C]}}function et(t,e,n){const i=n.lineNumber,o=t,r=o._tokenizationTextModelPart.grammarTokens._tokenizer.tokenizationSupport._actual._grammar,s=$e(t,r,i),I=r.tokenizeLine(t.getLineContent(i),s),C=r.tokenizeLine2(t.getLineContent(i),s);let v=0;for(let A=I.tokens.length-1;A>=0;A--){const p=I.tokens[A];if(n.column-1>=p.startIndex){v=A;break}}let f=0;for(let A=C.tokens.length>>>1;A>=0;A--)if(n.column-1>=C.tokens[A<<1]){f=A;break}return{token:I.tokens[v],metadata:Qe(e,o._languageService,C.tokens[(f<<1)+1])}}const he=S.createContext(void 0),tt=({children:t,url:e,qodly:n,defaultZoom:i,openHandler:o,language:r="4d",defaultInited:s=!1})=>{const I=ie.useMonaco(),[C,v]=S.useState(s),[f,A]=S.useState(null),p=S.useRef(),k=S.useRef(0);S.useEffect(()=>{e&&I&&L()},[e,I]);const L=async()=>{if(!I)return;const m=new Te.Logger({enabled:process.env.NODE_ENV==="development",debugEnabled:process.env.NODE_ENV==="development"}),u=await Ce({logger:m});await ue.initServices({caller:"Qodly Code Editor",logger:m,serviceConfig:u}),o&&le.StandaloneServices.get(le.ICodeEditorService).registerCodeEditorOpenHandler(o),I.languages.registerCompletionItemProvider(r,n?Ye:qe);const d=ne.KeybindingsRegistry.getDefaultKeybindings.bind(ne.KeybindingsRegistry);ne.KeybindingsRegistry.getDefaultKeybindings=()=>d().filter(Z=>!["workbench.action.files.saveAs","workbench.action.files.save"].includes(Z.command)),N.editor.addKeybindingRules(He),I.languages.registerFoldingRangeProvider(r,{provideFoldingRanges:function(F){const Z=[],B=/\\\s*$/;for(let K=1,G=F.getLineCount();K<=G;K++){const H=F.getLineContent(K);if(B.exec(H)){let M=K+1;for(;M<=G;){const ee=F.getLineContent(M);if(B.exec(ee)==null)break;M++}M>K&&(Z.push({start:K,end:M,kind:I.languages.FoldingRangeKind.Region}),K=M)}}return Z}}),y()},y=()=>{A(null);let m;try{m=new WebSocket(localStorage.LSP_SERVER||e)}catch{A(new Event("INVALID_URL"));return}m.onopen=R,m.onclose=h,m.onerror=c,k.current=0},R=async function(){const m=oe.toSocket(this),u=new Je(m),d=new Ve(m),F=new je.MonacoLanguageClient({name:"4D Language Client",clientOptions:{workspaceFolder:{uri:N.Uri.parse("file:///PACKAGE")},documentSelector:[{scheme:"file",language:r}],errorHandler:{error:()=>({action:ae.ErrorAction.Continue}),closed:()=>({action:ae.CloseAction.DoNotRestart})}},connectionProvider:{get:()=>Promise.resolve({reader:u,writer:d})}});p.current=F;const Z=F.sendRequest.bind(F);p.current.sendRequest=function(B,K,G){return typeof B=="object"&&B.method==="textDocument/diagnostic"&&/file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(K.textDocument.uri)?Promise.resolve():Z(B,K,G)},u.onClose(()=>{F.stop(),k.current<3?setTimeout(()=>{k.current++,y()},1e3):A(new Event("WEBSOCKET_CLOSED"))}),F.needsStart()&&await F.start(),v(!0)},h=()=>{},c=m=>{A(m)};S.useEffect(()=>{const m=j.lspSubject.subscribe(({action:u,payload:d})=>{switch(u){case j.LspActions.WILL_SAVE:E(d.filePath);break;case j.LspActions.DID_SAVE:O(d.filePath,d.content);break;case j.LspActions.WILL_CREATE:b(d.filePath);break;case j.LspActions.DID_CREATE:we(d.filePath);break;case j.LspActions.WILL_RENAME:Y(d.oldPath,d.newPath);break;case j.LspActions.DID_RENAME:Fe(d.oldPath,d.newPath);break;case j.LspActions.WILL_DELETE:J(d.filePath);break;case j.LspActions.DID_DELETE:Le(d.filePath);break;case j.LspActions.DIAGNOSTIC_REFRESH:w(d.filePath);break}});return()=>m.unsubscribe()},[]);const W=m=>{var u,d;return(d=(u=p.current)==null?void 0:u._features)==null?void 0:d.find(F=>{var Z;return((Z=F._registrationType)==null?void 0:Z.method)===m})},l=m=>{const u=[],d=W(m);if(d)for(const[,F]of d._registrations)F.provider&&u.push(F.provider);return u},g=async(m,u,d)=>{var Z,B,K;const F=l(D.SemanticTokensRegistrationType.method);if(F[0]){const G=new N.CancellationTokenSource,H=await Promise.resolve(F[0].full.provideDocumentSemanticTokens(u,G.token)),Q=m,M=H?Ue(u,Q._themeService,{tokens:H,legend:(K=(B=(Z=p.current)==null?void 0:Z._capabilities)==null?void 0:B.semanticTokensProvider)==null?void 0:K.legend},d):null,ee=et(u,Q._themeService,d);return{semanticTokenInfo:M,textmateTokenInfo:ee}}return null},w=m=>{if(p.current){const u=l(D.DocumentDiagnosticRequest.method);for(const d of u)d.onDidChangeDiagnosticsEmitter.fire()}},E=(m,u=D.TextDocumentSaveReason.Manual)=>{var d;(d=p.current)==null||d.sendNotification(D.WillSaveTextDocumentNotification.type,{textDocument:{uri:T(m)},reason:u})},O=(m,u)=>{var d;(d=p.current)==null||d.sendNotification(D.DidSaveTextDocumentNotification.type,{textDocument:{uri:T(m)},text:u})},b=m=>{var u;(u=p.current)==null||u.sendRequest(D.WillCreateFilesRequest.type,{files:[{uri:T(m)}]})},Y=(m,u)=>{var d;(d=p.current)==null||d.sendRequest(D.WillRenameFilesRequest.type,{files:[{oldUri:T(m),newUri:T(u)}]})},J=m=>{var u;(u=p.current)==null||u.sendRequest(D.WillDeleteFilesRequest.type,{files:[{uri:T(m)}]})},we=m=>{var u;(u=p.current)==null||u.sendNotification(D.DidCreateFilesNotification.type,{files:[{uri:T(m)}]})},Fe=(m,u)=>{var d;(d=p.current)==null||d.sendNotification(D.DidRenameFilesNotification.type,{files:[{oldUri:T(m),newUri:T(u)}]})},Le=m=>{var u;(u=p.current)==null||u.sendNotification(D.DidDeleteFilesNotification.type,{files:[{uri:T(m)}]})};return x.jsxs(he.Provider,{value:{inited:C||!!f,clientRef:p,lastError:f,reload:y,getTokenAtPosition:g},children:[t,x.jsx(ze,{defaultZoom:i})]})};function nt(){const t=S.useContext(he);if(t===void 0)throw new Error("useLSP must be used within an LSPContext");return t}const ve=S.createContext(void 0),it=S.memo(({children:t})=>{const[e,n]=S.useState(null);return x.jsx(ve.Provider,{value:{editor:e,setEditor:n},children:t})});function Se(){const t=S.useContext(ve),e=S.useState(null);if(t===void 0){const[n,i]=e;return{editor:n,setEditor:i}}return t}const ot={provideCompletionItems:(t,e)=>{const n=t.getWordUntilPosition(e);return{suggestions:[{label:"device:xs",kind:a.languages.CompletionItemKind.Snippet,documentation:"Media query for phone device",range:new a.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),insertText:["@media screen and (max-width: ${1:365px}) {","  self {","    ${2:background-color}:${3:red};","  }","}"].join(`
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet}]}}},rt="#/definitions/Condition",st={Base:{type:"object",properties:{id:{type:"string"},name:{type:"string"}},required:["id"]},Condition:{oneOf:[{$ref:"#/definitions/Datasource"},{$ref:"#/definitions/Privilege"},{$ref:"#/definitions/Combination"},{$ref:"#/definitions/CurrentState"},{$ref:"#/definitions/ParentState"},{$ref:"#/definitions/Reference"}]},Datasource:{allOf:[{$ref:"#/definitions/Base"}],properties:{type:{const:"datasource"},path:{type:"string"},value:{type:["number","string","boolean","object","array","null"]},valueType:{enum:["datasource","hardCoded"]},dataType:{enum:["string","number","date","boolean","array","object"]},op:{enum:["eq","neq","regex","in","nin","gt","gte","lt","lte"]}},required:["name","type","path","value","op"]},Privilege:{allOf:[{$ref:"#/definitions/Base"}],properties:{type:{const:"privilege"},value:{type:"string"},valueType:{enum:["datasource","hardCoded"]},op:{enum:["eq","neq","regex"]}},required:["name","type","value","op"]},Combination:{allOf:[{$ref:"#/definitions/Base"}],properties:{type:{const:"combination"},op:{enum:["and","or"]},conditions:{type:"array",items:{$ref:"#/definitions/Condition"}}},required:["type","conditions","op"]},CurrentState:{allOf:[{$ref:"#/definitions/Base"}],properties:{type:{const:"currentState"},value:{type:"string"},valueType:{enum:["datasource","hardCoded"]},dataType:{enum:["string","number","date","boolean","array","object"]},op:{enum:["eq","neq","regex"]}},required:["name","type","value","op"]},ParentState:{allOf:[{$ref:"#/definitions/Base"}],properties:{type:{const:"parentState"},value:{type:"string"},valueType:{enum:["datasource","hardCoded"]},dataType:{enum:["string","number","date","boolean","array","object"]},op:{enum:["eq","neq","regex"]}},required:["name","type","value","op"]},Reference:{allOf:[{$ref:"#/definitions/Base"}],properties:{type:{const:"reference"},ref:{type:"string"}},required:["type","ref"]}},at={$ref:rt,definitions:st},lt="array",ct={type:"object",properties:{class:{type:"string"},method:{type:"string"},regexPattern:{type:"string"},verbs:{type:"string"}}},gt={type:lt,items:ct};function ut(t,e){const n=document.createElement("style");n.dataset.id=e,n.textContent=t,document.head.append(n)}function dt(t){return Array.from(document.styleSheets).find(e=>e.ownerNode.getAttribute("data-id")===t)}function It(t,e){const n=[];let i=[];const o=[],r=(l,g,w,E)=>{n.push({startLineNumber:l,endLineNumber:w,startColumn:g,endColumn:E}),v(),C()},s=l=>{o.indexOf(l)<0&&o.push(l)},I=l=>{const g=o.indexOf(l);g<0||o.splice(g,1)},C=()=>{for(const l of o)try{l(i)}catch(g){console.error(g)}},v=()=>{const l=t.getModel();l&&(i=mt(n.map(g=>[l.getOffsetAt({lineNumber:g.startLineNumber,column:g.startColumn}),l.getOffsetAt({lineNumber:g.endLineNumber,column:g.endColumn})]),!0),i.length>0&&(i[0][0]<=0&&(i[0][0]=Number.NEGATIVE_INFINITY),i[i.length-1][1]>=l.getValueLength()&&(i[i.length-1][1]=Number.POSITIVE_INFINITY)))},f=l=>{const g={isDeletion:!1,isAddition:!1,isReplacement:!1};return l.text===""?g.isDeletion=!0:l.range.startLineNumber===l.range.endLineNumber&&l.range.startColumn===l.range.endColumn?g.isAddition=!0:g.isReplacement=!0,g},A=t.onDidChangeModel(l=>{v(),c()}),p=t.onDidChangeModelContent(l=>{if(!l.isUndoing)for(const g of l.changes){const w=f(g);if(w.isReplacement||w.isDeletion||w.isAddition){const E=n.some(b=>g.range.startLineNumber>=b.startLineNumber&&g.range.endLineNumber<=b.endLineNumber&&g.range.startColumn>=b.startColumn&&g.range.endColumn<=b.endColumn),O=!E&&e&&g.range.startLineNumber===1&&g.range.startColumn===1&&!j.hasAttributesString(g.text);if(E||O){const b=t.getModel();if(b){b.undo();return}}}}}),k=()=>{A.dispose(),p.dispose()};let L=[],y=`
    .idoc-readonly-mark {
      cursor: not-allowed;
      z-index: 1;
    }
  `;if(y){const l="monaco-read-only";dt(l)||ut(y,l),y=null}const R=()=>{s(c),c()},h=()=>{I(c),L=t.deltaDecorations(L,[])},c=()=>{const l=t.getModel();l&&(L=t.deltaDecorations(L,i.map(W(l))))},W=l=>g=>{const w=l.getPositionAt(g[0]),E=l.getPositionAt(g[1]);return{range:new a.Range(w.lineNumber,w.column,E.lineNumber,E.column),options:{className:"idoc-readonly-mark"}}};return{get buffer(){return i},exclude:r,attach:s,detach:I,dispose:k,show:R,hide:h}}function Ct(t,e,n){let i=!1;const o=h=>h[1]<h[0]?(i=!0,[[h[1],h[0]]]):[[...h]],r=h=>i?h.map(c=>c[1]>c[0]?I(c):c).reverse():h;let s;const I=h=>(s=h[1],h[1]=h[0],h[0]=s,h),C=o(t);let v,f,A,p,k,L,y,R;A=C[0];for(f of e)for(y=f[0],R=f[1],p=0;p<C.length;p++){if(A=C[p],k=A[0],L=A[1],k<y)L<y?v=[A]:L<=R?v=[[k,y-1]]:v=[[k,y-1],[R+1,L]];else if(k<=R)if(y===Number.NEGATIVE_INFINITY){const h=R+1;v=n===0?[]:[[h,L>h?L:h]]}else R===Number.POSITIVE_INFINITY?v=n===0?[]:[[y-1,y-1]]:L<=R?v=n<0?[[y-1,y-1]]:n>0?[[R+1,R+1]]:[]:v=[[R+1,L]];else v=[A];if(C.splice(p,1,...v),C.length===1&&C[0][1]<y)return r(C)}return r(C)}function mt(t,e){if(t.length<2)return t;const n=[];let i=null,o,r;t=t.map(s=>(s[1]<s[0]&&(o=s[1],s[1]=s[0],s[1]=o),s)).sort((s,I)=>s[0]-I[0]),n.push(t[0]);for(let s=1;s<t.length;s++)i=n[n.length-1],r=t[s],i[1]===r[0]&&!e||(i[1]===r[0]-1&&e?(i[1]=r[1],n.splice(n.length-1,1,i)):i[1]<r[0]?n.push(r):i[1]<r[1]&&(i[1]=r[1],n.splice(n.length-1,1,i)));return n}function _(t,e){return e.bind(t)}class ft{constructor(e,n){var i;this.disposables=[],this.prefer=1,this.lastPrefer=1,this.onCursor=_(this,function(o){if(o.source==="api")return;const r=this.getApprovedSelections();r.length!==0&&this.editor.setSelections(r)}),this.onRectangleSelectionStart=_(this,function({event:o}){o.middleButton&&(this.lastPrefer=this.prefer,this.prefer=0,window.addEventListener("pointerup",this.onRectangleSelectionStop))}),this.onRectangleSelectionStop=_(this,function(){this.prefer=this.lastPrefer,window.removeEventListener("pointerup",this.onRectangleSelectionStop)}),this.onKey=_(this,function(o){const r=o.keyCode,s=a.KeyCode;if(o.altKey||s.F1<=r&&r<=s.F19||o.ctrlKey&&r!==s.Backspace)return;if(r===s.UpArrow||r===s.LeftArrow||r===s.Home||r===s.PageUp){this.prefer=-1;return}if(r===s.DownArrow||r===s.RightArrow||r===s.End||r===s.PageDown){this.prefer=1;return}const I=this.getSelections(),C=this.intervals.buffer;let v;if(r===s.Delete)v=f=>f[0]===f[1]&&C.find(A=>f[1]+1===A[0])!=null;else if(r===s.Backspace)v=f=>f[0]===f[1]&&C.find(A=>A[1]+1===f[0])!=null;else return;I.findIndex(v)!==-1&&(o.stopPropagation(),o.preventDefault())}),this.getOffsetAt=_(this,function(o){let r;for(let s=0;s<this.intervals.buffer.length;s++)if(r=this.intervals.buffer[s],o<=r[1])return r[0]-o<o-r[1]?r[0]:r[1]}),this.editor=e,this.intervals=It(e,n),(i=this.editor.getModel())==null||i.setEOL(a.editor.EndOfLineSequence.LF)}enable(){this.disposables.push(this.editor.onDidChangeCursorPosition(this.onCursor),this.editor.onKeyDown(this.onKey),this.editor.onMouseDown(this.onRectangleSelectionStart)),this.intervals.show()}dispose(){for(const e of this.disposables)e.dispose();this.disposables.splice(0)}exclude(e,n,i,o){arguments.length===1?this.intervals.exclude(e,0,e,Number.MAX_SAFE_INTEGER):this.intervals.exclude(e,n,i,o)}getApprovedSelections(){const e=this.editor.getModel();return this.getSelections().map(i=>Ct(i,this.intervals.buffer,this.prefer)).flat().map(i=>{const o=e.getPositionAt(i[0]),r=e.getPositionAt(i[1]);return new a.Selection(o.lineNumber,o.column,r.lineNumber,r.column)})}getSelections(){const e=this.editor.getModel();return(this.editor.getSelections()||[]).map(n=>[e.getOffsetAt({lineNumber:n.selectionStartLineNumber,column:n.selectionStartColumn}),e.getOffsetAt({lineNumber:n.positionLineNumber,column:n.positionColumn})])}}const pt={provideDocumentFormattingEdits(t,e){const n=t.getValue();try{const i=At(n,e.tabSize,e.insertSpaces);return[{range:t.getFullModelRange(),text:i}]}catch{return[]}}};function At(t,e=2,n=!0){const i=n?" ".repeat(e):"	";let o=t.replace(/\s+/g," ").trim();return o=o.replace(/\{/g,` {
`+i).replace(/\}/g,`
}
`).replace(/;/g,`;
`+i).replace(/,/g,`,
`+i),o=o.replace(/\s*\{\s*/g,` {
`+i).replace(/\s*\}\s*/g,`
}
`).replace(/\s*;\s*/g,`;
`+i).replace(/\s*:\s*/g,": "),o=o.split(`
`).map(r=>r.trim()==="}"?"}":r.trimEnd()).filter((r,s,I)=>!(r===""&&I[s+1]==="")).join(`
`).trim(),o}const bt={provideDocumentFormattingEdits(t,e){const n=t.getValue();try{const i=ht(n,e.tabSize);return[{range:t.getFullModelRange(),text:i}]}catch{return[]}}};function ht(t,e=2){const n=JSON.parse(t);return JSON.stringify(n,null,e)}const vt=new RegExp("^[	s]+(exposed|Function)","i"),ye=({lineNumber:t,editor:e,type:n,source:i})=>{var v;const o=n===j.FileFolderType.METHOD||n===j.FileFolderType.DEBUGGER&&((v=i==null?void 0:i.codeDescriptorInfo)==null?void 0:v.type)===j.SourceCodeDescriptor.METHOD;if(t===1)return o?"":"1";const r=e==null?void 0:e.getModel(),s=(r==null?void 0:r.getLinesContent())||[],I=Array(s.length).fill("-");let C=o?0:1;for(let f=1;f<s.length;f++)(f===1?"":s[f-1]).endsWith("\\")||(C+=1,I[f]=C.toString());return I[t-1]},ce=()=>x.jsx("div",{className:"absolute inset-0 animate-pulse",children:x.jsx("div",{className:"w-full space-y-4 px-4 py-1",children:x.jsxs("div",{className:"space-y-2",children:[x.jsx("div",{className:"h-3 w-3/4 rounded bg-grey-200"}),x.jsx("div",{className:"h-3 rounded bg-grey-200"}),x.jsx("div",{className:"h-3 w-5/6 rounded bg-grey-200"}),x.jsx("div",{className:"h-3 rounded bg-grey-200"}),x.jsx("div",{className:"h-3 rounded bg-grey-200"})]})})}),U=["fd-dark"],z={css:[],json:[]},St=({path:t,initialValue:e,type:n,language:i,onChange:o,options:r={},extra:s={},lspProps:I,theme:C=U[0],...v})=>{const{initialLineInfo:f,initialSelectionInfo:A}=s,{editor:p,setEditor:k}=Se(),{inited:L}=I;function y(c){i==="css"&&c.languages.css&&(c.languages.registerCompletionItemProvider("css",ot),c.languages.css.cssDefaults.setModeConfiguration({...c.languages.css.cssDefaults.modeConfiguration,documentFormattingEdits:!1,documentRangeFormattingEdits:!1}),z.css.forEach(W=>W.dispose()),z.css.push(c.languages.registerDocumentFormattingEditProvider("css",pt))),i==="json"&&c.languages.json&&(c.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[{uri:"condition-schema.json",fileMatch:["*.condition.json"],schema:at},{uri:"handlers-schema.json",fileMatch:[j.HTTP_HANDLERS_TAB_PATH],schema:gt}]}),c.languages.json.jsonDefaults.setModeConfiguration({...c.languages.json.jsonDefaults.modeConfiguration,documentFormattingEdits:!1,documentRangeFormattingEdits:!1}),z.json.forEach(W=>W.dispose()),z.json.push(c.languages.registerDocumentFormattingEditProvider("json",bt)))}function R(c,W){k(c);const l=c.getModel();if(l&&(l.updateOptions({insertSpaces:!1}),c.onKeyUp(()=>{var w;const g=(w=c.getPosition())==null?void 0:w.lineNumber;if(g){const E=l.getLineFirstNonWhitespaceColumn(g),O=l.getLineLength(g),b=l.getLineContent(g);vt.test(b)&&c.executeEdits("edit-handler",[{range:new W.Range(g,0,g,O),text:b.substr(E-1,O-E)}])}})),pe(l)){const g=["editor.action.revealDefinition","editor.action.goToReferences","submenuitem.EditorContextPeek"],w=c.getContribution("editor.contrib.contextmenu"),E=w._getMenuActions;w._getMenuActions=function(){return E.apply(w,arguments).filter(function(b){return!g.includes(b.id)})}}if(n===j.FileFolderType.METHOD&&j.hasAttributesString(e)){const g=new ft(c,!0);g.exclude(1,1,1,Number.POSITIVE_INFINITY),g.enable()}}S.useEffect(()=>{if(!p)return;const{line:c,offset:W}=f||{};c&&fe(p,c,W)},[f,p]),S.useEffect(()=>{if(!p)return;const{selection:c}=A||{};c&&me(p,c)},[A,p]);const h=c=>U.includes(c)?c:U[0];return L?x.jsx(ie.Editor,{options:{readOnly:!0,fontSize:12,"semanticHighlighting.enabled":!0,padding:{top:10},lineNumbers:i==="4d"?c=>ye({lineNumber:c,editor:p,type:n,source:s==null?void 0:s.source}):void 0,scrollBeyondLastLine:!1,...r},path:T(t),value:e,theme:h(C),onChange:c=>o&&o(c||""),language:i,beforeMount:y,onMount:R,loading:x.jsx(ce,{}),...v}):x.jsx("div",{className:"relative flex-1 w-full",children:x.jsx(ce,{})})};var xe={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ge=S.createContext&&S.createContext(xe),P=function(){return P=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},P.apply(this,arguments)},yt=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n};function Re(t){return t&&t.map(function(e,n){return S.createElement(e.tag,P({key:n},e.attr),Re(e.child))})}function Ne(t){return function(e){return S.createElement(xt,P({attr:P({},t.attr)},e),Re(t.child))}}function xt(t){var e=function(n){var i=t.attr,o=t.size,r=t.title,s=yt(t,["attr","size","title"]),I=o||n.size||"1em",C;return n.className&&(C=n.className),t.className&&(C=(C?C+" ":"")+t.className),S.createElement("svg",P({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,s,{className:C,style:P(P({color:t.color||n.color},n.style),t.style),height:I,width:I,xmlns:"http://www.w3.org/2000/svg"}),r&&S.createElement("title",null,r),t.children)};return ge!==void 0?S.createElement(ge.Consumer,null,function(n){return e(n)}):e(xe)}function Rt(t){return Ne({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}}]})(t)}function Nt(t){return Ne({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z"}}]})(t)}const wt=({lspProps:{lastError:t,reload:e}})=>{const[n,i]=S.useState(!1),o=()=>{e()},r=()=>{i(!1)};return S.useEffect(()=>{i(!!t)},[t]),n?x.jsxs("div",{className:"flex items-center border-b border-fd-gray-darker bg-grey-800 px-2 py-1.5 text-xs text-grey-50",children:[x.jsxs("span",{className:"flex flex-1 justify-center gap-1",children:[x.jsx(Nt,{className:"h-4 w-4 text-yellow-600"}),x.jsxs("span",{children:["LSP not loaded."," ",x.jsx("button",{className:"text-primary-dark underline",onClick:o,children:"Reload?"})]})]}),x.jsx("button",{className:"focus:outline-none",children:x.jsx(Rt,{className:"h-4 w-4 text-white",onClick:r})})]}):null},Ft={name:"4d",displayName:"%displayName%",description:"%description%",version:"1.0.0",publisher:"vscode",engines:{vscode:"0.10.x"},categories:["Programming Languages"],contributes:{languages:[{id:"4d",aliases:["4D","4d"],extensions:[".4dm",".4qs"],configuration:"./language-configuration.json"}],grammars:[{language:"4d",scopeName:"source.4dm",path:"./syntaxes/4d.tmLanguage.json"}]}},{registerFileUrl:$,whenReady:jt}=Xe.registerExtension(Ft,void 0,{system:!0});$("./syntaxes/4d.tmLanguage.json",new URL("data:application/json;base64,ewogICJuYW1lIjogIjREIiwKICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICJwYXR0ZXJucyI6IFsKICAgIHsKICAgICAgImluY2x1ZGUiOiAiI3N0YXRlbWVudHMiCiAgICB9CiAgXSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJzdGF0ZW1lbnRzIjogewogICAgICAicGF0dGVybnMiOiBbCiAgICAgICAgewogICAgICAgICAgImluY2x1ZGUiOiAiI2NvbW1lbnQiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbW1lbnQiOiB7CiAgICAgICJwYXR0ZXJucyI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJjb21tZW50LmJsb2NrLjRkIiwKICAgICAgICAgICJiZWdpbiI6ICIoL1xcKikoPzpcXHMqKChAKWludGVybmFsKSg/PVxcc3woXFwqLykpKT8iLAogICAgICAgICAgImJlZ2luQ2FwdHVyZXMiOiB7CiAgICAgICAgICAgICIxIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlZmluaXRpb24uY29tbWVudC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAic3RvcmFnZS50eXBlLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICIzIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlY29yYXRvci5pbnRlcm5hbGRlY2xhcmF0aW9uLjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImVuZCI6ICJcXCovIiwKICAgICAgICAgICJlbmRDYXB0dXJlcyI6IHsKICAgICAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiYmVnaW4iOiAiKF5bIFxcdF0rKT8oKC8vKSg/OlxccyooKEApaW50ZXJuYWwpKD89XFxzfCQpKT8pIiwKICAgICAgICAgICJiZWdpbkNhcHR1cmVzIjogewogICAgICAgICAgICAiMSI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJwdW5jdHVhdGlvbi53aGl0ZXNwYWNlLmNvbW1lbnQubGVhZGluZy40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAiY29tbWVudC5saW5lLmRvdWJsZS1zbGFzaC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjMiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiNCI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJzdG9yYWdlLnR5cGUuaW50ZXJuYWxkZWNsYXJhdGlvbi40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjUiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVjb3JhdG9yLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAiZW5kIjogIig/PSQpIiwKICAgICAgICAgICJjb250ZW50TmFtZSI6ICJjb21tZW50LmxpbmUuZG91YmxlLXNsYXNoLjRkIgogICAgICAgIH0KICAgICAgXQogICAgfQogIH0KfQo=",typeof document>"u"?require("url").pathToFileURL(__filename).href:X&&X.tagName.toUpperCase()==="SCRIPT"&&X.src||new URL("index.cjs.js",document.baseURI).href).toString(),{mimeType:"application/json",size:1592});$("./language-configuration.json",new URL("data:application/json;base64,ewogICJjb21tZW50cyI6IHsKICAgICJsaW5lQ29tbWVudCI6ICIvLyIsCiAgICAiYmxvY2tDb21tZW50IjogWyIvKioiLCAiKiovIl0KICB9LAogIC8vIHN5bWJvbHMgdXNlZCBhcyBicmFja2V0cwogICJicmFja2V0cyI6IFsKICAgIFsieyIsICJ9Il0sCiAgICBbIigiLCAiKSJdLAogICAgWyJbIiwgIl0iXQogIF0sCiAgLy8gc3ltYm9scyB0aGF0IGFyZSBhdXRvIGNsb3NlZCB3aGVuIHR5cGluZwogIC8vIHN5bWJvbHMgdGhhdCB0aGF0IGNhbiBiZSB1c2VkIHRvIHN1cnJvdW5kIGEgc2VsZWN0aW9uCiAgInN1cnJvdW5kaW5nUGFpcnMiOiBbCiAgICBbInsiLCAifSJdLAogICAgWyJbIiwgIl0iXSwKICAgIFsiKCIsICIpIl0sCiAgICBbIlwiIiwgIlwiIl0sCiAgICBbIiciLCAiJyJdCiAgXSwKICAiYXV0b0Nsb3NpbmdQYWlycyI6IFsKICAgIHsKICAgICAgIm9wZW4iOiAiKCIsCiAgICAgICJjbG9zZSI6ICIpIgogICAgfSwKICAgIHsgIm9wZW4iOiAieyIsICJjbG9zZSI6ICJ9IiB9LAogICAgeyAib3BlbiI6ICJbIiwgImNsb3NlIjogIl0iIH0sCiAgICB7ICJvcGVuIjogIiciLCAiY2xvc2UiOiAiJyIsICJub3RJbiI6IFsic3RyaW5nIiwgImNvbW1lbnQiXSB9LAogICAgeyAib3BlbiI6ICJcIiIsICJjbG9zZSI6ICJcIiIsICJub3RJbiI6IFsic3RyaW5nIl0gfSwKICAgIHsgIm9wZW4iOiAiYCIsICJjbG9zZSI6ICJgIiwgIm5vdEluIjogWyJzdHJpbmciLCAiY29tbWVudCJdIH0sCiAgICB7ICJvcGVuIjogIi8qKiIsICJjbG9zZSI6ICIgKiovIiwgIm5vdEluIjogWyJzdHJpbmciXSB9CiAgXSwKICAiYXV0b0Nsb3NlQmVmb3JlIjogIjs6Liw9fV0pPmAgXG5cdCIsCiAgIndvcmRQYXR0ZXJuIjogIigtP1xcZCpcXC5cXGRcXHcqKXwoW15cXGBcXH5cXCFcXEBcXCNcXCVcXF5cXCZcXCpcXChcXClcXC1cXD1cXCtcXFtcXHtcXF1cXH1cXFxcXFx8XFw7XFw6XFwnXFxcIlxcLFxcLlxcPFxcPlxcL1xcP1xcclxcblxcdFxcZlxcdiBdKyl8KD88PVthLXpBLVpdKSA/KD89W2EtekEtWl0pIiwKICAiaW5kZW50YXRpb25SdWxlcyI6IHsKICAgICJpbmNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGNsYXNzIGNvbnN0cnVjdG9yKSl8KF4oPyFbXlxcc10pKlxccyooZXhwb3NlZHxsb2NhbHxcXHMqKXsxfVxccypmdW5jdGlvbnsxfVxccypcXHcpfCheKD8hW15cXHNdKSpcXHMqKElmfEVsc2V8Rm9yfEZvciBlYWNofFdoaWxlfEJlZ2luIFNRTHxDYXNlIG9mfFVzZXxSZXBlYXR8OiAqXFwoLiopKS4qJCIsCiAgICAgICJmbGFncyI6ICJpIgogICAgfSwKICAgICJkZWNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGV4cG9zZWR8bG9jYWx8XFxzKil7MX1cXHMqZnVuY3Rpb257MX1cXHMqXFx3KXwoRW5kIElmfEVuZCBGb3J8RWxzZXxFbmQgZm9yIGVhY2h8RW5kIFdoaWxlfEVuZCBTUUx8RW5kIGNhc2V8RW5kIHVzZXxVbnRpbHw6ICpcXCguKikuKiQiLAogICAgICAiZmxhZ3MiOiAiaSIKICAgIH0KICB9LAogICJvbkVudGVyUnVsZXMiOiBbCiAgICB7CiAgICAgICJiZWZvcmVUZXh0IjogewogICAgICAgICJwYXR0ZXJuIjogIl5leHBvc2VkIiwKICAgICAgICAiZmxhZ3MiOiAiaSIKICAgICAgfSwKICAgICAgImFjdGlvbiI6IHsgImluZGVudCI6ICJpbmRlbnQiLCAiaW5kZW50QWN0aW9uIjogMSB9CiAgICB9CiAgXQp9Cg==",typeof document>"u"?require("url").pathToFileURL(__filename).href:X&&X.tagName.toUpperCase()==="SCRIPT"&&X.src||new URL("index.cjs.js",document.baseURI).href).toString(),{mimeType:"application/json",size:1723});$("package.json",new URL("data:application/json;base64,ewogICJuYW1lIjogIjRkIiwKICAiZGlzcGxheU5hbWUiOiAiJWRpc3BsYXlOYW1lJSIsCiAgImRlc2NyaXB0aW9uIjogIiVkZXNjcmlwdGlvbiUiLAogICJ2ZXJzaW9uIjogIjEuMC4wIiwKICAicHVibGlzaGVyIjogInZzY29kZSIsCiAgImxpY2Vuc2UiOiAiTUlUIiwKICAiZW5naW5lcyI6IHsKICAgICJ2c2NvZGUiOiAiMC4xMC54IgogIH0sCiAgInNjcmlwdHMiOiB7CiAgICAidXBkYXRlLWdyYW1tYXIiOiAibm9kZSAuLi9ub2RlX21vZHVsZXMvdnNjb2RlLWdyYW1tYXItdXBkYXRlci9iaW4gbWljcm9zb2Z0L3ZzY29kZS00ZCBncmFtbWFycy80ZC5jc29uIC4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogIH0sCiAgImNhdGVnb3JpZXMiOiBbCiAgICAiUHJvZ3JhbW1pbmcgTGFuZ3VhZ2VzIgogIF0sCiAgImNvbnRyaWJ1dGVzIjogewogICAgImxhbmd1YWdlcyI6IFsKICAgICAgewogICAgICAgICJpZCI6ICI0ZCIsCiAgICAgICAgImFsaWFzZXMiOiBbCiAgICAgICAgICAiNEQiLAogICAgICAgICAgIjRkIgogICAgICAgIF0sCiAgICAgICAgImV4dGVuc2lvbnMiOiBbCiAgICAgICAgICAiLjRkbSIsCiAgICAgICAgICAiLjRxcyIKICAgICAgICBdLAogICAgICAgICJjb25maWd1cmF0aW9uIjogIi4vbGFuZ3VhZ2UtY29uZmlndXJhdGlvbi5qc29uIgogICAgICB9CiAgICBdLAogICAgImdyYW1tYXJzIjogWwogICAgICB7CiAgICAgICAgImxhbmd1YWdlIjogIjRkIiwKICAgICAgICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICAgICAgICJwYXRoIjogIi4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogICAgICB9CiAgICBdCiAgfSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJ0eXBlIjogImdpdCIsCiAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9taWNyb3NvZnQvdnNjb2RlLmdpdCIKICB9Cn0K",typeof document>"u"?require("url").pathToFileURL(__filename).href:X&&X.tagName.toUpperCase()==="SCRIPT"&&X.src||new URL("index.cjs.js",document.baseURI).href).toString(),{mimeType:"application/json",size:1006});$("package.nls.json",new URL("data:application/json;base64,ewogICJkaXNwbGF5TmFtZSI6ICI0RCBMYW5ndWFnZSBCYXNpY3MiLAogICJkZXNjcmlwdGlvbiI6ICJQcm92aWRlcyBzeW50YXggaGlnaGxpZ2h0aW5nIGFuZCBicmFja2V0IG1hdGNoaW5nIGZvciA0RE0gYW5kIDRRUyBmaWxlcy4iCn0K",typeof document>"u"?require("url").pathToFileURL(__filename).href:X&&X.tagName.toUpperCase()==="SCRIPT"&&X.src||new URL("index.cjs.js",document.baseURI).href).toString(),{mimeType:"application/json",size:135});exports.Alerts=wt;exports.CodeEditor=St;exports.CodeEditorProvider=it;exports.FdLineNumbers=ye;exports.LSPProvider=tt;exports.SUPPORTED_THEMES=U;exports._await=re;exports.configureServices=Ce;exports.getFileSystemPath=T;exports.getFunctionOffset=_e;exports.initMonacoUserConfiguration=Ie;exports.isCssModel=pe;exports.jumpToLine=fe;exports.jumpToSelection=me;exports.useCodeEditor=Se;exports.useLSP=nt;
//# sourceMappingURL=index.cjs.js.map
