var ae = Object.defineProperty;
var ge = (t, e, n) => e in t ? ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var x = (t, e, n) => (ge(t, typeof e != "symbol" ? e + "" : e, n), n);
import { jsxs as O, jsx as S, Fragment as ce } from "react/jsx-runtime";
import K, { useEffect as J, createContext as z, useState as D, useRef as P, useContext as U, memo as Ie } from "react";
import { loader as de, useMonaco as ue, Editor as Ce } from "@monaco-editor/react";
import { lspSubject as me, LspActions as Z, hasAttributesString as _, FileFolderType as fe } from "@ws-ui/shared";
import { MonacoLanguageClient as Ae } from "monaco-languageclient";
import { mergeServices as pe, initServices as be } from "monaco-languageclient/vscode/services";
import he, { initUserConfiguration as ve } from "@codingame/monaco-vscode-configuration-service-override";
import Se from "@codingame/monaco-vscode-theme-service-override";
import ye from "@codingame/monaco-vscode-textmate-service-override";
import Ne from "@codingame/monaco-vscode-languages-service-override";
import we from "@codingame/monaco-vscode-editor-service-override";
import "@codingame/monaco-vscode-theme-defaults-default-extension";
import * as o from "monaco-editor";
import { Selection as xe, KeyMod as B, KeyCode as G, editor as q, Uri as Re } from "monaco-editor";
import { Logger as We } from "monaco-languageclient/tools";
import { ErrorAction as Le, CloseAction as Fe } from "vscode-languageclient";
import { WebSocketMessageReader as Ze, WebSocketMessageWriter as je, toSocket as Xe } from "vscode-ws-jsonrpc";
import { WillSaveTextDocumentNotification as Ke, TextDocumentSaveReason as ke, DidSaveTextDocumentNotification as Ee, WillCreateFilesRequest as Be, WillRenameFilesRequest as Ge, WillDeleteFilesRequest as Oe, DidCreateFilesNotification as Je, DidRenameFilesNotification as Te, DidDeleteFilesNotification as De } from "vscode-languageserver-protocol";
import { StandaloneServices as Ve, ICodeEditorService as Ye } from "vscode/services";
import "@codingame/monaco-vscode-standalone-languages";
import "@codingame/monaco-vscode-standalone-html-language-features";
import "@codingame/monaco-vscode-standalone-css-language-features";
import "@codingame/monaco-vscode-standalone-json-language-features";
import "@codingame/monaco-vscode-standalone-typescript-language-features";
import "@codingame/monaco-vscode-css-default-extension";
import "@codingame/monaco-vscode-json-default-extension";
import "@codingame/monaco-vscode-html-default-extension";
import "@codingame/monaco-vscode-javascript-default-extension";
import { registerExtension as Me } from "vscode/extensions";
const Pe = () => he(), He = () => {
  const t = Se(), e = t.themeService.ctor.prototype;
  return e.defineTheme = () => {
  }, t;
}, $e = () => we(
  () => Promise.resolve(void 0)
), ze = `{
  "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 }
      }
    }
  }
}
`, Ue = () => ve(ze), _e = async (t) => {
  var r;
  const e = t.serviceConfig ?? {};
  e.debugLogging = ((r = t.logger) == null ? void 0 : r.isEnabled()) === !0 && (e.debugLogging === !0 || t.logger.isDebugEnabled() === !0), await Ue(), 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 a = {
      // @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
      ...Pe(),
      ...He(),
      ...ye(),
      ...Ne(),
      ...$e()
    };
    pe(a, e.userServices);
  }
  return i || (e.workspaceConfig = {
    workspaceProvider: {
      trusted: !0,
      workspace: {
        workspaceUri: o.Uri.file("/workspace")
      },
      async open() {
        return !1;
      }
    }
  }), e;
};
class qe extends Ze {
  constructor(n, i) {
    super(n);
    x(this, "onMessage");
    this.onMessage = i;
  }
  readMessage(n) {
    this.onMessage && this.onMessage();
    const [, i] = n.split(`\r
\r
`);
    if (this.state === "initial")
      this.events.splice(0, 0, { message: i });
    else if (this.state === "listening") {
      const r = JSON.parse(i);
      this.callback(r);
    }
  }
}
class Qe extends je {
  constructor(n, i) {
    super(n);
    x(this, "onSend");
    this.onSend = i;
  }
  async write(n) {
    try {
      const i = JSON.stringify(n);
      this.socket.send(i), this.onSend && this.onSend();
    } catch (i) {
      this.errorCount++, this.fireError(i, n, this.errorCount);
    }
  }
}
function L(t) {
  return `file:///PACKAGE/Project/Sources/${t}`;
}
function Q(t, e = 0) {
  setTimeout(t, e);
}
function en(t, e) {
  const n = new xe(
    e.startLineNumber,
    e.startColumn,
    e.endLineNumber || e.startLineNumber,
    e.endColumn || e.startColumn
  );
  Q(() => {
    t.setSelection(n), t.revealRangeInCenter(n), t.focus();
  });
}
function nn(t, e, n = 0) {
  n > 0 && (e = n + e), Q(() => {
    t.setPosition({ lineNumber: e, column: 1 }), t.revealLineInCenter(e), t.focus();
  });
}
function et(t, e, n) {
  const r = t.getModel();
  if (r && e) {
    const a = r.getLineCount();
    for (let g = 1; g <= a; g++) {
      const u = r.getLineContent(g);
      if (new RegExp(`(?:Function|function) ${n}`).test(u))
        return g;
    }
  }
  return 0;
}
const tn = {
  provideCompletionItems: async (t, e) => {
    const n = t.getWordUntilPosition(e);
    return {
      suggestions: [
        {
          label: "var",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "While",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "While(${1:expression})",
            "	${2:body}",
            "End while"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "Case of",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "Case of",
            "	:(${1:boolean_expression})",
            "		${2:body}",
            "End case"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "Else",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["Else", "	"].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "If",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["If (${1:expression})", "	${5:body}", "End if"].join(
            `
`
          ),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "For",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.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: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "Function",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.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: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        }
      ]
    };
  }
}, on = {
  provideCompletionItems: async (t, e) => {
    const n = t.getWordUntilPosition(e);
    return {
      suggestions: [
        {
          label: "var",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "while",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["while(${1:expression})", "	${2:body}", "end"].join(
            `
`
          ),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "switch",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "switch",
            "	:(${1:boolean_expression})",
            "		${2:body}",
            "end"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "else",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["else", "	"].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "if",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["if (${1:expression})", "	${5:body}", "end"].join(
            `
`
          ),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "for",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "for(${1:counter},${2:start},${3:end}${4:,increment})",
            "	${5:body}",
            "end"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "function",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.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: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        }
      ]
    };
  }
}, rn = [
  // zoom in
  {
    keybinding: B.CtrlCmd | G.NumpadAdd,
    command: "editor.action.fontZoomIn"
  },
  {
    keybinding: B.CtrlCmd | G.Equal,
    command: "editor.action.fontZoomIn"
  },
  // zoom out
  {
    keybinding: B.CtrlCmd | G.NumpadSubtract,
    command: "editor.action.fontZoomOut"
  },
  {
    keybinding: B.CtrlCmd | G.Minus,
    command: "editor.action.fontZoomOut"
  },
  // zoom reset
  {
    keybinding: B.CtrlCmd | G.Numpad0,
    command: "editor.action.fontZoomReset"
  },
  {
    keybinding: B.CtrlCmd | G.Digit0,
    command: "editor.action.fontZoomReset"
  }
], sn = ({ defaultZoom: t }) => (J(() => {
  t !== void 0 && q.EditorZoom.setZoomLevel(t);
}, []), null);
({}).VITE_DISABLE_MONACO_LOADER || de.config({
  monaco: o
  // paths: {
  //   vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
  // },
});
const ee = z(void 0), nt = ({
  children: t,
  url: e,
  qodly: n,
  defaultZoom: i,
  openHandler: r,
  language: a = "4d",
  defaultInited: g = !1
}) => {
  const u = ue(), [m, h] = D(g), [F, y] = D(null), A = P(), b = P(0);
  J(() => {
    e && u && v();
  }, [e, u]);
  const v = async () => {
    if (!u)
      return;
    const I = new We({
      enabled: process.env.NODE_ENV === "development",
      debugEnabled: process.env.NODE_ENV === "development"
    }), d = await _e({
      logger: I
    });
    await be({
      caller: "Qodly Code Editor",
      logger: I,
      serviceConfig: d
    }), r && Ve.get(Ye).registerCodeEditorOpenHandler(r), u.languages.registerCompletionItemProvider(
      a,
      n ? on : tn
    ), q.addKeybindingRules(rn), p();
  }, p = () => {
    y(null);
    let I;
    try {
      I = new WebSocket(localStorage.LSP_SERVER || e);
    } catch {
      y(new Event("INVALID_URL"));
      return;
    }
    I.onopen = N, I.onclose = f, I.onerror = c, b.current = 0;
  }, N = async function() {
    const I = Xe(this), d = new qe(I), C = new Qe(I), E = new Ae({
      name: "4D Language Client",
      clientOptions: {
        workspaceFolder: {
          uri: Re.parse("file:///PACKAGE")
        },
        // use a language id as a document selector
        documentSelector: [{ scheme: "file", language: a }],
        // disable the default error handler
        errorHandler: {
          error: () => ({ action: Le.Continue }),
          closed: () => ({ action: Fe.DoNotRestart })
        }
      },
      // create a language client connection from the JSON RPC connection on demand
      connectionProvider: {
        get: () => Promise.resolve({
          reader: d,
          writer: C
        })
      }
    });
    A.current = E;
    const se = E.sendRequest.bind(E);
    A.current.sendRequest = function(Y, M, le) {
      return typeof Y == "object" && Y.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
        M.textDocument.uri
      ) ? Promise.resolve() : se(Y, M, le);
    }, d.onClose(() => {
      E.stop(), b.current < 3 ? setTimeout(() => {
        b.current++, p();
      }, 1e3) : y(new Event("WEBSOCKET_CLOSED"));
    }), E.needsStart() && await E.start(), h(!0);
  }, f = () => {
  }, c = (I) => {
    y(I);
  };
  J(() => {
    const I = me.subscribe(({ action: d, payload: C }) => {
      switch (d) {
        case Z.WILL_SAVE:
          X(C.filePath);
          break;
        case Z.DID_SAVE:
          s(C.filePath, C.content);
          break;
        case Z.WILL_CREATE:
          l(C.filePath);
          break;
        case Z.DID_CREATE:
          k(C.filePath);
          break;
        case Z.WILL_RENAME:
          w(C.oldPath, C.newPath);
          break;
        case Z.DID_RENAME:
          W(C.oldPath, C.newPath);
          break;
        case Z.WILL_DELETE:
          R(C.filePath);
          break;
        case Z.DID_DELETE:
          re(C.filePath);
          break;
      }
    });
    return () => I.unsubscribe();
  }, []);
  const X = (I, d = ke.Manual) => {
    var C;
    (C = A.current) == null || C.sendNotification(Ke.type, {
      textDocument: {
        uri: L(I)
      },
      reason: d
    });
  }, s = (I, d) => {
    var C;
    (C = A.current) == null || C.sendNotification(Ee.type, {
      textDocument: {
        uri: L(I)
      },
      text: d
    });
  }, l = (I) => {
    var d;
    (d = A.current) == null || d.sendRequest(Be.type, {
      files: [
        {
          uri: L(I)
        }
      ]
    });
  }, w = (I, d) => {
    var C;
    (C = A.current) == null || C.sendRequest(Ge.type, {
      files: [
        {
          oldUri: L(I),
          newUri: L(d)
        }
      ]
    });
  }, R = (I) => {
    var d;
    (d = A.current) == null || d.sendRequest(Oe.type, {
      files: [
        {
          uri: L(I)
        }
      ]
    });
  }, k = (I) => {
    var d;
    (d = A.current) == null || d.sendNotification(Je.type, {
      files: [
        {
          uri: L(I)
        }
      ]
    });
  }, W = (I, d) => {
    var C;
    (C = A.current) == null || C.sendNotification(Te.type, {
      files: [
        {
          oldUri: L(I),
          newUri: L(d)
        }
      ]
    });
  }, re = (I) => {
    var d;
    (d = A.current) == null || d.sendNotification(De.type, {
      files: [
        {
          uri: L(I)
        }
      ]
    });
  };
  return /* @__PURE__ */ O(
    ee.Provider,
    {
      value: {
        inited: m || !!F,
        clientRef: A,
        lastError: F,
        reload: p
      },
      children: [
        t,
        /* @__PURE__ */ S(sn, { defaultZoom: i })
      ]
    }
  );
};
function tt() {
  const t = U(ee);
  if (t === void 0)
    throw new Error("useLSP must be used within an LSPContext");
  return t;
}
const ne = z(
  void 0
), it = Ie(({ children: t }) => {
  const [e, n] = D(null);
  return /* @__PURE__ */ S(
    ne.Provider,
    {
      value: {
        editor: e,
        setEditor: n
      },
      children: t
    }
  );
});
function ln() {
  const t = U(ne), e = D(null);
  if (t === void 0) {
    const [n, i] = e;
    return {
      editor: n,
      setEditor: i
    };
  }
  return t;
}
var te = {
  color: void 0,
  size: void 0,
  className: void 0,
  style: void 0,
  attr: void 0
}, H = K.createContext && K.createContext(te), j = globalThis && globalThis.__assign || function() {
  return j = Object.assign || function(t) {
    for (var e, n = 1, i = arguments.length; n < i; n++) {
      e = arguments[n];
      for (var r in e)
        Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
    }
    return t;
  }, j.apply(this, arguments);
}, an = globalThis && globalThis.__rest || 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 r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
      e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
  return n;
};
function ie(t) {
  return t && t.map(function(e, n) {
    return K.createElement(e.tag, j({
      key: n
    }, e.attr), ie(e.child));
  });
}
function oe(t) {
  return function(e) {
    return K.createElement(gn, j({
      attr: j({}, t.attr)
    }, e), ie(t.child));
  };
}
function gn(t) {
  var e = function(n) {
    var i = t.attr, r = t.size, a = t.title, g = an(t, ["attr", "size", "title"]), u = r || n.size || "1em", m;
    return n.className && (m = n.className), t.className && (m = (m ? m + " " : "") + t.className), K.createElement("svg", j({
      stroke: "currentColor",
      fill: "currentColor",
      strokeWidth: "0"
    }, n.attr, i, g, {
      className: m,
      style: j(j({
        color: t.color || n.color
      }, n.style), t.style),
      height: u,
      width: u,
      xmlns: "http://www.w3.org/2000/svg"
    }), a && K.createElement("title", null, a), t.children);
  };
  return H !== void 0 ? K.createElement(H.Consumer, null, function(n) {
    return e(n);
  }) : e(te);
}
function cn(t) {
  return oe({ tag: "svg", 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 In(t) {
  return oe({ tag: "svg", 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 dn = ({ lspProps: { lastError: t, reload: e } }) => {
  const [n, i] = D(!1), r = () => {
    e();
  }, a = () => {
    i(!1);
  };
  return J(() => {
    i(!!t);
  }, [t]), n ? /* @__PURE__ */ O("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: [
    /* @__PURE__ */ O("span", { className: "flex flex-1 justify-center gap-1", children: [
      /* @__PURE__ */ S(In, { className: "h-4 w-4 text-yellow-600" }),
      /* @__PURE__ */ O("span", { children: [
        "LSP not loaded.",
        " ",
        /* @__PURE__ */ S(
          "button",
          {
            className: "text-primary-dark underline",
            onClick: r,
            children: "Reload?"
          }
        )
      ] })
    ] }),
    /* @__PURE__ */ S("button", { className: "focus:outline-none", children: /* @__PURE__ */ S(
      cn,
      {
        className: "h-4 w-4 text-white",
        onClick: a
      }
    ) })
  ] }) : null;
}, un = {
  provideCompletionItems: (t, e) => {
    const n = t.getWordUntilPosition(e);
    return {
      suggestions: [
        {
          label: "device:xs",
          kind: o.languages.CompletionItemKind.Snippet,
          documentation: "Media query for phone device",
          range: new o.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: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        }
      ]
    };
  }
}, Cn = "#/definitions/Condition", mn = {
  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"
    ]
  }
}, fn = {
  $ref: Cn,
  definitions: mn
};
function An(t, e) {
  const n = document.createElement("style");
  n.dataset.id = e, n.textContent = t, document.head.append(n);
}
function pn(t) {
  return Array.from(document.styleSheets).find(
    (e) => e.ownerNode.getAttribute("data-id") === t
  );
}
function bn(t, e) {
  const n = [];
  let i = [];
  const r = [], a = (s, l, w, R) => {
    n.push({
      startLineNumber: s,
      endLineNumber: w,
      startColumn: l,
      endColumn: R
    }), h(), m();
  }, g = (s) => {
    r.indexOf(s) < 0 && r.push(s);
  }, u = (s) => {
    const l = r.indexOf(s);
    l < 0 || r.splice(l, 1);
  }, m = () => {
    for (const s of r)
      try {
        s(i);
      } catch (l) {
        console.error(l);
      }
  }, h = () => {
    const s = t.getModel();
    s && (i = vn(
      n.map((l) => [
        s.getOffsetAt({
          lineNumber: l.startLineNumber,
          column: l.startColumn
        }),
        s.getOffsetAt({
          lineNumber: l.endLineNumber,
          column: l.endColumn
        })
      ]),
      /*mergeJoins*/
      !0
    ), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= s.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
  }, F = (s) => {
    const l = {
      isDeletion: !1,
      isAddition: !1,
      isReplacement: !1
    };
    return s.text === "" ? l.isDeletion = !0 : s.range.startLineNumber === s.range.endLineNumber && s.range.startColumn === s.range.endColumn ? l.isAddition = !0 : l.isReplacement = !0, l;
  }, y = t.onDidChangeModel((s) => {
    h(), c();
  }), A = t.onDidChangeModelContent((s) => {
    if (!s.isUndoing)
      for (const l of s.changes) {
        const w = F(l);
        if (w.isReplacement || w.isDeletion || w.isAddition) {
          const R = n.some(
            (W) => l.range.startLineNumber >= W.startLineNumber && l.range.endLineNumber <= W.endLineNumber && l.range.startColumn >= W.startColumn && l.range.endColumn <= W.endColumn
          ), k = !R && e && l.range.startLineNumber === 1 && l.range.startColumn === 1 && !_(l.text);
          if (R || k) {
            const W = t.getModel();
            if (W) {
              W.undo();
              return;
            }
          }
        }
      }
  }), b = () => {
    y.dispose(), A.dispose();
  };
  let v = [], p = `
    .idoc-readonly-mark {
      cursor: not-allowed;
      z-index: 1;
    }
  `;
  if (p) {
    const s = "monaco-read-only";
    pn(s) || An(p, s), p = null;
  }
  const N = () => {
    g(c), c();
  }, f = () => {
    u(c), v = t.deltaDecorations(v, []);
  }, c = () => {
    const s = t.getModel();
    s && (v = t.deltaDecorations(
      v,
      i.map(X(s))
    ));
  }, X = (s) => (l) => {
    const w = s.getPositionAt(l[0]), R = s.getPositionAt(l[1]);
    return {
      range: new o.Range(
        w.lineNumber,
        w.column,
        R.lineNumber,
        R.column
      ),
      options: {
        className: "idoc-readonly-mark"
      }
    };
  };
  return {
    get buffer() {
      return i;
    },
    exclude: a,
    attach: g,
    detach: u,
    dispose: b,
    show: N,
    hide: f
  };
}
function hn(t, e, n) {
  let i = !1;
  const r = (f) => f[1] < f[0] ? (i = !0, [[f[1], f[0]]]) : [[...f]], a = (f) => i ? f.map((c) => c[1] > c[0] ? u(c) : c).reverse() : f;
  let g;
  const u = (f) => (g = f[1], f[1] = f[0], f[0] = g, f), m = r(t);
  let h, F, y, A, b, v, p, N;
  y = m[0];
  for (F of e)
    for (p = F[0], N = F[1], A = 0; A < m.length; A++) {
      if (y = m[A], b = y[0], v = y[1], b < p)
        v < p ? h = [y] : v <= N ? h = [[b, p - 1]] : h = [
          [b, p - 1],
          [N + 1, v]
        ];
      else if (b <= N)
        if (p === Number.NEGATIVE_INFINITY) {
          const f = N + 1;
          h = n === 0 ? [] : [[f, v > f ? v : f]];
        } else
          N === Number.POSITIVE_INFINITY ? h = n === 0 ? [] : [[p - 1, p - 1]] : v <= N ? h = n < 0 ? [[p - 1, p - 1]] : n > 0 ? [[N + 1, N + 1]] : [] : h = [[N + 1, v]];
      else
        h = [y];
      if (m.splice(A, 1, ...h), m.length === 1 && m[0][1] < p)
        return a(m);
    }
  return a(m);
}
function vn(t, e) {
  if (t.length < 2)
    return t;
  const n = [];
  let i = null, r, a;
  t = t.map(
    (g) => (g[1] < g[0] && (r = g[1], g[1] = g[0], g[1] = r), g)
  ).sort((g, u) => g[0] - u[0]), n.push(t[0]);
  for (let g = 1; g < t.length; g++)
    i = n[n.length - 1], a = t[g], i[1] === a[0] && !e ? n.push(a) : i[1] === a[0] - 1 && e ? (i[1] = a[1], n.splice(n.length - 1, 1, i)) : i[1] < a[0] ? n.push(a) : i[1] < a[1] && (i[1] = a[1], n.splice(n.length - 1, 1, i));
  return n;
}
function T(t, e) {
  return e.bind(t);
}
class Sn {
  constructor(e, n) {
    x(this, "editor");
    x(this, "intervals");
    x(this, "disposables", []);
    /**
     * Flag for `excludeIntervals`
     */
    x(this, "prefer", 1);
    x(this, "lastPrefer", 1);
    /**
     * Linked to ICodeEditor.onDidChangeCursorPosition event.
     */
    x(this, "onCursor", T(
      this,
      function(e) {
        if (e.source === "api")
          return;
        const n = this.getApprovedSelections();
        n.length !== 0 && this.editor.setSelections(n);
      }
    ));
    x(this, "onRectangleSelectionStart", T(this, function({ event: e }) {
      e.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
    }));
    x(this, "onRectangleSelectionStop", T(this, function() {
      this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
    }));
    /**
     * Linked to ICodeEditor.onKeyDown event.
     */
    x(this, "onKey", T(this, function(e) {
      const n = e.keyCode, i = o.KeyCode;
      if (e.altKey || i.F1 <= n && n <= i.F19 || e.ctrlKey && n !== i.Backspace)
        return;
      if (n === i.UpArrow || n === i.LeftArrow || n === i.Home || n === i.PageUp) {
        this.prefer = -1;
        return;
      }
      if (n === i.DownArrow || n === i.RightArrow || n === i.End || n === i.PageDown) {
        this.prefer = 1;
        return;
      }
      const r = this.getSelections(), a = this.intervals.buffer;
      let g;
      if (n === i.Delete)
        g = (u) => u[0] === u[1] && a.find((m) => u[1] + 1 === m[0]) != null;
      else if (n === i.Backspace)
        g = (u) => u[0] === u[1] && a.find((m) => m[1] + 1 === u[0]) != null;
      else
        return;
      r.findIndex(g) !== -1 && (e.stopPropagation(), e.preventDefault());
    }));
    x(this, "getOffsetAt", T(this, function(e) {
      let n;
      for (let i = 0; i < this.intervals.buffer.length; i++)
        if (n = this.intervals.buffer[i], e <= n[1])
          return n[0] - e < e - n[1] ? n[0] : n[1];
    }));
    var i;
    this.editor = e, this.intervals = bn(e, n), (i = this.editor.getModel()) == null || i.setEOL(o.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, r) {
    arguments.length === 1 ? this.intervals.exclude(e, 0, e, Number.MAX_SAFE_INTEGER) : this.intervals.exclude(e, n, i, r);
  }
  getApprovedSelections() {
    const e = this.editor.getModel();
    return this.getSelections().map(
      (i) => hn(
        i,
        this.intervals.buffer,
        this.prefer
      )
    ).flat().map((i) => {
      const r = e.getPositionAt(i[0]), a = e.getPositionAt(i[1]);
      return new o.Selection(
        r.lineNumber,
        r.column,
        a.lineNumber,
        a.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 yn = new RegExp("^[	s]+(exposed|Function)", "i"), $ = () => /* @__PURE__ */ S("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ S("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ O("div", { className: "space-y-2", children: [
  /* @__PURE__ */ S("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
  /* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" }),
  /* @__PURE__ */ S("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
  /* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" }),
  /* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" })
] }) }) }), ot = ({
  path: t,
  initialValue: e,
  theme: n = "fd-dark",
  type: i,
  language: r,
  onChange: a,
  options: g = {},
  extra: u = {},
  showAlerts: m = !1,
  lspProps: h,
  ...F
}) => {
  const { initialLineInfo: y, initialSelectionInfo: A } = u, { editor: b, setEditor: v } = ln(), { inited: p } = h;
  function N(c) {
    r === "css" && c.languages.registerCompletionItemProvider("css", un), r === "json" && c.languages.json && c.languages.json.jsonDefaults.setDiagnosticsOptions({
      validate: !0,
      schemas: [
        {
          uri: "condition-schema.json",
          fileMatch: ["*.condition.json"],
          schema: fn
        }
      ]
    });
  }
  function f(c, X) {
    v(c);
    const s = c.getModel();
    if (s && (s.updateOptions({ insertSpaces: !1 }), c.onKeyUp(() => {
      var w;
      const l = (w = c.getPosition()) == null ? void 0 : w.lineNumber;
      if (l) {
        const R = s.getLineFirstNonWhitespaceColumn(l), k = s.getLineLength(l), W = s.getLineContent(l);
        yn.test(W) && c.executeEdits("edit-handler", [
          {
            range: new X.Range(
              l,
              0,
              l,
              k
            ),
            text: W.substr(
              R - 1,
              k - R
            )
          }
        ]);
      }
    })), i === fe.METHOD && _(e)) {
      const l = new Sn(c, !0);
      l.exclude(1, 1, 1, Number.POSITIVE_INFINITY), l.enable();
    }
  }
  return J(() => {
    if (!b)
      return;
    const { line: c, offset: X } = y || {};
    c && nn(b, c, X);
  }, [y, b]), J(() => {
    if (!b)
      return;
    const { selection: c } = A || {};
    c && en(b, c);
  }, [A, b]), p ? /* @__PURE__ */ O(ce, { children: [
    m ? /* @__PURE__ */ S(dn, { lspProps: h }) : null,
    /* @__PURE__ */ S(
      Ce,
      {
        options: {
          readOnly: !0,
          fontSize: 12,
          "semanticHighlighting.enabled": !0,
          padding: { top: 10 },
          ...g
        },
        path: L(t),
        value: e,
        theme: "fd-dark",
        onChange: (c) => a && a(c || ""),
        language: r,
        beforeMount: N,
        onMount: f,
        loading: /* @__PURE__ */ S($, {}),
        ...F
      }
    )
  ] }) : /* @__PURE__ */ S($, {});
}, Nn = {
  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: V, whenReady: rt } = Me(Nn, void 0, {
  system: !0
});
V(
  "./syntaxes/4d.tmLanguage.json",
  new URL("data:application/json;base64,ewogICJuYW1lIjogIjREIiwKICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICJwYXR0ZXJucyI6IFsKICAgIHsKICAgICAgImluY2x1ZGUiOiAiI3N0YXRlbWVudHMiCiAgICB9CiAgXSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJzdGF0ZW1lbnRzIjogewogICAgICAicGF0dGVybnMiOiBbCiAgICAgICAgewogICAgICAgICAgImluY2x1ZGUiOiAiI2NvbW1lbnQiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbW1lbnQiOiB7CiAgICAgICJwYXR0ZXJucyI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJjb21tZW50LmJsb2NrLjRkIiwKICAgICAgICAgICJiZWdpbiI6ICIoL1xcKikoPzpcXHMqKChAKWludGVybmFsKSg/PVxcc3woXFwqLykpKT8iLAogICAgICAgICAgImJlZ2luQ2FwdHVyZXMiOiB7CiAgICAgICAgICAgICIxIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlZmluaXRpb24uY29tbWVudC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAic3RvcmFnZS50eXBlLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICIzIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlY29yYXRvci5pbnRlcm5hbGRlY2xhcmF0aW9uLjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImVuZCI6ICJcXCovIiwKICAgICAgICAgICJlbmRDYXB0dXJlcyI6IHsKICAgICAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiYmVnaW4iOiAiKF5bIFxcdF0rKT8oKC8vKSg/OlxccyooKEApaW50ZXJuYWwpKD89XFxzfCQpKT8pIiwKICAgICAgICAgICJiZWdpbkNhcHR1cmVzIjogewogICAgICAgICAgICAiMSI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJwdW5jdHVhdGlvbi53aGl0ZXNwYWNlLmNvbW1lbnQubGVhZGluZy40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAiY29tbWVudC5saW5lLmRvdWJsZS1zbGFzaC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjMiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiNCI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJzdG9yYWdlLnR5cGUuaW50ZXJuYWxkZWNsYXJhdGlvbi40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjUiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVjb3JhdG9yLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAiZW5kIjogIig/PSQpIiwKICAgICAgICAgICJjb250ZW50TmFtZSI6ICJjb21tZW50LmxpbmUuZG91YmxlLXNsYXNoLjRkIgogICAgICAgIH0KICAgICAgXQogICAgfQogIH0KfQo=", self.location).toString(),
  { mimeType: "application/json", size: 1592 }
);
V(
  "./language-configuration.json",
  new URL("data:application/json;base64,ewogICJjb21tZW50cyI6IHsKICAgICJsaW5lQ29tbWVudCI6ICIvLyIsCiAgICAiYmxvY2tDb21tZW50IjogWyIvKioiLCAiKiovIl0KICB9LAogIC8vIHN5bWJvbHMgdXNlZCBhcyBicmFja2V0cwogICJicmFja2V0cyI6IFsKICAgIFsieyIsICJ9Il0sCiAgICBbIigiLCAiKSJdLAogICAgWyJbIiwgIl0iXQogIF0sCiAgLy8gc3ltYm9scyB0aGF0IGFyZSBhdXRvIGNsb3NlZCB3aGVuIHR5cGluZwogIC8vIHN5bWJvbHMgdGhhdCB0aGF0IGNhbiBiZSB1c2VkIHRvIHN1cnJvdW5kIGEgc2VsZWN0aW9uCiAgInN1cnJvdW5kaW5nUGFpcnMiOiBbCiAgICBbInsiLCAifSJdLAogICAgWyJbIiwgIl0iXSwKICAgIFsiKCIsICIpIl0sCiAgICBbIlwiIiwgIlwiIl0sCiAgICBbIiciLCAiJyJdCiAgXSwKICAiYXV0b0Nsb3NpbmdQYWlycyI6IFsKICAgIHsKICAgICAgIm9wZW4iOiAiKCIsCiAgICAgICJjbG9zZSI6ICIpIgogICAgfSwKICAgIHsgIm9wZW4iOiAieyIsICJjbG9zZSI6ICJ9IiB9LAogICAgeyAib3BlbiI6ICJbIiwgImNsb3NlIjogIl0iIH0sCiAgICB7ICJvcGVuIjogIiciLCAiY2xvc2UiOiAiJyIsICJub3RJbiI6IFsic3RyaW5nIiwgImNvbW1lbnQiXSB9LAogICAgeyAib3BlbiI6ICJcIiIsICJjbG9zZSI6ICJcIiIsICJub3RJbiI6IFsic3RyaW5nIl0gfSwKICAgIHsgIm9wZW4iOiAiYCIsICJjbG9zZSI6ICJgIiwgIm5vdEluIjogWyJzdHJpbmciLCAiY29tbWVudCJdIH0sCiAgICB7ICJvcGVuIjogIi8qKiIsICJjbG9zZSI6ICIgKiovIiwgIm5vdEluIjogWyJzdHJpbmciXSB9CiAgXSwKICAiYXV0b0Nsb3NlQmVmb3JlIjogIjs6Liw9fV0pPmAgXG5cdCIsCiAgIndvcmRQYXR0ZXJuIjogIigtP1xcZCpcXC5cXGRcXHcqKXwoW15cXGBcXH5cXCFcXEBcXCNcXCVcXF5cXCZcXCpcXChcXClcXC1cXD1cXCtcXFtcXHtcXF1cXH1cXFxcXFx8XFw7XFw6XFwnXFxcIlxcLFxcLlxcPFxcPlxcL1xcP1xcclxcblxcdFxcZlxcdiBdKyl8KD88PVthLXpBLVpdKSA/KD89W2EtekEtWl0pIiwKICAiaW5kZW50YXRpb25SdWxlcyI6IHsKICAgICJpbmNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGNsYXNzIGNvbnN0cnVjdG9yKSl8KF4oPyFbXlxcc10pKlxccyooZXhwb3NlZHxsb2NhbHxcXHMqKXsxfVxccypmdW5jdGlvbnsxfVxccypcXHcpfCheKD8hW15cXHNdKSpcXHMqKElmfEVsc2V8Rm9yfEZvciBlYWNofFdoaWxlfEJlZ2luIFNRTHxDYXNlIG9mfFVzZXxSZXBlYXR8OiAqXFwoLiopKS4qJCIsCiAgICAgICJmbGFncyI6ICJpIgogICAgfSwKICAgICJkZWNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGV4cG9zZWR8bG9jYWx8XFxzKil7MX1cXHMqZnVuY3Rpb257MX1cXHMqXFx3KXwoRW5kIElmfEVuZCBGb3J8RWxzZXxFbmQgZm9yIGVhY2h8RW5kIFdoaWxlfEVuZCBTUUx8RW5kIGNhc2V8RW5kIHVzZXxVbnRpbHw6ICpcXCguKikuKiQiLAogICAgICAiZmxhZ3MiOiAiaSIKICAgIH0KICB9LAogICJvbkVudGVyUnVsZXMiOiBbCiAgICB7CiAgICAgICJiZWZvcmVUZXh0IjogewogICAgICAgICJwYXR0ZXJuIjogIl5leHBvc2VkIiwKICAgICAgICAiZmxhZ3MiOiAiaSIKICAgICAgfSwKICAgICAgImFjdGlvbiI6IHsgImluZGVudCI6ICJpbmRlbnQiLCAiaW5kZW50QWN0aW9uIjogMSB9CiAgICB9CiAgXQp9Cg==", self.location).toString(),
  { mimeType: "application/json", size: 1723 }
);
V(
  "package.json",
  new URL("data:application/json;base64,ewogICAgIm5hbWUiOiAiNGQiLAogICAgImRpc3BsYXlOYW1lIjogIiVkaXNwbGF5TmFtZSUiLAogICAgImRlc2NyaXB0aW9uIjogIiVkZXNjcmlwdGlvbiUiLAogICAgInZlcnNpb24iOiAiMS4wLjAiLAogICAgInB1Ymxpc2hlciI6ICJ2c2NvZGUiLAogICAgImxpY2Vuc2UiOiAiTUlUIiwKICAgICJlbmdpbmVzIjogewogICAgICAgICJ2c2NvZGUiOiAiMC4xMC54IgogICAgfSwKICAgICJzY3JpcHRzIjogewogICAgICAgICJ1cGRhdGUtZ3JhbW1hciI6ICJub2RlIC4uL25vZGVfbW9kdWxlcy92c2NvZGUtZ3JhbW1hci11cGRhdGVyL2JpbiBtaWNyb3NvZnQvdnNjb2RlLTRkIGdyYW1tYXJzLzRkLmNzb24gLi9zeW50YXhlcy80ZC50bUxhbmd1YWdlLmpzb24iCiAgICB9LAogICAgImNhdGVnb3JpZXMiOiBbCiAgICAgICAgIlByb2dyYW1taW5nIExhbmd1YWdlcyIKICAgIF0sCiAgICAiY29udHJpYnV0ZXMiOiB7CiAgICAgICAgImxhbmd1YWdlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJpZCI6ICI0ZCIsCiAgICAgICAgICAgICAgImFsaWFzZXMiOiBbIjREIiwgIjRkIl0sCiAgICAgICAgICAgICAgImV4dGVuc2lvbnMiOiBbIi40ZG0iLCAiLjRxcyJdLAogICAgICAgICAgICAgICJjb25maWd1cmF0aW9uIjogIi4vbGFuZ3VhZ2UtY29uZmlndXJhdGlvbi5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgImdyYW1tYXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgImxhbmd1YWdlIjogIjRkIiwKICAgICAgICAgICAgICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICAgICAgICAgICAgICJwYXRoIjogIi4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdCiAgICB9LAogICAgInJlcG9zaXRvcnkiOiB7CiAgICAgICAgInR5cGUiOiAiZ2l0IiwKICAgICAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9taWNyb3NvZnQvdnNjb2RlLmdpdCIKICAgIH0KfQ==", self.location).toString(),
  { mimeType: "application/json", size: 1006 }
);
V(
  "package.nls.json",
  new URL("data:application/json;base64,ewogICJkaXNwbGF5TmFtZSI6ICI0RCBMYW5ndWFnZSBCYXNpY3MiLAogICJkZXNjcmlwdGlvbiI6ICJQcm92aWRlcyBzeW50YXggaGlnaGxpZ2h0aW5nIGFuZCBicmFja2V0IG1hdGNoaW5nIGZvciA0RE0gYW5kIDRRUyBmaWxlcy4iCn0K", self.location).toString(),
  { mimeType: "application/json", size: 135 }
);
export {
  dn as Alerts,
  ot as CodeEditor,
  it as CodeEditorProvider,
  nt as LSPProvider,
  Q as _await,
  _e as configureServices,
  L as getFileSystemPath,
  et as getFunctionOffset,
  Ue as initMonacoUserConfiguration,
  nn as jumpToLine,
  en as jumpToSelection,
  ln as useCodeEditor,
  tt as useLSP
};
//# sourceMappingURL=index.es.js.map
