import { c as e, o as t } from "../../dist-DgSmYkuV.js";
//#region src/editors/languages/fluxl.ts
var n = [
	"from",
	"where",
	"select",
	"group",
	"by",
	"limit",
	"order",
	"desc",
	"asc",
	"join",
	"left",
	"right",
	"inner",
	"outer",
	"on",
	"as",
	"having",
	"distinct",
	"top",
	"and",
	"or",
	"not"
], r = [
	"contains",
	"starts_with",
	"ends_with",
	"matches",
	"in",
	"between",
	"like"
], i = [
	"count",
	"sum",
	"avg",
	"min",
	"max",
	"yara_x_match",
	"yara_match",
	"regex",
	"now",
	"bucket"
], a = e.define({ token(e) {
	if (e.eatSpace()) return null;
	if (e.match("--") !== null) return e.skipToEnd(), "comment";
	if (e.match(/\/\*.*?\*\//) !== null) return "comment";
	if (e.match(/"(?:[^"\\]|\\.)*"/) !== null || e.match(/'(?:[^'\\]|\\.)*'/) !== null) return "string";
	if (e.match(/\d+(\.\d+)?/) !== null) return "number";
	if (e.match(/[A-Za-z_][\w.]*/) !== null) {
		let t = e.current().toLowerCase();
		return n.includes(t) ? "keyword" : r.includes(t) ? "operator" : (i.includes(t), "variableName");
	}
	return e.match(/==|!=|<=|>=|[<>|=]/) === null ? (e.next(), null) : "operator";
} });
function o() {
	return new t(a);
}
var s = [
	...n.map((e) => ({
		label: e,
		type: "keyword"
	})),
	...r.map((e) => ({
		label: e,
		type: "keyword"
	})),
	...i.map((e) => ({
		label: `${e}()`,
		type: "function"
	}))
];
//#endregion
export { o as fluxl, s as fluxlCompletions, a as fluxlLanguage };

//# sourceMappingURL=fluxl.js.map