@dbml/parse 9.0.0-alpha.13 → 9.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5116,7 +5116,7 @@ function ef(e) {
5116
5116
  //#endregion
5117
5117
  //#region src/core/types/errors.ts
5118
5118
  var w = /* @__PURE__ */ function(e) {
5119
- return e[e.UNKNOWN_SYMBOL = 1e3] = "UNKNOWN_SYMBOL", e[e.UNEXPECTED_SYMBOL = 1001] = "UNEXPECTED_SYMBOL", e[e.UNEXPECTED_EOF = 1002] = "UNEXPECTED_EOF", e[e.UNEXPECTED_NEWLINE = 1003] = "UNEXPECTED_NEWLINE", e[e.UNKNOWN_TOKEN = 1004] = "UNKNOWN_TOKEN", e[e.UNEXPECTED_TOKEN = 1005] = "UNEXPECTED_TOKEN", e[e.UNEXPECTED_ELEMENT_DECLARATION = 1006] = "UNEXPECTED_ELEMENT_DECLARATION", e[e.MISSING_SPACES = 1007] = "MISSING_SPACES", e[e.UNKNOWN_PREFIX_OP = 1008] = "UNKNOWN_PREFIX_OP", e[e.INVALID_OPERAND = 1009] = "INVALID_OPERAND", e[e.EMPTY_ATTRIBUTE_NAME = 1010] = "EMPTY_ATTRIBUTE_NAME", e[e.INVALID_ESCAPE_SEQUENCE = 1011] = "INVALID_ESCAPE_SEQUENCE", e[e.INVALID_NAME = 3e3] = "INVALID_NAME", e[e.UNEXPECTED_NAME = 3001] = "UNEXPECTED_NAME", e[e.NAME_NOT_FOUND = 3002] = "NAME_NOT_FOUND", e[e.DUPLICATE_NAME = 3003] = "DUPLICATE_NAME", e[e.INVALID_ALIAS = 3004] = "INVALID_ALIAS", e[e.UNEXPECTED_ALIAS = 3005] = "UNEXPECTED_ALIAS", e[e.UNEXPECTED_SETTINGS = 3006] = "UNEXPECTED_SETTINGS", e[e.INVALID_SETTINGS = 3007] = "INVALID_SETTINGS", e[e.UNEXPECTED_SIMPLE_BODY = 3008] = "UNEXPECTED_SIMPLE_BODY", e[e.UNEXPECTED_COMPLEX_BODY = 3009] = "UNEXPECTED_COMPLEX_BODY", e[e.INVALID_TABLE_CONTEXT = 3010] = "INVALID_TABLE_CONTEXT", e[e.UNKNOWN_TABLE_SETTING = 3011] = "UNKNOWN_TABLE_SETTING", e[e.DUPLICATE_TABLE_SETTING = 3012] = "DUPLICATE_TABLE_SETTING", e[e.INVALID_TABLEGROUP_CONTEXT = 3013] = "INVALID_TABLEGROUP_CONTEXT", e[e.INVALID_TABLEGROUP_ELEMENT_NAME = 3014] = "INVALID_TABLEGROUP_ELEMENT_NAME", e[e.DUPLICATE_TABLEGROUP_ELEMENT_NAME = 3015] = "DUPLICATE_TABLEGROUP_ELEMENT_NAME", e[e.DUPLICATE_TABLEGROUP_FIELD_NAME = 3016] = "DUPLICATE_TABLEGROUP_FIELD_NAME", e[e.INVALID_TABLEGROUP_FIELD = 3017] = "INVALID_TABLEGROUP_FIELD", e[e.EMPTY_TABLE = 3018] = "EMPTY_TABLE", e[e.INVALID_COLUMN = 3019] = "INVALID_COLUMN", e[e.INVALID_COLUMN_NAME = 3020] = "INVALID_COLUMN_NAME", e[e.UNKNOWN_COLUMN_SETTING = 3021] = "UNKNOWN_COLUMN_SETTING", e[e.INVALID_COLUMN_TYPE = 3022] = "INVALID_COLUMN_TYPE", e[e.DUPLICATE_COLUMN_NAME = 3023] = "DUPLICATE_COLUMN_NAME", e[e.DUPLICATE_COLUMN_SETTING = 3024] = "DUPLICATE_COLUMN_SETTING", e[e.INVALID_COLUMN_SETTING_VALUE = 3025] = "INVALID_COLUMN_SETTING_VALUE", e[e.INVALID_ENUM_CONTEXT = 3026] = "INVALID_ENUM_CONTEXT", e[e.INVALID_ENUM_ELEMENT_NAME = 3027] = "INVALID_ENUM_ELEMENT_NAME", e[e.INVALID_ENUM_ELEMENT = 3028] = "INVALID_ENUM_ELEMENT", e[e.DUPLICATE_ENUM_ELEMENT_NAME = 3029] = "DUPLICATE_ENUM_ELEMENT_NAME", e[e.UNKNOWN_ENUM_ELEMENT_SETTING = 3030] = "UNKNOWN_ENUM_ELEMENT_SETTING", e[e.DUPLICATE_ENUM_ELEMENT_SETTING = 3031] = "DUPLICATE_ENUM_ELEMENT_SETTING", e[e.INVALID_ENUM_ELEMENT_SETTING = 3032] = "INVALID_ENUM_ELEMENT_SETTING", e[e.EMPTY_ENUM = 3033] = "EMPTY_ENUM", e[e.INVALID_REF_CONTEXT = 3034] = "INVALID_REF_CONTEXT", e[e.UNKNOWN_REF_SETTING = 3035] = "UNKNOWN_REF_SETTING", e[e.DUPLICATE_REF_SETTING = 3036] = "DUPLICATE_REF_SETTING", e[e.INVALID_REF_SETTING_VALUE = 3037] = "INVALID_REF_SETTING_VALUE", e[e.INVALID_REF_RELATIONSHIP = 3038] = "INVALID_REF_RELATIONSHIP", e[e.INVALID_REF_FIELD = 3039] = "INVALID_REF_FIELD", e[e.EMPTY_REF = 3040] = "EMPTY_REF", e[e.REF_REDEFINED = 3041] = "REF_REDEFINED", e[e.INVALID_DEP_CONTEXT = 3042] = "INVALID_DEP_CONTEXT", e[e.INVALID_DEP_FIELD = 3043] = "INVALID_DEP_FIELD", e[e.INVALID_NOTE_CONTEXT = 3044] = "INVALID_NOTE_CONTEXT", e[e.INVALID_NOTE = 3045] = "INVALID_NOTE", e[e.NOTE_REDEFINED = 3046] = "NOTE_REDEFINED", e[e.NOTE_CONTENT_REDEFINED = 3047] = "NOTE_CONTENT_REDEFINED", e[e.EMPTY_NOTE = 3048] = "EMPTY_NOTE", e[e.UNKNOWN_NOTE_SETTING = 3049] = "UNKNOWN_NOTE_SETTING", e[e.DUPLICATE_NOTE_SETTING = 3050] = "DUPLICATE_NOTE_SETTING", e[e.INVALID_NOTE_SETTING_VALUE = 3051] = "INVALID_NOTE_SETTING_VALUE", e[e.INVALID_INDEXES_CONTEXT = 3052] = "INVALID_INDEXES_CONTEXT", e[e.INVALID_INDEXES_FIELD = 3053] = "INVALID_INDEXES_FIELD", e[e.INVALID_INDEX = 3054] = "INVALID_INDEX", e[e.UNKNOWN_INDEX_SETTING = 3055] = "UNKNOWN_INDEX_SETTING", e[e.DUPLICATE_INDEX_SETTING = 3056] = "DUPLICATE_INDEX_SETTING", e[e.UNEXPECTED_INDEX_SETTING_VALUE = 3057] = "UNEXPECTED_INDEX_SETTING_VALUE", e[e.INVALID_INDEX_SETTING_VALUE = 3058] = "INVALID_INDEX_SETTING_VALUE", e[e.INVALID_PROJECT_CONTEXT = 3059] = "INVALID_PROJECT_CONTEXT", e[e.PROJECT_REDEFINED = 3060] = "PROJECT_REDEFINED", e[e.INVALID_PROJECT_FIELD = 3061] = "INVALID_PROJECT_FIELD", e[e.INVALID_CUSTOM_CONTEXT = 3062] = "INVALID_CUSTOM_CONTEXT", e[e.INVALID_CUSTOM_ELEMENT_VALUE = 3063] = "INVALID_CUSTOM_ELEMENT_VALUE", e[e.INVALID_ELEMENT_IN_SIMPLE_BODY = 3064] = "INVALID_ELEMENT_IN_SIMPLE_BODY", e[e.INVALID_TABLE_PARTIAL_CONTEXT = 3065] = "INVALID_TABLE_PARTIAL_CONTEXT", e[e.INVALID_TABLE_PARTIAL_ELEMENT_NAME = 3066] = "INVALID_TABLE_PARTIAL_ELEMENT_NAME", e[e.INVALID_TABLE_PARTIAL_SETTING_VALUE = 3067] = "INVALID_TABLE_PARTIAL_SETTING_VALUE", e[e.DUPLICATE_TABLE_PARTIAL_ELEMENT_NAME = 3068] = "DUPLICATE_TABLE_PARTIAL_ELEMENT_NAME", e[e.DUPLICATE_TABLE_PARTIAL_SETTING = 3069] = "DUPLICATE_TABLE_PARTIAL_SETTING", e[e.INVALID_TABLE_PARTIAL_INJECTION = 3070] = "INVALID_TABLE_PARTIAL_INJECTION", e[e.INVALID_TABLE_PARTIAL_INJECTION_OP = 3071] = "INVALID_TABLE_PARTIAL_INJECTION_OP", e[e.INVALID_TABLE_PARTIAL_INJECTION_NAME = 3072] = "INVALID_TABLE_PARTIAL_INJECTION_NAME", e[e.DUPLICATE_TABLE_PARTIAL_INJECTION_NAME = 3073] = "DUPLICATE_TABLE_PARTIAL_INJECTION_NAME", e[e.UNKNOWN_TABLE_PARTIAL_SETTING = 3074] = "UNKNOWN_TABLE_PARTIAL_SETTING", e[e.INVALID_TABLE_SETTING_VALUE = 3075] = "INVALID_TABLE_SETTING_VALUE", e[e.INVALID_CHECKS_CONTEXT = 3076] = "INVALID_CHECKS_CONTEXT", e[e.INVALID_CHECKS_FIELD = 3077] = "INVALID_CHECKS_FIELD", e[e.INVALID_CHECK = 3078] = "INVALID_CHECK", e[e.UNKNOWN_CHECK_SETTING = 3079] = "UNKNOWN_CHECK_SETTING", e[e.DUPLICATE_CHECK_SETTING = 3080] = "DUPLICATE_CHECK_SETTING", e[e.INVALID_CHECK_SETTING_VALUE = 3081] = "INVALID_CHECK_SETTING_VALUE", e[e.INVALID_RECORDS_CONTEXT = 3082] = "INVALID_RECORDS_CONTEXT", e[e.INVALID_RECORDS_NAME = 3083] = "INVALID_RECORDS_NAME", e[e.INVALID_RECORDS_FIELD = 3084] = "INVALID_RECORDS_FIELD", e[e.DUPLICATE_COLUMN_REFERENCES_IN_RECORDS = 3085] = "DUPLICATE_COLUMN_REFERENCES_IN_RECORDS", e[e.DUPLICATE_RECORDS_FOR_TABLE = 3086] = "DUPLICATE_RECORDS_FOR_TABLE", e[e.INVALID_USE_CONTEXT = 3087] = "INVALID_USE_CONTEXT", e[e.INVALID_USE_SPECIFIER_KIND = 3088] = "INVALID_USE_SPECIFIER_KIND", e[e.INVALID_USE_SPECIFIER_NAME = 3089] = "INVALID_USE_SPECIFIER_NAME", e[e.INVALID_DIAGRAMVIEW_CONTEXT = 3090] = "INVALID_DIAGRAMVIEW_CONTEXT", e[e.DUPLICATE_DIAGRAMVIEW_NAME = 3091] = "DUPLICATE_DIAGRAMVIEW_NAME", e[e.INVALID_DIAGRAMVIEW_FIELD = 3092] = "INVALID_DIAGRAMVIEW_FIELD", e[e.DUPLICATE_DIAGRAMVIEW_FIELD = 3093] = "DUPLICATE_DIAGRAMVIEW_FIELD", e[e.BINDING_ERROR = 4e3] = "BINDING_ERROR", e[e.NONEXISTENT_MODULE = 4001] = "NONEXISTENT_MODULE", e[e.UNSUPPORTED = 5e3] = "UNSUPPORTED", e[e.CIRCULAR_REF = 5001] = "CIRCULAR_REF", e[e.SAME_ENDPOINT = 5002] = "SAME_ENDPOINT", e[e.DEP_SELF_LOOP = 5003] = "DEP_SELF_LOOP", e[e.UNEQUAL_FIELDS_BINARY_REF = 5004] = "UNEQUAL_FIELDS_BINARY_REF", e[e.CONFLICTING_SETTING = 5005] = "CONFLICTING_SETTING", e[e.TABLE_REAPPEAR_IN_TABLEGROUP = 5006] = "TABLE_REAPPEAR_IN_TABLEGROUP", e;
5119
+ return e[e.UNKNOWN_SYMBOL = 1e3] = "UNKNOWN_SYMBOL", e[e.UNEXPECTED_SYMBOL = 1001] = "UNEXPECTED_SYMBOL", e[e.UNEXPECTED_EOF = 1002] = "UNEXPECTED_EOF", e[e.UNEXPECTED_NEWLINE = 1003] = "UNEXPECTED_NEWLINE", e[e.UNKNOWN_TOKEN = 1004] = "UNKNOWN_TOKEN", e[e.UNEXPECTED_TOKEN = 1005] = "UNEXPECTED_TOKEN", e[e.UNEXPECTED_ELEMENT_DECLARATION = 1006] = "UNEXPECTED_ELEMENT_DECLARATION", e[e.MISSING_SPACES = 1007] = "MISSING_SPACES", e[e.UNKNOWN_PREFIX_OP = 1008] = "UNKNOWN_PREFIX_OP", e[e.INVALID_OPERAND = 1009] = "INVALID_OPERAND", e[e.EMPTY_ATTRIBUTE_NAME = 1010] = "EMPTY_ATTRIBUTE_NAME", e[e.INVALID_ESCAPE_SEQUENCE = 1011] = "INVALID_ESCAPE_SEQUENCE", e[e.INVALID_NAME = 3e3] = "INVALID_NAME", e[e.UNEXPECTED_NAME = 3001] = "UNEXPECTED_NAME", e[e.NAME_NOT_FOUND = 3002] = "NAME_NOT_FOUND", e[e.DUPLICATE_NAME = 3003] = "DUPLICATE_NAME", e[e.INVALID_ALIAS = 3004] = "INVALID_ALIAS", e[e.UNEXPECTED_ALIAS = 3005] = "UNEXPECTED_ALIAS", e[e.UNEXPECTED_SETTINGS = 3006] = "UNEXPECTED_SETTINGS", e[e.INVALID_SETTINGS = 3007] = "INVALID_SETTINGS", e[e.UNEXPECTED_SIMPLE_BODY = 3008] = "UNEXPECTED_SIMPLE_BODY", e[e.UNEXPECTED_COMPLEX_BODY = 3009] = "UNEXPECTED_COMPLEX_BODY", e[e.INVALID_TABLE_CONTEXT = 3010] = "INVALID_TABLE_CONTEXT", e[e.UNKNOWN_TABLE_SETTING = 3011] = "UNKNOWN_TABLE_SETTING", e[e.DUPLICATE_TABLE_SETTING = 3012] = "DUPLICATE_TABLE_SETTING", e[e.INVALID_TABLEGROUP_CONTEXT = 3013] = "INVALID_TABLEGROUP_CONTEXT", e[e.INVALID_TABLEGROUP_ELEMENT_NAME = 3014] = "INVALID_TABLEGROUP_ELEMENT_NAME", e[e.DUPLICATE_TABLEGROUP_ELEMENT_NAME = 3015] = "DUPLICATE_TABLEGROUP_ELEMENT_NAME", e[e.DUPLICATE_TABLEGROUP_FIELD_NAME = 3016] = "DUPLICATE_TABLEGROUP_FIELD_NAME", e[e.INVALID_TABLEGROUP_FIELD = 3017] = "INVALID_TABLEGROUP_FIELD", e[e.EMPTY_TABLE = 3018] = "EMPTY_TABLE", e[e.INVALID_COLUMN = 3019] = "INVALID_COLUMN", e[e.INVALID_COLUMN_NAME = 3020] = "INVALID_COLUMN_NAME", e[e.UNKNOWN_COLUMN_SETTING = 3021] = "UNKNOWN_COLUMN_SETTING", e[e.INVALID_COLUMN_TYPE = 3022] = "INVALID_COLUMN_TYPE", e[e.DUPLICATE_COLUMN_NAME = 3023] = "DUPLICATE_COLUMN_NAME", e[e.DUPLICATE_COLUMN_SETTING = 3024] = "DUPLICATE_COLUMN_SETTING", e[e.INVALID_COLUMN_SETTING_VALUE = 3025] = "INVALID_COLUMN_SETTING_VALUE", e[e.INVALID_ENUM_CONTEXT = 3026] = "INVALID_ENUM_CONTEXT", e[e.INVALID_ENUM_ELEMENT_NAME = 3027] = "INVALID_ENUM_ELEMENT_NAME", e[e.INVALID_ENUM_ELEMENT = 3028] = "INVALID_ENUM_ELEMENT", e[e.DUPLICATE_ENUM_ELEMENT_NAME = 3029] = "DUPLICATE_ENUM_ELEMENT_NAME", e[e.UNKNOWN_ENUM_ELEMENT_SETTING = 3030] = "UNKNOWN_ENUM_ELEMENT_SETTING", e[e.DUPLICATE_ENUM_ELEMENT_SETTING = 3031] = "DUPLICATE_ENUM_ELEMENT_SETTING", e[e.INVALID_ENUM_ELEMENT_SETTING = 3032] = "INVALID_ENUM_ELEMENT_SETTING", e[e.EMPTY_ENUM = 3033] = "EMPTY_ENUM", e[e.INVALID_REF_CONTEXT = 3034] = "INVALID_REF_CONTEXT", e[e.UNKNOWN_REF_SETTING = 3035] = "UNKNOWN_REF_SETTING", e[e.DUPLICATE_REF_SETTING = 3036] = "DUPLICATE_REF_SETTING", e[e.INVALID_REF_SETTING_VALUE = 3037] = "INVALID_REF_SETTING_VALUE", e[e.INVALID_REF_RELATIONSHIP = 3038] = "INVALID_REF_RELATIONSHIP", e[e.INVALID_REF_FIELD = 3039] = "INVALID_REF_FIELD", e[e.EMPTY_REF = 3040] = "EMPTY_REF", e[e.REF_REDEFINED = 3041] = "REF_REDEFINED", e[e.INVALID_DEP_CONTEXT = 3042] = "INVALID_DEP_CONTEXT", e[e.INVALID_DEP_FIELD = 3043] = "INVALID_DEP_FIELD", e[e.INVALID_NOTE_CONTEXT = 3044] = "INVALID_NOTE_CONTEXT", e[e.INVALID_NOTE = 3045] = "INVALID_NOTE", e[e.NOTE_REDEFINED = 3046] = "NOTE_REDEFINED", e[e.NOTE_CONTENT_REDEFINED = 3047] = "NOTE_CONTENT_REDEFINED", e[e.EMPTY_NOTE = 3048] = "EMPTY_NOTE", e[e.UNKNOWN_NOTE_SETTING = 3049] = "UNKNOWN_NOTE_SETTING", e[e.DUPLICATE_NOTE_SETTING = 3050] = "DUPLICATE_NOTE_SETTING", e[e.INVALID_NOTE_SETTING_VALUE = 3051] = "INVALID_NOTE_SETTING_VALUE", e[e.INVALID_INDEXES_CONTEXT = 3052] = "INVALID_INDEXES_CONTEXT", e[e.INVALID_INDEXES_FIELD = 3053] = "INVALID_INDEXES_FIELD", e[e.INVALID_INDEX = 3054] = "INVALID_INDEX", e[e.UNKNOWN_INDEX_SETTING = 3055] = "UNKNOWN_INDEX_SETTING", e[e.DUPLICATE_INDEX_SETTING = 3056] = "DUPLICATE_INDEX_SETTING", e[e.UNEXPECTED_INDEX_SETTING_VALUE = 3057] = "UNEXPECTED_INDEX_SETTING_VALUE", e[e.INVALID_INDEX_SETTING_VALUE = 3058] = "INVALID_INDEX_SETTING_VALUE", e[e.INVALID_PROJECT_CONTEXT = 3059] = "INVALID_PROJECT_CONTEXT", e[e.PROJECT_REDEFINED = 3060] = "PROJECT_REDEFINED", e[e.INVALID_PROJECT_FIELD = 3061] = "INVALID_PROJECT_FIELD", e[e.INVALID_CUSTOM_CONTEXT = 3062] = "INVALID_CUSTOM_CONTEXT", e[e.INVALID_CUSTOM_ELEMENT_VALUE = 3063] = "INVALID_CUSTOM_ELEMENT_VALUE", e[e.INVALID_ELEMENT_IN_SIMPLE_BODY = 3064] = "INVALID_ELEMENT_IN_SIMPLE_BODY", e[e.INVALID_TABLE_PARTIAL_CONTEXT = 3065] = "INVALID_TABLE_PARTIAL_CONTEXT", e[e.INVALID_TABLE_PARTIAL_ELEMENT_NAME = 3066] = "INVALID_TABLE_PARTIAL_ELEMENT_NAME", e[e.INVALID_TABLE_PARTIAL_SETTING_VALUE = 3067] = "INVALID_TABLE_PARTIAL_SETTING_VALUE", e[e.DUPLICATE_TABLE_PARTIAL_ELEMENT_NAME = 3068] = "DUPLICATE_TABLE_PARTIAL_ELEMENT_NAME", e[e.DUPLICATE_TABLE_PARTIAL_SETTING = 3069] = "DUPLICATE_TABLE_PARTIAL_SETTING", e[e.INVALID_TABLE_PARTIAL_INJECTION = 3070] = "INVALID_TABLE_PARTIAL_INJECTION", e[e.INVALID_TABLE_PARTIAL_INJECTION_OP = 3071] = "INVALID_TABLE_PARTIAL_INJECTION_OP", e[e.INVALID_TABLE_PARTIAL_INJECTION_NAME = 3072] = "INVALID_TABLE_PARTIAL_INJECTION_NAME", e[e.DUPLICATE_TABLE_PARTIAL_INJECTION_NAME = 3073] = "DUPLICATE_TABLE_PARTIAL_INJECTION_NAME", e[e.UNKNOWN_TABLE_PARTIAL_SETTING = 3074] = "UNKNOWN_TABLE_PARTIAL_SETTING", e[e.INVALID_TABLE_SETTING_VALUE = 3075] = "INVALID_TABLE_SETTING_VALUE", e[e.INVALID_CHECKS_CONTEXT = 3076] = "INVALID_CHECKS_CONTEXT", e[e.INVALID_CHECKS_FIELD = 3077] = "INVALID_CHECKS_FIELD", e[e.INVALID_CHECK = 3078] = "INVALID_CHECK", e[e.UNKNOWN_CHECK_SETTING = 3079] = "UNKNOWN_CHECK_SETTING", e[e.DUPLICATE_CHECK_SETTING = 3080] = "DUPLICATE_CHECK_SETTING", e[e.INVALID_CHECK_SETTING_VALUE = 3081] = "INVALID_CHECK_SETTING_VALUE", e[e.INVALID_RECORDS_CONTEXT = 3082] = "INVALID_RECORDS_CONTEXT", e[e.INVALID_RECORDS_NAME = 3083] = "INVALID_RECORDS_NAME", e[e.INVALID_RECORDS_FIELD = 3084] = "INVALID_RECORDS_FIELD", e[e.DUPLICATE_COLUMN_REFERENCES_IN_RECORDS = 3085] = "DUPLICATE_COLUMN_REFERENCES_IN_RECORDS", e[e.DUPLICATE_RECORDS_FOR_TABLE = 3086] = "DUPLICATE_RECORDS_FOR_TABLE", e[e.INVALID_USE_CONTEXT = 3087] = "INVALID_USE_CONTEXT", e[e.INVALID_USE_SPECIFIER_KIND = 3088] = "INVALID_USE_SPECIFIER_KIND", e[e.INVALID_USE_SPECIFIER_NAME = 3089] = "INVALID_USE_SPECIFIER_NAME", e[e.INVALID_DIAGRAMVIEW_CONTEXT = 3090] = "INVALID_DIAGRAMVIEW_CONTEXT", e[e.DUPLICATE_DIAGRAMVIEW_NAME = 3091] = "DUPLICATE_DIAGRAMVIEW_NAME", e[e.INVALID_DIAGRAMVIEW_FIELD = 3092] = "INVALID_DIAGRAMVIEW_FIELD", e[e.DUPLICATE_DIAGRAMVIEW_FIELD = 3093] = "DUPLICATE_DIAGRAMVIEW_FIELD", e[e.BINDING_ERROR = 4e3] = "BINDING_ERROR", e[e.NONEXISTENT_MODULE = 4001] = "NONEXISTENT_MODULE", e[e.UNSUPPORTED = 5e3] = "UNSUPPORTED", e[e.CIRCULAR_REF = 5001] = "CIRCULAR_REF", e[e.SAME_ENDPOINT = 5002] = "SAME_ENDPOINT", e[e.DEP_SELF_LOOP = 5003] = "DEP_SELF_LOOP", e[e.DEP_MIXED_DOWNSTREAM_TABLES = 5004] = "DEP_MIXED_DOWNSTREAM_TABLES", e[e.DEP_DUPLICATE_DOWNSTREAM_TABLE = 5005] = "DEP_DUPLICATE_DOWNSTREAM_TABLE", e[e.UNEQUAL_FIELDS_BINARY_REF = 5006] = "UNEQUAL_FIELDS_BINARY_REF", e[e.CONFLICTING_SETTING = 5007] = "CONFLICTING_SETTING", e[e.TABLE_REAPPEAR_IN_TABLEGROUP = 5008] = "TABLE_REAPPEAR_IN_TABLEGROUP", e;
5120
5120
  }({}), T = class e extends Error {
5121
5121
  constructor(t, n, r) {
5122
5122
  super(n), this.code = t, this.diagnostic = n, this.nodeOrToken = r, this.start = r.start, this.end = r.end, this.name = this.constructor.name, Object.setPrototypeOf(this, e.prototype);
@@ -7544,7 +7544,7 @@ var Um = class {
7544
7544
  let l = /* @__PURE__ */ new Map();
7545
7545
  for (let e of c) {
7546
7546
  if (!e.isKind(I.DiagramViewSchema, I.DiagramViewTableGroup, I.DiagramViewTable, I.DiagramViewNote) || !e.declaration) continue;
7547
- let n = (i.nodeFullname(e.declaration).getFiltered(t) || []).map(vg).join("."), r = `${e.kind}:${n}`;
7547
+ let n = (i.nodeFullname(e.declaration).getFiltered(t) || []).map(Sg).join("."), r = `${e.kind}:${n}`;
7548
7548
  if (n !== void 0) {
7549
7549
  let t = e.declaration, i = l.get(r);
7550
7550
  i ? (s.push(Gm.getFieldDuplicateError(n, e.kind, i)), s.push(Gm.getFieldDuplicateError(n, e.kind, t))) : l.set(r, t);
@@ -7954,7 +7954,7 @@ function sh(e, n, r = /* @__PURE__ */ new Set()) {
7954
7954
  return a;
7955
7955
  }
7956
7956
  //#endregion
7957
- //#region src/core/global_modules/program/utils.ts
7957
+ //#region src/core/global_modules/program/utils/external.ts
7958
7958
  function ch(e, t, n) {
7959
7959
  t.isKind(I.Table) ? e.externals.tables.push(n) : t.isKind(I.Enum) ? e.externals.enums.push(n) : t.isKind(I.TableGroup) ? e.externals.tableGroups.push(n) : t.isKind(I.TablePartial) ? e.externals.tablePartials.push(n) : t.isKind(I.StickyNote) && e.externals.notes.push(n);
7960
7960
  }
@@ -8110,8 +8110,92 @@ function Mh(e, t, n, r, i, a) {
8110
8110
  return o === "1" && s === "1" || o === "*" && s === "*" ? [...Ah(e, t, n, r, i, a), ...Ah(e, n, t, i, r, a)] : o === "*" && s === "1" ? Ah(e, t, n, r, i, a) : o === "1" && s === "*" ? Ah(e, n, t, i, r, a) : [];
8111
8111
  }
8112
8112
  //#endregion
8113
+ //#region src/core/global_modules/program/utils/validateRecords.ts
8114
+ function Nh(e, n, r, i) {
8115
+ let a = [], o = /* @__PURE__ */ new Map(), s = e.symbolMembers(n).getFiltered(t) ?? [];
8116
+ for (let n of s) {
8117
+ if (!(n instanceof yp)) continue;
8118
+ let r = e.symbolMembers(n).getFiltered(t) ?? [];
8119
+ for (let e of r) {
8120
+ if (!e.isKind(I.Table)) continue;
8121
+ let t = e.originalSymbol;
8122
+ if (!(t instanceof Sp)) continue;
8123
+ let n = t.intern();
8124
+ o.has(n) || o.set(n, {
8125
+ tableSymbol: t,
8126
+ record: void 0,
8127
+ recordBlock: t.declaration
8128
+ });
8129
+ }
8130
+ }
8131
+ let c = e.symbolMetadata(n);
8132
+ for (let n of c) {
8133
+ if (!(n instanceof fm)) continue;
8134
+ let r = n.table(e);
8135
+ if (!(r instanceof Sp)) continue;
8136
+ let s = e.interpretMetadata(n, i);
8137
+ if (s.hasValue(t)) continue;
8138
+ let c = s.getValue();
8139
+ if (!c) continue;
8140
+ a.push(...yh(e, r, n.declaration, c)), a.push(...Th(e, r, c));
8141
+ let l = r.originalSymbol.intern(), u = o.get(l);
8142
+ u ? u.record = c : o.set(l, {
8143
+ tableSymbol: r,
8144
+ record: c,
8145
+ recordBlock: n.declaration
8146
+ });
8147
+ }
8148
+ let l = Ph(e, n, o, i);
8149
+ return a.push(...kh(e, [...r, ...l], o, i)), a;
8150
+ }
8151
+ function Ph(e, t, n, r) {
8152
+ let i = e.symbolMetadata(t).filter((e) => e instanceof lm), a = [];
8153
+ for (let { tableSymbol: t } of n.values()) for (let n of t.resolvedPartials(e)) for (let o of i) {
8154
+ if (o.leftTablePartial(e)?.originalSymbol !== n.originalSymbol) continue;
8155
+ let i = o.leftColumns(e), s = o.rightTable(e), c = o.rightColumns(e), l = o.op(e);
8156
+ if (!s || !l || i.length === 0 || c.length === 0) continue;
8157
+ let u = t.mergedColumns(e);
8158
+ if (!i.some((e) => u.some((t) => t instanceof Rp && t.declaration === e.declaration))) continue;
8159
+ let d = jm(l);
8160
+ if (!d) continue;
8161
+ let f = s instanceof Dp && s.originalSymbol === n.originalSymbol ? t : s, p = t.interpretedName(e, r), m = f.interpretedName(e, r), ee = {
8162
+ schemaName: p.schema,
8163
+ tableName: p.name,
8164
+ fieldNames: i.map((e) => e.name ?? ""),
8165
+ relation: d[0],
8166
+ token: F(o.leftToken())
8167
+ }, te = {
8168
+ schemaName: m.schema,
8169
+ tableName: m.name,
8170
+ fieldNames: c.map((e) => e.name ?? ""),
8171
+ relation: d[1],
8172
+ token: F(o.rightToken())
8173
+ };
8174
+ a.push({
8175
+ token: F(o.declaration),
8176
+ endpoints: [ee, te]
8177
+ });
8178
+ }
8179
+ return a;
8180
+ }
8181
+ //#endregion
8182
+ //#region src/core/global_modules/program/utils/validateDep.ts
8183
+ function Fh(e) {
8184
+ return e instanceof cm && e.declaration instanceof z && e.declaration.body instanceof W;
8185
+ }
8186
+ function Ih(e, t, n) {
8187
+ let r = e.edges ?? [];
8188
+ if (r.length === 0 || !Fh(t)) return [];
8189
+ let i = uh(r[0].downstream.schemaName, r[0].downstream.tableName);
8190
+ for (let e = 1; e < r.length; e++) {
8191
+ let n = uh(r[e].downstream.schemaName, r[e].downstream.tableName);
8192
+ if (n !== i) return [new T(w.DEP_MIXED_DOWNSTREAM_TABLES, `All edges in a Dep block must target the same downstream table, but found '${i}' and '${n}'`, t.declaration)];
8193
+ }
8194
+ return n.has(i) ? [new T(w.DEP_DUPLICATE_DOWNSTREAM_TABLE, `Downstream table '${i}' is already targeted by another Dep block`, t.declaration)] : (n.add(i), []);
8195
+ }
8196
+ //#endregion
8113
8197
  //#region src/core/global_modules/program/interpret.ts
8114
- var Nh = class {
8198
+ var Lh = class {
8115
8199
  constructor(e, t, n) {
8116
8200
  this.errors = [], this.warnings = [], this.compiler = e, this.programSymbol = t, this.programNode = t.declaration, this.filepath = n, this.db = {
8117
8201
  schemas: [],
@@ -8136,7 +8220,7 @@ var Nh = class {
8136
8220
  };
8137
8221
  }
8138
8222
  interpret() {
8139
- return this.interpretAllSymbols(), this.interpretAllMetadata(), this.interpretAllAliases(), this.warnings.push(...this.validateRecords()), new n(this.db, this.errors, this.warnings);
8223
+ return this.interpretAllSymbols(), this.interpretAllMetadata(), this.interpretAllAliases(), this.warnings.push(...Nh(this.compiler, this.programSymbol, this.db.refs, this.filepath)), new n(this.db, this.errors, this.warnings);
8140
8224
  }
8141
8225
  interpretAllSymbols() {
8142
8226
  for (let e of this.programSymbol.declaration.declarations) {
@@ -8187,25 +8271,25 @@ var Nh = class {
8187
8271
  ch(this.db, e, o);
8188
8272
  }
8189
8273
  interpretAllMetadata() {
8190
- let e = this.compiler.symbolMetadata(this.programSymbol) ?? [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
8274
+ let e = this.compiler.symbolMetadata(this.programSymbol) ?? [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
8191
8275
  for (let t of e) {
8192
8276
  if (!(t instanceof fm)) continue;
8193
8277
  let e = t.table(this.compiler);
8194
8278
  if (!e) continue;
8195
- let n = e.originalSymbol.intern(), r = i.get(n);
8196
- r ? r.count++ : i.set(n, {
8279
+ let n = e.originalSymbol.intern(), r = a.get(n);
8280
+ r ? r.count++ : a.set(n, {
8197
8281
  count: 1,
8198
8282
  tableName: e.name ?? ""
8199
8283
  });
8200
8284
  }
8201
- for (let a of e) {
8202
- let e = this.compiler.interpretMetadata(a, this.filepath);
8285
+ for (let o of e) {
8286
+ let e = this.compiler.interpretMetadata(o, this.filepath);
8203
8287
  if (e.hasValue(t)) continue;
8204
8288
  this.errors.push(...e.getErrors()), this.warnings.push(...e.getWarnings());
8205
- let o = e.getValue();
8206
- if (o !== void 0) switch (a.kind) {
8289
+ let s = e.getValue();
8290
+ if (s !== void 0) switch (o.kind) {
8207
8291
  case am.Ref: {
8208
- let e = o, [t, r] = e.endpoints ?? [];
8292
+ let e = s, [t, r] = e.endpoints ?? [];
8209
8293
  if (t && r) {
8210
8294
  let e = [
8211
8295
  t.schemaName,
@@ -8223,7 +8307,7 @@ var Nh = class {
8223
8307
  t.fieldNames.join(",")
8224
8308
  ].join("|");
8225
8309
  if (n.has(e) || n.has(i)) {
8226
- this.errors.push(new T(w.SAME_ENDPOINT, "Ref with same endpoints already exists", a.declaration));
8310
+ this.errors.push(new T(w.SAME_ENDPOINT, "Ref with same endpoints already exists", o.declaration));
8227
8311
  break;
8228
8312
  }
8229
8313
  n.add(e);
@@ -8232,7 +8316,7 @@ var Nh = class {
8232
8316
  break;
8233
8317
  }
8234
8318
  case am.Dep: {
8235
- let e = o, t = a instanceof cm ? a.edgeExpressions() : [], n = -1;
8319
+ let e = s, t = o instanceof cm ? o.edgeExpressions() : [], n = -1;
8236
8320
  if ((e.edges ?? []).some((e, t) => {
8237
8321
  let { upstream: i, downstream: a } = e, o = [
8238
8322
  i.schemaName,
@@ -8244,25 +8328,30 @@ var Nh = class {
8244
8328
  ].join("|");
8245
8329
  return r.has(o) ? (n = t, !0) : (r.add(o), !1);
8246
8330
  }), n >= 0) {
8247
- let e = t[n] ?? a.declaration;
8331
+ let e = t[n] ?? o.declaration;
8248
8332
  this.errors.push(new T(w.SAME_ENDPOINT, "Dep with same endpoints already exists", e));
8249
8333
  break;
8250
8334
  }
8335
+ let a = Ih(e, o, i);
8336
+ if (a.length > 0) {
8337
+ this.errors.push(...a);
8338
+ break;
8339
+ }
8251
8340
  this.db.deps.push(e);
8252
8341
  break;
8253
8342
  }
8254
8343
  case am.Records:
8255
- if (a instanceof fm) {
8256
- let e = a.table(this.compiler)?.originalSymbol.intern() ?? "", t = e ? i.get(e) : void 0;
8344
+ if (o instanceof fm) {
8345
+ let e = o.table(this.compiler)?.originalSymbol.intern() ?? "", t = e ? a.get(e) : void 0;
8257
8346
  if (t && t.count > 1) {
8258
- this.errors.push(new T(w.DUPLICATE_RECORDS_FOR_TABLE, `Duplicate Records blocks for the same Table '${t.tableName}' - A Table can only have one Records block`, a.declaration));
8347
+ this.errors.push(new T(w.DUPLICATE_RECORDS_FOR_TABLE, `Duplicate Records blocks for the same Table '${t.tableName}' - A Table can only have one Records block`, o.declaration));
8259
8348
  break;
8260
8349
  }
8261
8350
  }
8262
- this.db.records.push(o);
8351
+ this.db.records.push(s);
8263
8352
  break;
8264
8353
  case am.Project:
8265
- this.db.project = o;
8354
+ this.db.project = s;
8266
8355
  break;
8267
8356
  default: break;
8268
8357
  }
@@ -8283,73 +8372,6 @@ var Nh = class {
8283
8372
  this.db.aliases.push(r);
8284
8373
  }
8285
8374
  }
8286
- validateRecords() {
8287
- let e = [], n = /* @__PURE__ */ new Map(), r = this.compiler.symbolMembers(this.programSymbol).getFiltered(t) ?? [];
8288
- for (let e of r) {
8289
- if (!(e instanceof yp)) continue;
8290
- let r = this.compiler.symbolMembers(e).getFiltered(t) ?? [];
8291
- for (let e of r) {
8292
- if (!e.isKind(I.Table)) continue;
8293
- let t = e.originalSymbol;
8294
- if (!(t instanceof Sp)) continue;
8295
- let r = t.intern();
8296
- n.has(r) || n.set(r, {
8297
- tableSymbol: t,
8298
- record: void 0,
8299
- recordBlock: t.declaration
8300
- });
8301
- }
8302
- }
8303
- let i = this.compiler.symbolMetadata(this.programSymbol);
8304
- for (let r of i) {
8305
- if (!(r instanceof fm)) continue;
8306
- let i = r.table(this.compiler);
8307
- if (!(i instanceof Sp)) continue;
8308
- let a = this.compiler.interpretMetadata(r, this.filepath);
8309
- if (a.hasValue(t)) continue;
8310
- let o = a.getValue();
8311
- if (!o) continue;
8312
- e.push(...yh(this.compiler, i, r.declaration, o)), e.push(...Th(this.compiler, i, o));
8313
- let s = i.originalSymbol.intern(), c = n.get(s);
8314
- c ? c.record = o : n.set(s, {
8315
- tableSymbol: i,
8316
- record: o,
8317
- recordBlock: r.declaration
8318
- });
8319
- }
8320
- let a = this.collectPartialRefs(n);
8321
- return e.push(...kh(this.compiler, [...this.db.refs, ...a], n, this.filepath)), e;
8322
- }
8323
- collectPartialRefs(e) {
8324
- let t = this.compiler.symbolMetadata(this.programSymbol).filter((e) => e instanceof lm), n = [];
8325
- for (let { tableSymbol: r } of e.values()) for (let e of r.resolvedPartials(this.compiler)) for (let i of t) {
8326
- if (i.leftTablePartial(this.compiler)?.originalSymbol !== e.originalSymbol) continue;
8327
- let t = i.leftColumns(this.compiler), a = i.rightTable(this.compiler), o = i.rightColumns(this.compiler), s = i.op(this.compiler);
8328
- if (!a || !s || t.length === 0 || o.length === 0) continue;
8329
- let c = r.mergedColumns(this.compiler);
8330
- if (!t.some((e) => c.some((t) => t instanceof Rp && t.declaration === e.declaration))) continue;
8331
- let l = jm(s);
8332
- if (!l) continue;
8333
- let u = a instanceof Dp && a.originalSymbol === e.originalSymbol ? r : a, d = r.interpretedName(this.compiler, this.filepath), f = u.interpretedName(this.compiler, this.filepath), p = {
8334
- schemaName: d.schema,
8335
- tableName: d.name,
8336
- fieldNames: t.map((e) => e.name ?? ""),
8337
- relation: l[0],
8338
- token: F(i.leftToken())
8339
- }, m = {
8340
- schemaName: f.schema,
8341
- tableName: f.name,
8342
- fieldNames: o.map((e) => e.name ?? ""),
8343
- relation: l[1],
8344
- token: F(i.rightToken())
8345
- };
8346
- n.push({
8347
- token: F(i.declaration),
8348
- endpoints: [p, m]
8349
- });
8350
- }
8351
- return n;
8352
- }
8353
8375
  pushElement(e, t) {
8354
8376
  if (!Array.isArray(t)) switch (e.kind) {
8355
8377
  case I.Table:
@@ -8373,7 +8395,7 @@ var Nh = class {
8373
8395
  default: break;
8374
8396
  }
8375
8397
  }
8376
- }, Ph = {
8398
+ }, Rh = {
8377
8399
  nodeSymbol(t, r) {
8378
8400
  return Ef(r) ? n.create(t.symbolFactory.create(Fp, {
8379
8401
  declaration: r,
@@ -8403,9 +8425,9 @@ var Nh = class {
8403
8425
  let e = t.reachableFiles(i).flatMap((e) => t.bindFile(e).getErrors());
8404
8426
  return n.create(void 0, e);
8405
8427
  }
8406
- return new Nh(t, r, i).interpret();
8428
+ return new Lh(t, r, i).interpret();
8407
8429
  }
8408
- }, Fh = class {
8430
+ }, zh = class {
8409
8431
  constructor(e, t) {
8410
8432
  this.compiler = e, this.declarationNode = t;
8411
8433
  }
@@ -8420,7 +8442,7 @@ var Nh = class {
8420
8442
  bindSubElements(e) {
8421
8443
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
8422
8444
  }
8423
- }, Ih = class {
8445
+ }, Bh = class {
8424
8446
  constructor(e, t, n) {
8425
8447
  this.declarationNode = t, this.compiler = e, this.filepath = n, this.project = {
8426
8448
  enums: [],
@@ -8479,17 +8501,17 @@ var Nh = class {
8479
8501
  }
8480
8502
  });
8481
8503
  }
8482
- }, Lh = {
8504
+ }, Vh = {
8483
8505
  nodeMetadata(t, i) {
8484
8506
  return A(i, r.Project) ? n.create(new pm(i)) : n.create(e);
8485
8507
  },
8486
8508
  bindNode(t, i) {
8487
- return A(i, r.Project) ? n.create(void 0, new Fh(t, i).bind()) : n.create(e);
8509
+ return A(i, r.Project) ? n.create(void 0, new zh(t, i).bind()) : n.create(e);
8488
8510
  },
8489
8511
  interpretMetadata(t, r, i) {
8490
- return !(r instanceof pm) || !(r.declaration instanceof z) ? n.create(e) : new Ih(t, r.declaration, i).interpret();
8512
+ return !(r instanceof pm) || !(r.declaration instanceof z) ? n.create(e) : new Bh(t, r.declaration, i).interpret();
8491
8513
  }
8492
- }, Rh = class {
8514
+ }, Hh = class {
8493
8515
  constructor(e, t) {
8494
8516
  this.compiler = e, this.declarationNode = t, this.boundColumns = /* @__PURE__ */ new Map();
8495
8517
  }
@@ -8556,16 +8578,16 @@ var Nh = class {
8556
8578
  bindSubElements(e) {
8557
8579
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
8558
8580
  }
8559
- }, zh = class {
8581
+ }, Uh = class {
8560
8582
  constructor(e, t, n) {
8561
8583
  this.compiler = e, this.metadata = t, this.element = t.declaration, this.filepath = n;
8562
8584
  }
8563
8585
  interpret() {
8564
- let e = [], t = [], r = Bh(this.element, this.compiler, this.filepath);
8586
+ let e = [], t = [], r = Wh(this.element, this.compiler, this.filepath);
8565
8587
  if (!r || r.columns.length === 0) return new n(void 0, e);
8566
8588
  let i = [];
8567
8589
  for (let n of this.element.body.body) {
8568
- let a = Vh(n, r.columns, this.compiler);
8590
+ let a = Gh(n, r.columns, this.compiler);
8569
8591
  e.push(...a.getErrors()), t.push(...a.getWarnings());
8570
8592
  let o = a.getValue();
8571
8593
  o.row && i.push(o.row);
@@ -8580,7 +8602,7 @@ var Nh = class {
8580
8602
  }, e, t);
8581
8603
  }
8582
8604
  };
8583
- function Bh(e, n, i) {
8605
+ function Wh(e, n, i) {
8584
8606
  let a = e.name, o = e.parent;
8585
8607
  if (o instanceof z && o.isKind(r.Table)) {
8586
8608
  let e = n.nodeSymbol(o).getFiltered(t);
@@ -8615,7 +8637,7 @@ function Bh(e, n, i) {
8615
8637
  columns: te
8616
8638
  };
8617
8639
  }
8618
- function Vh(e, t, r) {
8640
+ function Gh(e, t, r) {
8619
8641
  let i = [], a = [], o = {}, s = e.callee instanceof Jp ? e.callee.elementList : [e.callee];
8620
8642
  if (s.length !== t.length) return i.push(new T(w.INVALID_RECORDS_FIELD, `Expected ${t.length} values but got ${s.length}`, e)), new n({
8621
8643
  row: null,
@@ -8625,7 +8647,7 @@ function Vh(e, t, r) {
8625
8647
  for (let e = 0; e < t.length; e++) {
8626
8648
  let n = s[e], l = t[e];
8627
8649
  o[l.name ?? ""] = n;
8628
- let u = Uh(n, l, r);
8650
+ let u = qh(n, l, r);
8629
8651
  i.push(...u.getErrors()), a.push(...u.getWarnings());
8630
8652
  let d = u.getValue();
8631
8653
  c.push(d ?? {
@@ -8639,11 +8661,11 @@ function Vh(e, t, r) {
8639
8661
  columnNodes: o
8640
8662
  }, i, a);
8641
8663
  }
8642
- function Hh(e) {
8664
+ function Kh(e) {
8643
8665
  return e instanceof Kp && e.value?.value || "";
8644
8666
  }
8645
- function Uh(e, t, r) {
8646
- let i = F(e), a = t.type(r), o = (a?.name ?? "").split("(")[0], s = !!a?.enumSymbol, c = t.increment(r), l = t.nullable(r) === !1, u = t.default(r), d = t.name ?? "", f = Ho(o, s), p = ip(e), m = p === null ? Hh(e) : p, ee = p === null ? "expression" : f;
8667
+ function qh(e, t, r) {
8668
+ let i = F(e), a = t.type(r), o = (a?.name ?? "").split("(")[0], s = !!a?.enumSymbol, c = t.increment(r), l = t.nullable(r) === !1, u = t.default(r), d = t.name ?? "", f = Ho(o, s), p = ip(e), m = p === null ? Kh(e) : p, ee = p === null ? "expression" : f;
8647
8669
  if (e instanceof Kp) return new n({
8648
8670
  value: e.value?.value || "",
8649
8671
  type: "expression",
@@ -8762,7 +8784,7 @@ function Uh(e, t, r) {
8762
8784
  }
8763
8785
  //#endregion
8764
8786
  //#region src/core/global_modules/records/index.ts
8765
- var Wh = {
8787
+ var Jh = {
8766
8788
  nodeMetadata(t, i) {
8767
8789
  if (!A(i, r.Records)) return n.create(e);
8768
8790
  let a = i.parent;
@@ -8777,26 +8799,26 @@ var Wh = {
8777
8799
  let s = i.parseFile(a.filepath).getValue().ast, c = i.nodeSymbol(s).getFiltered(t);
8778
8800
  if (!c) return n.create(void 0);
8779
8801
  let l = a.parentOfKind(qp);
8780
- if (l?.parentNode === o) return Gh(i, o, a);
8802
+ if (l?.parentNode === o) return Yh(i, o, a);
8781
8803
  let u = a.parentOfKind(Xp);
8782
- return u?.parentNode === o && l?.parentNode === u ? Kh(i, u, a) : u?.parentNode === o && u.callee?.containsEq(a) ? qh(i, c, a) : Yh(i, c, a);
8804
+ return u?.parentNode === o && l?.parentNode === u ? Xh(i, u, a) : u?.parentNode === o && u.callee?.containsEq(a) ? Zh(i, c, a) : $h(i, c, a);
8783
8805
  },
8784
8806
  bindNode(t, i) {
8785
- return A(i, r.Records) ? n.create(void 0, new Rh(t, i).bind()) : n.create(e);
8807
+ return A(i, r.Records) ? n.create(void 0, new Hh(t, i).bind()) : n.create(e);
8786
8808
  },
8787
8809
  interpretMetadata(t, r, i) {
8788
- return r instanceof fm ? r.declaration instanceof z ? new zh(t, r, i).interpret() : n.create(void 0) : n.create(e);
8810
+ return r instanceof fm ? r.declaration instanceof z ? new Uh(t, r, i).interpret() : n.create(void 0) : n.create(e);
8789
8811
  }
8790
8812
  };
8791
- function Gh(e, i, a) {
8813
+ function Yh(e, i, a) {
8792
8814
  let o = i.parent;
8793
8815
  if (o instanceof z && o.isKind(r.Table)) {
8794
8816
  let n = e.nodeSymbol(o).getFiltered(t);
8795
- if (n) return Jh(e, n, a);
8817
+ if (n) return Qh(e, n, a);
8796
8818
  }
8797
8819
  return new n(void 0);
8798
8820
  }
8799
- function Kh(e, r, i) {
8821
+ function Xh(e, r, i) {
8800
8822
  if (r.callee) {
8801
8823
  let n;
8802
8824
  if (O(r.callee)) n = e.nodeReferee(r.callee).getFiltered(t);
@@ -8807,11 +8829,11 @@ function Kh(e, r, i) {
8807
8829
  n = e.nodeReferee(r).getFiltered(t);
8808
8830
  }
8809
8831
  }
8810
- if (n) return Jh(e, n, i);
8832
+ if (n) return Qh(e, n, i);
8811
8833
  }
8812
8834
  return new n(void 0);
8813
8835
  }
8814
- function qh(e, t, r) {
8836
+ function Zh(e, t, r) {
8815
8837
  if (!O(r)) return new n(void 0);
8816
8838
  let i = Kf(r) ?? "";
8817
8839
  if (!k(r.parentNode)) {
@@ -8829,12 +8851,12 @@ function qh(e, t, r) {
8829
8851
  }
8830
8852
  return new n(void 0);
8831
8853
  }
8832
- function Jh(e, t, r) {
8854
+ function Qh(e, t, r) {
8833
8855
  if (!O(r)) return new n(void 0);
8834
8856
  let i = Kf(r) ?? "", a = e.lookupMembers(t, I.Column, i);
8835
8857
  return a ? n.create(a) : new n(void 0, [new T(w.BINDING_ERROR, `Column '${i}' does not exist in Table 'public.${t.name}'`, r)]);
8836
8858
  }
8837
- function Yh(e, t, r) {
8859
+ function $h(e, t, r) {
8838
8860
  if (!O(r)) return new n(void 0);
8839
8861
  let i = Kf(r) ?? "";
8840
8862
  if (!k(r.parentNode)) return new n(void 0);
@@ -8863,12 +8885,12 @@ function Yh(e, t, r) {
8863
8885
  }
8864
8886
  //#endregion
8865
8887
  //#region src/core/global_modules/use/index.ts
8866
- var Xh = { visibleName(e, n) {
8888
+ var eg = { visibleName(e, n) {
8867
8889
  let r = n instanceof L ? n : n.useSpecifierDeclaration instanceof Hp ? n.useSpecifierDeclaration : n.declaration;
8868
8890
  if (r instanceof Hp && n instanceof vp && r.getSymbolKind() !== n.kind && (r = n.declaration), !r) return;
8869
8891
  let i = e.nodeAlias(r).getFiltered(t);
8870
8892
  return i === void 0 ? e.nodeFullname(r).getFiltered(t) : [i];
8871
- } }, Zh = {
8893
+ } }, tg = {
8872
8894
  nodeSymbol(r, i) {
8873
8895
  if (!Tf(i) || !i.name) return n.create(e);
8874
8896
  let a = i.getSymbolKind();
@@ -8879,8 +8901,8 @@ var Xh = { visibleName(e, n) {
8879
8901
  declaration: o?.declaration,
8880
8902
  usedSymbol: o,
8881
8903
  kind: a,
8882
- name: Xh.visibleName(r, i)?.at(-1)
8883
- }, i.filepath), o === void 0 ? [new T(w.BINDING_ERROR, `Failed to resolve the import of ${a} '${(M(i.name) || []).map(vg).join(".")}'`, i)] : []);
8904
+ name: eg.visibleName(r, i)?.at(-1)
8905
+ }, i.filepath), o === void 0 ? [new T(w.BINDING_ERROR, `Failed to resolve the import of ${a} '${(M(i.name) || []).map(Sg).join(".")}'`, i)] : []);
8884
8906
  },
8885
8907
  symbolMembers(r, i) {
8886
8908
  if (!(i instanceof Lp)) return n.create(e);
@@ -8907,7 +8929,7 @@ var Xh = { visibleName(e, n) {
8907
8929
  let a = r.lookupMembers(e, o, c);
8908
8930
  return a ? n.create(a) : new n(void 0, [new T(w.BINDING_ERROR, `Could not find ${o} '${c}'`, i)]);
8909
8931
  }
8910
- let f = Qh(r, u, c, o);
8932
+ let f = ng(r, u, c, o);
8911
8933
  return f ? n.create(f) : n.create(void 0, [new T(w.BINDING_ERROR, `${o} '${c}' does not exist in file ${u.toString()}`, i)]);
8912
8934
  },
8913
8935
  bindNode(t, r) {
@@ -8939,7 +8961,7 @@ var Xh = { visibleName(e, n) {
8939
8961
  }) : n.create(s);
8940
8962
  }
8941
8963
  };
8942
- function Qh(e, n, r, i, a = /* @__PURE__ */ new Set()) {
8964
+ function ng(e, n, r, i, a = /* @__PURE__ */ new Set()) {
8943
8965
  if (!n || a.has(n.intern())) return;
8944
8966
  a.add(n.intern());
8945
8967
  let o = e.usableMembers(n).getFiltered(t);
@@ -8951,23 +8973,23 @@ function Qh(e, n, r, i, a = /* @__PURE__ */ new Set()) {
8951
8973
  for (let t of o.reuses.selective) if (M(t.alias ?? t.name)?.at(-1) === r) {
8952
8974
  let o = t.parentOfKind(Vp);
8953
8975
  if (o?.importPath?.value) {
8954
- let s = Qh(e, bo(n, o.importPath.value), M(t.name)?.at(-1) ?? r, i, a);
8976
+ let s = ng(e, bo(n, o.importPath.value), M(t.name)?.at(-1) ?? r, i, a);
8955
8977
  if (s) return s;
8956
8978
  }
8957
8979
  }
8958
8980
  for (let { importPath: t } of o.reuses.wildcard) {
8959
- let n = Qh(e, t, r, i, a);
8981
+ let n = ng(e, t, r, i, a);
8960
8982
  if (n) return n;
8961
8983
  }
8962
8984
  }
8963
8985
  //#endregion
8964
8986
  //#region src/compiler/queries/files/usableMembers.ts
8965
- function $h(e) {
8987
+ function rg(e) {
8966
8988
  if (e instanceof yo) {
8967
8989
  let { ast: n } = this.parseFile(e).getValue(), r = this.nodeSymbol(n).getFiltered(t);
8968
8990
  return this.usableMembers(r);
8969
8991
  }
8970
- let r = e.filepath, i = tg(this, r), { nonSchemaMembers: a, schemaMembers: o } = e instanceof Fp ? ng(this, e, i) : rg(this, e, i);
8992
+ let r = e.filepath, i = ag(this, r), { nonSchemaMembers: a, schemaMembers: o } = e instanceof Fp ? og(this, e, i) : sg(this, e, i);
8971
8993
  return new n({
8972
8994
  nonSchemaMembers: a,
8973
8995
  schemaMembers: o,
@@ -8981,16 +9003,16 @@ function $h(e) {
8981
9003
  }
8982
9004
  }, i.parseResult.getErrors(), i.parseResult.getWarnings());
8983
9005
  }
8984
- function eg(e, n, r) {
9006
+ function ig(e, n, r) {
8985
9007
  let i = n.qualifiedName, a;
8986
- if (a = r instanceof Hp ? Xh.visibleName(e, r) : e.nodeFullname(r).getFiltered(t), !a) return { kind: "none" };
9008
+ if (a = r instanceof Hp ? eg.visibleName(e, r) : e.nodeFullname(r).getFiltered(t), !a) return { kind: "none" };
8987
9009
  let o = r instanceof Hp && r.getSymbolKind() === I.Schema ? a : a.length <= 1 ? [y] : a.slice(0, -1);
8988
9010
  return o.length < i.length || !i.every((e, t) => e === o[t]) ? { kind: "none" } : o.length === i.length ? { kind: "direct" } : {
8989
9011
  kind: "child",
8990
9012
  schemaName: o[i.length]
8991
9013
  };
8992
9014
  }
8993
- function tg(e, t) {
9015
+ function ag(e, t) {
8994
9016
  let n = e.parseFile(t), { ast: r } = n.getValue(), i = [], a = [], o = [], s = [];
8995
9017
  for (let e of r.body) {
8996
9018
  if (!(e instanceof Vp) || !e.specifiers || !e.importPath) continue;
@@ -9012,14 +9034,14 @@ function tg(e, t) {
9012
9034
  wildcardUses: o
9013
9035
  };
9014
9036
  }
9015
- function ng(e, n, r) {
9037
+ function og(e, n, r) {
9016
9038
  let { ast: i, selectiveUses: a, selectiveReuses: o } = r, s = n.filepath, c = new Map([[y, e.symbolFactory.create(yp, { name: y }, s)]]);
9017
9039
  for (let n of i.declarations) {
9018
9040
  let r = e.nodeFullname(n).getFiltered(t) || [], i = r.length <= 1 ? y : r[0];
9019
9041
  c.has(i) || c.set(i, e.symbolFactory.create(yp, { name: i }, s));
9020
9042
  }
9021
- ig(e, [...a, ...o], c, s);
9022
- for (let t of e.reachableFiles(s)) for (let n of og(e, t)) c.has(n) || c.set(n, e.symbolFactory.create(yp, { name: n }, s));
9043
+ cg(e, [...a, ...o], c, s);
9044
+ for (let t of e.reachableFiles(s)) for (let n of ug(e, t)) c.has(n) || c.set(n, e.symbolFactory.create(yp, { name: n }, s));
9023
9045
  let l = [...c.values()], u = [], d = l.find((e) => e.isPublicSchema());
9024
9046
  if (d) {
9025
9047
  let n = e.usableMembers(d).getFiltered(t);
@@ -9030,11 +9052,11 @@ function ng(e, n, r) {
9030
9052
  schemaMembers: l
9031
9053
  };
9032
9054
  }
9033
- function rg(e, n, r) {
9055
+ function sg(e, n, r) {
9034
9056
  let { ast: i, selectiveUses: a, selectiveReuses: o } = r, s = [], c = /* @__PURE__ */ new Map();
9035
9057
  for (let r of i.body) {
9036
9058
  if (!(r instanceof z)) continue;
9037
- let i = eg(e, n, r), a = e.nodeAlias(r).getFiltered(t), o = e.nodeSymbol(r).getFiltered(t);
9059
+ let i = ig(e, n, r), a = e.nodeAlias(r).getFiltered(t), o = e.nodeSymbol(r).getFiltered(t);
9038
9060
  if (a !== void 0 && n.isPublicSchema() && o && s.push(e.symbolFactory.create(Ip, {
9039
9061
  kind: o.kind,
9040
9062
  declaration: r,
@@ -9049,9 +9071,9 @@ function rg(e, n, r) {
9049
9071
  parent: n
9050
9072
  }, n.filepath));
9051
9073
  }
9052
- ag(e, [...a, ...o], n, c);
9074
+ lg(e, [...a, ...o], n, c);
9053
9075
  let l = n.qualifiedName;
9054
- for (let t of e.reachableFiles(n.filepath)) for (let r of sg(e, t, l)) c.has(r) || c.set(r, e.symbolFactory.create(yp, {
9076
+ for (let t of e.reachableFiles(n.filepath)) for (let r of dg(e, t, l)) c.has(r) || c.set(r, e.symbolFactory.create(yp, {
9055
9077
  name: r,
9056
9078
  parent: n
9057
9079
  }, n.filepath));
@@ -9060,18 +9082,18 @@ function rg(e, n, r) {
9060
9082
  schemaMembers: [...c.values()]
9061
9083
  };
9062
9084
  }
9063
- function ig(e, t, n, r) {
9085
+ function cg(e, t, n, r) {
9064
9086
  for (let i of t) {
9065
9087
  if (i.getSymbolKind() !== I.Schema) continue;
9066
- let t = Xh.visibleName(e, i)?.at(0);
9088
+ let t = eg.visibleName(e, i)?.at(0);
9067
9089
  t !== void 0 && !n.has(t) && n.set(t, e.symbolFactory.create(yp, { name: t }, r));
9068
9090
  }
9069
9091
  }
9070
- function ag(e, t, n, r) {
9092
+ function lg(e, t, n, r) {
9071
9093
  let i = n.qualifiedName;
9072
9094
  for (let a of t) {
9073
9095
  if (a.getSymbolKind() !== I.Schema) continue;
9074
- let t = Xh.visibleName(e, a);
9096
+ let t = eg.visibleName(e, a);
9075
9097
  if (!t || t.length <= i.length || !i.every((e, n) => e === t[n])) continue;
9076
9098
  let o = t[i.length];
9077
9099
  o && !r.has(o) && r.set(o, e.symbolFactory.create(yp, {
@@ -9080,37 +9102,37 @@ function ag(e, t, n, r) {
9080
9102
  }, n.filepath));
9081
9103
  }
9082
9104
  }
9083
- function og(e, n) {
9105
+ function ug(e, n) {
9084
9106
  let { ast: r } = e.parseFile(n).getValue(), i = [];
9085
9107
  for (let n of r.declarations) {
9086
9108
  let r = e.nodeFullname(n).getFiltered(t) || [], a = r.length <= 1 ? y : r[0];
9087
9109
  i.push(a);
9088
9110
  }
9089
- let a = tg(e, n);
9111
+ let a = ag(e, n);
9090
9112
  for (let t of [...a.selectiveUses, ...a.selectiveReuses]) {
9091
9113
  if (t.getSymbolKind() !== I.Schema) continue;
9092
- let n = Xh.visibleName(e, t)?.at(0);
9114
+ let n = eg.visibleName(e, t)?.at(0);
9093
9115
  n !== void 0 && i.push(n);
9094
9116
  }
9095
9117
  return i;
9096
9118
  }
9097
- function sg(e, n, r) {
9119
+ function dg(e, n, r) {
9098
9120
  let { ast: i } = e.parseFile(n).getValue(), a = [];
9099
9121
  for (let n of i.declarations) {
9100
9122
  let i = e.nodeFullname(n).getFiltered(t) || [], o = i.length <= 1 ? [y] : i.slice(0, -1);
9101
9123
  o.length > r.length && r.every((e, t) => e === o[t]) && a.push(o[r.length]);
9102
9124
  }
9103
- let o = tg(e, n);
9125
+ let o = ag(e, n);
9104
9126
  for (let t of [...o.selectiveUses, ...o.selectiveReuses]) {
9105
9127
  if (t.getSymbolKind() !== I.Schema) continue;
9106
- let n = Xh.visibleName(e, t);
9128
+ let n = eg.visibleName(e, t);
9107
9129
  !n || n.length <= r.length || r.every((e, t) => e === n[t]) && a.push(n[r.length]);
9108
9130
  }
9109
9131
  return a;
9110
9132
  }
9111
9133
  //#endregion
9112
9134
  //#region src/core/global_modules/table/bind.ts
9113
- var cg = class {
9135
+ var fg = class {
9114
9136
  constructor(e, t) {
9115
9137
  this.compiler = e, this.declarationNode = t;
9116
9138
  }
@@ -9183,7 +9205,7 @@ var cg = class {
9183
9205
  bindSubElements(e) {
9184
9206
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
9185
9207
  }
9186
- }, lg = class {
9208
+ }, pg = class {
9187
9209
  constructor(e, t, n, r) {
9188
9210
  this.compiler = e, this.declarationNode = t, this.symbol = n, this.filepath = r, this.table = {
9189
9211
  name: void 0,
@@ -9355,7 +9377,7 @@ var cg = class {
9355
9377
  let i = r.getValue();
9356
9378
  return Array.isArray(i) ? this.table.checks.push(...i) : i && this.table.checks.push(i), r.getErrors();
9357
9379
  }
9358
- }, ug = {
9380
+ }, mg = {
9359
9381
  getDuplicateError(e, t, n) {
9360
9382
  return new T(w.DUPLICATE_NAME, `Table '${e}' already exists in schema '${t}'`, n);
9361
9383
  },
@@ -9365,7 +9387,7 @@ var cg = class {
9365
9387
  getPartialInjectionDuplicateError(e, t) {
9366
9388
  return new T(w.DUPLICATE_TABLE_PARTIAL_INJECTION_NAME, `Duplicate table partial injection '${e}'`, t);
9367
9389
  }
9368
- }, dg = {
9390
+ }, hg = {
9369
9391
  nodeSymbol(i, a) {
9370
9392
  let o = i.nodeFullname(a).getFiltered(t)?.at(-1);
9371
9393
  return A(a, r.Table) ? new n(i.symbolFactory.create(Sp, {
@@ -9394,7 +9416,7 @@ var cg = class {
9394
9416
  let t = `${e.kind}:${e.name}`;
9395
9417
  if (e.name !== void 0) {
9396
9418
  let n = e.declaration instanceof z && e.declaration.name ? e.declaration.name : e.declaration, r = l.get(t);
9397
- r ? e.isKind(I.Column) ? (c.push(ug.getColumnDuplicateError(e.name, r)), c.push(ug.getColumnDuplicateError(e.name, n))) : (c.push(ug.getPartialInjectionDuplicateError(e.name, r)), c.push(ug.getPartialInjectionDuplicateError(e.name, n))) : l.set(t, n);
9419
+ r ? e.isKind(I.Column) ? (c.push(mg.getColumnDuplicateError(e.name, r)), c.push(mg.getColumnDuplicateError(e.name, n))) : (c.push(mg.getPartialInjectionDuplicateError(e.name, r)), c.push(mg.getPartialInjectionDuplicateError(e.name, n))) : l.set(t, n);
9398
9420
  }
9399
9421
  }
9400
9422
  let u = [];
@@ -9436,22 +9458,22 @@ var cg = class {
9436
9458
  nodeReferee(a, o) {
9437
9459
  if (Af(o, i.Dep) && o.parent instanceof z && o.parent.isKind(r.Table) && !Df(o, r.Table)) {
9438
9460
  let e = a.parseFile(o.filepath).getValue().ast, r = a.nodeSymbol(e).getValue();
9439
- return r === t ? n.create(void 0) : hg(a, r, o);
9461
+ return r === t ? n.create(void 0) : yg(a, r, o);
9440
9462
  }
9441
9463
  if (!Df(o, r.Table)) return n.create(e);
9442
9464
  let s = a.parseFile(o.filepath).getValue().ast, c = a.nodeSymbol(s).getValue();
9443
- return c === t ? n.create(void 0) : O(o) && o.parentNode instanceof V && o.parentNode.op?.value === "~" ? fg(a, c, o) : Of(o, 1) ? pg(a, c, o) : Af(o, i.Ref) ? mg(a, c, o) : Af(o, i.Dep) ? hg(a, c, o) : Of(o, 0) ? n.create(e) : gg(a, c, o);
9465
+ return c === t ? n.create(void 0) : O(o) && o.parentNode instanceof V && o.parentNode.op?.value === "~" ? gg(a, c, o) : Of(o, 1) ? _g(a, c, o) : Af(o, i.Ref) ? vg(a, c, o) : Af(o, i.Dep) ? yg(a, c, o) : Of(o, 0) ? n.create(e) : bg(a, c, o);
9444
9466
  },
9445
9467
  bindNode(i, a) {
9446
9468
  if (!A(a, r.Table)) return n.create(e);
9447
- let o = new cg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
9469
+ let o = new fg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
9448
9470
  return s && o.push(...i.symbolMembers(s).getErrors()), n.create(void 0, o);
9449
9471
  },
9450
9472
  interpretSymbol(t, r, i) {
9451
- return r instanceof Sp ? r.declaration instanceof z ? new lg(t, r.declaration, r, i).interpret() : n.create(void 0) : n.create(e);
9473
+ return r instanceof Sp ? r.declaration instanceof z ? new pg(t, r.declaration, r, i).interpret() : n.create(void 0) : n.create(e);
9452
9474
  }
9453
9475
  };
9454
- function fg(e, r, i) {
9476
+ function gg(e, r, i) {
9455
9477
  let a = P(i) ?? "", o = e.symbolMembers(r).getFiltered(t);
9456
9478
  if (o) {
9457
9479
  let t = o.find((e) => e instanceof yp && e.isPublicSchema());
@@ -9463,7 +9485,7 @@ function fg(e, r, i) {
9463
9485
  let s = e.lookupMembers(r, I.TablePartial, a);
9464
9486
  return s ? n.create(s) : new n(void 0, [new T(w.BINDING_ERROR, `TablePartial '${a}' does not exist in Schema 'public'`, i)]);
9465
9487
  }
9466
- function pg(e, t, r) {
9488
+ function _g(e, t, r) {
9467
9489
  if (!O(r)) return new n(void 0);
9468
9490
  let i = Kf(r) ?? "";
9469
9491
  if (!k(r.parentNode)) return n.create(e.lookupMembers(t, I.Enum, i));
@@ -9481,7 +9503,7 @@ function pg(e, t, r) {
9481
9503
  }
9482
9504
  return new n(void 0);
9483
9505
  }
9484
- function mg(e, i, a) {
9506
+ function vg(e, i, a) {
9485
9507
  if (!O(a)) return new n(void 0);
9486
9508
  let o = Kf(a) ?? "";
9487
9509
  if (!k(a.parentNode)) {
@@ -9495,7 +9517,7 @@ function mg(e, i, a) {
9495
9517
  }
9496
9518
  return Am(e, i, a, I.Column);
9497
9519
  }
9498
- function hg(e, i, a) {
9520
+ function yg(e, i, a) {
9499
9521
  if (!O(a)) return new n(void 0);
9500
9522
  let o = Df(a, r.Table), s = Kf(a) ?? "";
9501
9523
  if (!k(a.parentNode)) if (o) {
@@ -9512,7 +9534,7 @@ function hg(e, i, a) {
9512
9534
  }
9513
9535
  return Am(e, i, a, o ? I.Column : I.Table);
9514
9536
  }
9515
- function gg(e, t, r) {
9537
+ function bg(e, t, r) {
9516
9538
  if (!O(r)) return new n(void 0);
9517
9539
  let i = Kf(r) ?? "";
9518
9540
  if (!k(r.parentNode)) return xo.includes(i.toLowerCase()) ? new n(void 0) : n.create(e.lookupMembers(t, I.Enum, i));
@@ -9541,16 +9563,16 @@ function gg(e, t, r) {
9541
9563
  }
9542
9564
  //#endregion
9543
9565
  //#region src/compiler/queries/utils.ts
9544
- function _g(e) {
9566
+ function xg(e) {
9545
9567
  return e ? e.split("").every((e) => nf(e) || rf(e)) && !rf(e[0]) : !1;
9546
9568
  }
9547
- function vg(e) {
9548
- return _g(e) ? e : `"${xg(e)}"`;
9569
+ function Sg(e) {
9570
+ return xg(e) ? e : `"${Tg(e)}"`;
9549
9571
  }
9550
- function yg(...e) {
9551
- return e.map(vg).join(".");
9572
+ function Cg(...e) {
9573
+ return e.map(Sg).join(".");
9552
9574
  }
9553
- function bg(e) {
9575
+ function wg(e) {
9554
9576
  let t = "", n = 0, r = {
9555
9577
  n: "\n",
9556
9578
  t: " ",
@@ -9577,7 +9599,7 @@ function bg(e) {
9577
9599
  } else t += e[n], n++;
9578
9600
  return t;
9579
9601
  }
9580
- function xg(e) {
9602
+ function Tg(e) {
9581
9603
  let t = "";
9582
9604
  for (let n = 0; n < e.length; n++) {
9583
9605
  let r = e[n];
@@ -9617,11 +9639,11 @@ function xg(e) {
9617
9639
  }
9618
9640
  return t;
9619
9641
  }
9620
- function Sg(e) {
9642
+ function Eg(e) {
9621
9643
  if (e == null) return "null";
9622
9644
  if (typeof e == "boolean") return e ? "true" : "false";
9623
9645
  if (typeof e == "number") return String(e);
9624
- if (typeof e == "string") return `'${xg(e)}'`;
9646
+ if (typeof e == "string") return `'${Tg(e)}'`;
9625
9647
  let { value: t, type: n } = e;
9626
9648
  if (t == null || Lo(n) && typeof t == "string" && t.toLowerCase() === "null") return "null";
9627
9649
  if (n === "expression") return typeof t == "string" && t.toLowerCase().trim() === "null" ? "null" : `\`${t}\``;
@@ -9635,20 +9657,20 @@ function Sg(e) {
9635
9657
  }
9636
9658
  if (Bo(n)) {
9637
9659
  let e = cp(t);
9638
- return e === null ? `\`${t}\`` : `'${xg(e)}'`;
9660
+ return e === null ? `\`${t}\`` : `'${Tg(e)}'`;
9639
9661
  }
9640
9662
  let r = ip(t);
9641
- return r === null ? `\`${t}\`` : `'${xg(r)}'`;
9663
+ return r === null ? `\`${t}\`` : `'${Tg(r)}'`;
9642
9664
  }
9643
- function Cg(e) {
9644
- return (e.match(/"(?:[^"\\]|\\.)*"|[^."]+/g) || []).map((e) => e.startsWith("\"") && e.endsWith("\"") ? bg(e.slice(1, -1)) : e.trim()).filter((e) => e.length > 0);
9665
+ function Dg(e) {
9666
+ return (e.match(/"(?:[^"\\]|\\.)*"|[^."]+/g) || []).map((e) => e.startsWith("\"") && e.endsWith("\"") ? wg(e.slice(1, -1)) : e.trim()).filter((e) => e.length > 0);
9645
9667
  }
9646
- function wg(e, t) {
9668
+ function Og(e, t) {
9647
9669
  let n = /* @__PURE__ */ new Set(), r = [];
9648
9670
  for (let i of t) for (let t of e.reachableFiles(i)) n.has(t.intern()) || (n.add(t.intern()), r.push(t));
9649
9671
  return r;
9650
9672
  }
9651
- function Tg(e) {
9673
+ function kg(e) {
9652
9674
  let r = [], i = [], a = [];
9653
9675
  e.bindProject();
9654
9676
  for (let n of e.parseProject().values()) {
@@ -9664,12 +9686,12 @@ function Tg(e) {
9664
9686
  }
9665
9687
  return new n(r, i, a);
9666
9688
  }
9667
- function Eg(e) {
9668
- return e.includes("\n") ? `'''\n${e}\n'''` : `'${xg(e)}'`;
9689
+ function Ag(e) {
9690
+ return e.includes("\n") ? `'''\n${e}\n'''` : `'${Tg(e)}'`;
9669
9691
  }
9670
9692
  //#endregion
9671
9693
  //#region src/core/global_modules/tableGroup/bind.ts
9672
- var Dg = class {
9694
+ var jg = class {
9673
9695
  constructor(e, t) {
9674
9696
  this.compiler = e, this.declarationNode = t;
9675
9697
  }
@@ -9693,7 +9715,7 @@ var Dg = class {
9693
9715
  bindSubElements(e) {
9694
9716
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
9695
9717
  }
9696
- }, Og = class {
9718
+ }, Mg = class {
9697
9719
  constructor(e, t, n) {
9698
9720
  this.compiler = e, this.symbol = t, this.declarationNode = t.declaration, this.filepath = n, this.tableGroup = { tables: [] };
9699
9721
  }
@@ -9750,14 +9772,14 @@ var Dg = class {
9750
9772
  token: F(n)
9751
9773
  }, [];
9752
9774
  }
9753
- }, kg = {
9775
+ }, Ng = {
9754
9776
  getDuplicateError(e, t, n) {
9755
9777
  return new T(w.DUPLICATE_NAME, `TableGroup '${e}' already exists in schema '${t}'`, n);
9756
9778
  },
9757
9779
  getFieldDuplicateError(e, t) {
9758
9780
  return new T(w.DUPLICATE_NAME, `Duplicate TableGroupField '${e}'`, t);
9759
9781
  }
9760
- }, Ag = {
9782
+ }, Pg = {
9761
9783
  nodeSymbol(i, a) {
9762
9784
  let o = i.nodeFullname(a).getFiltered(t), s = o?.at(-1);
9763
9785
  return A(a, r.TableGroup) ? new n(i.symbolFactory.create(wp, {
@@ -9765,7 +9787,7 @@ var Dg = class {
9765
9787
  name: s
9766
9788
  }, a.filepath)) : j(a, r.TableGroup) ? new n(i.symbolFactory.create(Tp, {
9767
9789
  declaration: a,
9768
- name: o?.map(vg).join(".")
9790
+ name: o?.map(Sg).join(".")
9769
9791
  }, a.filepath)) : n.create(e);
9770
9792
  },
9771
9793
  symbolMembers(r, i) {
@@ -9783,7 +9805,7 @@ var Dg = class {
9783
9805
  let t = `${e.kind}:${e.name}`;
9784
9806
  if (e.name !== void 0) {
9785
9807
  let n = e.declaration instanceof z && e.declaration.name ? e.declaration.name : e.declaration, r = c.get(t);
9786
- r ? (s.push(kg.getFieldDuplicateError(e.name, r)), s.push(kg.getFieldDuplicateError(e.name, n))) : c.set(t, n);
9808
+ r ? (s.push(Ng.getFieldDuplicateError(e.name, r)), s.push(Ng.getFieldDuplicateError(e.name, n))) : c.set(t, n);
9787
9809
  }
9788
9810
  }
9789
9811
  return new n(o, s);
@@ -9793,19 +9815,19 @@ var Dg = class {
9793
9815
  nodeReferee(i, a) {
9794
9816
  if (!O(a) || !Df(a, r.TableGroup) || a.parent && kf(a)) return n.create(e);
9795
9817
  let o = i.parseFile(a.filepath).getValue().ast, s = i.nodeSymbol(o).getValue();
9796
- return s === t ? n.create(void 0) : jg(i, s, a);
9818
+ return s === t ? n.create(void 0) : Fg(i, s, a);
9797
9819
  },
9798
9820
  bindNode(i, a) {
9799
9821
  if (!A(a, r.TableGroup)) return n.create(e);
9800
- let o = new Dg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
9822
+ let o = new jg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
9801
9823
  return s && o.push(...i.symbolMembers(s).getErrors()), n.create(void 0, o);
9802
9824
  },
9803
9825
  interpretSymbol(t, i, a) {
9804
9826
  let o = i.declaration;
9805
- return !A(o, r.TableGroup) || !(i instanceof wp) ? n.create(e) : Dm(t, o) ? new Og(t, i, a).interpret() : n.create(void 0);
9827
+ return !A(o, r.TableGroup) || !(i instanceof wp) ? n.create(e) : Dm(t, o) ? new Mg(t, i, a).interpret() : n.create(void 0);
9806
9828
  }
9807
9829
  };
9808
- function jg(e, r, i) {
9830
+ function Fg(e, r, i) {
9809
9831
  let a = Kf(i) ?? "";
9810
9832
  if (!k(i.parentNode)) {
9811
9833
  let o = e.symbolMembers(r).getFiltered(t);
@@ -9832,7 +9854,7 @@ function jg(e, r, i) {
9832
9854
  }
9833
9855
  //#endregion
9834
9856
  //#region src/core/global_modules/tablePartial/bind.ts
9835
- var Mg = class {
9857
+ var Ig = class {
9836
9858
  constructor(e, t) {
9837
9859
  this.compiler = e, this.declarationNode = t;
9838
9860
  }
@@ -9878,7 +9900,7 @@ var Mg = class {
9878
9900
  bindSubElements(e) {
9879
9901
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
9880
9902
  }
9881
- }, Ng = class {
9903
+ }, Lg = class {
9882
9904
  constructor(e, t, n) {
9883
9905
  this.compiler = e, this.declarationNode = t.declaration, this.symbol = t, this.filepath = n, this.tablePartial = {
9884
9906
  name: void 0,
@@ -9994,9 +10016,9 @@ var Mg = class {
9994
10016
  let i = r.getValue();
9995
10017
  return Array.isArray(i) ? this.tablePartial.checks?.push(...i) : i && this.tablePartial.checks?.push(i), r.getErrors();
9996
10018
  }
9997
- }, Pg = { getDuplicateError(e, t, n) {
10019
+ }, Rg = { getDuplicateError(e, t, n) {
9998
10020
  return new T(w.DUPLICATE_NAME, `TablePartial '${e}' already exists in schema '${t}'`, n);
9999
- } }, Fg = {
10021
+ } }, zg = {
10000
10022
  nodeSymbol(i, a) {
10001
10023
  let o = i.nodeFullname(a).getFiltered(t)?.at(-1);
10002
10024
  return A(a, r.TablePartial) ? new n(i.symbolFactory.create(Dp, {
@@ -10022,7 +10044,7 @@ var Mg = class {
10022
10044
  let t = e.name;
10023
10045
  if (t !== void 0) {
10024
10046
  let n = e.declaration instanceof z && e.declaration.name ? e.declaration.name : e.declaration, r = c.get(t);
10025
- r ? (s.push(ug.getColumnDuplicateError(t, r)), s.push(ug.getColumnDuplicateError(t, n))) : c.set(t, n);
10047
+ r ? (s.push(mg.getColumnDuplicateError(t, r)), s.push(mg.getColumnDuplicateError(t, n))) : c.set(t, n);
10026
10048
  }
10027
10049
  }
10028
10050
  return new n(o, s);
@@ -10032,18 +10054,18 @@ var Mg = class {
10032
10054
  nodeReferee(a, o) {
10033
10055
  if (!O(o) && !k(o) || !Df(o, r.TablePartial)) return n.create(e);
10034
10056
  let s = a.parseFile(o.filepath).getValue().ast, c = a.nodeSymbol(s).getValue();
10035
- return c === t ? n.create(void 0) : Of(o, 1) ? Ig(a, c, o) : Af(o, i.Ref) ? Lg(a, c, o) : Rg(a, c, o);
10057
+ return c === t ? n.create(void 0) : Of(o, 1) ? Bg(a, c, o) : Af(o, i.Ref) ? Vg(a, c, o) : Hg(a, c, o);
10036
10058
  },
10037
10059
  bindNode(i, a) {
10038
10060
  if (!A(a, r.TablePartial)) return n.create(e);
10039
- let o = new Mg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
10061
+ let o = new Ig(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
10040
10062
  return s && o.push(...i.symbolMembers(s).getErrors()), n.create(void 0, o);
10041
10063
  },
10042
10064
  interpretSymbol(t, r, i) {
10043
- return r instanceof Dp ? r.declaration instanceof z ? new Ng(t, r, i).interpret() : n.create(void 0) : n.create(e);
10065
+ return r instanceof Dp ? r.declaration instanceof z ? new Lg(t, r, i).interpret() : n.create(void 0) : n.create(e);
10044
10066
  }
10045
10067
  };
10046
- function Ig(e, t, r) {
10068
+ function Bg(e, t, r) {
10047
10069
  if (!O(r)) return new n(void 0);
10048
10070
  let i = Kf(r) ?? "";
10049
10071
  if (!k(r.parentNode)) return n.create(e.lookupMembers(t, I.Enum, i));
@@ -10061,7 +10083,7 @@ function Ig(e, t, r) {
10061
10083
  }
10062
10084
  return new n(void 0);
10063
10085
  }
10064
- function Lg(e, i, a) {
10086
+ function Vg(e, i, a) {
10065
10087
  if (!O(a)) return new n(void 0);
10066
10088
  let o = Kf(a) ?? "";
10067
10089
  if (!k(a.parentNode)) {
@@ -10099,7 +10121,7 @@ function Lg(e, i, a) {
10099
10121
  }
10100
10122
  return new n(void 0);
10101
10123
  }
10102
- function Rg(e, t, r) {
10124
+ function Hg(e, t, r) {
10103
10125
  if (!O(r)) return new n(void 0);
10104
10126
  let i = Kf(r) ?? "";
10105
10127
  if (!k(r.parentNode)) return xo.includes(i.toLowerCase()) ? new n(void 0) : n.create(e.lookupMembers(t, I.Enum, i));
@@ -10128,25 +10150,25 @@ function Rg(e, t, r) {
10128
10150
  }
10129
10151
  //#endregion
10130
10152
  //#region src/core/global_modules/schema/index.ts
10131
- var zg = { symbolMembers(r, i) {
10153
+ var Ug = { symbolMembers(r, i) {
10132
10154
  if (!i.isKind(I.Schema) || !(i instanceof yp)) return n.create(e);
10133
10155
  let a = i.qualifiedName, o = r.usableMembers(i).getFiltered(t);
10134
10156
  if (!o) return n.create([]);
10135
10157
  let s = [...o.nonSchemaMembers], c = new Map(o.schemaMembers.map((e) => [e.name, e])), l = [];
10136
10158
  for (let e of o.reuses.selective) {
10137
- let n = Vg(r, i, e, c);
10159
+ let n = Gg(r, i, e, c);
10138
10160
  l.push(...n.getErrors());
10139
10161
  let a = n.getFiltered(t);
10140
- a && s.push(a), s.push(...Hg(r, i, e));
10162
+ a && s.push(a), s.push(...Kg(r, i, e));
10141
10163
  }
10142
- for (let { importPath: e, node: t } of o.reuses.wildcard) s.push(...Wg(r, i, e, t, c));
10164
+ for (let { importPath: e, node: t } of o.reuses.wildcard) s.push(...Jg(r, i, e, t, c));
10143
10165
  for (let e of o.uses.selective) {
10144
- let n = Vg(r, i, e, c);
10166
+ let n = Gg(r, i, e, c);
10145
10167
  l.push(...n.getErrors());
10146
10168
  let a = n.getFiltered(t);
10147
- a && s.push(a), s.push(...Hg(r, i, e));
10169
+ a && s.push(a), s.push(...Kg(r, i, e));
10148
10170
  }
10149
- for (let { importPath: e, node: t } of o.uses.wildcard) s.push(...Wg(r, i, e, t, c));
10171
+ for (let { importPath: e, node: t } of o.uses.wildcard) s.push(...Jg(r, i, e, t, c));
10150
10172
  s.push(...c.values());
10151
10173
  let u = [...s];
10152
10174
  {
@@ -10158,7 +10180,7 @@ var zg = { symbolMembers(r, i) {
10158
10180
  i && e.push(...i.filter((e) => e.isKind(I.TableGroup)));
10159
10181
  }
10160
10182
  }
10161
- for (let t of e) u.push(...Kg(r, i, t));
10183
+ for (let t of e) u.push(...Xg(r, i, t));
10162
10184
  }
10163
10185
  let d = /* @__PURE__ */ new Set(), f = u.filter((e) => {
10164
10186
  if (e instanceof Lp && e.isKind(I.Schema)) return !1;
@@ -10170,23 +10192,23 @@ var zg = { symbolMembers(r, i) {
10170
10192
  if (p.get(t)) {
10171
10193
  if (e.isKind(I.Schema)) continue;
10172
10194
  let t = e instanceof Lp ? e.useSpecifierDeclaration ?? e.declaration : e.declaration instanceof z && e.declaration.name ? e.declaration.name : e.declaration;
10173
- t && e.name !== void 0 && l.push(Bg(e.kind, e.name, a.join("."), t));
10195
+ t && e.name !== void 0 && l.push(Wg(e.kind, e.name, a.join("."), t));
10174
10196
  } else p.set(t, e);
10175
10197
  }
10176
10198
  return new n(f, l);
10177
10199
  } };
10178
- function Bg(e, t, n, r) {
10200
+ function Wg(e, t, n, r) {
10179
10201
  switch (e) {
10180
- case I.Table: return ug.getDuplicateError(t, n, r);
10202
+ case I.Table: return mg.getDuplicateError(t, n, r);
10181
10203
  case I.Enum: return $m.getDuplicateError(t, n, r);
10182
- case I.TablePartial: return Pg.getDuplicateError(t, n, r);
10183
- case I.TableGroup: return kg.getDuplicateError(t, n, r);
10204
+ case I.TablePartial: return Rg.getDuplicateError(t, n, r);
10205
+ case I.TableGroup: return Ng.getDuplicateError(t, n, r);
10184
10206
  case I.DiagramView: return Gm.getDuplicateError(t, n, r);
10185
10207
  default: return new T(w.DUPLICATE_NAME, `Duplicate ${e} '${t}' in schema '${n}'`, r);
10186
10208
  }
10187
10209
  }
10188
- function Vg(e, r, i, a) {
10189
- let o = eg(e, r, i);
10210
+ function Gg(e, r, i, a) {
10211
+ let o = ig(e, r, i);
10190
10212
  if (o.kind === "none") return n.create(void 0);
10191
10213
  if (o.kind === "direct") {
10192
10214
  let r = e.nodeSymbol(i);
@@ -10197,14 +10219,14 @@ function Vg(e, r, i, a) {
10197
10219
  parent: r
10198
10220
  }, r.filepath)), n.create(void 0);
10199
10221
  }
10200
- function Hg(e, n, r, i = /* @__PURE__ */ new Set()) {
10222
+ function Kg(e, n, r, i = /* @__PURE__ */ new Set()) {
10201
10223
  if (r.getSymbolKind() !== I.Schema || !r.name) return [];
10202
10224
  let a = e.nodeReferee(r.name).getFiltered(t);
10203
10225
  if (!a || !a.isKind(I.Schema)) return [];
10204
- let o = Xh.visibleName(e, r), s = n.qualifiedName;
10205
- return !o || o.length !== s.length || !o.every((e, t) => e === s[t]) ? [] : Ug(e, n, r, a, i);
10226
+ let o = eg.visibleName(e, r), s = n.qualifiedName;
10227
+ return !o || o.length !== s.length || !o.every((e, t) => e === s[t]) ? [] : qg(e, n, r, a, i);
10206
10228
  }
10207
- function Ug(e, n, r, i, a) {
10229
+ function qg(e, n, r, i, a) {
10208
10230
  let o = i.intern();
10209
10231
  if (a.has(o)) return [];
10210
10232
  a.add(o);
@@ -10217,8 +10239,8 @@ function Ug(e, n, r, i, a) {
10217
10239
  useSpecifierDeclaration: r,
10218
10240
  name: t.name
10219
10241
  }, n.filepath));
10220
- for (let t of [...c]) t.isKind(I.TableGroup) && c.push(...Kg(e, n, t));
10221
- for (let i of s.reuses.selective) if (c.push(...Hg(e, n, i, a)), eg(e, n, i).kind === "direct") {
10242
+ for (let t of [...c]) t.isKind(I.TableGroup) && c.push(...Xg(e, n, t));
10243
+ for (let i of s.reuses.selective) if (c.push(...Kg(e, n, i, a)), ig(e, n, i).kind === "direct") {
10222
10244
  let a = e.nodeSymbol(i).getFiltered(t);
10223
10245
  a && a.canBeImported && c.push(e.symbolFactory.create(Lp, {
10224
10246
  kind: a.kind,
@@ -10229,15 +10251,15 @@ function Ug(e, n, r, i, a) {
10229
10251
  }, n.filepath));
10230
10252
  }
10231
10253
  for (let { importPath: t } of s.reuses.wildcard) {
10232
- let i = Gg(e, t, n.qualifiedName);
10233
- i && c.push(...Ug(e, n, r, i, a));
10254
+ let i = Yg(e, t, n.qualifiedName);
10255
+ i && c.push(...qg(e, n, r, i, a));
10234
10256
  }
10235
10257
  return c;
10236
10258
  }
10237
- function Wg(e, n, r, i, a, o = /* @__PURE__ */ new Set()) {
10259
+ function Jg(e, n, r, i, a, o = /* @__PURE__ */ new Set()) {
10238
10260
  if (o.has(r)) return [];
10239
10261
  o.add(r);
10240
- let s = Gg(e, r, n.qualifiedName);
10262
+ let s = Yg(e, r, n.qualifiedName);
10241
10263
  if (!s) return [];
10242
10264
  let c = e.usableMembers(s).getFiltered(t);
10243
10265
  if (!c) return [];
@@ -10251,13 +10273,13 @@ function Wg(e, n, r, i, a, o = /* @__PURE__ */ new Set()) {
10251
10273
  for (let t of c.schemaMembers) a.has(t.name) || a.set(t.name, e.symbolFactory.create(yp, { name: t.name }, n.filepath));
10252
10274
  let { reuses: { selective: u, wildcard: d } } = c;
10253
10275
  for (let r of u) {
10254
- let i = Vg(e, n, r, a).getFiltered(t);
10255
- i && l.push(i), l.push(...Hg(e, n, r));
10276
+ let i = Gg(e, n, r, a).getFiltered(t);
10277
+ i && l.push(i), l.push(...Kg(e, n, r));
10256
10278
  }
10257
- for (let { importPath: t } of d) l.push(...Wg(e, n, t, i, a, o));
10279
+ for (let { importPath: t } of d) l.push(...Jg(e, n, t, i, a, o));
10258
10280
  return l;
10259
10281
  }
10260
- function Gg(e, n, r) {
10282
+ function Yg(e, n, r) {
10261
10283
  if (r.length === 0) return;
10262
10284
  let i = e.usableMembers(n).getFiltered(t);
10263
10285
  if (!i) return;
@@ -10270,7 +10292,7 @@ function Gg(e, n, r) {
10270
10292
  }
10271
10293
  return o;
10272
10294
  }
10273
- function Kg(e, n, r) {
10295
+ function Xg(e, n, r) {
10274
10296
  if (!r.isKind(I.TableGroup) || !(r instanceof Lp)) return [];
10275
10297
  let i = r.originalSymbol, a = e.symbolMembers(i).getFiltered(t);
10276
10298
  if (!a) return [];
@@ -10283,7 +10305,7 @@ function Kg(e, n, r) {
10283
10305
  if (!i || i.length === 0) continue;
10284
10306
  let a = i.length <= 1 ? [y] : i.slice(0, -1);
10285
10307
  if (a.length !== o.length || !o.every((e, t) => e === a[t])) continue;
10286
- let c = t.declaration.filepath, l = qg(e, c, i);
10308
+ let c = t.declaration.filepath, l = Zg(e, c, i);
10287
10309
  l && s.push(e.symbolFactory.create(Lp, {
10288
10310
  kind: I.Table,
10289
10311
  declaration: l.declaration,
@@ -10294,7 +10316,7 @@ function Kg(e, n, r) {
10294
10316
  }
10295
10317
  return s;
10296
10318
  }
10297
- function qg(e, n, r) {
10319
+ function Zg(e, n, r) {
10298
10320
  if (r.length === 1) {
10299
10321
  let i = e.usableMembers(n).getFiltered(t);
10300
10322
  return i ? i.nonSchemaMembers.find((e) => e.isKind(I.Table) && e.name === r[0]) : void 0;
@@ -10308,7 +10330,7 @@ function qg(e, n, r) {
10308
10330
  }
10309
10331
  //#endregion
10310
10332
  //#region src/core/global_modules/note/bind.ts
10311
- var Jg = class {
10333
+ var Qg = class {
10312
10334
  constructor(e, t) {
10313
10335
  this.compiler = e, this.declarationNode = t;
10314
10336
  }
@@ -10323,7 +10345,7 @@ var Jg = class {
10323
10345
  bindSubElements(e) {
10324
10346
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
10325
10347
  }
10326
- }, Yg = class {
10348
+ }, $g = class {
10327
10349
  constructor(e, t, n) {
10328
10350
  this.compiler = e, this.symbol = t, this.declarationNode = t.declaration, this.filepath = n, this.note = {
10329
10351
  name: void 0,
@@ -10356,17 +10378,17 @@ var Jg = class {
10356
10378
  let t = N(e.callee) ?? "";
10357
10379
  return this.note.content = dp(t), [];
10358
10380
  }
10359
- }, Xg = [
10360
- dg,
10381
+ }, e_ = [
10382
+ hg,
10361
10383
  eh,
10362
- Wh,
10384
+ Jh,
10363
10385
  rh,
10364
10386
  ym,
10365
10387
  Fm,
10366
10388
  Vm,
10367
- Lh,
10368
- Ag,
10369
- Fg,
10389
+ Vh,
10390
+ Pg,
10391
+ zg,
10370
10392
  {
10371
10393
  nodeSymbol(i, a) {
10372
10394
  return !A(a, r.Note) || !(a.parentNode instanceof R) ? n.create(e) : new n(i.symbolFactory.create(Ep, {
@@ -10378,19 +10400,19 @@ var Jg = class {
10378
10400
  return r.isKind(I.StickyNote) ? new n([]) : n.create(e);
10379
10401
  },
10380
10402
  bindNode(t, i) {
10381
- return A(i, r.Note) ? n.create(void 0, new Jg(t, i).bind()) : n.create(e);
10403
+ return A(i, r.Note) ? n.create(void 0, new Qg(t, i).bind()) : n.create(e);
10382
10404
  },
10383
10405
  interpretSymbol(t, r, i) {
10384
- return r instanceof Ep ? r.declaration instanceof z ? new Yg(t, r, i).interpret() : n.create(void 0) : n.create(e);
10406
+ return r instanceof Ep ? r.declaration instanceof z ? new $g(t, r, i).interpret() : n.create(void 0) : n.create(e);
10385
10407
  }
10386
10408
  },
10387
- Zh,
10388
- zg,
10409
+ tg,
10410
+ Ug,
10389
10411
  Km,
10390
- Ph
10412
+ Rh
10391
10413
  ];
10392
- function Zg(t, ...r) {
10393
- for (let i of Xg) {
10414
+ function t_(t, ...r) {
10415
+ for (let i of e_) {
10394
10416
  let a = i[t];
10395
10417
  if (a) {
10396
10418
  let t = a(...r);
@@ -10399,37 +10421,37 @@ function Zg(t, ...r) {
10399
10421
  }
10400
10422
  return n.create(e);
10401
10423
  }
10402
- function Qg(r) {
10403
- let i = Zg("nodeSymbol", this, r);
10424
+ function n_(r) {
10425
+ let i = t_("nodeSymbol", this, r);
10404
10426
  return i.hasValue(e) ? n.create(t) : i;
10405
10427
  }
10406
- function $g(r) {
10407
- let i = Zg("symbolMembers", this, r);
10428
+ function r_(r) {
10429
+ let i = t_("symbolMembers", this, r);
10408
10430
  return i.hasValue(e) ? n.create(t) : i;
10409
10431
  }
10410
- function e_(r) {
10411
- let i = Zg("nodeReferee", this, r);
10432
+ function i_(r) {
10433
+ let i = t_("nodeReferee", this, r);
10412
10434
  return i.hasValue(e) ? n.create(t) : i;
10413
10435
  }
10414
- function t_(r) {
10415
- let i = Zg("bindNode", this, r);
10436
+ function a_(r) {
10437
+ let i = t_("bindNode", this, r);
10416
10438
  return i.hasValue(e) ? n.create(t) : i;
10417
10439
  }
10418
- function n_(r) {
10419
- let i = Zg("nodeMetadata", this, r);
10440
+ function o_(r) {
10441
+ let i = t_("nodeMetadata", this, r);
10420
10442
  return i.hasValue(e) ? n.create(t) : i;
10421
10443
  }
10422
- function r_(r, i) {
10423
- let a = Zg("interpretSymbol", this, r, i);
10444
+ function s_(r, i) {
10445
+ let a = t_("interpretSymbol", this, r, i);
10424
10446
  return a.hasValue(e) ? n.create(t) : a;
10425
10447
  }
10426
- function i_(r, i) {
10427
- let a = Zg("interpretMetadata", this, r, i);
10448
+ function c_(r, i) {
10449
+ let a = t_("interpretMetadata", this, r, i);
10428
10450
  return a.hasValue(e) ? n.create(t) : a;
10429
10451
  }
10430
10452
  //#endregion
10431
10453
  //#region src/core/local_modules/checks/validate.ts
10432
- var a_ = class {
10454
+ var l_ = class {
10433
10455
  constructor(e, t) {
10434
10456
  this.compiler = e, this.declarationNode = t;
10435
10457
  }
@@ -10483,10 +10505,10 @@ var a_ = class {
10483
10505
  validateSubElements(e) {
10484
10506
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
10485
10507
  }
10486
- }, o_ = {
10508
+ }, u_ = {
10487
10509
  validateNode(t, i) {
10488
10510
  if (!A(i, r.Checks)) return n.create(e);
10489
- let a = new a_(t, i);
10511
+ let a = new l_(t, i);
10490
10512
  return n.create(void 0, a.validate());
10491
10513
  },
10492
10514
  nodeFullname(t, i) {
@@ -10498,7 +10520,7 @@ var a_ = class {
10498
10520
  nodeSettings(t, i) {
10499
10521
  return A(i, r.Checks) ? i.attributeList ? new n({}, [new T(w.UNEXPECTED_SETTINGS, "A Checks shouldn't have a setting list", i.attributeList)]) : new n({}) : n.create(e);
10500
10522
  }
10501
- }, s_ = class {
10523
+ }, d_ = class {
10502
10524
  constructor(e, t) {
10503
10525
  this.declarationNode = t, this.compiler = e;
10504
10526
  }
@@ -10532,25 +10554,25 @@ var a_ = class {
10532
10554
  };
10533
10555
  //#endregion
10534
10556
  //#region src/core/local_modules/custom/index.ts
10535
- function c_(e) {
10557
+ function f_(e) {
10536
10558
  return e instanceof z && !!e.type?.value;
10537
10559
  }
10538
- var l_ = {
10560
+ var p_ = {
10539
10561
  validateNode(t, r) {
10540
- if (!c_(r)) return n.create(e);
10541
- let i = new s_(t, r);
10562
+ if (!f_(r)) return n.create(e);
10563
+ let i = new d_(t, r);
10542
10564
  return n.create(void 0, i.validate());
10543
10565
  },
10544
10566
  nodeFullname(t, r) {
10545
- return c_(r) ? r.name ? new n(void 0, [new T(w.UNEXPECTED_NAME, "A custom field shouldn't have a name", r.name)]) : new n(void 0) : n.create(e);
10567
+ return f_(r) ? r.name ? new n(void 0, [new T(w.UNEXPECTED_NAME, "A custom field shouldn't have a name", r.name)]) : new n(void 0) : n.create(e);
10546
10568
  },
10547
10569
  nodeAlias(t, r) {
10548
- return c_(r) ? r.alias ? new n(void 0, [new T(w.UNEXPECTED_NAME, "A custom field shouldn't have an alias", r.alias)]) : new n(void 0) : n.create(e);
10570
+ return f_(r) ? r.alias ? new n(void 0, [new T(w.UNEXPECTED_NAME, "A custom field shouldn't have an alias", r.alias)]) : new n(void 0) : n.create(e);
10549
10571
  },
10550
10572
  nodeSettings(t, r) {
10551
- return c_(r) ? r.attributeList ? new n({}, [new T(w.UNEXPECTED_SETTINGS, "A custom field shouldn't have a setting list", r.attributeList)]) : new n({}) : n.create(e);
10573
+ return f_(r) ? r.attributeList ? new n({}, [new T(w.UNEXPECTED_SETTINGS, "A custom field shouldn't have a setting list", r.attributeList)]) : new n({}) : n.create(e);
10552
10574
  }
10553
- }, u_ = class {
10575
+ }, m_ = class {
10554
10576
  constructor(e, t) {
10555
10577
  this.compiler = e, this.declarationNode = t;
10556
10578
  }
@@ -10565,11 +10587,11 @@ var l_ = {
10565
10587
  }
10566
10588
  validateSettings() {
10567
10589
  let e = [];
10568
- this.declarationNode.attributeList && e.push(...d_(this.declarationNode.attributeList).getErrors());
10590
+ this.declarationNode.attributeList && e.push(...h_(this.declarationNode.attributeList).getErrors());
10569
10591
  let t = this.declarationNode.body;
10570
10592
  if (t instanceof U) {
10571
10593
  let n = t.args.find((e) => e instanceof G);
10572
- n && e.push(...d_(n).getErrors());
10594
+ n && e.push(...h_(n).getErrors());
10573
10595
  }
10574
10596
  return e;
10575
10597
  }
@@ -10626,7 +10648,7 @@ var l_ = {
10626
10648
  });
10627
10649
  }
10628
10650
  };
10629
- function d_(e) {
10651
+ function h_(e) {
10630
10652
  let t = E(e), r = [...t.getErrors()], a = t.getValue();
10631
10653
  for (let [e, t] of Object.entries(a)) for (let n of t) switch (e) {
10632
10654
  case i.Color:
@@ -10643,9 +10665,9 @@ function d_(e) {
10643
10665
  }
10644
10666
  //#endregion
10645
10667
  //#region src/core/local_modules/dep/index.ts
10646
- var f_ = {
10668
+ var g_ = {
10647
10669
  validateNode(t, i) {
10648
- return A(i, r.Dep) ? n.create(void 0, new u_(t, i).validate()) : n.create(e);
10670
+ return A(i, r.Dep) ? n.create(void 0, new m_(t, i).validate()) : n.create(e);
10649
10671
  },
10650
10672
  nodeFullname(t, i) {
10651
10673
  return A(i, r.Dep) ? i.name ? lf(i.name) ? new n(M(i.name)) : new n(void 0, [new T(w.INVALID_NAME, "A Dep's name is optional or must be an identifier or a quoted identifier", i.name)]) : new n(void 0) : j(i, r.Dep) ? new n(void 0) : n.create(e);
@@ -10654,14 +10676,14 @@ var f_ = {
10654
10676
  return A(i, r.Dep) ? i.alias ? new n(void 0, [new T(w.UNEXPECTED_ALIAS, "A Dep shouldn't have an alias", i.alias)]) : new n(void 0) : j(i, r.Dep) ? new n(void 0) : n.create(e);
10655
10677
  },
10656
10678
  nodeSettings(t, i) {
10657
- if (A(i, r.Dep)) return i.attributeList ? d_(i.attributeList) : new n({});
10679
+ if (A(i, r.Dep)) return i.attributeList ? h_(i.attributeList) : new n({});
10658
10680
  if (j(i, r.Dep)) {
10659
10681
  let e = [...i.args], t;
10660
- return g(e) instanceof G ? t = g(e) : e[0] instanceof G && (t = e[0]), t ? d_(t) : new n({});
10682
+ return g(e) instanceof G ? t = g(e) : e[0] instanceof G && (t = e[0]), t ? h_(t) : new n({});
10661
10683
  }
10662
10684
  return n.create(e);
10663
10685
  }
10664
- }, p_ = class {
10686
+ }, __ = class {
10665
10687
  constructor(e, t) {
10666
10688
  this.compiler = e, this.declarationNode = t;
10667
10689
  }
@@ -10754,10 +10776,10 @@ var f_ = {
10754
10776
  for (let e of n) xf(e.callee) || (e.args.length > 0 || !M(e.callee)) && t.push(...e.args.map((e) => new T(w.INVALID_DIAGRAMVIEW_FIELD, "DiagramView field should only have a single name", e)));
10755
10777
  return t;
10756
10778
  }
10757
- }, m_ = {
10779
+ }, v_ = {
10758
10780
  validateNode(t, i) {
10759
10781
  if (!A(i, r.DiagramView)) return n.create(e);
10760
- let { errors: a, warnings: o } = new p_(t, i).validate();
10782
+ let { errors: a, warnings: o } = new __(t, i).validate();
10761
10783
  return n.create(void 0, a, o);
10762
10784
  },
10763
10785
  nodeFullname(t, i) {
@@ -10774,7 +10796,7 @@ var f_ = {
10774
10796
  nodeAlias(t, i) {
10775
10797
  return A(i, r.DiagramView) ? new n(void 0) : n.create(e);
10776
10798
  }
10777
- }, h_ = class {
10799
+ }, y_ = class {
10778
10800
  constructor(e, t) {
10779
10801
  this.compiler = e, this.declarationNode = t;
10780
10802
  }
@@ -10833,9 +10855,9 @@ var f_ = {
10833
10855
  validateSubElements(e) {
10834
10856
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
10835
10857
  }
10836
- }, g_ = {
10858
+ }, b_ = {
10837
10859
  validateNode(t, i) {
10838
- return A(i, r.Enum) ? n.create(void 0, new h_(t, i).validate()) : n.create(e);
10860
+ return A(i, r.Enum) ? n.create(void 0, new y_(t, i).validate()) : n.create(e);
10839
10861
  },
10840
10862
  nodeFullname(t, i) {
10841
10863
  if (A(i, r.Enum)) {
@@ -10871,7 +10893,7 @@ var f_ = {
10871
10893
  }
10872
10894
  return n.create(e);
10873
10895
  }
10874
- }, __ = class {
10896
+ }, x_ = class {
10875
10897
  constructor(e, t) {
10876
10898
  this.compiler = e, this.declarationNode = t;
10877
10899
  }
@@ -10940,9 +10962,9 @@ var f_ = {
10940
10962
  validateSubElements(e) {
10941
10963
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
10942
10964
  }
10943
- }, v_ = {
10965
+ }, S_ = {
10944
10966
  validateNode(t, i) {
10945
- return A(i, r.Indexes) ? n.create(void 0, new __(t, i).validate()) : n.create(e);
10967
+ return A(i, r.Indexes) ? n.create(void 0, new x_(t, i).validate()) : n.create(e);
10946
10968
  },
10947
10969
  nodeFullname(t, i) {
10948
10970
  return A(i, r.Indexes) ? i.name ? new n(void 0, [new T(w.UNEXPECTED_NAME, "An Indexes shouldn't have a name", i.name)]) : new n(void 0) : j(i, r.Indexes) ? new n(void 0) : n.create(e);
@@ -10980,7 +11002,7 @@ var f_ = {
10980
11002
  }
10981
11003
  return n.create(e);
10982
11004
  }
10983
- }, y_ = class {
11005
+ }, C_ = class {
10984
11006
  constructor(e, t) {
10985
11007
  this.compiler = e, this.declarationNode = t;
10986
11008
  }
@@ -11035,9 +11057,9 @@ var f_ = {
11035
11057
  validateSubElements(e) {
11036
11058
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
11037
11059
  }
11038
- }, b_ = {
11060
+ }, w_ = {
11039
11061
  validateNode(t, i) {
11040
- return A(i, r.Note) ? n.create(void 0, new y_(t, i).validate()) : n.create(e);
11062
+ return A(i, r.Note) ? n.create(void 0, new C_(t, i).validate()) : n.create(e);
11041
11063
  },
11042
11064
  nodeFullname(t, i) {
11043
11065
  if (!A(i, r.Note)) return n.create(e);
@@ -11053,7 +11075,7 @@ var f_ = {
11053
11075
  nodeSettings(t, i) {
11054
11076
  return A(i, r.Note) ? i.attributeList ? new n({}, [new T(w.UNEXPECTED_SETTINGS, "A Note shouldn't have a setting list", i.attributeList)]) : new n({}) : n.create(e);
11055
11077
  }
11056
- }, x_ = class {
11078
+ }, T_ = class {
11057
11079
  constructor(e, t) {
11058
11080
  this.ast = t, this.compiler = e;
11059
11081
  }
@@ -11065,9 +11087,9 @@ var f_ = {
11065
11087
  }
11066
11088
  return new n(this.ast, e, t);
11067
11089
  }
11068
- }, S_ = {
11090
+ }, E_ = {
11069
11091
  validateNode(t, r) {
11070
- return Ef(r) ? n.create(void 0, new x_(t, r).validate().getErrors()) : n.create(e);
11092
+ return Ef(r) ? n.create(void 0, new T_(t, r).validate().getErrors()) : n.create(e);
11071
11093
  },
11072
11094
  nodeFullname(t, r) {
11073
11095
  return Ef(r) ? new n(void 0) : n.create(e);
@@ -11078,7 +11100,7 @@ var f_ = {
11078
11100
  nodeSettings(t, r) {
11079
11101
  return Ef(r) ? new n({}) : n.create(e);
11080
11102
  }
11081
- }, C_ = class {
11103
+ }, D_ = class {
11082
11104
  constructor(e, t) {
11083
11105
  this.compiler = e, this.declarationNode = t;
11084
11106
  }
@@ -11112,9 +11134,9 @@ var f_ = {
11112
11134
  validateSubElements(e) {
11113
11135
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
11114
11136
  }
11115
- }, w_ = {
11137
+ }, O_ = {
11116
11138
  validateNode(t, i) {
11117
- return A(i, r.Project) ? n.create(void 0, new C_(t, i).validate()) : n.create(e);
11139
+ return A(i, r.Project) ? n.create(void 0, new D_(t, i).validate()) : n.create(e);
11118
11140
  },
11119
11141
  nodeFullname(t, i) {
11120
11142
  return A(i, r.Project) ? i.name ? lf(i.name) ? new n(M(i.name)) : new n(void 0, [new T(w.INVALID_NAME, "A Project's name is optional or must be an identifier or a quoted identifer", i.name)]) : new n(void 0) : j(i, r.Project) ? new n(void 0) : n.create(e);
@@ -11125,7 +11147,7 @@ var f_ = {
11125
11147
  nodeSettings(t, i) {
11126
11148
  return A(i, r.Project) ? i.attributeList ? new n({}, [new T(w.UNEXPECTED_SETTINGS, "A Project shouldn't have a setting list", i.attributeList)]) : new n({}) : j(i, r.Project) ? new n({}) : n.create(e);
11127
11149
  }
11128
- }, T_ = class {
11150
+ }, k_ = class {
11129
11151
  constructor(e, t) {
11130
11152
  this.declarationNode = t, this.compiler = e;
11131
11153
  }
@@ -11190,9 +11212,9 @@ var f_ = {
11190
11212
  validateSubElements(e) {
11191
11213
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
11192
11214
  }
11193
- }, E_ = {
11215
+ }, A_ = {
11194
11216
  validateNode(t, i) {
11195
- return A(i, r.Records) ? n.create(void 0, new T_(t, i).validate()) : n.create(e);
11217
+ return A(i, r.Records) ? n.create(void 0, new k_(t, i).validate()) : n.create(e);
11196
11218
  },
11197
11219
  nodeFullname(i, a) {
11198
11220
  if (A(a, r.Records)) {
@@ -11216,7 +11238,7 @@ var f_ = {
11216
11238
  nodeSettings(t, i) {
11217
11239
  return A(i, r.Records) ? i.attributeList ? new n({}, [new T(w.UNEXPECTED_SETTINGS, "Records cannot have a setting list", i.attributeList)]) : new n({}) : j(i, r.Records) ? new n({}) : n.create(e);
11218
11240
  }
11219
- }, D_ = class {
11241
+ }, j_ = class {
11220
11242
  constructor(e, t) {
11221
11243
  this.compiler = e, this.declarationNode = t;
11222
11244
  }
@@ -11271,13 +11293,13 @@ var f_ = {
11271
11293
  }), t;
11272
11294
  }
11273
11295
  validateFieldSettings(e) {
11274
- return k_(e).getErrors();
11296
+ return N_(e).getErrors();
11275
11297
  }
11276
11298
  validateSubElements(e) {
11277
11299
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
11278
11300
  }
11279
11301
  };
11280
- function O_(e) {
11302
+ function M_(e) {
11281
11303
  if (!(O(e) && e.expression.variable.kind !== v.QUOTED_STRING) && !(e instanceof Wp)) return !1;
11282
11304
  let t;
11283
11305
  if (t = e instanceof Wp ? Lf(e) || "" : e.expression.variable.value, t) switch (t.toLowerCase()) {
@@ -11290,13 +11312,13 @@ function O_(e) {
11290
11312
  }
11291
11313
  return !1;
11292
11314
  }
11293
- function k_(e) {
11315
+ function N_(e) {
11294
11316
  let t = E(e), r = t.getErrors(), a = t.getValue(), o = {};
11295
11317
  for (let [e, t] of Object.entries(a)) switch (e) {
11296
11318
  case i.Delete:
11297
11319
  case i.Update:
11298
11320
  t.length > 1 && t.forEach((t) => r.push(new T(w.DUPLICATE_REF_SETTING, `'${e}' can only appear once`, t))), t.forEach((t) => {
11299
- O_(t.value) || r.push(new T(w.INVALID_REF_SETTING_VALUE, `'${e}' can only have values "cascade", "no action", "set null", "set default" or "restrict"`, t));
11321
+ M_(t.value) || r.push(new T(w.INVALID_REF_SETTING_VALUE, `'${e}' can only have values "cascade", "no action", "set null", "set default" or "restrict"`, t));
11300
11322
  }), o[e] = t;
11301
11323
  break;
11302
11324
  case i.Color:
@@ -11315,9 +11337,9 @@ function k_(e) {
11315
11337
  }
11316
11338
  //#endregion
11317
11339
  //#region src/core/local_modules/ref/index.ts
11318
- var A_ = {
11340
+ var P_ = {
11319
11341
  validateNode(t, i) {
11320
- return A(i, r.Ref) ? n.create(void 0, new D_(t, i).validate()) : n.create(e);
11342
+ return A(i, r.Ref) ? n.create(void 0, new j_(t, i).validate()) : n.create(e);
11321
11343
  },
11322
11344
  nodeFullname(t, i) {
11323
11345
  return A(i, r.Ref) ? i.name ? lf(i.name) ? new n(M(i.name)) : new n(void 0, [new T(w.INVALID_NAME, "A Ref's name is optional or must be an identifier or a quoted identifer", i.name)]) : new n(void 0) : j(i, r.Ref) ? new n(void 0) : n.create(e);
@@ -11329,11 +11351,11 @@ var A_ = {
11329
11351
  if (A(i, r.Ref)) return i.attributeList ? new n({}, [new T(w.UNEXPECTED_SETTINGS, "A Ref shouldn't have a setting list", i.attributeList)]) : new n({});
11330
11352
  if (j(i, r.Ref)) {
11331
11353
  let e = [...i.args], t;
11332
- return g(e) instanceof G ? t = g(e) : e[0] instanceof G && (t = e[0]), t ? k_(t) : new n({});
11354
+ return g(e) instanceof G ? t = g(e) : e[0] instanceof G && (t = e[0]), t ? N_(t) : new n({});
11333
11355
  }
11334
11356
  return n.create(e);
11335
11357
  }
11336
- }, j_ = class {
11358
+ }, F_ = class {
11337
11359
  constructor(e, t) {
11338
11360
  this.declarationNode = t, this.compiler = e;
11339
11361
  }
@@ -11477,7 +11499,7 @@ var A_ = {
11477
11499
  return n.length > 1 && t.push(...n.map((e) => new T(w.NOTE_REDEFINED, "Duplicate notes are defined", e))), t;
11478
11500
  }
11479
11501
  };
11480
- function M_(e) {
11502
+ function I_(e) {
11481
11503
  let t = E(e), r = t.getErrors(), a = t.getValue();
11482
11504
  return Sa(a, (e, t) => {
11483
11505
  switch (t) {
@@ -11495,7 +11517,7 @@ function M_(e) {
11495
11517
  }
11496
11518
  }), new n(a, r);
11497
11519
  }
11498
- function N_(e) {
11520
+ function L_(e) {
11499
11521
  if (!e.slice(0, -1).every(Sf) || !e.slice(-1).every((e) => Sf(e) || e instanceof G)) return new n({}, e.map((e) => new T(w.INVALID_COLUMN, "These fields must be some inline settings optionally ended with a setting list", e)));
11500
11522
  if (e.length === 0) return new n({});
11501
11523
  let t;
@@ -11576,9 +11598,9 @@ function N_(e) {
11576
11598
  }
11577
11599
  //#endregion
11578
11600
  //#region src/core/local_modules/table/index.ts
11579
- var P_ = {
11601
+ var R_ = {
11580
11602
  validateNode(t, i) {
11581
- return A(i, r.Table) ? n.create(void 0, new j_(t, i).validate()) : n.create(e);
11603
+ return A(i, r.Table) ? n.create(void 0, new F_(t, i).validate()) : n.create(e);
11582
11604
  },
11583
11605
  nodeFullname(t, i) {
11584
11606
  if (A(i, r.Table)) {
@@ -11601,9 +11623,9 @@ var P_ = {
11601
11623
  return A(i, r.Table) ? i.alias ? cf(i.alias) ? new n(P(i.alias)) : new n(void 0, [new T(w.INVALID_ALIAS, "Table aliases can only contain alphanumeric and underscore unless surrounded by double quotes", i.alias)]) : new n(void 0) : j(i, r.Table) ? new n(void 0) : n.create(e);
11602
11624
  },
11603
11625
  nodeSettings(t, i) {
11604
- return A(i, r.Table) ? i.attributeList ? M_(i.attributeList) : new n({}) : j(i, r.Table) ? N_(i.args.slice(1)) : n.create(e);
11626
+ return A(i, r.Table) ? i.attributeList ? I_(i.attributeList) : new n({}) : j(i, r.Table) ? L_(i.args.slice(1)) : n.create(e);
11605
11627
  }
11606
- }, F_ = class {
11628
+ }, z_ = class {
11607
11629
  constructor(e, t) {
11608
11630
  this.declarationNode = t, this.compiler = e;
11609
11631
  }
@@ -11661,7 +11683,7 @@ var P_ = {
11661
11683
  return n.length > 1 && t.push(...n.map((e) => new T(w.NOTE_REDEFINED, "Duplicate notes are defined", e))), t;
11662
11684
  }
11663
11685
  };
11664
- function I_(e) {
11686
+ function B_(e) {
11665
11687
  let t = E(e), r = t.getErrors(), i = t.getValue(), a = {};
11666
11688
  for (let [e, t] of Object.entries(i)) switch (e) {
11667
11689
  case "color":
@@ -11682,9 +11704,9 @@ function I_(e) {
11682
11704
  }
11683
11705
  //#endregion
11684
11706
  //#region src/core/local_modules/tableGroup/index.ts
11685
- var L_ = {
11707
+ var V_ = {
11686
11708
  validateNode(t, i) {
11687
- return A(i, r.TableGroup) ? n.create(void 0, new F_(t, i).validate()) : n.create(e);
11709
+ return A(i, r.TableGroup) ? n.create(void 0, new z_(t, i).validate()) : n.create(e);
11688
11710
  },
11689
11711
  nodeFullname(t, i) {
11690
11712
  if (A(i, r.TableGroup)) return i.name ? lf(i.name) ? new n(M(i.name)) : new n(void 0, [new T(w.INVALID_NAME, "A TableGroup name must be a single identifier", i.name)]) : new n(void 0, [new T(w.NAME_NOT_FOUND, "A TableGroup must have a name", i)]);
@@ -11698,9 +11720,9 @@ var L_ = {
11698
11720
  return A(i, r.TableGroup) ? i.alias ? new n(void 0, [new T(w.UNEXPECTED_ALIAS, "A TableGroup shouldn't have an alias", i.alias)]) : new n(void 0) : j(i, r.TableGroup) ? new n(void 0) : n.create(e);
11699
11721
  },
11700
11722
  nodeSettings(t, i) {
11701
- return A(i, r.TableGroup) ? I_(i.attributeList) : j(i, r.TableGroup) ? new n({}) : n.create(e);
11723
+ return A(i, r.TableGroup) ? B_(i.attributeList) : j(i, r.TableGroup) ? new n({}) : n.create(e);
11702
11724
  }
11703
- }, R_ = class {
11725
+ }, H_ = class {
11704
11726
  constructor(e, t) {
11705
11727
  this.compiler = e, this.declarationNode = t;
11706
11728
  }
@@ -11835,7 +11857,7 @@ var L_ = {
11835
11857
  return n.length > 1 && t.push(...n.map((e) => new T(w.NOTE_REDEFINED, "Duplicate notes are defined", e))), t;
11836
11858
  }
11837
11859
  };
11838
- function z_(e) {
11860
+ function U_(e) {
11839
11861
  let t = E(e), r = t.getErrors(), a = t.getValue();
11840
11862
  return Sa(a, (e, t) => {
11841
11863
  switch (t) {
@@ -11853,7 +11875,7 @@ function z_(e) {
11853
11875
  }
11854
11876
  }), new n(a, r);
11855
11877
  }
11856
- function B_(e) {
11878
+ function W_(e) {
11857
11879
  let t = g(e);
11858
11880
  if (e.length > 0 && (!e.slice(0, -1).every(Sf) || !(Sf(t) || t instanceof G))) return new n({}, e.map((e) => new T(w.INVALID_COLUMN, "These fields must be some inline settings optionally ended with a setting list", e)));
11859
11881
  if (e.length === 0) return new n({});
@@ -11930,9 +11952,9 @@ function B_(e) {
11930
11952
  }
11931
11953
  //#endregion
11932
11954
  //#region src/core/local_modules/tablePartial/index.ts
11933
- var V_ = {
11955
+ var G_ = {
11934
11956
  validateNode(t, i) {
11935
- return A(i, r.TablePartial) ? n.create(void 0, new R_(t, i).validate()) : n.create(e);
11957
+ return A(i, r.TablePartial) ? n.create(void 0, new H_(t, i).validate()) : n.create(e);
11936
11958
  },
11937
11959
  nodeFullname(t, i) {
11938
11960
  if (A(i, r.TablePartial)) return i.name ? lf(i.name) ? new n(M(i.name)) : new n(void 0, [new T(w.INVALID_NAME, "A TablePartial name must be an identifier or a quoted identifer", i.name)]) : new n(void 0, [new T(w.NAME_NOT_FOUND, "A TablePartial must have a name", i)]);
@@ -11946,9 +11968,9 @@ var V_ = {
11946
11968
  return A(i, r.TablePartial) ? i.alias ? new n(void 0, [new T(w.UNEXPECTED_ALIAS, "A TablePartial shouldn't have an alias", i.alias)]) : new n(P(i.alias)) : j(i, r.TablePartial) ? new n(void 0) : n.create(e);
11947
11969
  },
11948
11970
  nodeSettings(t, i) {
11949
- return A(i, r.TablePartial) ? z_(i.attributeList) : j(i, r.TablePartial) ? B_(i.args.slice(1)) : n.create(e);
11971
+ return A(i, r.TablePartial) ? U_(i.attributeList) : j(i, r.TablePartial) ? W_(i.args.slice(1)) : n.create(e);
11950
11972
  }
11951
- }, H_ = class {
11973
+ }, K_ = class {
11952
11974
  constructor(e, t) {
11953
11975
  this.compiler = e, this.declarationNode = t;
11954
11976
  }
@@ -11972,23 +11994,23 @@ var V_ = {
11972
11994
  ...this.compiler.nodeAlias(e).getErrors()
11973
11995
  ];
11974
11996
  }
11975
- }, U_ = [
11997
+ }, q_ = [
11998
+ R_,
11999
+ b_,
12000
+ A_,
12001
+ S_,
12002
+ u_,
11976
12003
  P_,
11977
12004
  g_,
11978
- E_,
11979
- v_,
11980
- o_,
11981
- A_,
11982
- f_,
11983
- w_,
11984
- L_,
12005
+ O_,
11985
12006
  V_,
11986
- b_,
11987
- m_,
11988
- S_,
12007
+ G_,
12008
+ w_,
12009
+ v_,
12010
+ E_,
11989
12011
  {
11990
12012
  validateNode(t, r) {
11991
- return r instanceof Vp ? n.create(void 0, new H_(t, r).validate()) : n.create(e);
12013
+ return r instanceof Vp ? n.create(void 0, new K_(t, r).validate()) : n.create(e);
11992
12014
  },
11993
12015
  nodeFullname(t, r) {
11994
12016
  if (!Tf(r)) return n.create(e);
@@ -12002,10 +12024,10 @@ var V_ = {
12002
12024
  return r instanceof Vp ? n.create({}) : n.create(e);
12003
12025
  }
12004
12026
  },
12005
- l_
12027
+ p_
12006
12028
  ];
12007
- function W_(t, ...r) {
12008
- for (let n of U_) {
12029
+ function J_(t, ...r) {
12030
+ for (let n of q_) {
12009
12031
  let i = n[t];
12010
12032
  if (i) {
12011
12033
  let t = i(...r);
@@ -12014,57 +12036,57 @@ function W_(t, ...r) {
12014
12036
  }
12015
12037
  return n.create(e);
12016
12038
  }
12017
- function G_(r) {
12018
- let i = W_("validateNode", this, r);
12039
+ function Y_(r) {
12040
+ let i = J_("validateNode", this, r);
12019
12041
  return i.hasValue(e) ? n.create(t) : i;
12020
12042
  }
12021
- function K_(r) {
12022
- let i = W_("nodeSettings", this, r);
12043
+ function X_(r) {
12044
+ let i = J_("nodeSettings", this, r);
12023
12045
  return i.hasValue(e) ? n.create(t) : i;
12024
12046
  }
12025
- function q_(r) {
12026
- let i = W_("nodeFullname", this, r);
12047
+ function Z_(r) {
12048
+ let i = J_("nodeFullname", this, r);
12027
12049
  return i.hasValue(e) ? n.create(t) : i;
12028
12050
  }
12029
- function J_(r) {
12030
- let i = W_("nodeAlias", this, r);
12051
+ function Q_(r) {
12052
+ let i = J_("nodeAlias", this, r);
12031
12053
  return i.hasValue(e) ? n.create(t) : i;
12032
12054
  }
12033
- var Y_ = typeof document < "u" && document.location && document.location.hash.indexOf("pseudo=true") >= 0;
12034
- function X_(e, t) {
12055
+ var $_ = typeof document < "u" && document.location && document.location.hash.indexOf("pseudo=true") >= 0;
12056
+ function ev(e, t) {
12035
12057
  let n;
12036
12058
  return n = t.length === 0 ? e : e.replace(/\{(\d+)\}/g, (e, n) => {
12037
12059
  let r = t[n[0]], i = e;
12038
12060
  return typeof r == "string" ? i = r : (typeof r == "number" || typeof r == "boolean" || r == null) && (i = String(r)), i;
12039
- }), Y_ && (n = "[" + n.replace(/[aouei]/g, "$&$&") + "]"), n;
12061
+ }), $_ && (n = "[" + n.replace(/[aouei]/g, "$&$&") + "]"), n;
12040
12062
  }
12041
- function Z_(e, t, ...n) {
12042
- return X_(t, n);
12063
+ function tv(e, t, ...n) {
12064
+ return ev(t, n);
12043
12065
  }
12044
12066
  //#endregion
12045
12067
  //#region ../../node_modules/monaco-editor-core/esm/vs/base/common/platform.js
12046
- var Q_ = !1, $_ = !1, ev = !1, tv = !1, nv = void 0, rv = typeof self == "object" ? self : typeof global == "object" ? global : {}, iv = void 0;
12047
- rv.vscode !== void 0 && rv.vscode.process !== void 0 ? iv = rv.vscode.process : typeof process < "u" && (iv = process);
12048
- var av = typeof iv?.versions?.electron == "string" && iv?.type === "renderer";
12049
- if (typeof navigator == "object" && !av) nv = navigator.userAgent, Q_ = nv.indexOf("Windows") >= 0, $_ = nv.indexOf("Macintosh") >= 0, (nv.indexOf("Macintosh") >= 0 || nv.indexOf("iPad") >= 0 || nv.indexOf("iPhone") >= 0) && navigator.maxTouchPoints && navigator.maxTouchPoints, ev = nv.indexOf("Linux") >= 0, nv?.indexOf("Mobi"), tv = !0, Z_({
12068
+ var nv = !1, rv = !1, iv = !1, av = !1, ov = void 0, sv = typeof self == "object" ? self : typeof global == "object" ? global : {}, cv = void 0;
12069
+ sv.vscode !== void 0 && sv.vscode.process !== void 0 ? cv = sv.vscode.process : typeof process < "u" && (cv = process);
12070
+ var lv = typeof cv?.versions?.electron == "string" && cv?.type === "renderer";
12071
+ if (typeof navigator == "object" && !lv) ov = navigator.userAgent, nv = ov.indexOf("Windows") >= 0, rv = ov.indexOf("Macintosh") >= 0, (ov.indexOf("Macintosh") >= 0 || ov.indexOf("iPad") >= 0 || ov.indexOf("iPhone") >= 0) && navigator.maxTouchPoints && navigator.maxTouchPoints, iv = ov.indexOf("Linux") >= 0, ov?.indexOf("Mobi"), av = !0, tv({
12050
12072
  key: "ensureLoaderPluginIsLoaded",
12051
12073
  comment: ["{Locked}"]
12052
12074
  }, "_"), navigator.language;
12053
- else if (typeof iv == "object") {
12054
- Q_ = iv.platform === "win32", $_ = iv.platform === "darwin", ev = iv.platform === "linux", ev && iv.env.SNAP && iv.env.SNAP_REVISION, iv.env.CI || iv.env.BUILD_ARTIFACTSTAGINGDIRECTORY;
12055
- let e = iv.env.VSCODE_NLS_CONFIG;
12075
+ else if (typeof cv == "object") {
12076
+ nv = cv.platform === "win32", rv = cv.platform === "darwin", iv = cv.platform === "linux", iv && cv.env.SNAP && cv.env.SNAP_REVISION, cv.env.CI || cv.env.BUILD_ARTIFACTSTAGINGDIRECTORY;
12077
+ let e = cv.env.VSCODE_NLS_CONFIG;
12056
12078
  if (e) try {
12057
12079
  let t = JSON.parse(e);
12058
12080
  t.availableLanguages["*"], t.locale, t.osLocale, t._translationsConfigFile;
12059
12081
  } catch {}
12060
12082
  } else console.error("Unable to resolve platform.");
12061
- var ov = Q_, sv = $_;
12062
- tv && rv.importScripts;
12063
- var cv = nv, lv = typeof rv.postMessage == "function" && !rv.importScripts;
12083
+ var uv = nv, dv = rv;
12084
+ av && sv.importScripts;
12085
+ var fv = ov, pv = typeof sv.postMessage == "function" && !sv.importScripts;
12064
12086
  (() => {
12065
- if (lv) {
12087
+ if (pv) {
12066
12088
  let e = [];
12067
- rv.addEventListener("message", (t) => {
12089
+ sv.addEventListener("message", (t) => {
12068
12090
  if (t.data && t.data.vscodeScheduleAsyncWork) for (let n = 0, r = e.length; n < r; n++) {
12069
12091
  let r = e[n];
12070
12092
  if (r.id === t.data.vscodeScheduleAsyncWork) {
@@ -12079,19 +12101,19 @@ var cv = nv, lv = typeof rv.postMessage == "function" && !rv.importScripts;
12079
12101
  e.push({
12080
12102
  id: r,
12081
12103
  callback: n
12082
- }), rv.postMessage({ vscodeScheduleAsyncWork: r }, "*");
12104
+ }), sv.postMessage({ vscodeScheduleAsyncWork: r }, "*");
12083
12105
  };
12084
12106
  }
12085
12107
  return (e) => setTimeout(e);
12086
12108
  })();
12087
- var uv = !!(cv && cv.indexOf("Chrome") >= 0);
12088
- cv && cv.indexOf("Firefox"), !uv && cv && cv.indexOf("Safari"), cv && cv.indexOf("Edg/"), cv && cv.indexOf("Android");
12109
+ var mv = !!(fv && fv.indexOf("Chrome") >= 0);
12110
+ fv && fv.indexOf("Firefox"), !mv && fv && fv.indexOf("Safari"), fv && fv.indexOf("Edg/"), fv && fv.indexOf("Android");
12089
12111
  //#endregion
12090
12112
  //#region ../../node_modules/monaco-editor-core/esm/vs/base/common/process.js
12091
- var dv;
12092
- if (rv.vscode !== void 0 && rv.vscode.process !== void 0) {
12093
- let e = rv.vscode.process;
12094
- dv = {
12113
+ var hv;
12114
+ if (sv.vscode !== void 0 && sv.vscode.process !== void 0) {
12115
+ let e = sv.vscode.process;
12116
+ hv = {
12095
12117
  get platform() {
12096
12118
  return e.platform;
12097
12119
  },
@@ -12105,7 +12127,7 @@ if (rv.vscode !== void 0 && rv.vscode.process !== void 0) {
12105
12127
  return e.cwd();
12106
12128
  }
12107
12129
  };
12108
- } else dv = typeof process < "u" ? {
12130
+ } else hv = typeof process < "u" ? {
12109
12131
  get platform() {
12110
12132
  return process.platform;
12111
12133
  },
@@ -12120,7 +12142,7 @@ if (rv.vscode !== void 0 && rv.vscode.process !== void 0) {
12120
12142
  }
12121
12143
  } : {
12122
12144
  get platform() {
12123
- return ov ? "win32" : sv ? "darwin" : "linux";
12145
+ return uv ? "win32" : dv ? "darwin" : "linux";
12124
12146
  },
12125
12147
  get arch() {},
12126
12148
  get env() {
@@ -12130,7 +12152,7 @@ if (rv.vscode !== void 0 && rv.vscode.process !== void 0) {
12130
12152
  return "/";
12131
12153
  }
12132
12154
  };
12133
- var fv = dv.cwd, pv = dv.env, mv = dv.platform, hv = 65, gv = 97, _v = 90, vv = 122, yv = 46, bv = 47, xv = 92, Sv = 58, Cv = 63, wv = class extends Error {
12155
+ var gv = hv.cwd, _v = hv.env, vv = hv.platform, yv = 65, bv = 97, xv = 90, Sv = 122, Cv = 46, wv = 47, Tv = 92, Ev = 58, Dv = 63, Ov = class extends Error {
12134
12156
  constructor(e, t, n) {
12135
12157
  let r;
12136
12158
  typeof t == "string" && t.indexOf("not ") === 0 ? (r = "must not be", t = t.replace(/^not /, "")) : r = "must be";
@@ -12138,31 +12160,31 @@ var fv = dv.cwd, pv = dv.env, mv = dv.platform, hv = 65, gv = 97, _v = 90, vv =
12138
12160
  i += `. Received type ${typeof n}`, super(i), this.code = "ERR_INVALID_ARG_TYPE";
12139
12161
  }
12140
12162
  };
12141
- function Tv(e, t) {
12142
- if (typeof e != "object" || !e) throw new wv(t, "Object", e);
12163
+ function kv(e, t) {
12164
+ if (typeof e != "object" || !e) throw new Ov(t, "Object", e);
12143
12165
  }
12144
- function Ev(e, t) {
12145
- if (typeof e != "string") throw new wv(t, "string", e);
12166
+ function Av(e, t) {
12167
+ if (typeof e != "string") throw new Ov(t, "string", e);
12146
12168
  }
12147
- var Dv = mv === "win32";
12169
+ var jv = vv === "win32";
12148
12170
  function q(e) {
12149
- return e === bv || e === xv;
12171
+ return e === wv || e === Tv;
12150
12172
  }
12151
- function Ov(e) {
12152
- return e === bv;
12173
+ function Mv(e) {
12174
+ return e === wv;
12153
12175
  }
12154
- function kv(e) {
12155
- return e >= hv && e <= _v || e >= gv && e <= vv;
12176
+ function Nv(e) {
12177
+ return e >= yv && e <= xv || e >= bv && e <= Sv;
12156
12178
  }
12157
- function Av(e, t, n, r) {
12179
+ function Pv(e, t, n, r) {
12158
12180
  let i = "", a = 0, o = -1, s = 0, c = 0;
12159
12181
  for (let l = 0; l <= e.length; ++l) {
12160
12182
  if (l < e.length) c = e.charCodeAt(l);
12161
12183
  else if (r(c)) break;
12162
- else c = bv;
12184
+ else c = wv;
12163
12185
  if (r(c)) {
12164
12186
  if (!(o === l - 1 || s === 1)) if (s === 2) {
12165
- if (i.length < 2 || a !== 2 || i.charCodeAt(i.length - 1) !== yv || i.charCodeAt(i.length - 2) !== yv) {
12187
+ if (i.length < 2 || a !== 2 || i.charCodeAt(i.length - 1) !== Cv || i.charCodeAt(i.length - 2) !== Cv) {
12166
12188
  if (i.length > 2) {
12167
12189
  let e = i.lastIndexOf(n);
12168
12190
  e === -1 ? (i = "", a = 0) : (i = i.slice(0, e), a = i.length - 1 - i.lastIndexOf(n)), o = l, s = 0;
@@ -12175,23 +12197,23 @@ function Av(e, t, n, r) {
12175
12197
  t && (i += i.length > 0 ? `${n}..` : "..", a = 2);
12176
12198
  } else i.length > 0 ? i += `${n}${e.slice(o + 1, l)}` : i = e.slice(o + 1, l), a = l - o - 1;
12177
12199
  o = l, s = 0;
12178
- } else c === yv && s !== -1 ? ++s : s = -1;
12200
+ } else c === Cv && s !== -1 ? ++s : s = -1;
12179
12201
  }
12180
12202
  return i;
12181
12203
  }
12182
- function jv(e, t) {
12183
- Tv(t, "pathObject");
12204
+ function Fv(e, t) {
12205
+ kv(t, "pathObject");
12184
12206
  let n = t.dir || t.root, r = t.base || `${t.name || ""}${t.ext || ""}`;
12185
12207
  return n ? n === t.root ? `${n}${r}` : `${n}${e}${r}` : r;
12186
12208
  }
12187
- var Mv = {
12209
+ var Iv = {
12188
12210
  resolve(...e) {
12189
12211
  let t = "", n = "", r = !1;
12190
12212
  for (let i = e.length - 1; i >= -1; i--) {
12191
12213
  let a;
12192
12214
  if (i >= 0) {
12193
- if (a = e[i], Ev(a, "path"), a.length === 0) continue;
12194
- } else t.length === 0 ? a = fv() : (a = pv[`=${t}`] || fv(), (a === void 0 || a.slice(0, 2).toLowerCase() !== t.toLowerCase() && a.charCodeAt(2) === xv) && (a = `${t}\\`));
12215
+ if (a = e[i], Av(a, "path"), a.length === 0) continue;
12216
+ } else t.length === 0 ? a = gv() : (a = _v[`=${t}`] || gv(), (a === void 0 || a.slice(0, 2).toLowerCase() !== t.toLowerCase() && a.charCodeAt(2) === Tv) && (a = `${t}\\`));
12195
12217
  let o = a.length, s = 0, c = "", l = !1, u = a.charCodeAt(0);
12196
12218
  if (o === 1) q(u) && (s = 1, l = !0);
12197
12219
  else if (q(u)) if (l = !0, q(a.charCodeAt(1))) {
@@ -12206,7 +12228,7 @@ var Mv = {
12206
12228
  }
12207
12229
  }
12208
12230
  } else s = 1;
12209
- else kv(u) && a.charCodeAt(1) === Sv && (c = a.slice(0, 2), s = 2, o > 2 && q(a.charCodeAt(2)) && (l = !0, s = 3));
12231
+ else Nv(u) && a.charCodeAt(1) === Ev && (c = a.slice(0, 2), s = 2, o > 2 && q(a.charCodeAt(2)) && (l = !0, s = 3));
12210
12232
  if (c.length > 0) if (t.length > 0) {
12211
12233
  if (c.toLowerCase() !== t.toLowerCase()) continue;
12212
12234
  } else t = c;
@@ -12214,14 +12236,14 @@ var Mv = {
12214
12236
  if (t.length > 0) break;
12215
12237
  } else if (n = `${a.slice(s)}\\${n}`, r = l, l && t.length > 0) break;
12216
12238
  }
12217
- return n = Av(n, !r, "\\", q), r ? `${t}\\${n}` : `${t}${n}` || ".";
12239
+ return n = Pv(n, !r, "\\", q), r ? `${t}\\${n}` : `${t}${n}` || ".";
12218
12240
  },
12219
12241
  normalize(e) {
12220
- Ev(e, "path");
12242
+ Av(e, "path");
12221
12243
  let t = e.length;
12222
12244
  if (t === 0) return ".";
12223
12245
  let n = 0, r, i = !1, a = e.charCodeAt(0);
12224
- if (t === 1) return Ov(a) ? "\\" : e;
12246
+ if (t === 1) return Mv(a) ? "\\" : e;
12225
12247
  if (q(a)) if (i = !0, q(e.charCodeAt(1))) {
12226
12248
  let i = 2, a = i;
12227
12249
  for (; i < t && !q(e.charCodeAt(i));) i++;
@@ -12235,23 +12257,23 @@ var Mv = {
12235
12257
  }
12236
12258
  }
12237
12259
  } else n = 1;
12238
- else kv(a) && e.charCodeAt(1) === Sv && (r = e.slice(0, 2), n = 2, t > 2 && q(e.charCodeAt(2)) && (i = !0, n = 3));
12239
- let o = n < t ? Av(e.slice(n), !i, "\\", q) : "";
12260
+ else Nv(a) && e.charCodeAt(1) === Ev && (r = e.slice(0, 2), n = 2, t > 2 && q(e.charCodeAt(2)) && (i = !0, n = 3));
12261
+ let o = n < t ? Pv(e.slice(n), !i, "\\", q) : "";
12240
12262
  return o.length === 0 && !i && (o = "."), o.length > 0 && q(e.charCodeAt(t - 1)) && (o += "\\"), r === void 0 ? i ? `\\${o}` : o : i ? `${r}\\${o}` : `${r}${o}`;
12241
12263
  },
12242
12264
  isAbsolute(e) {
12243
- Ev(e, "path");
12265
+ Av(e, "path");
12244
12266
  let t = e.length;
12245
12267
  if (t === 0) return !1;
12246
12268
  let n = e.charCodeAt(0);
12247
- return q(n) || t > 2 && kv(n) && e.charCodeAt(1) === Sv && q(e.charCodeAt(2));
12269
+ return q(n) || t > 2 && Nv(n) && e.charCodeAt(1) === Ev && q(e.charCodeAt(2));
12248
12270
  },
12249
12271
  join(...e) {
12250
12272
  if (e.length === 0) return ".";
12251
12273
  let t, n;
12252
12274
  for (let r = 0; r < e.length; ++r) {
12253
12275
  let i = e[r];
12254
- Ev(i, "path"), i.length > 0 && (t === void 0 ? t = n = i : t += `\\${i}`);
12276
+ Av(i, "path"), i.length > 0 && (t === void 0 ? t = n = i : t += `\\${i}`);
12255
12277
  }
12256
12278
  if (t === void 0) return ".";
12257
12279
  let r = !0, i = 0;
@@ -12264,53 +12286,53 @@ var Mv = {
12264
12286
  for (; i < t.length && q(t.charCodeAt(i));) i++;
12265
12287
  i >= 2 && (t = `\\${t.slice(i)}`);
12266
12288
  }
12267
- return Mv.normalize(t);
12289
+ return Iv.normalize(t);
12268
12290
  },
12269
12291
  relative(e, t) {
12270
- if (Ev(e, "from"), Ev(t, "to"), e === t) return "";
12271
- let n = Mv.resolve(e), r = Mv.resolve(t);
12292
+ if (Av(e, "from"), Av(t, "to"), e === t) return "";
12293
+ let n = Iv.resolve(e), r = Iv.resolve(t);
12272
12294
  if (n === r || (e = n.toLowerCase(), t = r.toLowerCase(), e === t)) return "";
12273
12295
  let i = 0;
12274
- for (; i < e.length && e.charCodeAt(i) === xv;) i++;
12296
+ for (; i < e.length && e.charCodeAt(i) === Tv;) i++;
12275
12297
  let a = e.length;
12276
- for (; a - 1 > i && e.charCodeAt(a - 1) === xv;) a--;
12298
+ for (; a - 1 > i && e.charCodeAt(a - 1) === Tv;) a--;
12277
12299
  let o = a - i, s = 0;
12278
- for (; s < t.length && t.charCodeAt(s) === xv;) s++;
12300
+ for (; s < t.length && t.charCodeAt(s) === Tv;) s++;
12279
12301
  let c = t.length;
12280
- for (; c - 1 > s && t.charCodeAt(c - 1) === xv;) c--;
12302
+ for (; c - 1 > s && t.charCodeAt(c - 1) === Tv;) c--;
12281
12303
  let l = c - s, u = o < l ? o : l, d = -1, f = 0;
12282
12304
  for (; f < u; f++) {
12283
12305
  let n = e.charCodeAt(i + f);
12284
12306
  if (n !== t.charCodeAt(s + f)) break;
12285
- n === xv && (d = f);
12307
+ n === Tv && (d = f);
12286
12308
  }
12287
12309
  if (f !== u) {
12288
12310
  if (d === -1) return r;
12289
12311
  } else {
12290
12312
  if (l > u) {
12291
- if (t.charCodeAt(s + f) === xv) return r.slice(s + f + 1);
12313
+ if (t.charCodeAt(s + f) === Tv) return r.slice(s + f + 1);
12292
12314
  if (f === 2) return r.slice(s + f);
12293
12315
  }
12294
- o > u && (e.charCodeAt(i + f) === xv ? d = f : f === 2 && (d = 3)), d === -1 && (d = 0);
12316
+ o > u && (e.charCodeAt(i + f) === Tv ? d = f : f === 2 && (d = 3)), d === -1 && (d = 0);
12295
12317
  }
12296
12318
  let p = "";
12297
- for (f = i + d + 1; f <= a; ++f) (f === a || e.charCodeAt(f) === xv) && (p += p.length === 0 ? ".." : "\\..");
12298
- return s += d, p.length > 0 ? `${p}${r.slice(s, c)}` : (r.charCodeAt(s) === xv && ++s, r.slice(s, c));
12319
+ for (f = i + d + 1; f <= a; ++f) (f === a || e.charCodeAt(f) === Tv) && (p += p.length === 0 ? ".." : "\\..");
12320
+ return s += d, p.length > 0 ? `${p}${r.slice(s, c)}` : (r.charCodeAt(s) === Tv && ++s, r.slice(s, c));
12299
12321
  },
12300
12322
  toNamespacedPath(e) {
12301
12323
  if (typeof e != "string" || e.length === 0) return e;
12302
- let t = Mv.resolve(e);
12324
+ let t = Iv.resolve(e);
12303
12325
  if (t.length <= 2) return e;
12304
- if (t.charCodeAt(0) === xv) {
12305
- if (t.charCodeAt(1) === xv) {
12326
+ if (t.charCodeAt(0) === Tv) {
12327
+ if (t.charCodeAt(1) === Tv) {
12306
12328
  let e = t.charCodeAt(2);
12307
- if (e !== Cv && e !== yv) return `\\\\?\\UNC\\${t.slice(2)}`;
12329
+ if (e !== Dv && e !== Cv) return `\\\\?\\UNC\\${t.slice(2)}`;
12308
12330
  }
12309
- } else if (kv(t.charCodeAt(0)) && t.charCodeAt(1) === Sv && t.charCodeAt(2) === xv) return `\\\\?\\${t}`;
12331
+ } else if (Nv(t.charCodeAt(0)) && t.charCodeAt(1) === Ev && t.charCodeAt(2) === Tv) return `\\\\?\\${t}`;
12310
12332
  return e;
12311
12333
  },
12312
12334
  dirname(e) {
12313
- Ev(e, "path");
12335
+ Av(e, "path");
12314
12336
  let t = e.length;
12315
12337
  if (t === 0) return ".";
12316
12338
  let n = -1, r = 0, i = e.charCodeAt(0);
@@ -12328,7 +12350,7 @@ var Mv = {
12328
12350
  }
12329
12351
  }
12330
12352
  }
12331
- } else kv(i) && e.charCodeAt(1) === Sv && (n = t > 2 && q(e.charCodeAt(2)) ? 3 : 2, r = n);
12353
+ } else Nv(i) && e.charCodeAt(1) === Ev && (n = t > 2 && q(e.charCodeAt(2)) ? 3 : 2, r = n);
12332
12354
  let a = -1, o = !0;
12333
12355
  for (let n = t - 1; n >= r; --n) if (q(e.charCodeAt(n))) {
12334
12356
  if (!o) {
@@ -12343,9 +12365,9 @@ var Mv = {
12343
12365
  return e.slice(0, a);
12344
12366
  },
12345
12367
  basename(e, t) {
12346
- t !== void 0 && Ev(t, "ext"), Ev(e, "path");
12368
+ t !== void 0 && Av(t, "ext"), Av(e, "path");
12347
12369
  let n = 0, r = -1, i = !0, a;
12348
- if (e.length >= 2 && kv(e.charCodeAt(0)) && e.charCodeAt(1) === Sv && (n = 2), t !== void 0 && t.length > 0 && t.length <= e.length) {
12370
+ if (e.length >= 2 && Nv(e.charCodeAt(0)) && e.charCodeAt(1) === Ev && (n = 2), t !== void 0 && t.length > 0 && t.length <= e.length) {
12349
12371
  if (t === e) return "";
12350
12372
  let o = t.length - 1, s = -1;
12351
12373
  for (a = e.length - 1; a >= n; --a) {
@@ -12368,9 +12390,9 @@ var Mv = {
12368
12390
  return r === -1 ? "" : e.slice(n, r);
12369
12391
  },
12370
12392
  extname(e) {
12371
- Ev(e, "path");
12393
+ Av(e, "path");
12372
12394
  let t = 0, n = -1, r = 0, i = -1, a = !0, o = 0;
12373
- e.length >= 2 && e.charCodeAt(1) === Sv && kv(e.charCodeAt(0)) && (t = r = 2);
12395
+ e.length >= 2 && e.charCodeAt(1) === Ev && Nv(e.charCodeAt(0)) && (t = r = 2);
12374
12396
  for (let s = e.length - 1; s >= t; --s) {
12375
12397
  let t = e.charCodeAt(s);
12376
12398
  if (q(t)) {
@@ -12380,13 +12402,13 @@ var Mv = {
12380
12402
  }
12381
12403
  continue;
12382
12404
  }
12383
- i === -1 && (a = !1, i = s + 1), t === yv ? n === -1 ? n = s : o !== 1 && (o = 1) : n !== -1 && (o = -1);
12405
+ i === -1 && (a = !1, i = s + 1), t === Cv ? n === -1 ? n = s : o !== 1 && (o = 1) : n !== -1 && (o = -1);
12384
12406
  }
12385
12407
  return n === -1 || i === -1 || o === 0 || o === 1 && n === i - 1 && n === r + 1 ? "" : e.slice(n, i);
12386
12408
  },
12387
- format: jv.bind(null, "\\"),
12409
+ format: Fv.bind(null, "\\"),
12388
12410
  parse(e) {
12389
- Ev(e, "path");
12411
+ Av(e, "path");
12390
12412
  let t = {
12391
12413
  root: "",
12392
12414
  dir: "",
@@ -12409,7 +12431,7 @@ var Mv = {
12409
12431
  }
12410
12432
  }
12411
12433
  }
12412
- } else if (kv(i) && e.charCodeAt(1) === Sv) {
12434
+ } else if (Nv(i) && e.charCodeAt(1) === Ev) {
12413
12435
  if (n <= 2) return t.root = t.dir = e, t;
12414
12436
  if (r = 2, q(e.charCodeAt(2))) {
12415
12437
  if (n === 3) return t.root = t.dir = e, t;
@@ -12426,7 +12448,7 @@ var Mv = {
12426
12448
  }
12427
12449
  continue;
12428
12450
  }
12429
- s === -1 && (c = !1, s = l + 1), i === yv ? a === -1 ? a = l : u !== 1 && (u = 1) : a !== -1 && (u = -1);
12451
+ s === -1 && (c = !1, s = l + 1), i === Cv ? a === -1 ? a = l : u !== 1 && (u = 1) : a !== -1 && (u = -1);
12430
12452
  }
12431
12453
  return s !== -1 && (a === -1 || u === 0 || u === 1 && a === s - 1 && a === o + 1 ? t.base = t.name = e.slice(o, s) : (t.name = e.slice(o, a), t.base = e.slice(o, s), t.ext = e.slice(a, s))), o > 0 && o !== r ? t.dir = e.slice(0, o - 1) : t.dir = t.root, t;
12432
12454
  },
@@ -12434,64 +12456,64 @@ var Mv = {
12434
12456
  delimiter: ";",
12435
12457
  win32: null,
12436
12458
  posix: null
12437
- }, Nv = (() => {
12438
- if (Dv) {
12459
+ }, Lv = (() => {
12460
+ if (jv) {
12439
12461
  let e = /\\/g;
12440
12462
  return () => {
12441
- let t = fv().replace(e, "/");
12463
+ let t = gv().replace(e, "/");
12442
12464
  return t.slice(t.indexOf("/"));
12443
12465
  };
12444
12466
  }
12445
- return () => fv();
12446
- })(), Pv = {
12467
+ return () => gv();
12468
+ })(), Rv = {
12447
12469
  resolve(...e) {
12448
12470
  let t = "", n = !1;
12449
12471
  for (let r = e.length - 1; r >= -1 && !n; r--) {
12450
- let i = r >= 0 ? e[r] : Nv();
12451
- Ev(i, "path"), i.length !== 0 && (t = `${i}/${t}`, n = i.charCodeAt(0) === bv);
12472
+ let i = r >= 0 ? e[r] : Lv();
12473
+ Av(i, "path"), i.length !== 0 && (t = `${i}/${t}`, n = i.charCodeAt(0) === wv);
12452
12474
  }
12453
- return t = Av(t, !n, "/", Ov), n ? `/${t}` : t.length > 0 ? t : ".";
12475
+ return t = Pv(t, !n, "/", Mv), n ? `/${t}` : t.length > 0 ? t : ".";
12454
12476
  },
12455
12477
  normalize(e) {
12456
- if (Ev(e, "path"), e.length === 0) return ".";
12457
- let t = e.charCodeAt(0) === bv, n = e.charCodeAt(e.length - 1) === bv;
12458
- return e = Av(e, !t, "/", Ov), e.length === 0 ? t ? "/" : n ? "./" : "." : (n && (e += "/"), t ? `/${e}` : e);
12478
+ if (Av(e, "path"), e.length === 0) return ".";
12479
+ let t = e.charCodeAt(0) === wv, n = e.charCodeAt(e.length - 1) === wv;
12480
+ return e = Pv(e, !t, "/", Mv), e.length === 0 ? t ? "/" : n ? "./" : "." : (n && (e += "/"), t ? `/${e}` : e);
12459
12481
  },
12460
12482
  isAbsolute(e) {
12461
- return Ev(e, "path"), e.length > 0 && e.charCodeAt(0) === bv;
12483
+ return Av(e, "path"), e.length > 0 && e.charCodeAt(0) === wv;
12462
12484
  },
12463
12485
  join(...e) {
12464
12486
  if (e.length === 0) return ".";
12465
12487
  let t;
12466
12488
  for (let n = 0; n < e.length; ++n) {
12467
12489
  let r = e[n];
12468
- Ev(r, "path"), r.length > 0 && (t === void 0 ? t = r : t += `/${r}`);
12490
+ Av(r, "path"), r.length > 0 && (t === void 0 ? t = r : t += `/${r}`);
12469
12491
  }
12470
- return t === void 0 ? "." : Pv.normalize(t);
12492
+ return t === void 0 ? "." : Rv.normalize(t);
12471
12493
  },
12472
12494
  relative(e, t) {
12473
- if (Ev(e, "from"), Ev(t, "to"), e === t || (e = Pv.resolve(e), t = Pv.resolve(t), e === t)) return "";
12495
+ if (Av(e, "from"), Av(t, "to"), e === t || (e = Rv.resolve(e), t = Rv.resolve(t), e === t)) return "";
12474
12496
  let n = e.length, r = n - 1, i = t.length - 1, a = r < i ? r : i, o = -1, s = 0;
12475
12497
  for (; s < a; s++) {
12476
12498
  let n = e.charCodeAt(1 + s);
12477
12499
  if (n !== t.charCodeAt(1 + s)) break;
12478
- n === bv && (o = s);
12500
+ n === wv && (o = s);
12479
12501
  }
12480
12502
  if (s === a) if (i > a) {
12481
- if (t.charCodeAt(1 + s) === bv) return t.slice(1 + s + 1);
12503
+ if (t.charCodeAt(1 + s) === wv) return t.slice(1 + s + 1);
12482
12504
  if (s === 0) return t.slice(1 + s);
12483
- } else r > a && (e.charCodeAt(1 + s) === bv ? o = s : s === 0 && (o = 0));
12505
+ } else r > a && (e.charCodeAt(1 + s) === wv ? o = s : s === 0 && (o = 0));
12484
12506
  let c = "";
12485
- for (s = 1 + o + 1; s <= n; ++s) (s === n || e.charCodeAt(s) === bv) && (c += c.length === 0 ? ".." : "/..");
12507
+ for (s = 1 + o + 1; s <= n; ++s) (s === n || e.charCodeAt(s) === wv) && (c += c.length === 0 ? ".." : "/..");
12486
12508
  return `${c}${t.slice(1 + o)}`;
12487
12509
  },
12488
12510
  toNamespacedPath(e) {
12489
12511
  return e;
12490
12512
  },
12491
12513
  dirname(e) {
12492
- if (Ev(e, "path"), e.length === 0) return ".";
12493
- let t = e.charCodeAt(0) === bv, n = -1, r = !0;
12494
- for (let t = e.length - 1; t >= 1; --t) if (e.charCodeAt(t) === bv) {
12514
+ if (Av(e, "path"), e.length === 0) return ".";
12515
+ let t = e.charCodeAt(0) === wv, n = -1, r = !0;
12516
+ for (let t = e.length - 1; t >= 1; --t) if (e.charCodeAt(t) === wv) {
12495
12517
  if (!r) {
12496
12518
  n = t;
12497
12519
  break;
@@ -12500,14 +12522,14 @@ var Mv = {
12500
12522
  return n === -1 ? t ? "/" : "." : t && n === 1 ? "//" : e.slice(0, n);
12501
12523
  },
12502
12524
  basename(e, t) {
12503
- t !== void 0 && Ev(t, "ext"), Ev(e, "path");
12525
+ t !== void 0 && Av(t, "ext"), Av(e, "path");
12504
12526
  let n = 0, r = -1, i = !0, a;
12505
12527
  if (t !== void 0 && t.length > 0 && t.length <= e.length) {
12506
12528
  if (t === e) return "";
12507
12529
  let o = t.length - 1, s = -1;
12508
12530
  for (a = e.length - 1; a >= 0; --a) {
12509
12531
  let c = e.charCodeAt(a);
12510
- if (c === bv) {
12532
+ if (c === wv) {
12511
12533
  if (!i) {
12512
12534
  n = a + 1;
12513
12535
  break;
@@ -12516,7 +12538,7 @@ var Mv = {
12516
12538
  }
12517
12539
  return n === r ? r = s : r === -1 && (r = e.length), e.slice(n, r);
12518
12540
  }
12519
- for (a = e.length - 1; a >= 0; --a) if (e.charCodeAt(a) === bv) {
12541
+ for (a = e.length - 1; a >= 0; --a) if (e.charCodeAt(a) === wv) {
12520
12542
  if (!i) {
12521
12543
  n = a + 1;
12522
12544
  break;
@@ -12525,24 +12547,24 @@ var Mv = {
12525
12547
  return r === -1 ? "" : e.slice(n, r);
12526
12548
  },
12527
12549
  extname(e) {
12528
- Ev(e, "path");
12550
+ Av(e, "path");
12529
12551
  let t = -1, n = 0, r = -1, i = !0, a = 0;
12530
12552
  for (let o = e.length - 1; o >= 0; --o) {
12531
12553
  let s = e.charCodeAt(o);
12532
- if (s === bv) {
12554
+ if (s === wv) {
12533
12555
  if (!i) {
12534
12556
  n = o + 1;
12535
12557
  break;
12536
12558
  }
12537
12559
  continue;
12538
12560
  }
12539
- r === -1 && (i = !1, r = o + 1), s === yv ? t === -1 ? t = o : a !== 1 && (a = 1) : t !== -1 && (a = -1);
12561
+ r === -1 && (i = !1, r = o + 1), s === Cv ? t === -1 ? t = o : a !== 1 && (a = 1) : t !== -1 && (a = -1);
12540
12562
  }
12541
12563
  return t === -1 || r === -1 || a === 0 || a === 1 && t === r - 1 && t === n + 1 ? "" : e.slice(t, r);
12542
12564
  },
12543
- format: jv.bind(null, "/"),
12565
+ format: Fv.bind(null, "/"),
12544
12566
  parse(e) {
12545
- Ev(e, "path");
12567
+ Av(e, "path");
12546
12568
  let t = {
12547
12569
  root: "",
12548
12570
  dir: "",
@@ -12551,19 +12573,19 @@ var Mv = {
12551
12573
  name: ""
12552
12574
  };
12553
12575
  if (e.length === 0) return t;
12554
- let n = e.charCodeAt(0) === bv, r;
12576
+ let n = e.charCodeAt(0) === wv, r;
12555
12577
  n ? (t.root = "/", r = 1) : r = 0;
12556
12578
  let i = -1, a = 0, o = -1, s = !0, c = e.length - 1, l = 0;
12557
12579
  for (; c >= r; --c) {
12558
12580
  let t = e.charCodeAt(c);
12559
- if (t === bv) {
12581
+ if (t === wv) {
12560
12582
  if (!s) {
12561
12583
  a = c + 1;
12562
12584
  break;
12563
12585
  }
12564
12586
  continue;
12565
12587
  }
12566
- o === -1 && (s = !1, o = c + 1), t === yv ? i === -1 ? i = c : l !== 1 && (l = 1) : i !== -1 && (l = -1);
12588
+ o === -1 && (s = !1, o = c + 1), t === Cv ? i === -1 ? i = c : l !== 1 && (l = 1) : i !== -1 && (l = -1);
12567
12589
  }
12568
12590
  if (o !== -1) {
12569
12591
  let r = a === 0 && n ? 1 : a;
@@ -12576,69 +12598,69 @@ var Mv = {
12576
12598
  win32: null,
12577
12599
  posix: null
12578
12600
  };
12579
- Pv.win32 = Mv.win32 = Mv, Pv.posix = Mv.posix = Pv, Dv ? Mv.normalize : Pv.normalize, Dv ? Mv.resolve : Pv.resolve, Dv ? Mv.relative : Pv.relative, Dv ? Mv.dirname : Pv.dirname, Dv ? Mv.basename : Pv.basename, Dv ? Mv.extname : Pv.extname, Dv ? Mv.sep : Pv.sep;
12601
+ Rv.win32 = Iv.win32 = Iv, Rv.posix = Iv.posix = Rv, jv ? Iv.normalize : Rv.normalize, jv ? Iv.resolve : Rv.resolve, jv ? Iv.relative : Rv.relative, jv ? Iv.dirname : Rv.dirname, jv ? Iv.basename : Rv.basename, jv ? Iv.extname : Rv.extname, jv ? Iv.sep : Rv.sep;
12580
12602
  //#endregion
12581
12603
  //#region ../../node_modules/monaco-editor-core/esm/vs/base/common/uri.js
12582
- var Fv = /^\w[\w\d+.-]*$/, Iv = /^\//, Lv = /^\/\//;
12583
- function Rv(e, t) {
12604
+ var zv = /^\w[\w\d+.-]*$/, Bv = /^\//, Vv = /^\/\//;
12605
+ function Hv(e, t) {
12584
12606
  if (!e.scheme && t) throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);
12585
- if (e.scheme && !Fv.test(e.scheme)) throw Error("[UriError]: Scheme contains illegal characters.");
12607
+ if (e.scheme && !zv.test(e.scheme)) throw Error("[UriError]: Scheme contains illegal characters.");
12586
12608
  if (e.path) {
12587
12609
  if (e.authority) {
12588
- if (!Iv.test(e.path)) throw Error("[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character");
12589
- } else if (Lv.test(e.path)) throw Error("[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")");
12610
+ if (!Bv.test(e.path)) throw Error("[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character");
12611
+ } else if (Vv.test(e.path)) throw Error("[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")");
12590
12612
  }
12591
12613
  }
12592
- function zv(e, t) {
12614
+ function Uv(e, t) {
12593
12615
  return !e && !t ? "file" : e;
12594
12616
  }
12595
- function Bv(e, t) {
12617
+ function Wv(e, t) {
12596
12618
  switch (e) {
12597
12619
  case "https":
12598
12620
  case "http":
12599
12621
  case "file":
12600
- t ? t[0] !== Vv && (t = Vv + t) : t = Vv;
12622
+ t ? t[0] !== Gv && (t = Gv + t) : t = Gv;
12601
12623
  break;
12602
12624
  }
12603
12625
  return t;
12604
12626
  }
12605
- var J = "", Vv = "/", Hv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, Uv = class e {
12627
+ var J = "", Gv = "/", Kv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, qv = class e {
12606
12628
  static isUri(t) {
12607
12629
  return t instanceof e ? !0 : t ? typeof t.authority == "string" && typeof t.fragment == "string" && typeof t.path == "string" && typeof t.query == "string" && typeof t.scheme == "string" && typeof t.fsPath == "string" && typeof t.with == "function" && typeof t.toString == "function" : !1;
12608
12630
  }
12609
12631
  constructor(e, t, n, r, i, a = !1) {
12610
- typeof e == "object" ? (this.scheme = e.scheme || J, this.authority = e.authority || J, this.path = e.path || J, this.query = e.query || J, this.fragment = e.fragment || J) : (this.scheme = zv(e, a), this.authority = t || J, this.path = Bv(this.scheme, n || J), this.query = r || J, this.fragment = i || J, Rv(this, a));
12632
+ typeof e == "object" ? (this.scheme = e.scheme || J, this.authority = e.authority || J, this.path = e.path || J, this.query = e.query || J, this.fragment = e.fragment || J) : (this.scheme = Uv(e, a), this.authority = t || J, this.path = Wv(this.scheme, n || J), this.query = r || J, this.fragment = i || J, Hv(this, a));
12611
12633
  }
12612
12634
  get fsPath() {
12613
- return Yv(this, !1);
12635
+ return $v(this, !1);
12614
12636
  }
12615
12637
  with(e) {
12616
12638
  if (!e) return this;
12617
12639
  let { scheme: t, authority: n, path: r, query: i, fragment: a } = e;
12618
- return t === void 0 ? t = this.scheme : t === null && (t = J), n === void 0 ? n = this.authority : n === null && (n = J), r === void 0 ? r = this.path : r === null && (r = J), i === void 0 ? i = this.query : i === null && (i = J), a === void 0 ? a = this.fragment : a === null && (a = J), t === this.scheme && n === this.authority && r === this.path && i === this.query && a === this.fragment ? this : new Gv(t, n, r, i, a);
12640
+ return t === void 0 ? t = this.scheme : t === null && (t = J), n === void 0 ? n = this.authority : n === null && (n = J), r === void 0 ? r = this.path : r === null && (r = J), i === void 0 ? i = this.query : i === null && (i = J), a === void 0 ? a = this.fragment : a === null && (a = J), t === this.scheme && n === this.authority && r === this.path && i === this.query && a === this.fragment ? this : new Yv(t, n, r, i, a);
12619
12641
  }
12620
12642
  static parse(e, t = !1) {
12621
- let n = Hv.exec(e);
12622
- return n ? new Gv(n[2] || J, $v(n[4] || J), $v(n[5] || J), $v(n[7] || J), $v(n[9] || J), t) : new Gv(J, J, J, J, J);
12643
+ let n = Kv.exec(e);
12644
+ return n ? new Yv(n[2] || J, ry(n[4] || J), ry(n[5] || J), ry(n[7] || J), ry(n[9] || J), t) : new Yv(J, J, J, J, J);
12623
12645
  }
12624
12646
  static file(e) {
12625
12647
  let t = J;
12626
- if (ov && (e = e.replace(/\\/g, Vv)), e[0] === Vv && e[1] === Vv) {
12627
- let n = e.indexOf(Vv, 2);
12628
- n === -1 ? (t = e.substring(2), e = Vv) : (t = e.substring(2, n), e = e.substring(n) || Vv);
12648
+ if (uv && (e = e.replace(/\\/g, Gv)), e[0] === Gv && e[1] === Gv) {
12649
+ let n = e.indexOf(Gv, 2);
12650
+ n === -1 ? (t = e.substring(2), e = Gv) : (t = e.substring(2, n), e = e.substring(n) || Gv);
12629
12651
  }
12630
- return new Gv("file", t, e, J, J);
12652
+ return new Yv("file", t, e, J, J);
12631
12653
  }
12632
12654
  static from(e, t) {
12633
- return new Gv(e.scheme, e.authority, e.path, e.query, e.fragment, t);
12655
+ return new Yv(e.scheme, e.authority, e.path, e.query, e.fragment, t);
12634
12656
  }
12635
12657
  static joinPath(t, ...n) {
12636
12658
  if (!t.path) throw Error("[UriError]: cannot call joinPath on URI without path");
12637
12659
  let r;
12638
- return r = ov && t.scheme === "file" ? e.file(Mv.join(Yv(t, !0), ...n)).path : Pv.join(t.path, ...n), t.with({ path: r });
12660
+ return r = uv && t.scheme === "file" ? e.file(Iv.join($v(t, !0), ...n)).path : Rv.join(t.path, ...n), t.with({ path: r });
12639
12661
  }
12640
12662
  toString(e = !1) {
12641
- return Xv(this, e);
12663
+ return ey(this, e);
12642
12664
  }
12643
12665
  toJSON() {
12644
12666
  return this;
@@ -12646,25 +12668,25 @@ var J = "", Vv = "/", Hv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?
12646
12668
  static revive(t) {
12647
12669
  if (!t || t instanceof e) return t;
12648
12670
  {
12649
- let e = new Gv(t);
12650
- return e._formatted = t.external ?? null, e._fsPath = t._sep === Wv ? t.fsPath ?? null : null, e;
12671
+ let e = new Yv(t);
12672
+ return e._formatted = t.external ?? null, e._fsPath = t._sep === Jv ? t.fsPath ?? null : null, e;
12651
12673
  }
12652
12674
  }
12653
- }, Wv = ov ? 1 : void 0, Gv = class extends Uv {
12675
+ }, Jv = uv ? 1 : void 0, Yv = class extends qv {
12654
12676
  constructor() {
12655
12677
  super(...arguments), this._formatted = null, this._fsPath = null;
12656
12678
  }
12657
12679
  get fsPath() {
12658
- return this._fsPath ||= Yv(this, !1), this._fsPath;
12680
+ return this._fsPath ||= $v(this, !1), this._fsPath;
12659
12681
  }
12660
12682
  toString(e = !1) {
12661
- return e ? Xv(this, !0) : (this._formatted ||= Xv(this, !1), this._formatted);
12683
+ return e ? ey(this, !0) : (this._formatted ||= ey(this, !1), this._formatted);
12662
12684
  }
12663
12685
  toJSON() {
12664
12686
  let e = { $mid: 1 };
12665
- return this._fsPath && (e.fsPath = this._fsPath, e._sep = Wv), this._formatted && (e.external = this._formatted), this.path && (e.path = this.path), this.scheme && (e.scheme = this.scheme), this.authority && (e.authority = this.authority), this.query && (e.query = this.query), this.fragment && (e.fragment = this.fragment), e;
12687
+ return this._fsPath && (e.fsPath = this._fsPath, e._sep = Jv), this._formatted && (e.external = this._formatted), this.path && (e.path = this.path), this.scheme && (e.scheme = this.scheme), this.authority && (e.authority = this.authority), this.query && (e.query = this.query), this.fragment && (e.fragment = this.fragment), e;
12666
12688
  }
12667
- }, Kv = {
12689
+ }, Xv = {
12668
12690
  58: "%3A",
12669
12691
  47: "%2F",
12670
12692
  63: "%3F",
@@ -12685,34 +12707,34 @@ var J = "", Vv = "/", Hv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?
12685
12707
  61: "%3D",
12686
12708
  32: "%20"
12687
12709
  };
12688
- function qv(e, t, n) {
12710
+ function Zv(e, t, n) {
12689
12711
  let r, i = -1;
12690
12712
  for (let a = 0; a < e.length; a++) {
12691
12713
  let o = e.charCodeAt(a);
12692
12714
  if (o >= 97 && o <= 122 || o >= 65 && o <= 90 || o >= 48 && o <= 57 || o === 45 || o === 46 || o === 95 || o === 126 || t && o === 47 || n && o === 91 || n && o === 93 || n && o === 58) i !== -1 && (r += encodeURIComponent(e.substring(i, a)), i = -1), r !== void 0 && (r += e.charAt(a));
12693
12715
  else {
12694
12716
  r === void 0 && (r = e.substr(0, a));
12695
- let t = Kv[o];
12717
+ let t = Xv[o];
12696
12718
  t === void 0 ? i === -1 && (i = a) : (i !== -1 && (r += encodeURIComponent(e.substring(i, a)), i = -1), r += t);
12697
12719
  }
12698
12720
  }
12699
12721
  return i !== -1 && (r += encodeURIComponent(e.substring(i))), r === void 0 ? e : r;
12700
12722
  }
12701
- function Jv(e) {
12723
+ function Qv(e) {
12702
12724
  let t;
12703
12725
  for (let n = 0; n < e.length; n++) {
12704
12726
  let r = e.charCodeAt(n);
12705
- r === 35 || r === 63 ? (t === void 0 && (t = e.substr(0, n)), t += Kv[r]) : t !== void 0 && (t += e[n]);
12727
+ r === 35 || r === 63 ? (t === void 0 && (t = e.substr(0, n)), t += Xv[r]) : t !== void 0 && (t += e[n]);
12706
12728
  }
12707
12729
  return t === void 0 ? e : t;
12708
12730
  }
12709
- function Yv(e, t) {
12731
+ function $v(e, t) {
12710
12732
  let n;
12711
- return n = e.authority && e.path.length > 1 && e.scheme === "file" ? `//${e.authority}${e.path}` : e.path.charCodeAt(0) === 47 && (e.path.charCodeAt(1) >= 65 && e.path.charCodeAt(1) <= 90 || e.path.charCodeAt(1) >= 97 && e.path.charCodeAt(1) <= 122) && e.path.charCodeAt(2) === 58 ? t ? e.path.substr(1) : e.path[1].toLowerCase() + e.path.substr(2) : e.path, ov && (n = n.replace(/\//g, "\\")), n;
12733
+ return n = e.authority && e.path.length > 1 && e.scheme === "file" ? `//${e.authority}${e.path}` : e.path.charCodeAt(0) === 47 && (e.path.charCodeAt(1) >= 65 && e.path.charCodeAt(1) <= 90 || e.path.charCodeAt(1) >= 97 && e.path.charCodeAt(1) <= 122) && e.path.charCodeAt(2) === 58 ? t ? e.path.substr(1) : e.path[1].toLowerCase() + e.path.substr(2) : e.path, uv && (n = n.replace(/\//g, "\\")), n;
12712
12734
  }
12713
- function Xv(e, t) {
12714
- let n = t ? Jv : qv, r = "", { scheme: i, authority: a, path: o, query: s, fragment: c } = e;
12715
- if (i && (r += i, r += ":"), (a || i === "file") && (r += Vv, r += Vv), a) {
12735
+ function ey(e, t) {
12736
+ let n = t ? Qv : Zv, r = "", { scheme: i, authority: a, path: o, query: s, fragment: c } = e;
12737
+ if (i && (r += i, r += ":"), (a || i === "file") && (r += Gv, r += Gv), a) {
12716
12738
  let e = a.indexOf("@");
12717
12739
  if (e !== -1) {
12718
12740
  let t = a.substr(0, e);
@@ -12730,18 +12752,18 @@ function Xv(e, t) {
12730
12752
  }
12731
12753
  r += n(o, !0, !1);
12732
12754
  }
12733
- return s && (r += "?", r += n(s, !1, !1)), c && (r += "#", r += t ? c : qv(c, !1, !1)), r;
12755
+ return s && (r += "?", r += n(s, !1, !1)), c && (r += "#", r += t ? c : Zv(c, !1, !1)), r;
12734
12756
  }
12735
- function Zv(e) {
12757
+ function ty(e) {
12736
12758
  try {
12737
12759
  return decodeURIComponent(e);
12738
12760
  } catch {
12739
- return e.length > 3 ? e.substr(0, 3) + Zv(e.substr(3)) : e;
12761
+ return e.length > 3 ? e.substr(0, 3) + ty(e.substr(3)) : e;
12740
12762
  }
12741
12763
  }
12742
- var Qv = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
12743
- function $v(e) {
12744
- return e.match(Qv) ? e.replace(Qv, (e) => Zv(e)) : e;
12764
+ var ny = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
12765
+ function ry(e) {
12766
+ return e.match(ny) ? e.replace(ny, (e) => ty(e)) : e;
12745
12767
  }
12746
12768
  //#endregion
12747
12769
  //#region src/services/types.ts
@@ -12749,15 +12771,15 @@ var Y = /* @__PURE__ */ function(e) {
12749
12771
  return e[e.Function = 1] = "Function", e[e.Constructor = 2] = "Constructor", e[e.Field = 3] = "Field", e[e.Variable = 4] = "Variable", e[e.Class = 5] = "Class", e[e.Struct = 6] = "Struct", e[e.Interface = 7] = "Interface", e[e.Module = 8] = "Module", e[e.Property = 9] = "Property", e[e.Event = 10] = "Event", e[e.Operator = 11] = "Operator", e[e.Unit = 12] = "Unit", e[e.Value = 13] = "Value", e[e.Constant = 14] = "Constant", e[e.Enum = 15] = "Enum", e[e.EnumMember = 16] = "EnumMember", e[e.Keyword = 17] = "Keyword", e[e.Text = 18] = "Text", e[e.Color = 19] = "Color", e[e.File = 20] = "File", e[e.Reference = 21] = "Reference", e[e.Customcolor = 22] = "Customcolor", e[e.Folder = 23] = "Folder", e[e.TypeParameter = 24] = "TypeParameter", e[e.User = 25] = "User", e[e.Issue = 26] = "Issue", e[e.Snippet = 27] = "Snippet", e;
12750
12772
  }({}), X = /* @__PURE__ */ function(e) {
12751
12773
  return e[e.None = 0] = "None", e[e.KeepWhitespace = 1] = "KeepWhitespace", e[e.InsertAsSnippet = 4] = "InsertAsSnippet", e;
12752
- }({}), ey = /* @__PURE__ */ function(e) {
12774
+ }({}), iy = /* @__PURE__ */ function(e) {
12753
12775
  return e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = "Warning", e[e.Error = 8] = "Error", e;
12754
12776
  }({});
12755
12777
  //#endregion
12756
12778
  //#region src/services/utils.ts
12757
- function ty(e, t) {
12779
+ function ay(e, t) {
12758
12780
  return e.getOffsetAt(t);
12759
12781
  }
12760
- function ny(e, t) {
12782
+ function oy(e, t) {
12761
12783
  let { startPos: n, endPos: r } = t;
12762
12784
  return {
12763
12785
  startLineNumber: n.line + 1,
@@ -12768,12 +12790,12 @@ function ny(e, t) {
12768
12790
  }
12769
12791
  //#endregion
12770
12792
  //#region src/services/definition/provider.ts
12771
- var ry = class {
12793
+ var sy = class {
12772
12794
  constructor(e) {
12773
12795
  this.compiler = e;
12774
12796
  }
12775
12797
  provideDefinition(e, n) {
12776
- let { uri: r } = e, i = yo.fromUri(String(e.uri)), a = ty(e, n), o = [...this.compiler.container.stack(i, a)];
12798
+ let { uri: r } = e, i = yo.fromUri(String(e.uri)), a = ay(e, n), o = [...this.compiler.container.stack(i, a)];
12777
12799
  for (; o.length !== 0;) {
12778
12800
  let e = o.pop();
12779
12801
  if (!e) continue;
@@ -12782,7 +12804,7 @@ var ry = class {
12782
12804
  let i;
12783
12805
  if (n.declaration && [Bp.PRIMARY_EXPRESSION, Bp.VARIABLE].includes(e.kind) && ({declaration: i} = n), i) {
12784
12806
  let { startPos: e, endPos: t } = i, n = r;
12785
- return r && i.filepath && (n = Uv.parse(i.filepath.toUri({ protocol: r.scheme }))), [{
12807
+ return r && i.filepath && (n = qv.parse(i.filepath.toUri({ protocol: r.scheme }))), [{
12786
12808
  range: {
12787
12809
  startColumn: e.column + 1,
12788
12810
  startLineNumber: e.line + 1,
@@ -12795,7 +12817,7 @@ var ry = class {
12795
12817
  }
12796
12818
  return [];
12797
12819
  }
12798
- }, iy = class {
12820
+ }, cy = class {
12799
12821
  constructor(e) {
12800
12822
  this.compiler = e;
12801
12823
  }
@@ -12833,14 +12855,14 @@ var ry = class {
12833
12855
  };
12834
12856
  }
12835
12857
  getSeverityValue(e) {
12836
- return e === "error" ? ey.Error : ey.Warning;
12858
+ return e === "error" ? iy.Error : iy.Warning;
12837
12859
  }
12838
- }, ay = class {
12860
+ }, ly = class {
12839
12861
  constructor(e) {
12840
12862
  this.compiler = e;
12841
12863
  }
12842
12864
  provideReferences(e, n) {
12843
- let { uri: r } = e, i = yo.fromUri(String(r)), a = ty(e, n);
12865
+ let { uri: r } = e, i = yo.fromUri(String(r)), a = ay(e, n);
12844
12866
  this.compiler.bindProject();
12845
12867
  let o = [...this.compiler.container.stack(i, a)];
12846
12868
  for (; o.length !== 0;) {
@@ -12853,7 +12875,7 @@ var ry = class {
12853
12875
  let n = this.compiler.nodeSymbol(e).getFiltered(t) ?? this.compiler.nodeReferee(e).getFiltered(t), i = n ? this.compiler.symbolReferences(n) : void 0;
12854
12876
  if (i && i.length > 0) return i.map((e) => {
12855
12877
  let t = r;
12856
- return r && e.filepath && (t = Uv.parse(e.filepath.toUri({ protocol: r.scheme }))), {
12878
+ return r && e.filepath && (t = qv.parse(e.filepath.toUri({ protocol: r.scheme }))), {
12857
12879
  range: {
12858
12880
  startColumn: e.startPos.column + 1,
12859
12881
  startLineNumber: e.startPos.line + 1,
@@ -12870,16 +12892,16 @@ var ry = class {
12870
12892
  };
12871
12893
  //#endregion
12872
12894
  //#region src/core/utils/span.ts
12873
- function oy(e, t) {
12895
+ function uy(e, t) {
12874
12896
  return e >= t.start && e < t.end;
12875
12897
  }
12876
- function sy(e, t) {
12898
+ function dy(e, t) {
12877
12899
  let n = t.bodyColon?.start ?? t.body?.start;
12878
12900
  return n === void 0 ? e >= t.start && e <= t.end : e >= t.start && e < n;
12879
12901
  }
12880
12902
  //#endregion
12881
12903
  //#region src/services/suggestions/utils/useMerger.ts
12882
- function cy(e, t) {
12904
+ function fy(e, t) {
12883
12905
  let n = [], r = e.parseFile(t).getValue()?.ast;
12884
12906
  if (!r) return n;
12885
12907
  for (let e of r.uses) {
@@ -12906,21 +12928,21 @@ function cy(e, t) {
12906
12928
  }
12907
12929
  return n;
12908
12930
  }
12909
- function ly(e, t, n, r, i, a) {
12910
- let o = cy(e, i), s = r.relativeTo(i.dirname).replace(/\.dbml$/, ""), c = o.findIndex((e) => e.sourceFile === s), l = `${n} ${t}`;
12931
+ function py(e, t, n, r, i, a) {
12932
+ let o = fy(e, i), s = r.relativeTo(i.dirname).replace(/\.dbml$/, ""), c = o.findIndex((e) => e.sourceFile === s), l = `${n} ${t}`;
12911
12933
  if (c !== -1) {
12912
12934
  let e = o[c];
12913
12935
  return e.specifiers.some((e) => e.name === t) ? { topInsert: "" } : {
12914
- topInsert: uy(Na([...e.specifiers.filter((e) => e.name !== "*").map((e) => `${e.kind ?? n} ${e.name}${e.alias ? ` as ${e.alias}` : ""}`), l]), s, "\n"),
12915
- removeRange: dy(a, e.startOffset, e.endOffset)
12936
+ topInsert: my(Na([...e.specifiers.filter((e) => e.name !== "*").map((e) => `${e.kind ?? n} ${e.name}${e.alias ? ` as ${e.alias}` : ""}`), l]), s, "\n"),
12937
+ removeRange: hy(a, e.startOffset, e.endOffset)
12916
12938
  };
12917
12939
  }
12918
- return { topInsert: uy([l], s, "\n") };
12940
+ return { topInsert: my([l], s, "\n") };
12919
12941
  }
12920
- function uy(e, t, n) {
12942
+ function my(e, t, n) {
12921
12943
  return `use {${n}${e.map((e) => ` ${e}`).join(n)}${n}} from '${t}'${n}${n}`;
12922
12944
  }
12923
- function dy(e, t, n) {
12945
+ function hy(e, t, n) {
12924
12946
  let r = e.lastIndexOf("\n", t - 1) + 1, i = n;
12925
12947
  for (; i < e.length && (e[i] === " " || e[i] === " ");) i++;
12926
12948
  return i < e.length && e[i] === "\r" && i++, i < e.length && e[i] === "\n" && i++, {
@@ -12930,7 +12952,7 @@ function dy(e, t, n) {
12930
12952
  }
12931
12953
  //#endregion
12932
12954
  //#region src/services/suggestions/utils/index.ts
12933
- function fy(e) {
12955
+ function gy(e) {
12934
12956
  switch (e) {
12935
12957
  case I.Schema: return Y.Module;
12936
12958
  case I.Table:
@@ -12943,7 +12965,7 @@ function fy(e) {
12943
12965
  default: return Y.Text;
12944
12966
  }
12945
12967
  }
12946
- function py(e, t) {
12968
+ function _y(e, t) {
12947
12969
  if (!e || Wa(e)) return !1;
12948
12970
  for (let n of e.trailingTrivia) {
12949
12971
  if (n.start > t) break;
@@ -12954,7 +12976,7 @@ function py(e, t) {
12954
12976
  function Z() {
12955
12977
  return { suggestions: [] };
12956
12978
  }
12957
- function my(e) {
12979
+ function vy(e) {
12958
12980
  return {
12959
12981
  ...e,
12960
12982
  suggestions: e.suggestions.map((e) => ({
@@ -12963,17 +12985,17 @@ function my(e) {
12963
12985
  }))
12964
12986
  };
12965
12987
  }
12966
- function hy(e) {
12988
+ function yy(e) {
12967
12989
  return {
12968
12990
  ...e,
12969
12991
  suggestions: e.suggestions.map((e) => ({
12970
12992
  ...e,
12971
- insertText: e.quoted ? e.insertText : vg(e.insertText ?? ""),
12993
+ insertText: e.quoted ? e.insertText : Sg(e.insertText ?? ""),
12972
12994
  quoted: !0
12973
12995
  }))
12974
12996
  };
12975
12997
  }
12976
- function gy(e, t = ", ") {
12998
+ function by(e, t = ", ") {
12977
12999
  let n = e.suggestions.map((e) => typeof e.label == "string" ? e.label : e.label.label).join(t);
12978
13000
  return n ? {
12979
13001
  ...e,
@@ -12989,7 +13011,7 @@ function gy(e, t = ", ") {
12989
13011
  }
12990
13012
  //#endregion
12991
13013
  //#region src/services/suggestions/crossFile.ts
12992
- function _y(e, n, r) {
13014
+ function xy(e, n, r) {
12993
13015
  let i = [], a = /* @__PURE__ */ new Set(), o = e.layout.getSource(r) ?? "";
12994
13016
  for (let s of e.layout.getEntrypoints()) {
12995
13017
  if (s.equals(r)) continue;
@@ -12997,13 +13019,13 @@ function _y(e, n, r) {
12997
13019
  if (c) for (let t of [...c.nonSchemaMembers, ...c.schemaMembers]) {
12998
13020
  if (!n.includes(t.kind)) continue;
12999
13021
  let c = t.name;
13000
- !c || a.has(c) || (a.add(c), i.push(vy(e, c, t.kind, s, r, o)));
13022
+ !c || a.has(c) || (a.add(c), i.push(Sy(e, c, t.kind, s, r, o)));
13001
13023
  }
13002
13024
  }
13003
13025
  return i;
13004
13026
  }
13005
- function vy(e, t, n, r, i, a) {
13006
- let o = ly(e, t, n, r, i, a), s = [];
13027
+ function Sy(e, t, n, r, i, a) {
13028
+ let o = py(e, t, n, r, i, a), s = [];
13007
13029
  if (o.topInsert && s.push({
13008
13030
  range: {
13009
13031
  startLineNumber: 1,
@@ -13013,7 +13035,7 @@ function vy(e, t, n, r, i, a) {
13013
13035
  },
13014
13036
  text: o.topInsert
13015
13037
  }), o.removeRange) {
13016
- let e = yy(a, o.removeRange.startOffset), t = yy(a, o.removeRange.endOffset);
13038
+ let e = Cy(a, o.removeRange.startOffset), t = Cy(a, o.removeRange.endOffset);
13017
13039
  s.push({
13018
13040
  range: {
13019
13041
  startLineNumber: e.line,
@@ -13028,14 +13050,14 @@ function vy(e, t, n, r, i, a) {
13028
13050
  label: t,
13029
13051
  insertText: t,
13030
13052
  insertTextRules: X.KeepWhitespace,
13031
- kind: fy(n),
13053
+ kind: gy(n),
13032
13054
  detail: `from ${r.basename}`,
13033
- sortText: `zzz_${fy(n).toString().padStart(2, "0")}_${t}`,
13055
+ sortText: `zzz_${gy(n).toString().padStart(2, "0")}_${t}`,
13034
13056
  range: void 0,
13035
13057
  additionalTextEdits: s
13036
13058
  };
13037
13059
  }
13038
- function yy(e, t) {
13060
+ function Cy(e, t) {
13039
13061
  let n = 1, r = 1;
13040
13062
  for (let i = 0; i < t && i < e.length; i++) e[i] === "\n" ? (n++, r = 1) : r++;
13041
13063
  return {
@@ -13045,11 +13067,11 @@ function yy(e, t) {
13045
13067
  }
13046
13068
  //#endregion
13047
13069
  //#region src/services/suggestions/recordRowSnippet.ts
13048
- function by(e, t, n, i, a) {
13070
+ function wy(e, t, n, i, a) {
13049
13071
  let o = e.container.element(i, a);
13050
- return !(o instanceof z) || !o.isKind(r.Records) || !(o.body instanceof W) || !o.body || !oy(a, o.body) || t.getLineContent(n.lineNumber).trim() !== "" ? null : o.parent instanceof R ? xy(e, o) : Sy(e, o);
13072
+ return !(o instanceof z) || !o.isKind(r.Records) || !(o.body instanceof W) || !o.body || !uy(a, o.body) || t.getLineContent(n.lineNumber).trim() !== "" ? null : o.parent instanceof R ? Ty(e, o) : Ey(e, o);
13051
13073
  }
13052
- function xy(e, n) {
13074
+ function Ty(e, n) {
13053
13075
  if (!(n.name instanceof Xp)) return Z();
13054
13076
  let r = n.name.argumentList?.elementList || [], i = r.map((n) => e.nodeReferee(n).getFiltered(t));
13055
13077
  if (!i || i.length === 0) return Z();
@@ -13070,7 +13092,7 @@ function xy(e, n) {
13070
13092
  range: void 0
13071
13093
  }] };
13072
13094
  }
13073
- function Sy(e, n) {
13095
+ function Ey(e, n) {
13074
13096
  let r = n.parent;
13075
13097
  if (!(r instanceof z)) return Z();
13076
13098
  let i = e.nodeSymbol(r).getFiltered(t);
@@ -13108,40 +13130,40 @@ function Sy(e, n) {
13108
13130
  }
13109
13131
  //#endregion
13110
13132
  //#region src/services/suggestions/use.ts
13111
- function Cy(e, t, n, r, i) {
13133
+ function Dy(e, t, n, r, i) {
13112
13134
  let a = e.parse.ast(t);
13113
- for (let o of a.body) if (o instanceof Vp && n >= o.start && n <= o.fullEnd) return wy(e, t, n, o, i, r);
13135
+ for (let o of a.body) if (o instanceof Vp && n >= o.start && n <= o.fullEnd) return Oy(e, t, n, o, i, r);
13114
13136
  return null;
13115
13137
  }
13116
- function wy(e, t, n, r, i, a) {
13117
- if (r.importPath && oy(n, r.importPath)) return ky(e, t, r.importPath, i, r);
13138
+ function Oy(e, t, n, r, i, a) {
13139
+ if (r.importPath && uy(n, r.importPath)) return Ny(e, t, r.importPath, i, r);
13118
13140
  if (r.importPath && n >= r.importPath.end) return Z();
13119
- if (r.fromKeyword && n > r.fromKeyword.end) return ky(e, t, void 0, i, r);
13141
+ if (r.fromKeyword && n > r.fromKeyword.end) return Ny(e, t, void 0, i, r);
13120
13142
  if (r.specifiers instanceof Up) {
13121
13143
  if (!r.specifiers.openBrace) {
13122
- let e = Oy();
13123
- return py(r.useKeyword, n) ? my(e) : e;
13144
+ let e = My();
13145
+ return _y(r.useKeyword, n) ? vy(e) : e;
13124
13146
  }
13125
- return Ty(e, t, n, r.specifiers, r.importPath, a);
13147
+ return ky(e, t, n, r.specifiers, r.importPath, a);
13126
13148
  }
13127
13149
  if (r.specifiers instanceof Qp) return Z();
13128
- let o = Oy();
13129
- return py(r.useKeyword, n) ? my(o) : o;
13150
+ let o = My();
13151
+ return _y(r.useKeyword, n) ? vy(o) : o;
13130
13152
  }
13131
- function Ty(e, t, n, r, i, a) {
13153
+ function ky(e, t, n, r, i, a) {
13132
13154
  for (let o of r.specifiers) {
13133
13155
  let r = !Number.isNaN(o.start) && n >= o.start && n <= o.end, s = a === o.importKind || a === o.asKeyword;
13134
13156
  if (r || s) {
13135
13157
  if (o.importKind && n > o.importKind.end) {
13136
13158
  let n = o.getSymbolKind();
13137
- if (n !== void 0 && n !== I.Schema) return Dy(e, t, i, n);
13159
+ if (n !== void 0 && n !== I.Schema) return jy(e, t, i, n);
13138
13160
  }
13139
- return Ey();
13161
+ return Ay();
13140
13162
  }
13141
13163
  }
13142
- return Ey();
13164
+ return Ay();
13143
13165
  }
13144
- function Ey() {
13166
+ function Ay() {
13145
13167
  return { suggestions: Object.keys(gp).map((e) => ({
13146
13168
  label: e.toLowerCase(),
13147
13169
  insertText: `${e.toLowerCase()} `,
@@ -13150,7 +13172,7 @@ function Ey() {
13150
13172
  range: void 0
13151
13173
  })) };
13152
13174
  }
13153
- function Dy(e, n, r, i) {
13175
+ function jy(e, n, r, i) {
13154
13176
  if (!r) return Z();
13155
13177
  let a = bo(n, r.value);
13156
13178
  if (!a) return Z();
@@ -13169,11 +13191,11 @@ function Dy(e, n, r, i) {
13169
13191
  label: e,
13170
13192
  insertText: e,
13171
13193
  insertTextRules: X.KeepWhitespace,
13172
- kind: fy(i),
13194
+ kind: gy(i),
13173
13195
  range: void 0
13174
13196
  })) };
13175
13197
  }
13176
- function Oy() {
13198
+ function My() {
13177
13199
  return { suggestions: [{
13178
13200
  label: "* from",
13179
13201
  detail: "import all",
@@ -13190,10 +13212,10 @@ function Oy() {
13190
13212
  range: void 0
13191
13213
  }] };
13192
13214
  }
13193
- function ky(e, t, n, r, i) {
13215
+ function Ny(e, t, n, r, i) {
13194
13216
  let a = t.dirname, o = n ? n.value : "./", s = n === void 0, c;
13195
13217
  if (n) {
13196
- let e = ny(r, n);
13218
+ let e = oy(r, n);
13197
13219
  c = {
13198
13220
  startLineNumber: e.startLineNumber,
13199
13221
  startColumn: e.startColumn + 1,
@@ -13207,7 +13229,7 @@ function ky(e, t, n, r, i) {
13207
13229
  let r = n.relativeTo(a);
13208
13230
  if (r.endsWith(".dbml") && (r = r.slice(0, -Co.length)), r.startsWith(".") || (r = `./${r}`), o && !r.startsWith(o)) continue;
13209
13231
  let d = `${o}${r.slice(o.length).split("/")[0]}`, f = yo.resolve(a, d), p = e.layout.isDirectory(f);
13210
- if (jy(e, n, Ay(i)) && u.set(d, !0), l.has(d)) continue;
13232
+ if (Fy(e, n, Py(i)) && u.set(d, !0), l.has(d)) continue;
13211
13233
  let m = s ? `'${d}'` : d;
13212
13234
  l.set(d, {
13213
13235
  label: d,
@@ -13221,7 +13243,7 @@ function ky(e, t, n, r, i) {
13221
13243
  for (let [e, t] of l) u.get(e) && (t.sortText = `${t.kind === Y.File ? "0" : "1"}${e}`, t.detail = "best match");
13222
13244
  return { suggestions: [...l.values()] };
13223
13245
  }
13224
- function Ay(e) {
13246
+ function Py(e) {
13225
13247
  let t = e.specifiers;
13226
13248
  return t instanceof Up ? t.specifiers.flatMap((e) => {
13227
13249
  let t = P(e.name), n = e.importKind?.value.toLowerCase();
@@ -13231,32 +13253,32 @@ function Ay(e) {
13231
13253
  }];
13232
13254
  }) : [];
13233
13255
  }
13234
- function jy(e, n, r) {
13256
+ function Fy(e, n, r) {
13235
13257
  if (r.length === 0) return !1;
13236
13258
  let i = e.usableMembers(n).getFiltered(t);
13237
13259
  return i ? r.every(({ name: e, kind: t }) => i.nonSchemaMembers.some((n) => n.kind === t && n.name === e)) : !1;
13238
13260
  }
13239
13261
  //#endregion
13240
13262
  //#region src/services/suggestions/provider.ts
13241
- var My = class {
13263
+ var Iy = class {
13242
13264
  constructor(e, t = {}) {
13243
13265
  this.compiler = e, this.triggerCharacters = t.triggerCharacters ?? [];
13244
13266
  }
13245
13267
  provideCompletionItems(e, t) {
13246
- let n = yo.fromUri(String(e.uri)), r = ty(e, t), i = by(this.compiler, e, t, n, r);
13268
+ let n = yo.fromUri(String(e.uri)), r = ay(e, t), i = wy(this.compiler, e, t, n, r);
13247
13269
  if (i !== null) return i;
13248
13270
  let a = this.compiler.token.flatStream(n), { token: o, index: s } = this.compiler.container.token(n, r), c = s === void 0 ? a[0] : a[s + 1];
13249
13271
  if ([
13250
13272
  ...o?.trailingTrivia || [],
13251
13273
  ...o?.leadingTrivia || [],
13252
13274
  ...c?.leadingTrivia || []
13253
- ].find((e) => qa(e) && oy(r, e))) return Z();
13254
- if (s === void 0) return Gy();
13255
- let l = Cy(this.compiler, n, r, o, e);
13275
+ ].find((e) => qa(e) && uy(r, e))) return Z();
13276
+ if (s === void 0) return Yy();
13277
+ let l = Dy(this.compiler, n, r, o, e);
13256
13278
  if (l !== null) return l;
13257
- if ([v.STRING_LITERAL, v.QUOTED_STRING].includes(o.kind) && oy(r, o)) return Z();
13279
+ if ([v.STRING_LITERAL, v.QUOTED_STRING].includes(o.kind) && uy(r, o)) return Z();
13258
13280
  let u = this.compiler.container.element(n, r);
13259
- if (this.compiler.container.scopeKind(n, r) === Q.TOPLEVEL || u instanceof z && u.type && u.type.start <= r && u.type.end >= r) return Gy();
13281
+ if (this.compiler.container.scopeKind(n, r) === Q.TOPLEVEL || u instanceof z && u.type && u.type.start <= r && u.type.end >= r) return Yy();
13260
13282
  let d = [...this.compiler.container.stack(n, r)].reverse();
13261
13283
  for (let e of d) if (e instanceof V) switch (e.op?.value) {
13262
13284
  case ">":
@@ -13264,8 +13286,8 @@ var My = class {
13264
13286
  case "<>":
13265
13287
  case "-":
13266
13288
  case "->":
13267
- case "<-": return Py(this.compiler, n, r, e);
13268
- case "~": return Ny(this.compiler, n, r);
13289
+ case "<-": return Ry(this.compiler, n, r, e);
13290
+ case "~": return Ly(this.compiler, n, r);
13269
13291
  default:
13270
13292
  }
13271
13293
  else if (e instanceof H) switch (e.op?.value) {
@@ -13274,27 +13296,27 @@ var My = class {
13274
13296
  case "<>":
13275
13297
  case "-":
13276
13298
  case "->":
13277
- case "<-": return Py(this.compiler, n, r, e);
13278
- case ".": return Uy(this.compiler, n, r, e);
13299
+ case "<-": return Ry(this.compiler, n, r, e);
13300
+ case ".": return qy(this.compiler, n, r, e);
13279
13301
  default:
13280
13302
  }
13281
- else if (e instanceof B) return zy(this.compiler, n, r, e);
13282
- else if (e instanceof G) return zy(this.compiler, n, r, e);
13283
- else if (e instanceof qp) return Ly(this.compiler, n, r, e);
13284
- else if (e instanceof Jp) return Ry(this.compiler, n, r);
13285
- else if (e instanceof Xp) return Zy(this.compiler, n, r, e);
13286
- else if (e instanceof U) return Wy(this.compiler, n, r, e);
13303
+ else if (e instanceof B) return Uy(this.compiler, n, r, e);
13304
+ else if (e instanceof G) return Uy(this.compiler, n, r, e);
13305
+ else if (e instanceof qp) return Vy(this.compiler, n, r, e);
13306
+ else if (e instanceof Jp) return Hy(this.compiler, n, r);
13307
+ else if (e instanceof Xp) return tb(this.compiler, n, r, e);
13308
+ else if (e instanceof U) return Jy(this.compiler, n, r, e);
13287
13309
  else if (e instanceof z) {
13288
- if (sy(r, e)) return Xy(this.compiler, n, r, e);
13289
- if (e.bodyColon && r >= e.bodyColon.end || e.body && oy(r, e.body)) return Wy(this.compiler, n, r, void 0);
13310
+ if (dy(r, e)) return eb(this.compiler, n, r, e);
13311
+ if (e.bodyColon && r >= e.bodyColon.end || e.body && uy(r, e.body)) return Jy(this.compiler, n, r, void 0);
13290
13312
  }
13291
13313
  return Z();
13292
13314
  }
13293
13315
  };
13294
- function Ny(e, t, n) {
13295
- return Iy(e, t, n, e.parse.ast(t), [I.TablePartial]);
13316
+ function Ly(e, t, n) {
13317
+ return By(e, t, n, e.parse.ast(t), [I.TablePartial]);
13296
13318
  }
13297
- function Py(e, t, n, r) {
13319
+ function Ry(e, t, n, r) {
13298
13320
  let i = e.container.scopeKind(t, n);
13299
13321
  if ([
13300
13322
  Q.REF,
@@ -13302,18 +13324,18 @@ function Py(e, t, n, r) {
13302
13324
  Q.TABLE,
13303
13325
  Q.TABLEPARTIAL
13304
13326
  ].includes(i)) {
13305
- let i = Iy(e, t, n, e.container.element(t, n), [
13327
+ let i = By(e, t, n, e.container.element(t, n), [
13306
13328
  I.Table,
13307
13329
  I.Schema,
13308
13330
  I.Column
13309
13331
  ]);
13310
- return py(r.op, n) ? my(i) : i;
13332
+ return _y(r.op, n) ? vy(i) : i;
13311
13333
  }
13312
13334
  return Z();
13313
13335
  }
13314
- function Fy(e, n, r) {
13336
+ function zy(e, n, r) {
13315
13337
  let i = e.symbolMembers(n).getFiltered(t);
13316
- return i ? hy({ suggestions: i.filter((e) => r.includes(e.kind)).filter((e) => !(e instanceof yp && e.isPublicSchema())).flatMap((e) => {
13338
+ return i ? yy({ suggestions: i.filter((e) => r.includes(e.kind)).filter((e) => !(e instanceof yp && e.isPublicSchema())).flatMap((e) => {
13317
13339
  let t = e.name;
13318
13340
  if (t === void 0) return [];
13319
13341
  let r = e.originalFilepath, i = r && !r.equals(n.filepath) ? `from ${r.basename}` : "this file";
@@ -13321,21 +13343,21 @@ function Fy(e, n, r) {
13321
13343
  label: t,
13322
13344
  insertText: t,
13323
13345
  insertTextRules: X.KeepWhitespace,
13324
- kind: fy(e.kind),
13325
- sortText: fy(e.kind).toString().padStart(2, "0"),
13346
+ kind: gy(e.kind),
13347
+ sortText: gy(e.kind).toString().padStart(2, "0"),
13326
13348
  detail: i,
13327
13349
  range: void 0
13328
13350
  };
13329
13351
  }).filter((e) => e.label !== "") }) : Z();
13330
13352
  }
13331
- function Iy(e, n, r, i, a) {
13353
+ function By(e, n, r, i, a) {
13332
13354
  if (i === void 0) return Z();
13333
13355
  let o = i, s = { suggestions: [] }, c;
13334
13356
  for (; o;) {
13335
13357
  o instanceof R && (c = o);
13336
13358
  let n = e.nodeSymbol(o).getFiltered(t);
13337
13359
  if (n) {
13338
- let t = Fy(e, n, a).suggestions, r = (e) => {
13360
+ let t = zy(e, n, a).suggestions, r = (e) => {
13339
13361
  switch (e) {
13340
13362
  case Y.Field: return 0;
13341
13363
  case Y.Module: return 1;
@@ -13349,61 +13371,61 @@ function Iy(e, n, r, i, a) {
13349
13371
  }
13350
13372
  if (c?.filepath) {
13351
13373
  let t = c.filepath, n = new Set(s.suggestions.map((e) => typeof e.label == "string" ? e.label : e.label.label));
13352
- for (let r of _y(e, a, t)) {
13374
+ for (let r of xy(e, a, t)) {
13353
13375
  let e = typeof r.label == "string" ? r.label : r.label.label;
13354
13376
  n.has(e) || (n.add(e), s.suggestions.push(r));
13355
13377
  }
13356
13378
  }
13357
- return hy(s);
13379
+ return yy(s);
13358
13380
  }
13359
- function Ly(e, n, i, a) {
13381
+ function Vy(e, n, i, a) {
13360
13382
  let o = e.container.scopeKind(n, i), s = e.container.element(n, i), c = [...e.container.stack(n, i)];
13361
- for (let t of c) if (t instanceof Xp && t.argumentList === a) return Zy(e, n, i, t);
13362
- if (s instanceof z && s.isKind(r.Records) && !(s.name instanceof Xp) && sy(i, s)) {
13383
+ for (let t of c) if (t instanceof Xp && t.argumentList === a) return tb(e, n, i, t);
13384
+ if (s instanceof z && s.isKind(r.Records) && !(s.name instanceof Xp) && dy(i, s)) {
13363
13385
  let n = s.parent ? e.nodeSymbol(s.parent).getFiltered(t) : void 0, r = s.name ? e.nodeReferee(s.name).getFiltered(t) : void 0, i = n || r;
13364
13386
  if (i) {
13365
- let t = Fy(e, i, [I.Column]);
13366
- return zf(a) ? gy(t) : t;
13387
+ let t = zy(e, i, [I.Column]);
13388
+ return zf(a) ? by(t) : t;
13367
13389
  }
13368
13390
  }
13369
13391
  switch (o) {
13370
- case Q.INDEXES: return tb(e, n, i);
13392
+ case Q.INDEXES: return ab(e, n, i);
13371
13393
  case Q.REF:
13372
13394
  case Q.DEP:
13373
13395
  for (; c.length > 0;) {
13374
13396
  let t = c.pop();
13375
- if (t instanceof H && t.op?.value === ".") return Uy(e, n, i, t);
13397
+ if (t instanceof H && t.op?.value === ".") return qy(e, n, i, t);
13376
13398
  }
13377
- return Yy(e, n, i);
13399
+ return $y(e, n, i);
13378
13400
  default: break;
13379
13401
  }
13380
13402
  return Z();
13381
13403
  }
13382
- function Ry(e, t, n) {
13383
- return e.container.scopeKind(t, n) === Q.RECORDS ? Iy(e, t, n, e.container.element(t, n), [
13404
+ function Hy(e, t, n) {
13405
+ return e.container.scopeKind(t, n) === Q.RECORDS ? By(e, t, n, e.container.element(t, n), [
13384
13406
  I.Schema,
13385
13407
  I.Enum,
13386
13408
  I.EnumField
13387
13409
  ]) : Z();
13388
13410
  }
13389
- function zy(e, t, n, r) {
13411
+ function Uy(e, t, n, r) {
13390
13412
  let { token: i } = e.container.token(t, n);
13391
13413
  if ([v.COMMA, v.LBRACKET].includes(i?.kind)) {
13392
- let r = By(e, t, n);
13393
- return i?.kind === v.COMMA && py(i, n) ? my(r) : r;
13414
+ let r = Wy(e, t, n);
13415
+ return i?.kind === v.COMMA && _y(i, n) ? vy(r) : r;
13394
13416
  }
13395
- if (r.name && r.name.start <= n && r.name.end >= n) return By(e, t, n);
13417
+ if (r.name && r.name.start <= n && r.name.end >= n) return Wy(e, t, n);
13396
13418
  if (r.name instanceof Wp) {
13397
- let a = Vy(e, t, n, Lf(r.name) ?? "");
13398
- return i?.kind === v.COLON && py(i, n) ? my(a) : a;
13419
+ let a = Gy(e, t, n, Lf(r.name) ?? "");
13420
+ return i?.kind === v.COLON && _y(i, n) ? vy(a) : a;
13399
13421
  }
13400
13422
  return Z();
13401
13423
  }
13402
- function By(e, t, n) {
13424
+ function Wy(e, t, n) {
13403
13425
  let r = e.container.element(t, n);
13404
13426
  if (r instanceof R) return Z();
13405
13427
  let a = e.container.scopeKind(t, n);
13406
- if (r.body && !oy(n, r.body)) {
13428
+ if (r.body && !uy(n, r.body)) {
13407
13429
  let e;
13408
13430
  switch (a) {
13409
13431
  case Q.TABLE:
@@ -13513,7 +13535,7 @@ function By(e, t, n) {
13513
13535
  }
13514
13536
  return Z();
13515
13537
  }
13516
- function Vy(e, t, n, r) {
13538
+ function Gy(e, t, n, r) {
13517
13539
  switch (r?.toLowerCase()) {
13518
13540
  case "update":
13519
13541
  case "delete": return { suggestions: [
@@ -13544,12 +13566,12 @@ function Vy(e, t, n, r) {
13544
13566
  range: void 0
13545
13567
  })) };
13546
13568
  break;
13547
- case "default": return Iy(e, t, n, e.container.element(t, n), [I.Schema, I.Enum]);
13569
+ case "default": return By(e, t, n, e.container.element(t, n), [I.Schema, I.Enum]);
13548
13570
  default: break;
13549
13571
  }
13550
13572
  return Z();
13551
13573
  }
13552
- function Hy(e, n, r) {
13574
+ function Ky(e, n, r) {
13553
13575
  if (!r) return [];
13554
13576
  let i = [], a = r;
13555
13577
  for (; a;) {
@@ -13567,44 +13589,44 @@ function Hy(e, n, r) {
13567
13589
  }
13568
13590
  return i;
13569
13591
  }
13570
- function Uy(e, n, r, i) {
13592
+ function qy(e, n, r, i) {
13571
13593
  let a = Vf(i) ?? [];
13572
- return a.pop(), a.some((e) => !O(e)) ? Z() : hy({ suggestions: Hy(e, a.map((e) => P(e)), e.container.element(n, r)).flatMap((n) => e.symbolMembers(n).getFiltered(t) || []).flatMap((e) => {
13594
+ return a.pop(), a.some((e) => !O(e)) ? Z() : yy({ suggestions: Ky(e, a.map((e) => P(e)), e.container.element(n, r)).flatMap((n) => e.symbolMembers(n).getFiltered(t) || []).flatMap((e) => {
13573
13595
  let t = e.name;
13574
13596
  return t === void 0 ? [] : {
13575
13597
  label: t,
13576
13598
  insertText: t,
13577
- kind: fy(e.kind),
13599
+ kind: gy(e.kind),
13578
13600
  range: void 0
13579
13601
  };
13580
13602
  }) });
13581
13603
  }
13582
- function Wy(e, t, n, i) {
13604
+ function Jy(e, t, n, i) {
13583
13605
  switch (e.container.scopeKind(t, n)) {
13584
13606
  case Q.TABLE:
13585
- case Q.TABLEPARTIAL: return qy(e, t, n, i);
13586
- case Q.PROJECT: return Jy(e, t, n, i);
13587
- case Q.INDEXES: return $y(e, t, n);
13588
- case Q.ENUM: return Ky(e, t, n, i);
13607
+ case Q.TABLEPARTIAL: return Zy(e, t, n, i);
13608
+ case Q.PROJECT: return Qy(e, t, n, i);
13609
+ case Q.INDEXES: return rb(e, t, n);
13610
+ case Q.ENUM: return Xy(e, t, n, i);
13589
13611
  case Q.REF:
13590
13612
  case Q.DEP: {
13591
- let r = Yy(e, t, n);
13592
- return e.container.token(t, n).token?.kind === v.COLON && py(e.container.token(t, n).token, n) ? my(r) : r;
13613
+ let r = $y(e, t, n);
13614
+ return e.container.token(t, n).token?.kind === v.COLON && _y(e.container.token(t, n).token, n) ? vy(r) : r;
13593
13615
  }
13594
- case Q.TABLEGROUP: return Qy(e, t);
13595
- case Q.DIAGRAMVIEW: return ib();
13616
+ case Q.TABLEGROUP: return nb(e, t);
13617
+ case Q.DIAGRAMVIEW: return cb();
13596
13618
  case Q.CUSTOM: {
13597
13619
  let i = e.container.element(t, n);
13598
13620
  if (i instanceof z) {
13599
13621
  let a = i.parentNode, o = a instanceof W ? a.parentNode : void 0;
13600
- if (o instanceof z && o.isKind(r.DiagramView)) return ab(e, t, n, i);
13622
+ if (o instanceof z && o.isKind(r.DiagramView)) return lb(e, t, n, i);
13601
13623
  }
13602
13624
  return Z();
13603
13625
  }
13604
13626
  default: return Z();
13605
13627
  }
13606
13628
  }
13607
- function Gy() {
13629
+ function Yy() {
13608
13630
  return { suggestions: [
13609
13631
  "Table",
13610
13632
  "TableGroup",
@@ -13624,14 +13646,14 @@ function Gy() {
13624
13646
  range: void 0
13625
13647
  })) };
13626
13648
  }
13627
- function Ky(e, t, n, r) {
13628
- return r?.callee && nb(n, r) === 1 ? Iy(e, t, n, e.container.element(t, n), [
13649
+ function Xy(e, t, n, r) {
13650
+ return r?.callee && ob(n, r) === 1 ? By(e, t, n, e.container.element(t, n), [
13629
13651
  I.Schema,
13630
13652
  I.Table,
13631
13653
  I.Column
13632
13654
  ]) : Z();
13633
13655
  }
13634
- function qy(e, t, n, r) {
13656
+ function Zy(e, t, n, r) {
13635
13657
  let i = [
13636
13658
  "Note",
13637
13659
  "indexes",
@@ -13645,17 +13667,17 @@ function qy(e, t, n, r) {
13645
13667
  kind: Y.Keyword,
13646
13668
  range: void 0
13647
13669
  })) };
13648
- let a = nb(n, r);
13670
+ let a = ob(n, r);
13649
13671
  return a === 0 ? { suggestions: i.map((e) => ({
13650
13672
  label: e,
13651
13673
  insertText: e,
13652
13674
  insertTextRules: X.KeepWhitespace,
13653
13675
  kind: Y.Keyword,
13654
13676
  range: void 0
13655
- })) } : a === 1 ? eb(e, t, n) : Z();
13677
+ })) } : a === 1 ? ib(e, t, n) : Z();
13656
13678
  }
13657
- function Jy(e, t, n, r) {
13658
- return !r?.callee || nb(n, r) === 0 ? { suggestions: [
13679
+ function Qy(e, t, n, r) {
13680
+ return !r?.callee || ob(n, r) === 0 ? { suggestions: [
13659
13681
  "Table",
13660
13682
  "TableGroup",
13661
13683
  "Enum",
@@ -13671,47 +13693,47 @@ function Jy(e, t, n, r) {
13671
13693
  range: void 0
13672
13694
  })) } : Z();
13673
13695
  }
13674
- function Yy(e, t, n) {
13675
- return Iy(e, t, n, e.container.element(t, n), [
13696
+ function $y(e, t, n) {
13697
+ return By(e, t, n, e.container.element(t, n), [
13676
13698
  I.Schema,
13677
13699
  I.Table,
13678
13700
  I.Column
13679
13701
  ]);
13680
13702
  }
13681
- function Xy(e, t, n, i) {
13682
- return i.isKind(r.Records) ? Iy(e, t, n, i.parent, [I.Schema, I.Table]) : Z();
13703
+ function eb(e, t, n, i) {
13704
+ return i.isKind(r.Records) ? By(e, t, n, i.parent, [I.Schema, I.Table]) : Z();
13683
13705
  }
13684
- function Zy(e, n, i, a) {
13685
- let o = e.container.element(n, i), s = a.callee && oy(i, a.callee), c = a.argumentList && oy(i, a.argumentList);
13686
- if (o instanceof z && o.isKind(r.Records) && sy(i, o)) {
13687
- if (s) return Iy(e, n, i, o.parent, [I.Schema, I.Table]);
13706
+ function tb(e, n, i, a) {
13707
+ let o = e.container.element(n, i), s = a.callee && uy(i, a.callee), c = a.argumentList && uy(i, a.argumentList);
13708
+ if (o instanceof z && o.isKind(r.Records) && dy(i, o)) {
13709
+ if (s) return By(e, n, i, o.parent, [I.Schema, I.Table]);
13688
13710
  if (!c) return Z();
13689
13711
  let r = a.callee;
13690
13712
  if (!r) return Z();
13691
13713
  let l = Vf(r) ?? [r], u = l[l.length - 1], d = u ? e.nodeReferee(u).getFiltered(t) : void 0;
13692
13714
  if (!d) return Z();
13693
- let f = Fy(e, d, [I.Column]), { argumentList: p } = a;
13694
- return !p || !zf(p) ? f : gy(f);
13715
+ let f = zy(e, d, [I.Column]), { argumentList: p } = a;
13716
+ return !p || !zf(p) ? f : by(f);
13695
13717
  }
13696
13718
  let l = [...e.container.stack(n, i)];
13697
13719
  for (let o of l) {
13698
13720
  if (!c || !(o instanceof U) || o.callee !== a || (P(a.callee) ?? "").toLowerCase() !== r.Records) continue;
13699
13721
  let s = e.nodeSymbol(e.container.element(n, i)).getFiltered(t);
13700
13722
  if (!s) return Z();
13701
- let l = Fy(e, s, [I.Column]), { argumentList: u } = a;
13702
- return !u || !zf(u) ? l : gy(l);
13723
+ let l = zy(e, s, [I.Column]), { argumentList: u } = a;
13724
+ return !u || !zf(u) ? l : by(l);
13703
13725
  }
13704
13726
  return Z();
13705
13727
  }
13706
- function Qy(e, t) {
13707
- return { suggestions: [...hy({ suggestions: (e.parse.publicSymbolTable(t) ?? []).flatMap((e) => {
13728
+ function nb(e, t) {
13729
+ return { suggestions: [...yy({ suggestions: (e.parse.publicSymbolTable(t) ?? []).flatMap((e) => {
13708
13730
  if (e.kind !== I.Table && e.kind !== I.Schema) return [];
13709
13731
  let t = e.name;
13710
13732
  return t === void 0 || e instanceof yp && e.isPublicSchema() ? [] : {
13711
13733
  label: t,
13712
13734
  insertText: t,
13713
13735
  insertTextRules: X.KeepWhitespace,
13714
- kind: fy(e.kind),
13736
+ kind: gy(e.kind),
13715
13737
  range: void 0
13716
13738
  };
13717
13739
  }) }).suggestions, ...["Note"].map((e) => ({
@@ -13722,10 +13744,10 @@ function Qy(e, t) {
13722
13744
  range: void 0
13723
13745
  }))] };
13724
13746
  }
13725
- function $y(e, t, n) {
13726
- return tb(e, t, n);
13747
+ function rb(e, t, n) {
13748
+ return ab(e, t, n);
13727
13749
  }
13728
- function eb(e, t, n) {
13750
+ function ib(e, t, n) {
13729
13751
  return { suggestions: [...(/* @__PURE__ */ "integer.int.tinyint.smallint.mediumint.bigint.bit.bool.binary.varbinary.logical.char.nchar.varchar.varchar2.nvarchar.nvarchar2.binary_float.binary_double.float.double.decimal.dec.real.money.smallmoney.enum.tinyblob.tinytext.blob.text.mediumblob.mediumtext.longblob.longtext.ntext.set.inet6.uuid.image.date.time.datetime.datetime2.timestamp.year.smalldatetime.datetimeoffset.XML.sql_variant.uniqueidentifier.CURSOR.BFILE.CLOB.NCLOB.RAW".split(".")).map((e) => ({
13730
13752
  label: e,
13731
13753
  insertText: e,
@@ -13733,36 +13755,36 @@ function eb(e, t, n) {
13733
13755
  kind: Y.TypeParameter,
13734
13756
  sortText: Y.TypeParameter.toString().padStart(2, "0"),
13735
13757
  range: void 0
13736
- })), ...Iy(e, t, n, e.container.element(t, n), [I.Enum, I.Schema]).suggestions] };
13758
+ })), ...By(e, t, n, e.container.element(t, n), [I.Enum, I.Schema]).suggestions] };
13737
13759
  }
13738
- function tb(e, n, r) {
13760
+ function ab(e, n, r) {
13739
13761
  let i = e.container.element(n, r)?.parent, a = i ? e.nodeSymbol(i).getFiltered(t) : void 0;
13740
13762
  if (!a || !a?.isKind(I.Table)) return Z();
13741
13763
  let o = e.symbolMembers(a).getFiltered(t);
13742
- return o ? hy({ suggestions: o.flatMap((n) => {
13764
+ return o ? yy({ suggestions: o.flatMap((n) => {
13743
13765
  let r = n.declaration ? e.nodeFullname(n.declaration) : void 0, i = r && !r.hasValue(t) ? r.getValue()?.at(-1) : void 0;
13744
13766
  return i ? {
13745
13767
  label: i,
13746
13768
  insertText: i,
13747
13769
  insertTextRules: X.KeepWhitespace,
13748
- kind: fy(I.Column),
13770
+ kind: gy(I.Column),
13749
13771
  range: void 0
13750
13772
  } : [];
13751
13773
  }) }) : Z();
13752
13774
  }
13753
- function nb(e, t) {
13775
+ function ob(e, t) {
13754
13776
  if (!t.callee) return -1;
13755
13777
  let n = [t.callee, ...t.args], r = n.findIndex((t) => e <= t.end);
13756
13778
  return r === -1 ? n.length : r;
13757
13779
  }
13758
- var rb = {
13780
+ var sb = {
13759
13781
  label: "*",
13760
13782
  insertText: "*",
13761
13783
  insertTextRules: X.KeepWhitespace,
13762
13784
  kind: Y.Keyword,
13763
13785
  range: void 0
13764
13786
  };
13765
- function ib() {
13787
+ function cb() {
13766
13788
  return { suggestions: [...[
13767
13789
  "Tables",
13768
13790
  "TableGroups",
@@ -13774,14 +13796,14 @@ function ib() {
13774
13796
  insertTextRules: X.KeepWhitespace,
13775
13797
  kind: Y.Keyword,
13776
13798
  range: void 0
13777
- })), rb] };
13799
+ })), sb] };
13778
13800
  }
13779
- function ab(e, t, n, i) {
13801
+ function lb(e, t, n, i) {
13780
13802
  switch (i.getElementKind()) {
13781
- case r.DiagramViewTables: return { suggestions: [rb, ...Iy(e, t, n, e.parse.ast(t), [I.Table, I.Schema]).suggestions] };
13782
- case r.DiagramViewTableGroups: return { suggestions: [rb, ...Iy(e, t, n, e.parse.ast(t), [I.TableGroup]).suggestions] };
13803
+ case r.DiagramViewTables: return { suggestions: [sb, ...By(e, t, n, e.parse.ast(t), [I.Table, I.Schema]).suggestions] };
13804
+ case r.DiagramViewTableGroups: return { suggestions: [sb, ...By(e, t, n, e.parse.ast(t), [I.TableGroup]).suggestions] };
13783
13805
  case r.DiagramViewSchemas: return { suggestions: [
13784
- rb,
13806
+ sb,
13785
13807
  {
13786
13808
  label: y,
13787
13809
  insertText: y,
@@ -13789,15 +13811,15 @@ function ab(e, t, n, i) {
13789
13811
  kind: Y.Module,
13790
13812
  range: void 0
13791
13813
  },
13792
- ...Iy(e, t, n, e.parse.ast(t), [I.Schema]).suggestions
13814
+ ...By(e, t, n, e.parse.ast(t), [I.Schema]).suggestions
13793
13815
  ] };
13794
- case r.DiagramViewNotes: return { suggestions: [rb, ...Iy(e, t, n, e.parse.ast(t), [I.StickyNote]).suggestions] };
13816
+ case r.DiagramViewNotes: return { suggestions: [sb, ...By(e, t, n, e.parse.ast(t), [I.StickyNote]).suggestions] };
13795
13817
  default: return Z();
13796
13818
  }
13797
13819
  }
13798
13820
  //#endregion
13799
13821
  //#region src/services/monarch.ts
13800
- var ob = {
13822
+ var ub = {
13801
13823
  comments: {
13802
13824
  lineComment: "//",
13803
13825
  blockComment: ["/*", "*/"]
@@ -13863,7 +13885,7 @@ var ob = {
13863
13885
  increaseIndentPattern: /^(.*\{[^}]*|\s*[{[].*)$/,
13864
13886
  decreaseIndentPattern: /^(.*\}.*|\s*[}\]].*)$/
13865
13887
  }
13866
- }, sb = {
13888
+ }, db = {
13867
13889
  tokenPostfix: ".dbml",
13868
13890
  brackets: [
13869
13891
  {
@@ -14067,12 +14089,12 @@ var ob = {
14067
14089
  };
14068
14090
  //#endregion
14069
14091
  //#region src/compiler/queries/container/stack.ts
14070
- function cb(e, t) {
14092
+ function fb(e, t) {
14071
14093
  let n = this.token.flatStream(e), { index: r, token: i } = this.container.token(e, t), a = r === void 0 ? -1 : _a(n, (e) => !e.isInvalid, r);
14072
14094
  if (a === -1) return [this.parse.ast(e)];
14073
14095
  let o = n[a].start, s = this.parse.ast(e), c = [s];
14074
14096
  for (;;) {
14075
- let e = Tm(s).find((e) => oy(o, e));
14097
+ let e = Tm(s).find((e) => uy(o, e));
14076
14098
  if (e === void 0 || e instanceof Va) break;
14077
14099
  c.push(e), s = e;
14078
14100
  }
@@ -14093,7 +14115,7 @@ function cb(e, t) {
14093
14115
  }
14094
14116
  //#endregion
14095
14117
  //#region src/compiler/queries/container/token.ts
14096
- function lb(e, t) {
14118
+ function pb(e, t) {
14097
14119
  let n = this.token.flatStream(e).findIndex((e) => e.start >= t);
14098
14120
  return n === void 0 || n <= 0 ? {
14099
14121
  token: void 0,
@@ -14105,14 +14127,14 @@ function lb(e, t) {
14105
14127
  }
14106
14128
  //#endregion
14107
14129
  //#region src/compiler/queries/container/element.ts
14108
- function ub(e, t) {
14130
+ function mb(e, t) {
14109
14131
  let n = this.container.stack(e, t);
14110
14132
  for (let e = n.length - 1; e >= 0; --e) if (n[e] instanceof z) return n[e];
14111
14133
  return this.parse.ast(e);
14112
14134
  }
14113
14135
  //#endregion
14114
14136
  //#region src/compiler/queries/container/scope.ts
14115
- function db(e, n) {
14137
+ function hb(e, n) {
14116
14138
  let r = this.container.element(e, n);
14117
14139
  if (!r) return;
14118
14140
  let i = this.nodeSymbol(r);
@@ -14127,7 +14149,7 @@ var Q = /* @__PURE__ */ function(e) {
14127
14149
  }({});
14128
14150
  //#endregion
14129
14151
  //#region src/compiler/queries/container/scopeKind.ts
14130
- function fb(e, t) {
14152
+ function gb(e, t) {
14131
14153
  let n = this.container.element(e, t);
14132
14154
  if (n instanceof R) return Q.TOPLEVEL;
14133
14155
  switch (n.type?.value.toLowerCase()) {
@@ -14148,9 +14170,9 @@ function fb(e, t) {
14148
14170
  }
14149
14171
  //#endregion
14150
14172
  //#region src/compiler/queries/canonicalName.ts
14151
- function pb(e, t) {
14173
+ function _b(e, t) {
14152
14174
  let r = t.originalSymbol;
14153
- if (r.filepath.equals(e)) return n.create(hb(this, r));
14175
+ if (r.filepath.equals(e)) return n.create(yb(this, r));
14154
14176
  let i = [...this.symbolUses(r).getValue(), ...this.symbolAliases(r).getValue()].filter((t) => t.filepath.equals(e));
14155
14177
  for (let e of i) {
14156
14178
  let t = e.name;
@@ -14159,12 +14181,12 @@ function pb(e, t) {
14159
14181
  schema: "",
14160
14182
  name: t
14161
14183
  });
14162
- let i = mb(this, e);
14184
+ let i = vb(this, e);
14163
14185
  if (i.length > 0) return n.create({
14164
14186
  schema: i.join("."),
14165
14187
  name: t
14166
14188
  });
14167
- let a = hb(this, r);
14189
+ let a = yb(this, r);
14168
14190
  return a ? n.create({
14169
14191
  ...a,
14170
14192
  name: t
@@ -14173,9 +14195,9 @@ function pb(e, t) {
14173
14195
  name: t
14174
14196
  });
14175
14197
  }
14176
- return n.create(hb(this, r));
14198
+ return n.create(yb(this, r));
14177
14199
  }
14178
- function mb(e, t) {
14200
+ function vb(e, t) {
14179
14201
  let n = [], r = t;
14180
14202
  for (; r;) {
14181
14203
  let t = e.symbolParent(r).find((e) => e instanceof yp && e.isKind(I.Schema));
@@ -14184,7 +14206,7 @@ function mb(e, t) {
14184
14206
  }
14185
14207
  return n;
14186
14208
  }
14187
- function hb(e, n) {
14209
+ function yb(e, n) {
14188
14210
  if (!n.declaration) return n.name ? {
14189
14211
  schema: y,
14190
14212
  name: n.name
@@ -14202,7 +14224,7 @@ function hb(e, n) {
14202
14224
  }
14203
14225
  //#endregion
14204
14226
  //#region src/compiler/queries/files/fileDependencies.ts
14205
- function gb(e) {
14227
+ function bb(e) {
14206
14228
  let { ast: t } = this.parseFile(e).getValue(), n = [], r = /* @__PURE__ */ new Set();
14207
14229
  for (let i of t.body) {
14208
14230
  if (!(i instanceof Vp) || !i.importPath) continue;
@@ -14213,7 +14235,7 @@ function gb(e) {
14213
14235
  }
14214
14236
  //#endregion
14215
14237
  //#region src/compiler/queries/files/reachableFiles.ts
14216
- function _b(e, t) {
14238
+ function xb(e, t) {
14217
14239
  let n = /* @__PURE__ */ new Set(), r = [], i = [...t], a = 0;
14218
14240
  for (; a < i.length;) {
14219
14241
  let t = i[a++], o = t.intern();
@@ -14224,49 +14246,49 @@ function _b(e, t) {
14224
14246
  }
14225
14247
  return r;
14226
14248
  }
14227
- function vb(e) {
14228
- return _b(this, e ? [e] : this.layout.getEntrypoints());
14249
+ function Sb(e) {
14250
+ return xb(this, e ? [e] : this.layout.getEntrypoints());
14229
14251
  }
14230
14252
  //#endregion
14231
14253
  //#region src/compiler/queries/legacy/parse.ts
14232
- function yb(e) {
14254
+ function Cb(e) {
14233
14255
  return this.bindFile(e), this.parseFile(e).getValue().ast;
14234
14256
  }
14235
- function bb(e) {
14257
+ function wb(e) {
14236
14258
  return this.interpretFile(e).getErrors();
14237
14259
  }
14238
- function xb(e) {
14260
+ function Tb(e) {
14239
14261
  return this.interpretFile(e).getWarnings();
14240
14262
  }
14241
- function Sb(e) {
14263
+ function Eb(e) {
14242
14264
  return this.parseFile(e).getValue().tokens;
14243
14265
  }
14244
- function Cb(e) {
14266
+ function Db(e) {
14245
14267
  let n = this.parseFile(e).getValue().ast, r = this.nodeSymbol(n).getFiltered(t);
14246
14268
  if (r) return this.interpretSymbol(r, e).getFiltered(t);
14247
14269
  }
14248
- function wb(e) {
14270
+ function Ob(e) {
14249
14271
  let n = this.parseFile(e).getValue().ast, r = this.nodeSymbol(n).getFiltered(t);
14250
14272
  if (r) return this.symbolMembers(r).getFiltered(t);
14251
14273
  }
14252
14274
  //#endregion
14253
14275
  //#region src/compiler/queries/legacy/token.ts
14254
- function Tb(e) {
14276
+ function kb(e) {
14255
14277
  return this.parseFile(e).getValue().tokens.flatMap((e) => [
14256
14278
  ...e.leadingInvalid,
14257
14279
  e,
14258
14280
  ...e.trailingInvalid
14259
14281
  ]);
14260
14282
  }
14261
- function Eb(e) {
14283
+ function Ab(e) {
14262
14284
  return this.parseFile(e).getValue().tokens.filter(Qa);
14263
14285
  }
14264
14286
  //#endregion
14265
14287
  //#region src/compiler/queries/nodeAtPosition.ts
14266
- function Db(e, t) {
14288
+ function jb(e, t) {
14267
14289
  let n = this.parse.ast(e);
14268
14290
  for (;;) {
14269
- let e = Tm(n).find((e) => oy(t, e));
14291
+ let e = Tm(n).find((e) => uy(t, e));
14270
14292
  if (e === void 0) return n;
14271
14293
  if (e instanceof Va) return e;
14272
14294
  n = e;
@@ -14274,12 +14296,12 @@ function Db(e, t) {
14274
14296
  }
14275
14297
  //#endregion
14276
14298
  //#region src/compiler/queries/pipeline/bind.ts
14277
- function Ob(e) {
14299
+ function Mb(e) {
14278
14300
  let t = this.validateFile(e), r = this.parseFile(e).getValue().ast, i = this.bindNode(r).map(() => void 0);
14279
14301
  return new n(void 0, [...t.getErrors(), ...i.getErrors()], [...t.getWarnings(), ...i.getWarnings()]);
14280
14302
  }
14281
- function kb() {
14282
- let e = wg(this, this.layout.getEntrypoints()), t = /* @__PURE__ */ new Map();
14303
+ function Nb() {
14304
+ let e = Og(this, this.layout.getEntrypoints()), t = /* @__PURE__ */ new Map();
14283
14305
  for (let n of e) {
14284
14306
  let e = this.bindFile(n);
14285
14307
  t.set(n.absolute, e);
@@ -14288,11 +14310,11 @@ function kb() {
14288
14310
  }
14289
14311
  //#endregion
14290
14312
  //#region src/compiler/queries/pipeline/interpret.ts
14291
- function Ab(e) {
14313
+ function Pb(e) {
14292
14314
  let { ast: r } = this.parseFile(e).getValue(), i = this.nodeSymbol(r).getFiltered(t);
14293
14315
  return i ? this.interpretSymbol(i, e).map((e) => e === t || !e ? void 0 : e) : n.create(void 0);
14294
14316
  }
14295
- function jb() {
14317
+ function Fb() {
14296
14318
  let e = [], r = [], i = /* @__PURE__ */ new Set(), a = [];
14297
14319
  for (let e of this.layout.getEntrypoints()) for (let t of this.reachableFiles(e)) {
14298
14320
  let e = t.intern();
@@ -14313,12 +14335,12 @@ function jb() {
14313
14335
  }
14314
14336
  //#endregion
14315
14337
  //#region src/compiler/queries/pipeline/validate.ts
14316
- function Mb(e) {
14338
+ function Ib(e) {
14317
14339
  return this.parseFile(e).chain(({ ast: e }) => this.validateNode(e).map(() => void 0));
14318
14340
  }
14319
14341
  //#endregion
14320
14342
  //#region src/core/lexer/lexer.ts
14321
- var Nb = class {
14343
+ var Lb = class {
14322
14344
  constructor(e, t) {
14323
14345
  this.start = {
14324
14346
  offset: 0,
@@ -14603,9 +14625,9 @@ var Nb = class {
14603
14625
  default: return this.text[this.current.offset - 1];
14604
14626
  }
14605
14627
  }
14606
- }, Pb = /* @__PURE__ */ function(e) {
14628
+ }, Rb = /* @__PURE__ */ function(e) {
14607
14629
  return e[e.ListExpression = 0] = "ListExpression", e[e.GroupExpression = 1] = "GroupExpression", e[e.BlockExpression = 2] = "BlockExpression", e;
14608
- }({}), Fb = class {
14630
+ }({}), zb = class {
14609
14631
  constructor() {
14610
14632
  this.stack = [], this.numberOfNestedLParens = 0, this.numberOfNestedLBrackets = 0, this.numberOfNestedLBraces = 0;
14611
14633
  }
@@ -14655,7 +14677,7 @@ var Nb = class {
14655
14677
  default: break;
14656
14678
  }
14657
14679
  }
14658
- }, Ib = class {
14680
+ }, Bb = class {
14659
14681
  constructor(e, t) {
14660
14682
  this.generator = e, this.filepath = t;
14661
14683
  }
@@ -14666,9 +14688,9 @@ var Nb = class {
14666
14688
  constructor(e, t, n) {
14667
14689
  this.token = e, this.partialNode = t, this.handlerContext = n;
14668
14690
  }
14669
- }, Lb = class {
14691
+ }, Vb = class {
14670
14692
  constructor(e, t, n, r) {
14671
- this.current = 0, this.errors = [], this.contextStack = new Fb(), this.useSpecifierList = this.contextStack.withContextDo(Pb.BlockExpression, () => {
14693
+ this.current = 0, this.errors = [], this.contextStack = new zb(), this.useSpecifierList = this.contextStack.withContextDo(Rb.BlockExpression, () => {
14672
14694
  let e = { specifiers: [] }, t = () => this.nodeFactory.create(Up, e);
14673
14695
  try {
14674
14696
  this.consume("Expect an opening brace '{'", v.LBRACE), e.openBrace = this.previous();
@@ -14717,7 +14739,7 @@ var Nb = class {
14717
14739
  if (this.check(v.COLON, v.LBRACE, v.LBRACKET)) break;
14718
14740
  K(e), this.advance();
14719
14741
  }
14720
- }, this.blockExpression = this.contextStack.withContextDo(Pb.BlockExpression, () => {
14742
+ }, this.blockExpression = this.contextStack.withContextDo(Rb.BlockExpression, () => {
14721
14743
  let e = { body: [] }, t = () => this.nodeFactory.create(W, e);
14722
14744
  try {
14723
14745
  this.consume("Expect an opening brace '{'", v.LBRACE), e.blockOpenBrace = this.previous();
@@ -14747,7 +14769,7 @@ var Nb = class {
14747
14769
  if (this.check(v.RBRACE) || Ua(this.previous(), e)) break;
14748
14770
  K(e), this.advance();
14749
14771
  }
14750
- }, this.tupleExpression = this.contextStack.withContextDo(Pb.GroupExpression, () => {
14772
+ }, this.tupleExpression = this.contextStack.withContextDo(Rb.GroupExpression, () => {
14751
14773
  let e = {
14752
14774
  elementList: [],
14753
14775
  commaList: []
@@ -14791,7 +14813,7 @@ var Nb = class {
14791
14813
  if (this.check(v.RPAREN, v.COMMA)) break;
14792
14814
  K(e), this.advance();
14793
14815
  }
14794
- }, this.listExpression = this.contextStack.withContextDo(Pb.ListExpression, () => {
14816
+ }, this.listExpression = this.contextStack.withContextDo(Rb.ListExpression, () => {
14795
14817
  let e = {
14796
14818
  elementList: [],
14797
14819
  commaList: []
@@ -14843,7 +14865,7 @@ var Nb = class {
14843
14865
  if (this.check(v.COMMA, v.RBRACKET)) break;
14844
14866
  K(e), this.advance();
14845
14867
  }
14846
- }, this.source = e, this.tokens = t, this.nodeFactory = new Ib(n, r), this.filepath = r;
14868
+ }, this.source = e, this.tokens = t, this.nodeFactory = new Bb(n, r), this.filepath = r;
14847
14869
  }
14848
14870
  isAtEnd() {
14849
14871
  return this.current >= this.tokens.length || this.tokens[this.current].kind === v.EOF;
@@ -15091,7 +15113,7 @@ var Nb = class {
15091
15113
  for (; !this.isAtEnd();) {
15092
15114
  let n = this.peek();
15093
15115
  if (n.kind === v.LPAREN) {
15094
- let { left: r } = Ub(n);
15116
+ let { left: r } = qb(n);
15095
15117
  if (r < e || Ua(this.previous(), n) && !this.contextStack.isWithinGroupExpressionContext() && !this.contextStack.isWithinListExpressionContext()) break;
15096
15118
  try {
15097
15119
  t = this.nodeFactory.create(Xp, {
@@ -15118,7 +15140,7 @@ var Nb = class {
15118
15140
  }), new $(e.token, t, e.handlerContext)) : e;
15119
15141
  }
15120
15142
  } else if (Ba(n)) {
15121
- let r = n, i = Ub(r);
15143
+ let r = n, i = qb(r);
15122
15144
  if (i.left !== null) {
15123
15145
  if (i.left <= e) break;
15124
15146
  this.advance(), t = this.nodeFactory.create(Gp, {
@@ -15126,7 +15148,7 @@ var Nb = class {
15126
15148
  op: r
15127
15149
  });
15128
15150
  } else {
15129
- let n = zb(r);
15151
+ let n = Ub(r);
15130
15152
  if (n.left === null || n.left <= e) break;
15131
15153
  this.advance();
15132
15154
  try {
@@ -15152,7 +15174,7 @@ var Nb = class {
15152
15174
  if (Ba(this.peek())) {
15153
15175
  let t = {};
15154
15176
  t.op = this.peek();
15155
- let n = Vb(t.op);
15177
+ let n = Gb(t.op);
15156
15178
  if (n.right === null) throw this.logError(t.op, w.UNKNOWN_PREFIX_OP, `Unexpected '${t.op.value}' in an expression`), new $(t.op, this.nodeFactory.create(tm, { prevToken: t.op }), this.contextStack.findHandlerContext(this.tokens, this.current));
15157
15179
  this.advance();
15158
15180
  try {
@@ -15224,7 +15246,7 @@ var Nb = class {
15224
15246
  logError(e, t, n) {
15225
15247
  this.errors.push(new T(t, n, e));
15226
15248
  }
15227
- }, Rb = {
15249
+ }, Hb = {
15228
15250
  "+": {
15229
15251
  left: 9,
15230
15252
  right: 10
@@ -15286,13 +15308,13 @@ var Nb = class {
15286
15308
  right: 17
15287
15309
  }
15288
15310
  };
15289
- function zb(e) {
15290
- return Rb[e.value] || {
15311
+ function Ub(e) {
15312
+ return Hb[e.value] || {
15291
15313
  left: null,
15292
15314
  right: null
15293
15315
  };
15294
15316
  }
15295
- var Bb = {
15317
+ var Wb = {
15296
15318
  "+": {
15297
15319
  left: null,
15298
15320
  right: 15
@@ -15330,34 +15352,34 @@ var Bb = {
15330
15352
  right: 15
15331
15353
  }
15332
15354
  };
15333
- function Vb(e) {
15334
- return Bb[e.value] || {
15355
+ function Gb(e) {
15356
+ return Wb[e.value] || {
15335
15357
  left: null,
15336
15358
  right: null
15337
15359
  };
15338
15360
  }
15339
- var Hb = { "(": {
15361
+ var Kb = { "(": {
15340
15362
  left: 14,
15341
15363
  right: null
15342
15364
  } };
15343
- function Ub(e) {
15344
- return Hb[e.value] || {
15365
+ function qb(e) {
15366
+ return Kb[e.value] || {
15345
15367
  left: null,
15346
15368
  right: null
15347
15369
  };
15348
15370
  }
15349
15371
  //#endregion
15350
15372
  //#region src/compiler/queries/pipeline/parse.ts
15351
- function Wb(e) {
15373
+ function Jb(e) {
15352
15374
  let t = this.getSource(e);
15353
- return new Nb(t ?? "", e).lex().chain((n) => new Lb(t ?? "", n, this.nodeIdGenerator, e).parse()).map(({ ast: t, tokens: n }) => ({
15375
+ return new Lb(t ?? "", e).lex().chain((n) => new Vb(t ?? "", n, this.nodeIdGenerator, e).parse()).map(({ ast: t, tokens: n }) => ({
15354
15376
  ast: t,
15355
15377
  tokens: n,
15356
15378
  path: e
15357
15379
  }));
15358
15380
  }
15359
- function Gb() {
15360
- let e = wg(this, this.layout.getEntrypoints()), t = /* @__PURE__ */ new Map();
15381
+ function Yb() {
15382
+ let e = Og(this, this.layout.getEntrypoints()), t = /* @__PURE__ */ new Map();
15361
15383
  for (let n of e) {
15362
15384
  let e = this.parseFile(n);
15363
15385
  t.set(n.absolute, e);
@@ -15366,17 +15388,17 @@ function Gb() {
15366
15388
  }
15367
15389
  //#endregion
15368
15390
  //#region src/compiler/queries/symbol/lookupMembers.ts
15369
- function Kb(e) {
15391
+ function Xb(e) {
15370
15392
  let n = this.symbolMembers(e).getFiltered(t), r = /* @__PURE__ */ new Map();
15371
15393
  if (n) for (let e of n) {
15372
- let t = e instanceof Lp ? Xh.visibleName(this, e)?.at(-1) : e.name;
15394
+ let t = e instanceof Lp ? eg.visibleName(this, e)?.at(-1) : e.name;
15373
15395
  if (t === void 0) continue;
15374
15396
  let n = r.get(t);
15375
15397
  n || (n = [], r.set(t, n)), n.push(e);
15376
15398
  }
15377
15399
  return r;
15378
15400
  }
15379
- function qb(e, n, r) {
15401
+ function Zb(e, n, r) {
15380
15402
  let i;
15381
15403
  if (e instanceof vp) i = e;
15382
15404
  else {
@@ -15389,13 +15411,13 @@ function qb(e, n, r) {
15389
15411
  }
15390
15412
  //#endregion
15391
15413
  //#region src/compiler/queries/symbol/symbolAliases.ts
15392
- function Jb(e) {
15414
+ function Qb(e) {
15393
15415
  let t = e.originalSymbol;
15394
- return Tg(this).map((n) => n.filter((n) => n instanceof Ip && n.originalSymbol === t && n !== e));
15416
+ return kg(this).map((n) => n.filter((n) => n instanceof Ip && n.originalSymbol === t && n !== e));
15395
15417
  }
15396
15418
  //#endregion
15397
15419
  //#region src/compiler/queries/resolutionIndex.ts
15398
- function Yb() {
15420
+ function $b() {
15399
15421
  let e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = this.parseProject();
15400
15422
  this.bindProject();
15401
15423
  let i = /* @__PURE__ */ new Set(), a = (t, n) => {
@@ -15458,32 +15480,32 @@ function Yb() {
15458
15480
  parents: s
15459
15481
  };
15460
15482
  }
15461
- function Xb(e) {
15483
+ function ex(e) {
15462
15484
  return this.resolutionIndex().parents.get(e.intern()) ?? [];
15463
15485
  }
15464
- function Zb(e) {
15486
+ function tx(e) {
15465
15487
  return this.resolutionIndex().references.get(e.intern()) ?? [];
15466
15488
  }
15467
- function Qb(e) {
15489
+ function nx(e) {
15468
15490
  return this.resolutionIndex().metadata.get(e.intern()) ?? [];
15469
15491
  }
15470
15492
  //#endregion
15471
15493
  //#region src/compiler/queries/symbol/symbolUses.ts
15472
- function $b(e) {
15494
+ function rx(e) {
15473
15495
  let t = e.originalSymbol;
15474
- return Tg(this).map((n) => n.filter((n) => n instanceof Lp && n.originalSymbol === t && n !== e));
15496
+ return kg(this).map((n) => n.filter((n) => n instanceof Lp && n.originalSymbol === t && n !== e));
15475
15497
  }
15476
15498
  //#endregion
15477
15499
  //#region src/compiler/queries/transform/applyTextEdits.ts
15478
- function ex(e, t, n = !1) {
15500
+ function ix(e, t, n = !1) {
15479
15501
  let r = n ? t : [...t].sort((e, t) => t.start - e.start), i = e;
15480
15502
  for (let { start: e, end: t, newText: n } of r) i = i.substring(0, e) + n + i.substring(t);
15481
15503
  return i;
15482
15504
  }
15483
15505
  //#endregion
15484
15506
  //#region src/core/utils/setting.ts
15485
- function tx(e, t) {
15486
- let n = ax(e);
15507
+ function ax(e, t) {
15508
+ let n = lx(e);
15487
15509
  if (n) {
15488
15510
  let e = n.elementList ?? [], r = e.findIndex((e) => e instanceof B ? qf(e)?.toLowerCase() === t.toLowerCase() : !1);
15489
15511
  if (r !== -1) return {
@@ -15494,15 +15516,15 @@ function tx(e, t) {
15494
15516
  };
15495
15517
  }
15496
15518
  if (e instanceof z) {
15497
- let n = ox(e, t);
15519
+ let n = ux(e, t);
15498
15520
  if (n) return {
15499
15521
  kind: "body",
15500
15522
  declaration: n
15501
15523
  };
15502
15524
  }
15503
15525
  }
15504
- function nx(e, t) {
15505
- let n = ax(e);
15526
+ function ox(e, t) {
15527
+ let n = lx(e);
15506
15528
  if (n) {
15507
15529
  let e = n.end - 1;
15508
15530
  return {
@@ -15525,9 +15547,9 @@ function nx(e, t) {
15525
15547
  newText: ` [${t}]`
15526
15548
  };
15527
15549
  }
15528
- function rx(e, t, n, r) {
15529
- if (n === null) return ix(e, t, r);
15530
- let i = n === void 0 ? t : `${t}: ${n}`, a = tx(e, t);
15550
+ function sx(e, t, n, r) {
15551
+ if (n === null) return cx(e, t, r);
15552
+ let i = n === void 0 ? t : `${t}: ${n}`, a = ax(e, t);
15531
15553
  if (a) {
15532
15554
  let e = a.kind === "attribute" ? a.settingNode : a.declaration;
15533
15555
  return {
@@ -15536,10 +15558,10 @@ function rx(e, t, n, r) {
15536
15558
  newText: i
15537
15559
  };
15538
15560
  }
15539
- return nx(e, i);
15561
+ return ox(e, i);
15540
15562
  }
15541
- function ix(e, t, n) {
15542
- let r = tx(e, t);
15563
+ function cx(e, t, n) {
15564
+ let r = ax(e, t);
15543
15565
  if (!r) return;
15544
15566
  if (r.kind === "body") return {
15545
15567
  start: r.declaration.start,
@@ -15571,7 +15593,7 @@ function ix(e, t, n) {
15571
15593
  newText: ""
15572
15594
  };
15573
15595
  }
15574
- function ax(e) {
15596
+ function lx(e) {
15575
15597
  if (e instanceof U) return e.args.find((e) => e instanceof G);
15576
15598
  if (e instanceof z) {
15577
15599
  if (e.attributeList) return e.attributeList;
@@ -15579,7 +15601,7 @@ function ax(e) {
15579
15601
  if (t instanceof U) return t.args.find((e) => e instanceof G);
15580
15602
  }
15581
15603
  }
15582
- function ox(e, t) {
15604
+ function ux(e, t) {
15583
15605
  let n = e.body;
15584
15606
  if (!(!n || uf(e) || n instanceof U)) {
15585
15607
  for (let e of n.body) if (e instanceof z && e.type?.value?.toLowerCase() === t.toLowerCase()) return e;
@@ -15587,17 +15609,17 @@ function ox(e, t) {
15587
15609
  }
15588
15610
  //#endregion
15589
15611
  //#region src/compiler/queries/transform/utils/ref.ts
15590
- function sx(e, n, r) {
15612
+ function dx(e, n, r) {
15591
15613
  let a = e.parseFile(n).getValue().ast, o = e.nodeSymbol(a).getFiltered(t);
15592
15614
  if (!o) return;
15593
15615
  let s = e.getSource(n) ?? "";
15594
- for (let t of e.symbolMetadata(o)) if (t instanceof sm && lx(e, t, r)) {
15616
+ for (let t of e.symbolMetadata(o)) if (t instanceof sm && px(e, t, r)) {
15595
15617
  if (t.declaration instanceof B) {
15596
15618
  let n = t.op(e);
15597
15619
  if (!n) continue;
15598
15620
  let r = t.declaration.parentOfKind(U);
15599
15621
  if (!r) continue;
15600
- let a = ix(r, i.Ref, s);
15622
+ let a = cx(r, i.Ref, s);
15601
15623
  if (!a) continue;
15602
15624
  return {
15603
15625
  kind: "inline",
@@ -15615,38 +15637,38 @@ function sx(e, n, r) {
15615
15637
  }
15616
15638
  }
15617
15639
  }
15618
- function cx(e, t, n) {
15640
+ function fx(e, t, n) {
15619
15641
  if (!e?.name || e.name !== n.tableName) return !1;
15620
15642
  let r = n.fieldNames ?? [];
15621
15643
  return r.length === 0 ? !0 : t.length === r.length ? t.every((e, t) => e.name === r[t]) : !1;
15622
15644
  }
15623
- function lx(e, t, n) {
15645
+ function px(e, t, n) {
15624
15646
  let r = t.leftTable(e), i = t.leftColumns(e), a = t.rightTable(e), o = t.rightColumns(e), [s, c] = n.endpoints;
15625
- return cx(r, i, s) && cx(a, o, c) || cx(r, i, c) && cx(a, o, s);
15647
+ return fx(r, i, s) && fx(a, o, c) || fx(r, i, c) && fx(a, o, s);
15626
15648
  }
15627
15649
  //#endregion
15628
15650
  //#region src/compiler/queries/transform/utils/index.ts
15629
- function ux(e) {
15651
+ function mx(e) {
15630
15652
  return e && e.length > 0 ? e : y;
15631
15653
  }
15632
- function dx(e, t) {
15633
- if (ux(e.schemaName) !== ux(t.schemaName) || e.tableName !== t.tableName) return !1;
15654
+ function hx(e, t) {
15655
+ if (mx(e.schemaName) !== mx(t.schemaName) || e.tableName !== t.tableName) return !1;
15634
15656
  let n = e.fieldNames ?? [], r = t.fieldNames ?? [];
15635
15657
  return n.length === r.length ? n.every((e, t) => e === r[t]) : !1;
15636
15658
  }
15637
- function fx(e, t) {
15638
- if (ux(e.schemaName) !== ux(t.schemaName) || e.tableName !== t.tableName) return !1;
15659
+ function gx(e, t) {
15660
+ if (mx(e.schemaName) !== mx(t.schemaName) || e.tableName !== t.tableName) return !1;
15639
15661
  let n = t.fieldNames ?? [];
15640
15662
  if (n.length === 0) return !0;
15641
15663
  let r = e.fieldNames ?? [];
15642
15664
  return r.length === n.length ? r.every((e, t) => e === n[t]) : !1;
15643
15665
  }
15644
- function px(e) {
15666
+ function _x(e) {
15645
15667
  if (typeof e != "string") return {
15646
15668
  schema: e.schema ?? "public",
15647
15669
  table: e.table
15648
15670
  };
15649
- let t = Cg(e);
15671
+ let t = Dg(e);
15650
15672
  if (t.length === 0) return {
15651
15673
  schema: y,
15652
15674
  table: ""
@@ -15665,34 +15687,34 @@ function px(e) {
15665
15687
  table: n
15666
15688
  };
15667
15689
  }
15668
- function mx(e, n, r, i, a = I.Table) {
15690
+ function vx(e, n, r, i, a = I.Table) {
15669
15691
  let o = e.parseFile(n).getValue().ast, s = e.nodeSymbol(o).getFiltered(t);
15670
15692
  if (!s) return;
15671
15693
  if (r === "public") return e.lookupMembers(s, a, i) ?? void 0;
15672
15694
  let c = e.lookupMembers(s, I.Schema, r);
15673
15695
  if (c) return e.lookupMembers(c, a, i) ?? void 0;
15674
15696
  }
15675
- function hx(e) {
15697
+ function yx(e) {
15676
15698
  return e.startsWith("\"") && e.endsWith("\"") && e.length >= 2 ? e.slice(1, -1) : e;
15677
15699
  }
15678
- function gx(e) {
15700
+ function bx(e) {
15679
15701
  let t = [];
15680
- e.schemaName && e.schemaName !== "public" && t.push(vg(e.schemaName)), t.push(vg(e.tableName));
15681
- for (let n of e.fieldNames ?? []) t.push(vg(n));
15702
+ e.schemaName && e.schemaName !== "public" && t.push(Sg(e.schemaName)), t.push(Sg(e.tableName));
15703
+ for (let n of e.fieldNames ?? []) t.push(Sg(n));
15682
15704
  return t.join(".");
15683
15705
  }
15684
- function _x(e, t) {
15706
+ function xx(e, t) {
15685
15707
  return t === void 0 ? e : t === null ? "" : `${e}: ${t}`;
15686
15708
  }
15687
15709
  //#endregion
15688
15710
  //#region src/compiler/queries/transform/renameTable.ts
15689
- function vx(e, t) {
15711
+ function Sx(e, t) {
15690
15712
  if (!e || !(e instanceof z)) return !1;
15691
15713
  let n = e.name;
15692
15714
  return n ? t.substring(n.start, n.end).includes("\"") : !1;
15693
15715
  }
15694
- function yx(e, t, n) {
15695
- let r = !_g(t), i = !_g(e), a = n || r, o = n || i;
15716
+ function Cx(e, t, n) {
15717
+ let r = !xg(t), i = !xg(e), a = n || r, o = n || i;
15696
15718
  return {
15697
15719
  schema: e,
15698
15720
  table: t,
@@ -15702,10 +15724,10 @@ function yx(e, t, n) {
15702
15724
  shouldQuoteTable: a
15703
15725
  };
15704
15726
  }
15705
- function bx(e, t, n, r, i, a) {
15706
- return n === i && r === a ? !1 : mx(e, t, i, a) !== void 0;
15727
+ function wx(e, t, n, r, i, a) {
15728
+ return n === i && r === a ? !1 : vx(e, t, i, a) !== void 0;
15707
15729
  }
15708
- function xx(e, t, n) {
15730
+ function Tx(e, t, n) {
15709
15731
  let r = e.start - 1;
15710
15732
  for (; r >= 0 && /\s/.test(n[r]);) r--;
15711
15733
  if (r < 0 || n[r] !== ".") return null;
@@ -15720,19 +15742,19 @@ function xx(e, t, n) {
15720
15742
  for (a = r + 1; r >= 0 && /[a-zA-Z0-9_]/.test(n[r]);) r--;
15721
15743
  i = r + 1;
15722
15744
  }
15723
- return hx(n.substring(i, a)) === t ? {
15745
+ return yx(n.substring(i, a)) === t ? {
15724
15746
  start: i,
15725
15747
  end: e.end
15726
15748
  } : null;
15727
15749
  }
15728
- function Sx(e) {
15750
+ function Ex(e) {
15729
15751
  return e.schema === "public" ? e.formattedTable : `${e.formattedSchema}.${e.formattedTable}`;
15730
15752
  }
15731
- function Cx(e, t, n, r, i) {
15732
- let a = [], o = /* @__PURE__ */ new Set(), s = Sx(r);
15753
+ function Dx(e, t, n, r, i) {
15754
+ let a = [], o = /* @__PURE__ */ new Set(), s = Ex(r);
15733
15755
  for (let r of e) {
15734
- if (hx(i.substring(r.start, r.end)) !== n) continue;
15735
- let e = xx(r, t, i) ?? {
15756
+ if (yx(i.substring(r.start, r.end)) !== n) continue;
15757
+ let e = Tx(r, t, i) ?? {
15736
15758
  start: r.start,
15737
15759
  end: r.end
15738
15760
  }, c = `${e.start}-${e.end}`;
@@ -15744,19 +15766,19 @@ function Cx(e, t, n, r, i) {
15744
15766
  }
15745
15767
  return a;
15746
15768
  }
15747
- function wx(e, n, r) {
15748
- let i = px(n), a = px(r), o = i.schema, s = i.table, c = a.schema, l = a.table, u = mx(this, e, o, s);
15749
- if (!u || u instanceof Ip || bx(this, e, o, s, c, l)) return /* @__PURE__ */ new Map();
15769
+ function Ox(e, n, r) {
15770
+ let i = _x(n), a = _x(r), o = i.schema, s = i.table, c = a.schema, l = a.table, u = vx(this, e, o, s);
15771
+ if (!u || u instanceof Ip || wx(this, e, o, s, c, l)) return /* @__PURE__ */ new Map();
15750
15772
  if (u instanceof Lp && u.useSpecifierDeclaration instanceof Hp && u.useSpecifierDeclaration.alias) {
15751
15773
  let n = u.useSpecifierDeclaration;
15752
- if (this.nodeAlias(n).getFiltered(t) === s) return Tx(this, e, n, u, c, l);
15774
+ if (this.nodeAlias(n).getFiltered(t) === s) return kx(this, e, n, u, c, l);
15753
15775
  }
15754
- return Ex(this, u, o, s, c, l);
15776
+ return Ax(this, u, o, s, c, l);
15755
15777
  }
15756
- function Tx(e, t, n, r, i, a) {
15778
+ function kx(e, t, n, r, i, a) {
15757
15779
  let o = e.getSource(t) ?? "";
15758
15780
  if (!n.alias) return /* @__PURE__ */ new Map();
15759
- let s = yx(i, a, o.substring(n.alias.start, n.alias.end).includes("\"")), c = [];
15781
+ let s = Cx(i, a, o.substring(n.alias.start, n.alias.end).includes("\"")), c = [];
15760
15782
  c.push({
15761
15783
  start: n.alias.start,
15762
15784
  end: n.alias.end,
@@ -15768,14 +15790,14 @@ function Tx(e, t, n, r, i, a) {
15768
15790
  end: e.end,
15769
15791
  newText: s.formattedTable
15770
15792
  });
15771
- return new Map([[t.absolute, ex(o, c)]]);
15793
+ return new Map([[t.absolute, ix(o, c)]]);
15772
15794
  }
15773
- function Ex(e, t, n, r, i, a) {
15795
+ function Ax(e, t, n, r, i, a) {
15774
15796
  let o = t.originalSymbol, s = o.declaration;
15775
15797
  if (!s || !(s instanceof z)) return /* @__PURE__ */ new Map();
15776
15798
  let c = s.filepath;
15777
15799
  if (!c) return /* @__PURE__ */ new Map();
15778
- let l = yx(i, a, vx(s, e.getSource(c) ?? "")), u = /* @__PURE__ */ new Map(), d = (e, t) => {
15800
+ let l = Cx(i, a, Sx(s, e.getSource(c) ?? "")), u = /* @__PURE__ */ new Map(), d = (e, t) => {
15779
15801
  let n = e.absolute, r = u.get(n);
15780
15802
  r || (r = {
15781
15803
  fp: e,
@@ -15785,46 +15807,46 @@ function Ex(e, t, n, r, i, a) {
15785
15807
  f && d(c, {
15786
15808
  start: f.start,
15787
15809
  end: f.end,
15788
- newText: Sx(l)
15810
+ newText: Ex(l)
15789
15811
  });
15790
15812
  let p = e.symbolReferences(o);
15791
15813
  for (let t of p) {
15792
15814
  if (t === f) continue;
15793
15815
  let i = t.filepath, a = e.getSource(i) ?? "";
15794
- for (let e of Cx([t], n, r, l, a)) d(i, e);
15816
+ for (let e of Dx([t], n, r, l, a)) d(i, e);
15795
15817
  }
15796
15818
  let m = /* @__PURE__ */ new Map();
15797
15819
  for (let { fp: t, edits: n } of u.values()) {
15798
15820
  let r = e.getSource(t) ?? "";
15799
- m.set(t.absolute, ex(r, n));
15821
+ m.set(t.absolute, ix(r, n));
15800
15822
  }
15801
15823
  return m;
15802
15824
  }
15803
15825
  //#endregion
15804
15826
  //#region src/core/utils/note.ts
15805
- function Dx(e, t) {
15806
- let n = Ax(e);
15827
+ function jx(e, t) {
15828
+ let n = Px(e);
15807
15829
  if (n) return {
15808
15830
  start: n.noteValueStart,
15809
15831
  end: n.noteValueEnd,
15810
- newText: Eg(t)
15832
+ newText: Ag(t)
15811
15833
  };
15812
15834
  }
15813
- function Ox(e) {
15814
- let t = Ax(e);
15835
+ function Mx(e) {
15836
+ let t = Px(e);
15815
15837
  if (t) return {
15816
15838
  start: t.fullNoteStart,
15817
15839
  end: t.fullNoteEnd,
15818
15840
  newText: ""
15819
15841
  };
15820
15842
  }
15821
- function kx(e, t) {
15822
- if (Ax(e) || !(e instanceof z)) return;
15823
- let n = jx(e);
15843
+ function Nx(e, t) {
15844
+ if (Px(e) || !(e instanceof z)) return;
15845
+ let n = Fx(e);
15824
15846
  if (n !== void 0) return {
15825
15847
  start: n,
15826
15848
  end: n,
15827
- newText: ` note: ${Eg(t)}\n`
15849
+ newText: ` note: ${Ag(t)}\n`
15828
15850
  };
15829
15851
  let r = e.body;
15830
15852
  if (r instanceof U) {
@@ -15834,22 +15856,22 @@ function kx(e, t) {
15834
15856
  return {
15835
15857
  start: n.listCloseBracket.start,
15836
15858
  end: n.listCloseBracket.start,
15837
- newText: `${e}note: ${Eg(t)}`
15859
+ newText: `${e}note: ${Ag(t)}`
15838
15860
  };
15839
15861
  }
15840
15862
  return {
15841
15863
  start: e.end,
15842
15864
  end: e.end,
15843
- newText: ` [note: ${Eg(t)}]`
15865
+ newText: ` [note: ${Ag(t)}]`
15844
15866
  };
15845
15867
  }
15846
15868
  }
15847
- function Ax(e) {
15869
+ function Px(e) {
15848
15870
  if (!(e instanceof z)) return;
15849
15871
  let t = e.body;
15850
15872
  if (t && !(t instanceof U)) for (let e of t.body) {
15851
15873
  if (!(e instanceof z) || !e.isKind(r.Note)) continue;
15852
- let t = Mx(e);
15874
+ let t = Ix(e);
15853
15875
  if (t) return {
15854
15876
  kind: Bp.ELEMENT_DECLARATION,
15855
15877
  noteValueStart: t.start,
@@ -15859,18 +15881,18 @@ function Ax(e) {
15859
15881
  };
15860
15882
  }
15861
15883
  let n = e.attributeList ?? (t instanceof U ? t.args.find((e) => e instanceof G) : void 0);
15862
- if (n) return Nx(n);
15884
+ if (n) return Lx(n);
15863
15885
  }
15864
- function jx(e) {
15886
+ function Fx(e) {
15865
15887
  let t = e.body;
15866
15888
  if (!(!t || t instanceof U) && t.blockCloseBrace) return t.blockCloseBrace.start;
15867
15889
  }
15868
- function Mx(e) {
15890
+ function Ix(e) {
15869
15891
  let t = e.body;
15870
15892
  if (t instanceof U) return t.callee ?? void 0;
15871
15893
  if (t instanceof W && t.body[0] instanceof U) return t.body[0].callee ?? void 0;
15872
15894
  }
15873
- function Nx(e) {
15895
+ function Lx(e) {
15874
15896
  let t = E(e).getValue()[i.Note];
15875
15897
  if (!t?.length) return;
15876
15898
  let n = t[0];
@@ -15886,36 +15908,36 @@ function Nx(e) {
15886
15908
  }
15887
15909
  //#endregion
15888
15910
  //#region src/compiler/queries/transform/syncDep.ts
15889
- function Px(e, t, n) {
15890
- let r = this.getSource(e) ?? "", i = this.parseFile(e).getValue().ast, a = n ?? Lx(i), o = Rx(r, i), s = [];
15891
- for (let e of t) s.push(...Gx(r, e, a, o));
15911
+ function Rx(e, t, n) {
15912
+ let r = this.getSource(e) ?? "", i = this.parseFile(e).getValue().ast, a = n ?? Vx(i), o = Hx(r, i), s = [];
15913
+ for (let e of t) s.push(...Yx(r, e, a, o));
15892
15914
  return s.sort((e, t) => t.start - e.start), {
15893
- newDbml: ex(r, s, !0),
15915
+ newDbml: ix(r, s, !0),
15894
15916
  edits: s
15895
15917
  };
15896
15918
  }
15897
- function Fx(e) {
15898
- let t = new Nb(e, To).lex();
15919
+ function zx(e) {
15920
+ let t = new Lb(e, To).lex();
15899
15921
  if (t.getErrors().length > 0) return [];
15900
- let n = new Lb(e, t.getValue(), new zp(), To).parse();
15901
- return n.getErrors().length > 0 ? [] : Lx(n.getValue().ast);
15922
+ let n = new Vb(e, t.getValue(), new zp(), To).parse();
15923
+ return n.getErrors().length > 0 ? [] : Vx(n.getValue().ast);
15902
15924
  }
15903
- function Ix(e, t) {
15904
- return `Dep [color: ${t}] {\n ${gx(e.upstream)} -> ${gx(e.downstream)}\n}`;
15925
+ function Bx(e, t) {
15926
+ return `Dep [color: ${t}] {\n ${bx(e.upstream)} -> ${bx(e.downstream)}\n}`;
15905
15927
  }
15906
- function Lx(e) {
15928
+ function Vx(e) {
15907
15929
  let t = [];
15908
15930
  for (let n of e.declarations) {
15909
15931
  if (!(n instanceof z) || !n.isKind(r.Dep)) continue;
15910
15932
  let e = [], i = n.body;
15911
15933
  if (i instanceof U) {
15912
15934
  if (i.callee instanceof H) {
15913
- let t = zx(i.callee);
15935
+ let t = Ux(i.callee);
15914
15936
  t && e.push(t);
15915
15937
  }
15916
15938
  } else if (i) {
15917
15939
  for (let t of i.body) if (t instanceof U && t.callee instanceof H) {
15918
- let n = zx(t.callee);
15940
+ let n = Ux(t.callee);
15919
15941
  n && e.push(n);
15920
15942
  }
15921
15943
  }
@@ -15928,7 +15950,7 @@ function Lx(e) {
15928
15950
  }
15929
15951
  return t;
15930
15952
  }
15931
- function Rx(e, t) {
15953
+ function Hx(e, t) {
15932
15954
  let n = [];
15933
15955
  for (let a of t.declarations) {
15934
15956
  if (!(a instanceof z) || !a.isKind(r.Table)) continue;
@@ -15943,8 +15965,8 @@ function Rx(e, t) {
15943
15965
  schemaName: s,
15944
15966
  tableName: o,
15945
15967
  fieldNames: [r]
15946
- }, c = ix(t, i.Dep, e);
15947
- if (c) for (let e of Vx(t, a)) n.push({
15968
+ }, c = cx(t, i.Dep, e);
15969
+ if (c) for (let e of Gx(t, a)) n.push({
15948
15970
  edge: e,
15949
15971
  fullStart: c.start,
15950
15972
  fullEnd: c.end
@@ -15953,20 +15975,20 @@ function Rx(e, t) {
15953
15975
  }
15954
15976
  return n;
15955
15977
  }
15956
- function zx(e) {
15978
+ function Ux(e) {
15957
15979
  let t = e.op?.value;
15958
15980
  if (t !== "->" && t !== "<-") return;
15959
15981
  let n = e.leftExpression, r = e.rightExpression;
15960
15982
  if (!n || !r) return;
15961
15983
  let i = t === "<-" ? r : n, a = t === "<-" ? n : r, o = M(i), s = M(a);
15962
15984
  if (!o || !s) return;
15963
- let c = o.length > 1 && s.length > 1, l = Bx(o, c), u = Bx(s, c);
15985
+ let c = o.length > 1 && s.length > 1, l = Wx(o, c), u = Wx(s, c);
15964
15986
  if (!(!l || !u)) return {
15965
15987
  upstream: l,
15966
15988
  downstream: u
15967
15989
  };
15968
15990
  }
15969
- function Bx(e, t) {
15991
+ function Wx(e, t) {
15970
15992
  if (e.length === 0) return;
15971
15993
  if (!t) {
15972
15994
  let t = e[e.length - 1];
@@ -15983,7 +16005,7 @@ function Bx(e, t) {
15983
16005
  fieldNames: n
15984
16006
  };
15985
16007
  }
15986
- function Vx(e, t) {
16008
+ function Gx(e, t) {
15987
16009
  let n = e.args.find((e) => e instanceof G);
15988
16010
  if (!n) return [];
15989
16011
  let r = [];
@@ -15995,7 +16017,7 @@ function Vx(e, t) {
15995
16017
  if (a !== "->" && a !== "<-") continue;
15996
16018
  let o = M(n.expression);
15997
16019
  if (!o) continue;
15998
- let s = Bx(o, o.length > 1);
16020
+ let s = Wx(o, o.length > 1);
15999
16021
  s && r.push(a === "->" ? {
16000
16022
  upstream: t,
16001
16023
  downstream: s
@@ -16006,25 +16028,25 @@ function Vx(e, t) {
16006
16028
  }
16007
16029
  return r;
16008
16030
  }
16009
- function Hx(e, t) {
16010
- return dx(e.upstream, t.upstream) && dx(e.downstream, t.downstream);
16031
+ function Kx(e, t) {
16032
+ return hx(e.upstream, t.upstream) && hx(e.downstream, t.downstream);
16011
16033
  }
16012
- function Ux(e, t) {
16013
- return e.edges.some((e) => Hx(e, t));
16034
+ function qx(e, t) {
16035
+ return e.edges.some((e) => Kx(e, t));
16014
16036
  }
16015
- function Wx(e, t) {
16016
- return e.find((e) => Ux(e, t));
16037
+ function Jx(e, t) {
16038
+ return e.find((e) => qx(e, t));
16017
16039
  }
16018
- function Gx(e, t, n, r) {
16040
+ function Yx(e, t, n, r) {
16019
16041
  switch (t.operation) {
16020
- case "create": return qx(e, t, n, r);
16042
+ case "create": return Zx(e, t, n, r);
16021
16043
  case "update": {
16022
- let r = Wx(n, t.edge);
16023
- return r ? Kx(t, r, e) : [];
16044
+ let r = Jx(n, t.edge);
16045
+ return r ? Xx(t, r, e) : [];
16024
16046
  }
16025
16047
  case "remove": {
16026
- let r = Wx(n, t.edge);
16027
- return r ? Kx({
16048
+ let r = Jx(n, t.edge);
16049
+ return r ? Xx({
16028
16050
  ...t,
16029
16051
  color: void 0,
16030
16052
  note: void 0
@@ -16033,29 +16055,29 @@ function Gx(e, t, n, r) {
16033
16055
  default: return [];
16034
16056
  }
16035
16057
  }
16036
- function Kx(e, t, n) {
16058
+ function Xx(e, t, n) {
16037
16059
  let r = [];
16038
16060
  if (e.color !== void 0) {
16039
- let a = rx(t.declaration, i.Color, e.color, n);
16061
+ let a = sx(t.declaration, i.Color, e.color, n);
16040
16062
  a && r.push(a);
16041
16063
  }
16042
16064
  if (e.note === null) {
16043
- let e = Ox(t.declaration);
16065
+ let e = Mx(t.declaration);
16044
16066
  e && r.push(e);
16045
16067
  } else if (e.note !== void 0) {
16046
- let n = Dx(t.declaration, e.note) ?? kx(t.declaration, e.note);
16068
+ let n = jx(t.declaration, e.note) ?? Nx(t.declaration, e.note);
16047
16069
  n && r.push(n);
16048
16070
  }
16049
16071
  return r;
16050
16072
  }
16051
- function qx(e, t, n, r) {
16052
- let i = Wx(n, t.edge);
16053
- if (i) return Kx(t, i, e);
16054
- let a = Ix(t.edge, t.color ?? ""), o = {
16073
+ function Zx(e, t, n, r) {
16074
+ let i = Jx(n, t.edge);
16075
+ if (i) return Xx(t, i, e);
16076
+ let a = Bx(t.edge, t.color ?? ""), o = {
16055
16077
  start: e.length,
16056
16078
  end: e.length,
16057
16079
  newText: "\n\n" + a + "\n"
16058
- }, s = r.find((e) => Hx(e.edge, t.edge));
16080
+ }, s = r.find((e) => Kx(e.edge, t.edge));
16059
16081
  return s ? [{
16060
16082
  start: s.fullStart,
16061
16083
  end: s.fullEnd,
@@ -16064,40 +16086,40 @@ function qx(e, t, n, r) {
16064
16086
  }
16065
16087
  //#endregion
16066
16088
  //#region src/compiler/queries/transform/updateElementSetting.ts
16067
- function Jx(e, t, n, r) {
16068
- if (t.kind === "dep") return Zx(this, e, t, n, r);
16069
- if (t.kind === "ref") return Qx(this, e, t, n, r);
16070
- let i = Xx(this, e, t);
16089
+ function Qx(e, t, n, r) {
16090
+ if (t.kind === "dep") return tS(this, e, t, n, r);
16091
+ if (t.kind === "ref") return nS(this, e, t, n, r);
16092
+ let i = eS(this, e, t);
16071
16093
  if (!i) return [];
16072
- let a = rx(i, n, r, this.getSource(e) ?? "");
16094
+ let a = sx(i, n, r, this.getSource(e) ?? "");
16073
16095
  return a ? [a] : [];
16074
16096
  }
16075
- function Yx(e, t, n, r) {
16097
+ function $x(e, t, n, r) {
16076
16098
  let i = this.getSource(e) ?? "", a = this.updateElementSettingEdit(e, t, n, r);
16077
- return a.length === 0 ? i : ex(i, a);
16099
+ return a.length === 0 ? i : ix(i, a);
16078
16100
  }
16079
- function Xx(e, t, n) {
16101
+ function eS(e, t, n) {
16080
16102
  let r = ("schema" in n ? n.schema : void 0) ?? "public";
16081
16103
  switch (n.kind) {
16082
16104
  case I.Column: {
16083
- let i = mx(e, t, r, n.table, I.Table);
16105
+ let i = vx(e, t, r, n.table, I.Table);
16084
16106
  return i ? e.lookupMembers(i, I.Column, n.column)?.declaration : void 0;
16085
16107
  }
16086
- case I.Table: return mx(e, t, r, n.table)?.declaration;
16108
+ case I.Table: return vx(e, t, r, n.table)?.declaration;
16087
16109
  case I.Enum:
16088
16110
  case I.StickyNote:
16089
- case I.TableGroup: return mx(e, t, r, n.name, n.kind)?.declaration;
16090
- case I.Schema: return mx(e, t, n.schema, "", I.Schema)?.declaration;
16111
+ case I.TableGroup: return vx(e, t, r, n.name, n.kind)?.declaration;
16112
+ case I.Schema: return vx(e, t, n.schema, "", I.Schema)?.declaration;
16091
16113
  default: return;
16092
16114
  }
16093
16115
  }
16094
- function Zx(e, t, n, r, i) {
16095
- let a = e.getSource(t) ?? "", o = e.parseFile(t).getValue().ast, s = Lx(o).find((e) => e.edges.some((e) => dx(e.upstream, n.upstream) && dx(e.downstream, n.downstream)));
16116
+ function tS(e, t, n, r, i) {
16117
+ let a = e.getSource(t) ?? "", o = e.parseFile(t).getValue().ast, s = Vx(o).find((e) => e.edges.some((e) => hx(e.upstream, n.upstream) && hx(e.downstream, n.downstream)));
16096
16118
  if (!s) {
16097
16119
  if (i === null) return [];
16098
- let e = Rx(a, o).find((e) => fx(e.edge.upstream, n.upstream) && fx(e.edge.downstream, n.downstream));
16120
+ let e = Hx(a, o).find((e) => gx(e.edge.upstream, n.upstream) && gx(e.edge.downstream, n.downstream));
16099
16121
  if (!e) return [];
16100
- let t = gx(n.upstream), s = gx(n.downstream), c = _x(r, i), l = c ? `Dep [${c}] {\n ${t} -> ${s}\n}` : `Dep {\n ${t} -> ${s}\n}`;
16122
+ let t = bx(n.upstream), s = bx(n.downstream), c = xx(r, i), l = c ? `Dep [${c}] {\n ${t} -> ${s}\n}` : `Dep {\n ${t} -> ${s}\n}`;
16101
16123
  return [{
16102
16124
  start: e.fullStart,
16103
16125
  end: e.fullEnd,
@@ -16110,20 +16132,20 @@ function Zx(e, t, n, r, i) {
16110
16132
  }
16111
16133
  let { declaration: c } = s, { body: l } = c;
16112
16134
  if (l instanceof U) {
16113
- let e = rx(c, r, i, a);
16135
+ let e = sx(c, r, i, a);
16114
16136
  if (e) return [e];
16115
- let t = rx(l, r, i, a);
16137
+ let t = sx(l, r, i, a);
16116
16138
  return t ? [t] : [];
16117
16139
  }
16118
- let u = rx(c, r, i, a);
16140
+ let u = sx(c, r, i, a);
16119
16141
  return u ? [u] : [];
16120
16142
  }
16121
- function Qx(e, t, n, r, i) {
16122
- let a = e.getSource(t) ?? "", o = sx(e, t, n);
16143
+ function nS(e, t, n, r, i) {
16144
+ let a = e.getSource(t) ?? "", o = dx(e, t, n);
16123
16145
  if (!o) return [];
16124
16146
  if (o.kind === "inline") {
16125
16147
  if (i === null) return [];
16126
- let e = gx(n.endpoints[0]), t = gx(n.endpoints[1]), s = _x(r, i), c = s ? `Ref: ${e} ${o.op} ${t} [${s}]` : `Ref: ${e} ${o.op} ${t}`;
16148
+ let e = bx(n.endpoints[0]), t = bx(n.endpoints[1]), s = xx(r, i), c = s ? `Ref: ${e} ${o.op} ${t} [${s}]` : `Ref: ${e} ${o.op} ${t}`;
16127
16149
  return [{
16128
16150
  start: o.fullStart,
16129
16151
  end: o.fullEnd,
@@ -16134,15 +16156,15 @@ function Qx(e, t, n, r, i) {
16134
16156
  newText: "\n\n" + c + "\n"
16135
16157
  }];
16136
16158
  }
16137
- let s = rx(o.node, r, i, a);
16159
+ let s = sx(o.node, r, i, a);
16138
16160
  return s ? [s] : [];
16139
16161
  }
16140
16162
  //#endregion
16141
16163
  //#region src/compiler/queries/transform/syncDiagramView.ts
16142
- function $x(e) {
16143
- let t = [], n = new Nb(e, To).lex();
16164
+ function rS(e) {
16165
+ let t = [], n = new Lb(e, To).lex();
16144
16166
  if (n.getErrors().length > 0) return t;
16145
- let i = new Lb(e, n.getValue(), new zp(), To).parse();
16167
+ let i = new Vb(e, n.getValue(), new zp(), To).parse();
16146
16168
  if (i.getErrors().length > 0) return t;
16147
16169
  let a = i.getValue().ast;
16148
16170
  for (let e of a.declarations) if (e.isKind(r.DiagramView)) {
@@ -16155,66 +16177,66 @@ function $x(e) {
16155
16177
  }
16156
16178
  return t;
16157
16179
  }
16158
- function eS(e, t, n) {
16180
+ function iS(e, t, n) {
16159
16181
  e.push(` ${t} {`), n.forEach((t) => e.push(` ${t}`)), e.push(" }");
16160
16182
  }
16161
- function tS(e, t) {
16183
+ function aS(e, t) {
16162
16184
  e.push(` ${t} { * }`);
16163
16185
  }
16164
- function nS(e) {
16186
+ function oS(e) {
16165
16187
  return e == null ? "null" : e.length === 0 ? "empty" : "items";
16166
16188
  }
16167
- function rS(e, t) {
16168
- let n = `DiagramView ${vg(e)} {`, r = (e) => vg(e.name), i = t?.tables?.map((e) => {
16169
- let t = vg(e.name);
16170
- return e.schemaName === "public" ? t : `${vg(e.schemaName)}.${t}`;
16189
+ function sS(e, t) {
16190
+ let n = `DiagramView ${Sg(e)} {`, r = (e) => Sg(e.name), i = t?.tables?.map((e) => {
16191
+ let t = Sg(e.name);
16192
+ return e.schemaName === "public" ? t : `${Sg(e.schemaName)}.${t}`;
16171
16193
  }) ?? [], a = t?.tableGroups?.map(r) ?? [], o = t?.schemas?.map(r) ?? [], s = t?.stickyNotes?.map(r) ?? [];
16172
16194
  if (!t) return `${n}\n}`;
16173
16195
  let c = {
16174
- tables: nS(t.tables),
16175
- tableGroups: nS(t.tableGroups),
16176
- schemas: nS(t.schemas),
16177
- stickyNotes: nS(t.stickyNotes)
16196
+ tables: oS(t.tables),
16197
+ tableGroups: oS(t.tableGroups),
16198
+ schemas: oS(t.schemas),
16199
+ stickyNotes: oS(t.stickyNotes)
16178
16200
  };
16179
16201
  if (Object.values(c).every((e) => e === "null")) return `${n}\n}`;
16180
16202
  if (Object.values(c).every((e) => e === "empty")) return `${n}\n *\n}`;
16181
16203
  let l = c.tables === "items" || c.tableGroups === "items" || c.schemas === "items", u = c.tables === "empty" && c.tableGroups === "empty" && c.schemas === "empty", d = [n];
16182
- return l ? (c.tables === "items" && eS(d, "Tables", i), c.tableGroups === "items" && eS(d, "TableGroups", a), c.schemas === "items" && eS(d, "Schemas", o)) : u && tS(d, "Tables"), c.stickyNotes === "items" ? eS(d, "Notes", s) : c.stickyNotes === "empty" && tS(d, "Notes"), d.push("}"), d.join("\n");
16204
+ return l ? (c.tables === "items" && iS(d, "Tables", i), c.tableGroups === "items" && iS(d, "TableGroups", a), c.schemas === "items" && iS(d, "Schemas", o)) : u && aS(d, "Tables"), c.stickyNotes === "items" ? iS(d, "Notes", s) : c.stickyNotes === "empty" && aS(d, "Notes"), d.push("}"), d.join("\n");
16183
16205
  }
16184
- function iS(e, t, n) {
16185
- let r = this.getSource(e) ?? "", i = n ?? $x(r), a = [];
16206
+ function cS(e, t, n) {
16207
+ let r = this.getSource(e) ?? "", i = n ?? rS(r), a = [];
16186
16208
  for (let e of t) {
16187
- let t = aS(r, e, i);
16209
+ let t = lS(r, e, i);
16188
16210
  a.push(...t);
16189
16211
  }
16190
16212
  return a.sort((e, t) => t.start - e.start), {
16191
- newDbml: ex(r, a, !0),
16213
+ newDbml: ix(r, a, !0),
16192
16214
  edits: a
16193
16215
  };
16194
16216
  }
16195
- function aS(e, t, n) {
16217
+ function lS(e, t, n) {
16196
16218
  switch (t.operation) {
16197
- case "create": return oS(e, t, n);
16198
- case "update": return sS(e, t, n);
16199
- case "delete": return cS(e, t, n);
16219
+ case "create": return uS(e, t, n);
16220
+ case "update": return dS(e, t, n);
16221
+ case "delete": return fS(e, t, n);
16200
16222
  default: return [];
16201
16223
  }
16202
16224
  }
16203
- function oS(e, t, n) {
16204
- if (n.find((e) => e.name === t.name)) return sS(e, t, n);
16205
- let r = "\n\n" + rS(t.name, t.visibleEntities) + "\n";
16225
+ function uS(e, t, n) {
16226
+ if (n.find((e) => e.name === t.name)) return dS(e, t, n);
16227
+ let r = "\n\n" + sS(t.name, t.visibleEntities) + "\n";
16206
16228
  return [{
16207
16229
  start: e.length,
16208
16230
  end: e.length,
16209
16231
  newText: r
16210
16232
  }];
16211
16233
  }
16212
- function sS(e, t, n) {
16234
+ function dS(e, t, n) {
16213
16235
  let r = n.find((e) => e.name === t.name);
16214
16236
  if (!r) return [];
16215
16237
  let i = [];
16216
16238
  if (t.newName || t.visibleEntities) {
16217
- let e = rS(t.newName || t.name, t.visibleEntities);
16239
+ let e = sS(t.newName || t.name, t.visibleEntities);
16218
16240
  i.push({
16219
16241
  start: r.startIndex,
16220
16242
  end: r.endIndex,
@@ -16223,7 +16245,7 @@ function sS(e, t, n) {
16223
16245
  }
16224
16246
  return i;
16225
16247
  }
16226
- function cS(e, t, n) {
16248
+ function fS(e, t, n) {
16227
16249
  let r = n.find((e) => e.name === t.name);
16228
16250
  if (!r) return [];
16229
16251
  let i = r.startIndex, a = r.endIndex;
@@ -16243,25 +16265,25 @@ function cS(e, t, n) {
16243
16265
  }
16244
16266
  //#endregion
16245
16267
  //#region src/compiler/index.ts
16246
- var lS = Symbol("COMPUTING"), uS = class {
16268
+ var pS = Symbol("COMPUTING"), mS = class {
16247
16269
  constructor(e) {
16248
- this.layout = e, this.nodeIdGenerator = new zp(), this.symbolIdGenerator = new _p(), this.symbolFactory = new $a(this.symbolIdGenerator), this.sourceSnapshot = /* @__PURE__ */ new Map(), this.globalCache = /* @__PURE__ */ new Map(), this.globallyQuerying = !1, this.localCache = /* @__PURE__ */ new Map(), this.parseFile = this.localQuery(Wb), this.parseProject = this.globalQuery(Gb), this.validateNode = this.localQuery(G_), this.validateFile = this.localQuery(Mb), this.nodeFullname = this.localQuery(q_), this.nodeAlias = this.localQuery(J_), this.nodeSettings = this.localQuery(K_), this.canonicalName = this.globalQuery(pb), this.bindNode = this.globalQuery(t_), this.bindFile = this.globalQuery(Ob), this.bindProject = this.globalQuery(kb), this.interpretSymbol = this.globalQuery(r_), this.interpretMetadata = this.globalQuery(i_), this.interpretFile = this.globalQuery(Ab), this.interpretProject = this.globalQuery(jb), this.nodeSymbol = this.globalQuery(Qg), this.nodeMetadata = this.globalQuery(n_), this.symbolMembers = this.globalQuery($g), this.symbolMembersLookupMap = this.globalQuery(Kb), this.lookupMembers = this.globalQuery(qb), this.nodeReferee = this.globalQuery(e_), this.resolutionIndex = this.globalQuery(Yb), this.symbolReferences = this.globalQuery(Zb), this.symbolParent = this.globalQuery(Xb), this.symbolMetadata = this.globalQuery(Qb), this.symbolAliases = this.globalQuery(Jb), this.symbolUses = this.globalQuery($b), this.fileDependencies = this.localQuery(gb), this.reachableFiles = this.globalQuery(vb), this.usableMembers = this.globalQuery($h), this.nodeAtPosition = this.localQuery(Db), this.renameTable = wx.bind(this), this.updateElementSetting = Yx.bind(this), this.updateElementSettingEdit = Jx.bind(this), this.syncDiagramView = iS.bind(this), this.syncDep = Px.bind(this), this.token = {
16249
- invalidStream: this.localQuery(Eb),
16250
- flatStream: this.localQuery(Tb)
16270
+ this.layout = e, this.nodeIdGenerator = new zp(), this.symbolIdGenerator = new _p(), this.symbolFactory = new $a(this.symbolIdGenerator), this.sourceSnapshot = /* @__PURE__ */ new Map(), this.globalCache = /* @__PURE__ */ new Map(), this.globallyQuerying = !1, this.localCache = /* @__PURE__ */ new Map(), this.parseFile = this.localQuery(Jb), this.parseProject = this.globalQuery(Yb), this.validateNode = this.localQuery(Y_), this.validateFile = this.localQuery(Ib), this.nodeFullname = this.localQuery(Z_), this.nodeAlias = this.localQuery(Q_), this.nodeSettings = this.localQuery(X_), this.canonicalName = this.globalQuery(_b), this.bindNode = this.globalQuery(a_), this.bindFile = this.globalQuery(Mb), this.bindProject = this.globalQuery(Nb), this.interpretSymbol = this.globalQuery(s_), this.interpretMetadata = this.globalQuery(c_), this.interpretFile = this.globalQuery(Pb), this.interpretProject = this.globalQuery(Fb), this.nodeSymbol = this.globalQuery(n_), this.nodeMetadata = this.globalQuery(o_), this.symbolMembers = this.globalQuery(r_), this.symbolMembersLookupMap = this.globalQuery(Xb), this.lookupMembers = this.globalQuery(Zb), this.nodeReferee = this.globalQuery(i_), this.resolutionIndex = this.globalQuery($b), this.symbolReferences = this.globalQuery(tx), this.symbolParent = this.globalQuery(ex), this.symbolMetadata = this.globalQuery(nx), this.symbolAliases = this.globalQuery(Qb), this.symbolUses = this.globalQuery(rx), this.fileDependencies = this.localQuery(bb), this.reachableFiles = this.globalQuery(Sb), this.usableMembers = this.globalQuery(rg), this.nodeAtPosition = this.localQuery(jb), this.renameTable = Ox.bind(this), this.updateElementSetting = $x.bind(this), this.updateElementSettingEdit = Qx.bind(this), this.syncDiagramView = cS.bind(this), this.syncDep = Rx.bind(this), this.token = {
16271
+ invalidStream: this.localQuery(Ab),
16272
+ flatStream: this.localQuery(kb)
16251
16273
  }, this.parse = {
16252
16274
  source: (e) => this.getSource(e) || "",
16253
- ast: (e = To) => yb.call(this, e),
16254
- errors: (e = To) => bb.call(this, e),
16255
- warnings: (e = To) => xb.call(this, e),
16256
- tokens: (e = To) => Sb.call(this, e),
16257
- rawDb: (e = To) => Cb.call(this, e),
16258
- publicSymbolTable: (e = To) => wb.call(this, e)
16275
+ ast: (e = To) => Cb.call(this, e),
16276
+ errors: (e = To) => wb.call(this, e),
16277
+ warnings: (e = To) => Tb.call(this, e),
16278
+ tokens: (e = To) => Eb.call(this, e),
16279
+ rawDb: (e = To) => Db.call(this, e),
16280
+ publicSymbolTable: (e = To) => Ob.call(this, e)
16259
16281
  }, this.container = {
16260
- stack: this.localQuery(cb),
16261
- token: this.localQuery(lb),
16262
- element: this.localQuery(ub),
16263
- scope: this.localQuery(db),
16264
- scopeKind: this.localQuery(fb)
16282
+ stack: this.localQuery(fb),
16283
+ token: this.localQuery(pb),
16284
+ element: this.localQuery(mb),
16285
+ scope: this.localQuery(hb),
16286
+ scopeKind: this.localQuery(gb)
16265
16287
  };
16266
16288
  }
16267
16289
  getSource(e) {
@@ -16274,7 +16296,7 @@ var lS = Symbol("COMPUTING"), uS = class {
16274
16296
  cleanStaleGlobalCache() {
16275
16297
  let e = this.layout.getEntrypoints(), t = !1;
16276
16298
  this.entrypointsSnapshot !== void 0 && (this.entrypointsSnapshot.length !== e.length || this.entrypointsSnapshot.some((t, n) => t.absolute !== e[n].absolute)) && (t = !0), this.entrypointsSnapshot = e;
16277
- for (let t of _b(this, e)) this.cleanStaleLocalCache(t);
16299
+ for (let t of xb(this, e)) this.cleanStaleLocalCache(t);
16278
16300
  t && this.globalCache.clear();
16279
16301
  }
16280
16302
  globalQuery(e) {
@@ -16287,10 +16309,10 @@ var lS = Symbol("COMPUTING"), uS = class {
16287
16309
  r || (r = /* @__PURE__ */ new Map(), this.globalCache.set(t, r));
16288
16310
  let i = n.length === 0 ? "" : n.length === 1 ? bm(n[0]) : n.map((e) => bm(e)).join("\0"), a = r.get(i);
16289
16311
  if (a) {
16290
- if (a === lS) throw Error(`Cycle detected in query: ${e.name}(${i})`);
16312
+ if (a === pS) throw Error(`Cycle detected in query: ${e.name}(${i})`);
16291
16313
  return a;
16292
16314
  }
16293
- r.set(i, lS);
16315
+ r.set(i, pS);
16294
16316
  try {
16295
16317
  let t = e.apply(this, n);
16296
16318
  return r.set(i, t), t;
@@ -16312,10 +16334,10 @@ var lS = Symbol("COMPUTING"), uS = class {
16312
16334
  let c = s.get(t);
16313
16335
  if (c || (c = /* @__PURE__ */ new Map(), s.set(t, c)), c.has(o)) {
16314
16336
  let t = c.get(o);
16315
- if (t === lS) throw Error(`Cycle detected in query: ${e.name}(${a}, ${o})`);
16337
+ if (t === pS) throw Error(`Cycle detected in query: ${e.name}(${a}, ${o})`);
16316
16338
  return t;
16317
16339
  }
16318
- c.set(o, lS);
16340
+ c.set(o, pS);
16319
16341
  try {
16320
16342
  let t = e.apply(this, n);
16321
16343
  return c.set(o, t), t;
@@ -16327,13 +16349,13 @@ var lS = Symbol("COMPUTING"), uS = class {
16327
16349
  initMonacoServices(e) {
16328
16350
  let t = e?.autocompletion?.triggerCharacters ?? [];
16329
16351
  return {
16330
- definitionProvider: new ry(this),
16331
- referenceProvider: new ay(this),
16332
- autocompletionProvider: new My(this, { triggerCharacters: t }),
16333
- diagnosticsProvider: new iy(this)
16352
+ definitionProvider: new sy(this),
16353
+ referenceProvider: new ly(this),
16354
+ autocompletionProvider: new Iy(this, { triggerCharacters: t }),
16355
+ diagnosticsProvider: new cy(this)
16334
16356
  };
16335
16357
  }
16336
- }, dS = class e {
16358
+ }, hS = class e {
16337
16359
  constructor(e = {}) {
16338
16360
  this.files = e instanceof Map ? new Map(e) : new Map(Object.entries(e));
16339
16361
  }
@@ -16377,4 +16399,4 @@ var lS = Symbol("COMPUTING"), uS = class {
16377
16399
  }
16378
16400
  };
16379
16401
  //#endregion
16380
- export { nm as ArrayNode, B as AttributeNode, W as BlockExpressionNode, Xp as CallExpressionNode, Jp as CommaExpressionNode, T as CompileError, w as CompileErrorCode, uS as Compiler, X as CompletionItemInsertTextRule, Y as CompletionItemKind, My as DBMLCompletionItemProvider, ry as DBMLDefinitionProvider, iy as DBMLDiagnosticsProvider, ay as DBMLReferencesProvider, To as DEFAULT_ENTRY, z as ElementDeclarationNode, r as ElementKind, tm as EmptyNode, tp as FALSY_VALUES, yo as Filepath, U as FunctionApplicationNode, Kp as FunctionExpressionNode, Yp as GroupExpressionNode, Wp as IdentifierStreamNode, H as InfixExpressionNode, G as ListExpressionNode, Zp as LiteralNode, ey as MarkerSeverity, dS as MemoryProjectLayout, am as MetadataKind, Gp as PostfixExpressionNode, V as PrefixExpressionNode, em as PrimaryExpressionNode, R as ProgramNode, Q as ScopeKind, I as SymbolKind, L as SyntaxNode, zp as SyntaxNodeIdGenerator, Bp as SyntaxNodeKind, Va as SyntaxToken, v as SyntaxTokenKind, ep as TRUTHY_VALUES, qp as TupleExpressionNode, t as UNHANDLED, Uv as Uri, Vp as UseDeclarationNode, Up as UseSpecifierListNode, Hp as UseSpecifierNode, $p as VariableNode, Qp as WildcardNode, vg as addDoubleQuoteIfNeeded, ob as dbmlLanguageConfig, sb as dbmlMonarchTokensProvider, xg as escapeString, Wf as extractNumericLiteral, Zf as extractSignedNumber, Fx as findDepBlocks, $x as findDiagramViewBlocks, Sg as formatRecordValue, Ho as getRecordValueType, zo as isBinaryType, Lo as isBooleanType, Bo as isDateTimeType, Yf as isEmptyStringLiteral, Fo as isFloatType, Xf as isFunctionExpression, Po as isIntegerType, Jf as isNullish, Io as isNumericType, za as isOp, Ba as isOpToken, Vo as isSerialType, Ro as isStringType, Ra as isTriviaToken, _g as isValidIdentifier, yg as normalizeQualifiedName, No as normalizeTypeName, Cg as splitQualifiedIdentifier, np as tryExtractBoolean, cp as tryExtractDateTime, rp as tryExtractEnum, $f as tryExtractInteger, Qf as tryExtractNumeric, ip as tryExtractString, bg as unescapeString, kh as validateForeignKeys, yh as validatePrimaryKey, Th as validateUnique };
16402
+ export { nm as ArrayNode, B as AttributeNode, W as BlockExpressionNode, Xp as CallExpressionNode, Jp as CommaExpressionNode, T as CompileError, w as CompileErrorCode, mS as Compiler, X as CompletionItemInsertTextRule, Y as CompletionItemKind, Iy as DBMLCompletionItemProvider, sy as DBMLDefinitionProvider, cy as DBMLDiagnosticsProvider, ly as DBMLReferencesProvider, To as DEFAULT_ENTRY, z as ElementDeclarationNode, r as ElementKind, tm as EmptyNode, tp as FALSY_VALUES, yo as Filepath, U as FunctionApplicationNode, Kp as FunctionExpressionNode, Yp as GroupExpressionNode, Wp as IdentifierStreamNode, H as InfixExpressionNode, G as ListExpressionNode, Zp as LiteralNode, iy as MarkerSeverity, hS as MemoryProjectLayout, am as MetadataKind, Gp as PostfixExpressionNode, V as PrefixExpressionNode, em as PrimaryExpressionNode, R as ProgramNode, Q as ScopeKind, I as SymbolKind, L as SyntaxNode, zp as SyntaxNodeIdGenerator, Bp as SyntaxNodeKind, Va as SyntaxToken, v as SyntaxTokenKind, ep as TRUTHY_VALUES, qp as TupleExpressionNode, t as UNHANDLED, qv as Uri, Vp as UseDeclarationNode, Up as UseSpecifierListNode, Hp as UseSpecifierNode, $p as VariableNode, Qp as WildcardNode, Sg as addDoubleQuoteIfNeeded, ub as dbmlLanguageConfig, db as dbmlMonarchTokensProvider, Tg as escapeString, Wf as extractNumericLiteral, Zf as extractSignedNumber, zx as findDepBlocks, rS as findDiagramViewBlocks, Eg as formatRecordValue, Ho as getRecordValueType, zo as isBinaryType, Lo as isBooleanType, Bo as isDateTimeType, Yf as isEmptyStringLiteral, Fo as isFloatType, Xf as isFunctionExpression, Po as isIntegerType, Jf as isNullish, Io as isNumericType, za as isOp, Ba as isOpToken, Vo as isSerialType, Ro as isStringType, Ra as isTriviaToken, xg as isValidIdentifier, Cg as normalizeQualifiedName, No as normalizeTypeName, Dg as splitQualifiedIdentifier, np as tryExtractBoolean, cp as tryExtractDateTime, rp as tryExtractEnum, $f as tryExtractInteger, Qf as tryExtractNumeric, ip as tryExtractString, wg as unescapeString, kh as validateForeignKeys, yh as validatePrimaryKey, Th as validateUnique };