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

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,100 @@ 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/records.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/dep.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) return [];
8189
+ if (Fh(t)) {
8190
+ let e = uh(r[0].downstream.schemaName, r[0].downstream.tableName);
8191
+ for (let n = 1; n < r.length; n++) {
8192
+ let i = uh(r[n].downstream.schemaName, r[n].downstream.tableName);
8193
+ if (i !== e) return [new T(w.DEP_MIXED_DOWNSTREAM_TABLES, `All edges in a Dep block must target the same downstream table, but found '${e}' and '${i}'`, t.declaration)];
8194
+ }
8195
+ if (n.has(e)) return [new T(w.DEP_DUPLICATE_DOWNSTREAM_TABLE, `Downstream table '${e}' is already targeted by another Dep block`, t.declaration)];
8196
+ n.set(e, !0);
8197
+ } else for (let e of r) {
8198
+ let r = uh(e.downstream.schemaName, e.downstream.tableName);
8199
+ if (n.get(r) === !0) return [new T(w.DEP_DUPLICATE_DOWNSTREAM_TABLE, `Downstream table '${r}' is already targeted by a Dep block`, t.declaration)];
8200
+ n.has(r) || n.set(r, !1);
8201
+ }
8202
+ return [];
8203
+ }
8204
+ //#endregion
8113
8205
  //#region src/core/global_modules/program/interpret.ts
8114
- var Nh = class {
8206
+ var Lh = class {
8115
8207
  constructor(e, t, n) {
8116
8208
  this.errors = [], this.warnings = [], this.compiler = e, this.programSymbol = t, this.programNode = t.declaration, this.filepath = n, this.db = {
8117
8209
  schemas: [],
@@ -8136,7 +8228,7 @@ var Nh = class {
8136
8228
  };
8137
8229
  }
8138
8230
  interpret() {
8139
- return this.interpretAllSymbols(), this.interpretAllMetadata(), this.interpretAllAliases(), this.warnings.push(...this.validateRecords()), new n(this.db, this.errors, this.warnings);
8231
+ 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
8232
  }
8141
8233
  interpretAllSymbols() {
8142
8234
  for (let e of this.programSymbol.declaration.declarations) {
@@ -8187,25 +8279,25 @@ var Nh = class {
8187
8279
  ch(this.db, e, o);
8188
8280
  }
8189
8281
  interpretAllMetadata() {
8190
- let e = this.compiler.symbolMetadata(this.programSymbol) ?? [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
8282
+ let e = this.compiler.symbolMetadata(this.programSymbol) ?? [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
8191
8283
  for (let t of e) {
8192
8284
  if (!(t instanceof fm)) continue;
8193
8285
  let e = t.table(this.compiler);
8194
8286
  if (!e) continue;
8195
- let n = e.originalSymbol.intern(), r = i.get(n);
8196
- r ? r.count++ : i.set(n, {
8287
+ let n = e.originalSymbol.intern(), r = a.get(n);
8288
+ r ? r.count++ : a.set(n, {
8197
8289
  count: 1,
8198
8290
  tableName: e.name ?? ""
8199
8291
  });
8200
8292
  }
8201
- for (let a of e) {
8202
- let e = this.compiler.interpretMetadata(a, this.filepath);
8293
+ for (let o of e) {
8294
+ let e = this.compiler.interpretMetadata(o, this.filepath);
8203
8295
  if (e.hasValue(t)) continue;
8204
8296
  this.errors.push(...e.getErrors()), this.warnings.push(...e.getWarnings());
8205
- let o = e.getValue();
8206
- if (o !== void 0) switch (a.kind) {
8297
+ let s = e.getValue();
8298
+ if (s !== void 0) switch (o.kind) {
8207
8299
  case am.Ref: {
8208
- let e = o, [t, r] = e.endpoints ?? [];
8300
+ let e = s, [t, r] = e.endpoints ?? [];
8209
8301
  if (t && r) {
8210
8302
  let e = [
8211
8303
  t.schemaName,
@@ -8223,7 +8315,7 @@ var Nh = class {
8223
8315
  t.fieldNames.join(",")
8224
8316
  ].join("|");
8225
8317
  if (n.has(e) || n.has(i)) {
8226
- this.errors.push(new T(w.SAME_ENDPOINT, "Ref with same endpoints already exists", a.declaration));
8318
+ this.errors.push(new T(w.SAME_ENDPOINT, "Ref with same endpoints already exists", o.declaration));
8227
8319
  break;
8228
8320
  }
8229
8321
  n.add(e);
@@ -8232,7 +8324,7 @@ var Nh = class {
8232
8324
  break;
8233
8325
  }
8234
8326
  case am.Dep: {
8235
- let e = o, t = a instanceof cm ? a.edgeExpressions() : [], n = -1;
8327
+ let e = s, t = o instanceof cm ? o.edgeExpressions() : [], n = -1;
8236
8328
  if ((e.edges ?? []).some((e, t) => {
8237
8329
  let { upstream: i, downstream: a } = e, o = [
8238
8330
  i.schemaName,
@@ -8244,25 +8336,30 @@ var Nh = class {
8244
8336
  ].join("|");
8245
8337
  return r.has(o) ? (n = t, !0) : (r.add(o), !1);
8246
8338
  }), n >= 0) {
8247
- let e = t[n] ?? a.declaration;
8339
+ let e = t[n] ?? o.declaration;
8248
8340
  this.errors.push(new T(w.SAME_ENDPOINT, "Dep with same endpoints already exists", e));
8249
8341
  break;
8250
8342
  }
8343
+ let a = Ih(e, o, i);
8344
+ if (a.length > 0) {
8345
+ this.errors.push(...a);
8346
+ break;
8347
+ }
8251
8348
  this.db.deps.push(e);
8252
8349
  break;
8253
8350
  }
8254
8351
  case am.Records:
8255
- if (a instanceof fm) {
8256
- let e = a.table(this.compiler)?.originalSymbol.intern() ?? "", t = e ? i.get(e) : void 0;
8352
+ if (o instanceof fm) {
8353
+ let e = o.table(this.compiler)?.originalSymbol.intern() ?? "", t = e ? a.get(e) : void 0;
8257
8354
  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));
8355
+ 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
8356
  break;
8260
8357
  }
8261
8358
  }
8262
- this.db.records.push(o);
8359
+ this.db.records.push(s);
8263
8360
  break;
8264
8361
  case am.Project:
8265
- this.db.project = o;
8362
+ this.db.project = s;
8266
8363
  break;
8267
8364
  default: break;
8268
8365
  }
@@ -8283,73 +8380,6 @@ var Nh = class {
8283
8380
  this.db.aliases.push(r);
8284
8381
  }
8285
8382
  }
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
8383
  pushElement(e, t) {
8354
8384
  if (!Array.isArray(t)) switch (e.kind) {
8355
8385
  case I.Table:
@@ -8373,7 +8403,7 @@ var Nh = class {
8373
8403
  default: break;
8374
8404
  }
8375
8405
  }
8376
- }, Ph = {
8406
+ }, Rh = {
8377
8407
  nodeSymbol(t, r) {
8378
8408
  return Ef(r) ? n.create(t.symbolFactory.create(Fp, {
8379
8409
  declaration: r,
@@ -8403,9 +8433,9 @@ var Nh = class {
8403
8433
  let e = t.reachableFiles(i).flatMap((e) => t.bindFile(e).getErrors());
8404
8434
  return n.create(void 0, e);
8405
8435
  }
8406
- return new Nh(t, r, i).interpret();
8436
+ return new Lh(t, r, i).interpret();
8407
8437
  }
8408
- }, Fh = class {
8438
+ }, zh = class {
8409
8439
  constructor(e, t) {
8410
8440
  this.compiler = e, this.declarationNode = t;
8411
8441
  }
@@ -8420,7 +8450,7 @@ var Nh = class {
8420
8450
  bindSubElements(e) {
8421
8451
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
8422
8452
  }
8423
- }, Ih = class {
8453
+ }, Bh = class {
8424
8454
  constructor(e, t, n) {
8425
8455
  this.declarationNode = t, this.compiler = e, this.filepath = n, this.project = {
8426
8456
  enums: [],
@@ -8479,17 +8509,17 @@ var Nh = class {
8479
8509
  }
8480
8510
  });
8481
8511
  }
8482
- }, Lh = {
8512
+ }, Vh = {
8483
8513
  nodeMetadata(t, i) {
8484
8514
  return A(i, r.Project) ? n.create(new pm(i)) : n.create(e);
8485
8515
  },
8486
8516
  bindNode(t, i) {
8487
- return A(i, r.Project) ? n.create(void 0, new Fh(t, i).bind()) : n.create(e);
8517
+ return A(i, r.Project) ? n.create(void 0, new zh(t, i).bind()) : n.create(e);
8488
8518
  },
8489
8519
  interpretMetadata(t, r, i) {
8490
- return !(r instanceof pm) || !(r.declaration instanceof z) ? n.create(e) : new Ih(t, r.declaration, i).interpret();
8520
+ return !(r instanceof pm) || !(r.declaration instanceof z) ? n.create(e) : new Bh(t, r.declaration, i).interpret();
8491
8521
  }
8492
- }, Rh = class {
8522
+ }, Hh = class {
8493
8523
  constructor(e, t) {
8494
8524
  this.compiler = e, this.declarationNode = t, this.boundColumns = /* @__PURE__ */ new Map();
8495
8525
  }
@@ -8556,16 +8586,16 @@ var Nh = class {
8556
8586
  bindSubElements(e) {
8557
8587
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
8558
8588
  }
8559
- }, zh = class {
8589
+ }, Uh = class {
8560
8590
  constructor(e, t, n) {
8561
8591
  this.compiler = e, this.metadata = t, this.element = t.declaration, this.filepath = n;
8562
8592
  }
8563
8593
  interpret() {
8564
- let e = [], t = [], r = Bh(this.element, this.compiler, this.filepath);
8594
+ let e = [], t = [], r = Wh(this.element, this.compiler, this.filepath);
8565
8595
  if (!r || r.columns.length === 0) return new n(void 0, e);
8566
8596
  let i = [];
8567
8597
  for (let n of this.element.body.body) {
8568
- let a = Vh(n, r.columns, this.compiler);
8598
+ let a = Gh(n, r.columns, this.compiler);
8569
8599
  e.push(...a.getErrors()), t.push(...a.getWarnings());
8570
8600
  let o = a.getValue();
8571
8601
  o.row && i.push(o.row);
@@ -8580,7 +8610,7 @@ var Nh = class {
8580
8610
  }, e, t);
8581
8611
  }
8582
8612
  };
8583
- function Bh(e, n, i) {
8613
+ function Wh(e, n, i) {
8584
8614
  let a = e.name, o = e.parent;
8585
8615
  if (o instanceof z && o.isKind(r.Table)) {
8586
8616
  let e = n.nodeSymbol(o).getFiltered(t);
@@ -8615,7 +8645,7 @@ function Bh(e, n, i) {
8615
8645
  columns: te
8616
8646
  };
8617
8647
  }
8618
- function Vh(e, t, r) {
8648
+ function Gh(e, t, r) {
8619
8649
  let i = [], a = [], o = {}, s = e.callee instanceof Jp ? e.callee.elementList : [e.callee];
8620
8650
  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
8651
  row: null,
@@ -8625,7 +8655,7 @@ function Vh(e, t, r) {
8625
8655
  for (let e = 0; e < t.length; e++) {
8626
8656
  let n = s[e], l = t[e];
8627
8657
  o[l.name ?? ""] = n;
8628
- let u = Uh(n, l, r);
8658
+ let u = qh(n, l, r);
8629
8659
  i.push(...u.getErrors()), a.push(...u.getWarnings());
8630
8660
  let d = u.getValue();
8631
8661
  c.push(d ?? {
@@ -8639,11 +8669,11 @@ function Vh(e, t, r) {
8639
8669
  columnNodes: o
8640
8670
  }, i, a);
8641
8671
  }
8642
- function Hh(e) {
8672
+ function Kh(e) {
8643
8673
  return e instanceof Kp && e.value?.value || "";
8644
8674
  }
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;
8675
+ function qh(e, t, r) {
8676
+ 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
8677
  if (e instanceof Kp) return new n({
8648
8678
  value: e.value?.value || "",
8649
8679
  type: "expression",
@@ -8762,7 +8792,7 @@ function Uh(e, t, r) {
8762
8792
  }
8763
8793
  //#endregion
8764
8794
  //#region src/core/global_modules/records/index.ts
8765
- var Wh = {
8795
+ var Jh = {
8766
8796
  nodeMetadata(t, i) {
8767
8797
  if (!A(i, r.Records)) return n.create(e);
8768
8798
  let a = i.parent;
@@ -8777,26 +8807,26 @@ var Wh = {
8777
8807
  let s = i.parseFile(a.filepath).getValue().ast, c = i.nodeSymbol(s).getFiltered(t);
8778
8808
  if (!c) return n.create(void 0);
8779
8809
  let l = a.parentOfKind(qp);
8780
- if (l?.parentNode === o) return Gh(i, o, a);
8810
+ if (l?.parentNode === o) return Yh(i, o, a);
8781
8811
  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);
8812
+ 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
8813
  },
8784
8814
  bindNode(t, i) {
8785
- return A(i, r.Records) ? n.create(void 0, new Rh(t, i).bind()) : n.create(e);
8815
+ return A(i, r.Records) ? n.create(void 0, new Hh(t, i).bind()) : n.create(e);
8786
8816
  },
8787
8817
  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);
8818
+ return r instanceof fm ? r.declaration instanceof z ? new Uh(t, r, i).interpret() : n.create(void 0) : n.create(e);
8789
8819
  }
8790
8820
  };
8791
- function Gh(e, i, a) {
8821
+ function Yh(e, i, a) {
8792
8822
  let o = i.parent;
8793
8823
  if (o instanceof z && o.isKind(r.Table)) {
8794
8824
  let n = e.nodeSymbol(o).getFiltered(t);
8795
- if (n) return Jh(e, n, a);
8825
+ if (n) return Qh(e, n, a);
8796
8826
  }
8797
8827
  return new n(void 0);
8798
8828
  }
8799
- function Kh(e, r, i) {
8829
+ function Xh(e, r, i) {
8800
8830
  if (r.callee) {
8801
8831
  let n;
8802
8832
  if (O(r.callee)) n = e.nodeReferee(r.callee).getFiltered(t);
@@ -8807,11 +8837,11 @@ function Kh(e, r, i) {
8807
8837
  n = e.nodeReferee(r).getFiltered(t);
8808
8838
  }
8809
8839
  }
8810
- if (n) return Jh(e, n, i);
8840
+ if (n) return Qh(e, n, i);
8811
8841
  }
8812
8842
  return new n(void 0);
8813
8843
  }
8814
- function qh(e, t, r) {
8844
+ function Zh(e, t, r) {
8815
8845
  if (!O(r)) return new n(void 0);
8816
8846
  let i = Kf(r) ?? "";
8817
8847
  if (!k(r.parentNode)) {
@@ -8829,12 +8859,12 @@ function qh(e, t, r) {
8829
8859
  }
8830
8860
  return new n(void 0);
8831
8861
  }
8832
- function Jh(e, t, r) {
8862
+ function Qh(e, t, r) {
8833
8863
  if (!O(r)) return new n(void 0);
8834
8864
  let i = Kf(r) ?? "", a = e.lookupMembers(t, I.Column, i);
8835
8865
  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
8866
  }
8837
- function Yh(e, t, r) {
8867
+ function $h(e, t, r) {
8838
8868
  if (!O(r)) return new n(void 0);
8839
8869
  let i = Kf(r) ?? "";
8840
8870
  if (!k(r.parentNode)) return new n(void 0);
@@ -8863,12 +8893,12 @@ function Yh(e, t, r) {
8863
8893
  }
8864
8894
  //#endregion
8865
8895
  //#region src/core/global_modules/use/index.ts
8866
- var Xh = { visibleName(e, n) {
8896
+ var eg = { visibleName(e, n) {
8867
8897
  let r = n instanceof L ? n : n.useSpecifierDeclaration instanceof Hp ? n.useSpecifierDeclaration : n.declaration;
8868
8898
  if (r instanceof Hp && n instanceof vp && r.getSymbolKind() !== n.kind && (r = n.declaration), !r) return;
8869
8899
  let i = e.nodeAlias(r).getFiltered(t);
8870
8900
  return i === void 0 ? e.nodeFullname(r).getFiltered(t) : [i];
8871
- } }, Zh = {
8901
+ } }, tg = {
8872
8902
  nodeSymbol(r, i) {
8873
8903
  if (!Tf(i) || !i.name) return n.create(e);
8874
8904
  let a = i.getSymbolKind();
@@ -8879,8 +8909,8 @@ var Xh = { visibleName(e, n) {
8879
8909
  declaration: o?.declaration,
8880
8910
  usedSymbol: o,
8881
8911
  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)] : []);
8912
+ name: eg.visibleName(r, i)?.at(-1)
8913
+ }, 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
8914
  },
8885
8915
  symbolMembers(r, i) {
8886
8916
  if (!(i instanceof Lp)) return n.create(e);
@@ -8907,7 +8937,7 @@ var Xh = { visibleName(e, n) {
8907
8937
  let a = r.lookupMembers(e, o, c);
8908
8938
  return a ? n.create(a) : new n(void 0, [new T(w.BINDING_ERROR, `Could not find ${o} '${c}'`, i)]);
8909
8939
  }
8910
- let f = Qh(r, u, c, o);
8940
+ let f = ng(r, u, c, o);
8911
8941
  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
8942
  },
8913
8943
  bindNode(t, r) {
@@ -8939,7 +8969,7 @@ var Xh = { visibleName(e, n) {
8939
8969
  }) : n.create(s);
8940
8970
  }
8941
8971
  };
8942
- function Qh(e, n, r, i, a = /* @__PURE__ */ new Set()) {
8972
+ function ng(e, n, r, i, a = /* @__PURE__ */ new Set()) {
8943
8973
  if (!n || a.has(n.intern())) return;
8944
8974
  a.add(n.intern());
8945
8975
  let o = e.usableMembers(n).getFiltered(t);
@@ -8951,23 +8981,23 @@ function Qh(e, n, r, i, a = /* @__PURE__ */ new Set()) {
8951
8981
  for (let t of o.reuses.selective) if (M(t.alias ?? t.name)?.at(-1) === r) {
8952
8982
  let o = t.parentOfKind(Vp);
8953
8983
  if (o?.importPath?.value) {
8954
- let s = Qh(e, bo(n, o.importPath.value), M(t.name)?.at(-1) ?? r, i, a);
8984
+ let s = ng(e, bo(n, o.importPath.value), M(t.name)?.at(-1) ?? r, i, a);
8955
8985
  if (s) return s;
8956
8986
  }
8957
8987
  }
8958
8988
  for (let { importPath: t } of o.reuses.wildcard) {
8959
- let n = Qh(e, t, r, i, a);
8989
+ let n = ng(e, t, r, i, a);
8960
8990
  if (n) return n;
8961
8991
  }
8962
8992
  }
8963
8993
  //#endregion
8964
8994
  //#region src/compiler/queries/files/usableMembers.ts
8965
- function $h(e) {
8995
+ function rg(e) {
8966
8996
  if (e instanceof yo) {
8967
8997
  let { ast: n } = this.parseFile(e).getValue(), r = this.nodeSymbol(n).getFiltered(t);
8968
8998
  return this.usableMembers(r);
8969
8999
  }
8970
- let r = e.filepath, i = tg(this, r), { nonSchemaMembers: a, schemaMembers: o } = e instanceof Fp ? ng(this, e, i) : rg(this, e, i);
9000
+ let r = e.filepath, i = ag(this, r), { nonSchemaMembers: a, schemaMembers: o } = e instanceof Fp ? og(this, e, i) : sg(this, e, i);
8971
9001
  return new n({
8972
9002
  nonSchemaMembers: a,
8973
9003
  schemaMembers: o,
@@ -8981,16 +9011,16 @@ function $h(e) {
8981
9011
  }
8982
9012
  }, i.parseResult.getErrors(), i.parseResult.getWarnings());
8983
9013
  }
8984
- function eg(e, n, r) {
9014
+ function ig(e, n, r) {
8985
9015
  let i = n.qualifiedName, a;
8986
- if (a = r instanceof Hp ? Xh.visibleName(e, r) : e.nodeFullname(r).getFiltered(t), !a) return { kind: "none" };
9016
+ if (a = r instanceof Hp ? eg.visibleName(e, r) : e.nodeFullname(r).getFiltered(t), !a) return { kind: "none" };
8987
9017
  let o = r instanceof Hp && r.getSymbolKind() === I.Schema ? a : a.length <= 1 ? [y] : a.slice(0, -1);
8988
9018
  return o.length < i.length || !i.every((e, t) => e === o[t]) ? { kind: "none" } : o.length === i.length ? { kind: "direct" } : {
8989
9019
  kind: "child",
8990
9020
  schemaName: o[i.length]
8991
9021
  };
8992
9022
  }
8993
- function tg(e, t) {
9023
+ function ag(e, t) {
8994
9024
  let n = e.parseFile(t), { ast: r } = n.getValue(), i = [], a = [], o = [], s = [];
8995
9025
  for (let e of r.body) {
8996
9026
  if (!(e instanceof Vp) || !e.specifiers || !e.importPath) continue;
@@ -9012,14 +9042,14 @@ function tg(e, t) {
9012
9042
  wildcardUses: o
9013
9043
  };
9014
9044
  }
9015
- function ng(e, n, r) {
9045
+ function og(e, n, r) {
9016
9046
  let { ast: i, selectiveUses: a, selectiveReuses: o } = r, s = n.filepath, c = new Map([[y, e.symbolFactory.create(yp, { name: y }, s)]]);
9017
9047
  for (let n of i.declarations) {
9018
9048
  let r = e.nodeFullname(n).getFiltered(t) || [], i = r.length <= 1 ? y : r[0];
9019
9049
  c.has(i) || c.set(i, e.symbolFactory.create(yp, { name: i }, s));
9020
9050
  }
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));
9051
+ cg(e, [...a, ...o], c, s);
9052
+ 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
9053
  let l = [...c.values()], u = [], d = l.find((e) => e.isPublicSchema());
9024
9054
  if (d) {
9025
9055
  let n = e.usableMembers(d).getFiltered(t);
@@ -9030,11 +9060,11 @@ function ng(e, n, r) {
9030
9060
  schemaMembers: l
9031
9061
  };
9032
9062
  }
9033
- function rg(e, n, r) {
9063
+ function sg(e, n, r) {
9034
9064
  let { ast: i, selectiveUses: a, selectiveReuses: o } = r, s = [], c = /* @__PURE__ */ new Map();
9035
9065
  for (let r of i.body) {
9036
9066
  if (!(r instanceof z)) continue;
9037
- let i = eg(e, n, r), a = e.nodeAlias(r).getFiltered(t), o = e.nodeSymbol(r).getFiltered(t);
9067
+ let i = ig(e, n, r), a = e.nodeAlias(r).getFiltered(t), o = e.nodeSymbol(r).getFiltered(t);
9038
9068
  if (a !== void 0 && n.isPublicSchema() && o && s.push(e.symbolFactory.create(Ip, {
9039
9069
  kind: o.kind,
9040
9070
  declaration: r,
@@ -9049,9 +9079,9 @@ function rg(e, n, r) {
9049
9079
  parent: n
9050
9080
  }, n.filepath));
9051
9081
  }
9052
- ag(e, [...a, ...o], n, c);
9082
+ lg(e, [...a, ...o], n, c);
9053
9083
  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, {
9084
+ 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
9085
  name: r,
9056
9086
  parent: n
9057
9087
  }, n.filepath));
@@ -9060,18 +9090,18 @@ function rg(e, n, r) {
9060
9090
  schemaMembers: [...c.values()]
9061
9091
  };
9062
9092
  }
9063
- function ig(e, t, n, r) {
9093
+ function cg(e, t, n, r) {
9064
9094
  for (let i of t) {
9065
9095
  if (i.getSymbolKind() !== I.Schema) continue;
9066
- let t = Xh.visibleName(e, i)?.at(0);
9096
+ let t = eg.visibleName(e, i)?.at(0);
9067
9097
  t !== void 0 && !n.has(t) && n.set(t, e.symbolFactory.create(yp, { name: t }, r));
9068
9098
  }
9069
9099
  }
9070
- function ag(e, t, n, r) {
9100
+ function lg(e, t, n, r) {
9071
9101
  let i = n.qualifiedName;
9072
9102
  for (let a of t) {
9073
9103
  if (a.getSymbolKind() !== I.Schema) continue;
9074
- let t = Xh.visibleName(e, a);
9104
+ let t = eg.visibleName(e, a);
9075
9105
  if (!t || t.length <= i.length || !i.every((e, n) => e === t[n])) continue;
9076
9106
  let o = t[i.length];
9077
9107
  o && !r.has(o) && r.set(o, e.symbolFactory.create(yp, {
@@ -9080,37 +9110,37 @@ function ag(e, t, n, r) {
9080
9110
  }, n.filepath));
9081
9111
  }
9082
9112
  }
9083
- function og(e, n) {
9113
+ function ug(e, n) {
9084
9114
  let { ast: r } = e.parseFile(n).getValue(), i = [];
9085
9115
  for (let n of r.declarations) {
9086
9116
  let r = e.nodeFullname(n).getFiltered(t) || [], a = r.length <= 1 ? y : r[0];
9087
9117
  i.push(a);
9088
9118
  }
9089
- let a = tg(e, n);
9119
+ let a = ag(e, n);
9090
9120
  for (let t of [...a.selectiveUses, ...a.selectiveReuses]) {
9091
9121
  if (t.getSymbolKind() !== I.Schema) continue;
9092
- let n = Xh.visibleName(e, t)?.at(0);
9122
+ let n = eg.visibleName(e, t)?.at(0);
9093
9123
  n !== void 0 && i.push(n);
9094
9124
  }
9095
9125
  return i;
9096
9126
  }
9097
- function sg(e, n, r) {
9127
+ function dg(e, n, r) {
9098
9128
  let { ast: i } = e.parseFile(n).getValue(), a = [];
9099
9129
  for (let n of i.declarations) {
9100
9130
  let i = e.nodeFullname(n).getFiltered(t) || [], o = i.length <= 1 ? [y] : i.slice(0, -1);
9101
9131
  o.length > r.length && r.every((e, t) => e === o[t]) && a.push(o[r.length]);
9102
9132
  }
9103
- let o = tg(e, n);
9133
+ let o = ag(e, n);
9104
9134
  for (let t of [...o.selectiveUses, ...o.selectiveReuses]) {
9105
9135
  if (t.getSymbolKind() !== I.Schema) continue;
9106
- let n = Xh.visibleName(e, t);
9136
+ let n = eg.visibleName(e, t);
9107
9137
  !n || n.length <= r.length || r.every((e, t) => e === n[t]) && a.push(n[r.length]);
9108
9138
  }
9109
9139
  return a;
9110
9140
  }
9111
9141
  //#endregion
9112
9142
  //#region src/core/global_modules/table/bind.ts
9113
- var cg = class {
9143
+ var fg = class {
9114
9144
  constructor(e, t) {
9115
9145
  this.compiler = e, this.declarationNode = t;
9116
9146
  }
@@ -9183,7 +9213,7 @@ var cg = class {
9183
9213
  bindSubElements(e) {
9184
9214
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
9185
9215
  }
9186
- }, lg = class {
9216
+ }, pg = class {
9187
9217
  constructor(e, t, n, r) {
9188
9218
  this.compiler = e, this.declarationNode = t, this.symbol = n, this.filepath = r, this.table = {
9189
9219
  name: void 0,
@@ -9355,7 +9385,7 @@ var cg = class {
9355
9385
  let i = r.getValue();
9356
9386
  return Array.isArray(i) ? this.table.checks.push(...i) : i && this.table.checks.push(i), r.getErrors();
9357
9387
  }
9358
- }, ug = {
9388
+ }, mg = {
9359
9389
  getDuplicateError(e, t, n) {
9360
9390
  return new T(w.DUPLICATE_NAME, `Table '${e}' already exists in schema '${t}'`, n);
9361
9391
  },
@@ -9365,7 +9395,7 @@ var cg = class {
9365
9395
  getPartialInjectionDuplicateError(e, t) {
9366
9396
  return new T(w.DUPLICATE_TABLE_PARTIAL_INJECTION_NAME, `Duplicate table partial injection '${e}'`, t);
9367
9397
  }
9368
- }, dg = {
9398
+ }, hg = {
9369
9399
  nodeSymbol(i, a) {
9370
9400
  let o = i.nodeFullname(a).getFiltered(t)?.at(-1);
9371
9401
  return A(a, r.Table) ? new n(i.symbolFactory.create(Sp, {
@@ -9394,7 +9424,7 @@ var cg = class {
9394
9424
  let t = `${e.kind}:${e.name}`;
9395
9425
  if (e.name !== void 0) {
9396
9426
  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);
9427
+ 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
9428
  }
9399
9429
  }
9400
9430
  let u = [];
@@ -9436,22 +9466,22 @@ var cg = class {
9436
9466
  nodeReferee(a, o) {
9437
9467
  if (Af(o, i.Dep) && o.parent instanceof z && o.parent.isKind(r.Table) && !Df(o, r.Table)) {
9438
9468
  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);
9469
+ return r === t ? n.create(void 0) : yg(a, r, o);
9440
9470
  }
9441
9471
  if (!Df(o, r.Table)) return n.create(e);
9442
9472
  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);
9473
+ 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
9474
  },
9445
9475
  bindNode(i, a) {
9446
9476
  if (!A(a, r.Table)) return n.create(e);
9447
- let o = new cg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
9477
+ let o = new fg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
9448
9478
  return s && o.push(...i.symbolMembers(s).getErrors()), n.create(void 0, o);
9449
9479
  },
9450
9480
  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);
9481
+ return r instanceof Sp ? r.declaration instanceof z ? new pg(t, r.declaration, r, i).interpret() : n.create(void 0) : n.create(e);
9452
9482
  }
9453
9483
  };
9454
- function fg(e, r, i) {
9484
+ function gg(e, r, i) {
9455
9485
  let a = P(i) ?? "", o = e.symbolMembers(r).getFiltered(t);
9456
9486
  if (o) {
9457
9487
  let t = o.find((e) => e instanceof yp && e.isPublicSchema());
@@ -9463,7 +9493,7 @@ function fg(e, r, i) {
9463
9493
  let s = e.lookupMembers(r, I.TablePartial, a);
9464
9494
  return s ? n.create(s) : new n(void 0, [new T(w.BINDING_ERROR, `TablePartial '${a}' does not exist in Schema 'public'`, i)]);
9465
9495
  }
9466
- function pg(e, t, r) {
9496
+ function _g(e, t, r) {
9467
9497
  if (!O(r)) return new n(void 0);
9468
9498
  let i = Kf(r) ?? "";
9469
9499
  if (!k(r.parentNode)) return n.create(e.lookupMembers(t, I.Enum, i));
@@ -9481,7 +9511,7 @@ function pg(e, t, r) {
9481
9511
  }
9482
9512
  return new n(void 0);
9483
9513
  }
9484
- function mg(e, i, a) {
9514
+ function vg(e, i, a) {
9485
9515
  if (!O(a)) return new n(void 0);
9486
9516
  let o = Kf(a) ?? "";
9487
9517
  if (!k(a.parentNode)) {
@@ -9495,7 +9525,7 @@ function mg(e, i, a) {
9495
9525
  }
9496
9526
  return Am(e, i, a, I.Column);
9497
9527
  }
9498
- function hg(e, i, a) {
9528
+ function yg(e, i, a) {
9499
9529
  if (!O(a)) return new n(void 0);
9500
9530
  let o = Df(a, r.Table), s = Kf(a) ?? "";
9501
9531
  if (!k(a.parentNode)) if (o) {
@@ -9512,7 +9542,7 @@ function hg(e, i, a) {
9512
9542
  }
9513
9543
  return Am(e, i, a, o ? I.Column : I.Table);
9514
9544
  }
9515
- function gg(e, t, r) {
9545
+ function bg(e, t, r) {
9516
9546
  if (!O(r)) return new n(void 0);
9517
9547
  let i = Kf(r) ?? "";
9518
9548
  if (!k(r.parentNode)) return xo.includes(i.toLowerCase()) ? new n(void 0) : n.create(e.lookupMembers(t, I.Enum, i));
@@ -9541,16 +9571,16 @@ function gg(e, t, r) {
9541
9571
  }
9542
9572
  //#endregion
9543
9573
  //#region src/compiler/queries/utils.ts
9544
- function _g(e) {
9574
+ function xg(e) {
9545
9575
  return e ? e.split("").every((e) => nf(e) || rf(e)) && !rf(e[0]) : !1;
9546
9576
  }
9547
- function vg(e) {
9548
- return _g(e) ? e : `"${xg(e)}"`;
9577
+ function Sg(e) {
9578
+ return xg(e) ? e : `"${Tg(e)}"`;
9549
9579
  }
9550
- function yg(...e) {
9551
- return e.map(vg).join(".");
9580
+ function Cg(...e) {
9581
+ return e.map(Sg).join(".");
9552
9582
  }
9553
- function bg(e) {
9583
+ function wg(e) {
9554
9584
  let t = "", n = 0, r = {
9555
9585
  n: "\n",
9556
9586
  t: " ",
@@ -9577,7 +9607,7 @@ function bg(e) {
9577
9607
  } else t += e[n], n++;
9578
9608
  return t;
9579
9609
  }
9580
- function xg(e) {
9610
+ function Tg(e) {
9581
9611
  let t = "";
9582
9612
  for (let n = 0; n < e.length; n++) {
9583
9613
  let r = e[n];
@@ -9617,11 +9647,11 @@ function xg(e) {
9617
9647
  }
9618
9648
  return t;
9619
9649
  }
9620
- function Sg(e) {
9650
+ function Eg(e) {
9621
9651
  if (e == null) return "null";
9622
9652
  if (typeof e == "boolean") return e ? "true" : "false";
9623
9653
  if (typeof e == "number") return String(e);
9624
- if (typeof e == "string") return `'${xg(e)}'`;
9654
+ if (typeof e == "string") return `'${Tg(e)}'`;
9625
9655
  let { value: t, type: n } = e;
9626
9656
  if (t == null || Lo(n) && typeof t == "string" && t.toLowerCase() === "null") return "null";
9627
9657
  if (n === "expression") return typeof t == "string" && t.toLowerCase().trim() === "null" ? "null" : `\`${t}\``;
@@ -9635,20 +9665,20 @@ function Sg(e) {
9635
9665
  }
9636
9666
  if (Bo(n)) {
9637
9667
  let e = cp(t);
9638
- return e === null ? `\`${t}\`` : `'${xg(e)}'`;
9668
+ return e === null ? `\`${t}\`` : `'${Tg(e)}'`;
9639
9669
  }
9640
9670
  let r = ip(t);
9641
- return r === null ? `\`${t}\`` : `'${xg(r)}'`;
9671
+ return r === null ? `\`${t}\`` : `'${Tg(r)}'`;
9642
9672
  }
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);
9673
+ function Dg(e) {
9674
+ return (e.match(/"(?:[^"\\]|\\.)*"|[^."]+/g) || []).map((e) => e.startsWith("\"") && e.endsWith("\"") ? wg(e.slice(1, -1)) : e.trim()).filter((e) => e.length > 0);
9645
9675
  }
9646
- function wg(e, t) {
9676
+ function Og(e, t) {
9647
9677
  let n = /* @__PURE__ */ new Set(), r = [];
9648
9678
  for (let i of t) for (let t of e.reachableFiles(i)) n.has(t.intern()) || (n.add(t.intern()), r.push(t));
9649
9679
  return r;
9650
9680
  }
9651
- function Tg(e) {
9681
+ function kg(e) {
9652
9682
  let r = [], i = [], a = [];
9653
9683
  e.bindProject();
9654
9684
  for (let n of e.parseProject().values()) {
@@ -9664,12 +9694,12 @@ function Tg(e) {
9664
9694
  }
9665
9695
  return new n(r, i, a);
9666
9696
  }
9667
- function Eg(e) {
9668
- return e.includes("\n") ? `'''\n${e}\n'''` : `'${xg(e)}'`;
9697
+ function Ag(e) {
9698
+ return e.includes("\n") ? `'''\n${e}\n'''` : `'${Tg(e)}'`;
9669
9699
  }
9670
9700
  //#endregion
9671
9701
  //#region src/core/global_modules/tableGroup/bind.ts
9672
- var Dg = class {
9702
+ var jg = class {
9673
9703
  constructor(e, t) {
9674
9704
  this.compiler = e, this.declarationNode = t;
9675
9705
  }
@@ -9693,7 +9723,7 @@ var Dg = class {
9693
9723
  bindSubElements(e) {
9694
9724
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
9695
9725
  }
9696
- }, Og = class {
9726
+ }, Mg = class {
9697
9727
  constructor(e, t, n) {
9698
9728
  this.compiler = e, this.symbol = t, this.declarationNode = t.declaration, this.filepath = n, this.tableGroup = { tables: [] };
9699
9729
  }
@@ -9750,14 +9780,14 @@ var Dg = class {
9750
9780
  token: F(n)
9751
9781
  }, [];
9752
9782
  }
9753
- }, kg = {
9783
+ }, Ng = {
9754
9784
  getDuplicateError(e, t, n) {
9755
9785
  return new T(w.DUPLICATE_NAME, `TableGroup '${e}' already exists in schema '${t}'`, n);
9756
9786
  },
9757
9787
  getFieldDuplicateError(e, t) {
9758
9788
  return new T(w.DUPLICATE_NAME, `Duplicate TableGroupField '${e}'`, t);
9759
9789
  }
9760
- }, Ag = {
9790
+ }, Pg = {
9761
9791
  nodeSymbol(i, a) {
9762
9792
  let o = i.nodeFullname(a).getFiltered(t), s = o?.at(-1);
9763
9793
  return A(a, r.TableGroup) ? new n(i.symbolFactory.create(wp, {
@@ -9765,7 +9795,7 @@ var Dg = class {
9765
9795
  name: s
9766
9796
  }, a.filepath)) : j(a, r.TableGroup) ? new n(i.symbolFactory.create(Tp, {
9767
9797
  declaration: a,
9768
- name: o?.map(vg).join(".")
9798
+ name: o?.map(Sg).join(".")
9769
9799
  }, a.filepath)) : n.create(e);
9770
9800
  },
9771
9801
  symbolMembers(r, i) {
@@ -9783,7 +9813,7 @@ var Dg = class {
9783
9813
  let t = `${e.kind}:${e.name}`;
9784
9814
  if (e.name !== void 0) {
9785
9815
  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);
9816
+ r ? (s.push(Ng.getFieldDuplicateError(e.name, r)), s.push(Ng.getFieldDuplicateError(e.name, n))) : c.set(t, n);
9787
9817
  }
9788
9818
  }
9789
9819
  return new n(o, s);
@@ -9793,19 +9823,19 @@ var Dg = class {
9793
9823
  nodeReferee(i, a) {
9794
9824
  if (!O(a) || !Df(a, r.TableGroup) || a.parent && kf(a)) return n.create(e);
9795
9825
  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);
9826
+ return s === t ? n.create(void 0) : Fg(i, s, a);
9797
9827
  },
9798
9828
  bindNode(i, a) {
9799
9829
  if (!A(a, r.TableGroup)) return n.create(e);
9800
- let o = new Dg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
9830
+ let o = new jg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
9801
9831
  return s && o.push(...i.symbolMembers(s).getErrors()), n.create(void 0, o);
9802
9832
  },
9803
9833
  interpretSymbol(t, i, a) {
9804
9834
  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);
9835
+ 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
9836
  }
9807
9837
  };
9808
- function jg(e, r, i) {
9838
+ function Fg(e, r, i) {
9809
9839
  let a = Kf(i) ?? "";
9810
9840
  if (!k(i.parentNode)) {
9811
9841
  let o = e.symbolMembers(r).getFiltered(t);
@@ -9832,7 +9862,7 @@ function jg(e, r, i) {
9832
9862
  }
9833
9863
  //#endregion
9834
9864
  //#region src/core/global_modules/tablePartial/bind.ts
9835
- var Mg = class {
9865
+ var Ig = class {
9836
9866
  constructor(e, t) {
9837
9867
  this.compiler = e, this.declarationNode = t;
9838
9868
  }
@@ -9878,7 +9908,7 @@ var Mg = class {
9878
9908
  bindSubElements(e) {
9879
9909
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
9880
9910
  }
9881
- }, Ng = class {
9911
+ }, Lg = class {
9882
9912
  constructor(e, t, n) {
9883
9913
  this.compiler = e, this.declarationNode = t.declaration, this.symbol = t, this.filepath = n, this.tablePartial = {
9884
9914
  name: void 0,
@@ -9994,9 +10024,9 @@ var Mg = class {
9994
10024
  let i = r.getValue();
9995
10025
  return Array.isArray(i) ? this.tablePartial.checks?.push(...i) : i && this.tablePartial.checks?.push(i), r.getErrors();
9996
10026
  }
9997
- }, Pg = { getDuplicateError(e, t, n) {
10027
+ }, Rg = { getDuplicateError(e, t, n) {
9998
10028
  return new T(w.DUPLICATE_NAME, `TablePartial '${e}' already exists in schema '${t}'`, n);
9999
- } }, Fg = {
10029
+ } }, zg = {
10000
10030
  nodeSymbol(i, a) {
10001
10031
  let o = i.nodeFullname(a).getFiltered(t)?.at(-1);
10002
10032
  return A(a, r.TablePartial) ? new n(i.symbolFactory.create(Dp, {
@@ -10022,7 +10052,7 @@ var Mg = class {
10022
10052
  let t = e.name;
10023
10053
  if (t !== void 0) {
10024
10054
  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);
10055
+ r ? (s.push(mg.getColumnDuplicateError(t, r)), s.push(mg.getColumnDuplicateError(t, n))) : c.set(t, n);
10026
10056
  }
10027
10057
  }
10028
10058
  return new n(o, s);
@@ -10032,18 +10062,18 @@ var Mg = class {
10032
10062
  nodeReferee(a, o) {
10033
10063
  if (!O(o) && !k(o) || !Df(o, r.TablePartial)) return n.create(e);
10034
10064
  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);
10065
+ 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
10066
  },
10037
10067
  bindNode(i, a) {
10038
10068
  if (!A(a, r.TablePartial)) return n.create(e);
10039
- let o = new Mg(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
10069
+ let o = new Ig(i, a).bind(), s = i.nodeSymbol(a).getFiltered(t);
10040
10070
  return s && o.push(...i.symbolMembers(s).getErrors()), n.create(void 0, o);
10041
10071
  },
10042
10072
  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);
10073
+ return r instanceof Dp ? r.declaration instanceof z ? new Lg(t, r, i).interpret() : n.create(void 0) : n.create(e);
10044
10074
  }
10045
10075
  };
10046
- function Ig(e, t, r) {
10076
+ function Bg(e, t, r) {
10047
10077
  if (!O(r)) return new n(void 0);
10048
10078
  let i = Kf(r) ?? "";
10049
10079
  if (!k(r.parentNode)) return n.create(e.lookupMembers(t, I.Enum, i));
@@ -10061,7 +10091,7 @@ function Ig(e, t, r) {
10061
10091
  }
10062
10092
  return new n(void 0);
10063
10093
  }
10064
- function Lg(e, i, a) {
10094
+ function Vg(e, i, a) {
10065
10095
  if (!O(a)) return new n(void 0);
10066
10096
  let o = Kf(a) ?? "";
10067
10097
  if (!k(a.parentNode)) {
@@ -10099,7 +10129,7 @@ function Lg(e, i, a) {
10099
10129
  }
10100
10130
  return new n(void 0);
10101
10131
  }
10102
- function Rg(e, t, r) {
10132
+ function Hg(e, t, r) {
10103
10133
  if (!O(r)) return new n(void 0);
10104
10134
  let i = Kf(r) ?? "";
10105
10135
  if (!k(r.parentNode)) return xo.includes(i.toLowerCase()) ? new n(void 0) : n.create(e.lookupMembers(t, I.Enum, i));
@@ -10128,25 +10158,25 @@ function Rg(e, t, r) {
10128
10158
  }
10129
10159
  //#endregion
10130
10160
  //#region src/core/global_modules/schema/index.ts
10131
- var zg = { symbolMembers(r, i) {
10161
+ var Ug = { symbolMembers(r, i) {
10132
10162
  if (!i.isKind(I.Schema) || !(i instanceof yp)) return n.create(e);
10133
10163
  let a = i.qualifiedName, o = r.usableMembers(i).getFiltered(t);
10134
10164
  if (!o) return n.create([]);
10135
10165
  let s = [...o.nonSchemaMembers], c = new Map(o.schemaMembers.map((e) => [e.name, e])), l = [];
10136
10166
  for (let e of o.reuses.selective) {
10137
- let n = Vg(r, i, e, c);
10167
+ let n = Gg(r, i, e, c);
10138
10168
  l.push(...n.getErrors());
10139
10169
  let a = n.getFiltered(t);
10140
- a && s.push(a), s.push(...Hg(r, i, e));
10170
+ a && s.push(a), s.push(...Kg(r, i, e));
10141
10171
  }
10142
- for (let { importPath: e, node: t } of o.reuses.wildcard) s.push(...Wg(r, i, e, t, c));
10172
+ for (let { importPath: e, node: t } of o.reuses.wildcard) s.push(...Jg(r, i, e, t, c));
10143
10173
  for (let e of o.uses.selective) {
10144
- let n = Vg(r, i, e, c);
10174
+ let n = Gg(r, i, e, c);
10145
10175
  l.push(...n.getErrors());
10146
10176
  let a = n.getFiltered(t);
10147
- a && s.push(a), s.push(...Hg(r, i, e));
10177
+ a && s.push(a), s.push(...Kg(r, i, e));
10148
10178
  }
10149
- for (let { importPath: e, node: t } of o.uses.wildcard) s.push(...Wg(r, i, e, t, c));
10179
+ for (let { importPath: e, node: t } of o.uses.wildcard) s.push(...Jg(r, i, e, t, c));
10150
10180
  s.push(...c.values());
10151
10181
  let u = [...s];
10152
10182
  {
@@ -10158,7 +10188,7 @@ var zg = { symbolMembers(r, i) {
10158
10188
  i && e.push(...i.filter((e) => e.isKind(I.TableGroup)));
10159
10189
  }
10160
10190
  }
10161
- for (let t of e) u.push(...Kg(r, i, t));
10191
+ for (let t of e) u.push(...Xg(r, i, t));
10162
10192
  }
10163
10193
  let d = /* @__PURE__ */ new Set(), f = u.filter((e) => {
10164
10194
  if (e instanceof Lp && e.isKind(I.Schema)) return !1;
@@ -10170,23 +10200,23 @@ var zg = { symbolMembers(r, i) {
10170
10200
  if (p.get(t)) {
10171
10201
  if (e.isKind(I.Schema)) continue;
10172
10202
  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));
10203
+ t && e.name !== void 0 && l.push(Wg(e.kind, e.name, a.join("."), t));
10174
10204
  } else p.set(t, e);
10175
10205
  }
10176
10206
  return new n(f, l);
10177
10207
  } };
10178
- function Bg(e, t, n, r) {
10208
+ function Wg(e, t, n, r) {
10179
10209
  switch (e) {
10180
- case I.Table: return ug.getDuplicateError(t, n, r);
10210
+ case I.Table: return mg.getDuplicateError(t, n, r);
10181
10211
  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);
10212
+ case I.TablePartial: return Rg.getDuplicateError(t, n, r);
10213
+ case I.TableGroup: return Ng.getDuplicateError(t, n, r);
10184
10214
  case I.DiagramView: return Gm.getDuplicateError(t, n, r);
10185
10215
  default: return new T(w.DUPLICATE_NAME, `Duplicate ${e} '${t}' in schema '${n}'`, r);
10186
10216
  }
10187
10217
  }
10188
- function Vg(e, r, i, a) {
10189
- let o = eg(e, r, i);
10218
+ function Gg(e, r, i, a) {
10219
+ let o = ig(e, r, i);
10190
10220
  if (o.kind === "none") return n.create(void 0);
10191
10221
  if (o.kind === "direct") {
10192
10222
  let r = e.nodeSymbol(i);
@@ -10197,14 +10227,14 @@ function Vg(e, r, i, a) {
10197
10227
  parent: r
10198
10228
  }, r.filepath)), n.create(void 0);
10199
10229
  }
10200
- function Hg(e, n, r, i = /* @__PURE__ */ new Set()) {
10230
+ function Kg(e, n, r, i = /* @__PURE__ */ new Set()) {
10201
10231
  if (r.getSymbolKind() !== I.Schema || !r.name) return [];
10202
10232
  let a = e.nodeReferee(r.name).getFiltered(t);
10203
10233
  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);
10234
+ let o = eg.visibleName(e, r), s = n.qualifiedName;
10235
+ return !o || o.length !== s.length || !o.every((e, t) => e === s[t]) ? [] : qg(e, n, r, a, i);
10206
10236
  }
10207
- function Ug(e, n, r, i, a) {
10237
+ function qg(e, n, r, i, a) {
10208
10238
  let o = i.intern();
10209
10239
  if (a.has(o)) return [];
10210
10240
  a.add(o);
@@ -10217,8 +10247,8 @@ function Ug(e, n, r, i, a) {
10217
10247
  useSpecifierDeclaration: r,
10218
10248
  name: t.name
10219
10249
  }, 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") {
10250
+ for (let t of [...c]) t.isKind(I.TableGroup) && c.push(...Xg(e, n, t));
10251
+ for (let i of s.reuses.selective) if (c.push(...Kg(e, n, i, a)), ig(e, n, i).kind === "direct") {
10222
10252
  let a = e.nodeSymbol(i).getFiltered(t);
10223
10253
  a && a.canBeImported && c.push(e.symbolFactory.create(Lp, {
10224
10254
  kind: a.kind,
@@ -10229,15 +10259,15 @@ function Ug(e, n, r, i, a) {
10229
10259
  }, n.filepath));
10230
10260
  }
10231
10261
  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));
10262
+ let i = Yg(e, t, n.qualifiedName);
10263
+ i && c.push(...qg(e, n, r, i, a));
10234
10264
  }
10235
10265
  return c;
10236
10266
  }
10237
- function Wg(e, n, r, i, a, o = /* @__PURE__ */ new Set()) {
10267
+ function Jg(e, n, r, i, a, o = /* @__PURE__ */ new Set()) {
10238
10268
  if (o.has(r)) return [];
10239
10269
  o.add(r);
10240
- let s = Gg(e, r, n.qualifiedName);
10270
+ let s = Yg(e, r, n.qualifiedName);
10241
10271
  if (!s) return [];
10242
10272
  let c = e.usableMembers(s).getFiltered(t);
10243
10273
  if (!c) return [];
@@ -10251,13 +10281,13 @@ function Wg(e, n, r, i, a, o = /* @__PURE__ */ new Set()) {
10251
10281
  for (let t of c.schemaMembers) a.has(t.name) || a.set(t.name, e.symbolFactory.create(yp, { name: t.name }, n.filepath));
10252
10282
  let { reuses: { selective: u, wildcard: d } } = c;
10253
10283
  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));
10284
+ let i = Gg(e, n, r, a).getFiltered(t);
10285
+ i && l.push(i), l.push(...Kg(e, n, r));
10256
10286
  }
10257
- for (let { importPath: t } of d) l.push(...Wg(e, n, t, i, a, o));
10287
+ for (let { importPath: t } of d) l.push(...Jg(e, n, t, i, a, o));
10258
10288
  return l;
10259
10289
  }
10260
- function Gg(e, n, r) {
10290
+ function Yg(e, n, r) {
10261
10291
  if (r.length === 0) return;
10262
10292
  let i = e.usableMembers(n).getFiltered(t);
10263
10293
  if (!i) return;
@@ -10270,7 +10300,7 @@ function Gg(e, n, r) {
10270
10300
  }
10271
10301
  return o;
10272
10302
  }
10273
- function Kg(e, n, r) {
10303
+ function Xg(e, n, r) {
10274
10304
  if (!r.isKind(I.TableGroup) || !(r instanceof Lp)) return [];
10275
10305
  let i = r.originalSymbol, a = e.symbolMembers(i).getFiltered(t);
10276
10306
  if (!a) return [];
@@ -10283,7 +10313,7 @@ function Kg(e, n, r) {
10283
10313
  if (!i || i.length === 0) continue;
10284
10314
  let a = i.length <= 1 ? [y] : i.slice(0, -1);
10285
10315
  if (a.length !== o.length || !o.every((e, t) => e === a[t])) continue;
10286
- let c = t.declaration.filepath, l = qg(e, c, i);
10316
+ let c = t.declaration.filepath, l = Zg(e, c, i);
10287
10317
  l && s.push(e.symbolFactory.create(Lp, {
10288
10318
  kind: I.Table,
10289
10319
  declaration: l.declaration,
@@ -10294,7 +10324,7 @@ function Kg(e, n, r) {
10294
10324
  }
10295
10325
  return s;
10296
10326
  }
10297
- function qg(e, n, r) {
10327
+ function Zg(e, n, r) {
10298
10328
  if (r.length === 1) {
10299
10329
  let i = e.usableMembers(n).getFiltered(t);
10300
10330
  return i ? i.nonSchemaMembers.find((e) => e.isKind(I.Table) && e.name === r[0]) : void 0;
@@ -10308,7 +10338,7 @@ function qg(e, n, r) {
10308
10338
  }
10309
10339
  //#endregion
10310
10340
  //#region src/core/global_modules/note/bind.ts
10311
- var Jg = class {
10341
+ var Qg = class {
10312
10342
  constructor(e, t) {
10313
10343
  this.compiler = e, this.declarationNode = t;
10314
10344
  }
@@ -10323,7 +10353,7 @@ var Jg = class {
10323
10353
  bindSubElements(e) {
10324
10354
  return e.flatMap((e) => e.type ? this.compiler.bindNode(e).getErrors() : []);
10325
10355
  }
10326
- }, Yg = class {
10356
+ }, $g = class {
10327
10357
  constructor(e, t, n) {
10328
10358
  this.compiler = e, this.symbol = t, this.declarationNode = t.declaration, this.filepath = n, this.note = {
10329
10359
  name: void 0,
@@ -10356,17 +10386,17 @@ var Jg = class {
10356
10386
  let t = N(e.callee) ?? "";
10357
10387
  return this.note.content = dp(t), [];
10358
10388
  }
10359
- }, Xg = [
10360
- dg,
10389
+ }, e_ = [
10390
+ hg,
10361
10391
  eh,
10362
- Wh,
10392
+ Jh,
10363
10393
  rh,
10364
10394
  ym,
10365
10395
  Fm,
10366
10396
  Vm,
10367
- Lh,
10368
- Ag,
10369
- Fg,
10397
+ Vh,
10398
+ Pg,
10399
+ zg,
10370
10400
  {
10371
10401
  nodeSymbol(i, a) {
10372
10402
  return !A(a, r.Note) || !(a.parentNode instanceof R) ? n.create(e) : new n(i.symbolFactory.create(Ep, {
@@ -10378,19 +10408,19 @@ var Jg = class {
10378
10408
  return r.isKind(I.StickyNote) ? new n([]) : n.create(e);
10379
10409
  },
10380
10410
  bindNode(t, i) {
10381
- return A(i, r.Note) ? n.create(void 0, new Jg(t, i).bind()) : n.create(e);
10411
+ return A(i, r.Note) ? n.create(void 0, new Qg(t, i).bind()) : n.create(e);
10382
10412
  },
10383
10413
  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);
10414
+ return r instanceof Ep ? r.declaration instanceof z ? new $g(t, r, i).interpret() : n.create(void 0) : n.create(e);
10385
10415
  }
10386
10416
  },
10387
- Zh,
10388
- zg,
10417
+ tg,
10418
+ Ug,
10389
10419
  Km,
10390
- Ph
10420
+ Rh
10391
10421
  ];
10392
- function Zg(t, ...r) {
10393
- for (let i of Xg) {
10422
+ function t_(t, ...r) {
10423
+ for (let i of e_) {
10394
10424
  let a = i[t];
10395
10425
  if (a) {
10396
10426
  let t = a(...r);
@@ -10399,37 +10429,37 @@ function Zg(t, ...r) {
10399
10429
  }
10400
10430
  return n.create(e);
10401
10431
  }
10402
- function Qg(r) {
10403
- let i = Zg("nodeSymbol", this, r);
10432
+ function n_(r) {
10433
+ let i = t_("nodeSymbol", this, r);
10404
10434
  return i.hasValue(e) ? n.create(t) : i;
10405
10435
  }
10406
- function $g(r) {
10407
- let i = Zg("symbolMembers", this, r);
10436
+ function r_(r) {
10437
+ let i = t_("symbolMembers", this, r);
10408
10438
  return i.hasValue(e) ? n.create(t) : i;
10409
10439
  }
10410
- function e_(r) {
10411
- let i = Zg("nodeReferee", this, r);
10440
+ function i_(r) {
10441
+ let i = t_("nodeReferee", this, r);
10412
10442
  return i.hasValue(e) ? n.create(t) : i;
10413
10443
  }
10414
- function t_(r) {
10415
- let i = Zg("bindNode", this, r);
10444
+ function a_(r) {
10445
+ let i = t_("bindNode", this, r);
10416
10446
  return i.hasValue(e) ? n.create(t) : i;
10417
10447
  }
10418
- function n_(r) {
10419
- let i = Zg("nodeMetadata", this, r);
10448
+ function o_(r) {
10449
+ let i = t_("nodeMetadata", this, r);
10420
10450
  return i.hasValue(e) ? n.create(t) : i;
10421
10451
  }
10422
- function r_(r, i) {
10423
- let a = Zg("interpretSymbol", this, r, i);
10452
+ function s_(r, i) {
10453
+ let a = t_("interpretSymbol", this, r, i);
10424
10454
  return a.hasValue(e) ? n.create(t) : a;
10425
10455
  }
10426
- function i_(r, i) {
10427
- let a = Zg("interpretMetadata", this, r, i);
10456
+ function c_(r, i) {
10457
+ let a = t_("interpretMetadata", this, r, i);
10428
10458
  return a.hasValue(e) ? n.create(t) : a;
10429
10459
  }
10430
10460
  //#endregion
10431
10461
  //#region src/core/local_modules/checks/validate.ts
10432
- var a_ = class {
10462
+ var l_ = class {
10433
10463
  constructor(e, t) {
10434
10464
  this.compiler = e, this.declarationNode = t;
10435
10465
  }
@@ -10483,10 +10513,10 @@ var a_ = class {
10483
10513
  validateSubElements(e) {
10484
10514
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
10485
10515
  }
10486
- }, o_ = {
10516
+ }, u_ = {
10487
10517
  validateNode(t, i) {
10488
10518
  if (!A(i, r.Checks)) return n.create(e);
10489
- let a = new a_(t, i);
10519
+ let a = new l_(t, i);
10490
10520
  return n.create(void 0, a.validate());
10491
10521
  },
10492
10522
  nodeFullname(t, i) {
@@ -10498,7 +10528,7 @@ var a_ = class {
10498
10528
  nodeSettings(t, i) {
10499
10529
  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
10530
  }
10501
- }, s_ = class {
10531
+ }, d_ = class {
10502
10532
  constructor(e, t) {
10503
10533
  this.declarationNode = t, this.compiler = e;
10504
10534
  }
@@ -10532,25 +10562,25 @@ var a_ = class {
10532
10562
  };
10533
10563
  //#endregion
10534
10564
  //#region src/core/local_modules/custom/index.ts
10535
- function c_(e) {
10565
+ function f_(e) {
10536
10566
  return e instanceof z && !!e.type?.value;
10537
10567
  }
10538
- var l_ = {
10568
+ var p_ = {
10539
10569
  validateNode(t, r) {
10540
- if (!c_(r)) return n.create(e);
10541
- let i = new s_(t, r);
10570
+ if (!f_(r)) return n.create(e);
10571
+ let i = new d_(t, r);
10542
10572
  return n.create(void 0, i.validate());
10543
10573
  },
10544
10574
  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);
10575
+ 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
10576
  },
10547
10577
  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);
10578
+ 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
10579
  },
10550
10580
  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);
10581
+ 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
10582
  }
10553
- }, u_ = class {
10583
+ }, m_ = class {
10554
10584
  constructor(e, t) {
10555
10585
  this.compiler = e, this.declarationNode = t;
10556
10586
  }
@@ -10565,11 +10595,11 @@ var l_ = {
10565
10595
  }
10566
10596
  validateSettings() {
10567
10597
  let e = [];
10568
- this.declarationNode.attributeList && e.push(...d_(this.declarationNode.attributeList).getErrors());
10598
+ this.declarationNode.attributeList && e.push(...h_(this.declarationNode.attributeList).getErrors());
10569
10599
  let t = this.declarationNode.body;
10570
10600
  if (t instanceof U) {
10571
10601
  let n = t.args.find((e) => e instanceof G);
10572
- n && e.push(...d_(n).getErrors());
10602
+ n && e.push(...h_(n).getErrors());
10573
10603
  }
10574
10604
  return e;
10575
10605
  }
@@ -10626,7 +10656,7 @@ var l_ = {
10626
10656
  });
10627
10657
  }
10628
10658
  };
10629
- function d_(e) {
10659
+ function h_(e) {
10630
10660
  let t = E(e), r = [...t.getErrors()], a = t.getValue();
10631
10661
  for (let [e, t] of Object.entries(a)) for (let n of t) switch (e) {
10632
10662
  case i.Color:
@@ -10643,9 +10673,9 @@ function d_(e) {
10643
10673
  }
10644
10674
  //#endregion
10645
10675
  //#region src/core/local_modules/dep/index.ts
10646
- var f_ = {
10676
+ var g_ = {
10647
10677
  validateNode(t, i) {
10648
- return A(i, r.Dep) ? n.create(void 0, new u_(t, i).validate()) : n.create(e);
10678
+ return A(i, r.Dep) ? n.create(void 0, new m_(t, i).validate()) : n.create(e);
10649
10679
  },
10650
10680
  nodeFullname(t, i) {
10651
10681
  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 +10684,14 @@ var f_ = {
10654
10684
  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
10685
  },
10656
10686
  nodeSettings(t, i) {
10657
- if (A(i, r.Dep)) return i.attributeList ? d_(i.attributeList) : new n({});
10687
+ if (A(i, r.Dep)) return i.attributeList ? h_(i.attributeList) : new n({});
10658
10688
  if (j(i, r.Dep)) {
10659
10689
  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({});
10690
+ return g(e) instanceof G ? t = g(e) : e[0] instanceof G && (t = e[0]), t ? h_(t) : new n({});
10661
10691
  }
10662
10692
  return n.create(e);
10663
10693
  }
10664
- }, p_ = class {
10694
+ }, __ = class {
10665
10695
  constructor(e, t) {
10666
10696
  this.compiler = e, this.declarationNode = t;
10667
10697
  }
@@ -10754,10 +10784,10 @@ var f_ = {
10754
10784
  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
10785
  return t;
10756
10786
  }
10757
- }, m_ = {
10787
+ }, v_ = {
10758
10788
  validateNode(t, i) {
10759
10789
  if (!A(i, r.DiagramView)) return n.create(e);
10760
- let { errors: a, warnings: o } = new p_(t, i).validate();
10790
+ let { errors: a, warnings: o } = new __(t, i).validate();
10761
10791
  return n.create(void 0, a, o);
10762
10792
  },
10763
10793
  nodeFullname(t, i) {
@@ -10774,7 +10804,7 @@ var f_ = {
10774
10804
  nodeAlias(t, i) {
10775
10805
  return A(i, r.DiagramView) ? new n(void 0) : n.create(e);
10776
10806
  }
10777
- }, h_ = class {
10807
+ }, y_ = class {
10778
10808
  constructor(e, t) {
10779
10809
  this.compiler = e, this.declarationNode = t;
10780
10810
  }
@@ -10833,9 +10863,9 @@ var f_ = {
10833
10863
  validateSubElements(e) {
10834
10864
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
10835
10865
  }
10836
- }, g_ = {
10866
+ }, b_ = {
10837
10867
  validateNode(t, i) {
10838
- return A(i, r.Enum) ? n.create(void 0, new h_(t, i).validate()) : n.create(e);
10868
+ return A(i, r.Enum) ? n.create(void 0, new y_(t, i).validate()) : n.create(e);
10839
10869
  },
10840
10870
  nodeFullname(t, i) {
10841
10871
  if (A(i, r.Enum)) {
@@ -10871,7 +10901,7 @@ var f_ = {
10871
10901
  }
10872
10902
  return n.create(e);
10873
10903
  }
10874
- }, __ = class {
10904
+ }, x_ = class {
10875
10905
  constructor(e, t) {
10876
10906
  this.compiler = e, this.declarationNode = t;
10877
10907
  }
@@ -10940,9 +10970,9 @@ var f_ = {
10940
10970
  validateSubElements(e) {
10941
10971
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
10942
10972
  }
10943
- }, v_ = {
10973
+ }, S_ = {
10944
10974
  validateNode(t, i) {
10945
- return A(i, r.Indexes) ? n.create(void 0, new __(t, i).validate()) : n.create(e);
10975
+ return A(i, r.Indexes) ? n.create(void 0, new x_(t, i).validate()) : n.create(e);
10946
10976
  },
10947
10977
  nodeFullname(t, i) {
10948
10978
  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 +11010,7 @@ var f_ = {
10980
11010
  }
10981
11011
  return n.create(e);
10982
11012
  }
10983
- }, y_ = class {
11013
+ }, C_ = class {
10984
11014
  constructor(e, t) {
10985
11015
  this.compiler = e, this.declarationNode = t;
10986
11016
  }
@@ -11035,9 +11065,9 @@ var f_ = {
11035
11065
  validateSubElements(e) {
11036
11066
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
11037
11067
  }
11038
- }, b_ = {
11068
+ }, w_ = {
11039
11069
  validateNode(t, i) {
11040
- return A(i, r.Note) ? n.create(void 0, new y_(t, i).validate()) : n.create(e);
11070
+ return A(i, r.Note) ? n.create(void 0, new C_(t, i).validate()) : n.create(e);
11041
11071
  },
11042
11072
  nodeFullname(t, i) {
11043
11073
  if (!A(i, r.Note)) return n.create(e);
@@ -11053,7 +11083,7 @@ var f_ = {
11053
11083
  nodeSettings(t, i) {
11054
11084
  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
11085
  }
11056
- }, x_ = class {
11086
+ }, T_ = class {
11057
11087
  constructor(e, t) {
11058
11088
  this.ast = t, this.compiler = e;
11059
11089
  }
@@ -11065,9 +11095,9 @@ var f_ = {
11065
11095
  }
11066
11096
  return new n(this.ast, e, t);
11067
11097
  }
11068
- }, S_ = {
11098
+ }, E_ = {
11069
11099
  validateNode(t, r) {
11070
- return Ef(r) ? n.create(void 0, new x_(t, r).validate().getErrors()) : n.create(e);
11100
+ return Ef(r) ? n.create(void 0, new T_(t, r).validate().getErrors()) : n.create(e);
11071
11101
  },
11072
11102
  nodeFullname(t, r) {
11073
11103
  return Ef(r) ? new n(void 0) : n.create(e);
@@ -11078,7 +11108,7 @@ var f_ = {
11078
11108
  nodeSettings(t, r) {
11079
11109
  return Ef(r) ? new n({}) : n.create(e);
11080
11110
  }
11081
- }, C_ = class {
11111
+ }, D_ = class {
11082
11112
  constructor(e, t) {
11083
11113
  this.compiler = e, this.declarationNode = t;
11084
11114
  }
@@ -11112,9 +11142,9 @@ var f_ = {
11112
11142
  validateSubElements(e) {
11113
11143
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
11114
11144
  }
11115
- }, w_ = {
11145
+ }, O_ = {
11116
11146
  validateNode(t, i) {
11117
- return A(i, r.Project) ? n.create(void 0, new C_(t, i).validate()) : n.create(e);
11147
+ return A(i, r.Project) ? n.create(void 0, new D_(t, i).validate()) : n.create(e);
11118
11148
  },
11119
11149
  nodeFullname(t, i) {
11120
11150
  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 +11155,7 @@ var f_ = {
11125
11155
  nodeSettings(t, i) {
11126
11156
  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
11157
  }
11128
- }, T_ = class {
11158
+ }, k_ = class {
11129
11159
  constructor(e, t) {
11130
11160
  this.declarationNode = t, this.compiler = e;
11131
11161
  }
@@ -11190,9 +11220,9 @@ var f_ = {
11190
11220
  validateSubElements(e) {
11191
11221
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
11192
11222
  }
11193
- }, E_ = {
11223
+ }, A_ = {
11194
11224
  validateNode(t, i) {
11195
- return A(i, r.Records) ? n.create(void 0, new T_(t, i).validate()) : n.create(e);
11225
+ return A(i, r.Records) ? n.create(void 0, new k_(t, i).validate()) : n.create(e);
11196
11226
  },
11197
11227
  nodeFullname(i, a) {
11198
11228
  if (A(a, r.Records)) {
@@ -11216,7 +11246,7 @@ var f_ = {
11216
11246
  nodeSettings(t, i) {
11217
11247
  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
11248
  }
11219
- }, D_ = class {
11249
+ }, j_ = class {
11220
11250
  constructor(e, t) {
11221
11251
  this.compiler = e, this.declarationNode = t;
11222
11252
  }
@@ -11271,13 +11301,13 @@ var f_ = {
11271
11301
  }), t;
11272
11302
  }
11273
11303
  validateFieldSettings(e) {
11274
- return k_(e).getErrors();
11304
+ return N_(e).getErrors();
11275
11305
  }
11276
11306
  validateSubElements(e) {
11277
11307
  return e.flatMap((e) => e.type ? this.compiler.validateNode(e).getErrors() : []);
11278
11308
  }
11279
11309
  };
11280
- function O_(e) {
11310
+ function M_(e) {
11281
11311
  if (!(O(e) && e.expression.variable.kind !== v.QUOTED_STRING) && !(e instanceof Wp)) return !1;
11282
11312
  let t;
11283
11313
  if (t = e instanceof Wp ? Lf(e) || "" : e.expression.variable.value, t) switch (t.toLowerCase()) {
@@ -11290,13 +11320,13 @@ function O_(e) {
11290
11320
  }
11291
11321
  return !1;
11292
11322
  }
11293
- function k_(e) {
11323
+ function N_(e) {
11294
11324
  let t = E(e), r = t.getErrors(), a = t.getValue(), o = {};
11295
11325
  for (let [e, t] of Object.entries(a)) switch (e) {
11296
11326
  case i.Delete:
11297
11327
  case i.Update:
11298
11328
  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));
11329
+ 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
11330
  }), o[e] = t;
11301
11331
  break;
11302
11332
  case i.Color:
@@ -11315,9 +11345,9 @@ function k_(e) {
11315
11345
  }
11316
11346
  //#endregion
11317
11347
  //#region src/core/local_modules/ref/index.ts
11318
- var A_ = {
11348
+ var P_ = {
11319
11349
  validateNode(t, i) {
11320
- return A(i, r.Ref) ? n.create(void 0, new D_(t, i).validate()) : n.create(e);
11350
+ return A(i, r.Ref) ? n.create(void 0, new j_(t, i).validate()) : n.create(e);
11321
11351
  },
11322
11352
  nodeFullname(t, i) {
11323
11353
  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 +11359,11 @@ var A_ = {
11329
11359
  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
11360
  if (j(i, r.Ref)) {
11331
11361
  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({});
11362
+ return g(e) instanceof G ? t = g(e) : e[0] instanceof G && (t = e[0]), t ? N_(t) : new n({});
11333
11363
  }
11334
11364
  return n.create(e);
11335
11365
  }
11336
- }, j_ = class {
11366
+ }, F_ = class {
11337
11367
  constructor(e, t) {
11338
11368
  this.declarationNode = t, this.compiler = e;
11339
11369
  }
@@ -11477,7 +11507,7 @@ var A_ = {
11477
11507
  return n.length > 1 && t.push(...n.map((e) => new T(w.NOTE_REDEFINED, "Duplicate notes are defined", e))), t;
11478
11508
  }
11479
11509
  };
11480
- function M_(e) {
11510
+ function I_(e) {
11481
11511
  let t = E(e), r = t.getErrors(), a = t.getValue();
11482
11512
  return Sa(a, (e, t) => {
11483
11513
  switch (t) {
@@ -11495,7 +11525,7 @@ function M_(e) {
11495
11525
  }
11496
11526
  }), new n(a, r);
11497
11527
  }
11498
- function N_(e) {
11528
+ function L_(e) {
11499
11529
  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
11530
  if (e.length === 0) return new n({});
11501
11531
  let t;
@@ -11576,9 +11606,9 @@ function N_(e) {
11576
11606
  }
11577
11607
  //#endregion
11578
11608
  //#region src/core/local_modules/table/index.ts
11579
- var P_ = {
11609
+ var R_ = {
11580
11610
  validateNode(t, i) {
11581
- return A(i, r.Table) ? n.create(void 0, new j_(t, i).validate()) : n.create(e);
11611
+ return A(i, r.Table) ? n.create(void 0, new F_(t, i).validate()) : n.create(e);
11582
11612
  },
11583
11613
  nodeFullname(t, i) {
11584
11614
  if (A(i, r.Table)) {
@@ -11601,9 +11631,9 @@ var P_ = {
11601
11631
  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
11632
  },
11603
11633
  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);
11634
+ 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
11635
  }
11606
- }, F_ = class {
11636
+ }, z_ = class {
11607
11637
  constructor(e, t) {
11608
11638
  this.declarationNode = t, this.compiler = e;
11609
11639
  }
@@ -11661,7 +11691,7 @@ var P_ = {
11661
11691
  return n.length > 1 && t.push(...n.map((e) => new T(w.NOTE_REDEFINED, "Duplicate notes are defined", e))), t;
11662
11692
  }
11663
11693
  };
11664
- function I_(e) {
11694
+ function B_(e) {
11665
11695
  let t = E(e), r = t.getErrors(), i = t.getValue(), a = {};
11666
11696
  for (let [e, t] of Object.entries(i)) switch (e) {
11667
11697
  case "color":
@@ -11682,9 +11712,9 @@ function I_(e) {
11682
11712
  }
11683
11713
  //#endregion
11684
11714
  //#region src/core/local_modules/tableGroup/index.ts
11685
- var L_ = {
11715
+ var V_ = {
11686
11716
  validateNode(t, i) {
11687
- return A(i, r.TableGroup) ? n.create(void 0, new F_(t, i).validate()) : n.create(e);
11717
+ return A(i, r.TableGroup) ? n.create(void 0, new z_(t, i).validate()) : n.create(e);
11688
11718
  },
11689
11719
  nodeFullname(t, i) {
11690
11720
  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 +11728,9 @@ var L_ = {
11698
11728
  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
11729
  },
11700
11730
  nodeSettings(t, i) {
11701
- return A(i, r.TableGroup) ? I_(i.attributeList) : j(i, r.TableGroup) ? new n({}) : n.create(e);
11731
+ return A(i, r.TableGroup) ? B_(i.attributeList) : j(i, r.TableGroup) ? new n({}) : n.create(e);
11702
11732
  }
11703
- }, R_ = class {
11733
+ }, H_ = class {
11704
11734
  constructor(e, t) {
11705
11735
  this.compiler = e, this.declarationNode = t;
11706
11736
  }
@@ -11835,7 +11865,7 @@ var L_ = {
11835
11865
  return n.length > 1 && t.push(...n.map((e) => new T(w.NOTE_REDEFINED, "Duplicate notes are defined", e))), t;
11836
11866
  }
11837
11867
  };
11838
- function z_(e) {
11868
+ function U_(e) {
11839
11869
  let t = E(e), r = t.getErrors(), a = t.getValue();
11840
11870
  return Sa(a, (e, t) => {
11841
11871
  switch (t) {
@@ -11853,7 +11883,7 @@ function z_(e) {
11853
11883
  }
11854
11884
  }), new n(a, r);
11855
11885
  }
11856
- function B_(e) {
11886
+ function W_(e) {
11857
11887
  let t = g(e);
11858
11888
  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
11889
  if (e.length === 0) return new n({});
@@ -11930,9 +11960,9 @@ function B_(e) {
11930
11960
  }
11931
11961
  //#endregion
11932
11962
  //#region src/core/local_modules/tablePartial/index.ts
11933
- var V_ = {
11963
+ var G_ = {
11934
11964
  validateNode(t, i) {
11935
- return A(i, r.TablePartial) ? n.create(void 0, new R_(t, i).validate()) : n.create(e);
11965
+ return A(i, r.TablePartial) ? n.create(void 0, new H_(t, i).validate()) : n.create(e);
11936
11966
  },
11937
11967
  nodeFullname(t, i) {
11938
11968
  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 +11976,9 @@ var V_ = {
11946
11976
  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
11977
  },
11948
11978
  nodeSettings(t, i) {
11949
- return A(i, r.TablePartial) ? z_(i.attributeList) : j(i, r.TablePartial) ? B_(i.args.slice(1)) : n.create(e);
11979
+ return A(i, r.TablePartial) ? U_(i.attributeList) : j(i, r.TablePartial) ? W_(i.args.slice(1)) : n.create(e);
11950
11980
  }
11951
- }, H_ = class {
11981
+ }, K_ = class {
11952
11982
  constructor(e, t) {
11953
11983
  this.compiler = e, this.declarationNode = t;
11954
11984
  }
@@ -11972,23 +12002,23 @@ var V_ = {
11972
12002
  ...this.compiler.nodeAlias(e).getErrors()
11973
12003
  ];
11974
12004
  }
11975
- }, U_ = [
12005
+ }, q_ = [
12006
+ R_,
12007
+ b_,
12008
+ A_,
12009
+ S_,
12010
+ u_,
11976
12011
  P_,
11977
12012
  g_,
11978
- E_,
11979
- v_,
11980
- o_,
11981
- A_,
11982
- f_,
11983
- w_,
11984
- L_,
12013
+ O_,
11985
12014
  V_,
11986
- b_,
11987
- m_,
11988
- S_,
12015
+ G_,
12016
+ w_,
12017
+ v_,
12018
+ E_,
11989
12019
  {
11990
12020
  validateNode(t, r) {
11991
- return r instanceof Vp ? n.create(void 0, new H_(t, r).validate()) : n.create(e);
12021
+ return r instanceof Vp ? n.create(void 0, new K_(t, r).validate()) : n.create(e);
11992
12022
  },
11993
12023
  nodeFullname(t, r) {
11994
12024
  if (!Tf(r)) return n.create(e);
@@ -12002,10 +12032,10 @@ var V_ = {
12002
12032
  return r instanceof Vp ? n.create({}) : n.create(e);
12003
12033
  }
12004
12034
  },
12005
- l_
12035
+ p_
12006
12036
  ];
12007
- function W_(t, ...r) {
12008
- for (let n of U_) {
12037
+ function J_(t, ...r) {
12038
+ for (let n of q_) {
12009
12039
  let i = n[t];
12010
12040
  if (i) {
12011
12041
  let t = i(...r);
@@ -12014,57 +12044,57 @@ function W_(t, ...r) {
12014
12044
  }
12015
12045
  return n.create(e);
12016
12046
  }
12017
- function G_(r) {
12018
- let i = W_("validateNode", this, r);
12047
+ function Y_(r) {
12048
+ let i = J_("validateNode", this, r);
12019
12049
  return i.hasValue(e) ? n.create(t) : i;
12020
12050
  }
12021
- function K_(r) {
12022
- let i = W_("nodeSettings", this, r);
12051
+ function X_(r) {
12052
+ let i = J_("nodeSettings", this, r);
12023
12053
  return i.hasValue(e) ? n.create(t) : i;
12024
12054
  }
12025
- function q_(r) {
12026
- let i = W_("nodeFullname", this, r);
12055
+ function Z_(r) {
12056
+ let i = J_("nodeFullname", this, r);
12027
12057
  return i.hasValue(e) ? n.create(t) : i;
12028
12058
  }
12029
- function J_(r) {
12030
- let i = W_("nodeAlias", this, r);
12059
+ function Q_(r) {
12060
+ let i = J_("nodeAlias", this, r);
12031
12061
  return i.hasValue(e) ? n.create(t) : i;
12032
12062
  }
12033
- var Y_ = typeof document < "u" && document.location && document.location.hash.indexOf("pseudo=true") >= 0;
12034
- function X_(e, t) {
12063
+ var $_ = typeof document < "u" && document.location && document.location.hash.indexOf("pseudo=true") >= 0;
12064
+ function ev(e, t) {
12035
12065
  let n;
12036
12066
  return n = t.length === 0 ? e : e.replace(/\{(\d+)\}/g, (e, n) => {
12037
12067
  let r = t[n[0]], i = e;
12038
12068
  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;
12069
+ }), $_ && (n = "[" + n.replace(/[aouei]/g, "$&$&") + "]"), n;
12040
12070
  }
12041
- function Z_(e, t, ...n) {
12042
- return X_(t, n);
12071
+ function tv(e, t, ...n) {
12072
+ return ev(t, n);
12043
12073
  }
12044
12074
  //#endregion
12045
12075
  //#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_({
12076
+ var nv = !1, rv = !1, iv = !1, av = !1, ov = void 0, sv = typeof self == "object" ? self : typeof global == "object" ? global : {}, cv = void 0;
12077
+ sv.vscode !== void 0 && sv.vscode.process !== void 0 ? cv = sv.vscode.process : typeof process < "u" && (cv = process);
12078
+ var lv = typeof cv?.versions?.electron == "string" && cv?.type === "renderer";
12079
+ 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
12080
  key: "ensureLoaderPluginIsLoaded",
12051
12081
  comment: ["{Locked}"]
12052
12082
  }, "_"), 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;
12083
+ else if (typeof cv == "object") {
12084
+ 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;
12085
+ let e = cv.env.VSCODE_NLS_CONFIG;
12056
12086
  if (e) try {
12057
12087
  let t = JSON.parse(e);
12058
12088
  t.availableLanguages["*"], t.locale, t.osLocale, t._translationsConfigFile;
12059
12089
  } catch {}
12060
12090
  } 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;
12091
+ var uv = nv, dv = rv;
12092
+ av && sv.importScripts;
12093
+ var fv = ov, pv = typeof sv.postMessage == "function" && !sv.importScripts;
12064
12094
  (() => {
12065
- if (lv) {
12095
+ if (pv) {
12066
12096
  let e = [];
12067
- rv.addEventListener("message", (t) => {
12097
+ sv.addEventListener("message", (t) => {
12068
12098
  if (t.data && t.data.vscodeScheduleAsyncWork) for (let n = 0, r = e.length; n < r; n++) {
12069
12099
  let r = e[n];
12070
12100
  if (r.id === t.data.vscodeScheduleAsyncWork) {
@@ -12079,19 +12109,19 @@ var cv = nv, lv = typeof rv.postMessage == "function" && !rv.importScripts;
12079
12109
  e.push({
12080
12110
  id: r,
12081
12111
  callback: n
12082
- }), rv.postMessage({ vscodeScheduleAsyncWork: r }, "*");
12112
+ }), sv.postMessage({ vscodeScheduleAsyncWork: r }, "*");
12083
12113
  };
12084
12114
  }
12085
12115
  return (e) => setTimeout(e);
12086
12116
  })();
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");
12117
+ var mv = !!(fv && fv.indexOf("Chrome") >= 0);
12118
+ fv && fv.indexOf("Firefox"), !mv && fv && fv.indexOf("Safari"), fv && fv.indexOf("Edg/"), fv && fv.indexOf("Android");
12089
12119
  //#endregion
12090
12120
  //#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 = {
12121
+ var hv;
12122
+ if (sv.vscode !== void 0 && sv.vscode.process !== void 0) {
12123
+ let e = sv.vscode.process;
12124
+ hv = {
12095
12125
  get platform() {
12096
12126
  return e.platform;
12097
12127
  },
@@ -12105,7 +12135,7 @@ if (rv.vscode !== void 0 && rv.vscode.process !== void 0) {
12105
12135
  return e.cwd();
12106
12136
  }
12107
12137
  };
12108
- } else dv = typeof process < "u" ? {
12138
+ } else hv = typeof process < "u" ? {
12109
12139
  get platform() {
12110
12140
  return process.platform;
12111
12141
  },
@@ -12120,7 +12150,7 @@ if (rv.vscode !== void 0 && rv.vscode.process !== void 0) {
12120
12150
  }
12121
12151
  } : {
12122
12152
  get platform() {
12123
- return ov ? "win32" : sv ? "darwin" : "linux";
12153
+ return uv ? "win32" : dv ? "darwin" : "linux";
12124
12154
  },
12125
12155
  get arch() {},
12126
12156
  get env() {
@@ -12130,7 +12160,7 @@ if (rv.vscode !== void 0 && rv.vscode.process !== void 0) {
12130
12160
  return "/";
12131
12161
  }
12132
12162
  };
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 {
12163
+ 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
12164
  constructor(e, t, n) {
12135
12165
  let r;
12136
12166
  typeof t == "string" && t.indexOf("not ") === 0 ? (r = "must not be", t = t.replace(/^not /, "")) : r = "must be";
@@ -12138,31 +12168,31 @@ var fv = dv.cwd, pv = dv.env, mv = dv.platform, hv = 65, gv = 97, _v = 90, vv =
12138
12168
  i += `. Received type ${typeof n}`, super(i), this.code = "ERR_INVALID_ARG_TYPE";
12139
12169
  }
12140
12170
  };
12141
- function Tv(e, t) {
12142
- if (typeof e != "object" || !e) throw new wv(t, "Object", e);
12171
+ function kv(e, t) {
12172
+ if (typeof e != "object" || !e) throw new Ov(t, "Object", e);
12143
12173
  }
12144
- function Ev(e, t) {
12145
- if (typeof e != "string") throw new wv(t, "string", e);
12174
+ function Av(e, t) {
12175
+ if (typeof e != "string") throw new Ov(t, "string", e);
12146
12176
  }
12147
- var Dv = mv === "win32";
12177
+ var jv = vv === "win32";
12148
12178
  function q(e) {
12149
- return e === bv || e === xv;
12179
+ return e === wv || e === Tv;
12150
12180
  }
12151
- function Ov(e) {
12152
- return e === bv;
12181
+ function Mv(e) {
12182
+ return e === wv;
12153
12183
  }
12154
- function kv(e) {
12155
- return e >= hv && e <= _v || e >= gv && e <= vv;
12184
+ function Nv(e) {
12185
+ return e >= yv && e <= xv || e >= bv && e <= Sv;
12156
12186
  }
12157
- function Av(e, t, n, r) {
12187
+ function Pv(e, t, n, r) {
12158
12188
  let i = "", a = 0, o = -1, s = 0, c = 0;
12159
12189
  for (let l = 0; l <= e.length; ++l) {
12160
12190
  if (l < e.length) c = e.charCodeAt(l);
12161
12191
  else if (r(c)) break;
12162
- else c = bv;
12192
+ else c = wv;
12163
12193
  if (r(c)) {
12164
12194
  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) {
12195
+ if (i.length < 2 || a !== 2 || i.charCodeAt(i.length - 1) !== Cv || i.charCodeAt(i.length - 2) !== Cv) {
12166
12196
  if (i.length > 2) {
12167
12197
  let e = i.lastIndexOf(n);
12168
12198
  e === -1 ? (i = "", a = 0) : (i = i.slice(0, e), a = i.length - 1 - i.lastIndexOf(n)), o = l, s = 0;
@@ -12175,23 +12205,23 @@ function Av(e, t, n, r) {
12175
12205
  t && (i += i.length > 0 ? `${n}..` : "..", a = 2);
12176
12206
  } else i.length > 0 ? i += `${n}${e.slice(o + 1, l)}` : i = e.slice(o + 1, l), a = l - o - 1;
12177
12207
  o = l, s = 0;
12178
- } else c === yv && s !== -1 ? ++s : s = -1;
12208
+ } else c === Cv && s !== -1 ? ++s : s = -1;
12179
12209
  }
12180
12210
  return i;
12181
12211
  }
12182
- function jv(e, t) {
12183
- Tv(t, "pathObject");
12212
+ function Fv(e, t) {
12213
+ kv(t, "pathObject");
12184
12214
  let n = t.dir || t.root, r = t.base || `${t.name || ""}${t.ext || ""}`;
12185
12215
  return n ? n === t.root ? `${n}${r}` : `${n}${e}${r}` : r;
12186
12216
  }
12187
- var Mv = {
12217
+ var Iv = {
12188
12218
  resolve(...e) {
12189
12219
  let t = "", n = "", r = !1;
12190
12220
  for (let i = e.length - 1; i >= -1; i--) {
12191
12221
  let a;
12192
12222
  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}\\`));
12223
+ if (a = e[i], Av(a, "path"), a.length === 0) continue;
12224
+ } 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
12225
  let o = a.length, s = 0, c = "", l = !1, u = a.charCodeAt(0);
12196
12226
  if (o === 1) q(u) && (s = 1, l = !0);
12197
12227
  else if (q(u)) if (l = !0, q(a.charCodeAt(1))) {
@@ -12206,7 +12236,7 @@ var Mv = {
12206
12236
  }
12207
12237
  }
12208
12238
  } 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));
12239
+ 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
12240
  if (c.length > 0) if (t.length > 0) {
12211
12241
  if (c.toLowerCase() !== t.toLowerCase()) continue;
12212
12242
  } else t = c;
@@ -12214,14 +12244,14 @@ var Mv = {
12214
12244
  if (t.length > 0) break;
12215
12245
  } else if (n = `${a.slice(s)}\\${n}`, r = l, l && t.length > 0) break;
12216
12246
  }
12217
- return n = Av(n, !r, "\\", q), r ? `${t}\\${n}` : `${t}${n}` || ".";
12247
+ return n = Pv(n, !r, "\\", q), r ? `${t}\\${n}` : `${t}${n}` || ".";
12218
12248
  },
12219
12249
  normalize(e) {
12220
- Ev(e, "path");
12250
+ Av(e, "path");
12221
12251
  let t = e.length;
12222
12252
  if (t === 0) return ".";
12223
12253
  let n = 0, r, i = !1, a = e.charCodeAt(0);
12224
- if (t === 1) return Ov(a) ? "\\" : e;
12254
+ if (t === 1) return Mv(a) ? "\\" : e;
12225
12255
  if (q(a)) if (i = !0, q(e.charCodeAt(1))) {
12226
12256
  let i = 2, a = i;
12227
12257
  for (; i < t && !q(e.charCodeAt(i));) i++;
@@ -12235,23 +12265,23 @@ var Mv = {
12235
12265
  }
12236
12266
  }
12237
12267
  } 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) : "";
12268
+ else Nv(a) && e.charCodeAt(1) === Ev && (r = e.slice(0, 2), n = 2, t > 2 && q(e.charCodeAt(2)) && (i = !0, n = 3));
12269
+ let o = n < t ? Pv(e.slice(n), !i, "\\", q) : "";
12240
12270
  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
12271
  },
12242
12272
  isAbsolute(e) {
12243
- Ev(e, "path");
12273
+ Av(e, "path");
12244
12274
  let t = e.length;
12245
12275
  if (t === 0) return !1;
12246
12276
  let n = e.charCodeAt(0);
12247
- return q(n) || t > 2 && kv(n) && e.charCodeAt(1) === Sv && q(e.charCodeAt(2));
12277
+ return q(n) || t > 2 && Nv(n) && e.charCodeAt(1) === Ev && q(e.charCodeAt(2));
12248
12278
  },
12249
12279
  join(...e) {
12250
12280
  if (e.length === 0) return ".";
12251
12281
  let t, n;
12252
12282
  for (let r = 0; r < e.length; ++r) {
12253
12283
  let i = e[r];
12254
- Ev(i, "path"), i.length > 0 && (t === void 0 ? t = n = i : t += `\\${i}`);
12284
+ Av(i, "path"), i.length > 0 && (t === void 0 ? t = n = i : t += `\\${i}`);
12255
12285
  }
12256
12286
  if (t === void 0) return ".";
12257
12287
  let r = !0, i = 0;
@@ -12264,53 +12294,53 @@ var Mv = {
12264
12294
  for (; i < t.length && q(t.charCodeAt(i));) i++;
12265
12295
  i >= 2 && (t = `\\${t.slice(i)}`);
12266
12296
  }
12267
- return Mv.normalize(t);
12297
+ return Iv.normalize(t);
12268
12298
  },
12269
12299
  relative(e, t) {
12270
- if (Ev(e, "from"), Ev(t, "to"), e === t) return "";
12271
- let n = Mv.resolve(e), r = Mv.resolve(t);
12300
+ if (Av(e, "from"), Av(t, "to"), e === t) return "";
12301
+ let n = Iv.resolve(e), r = Iv.resolve(t);
12272
12302
  if (n === r || (e = n.toLowerCase(), t = r.toLowerCase(), e === t)) return "";
12273
12303
  let i = 0;
12274
- for (; i < e.length && e.charCodeAt(i) === xv;) i++;
12304
+ for (; i < e.length && e.charCodeAt(i) === Tv;) i++;
12275
12305
  let a = e.length;
12276
- for (; a - 1 > i && e.charCodeAt(a - 1) === xv;) a--;
12306
+ for (; a - 1 > i && e.charCodeAt(a - 1) === Tv;) a--;
12277
12307
  let o = a - i, s = 0;
12278
- for (; s < t.length && t.charCodeAt(s) === xv;) s++;
12308
+ for (; s < t.length && t.charCodeAt(s) === Tv;) s++;
12279
12309
  let c = t.length;
12280
- for (; c - 1 > s && t.charCodeAt(c - 1) === xv;) c--;
12310
+ for (; c - 1 > s && t.charCodeAt(c - 1) === Tv;) c--;
12281
12311
  let l = c - s, u = o < l ? o : l, d = -1, f = 0;
12282
12312
  for (; f < u; f++) {
12283
12313
  let n = e.charCodeAt(i + f);
12284
12314
  if (n !== t.charCodeAt(s + f)) break;
12285
- n === xv && (d = f);
12315
+ n === Tv && (d = f);
12286
12316
  }
12287
12317
  if (f !== u) {
12288
12318
  if (d === -1) return r;
12289
12319
  } else {
12290
12320
  if (l > u) {
12291
- if (t.charCodeAt(s + f) === xv) return r.slice(s + f + 1);
12321
+ if (t.charCodeAt(s + f) === Tv) return r.slice(s + f + 1);
12292
12322
  if (f === 2) return r.slice(s + f);
12293
12323
  }
12294
- o > u && (e.charCodeAt(i + f) === xv ? d = f : f === 2 && (d = 3)), d === -1 && (d = 0);
12324
+ o > u && (e.charCodeAt(i + f) === Tv ? d = f : f === 2 && (d = 3)), d === -1 && (d = 0);
12295
12325
  }
12296
12326
  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));
12327
+ for (f = i + d + 1; f <= a; ++f) (f === a || e.charCodeAt(f) === Tv) && (p += p.length === 0 ? ".." : "\\..");
12328
+ return s += d, p.length > 0 ? `${p}${r.slice(s, c)}` : (r.charCodeAt(s) === Tv && ++s, r.slice(s, c));
12299
12329
  },
12300
12330
  toNamespacedPath(e) {
12301
12331
  if (typeof e != "string" || e.length === 0) return e;
12302
- let t = Mv.resolve(e);
12332
+ let t = Iv.resolve(e);
12303
12333
  if (t.length <= 2) return e;
12304
- if (t.charCodeAt(0) === xv) {
12305
- if (t.charCodeAt(1) === xv) {
12334
+ if (t.charCodeAt(0) === Tv) {
12335
+ if (t.charCodeAt(1) === Tv) {
12306
12336
  let e = t.charCodeAt(2);
12307
- if (e !== Cv && e !== yv) return `\\\\?\\UNC\\${t.slice(2)}`;
12337
+ if (e !== Dv && e !== Cv) return `\\\\?\\UNC\\${t.slice(2)}`;
12308
12338
  }
12309
- } else if (kv(t.charCodeAt(0)) && t.charCodeAt(1) === Sv && t.charCodeAt(2) === xv) return `\\\\?\\${t}`;
12339
+ } else if (Nv(t.charCodeAt(0)) && t.charCodeAt(1) === Ev && t.charCodeAt(2) === Tv) return `\\\\?\\${t}`;
12310
12340
  return e;
12311
12341
  },
12312
12342
  dirname(e) {
12313
- Ev(e, "path");
12343
+ Av(e, "path");
12314
12344
  let t = e.length;
12315
12345
  if (t === 0) return ".";
12316
12346
  let n = -1, r = 0, i = e.charCodeAt(0);
@@ -12328,7 +12358,7 @@ var Mv = {
12328
12358
  }
12329
12359
  }
12330
12360
  }
12331
- } else kv(i) && e.charCodeAt(1) === Sv && (n = t > 2 && q(e.charCodeAt(2)) ? 3 : 2, r = n);
12361
+ } else Nv(i) && e.charCodeAt(1) === Ev && (n = t > 2 && q(e.charCodeAt(2)) ? 3 : 2, r = n);
12332
12362
  let a = -1, o = !0;
12333
12363
  for (let n = t - 1; n >= r; --n) if (q(e.charCodeAt(n))) {
12334
12364
  if (!o) {
@@ -12343,9 +12373,9 @@ var Mv = {
12343
12373
  return e.slice(0, a);
12344
12374
  },
12345
12375
  basename(e, t) {
12346
- t !== void 0 && Ev(t, "ext"), Ev(e, "path");
12376
+ t !== void 0 && Av(t, "ext"), Av(e, "path");
12347
12377
  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) {
12378
+ 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
12379
  if (t === e) return "";
12350
12380
  let o = t.length - 1, s = -1;
12351
12381
  for (a = e.length - 1; a >= n; --a) {
@@ -12368,9 +12398,9 @@ var Mv = {
12368
12398
  return r === -1 ? "" : e.slice(n, r);
12369
12399
  },
12370
12400
  extname(e) {
12371
- Ev(e, "path");
12401
+ Av(e, "path");
12372
12402
  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);
12403
+ e.length >= 2 && e.charCodeAt(1) === Ev && Nv(e.charCodeAt(0)) && (t = r = 2);
12374
12404
  for (let s = e.length - 1; s >= t; --s) {
12375
12405
  let t = e.charCodeAt(s);
12376
12406
  if (q(t)) {
@@ -12380,13 +12410,13 @@ var Mv = {
12380
12410
  }
12381
12411
  continue;
12382
12412
  }
12383
- i === -1 && (a = !1, i = s + 1), t === yv ? n === -1 ? n = s : o !== 1 && (o = 1) : n !== -1 && (o = -1);
12413
+ i === -1 && (a = !1, i = s + 1), t === Cv ? n === -1 ? n = s : o !== 1 && (o = 1) : n !== -1 && (o = -1);
12384
12414
  }
12385
12415
  return n === -1 || i === -1 || o === 0 || o === 1 && n === i - 1 && n === r + 1 ? "" : e.slice(n, i);
12386
12416
  },
12387
- format: jv.bind(null, "\\"),
12417
+ format: Fv.bind(null, "\\"),
12388
12418
  parse(e) {
12389
- Ev(e, "path");
12419
+ Av(e, "path");
12390
12420
  let t = {
12391
12421
  root: "",
12392
12422
  dir: "",
@@ -12409,7 +12439,7 @@ var Mv = {
12409
12439
  }
12410
12440
  }
12411
12441
  }
12412
- } else if (kv(i) && e.charCodeAt(1) === Sv) {
12442
+ } else if (Nv(i) && e.charCodeAt(1) === Ev) {
12413
12443
  if (n <= 2) return t.root = t.dir = e, t;
12414
12444
  if (r = 2, q(e.charCodeAt(2))) {
12415
12445
  if (n === 3) return t.root = t.dir = e, t;
@@ -12426,7 +12456,7 @@ var Mv = {
12426
12456
  }
12427
12457
  continue;
12428
12458
  }
12429
- s === -1 && (c = !1, s = l + 1), i === yv ? a === -1 ? a = l : u !== 1 && (u = 1) : a !== -1 && (u = -1);
12459
+ s === -1 && (c = !1, s = l + 1), i === Cv ? a === -1 ? a = l : u !== 1 && (u = 1) : a !== -1 && (u = -1);
12430
12460
  }
12431
12461
  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
12462
  },
@@ -12434,64 +12464,64 @@ var Mv = {
12434
12464
  delimiter: ";",
12435
12465
  win32: null,
12436
12466
  posix: null
12437
- }, Nv = (() => {
12438
- if (Dv) {
12467
+ }, Lv = (() => {
12468
+ if (jv) {
12439
12469
  let e = /\\/g;
12440
12470
  return () => {
12441
- let t = fv().replace(e, "/");
12471
+ let t = gv().replace(e, "/");
12442
12472
  return t.slice(t.indexOf("/"));
12443
12473
  };
12444
12474
  }
12445
- return () => fv();
12446
- })(), Pv = {
12475
+ return () => gv();
12476
+ })(), Rv = {
12447
12477
  resolve(...e) {
12448
12478
  let t = "", n = !1;
12449
12479
  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);
12480
+ let i = r >= 0 ? e[r] : Lv();
12481
+ Av(i, "path"), i.length !== 0 && (t = `${i}/${t}`, n = i.charCodeAt(0) === wv);
12452
12482
  }
12453
- return t = Av(t, !n, "/", Ov), n ? `/${t}` : t.length > 0 ? t : ".";
12483
+ return t = Pv(t, !n, "/", Mv), n ? `/${t}` : t.length > 0 ? t : ".";
12454
12484
  },
12455
12485
  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);
12486
+ if (Av(e, "path"), e.length === 0) return ".";
12487
+ let t = e.charCodeAt(0) === wv, n = e.charCodeAt(e.length - 1) === wv;
12488
+ return e = Pv(e, !t, "/", Mv), e.length === 0 ? t ? "/" : n ? "./" : "." : (n && (e += "/"), t ? `/${e}` : e);
12459
12489
  },
12460
12490
  isAbsolute(e) {
12461
- return Ev(e, "path"), e.length > 0 && e.charCodeAt(0) === bv;
12491
+ return Av(e, "path"), e.length > 0 && e.charCodeAt(0) === wv;
12462
12492
  },
12463
12493
  join(...e) {
12464
12494
  if (e.length === 0) return ".";
12465
12495
  let t;
12466
12496
  for (let n = 0; n < e.length; ++n) {
12467
12497
  let r = e[n];
12468
- Ev(r, "path"), r.length > 0 && (t === void 0 ? t = r : t += `/${r}`);
12498
+ Av(r, "path"), r.length > 0 && (t === void 0 ? t = r : t += `/${r}`);
12469
12499
  }
12470
- return t === void 0 ? "." : Pv.normalize(t);
12500
+ return t === void 0 ? "." : Rv.normalize(t);
12471
12501
  },
12472
12502
  relative(e, t) {
12473
- if (Ev(e, "from"), Ev(t, "to"), e === t || (e = Pv.resolve(e), t = Pv.resolve(t), e === t)) return "";
12503
+ if (Av(e, "from"), Av(t, "to"), e === t || (e = Rv.resolve(e), t = Rv.resolve(t), e === t)) return "";
12474
12504
  let n = e.length, r = n - 1, i = t.length - 1, a = r < i ? r : i, o = -1, s = 0;
12475
12505
  for (; s < a; s++) {
12476
12506
  let n = e.charCodeAt(1 + s);
12477
12507
  if (n !== t.charCodeAt(1 + s)) break;
12478
- n === bv && (o = s);
12508
+ n === wv && (o = s);
12479
12509
  }
12480
12510
  if (s === a) if (i > a) {
12481
- if (t.charCodeAt(1 + s) === bv) return t.slice(1 + s + 1);
12511
+ if (t.charCodeAt(1 + s) === wv) return t.slice(1 + s + 1);
12482
12512
  if (s === 0) return t.slice(1 + s);
12483
- } else r > a && (e.charCodeAt(1 + s) === bv ? o = s : s === 0 && (o = 0));
12513
+ } else r > a && (e.charCodeAt(1 + s) === wv ? o = s : s === 0 && (o = 0));
12484
12514
  let c = "";
12485
- for (s = 1 + o + 1; s <= n; ++s) (s === n || e.charCodeAt(s) === bv) && (c += c.length === 0 ? ".." : "/..");
12515
+ for (s = 1 + o + 1; s <= n; ++s) (s === n || e.charCodeAt(s) === wv) && (c += c.length === 0 ? ".." : "/..");
12486
12516
  return `${c}${t.slice(1 + o)}`;
12487
12517
  },
12488
12518
  toNamespacedPath(e) {
12489
12519
  return e;
12490
12520
  },
12491
12521
  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) {
12522
+ if (Av(e, "path"), e.length === 0) return ".";
12523
+ let t = e.charCodeAt(0) === wv, n = -1, r = !0;
12524
+ for (let t = e.length - 1; t >= 1; --t) if (e.charCodeAt(t) === wv) {
12495
12525
  if (!r) {
12496
12526
  n = t;
12497
12527
  break;
@@ -12500,14 +12530,14 @@ var Mv = {
12500
12530
  return n === -1 ? t ? "/" : "." : t && n === 1 ? "//" : e.slice(0, n);
12501
12531
  },
12502
12532
  basename(e, t) {
12503
- t !== void 0 && Ev(t, "ext"), Ev(e, "path");
12533
+ t !== void 0 && Av(t, "ext"), Av(e, "path");
12504
12534
  let n = 0, r = -1, i = !0, a;
12505
12535
  if (t !== void 0 && t.length > 0 && t.length <= e.length) {
12506
12536
  if (t === e) return "";
12507
12537
  let o = t.length - 1, s = -1;
12508
12538
  for (a = e.length - 1; a >= 0; --a) {
12509
12539
  let c = e.charCodeAt(a);
12510
- if (c === bv) {
12540
+ if (c === wv) {
12511
12541
  if (!i) {
12512
12542
  n = a + 1;
12513
12543
  break;
@@ -12516,7 +12546,7 @@ var Mv = {
12516
12546
  }
12517
12547
  return n === r ? r = s : r === -1 && (r = e.length), e.slice(n, r);
12518
12548
  }
12519
- for (a = e.length - 1; a >= 0; --a) if (e.charCodeAt(a) === bv) {
12549
+ for (a = e.length - 1; a >= 0; --a) if (e.charCodeAt(a) === wv) {
12520
12550
  if (!i) {
12521
12551
  n = a + 1;
12522
12552
  break;
@@ -12525,24 +12555,24 @@ var Mv = {
12525
12555
  return r === -1 ? "" : e.slice(n, r);
12526
12556
  },
12527
12557
  extname(e) {
12528
- Ev(e, "path");
12558
+ Av(e, "path");
12529
12559
  let t = -1, n = 0, r = -1, i = !0, a = 0;
12530
12560
  for (let o = e.length - 1; o >= 0; --o) {
12531
12561
  let s = e.charCodeAt(o);
12532
- if (s === bv) {
12562
+ if (s === wv) {
12533
12563
  if (!i) {
12534
12564
  n = o + 1;
12535
12565
  break;
12536
12566
  }
12537
12567
  continue;
12538
12568
  }
12539
- r === -1 && (i = !1, r = o + 1), s === yv ? t === -1 ? t = o : a !== 1 && (a = 1) : t !== -1 && (a = -1);
12569
+ r === -1 && (i = !1, r = o + 1), s === Cv ? t === -1 ? t = o : a !== 1 && (a = 1) : t !== -1 && (a = -1);
12540
12570
  }
12541
12571
  return t === -1 || r === -1 || a === 0 || a === 1 && t === r - 1 && t === n + 1 ? "" : e.slice(t, r);
12542
12572
  },
12543
- format: jv.bind(null, "/"),
12573
+ format: Fv.bind(null, "/"),
12544
12574
  parse(e) {
12545
- Ev(e, "path");
12575
+ Av(e, "path");
12546
12576
  let t = {
12547
12577
  root: "",
12548
12578
  dir: "",
@@ -12551,19 +12581,19 @@ var Mv = {
12551
12581
  name: ""
12552
12582
  };
12553
12583
  if (e.length === 0) return t;
12554
- let n = e.charCodeAt(0) === bv, r;
12584
+ let n = e.charCodeAt(0) === wv, r;
12555
12585
  n ? (t.root = "/", r = 1) : r = 0;
12556
12586
  let i = -1, a = 0, o = -1, s = !0, c = e.length - 1, l = 0;
12557
12587
  for (; c >= r; --c) {
12558
12588
  let t = e.charCodeAt(c);
12559
- if (t === bv) {
12589
+ if (t === wv) {
12560
12590
  if (!s) {
12561
12591
  a = c + 1;
12562
12592
  break;
12563
12593
  }
12564
12594
  continue;
12565
12595
  }
12566
- o === -1 && (s = !1, o = c + 1), t === yv ? i === -1 ? i = c : l !== 1 && (l = 1) : i !== -1 && (l = -1);
12596
+ o === -1 && (s = !1, o = c + 1), t === Cv ? i === -1 ? i = c : l !== 1 && (l = 1) : i !== -1 && (l = -1);
12567
12597
  }
12568
12598
  if (o !== -1) {
12569
12599
  let r = a === 0 && n ? 1 : a;
@@ -12576,69 +12606,69 @@ var Mv = {
12576
12606
  win32: null,
12577
12607
  posix: null
12578
12608
  };
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;
12609
+ 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
12610
  //#endregion
12581
12611
  //#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) {
12612
+ var zv = /^\w[\w\d+.-]*$/, Bv = /^\//, Vv = /^\/\//;
12613
+ function Hv(e, t) {
12584
12614
  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.");
12615
+ if (e.scheme && !zv.test(e.scheme)) throw Error("[UriError]: Scheme contains illegal characters.");
12586
12616
  if (e.path) {
12587
12617
  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 (\"//\")");
12618
+ 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");
12619
+ } 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
12620
  }
12591
12621
  }
12592
- function zv(e, t) {
12622
+ function Uv(e, t) {
12593
12623
  return !e && !t ? "file" : e;
12594
12624
  }
12595
- function Bv(e, t) {
12625
+ function Wv(e, t) {
12596
12626
  switch (e) {
12597
12627
  case "https":
12598
12628
  case "http":
12599
12629
  case "file":
12600
- t ? t[0] !== Vv && (t = Vv + t) : t = Vv;
12630
+ t ? t[0] !== Gv && (t = Gv + t) : t = Gv;
12601
12631
  break;
12602
12632
  }
12603
12633
  return t;
12604
12634
  }
12605
- var J = "", Vv = "/", Hv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, Uv = class e {
12635
+ var J = "", Gv = "/", Kv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, qv = class e {
12606
12636
  static isUri(t) {
12607
12637
  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
12638
  }
12609
12639
  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));
12640
+ 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
12641
  }
12612
12642
  get fsPath() {
12613
- return Yv(this, !1);
12643
+ return $v(this, !1);
12614
12644
  }
12615
12645
  with(e) {
12616
12646
  if (!e) return this;
12617
12647
  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);
12648
+ 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
12649
  }
12620
12650
  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);
12651
+ let n = Kv.exec(e);
12652
+ 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
12653
  }
12624
12654
  static file(e) {
12625
12655
  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);
12656
+ if (uv && (e = e.replace(/\\/g, Gv)), e[0] === Gv && e[1] === Gv) {
12657
+ let n = e.indexOf(Gv, 2);
12658
+ n === -1 ? (t = e.substring(2), e = Gv) : (t = e.substring(2, n), e = e.substring(n) || Gv);
12629
12659
  }
12630
- return new Gv("file", t, e, J, J);
12660
+ return new Yv("file", t, e, J, J);
12631
12661
  }
12632
12662
  static from(e, t) {
12633
- return new Gv(e.scheme, e.authority, e.path, e.query, e.fragment, t);
12663
+ return new Yv(e.scheme, e.authority, e.path, e.query, e.fragment, t);
12634
12664
  }
12635
12665
  static joinPath(t, ...n) {
12636
12666
  if (!t.path) throw Error("[UriError]: cannot call joinPath on URI without path");
12637
12667
  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 });
12668
+ 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
12669
  }
12640
12670
  toString(e = !1) {
12641
- return Xv(this, e);
12671
+ return ey(this, e);
12642
12672
  }
12643
12673
  toJSON() {
12644
12674
  return this;
@@ -12646,25 +12676,25 @@ var J = "", Vv = "/", Hv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?
12646
12676
  static revive(t) {
12647
12677
  if (!t || t instanceof e) return t;
12648
12678
  {
12649
- let e = new Gv(t);
12650
- return e._formatted = t.external ?? null, e._fsPath = t._sep === Wv ? t.fsPath ?? null : null, e;
12679
+ let e = new Yv(t);
12680
+ return e._formatted = t.external ?? null, e._fsPath = t._sep === Jv ? t.fsPath ?? null : null, e;
12651
12681
  }
12652
12682
  }
12653
- }, Wv = ov ? 1 : void 0, Gv = class extends Uv {
12683
+ }, Jv = uv ? 1 : void 0, Yv = class extends qv {
12654
12684
  constructor() {
12655
12685
  super(...arguments), this._formatted = null, this._fsPath = null;
12656
12686
  }
12657
12687
  get fsPath() {
12658
- return this._fsPath ||= Yv(this, !1), this._fsPath;
12688
+ return this._fsPath ||= $v(this, !1), this._fsPath;
12659
12689
  }
12660
12690
  toString(e = !1) {
12661
- return e ? Xv(this, !0) : (this._formatted ||= Xv(this, !1), this._formatted);
12691
+ return e ? ey(this, !0) : (this._formatted ||= ey(this, !1), this._formatted);
12662
12692
  }
12663
12693
  toJSON() {
12664
12694
  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;
12695
+ 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
12696
  }
12667
- }, Kv = {
12697
+ }, Xv = {
12668
12698
  58: "%3A",
12669
12699
  47: "%2F",
12670
12700
  63: "%3F",
@@ -12685,34 +12715,34 @@ var J = "", Vv = "/", Hv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?
12685
12715
  61: "%3D",
12686
12716
  32: "%20"
12687
12717
  };
12688
- function qv(e, t, n) {
12718
+ function Zv(e, t, n) {
12689
12719
  let r, i = -1;
12690
12720
  for (let a = 0; a < e.length; a++) {
12691
12721
  let o = e.charCodeAt(a);
12692
12722
  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
12723
  else {
12694
12724
  r === void 0 && (r = e.substr(0, a));
12695
- let t = Kv[o];
12725
+ let t = Xv[o];
12696
12726
  t === void 0 ? i === -1 && (i = a) : (i !== -1 && (r += encodeURIComponent(e.substring(i, a)), i = -1), r += t);
12697
12727
  }
12698
12728
  }
12699
12729
  return i !== -1 && (r += encodeURIComponent(e.substring(i))), r === void 0 ? e : r;
12700
12730
  }
12701
- function Jv(e) {
12731
+ function Qv(e) {
12702
12732
  let t;
12703
12733
  for (let n = 0; n < e.length; n++) {
12704
12734
  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]);
12735
+ r === 35 || r === 63 ? (t === void 0 && (t = e.substr(0, n)), t += Xv[r]) : t !== void 0 && (t += e[n]);
12706
12736
  }
12707
12737
  return t === void 0 ? e : t;
12708
12738
  }
12709
- function Yv(e, t) {
12739
+ function $v(e, t) {
12710
12740
  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;
12741
+ 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
12742
  }
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) {
12743
+ function ey(e, t) {
12744
+ let n = t ? Qv : Zv, r = "", { scheme: i, authority: a, path: o, query: s, fragment: c } = e;
12745
+ if (i && (r += i, r += ":"), (a || i === "file") && (r += Gv, r += Gv), a) {
12716
12746
  let e = a.indexOf("@");
12717
12747
  if (e !== -1) {
12718
12748
  let t = a.substr(0, e);
@@ -12730,18 +12760,18 @@ function Xv(e, t) {
12730
12760
  }
12731
12761
  r += n(o, !0, !1);
12732
12762
  }
12733
- return s && (r += "?", r += n(s, !1, !1)), c && (r += "#", r += t ? c : qv(c, !1, !1)), r;
12763
+ return s && (r += "?", r += n(s, !1, !1)), c && (r += "#", r += t ? c : Zv(c, !1, !1)), r;
12734
12764
  }
12735
- function Zv(e) {
12765
+ function ty(e) {
12736
12766
  try {
12737
12767
  return decodeURIComponent(e);
12738
12768
  } catch {
12739
- return e.length > 3 ? e.substr(0, 3) + Zv(e.substr(3)) : e;
12769
+ return e.length > 3 ? e.substr(0, 3) + ty(e.substr(3)) : e;
12740
12770
  }
12741
12771
  }
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;
12772
+ var ny = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
12773
+ function ry(e) {
12774
+ return e.match(ny) ? e.replace(ny, (e) => ty(e)) : e;
12745
12775
  }
12746
12776
  //#endregion
12747
12777
  //#region src/services/types.ts
@@ -12749,15 +12779,15 @@ var Y = /* @__PURE__ */ function(e) {
12749
12779
  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
12780
  }({}), X = /* @__PURE__ */ function(e) {
12751
12781
  return e[e.None = 0] = "None", e[e.KeepWhitespace = 1] = "KeepWhitespace", e[e.InsertAsSnippet = 4] = "InsertAsSnippet", e;
12752
- }({}), ey = /* @__PURE__ */ function(e) {
12782
+ }({}), iy = /* @__PURE__ */ function(e) {
12753
12783
  return e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = "Warning", e[e.Error = 8] = "Error", e;
12754
12784
  }({});
12755
12785
  //#endregion
12756
12786
  //#region src/services/utils.ts
12757
- function ty(e, t) {
12787
+ function ay(e, t) {
12758
12788
  return e.getOffsetAt(t);
12759
12789
  }
12760
- function ny(e, t) {
12790
+ function oy(e, t) {
12761
12791
  let { startPos: n, endPos: r } = t;
12762
12792
  return {
12763
12793
  startLineNumber: n.line + 1,
@@ -12768,12 +12798,12 @@ function ny(e, t) {
12768
12798
  }
12769
12799
  //#endregion
12770
12800
  //#region src/services/definition/provider.ts
12771
- var ry = class {
12801
+ var sy = class {
12772
12802
  constructor(e) {
12773
12803
  this.compiler = e;
12774
12804
  }
12775
12805
  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)];
12806
+ let { uri: r } = e, i = yo.fromUri(String(e.uri)), a = ay(e, n), o = [...this.compiler.container.stack(i, a)];
12777
12807
  for (; o.length !== 0;) {
12778
12808
  let e = o.pop();
12779
12809
  if (!e) continue;
@@ -12782,7 +12812,7 @@ var ry = class {
12782
12812
  let i;
12783
12813
  if (n.declaration && [Bp.PRIMARY_EXPRESSION, Bp.VARIABLE].includes(e.kind) && ({declaration: i} = n), i) {
12784
12814
  let { startPos: e, endPos: t } = i, n = r;
12785
- return r && i.filepath && (n = Uv.parse(i.filepath.toUri({ protocol: r.scheme }))), [{
12815
+ return r && i.filepath && (n = qv.parse(i.filepath.toUri({ protocol: r.scheme }))), [{
12786
12816
  range: {
12787
12817
  startColumn: e.column + 1,
12788
12818
  startLineNumber: e.line + 1,
@@ -12795,7 +12825,7 @@ var ry = class {
12795
12825
  }
12796
12826
  return [];
12797
12827
  }
12798
- }, iy = class {
12828
+ }, cy = class {
12799
12829
  constructor(e) {
12800
12830
  this.compiler = e;
12801
12831
  }
@@ -12833,14 +12863,14 @@ var ry = class {
12833
12863
  };
12834
12864
  }
12835
12865
  getSeverityValue(e) {
12836
- return e === "error" ? ey.Error : ey.Warning;
12866
+ return e === "error" ? iy.Error : iy.Warning;
12837
12867
  }
12838
- }, ay = class {
12868
+ }, ly = class {
12839
12869
  constructor(e) {
12840
12870
  this.compiler = e;
12841
12871
  }
12842
12872
  provideReferences(e, n) {
12843
- let { uri: r } = e, i = yo.fromUri(String(r)), a = ty(e, n);
12873
+ let { uri: r } = e, i = yo.fromUri(String(r)), a = ay(e, n);
12844
12874
  this.compiler.bindProject();
12845
12875
  let o = [...this.compiler.container.stack(i, a)];
12846
12876
  for (; o.length !== 0;) {
@@ -12853,7 +12883,7 @@ var ry = class {
12853
12883
  let n = this.compiler.nodeSymbol(e).getFiltered(t) ?? this.compiler.nodeReferee(e).getFiltered(t), i = n ? this.compiler.symbolReferences(n) : void 0;
12854
12884
  if (i && i.length > 0) return i.map((e) => {
12855
12885
  let t = r;
12856
- return r && e.filepath && (t = Uv.parse(e.filepath.toUri({ protocol: r.scheme }))), {
12886
+ return r && e.filepath && (t = qv.parse(e.filepath.toUri({ protocol: r.scheme }))), {
12857
12887
  range: {
12858
12888
  startColumn: e.startPos.column + 1,
12859
12889
  startLineNumber: e.startPos.line + 1,
@@ -12870,16 +12900,16 @@ var ry = class {
12870
12900
  };
12871
12901
  //#endregion
12872
12902
  //#region src/core/utils/span.ts
12873
- function oy(e, t) {
12903
+ function uy(e, t) {
12874
12904
  return e >= t.start && e < t.end;
12875
12905
  }
12876
- function sy(e, t) {
12906
+ function dy(e, t) {
12877
12907
  let n = t.bodyColon?.start ?? t.body?.start;
12878
12908
  return n === void 0 ? e >= t.start && e <= t.end : e >= t.start && e < n;
12879
12909
  }
12880
12910
  //#endregion
12881
12911
  //#region src/services/suggestions/utils/useMerger.ts
12882
- function cy(e, t) {
12912
+ function fy(e, t) {
12883
12913
  let n = [], r = e.parseFile(t).getValue()?.ast;
12884
12914
  if (!r) return n;
12885
12915
  for (let e of r.uses) {
@@ -12906,21 +12936,21 @@ function cy(e, t) {
12906
12936
  }
12907
12937
  return n;
12908
12938
  }
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}`;
12939
+ function py(e, t, n, r, i, a) {
12940
+ let o = fy(e, i), s = r.relativeTo(i.dirname).replace(/\.dbml$/, ""), c = o.findIndex((e) => e.sourceFile === s), l = `${n} ${t}`;
12911
12941
  if (c !== -1) {
12912
12942
  let e = o[c];
12913
12943
  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)
12944
+ topInsert: my(Na([...e.specifiers.filter((e) => e.name !== "*").map((e) => `${e.kind ?? n} ${e.name}${e.alias ? ` as ${e.alias}` : ""}`), l]), s, "\n"),
12945
+ removeRange: hy(a, e.startOffset, e.endOffset)
12916
12946
  };
12917
12947
  }
12918
- return { topInsert: uy([l], s, "\n") };
12948
+ return { topInsert: my([l], s, "\n") };
12919
12949
  }
12920
- function uy(e, t, n) {
12950
+ function my(e, t, n) {
12921
12951
  return `use {${n}${e.map((e) => ` ${e}`).join(n)}${n}} from '${t}'${n}${n}`;
12922
12952
  }
12923
- function dy(e, t, n) {
12953
+ function hy(e, t, n) {
12924
12954
  let r = e.lastIndexOf("\n", t - 1) + 1, i = n;
12925
12955
  for (; i < e.length && (e[i] === " " || e[i] === " ");) i++;
12926
12956
  return i < e.length && e[i] === "\r" && i++, i < e.length && e[i] === "\n" && i++, {
@@ -12930,7 +12960,7 @@ function dy(e, t, n) {
12930
12960
  }
12931
12961
  //#endregion
12932
12962
  //#region src/services/suggestions/utils/index.ts
12933
- function fy(e) {
12963
+ function gy(e) {
12934
12964
  switch (e) {
12935
12965
  case I.Schema: return Y.Module;
12936
12966
  case I.Table:
@@ -12943,7 +12973,7 @@ function fy(e) {
12943
12973
  default: return Y.Text;
12944
12974
  }
12945
12975
  }
12946
- function py(e, t) {
12976
+ function _y(e, t) {
12947
12977
  if (!e || Wa(e)) return !1;
12948
12978
  for (let n of e.trailingTrivia) {
12949
12979
  if (n.start > t) break;
@@ -12954,7 +12984,7 @@ function py(e, t) {
12954
12984
  function Z() {
12955
12985
  return { suggestions: [] };
12956
12986
  }
12957
- function my(e) {
12987
+ function vy(e) {
12958
12988
  return {
12959
12989
  ...e,
12960
12990
  suggestions: e.suggestions.map((e) => ({
@@ -12963,17 +12993,17 @@ function my(e) {
12963
12993
  }))
12964
12994
  };
12965
12995
  }
12966
- function hy(e) {
12996
+ function yy(e) {
12967
12997
  return {
12968
12998
  ...e,
12969
12999
  suggestions: e.suggestions.map((e) => ({
12970
13000
  ...e,
12971
- insertText: e.quoted ? e.insertText : vg(e.insertText ?? ""),
13001
+ insertText: e.quoted ? e.insertText : Sg(e.insertText ?? ""),
12972
13002
  quoted: !0
12973
13003
  }))
12974
13004
  };
12975
13005
  }
12976
- function gy(e, t = ", ") {
13006
+ function by(e, t = ", ") {
12977
13007
  let n = e.suggestions.map((e) => typeof e.label == "string" ? e.label : e.label.label).join(t);
12978
13008
  return n ? {
12979
13009
  ...e,
@@ -12989,7 +13019,7 @@ function gy(e, t = ", ") {
12989
13019
  }
12990
13020
  //#endregion
12991
13021
  //#region src/services/suggestions/crossFile.ts
12992
- function _y(e, n, r) {
13022
+ function xy(e, n, r) {
12993
13023
  let i = [], a = /* @__PURE__ */ new Set(), o = e.layout.getSource(r) ?? "";
12994
13024
  for (let s of e.layout.getEntrypoints()) {
12995
13025
  if (s.equals(r)) continue;
@@ -12997,13 +13027,13 @@ function _y(e, n, r) {
12997
13027
  if (c) for (let t of [...c.nonSchemaMembers, ...c.schemaMembers]) {
12998
13028
  if (!n.includes(t.kind)) continue;
12999
13029
  let c = t.name;
13000
- !c || a.has(c) || (a.add(c), i.push(vy(e, c, t.kind, s, r, o)));
13030
+ !c || a.has(c) || (a.add(c), i.push(Sy(e, c, t.kind, s, r, o)));
13001
13031
  }
13002
13032
  }
13003
13033
  return i;
13004
13034
  }
13005
- function vy(e, t, n, r, i, a) {
13006
- let o = ly(e, t, n, r, i, a), s = [];
13035
+ function Sy(e, t, n, r, i, a) {
13036
+ let o = py(e, t, n, r, i, a), s = [];
13007
13037
  if (o.topInsert && s.push({
13008
13038
  range: {
13009
13039
  startLineNumber: 1,
@@ -13013,7 +13043,7 @@ function vy(e, t, n, r, i, a) {
13013
13043
  },
13014
13044
  text: o.topInsert
13015
13045
  }), o.removeRange) {
13016
- let e = yy(a, o.removeRange.startOffset), t = yy(a, o.removeRange.endOffset);
13046
+ let e = Cy(a, o.removeRange.startOffset), t = Cy(a, o.removeRange.endOffset);
13017
13047
  s.push({
13018
13048
  range: {
13019
13049
  startLineNumber: e.line,
@@ -13028,14 +13058,14 @@ function vy(e, t, n, r, i, a) {
13028
13058
  label: t,
13029
13059
  insertText: t,
13030
13060
  insertTextRules: X.KeepWhitespace,
13031
- kind: fy(n),
13061
+ kind: gy(n),
13032
13062
  detail: `from ${r.basename}`,
13033
- sortText: `zzz_${fy(n).toString().padStart(2, "0")}_${t}`,
13063
+ sortText: `zzz_${gy(n).toString().padStart(2, "0")}_${t}`,
13034
13064
  range: void 0,
13035
13065
  additionalTextEdits: s
13036
13066
  };
13037
13067
  }
13038
- function yy(e, t) {
13068
+ function Cy(e, t) {
13039
13069
  let n = 1, r = 1;
13040
13070
  for (let i = 0; i < t && i < e.length; i++) e[i] === "\n" ? (n++, r = 1) : r++;
13041
13071
  return {
@@ -13045,11 +13075,11 @@ function yy(e, t) {
13045
13075
  }
13046
13076
  //#endregion
13047
13077
  //#region src/services/suggestions/recordRowSnippet.ts
13048
- function by(e, t, n, i, a) {
13078
+ function wy(e, t, n, i, a) {
13049
13079
  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);
13080
+ 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
13081
  }
13052
- function xy(e, n) {
13082
+ function Ty(e, n) {
13053
13083
  if (!(n.name instanceof Xp)) return Z();
13054
13084
  let r = n.name.argumentList?.elementList || [], i = r.map((n) => e.nodeReferee(n).getFiltered(t));
13055
13085
  if (!i || i.length === 0) return Z();
@@ -13070,7 +13100,7 @@ function xy(e, n) {
13070
13100
  range: void 0
13071
13101
  }] };
13072
13102
  }
13073
- function Sy(e, n) {
13103
+ function Ey(e, n) {
13074
13104
  let r = n.parent;
13075
13105
  if (!(r instanceof z)) return Z();
13076
13106
  let i = e.nodeSymbol(r).getFiltered(t);
@@ -13108,40 +13138,40 @@ function Sy(e, n) {
13108
13138
  }
13109
13139
  //#endregion
13110
13140
  //#region src/services/suggestions/use.ts
13111
- function Cy(e, t, n, r, i) {
13141
+ function Dy(e, t, n, r, i) {
13112
13142
  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);
13143
+ 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
13144
  return null;
13115
13145
  }
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);
13146
+ function Oy(e, t, n, r, i, a) {
13147
+ if (r.importPath && uy(n, r.importPath)) return Ny(e, t, r.importPath, i, r);
13118
13148
  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);
13149
+ if (r.fromKeyword && n > r.fromKeyword.end) return Ny(e, t, void 0, i, r);
13120
13150
  if (r.specifiers instanceof Up) {
13121
13151
  if (!r.specifiers.openBrace) {
13122
- let e = Oy();
13123
- return py(r.useKeyword, n) ? my(e) : e;
13152
+ let e = My();
13153
+ return _y(r.useKeyword, n) ? vy(e) : e;
13124
13154
  }
13125
- return Ty(e, t, n, r.specifiers, r.importPath, a);
13155
+ return ky(e, t, n, r.specifiers, r.importPath, a);
13126
13156
  }
13127
13157
  if (r.specifiers instanceof Qp) return Z();
13128
- let o = Oy();
13129
- return py(r.useKeyword, n) ? my(o) : o;
13158
+ let o = My();
13159
+ return _y(r.useKeyword, n) ? vy(o) : o;
13130
13160
  }
13131
- function Ty(e, t, n, r, i, a) {
13161
+ function ky(e, t, n, r, i, a) {
13132
13162
  for (let o of r.specifiers) {
13133
13163
  let r = !Number.isNaN(o.start) && n >= o.start && n <= o.end, s = a === o.importKind || a === o.asKeyword;
13134
13164
  if (r || s) {
13135
13165
  if (o.importKind && n > o.importKind.end) {
13136
13166
  let n = o.getSymbolKind();
13137
- if (n !== void 0 && n !== I.Schema) return Dy(e, t, i, n);
13167
+ if (n !== void 0 && n !== I.Schema) return jy(e, t, i, n);
13138
13168
  }
13139
- return Ey();
13169
+ return Ay();
13140
13170
  }
13141
13171
  }
13142
- return Ey();
13172
+ return Ay();
13143
13173
  }
13144
- function Ey() {
13174
+ function Ay() {
13145
13175
  return { suggestions: Object.keys(gp).map((e) => ({
13146
13176
  label: e.toLowerCase(),
13147
13177
  insertText: `${e.toLowerCase()} `,
@@ -13150,7 +13180,7 @@ function Ey() {
13150
13180
  range: void 0
13151
13181
  })) };
13152
13182
  }
13153
- function Dy(e, n, r, i) {
13183
+ function jy(e, n, r, i) {
13154
13184
  if (!r) return Z();
13155
13185
  let a = bo(n, r.value);
13156
13186
  if (!a) return Z();
@@ -13169,11 +13199,11 @@ function Dy(e, n, r, i) {
13169
13199
  label: e,
13170
13200
  insertText: e,
13171
13201
  insertTextRules: X.KeepWhitespace,
13172
- kind: fy(i),
13202
+ kind: gy(i),
13173
13203
  range: void 0
13174
13204
  })) };
13175
13205
  }
13176
- function Oy() {
13206
+ function My() {
13177
13207
  return { suggestions: [{
13178
13208
  label: "* from",
13179
13209
  detail: "import all",
@@ -13190,10 +13220,10 @@ function Oy() {
13190
13220
  range: void 0
13191
13221
  }] };
13192
13222
  }
13193
- function ky(e, t, n, r, i) {
13223
+ function Ny(e, t, n, r, i) {
13194
13224
  let a = t.dirname, o = n ? n.value : "./", s = n === void 0, c;
13195
13225
  if (n) {
13196
- let e = ny(r, n);
13226
+ let e = oy(r, n);
13197
13227
  c = {
13198
13228
  startLineNumber: e.startLineNumber,
13199
13229
  startColumn: e.startColumn + 1,
@@ -13207,7 +13237,7 @@ function ky(e, t, n, r, i) {
13207
13237
  let r = n.relativeTo(a);
13208
13238
  if (r.endsWith(".dbml") && (r = r.slice(0, -Co.length)), r.startsWith(".") || (r = `./${r}`), o && !r.startsWith(o)) continue;
13209
13239
  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;
13240
+ if (Fy(e, n, Py(i)) && u.set(d, !0), l.has(d)) continue;
13211
13241
  let m = s ? `'${d}'` : d;
13212
13242
  l.set(d, {
13213
13243
  label: d,
@@ -13221,7 +13251,7 @@ function ky(e, t, n, r, i) {
13221
13251
  for (let [e, t] of l) u.get(e) && (t.sortText = `${t.kind === Y.File ? "0" : "1"}${e}`, t.detail = "best match");
13222
13252
  return { suggestions: [...l.values()] };
13223
13253
  }
13224
- function Ay(e) {
13254
+ function Py(e) {
13225
13255
  let t = e.specifiers;
13226
13256
  return t instanceof Up ? t.specifiers.flatMap((e) => {
13227
13257
  let t = P(e.name), n = e.importKind?.value.toLowerCase();
@@ -13231,32 +13261,32 @@ function Ay(e) {
13231
13261
  }];
13232
13262
  }) : [];
13233
13263
  }
13234
- function jy(e, n, r) {
13264
+ function Fy(e, n, r) {
13235
13265
  if (r.length === 0) return !1;
13236
13266
  let i = e.usableMembers(n).getFiltered(t);
13237
13267
  return i ? r.every(({ name: e, kind: t }) => i.nonSchemaMembers.some((n) => n.kind === t && n.name === e)) : !1;
13238
13268
  }
13239
13269
  //#endregion
13240
13270
  //#region src/services/suggestions/provider.ts
13241
- var My = class {
13271
+ var Iy = class {
13242
13272
  constructor(e, t = {}) {
13243
13273
  this.compiler = e, this.triggerCharacters = t.triggerCharacters ?? [];
13244
13274
  }
13245
13275
  provideCompletionItems(e, t) {
13246
- let n = yo.fromUri(String(e.uri)), r = ty(e, t), i = by(this.compiler, e, t, n, r);
13276
+ let n = yo.fromUri(String(e.uri)), r = ay(e, t), i = wy(this.compiler, e, t, n, r);
13247
13277
  if (i !== null) return i;
13248
13278
  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
13279
  if ([
13250
13280
  ...o?.trailingTrivia || [],
13251
13281
  ...o?.leadingTrivia || [],
13252
13282
  ...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);
13283
+ ].find((e) => qa(e) && uy(r, e))) return Z();
13284
+ if (s === void 0) return Yy();
13285
+ let l = Dy(this.compiler, n, r, o, e);
13256
13286
  if (l !== null) return l;
13257
- if ([v.STRING_LITERAL, v.QUOTED_STRING].includes(o.kind) && oy(r, o)) return Z();
13287
+ if ([v.STRING_LITERAL, v.QUOTED_STRING].includes(o.kind) && uy(r, o)) return Z();
13258
13288
  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();
13289
+ 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
13290
  let d = [...this.compiler.container.stack(n, r)].reverse();
13261
13291
  for (let e of d) if (e instanceof V) switch (e.op?.value) {
13262
13292
  case ">":
@@ -13264,8 +13294,8 @@ var My = class {
13264
13294
  case "<>":
13265
13295
  case "-":
13266
13296
  case "->":
13267
- case "<-": return Py(this.compiler, n, r, e);
13268
- case "~": return Ny(this.compiler, n, r);
13297
+ case "<-": return Ry(this.compiler, n, r, e);
13298
+ case "~": return Ly(this.compiler, n, r);
13269
13299
  default:
13270
13300
  }
13271
13301
  else if (e instanceof H) switch (e.op?.value) {
@@ -13274,27 +13304,27 @@ var My = class {
13274
13304
  case "<>":
13275
13305
  case "-":
13276
13306
  case "->":
13277
- case "<-": return Py(this.compiler, n, r, e);
13278
- case ".": return Uy(this.compiler, n, r, e);
13307
+ case "<-": return Ry(this.compiler, n, r, e);
13308
+ case ".": return qy(this.compiler, n, r, e);
13279
13309
  default:
13280
13310
  }
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);
13311
+ else if (e instanceof B) return Uy(this.compiler, n, r, e);
13312
+ else if (e instanceof G) return Uy(this.compiler, n, r, e);
13313
+ else if (e instanceof qp) return Vy(this.compiler, n, r, e);
13314
+ else if (e instanceof Jp) return Hy(this.compiler, n, r);
13315
+ else if (e instanceof Xp) return tb(this.compiler, n, r, e);
13316
+ else if (e instanceof U) return Jy(this.compiler, n, r, e);
13287
13317
  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);
13318
+ if (dy(r, e)) return eb(this.compiler, n, r, e);
13319
+ if (e.bodyColon && r >= e.bodyColon.end || e.body && uy(r, e.body)) return Jy(this.compiler, n, r, void 0);
13290
13320
  }
13291
13321
  return Z();
13292
13322
  }
13293
13323
  };
13294
- function Ny(e, t, n) {
13295
- return Iy(e, t, n, e.parse.ast(t), [I.TablePartial]);
13324
+ function Ly(e, t, n) {
13325
+ return By(e, t, n, e.parse.ast(t), [I.TablePartial]);
13296
13326
  }
13297
- function Py(e, t, n, r) {
13327
+ function Ry(e, t, n, r) {
13298
13328
  let i = e.container.scopeKind(t, n);
13299
13329
  if ([
13300
13330
  Q.REF,
@@ -13302,18 +13332,18 @@ function Py(e, t, n, r) {
13302
13332
  Q.TABLE,
13303
13333
  Q.TABLEPARTIAL
13304
13334
  ].includes(i)) {
13305
- let i = Iy(e, t, n, e.container.element(t, n), [
13335
+ let i = By(e, t, n, e.container.element(t, n), [
13306
13336
  I.Table,
13307
13337
  I.Schema,
13308
13338
  I.Column
13309
13339
  ]);
13310
- return py(r.op, n) ? my(i) : i;
13340
+ return _y(r.op, n) ? vy(i) : i;
13311
13341
  }
13312
13342
  return Z();
13313
13343
  }
13314
- function Fy(e, n, r) {
13344
+ function zy(e, n, r) {
13315
13345
  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) => {
13346
+ return i ? yy({ suggestions: i.filter((e) => r.includes(e.kind)).filter((e) => !(e instanceof yp && e.isPublicSchema())).flatMap((e) => {
13317
13347
  let t = e.name;
13318
13348
  if (t === void 0) return [];
13319
13349
  let r = e.originalFilepath, i = r && !r.equals(n.filepath) ? `from ${r.basename}` : "this file";
@@ -13321,21 +13351,21 @@ function Fy(e, n, r) {
13321
13351
  label: t,
13322
13352
  insertText: t,
13323
13353
  insertTextRules: X.KeepWhitespace,
13324
- kind: fy(e.kind),
13325
- sortText: fy(e.kind).toString().padStart(2, "0"),
13354
+ kind: gy(e.kind),
13355
+ sortText: gy(e.kind).toString().padStart(2, "0"),
13326
13356
  detail: i,
13327
13357
  range: void 0
13328
13358
  };
13329
13359
  }).filter((e) => e.label !== "") }) : Z();
13330
13360
  }
13331
- function Iy(e, n, r, i, a) {
13361
+ function By(e, n, r, i, a) {
13332
13362
  if (i === void 0) return Z();
13333
13363
  let o = i, s = { suggestions: [] }, c;
13334
13364
  for (; o;) {
13335
13365
  o instanceof R && (c = o);
13336
13366
  let n = e.nodeSymbol(o).getFiltered(t);
13337
13367
  if (n) {
13338
- let t = Fy(e, n, a).suggestions, r = (e) => {
13368
+ let t = zy(e, n, a).suggestions, r = (e) => {
13339
13369
  switch (e) {
13340
13370
  case Y.Field: return 0;
13341
13371
  case Y.Module: return 1;
@@ -13349,61 +13379,61 @@ function Iy(e, n, r, i, a) {
13349
13379
  }
13350
13380
  if (c?.filepath) {
13351
13381
  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)) {
13382
+ for (let r of xy(e, a, t)) {
13353
13383
  let e = typeof r.label == "string" ? r.label : r.label.label;
13354
13384
  n.has(e) || (n.add(e), s.suggestions.push(r));
13355
13385
  }
13356
13386
  }
13357
- return hy(s);
13387
+ return yy(s);
13358
13388
  }
13359
- function Ly(e, n, i, a) {
13389
+ function Vy(e, n, i, a) {
13360
13390
  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)) {
13391
+ for (let t of c) if (t instanceof Xp && t.argumentList === a) return tb(e, n, i, t);
13392
+ if (s instanceof z && s.isKind(r.Records) && !(s.name instanceof Xp) && dy(i, s)) {
13363
13393
  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
13394
  if (i) {
13365
- let t = Fy(e, i, [I.Column]);
13366
- return zf(a) ? gy(t) : t;
13395
+ let t = zy(e, i, [I.Column]);
13396
+ return zf(a) ? by(t) : t;
13367
13397
  }
13368
13398
  }
13369
13399
  switch (o) {
13370
- case Q.INDEXES: return tb(e, n, i);
13400
+ case Q.INDEXES: return ab(e, n, i);
13371
13401
  case Q.REF:
13372
13402
  case Q.DEP:
13373
13403
  for (; c.length > 0;) {
13374
13404
  let t = c.pop();
13375
- if (t instanceof H && t.op?.value === ".") return Uy(e, n, i, t);
13405
+ if (t instanceof H && t.op?.value === ".") return qy(e, n, i, t);
13376
13406
  }
13377
- return Yy(e, n, i);
13407
+ return $y(e, n, i);
13378
13408
  default: break;
13379
13409
  }
13380
13410
  return Z();
13381
13411
  }
13382
- function Ry(e, t, n) {
13383
- return e.container.scopeKind(t, n) === Q.RECORDS ? Iy(e, t, n, e.container.element(t, n), [
13412
+ function Hy(e, t, n) {
13413
+ return e.container.scopeKind(t, n) === Q.RECORDS ? By(e, t, n, e.container.element(t, n), [
13384
13414
  I.Schema,
13385
13415
  I.Enum,
13386
13416
  I.EnumField
13387
13417
  ]) : Z();
13388
13418
  }
13389
- function zy(e, t, n, r) {
13419
+ function Uy(e, t, n, r) {
13390
13420
  let { token: i } = e.container.token(t, n);
13391
13421
  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;
13422
+ let r = Wy(e, t, n);
13423
+ return i?.kind === v.COMMA && _y(i, n) ? vy(r) : r;
13394
13424
  }
13395
- if (r.name && r.name.start <= n && r.name.end >= n) return By(e, t, n);
13425
+ if (r.name && r.name.start <= n && r.name.end >= n) return Wy(e, t, n);
13396
13426
  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;
13427
+ let a = Gy(e, t, n, Lf(r.name) ?? "");
13428
+ return i?.kind === v.COLON && _y(i, n) ? vy(a) : a;
13399
13429
  }
13400
13430
  return Z();
13401
13431
  }
13402
- function By(e, t, n) {
13432
+ function Wy(e, t, n) {
13403
13433
  let r = e.container.element(t, n);
13404
13434
  if (r instanceof R) return Z();
13405
13435
  let a = e.container.scopeKind(t, n);
13406
- if (r.body && !oy(n, r.body)) {
13436
+ if (r.body && !uy(n, r.body)) {
13407
13437
  let e;
13408
13438
  switch (a) {
13409
13439
  case Q.TABLE:
@@ -13513,7 +13543,7 @@ function By(e, t, n) {
13513
13543
  }
13514
13544
  return Z();
13515
13545
  }
13516
- function Vy(e, t, n, r) {
13546
+ function Gy(e, t, n, r) {
13517
13547
  switch (r?.toLowerCase()) {
13518
13548
  case "update":
13519
13549
  case "delete": return { suggestions: [
@@ -13544,12 +13574,12 @@ function Vy(e, t, n, r) {
13544
13574
  range: void 0
13545
13575
  })) };
13546
13576
  break;
13547
- case "default": return Iy(e, t, n, e.container.element(t, n), [I.Schema, I.Enum]);
13577
+ case "default": return By(e, t, n, e.container.element(t, n), [I.Schema, I.Enum]);
13548
13578
  default: break;
13549
13579
  }
13550
13580
  return Z();
13551
13581
  }
13552
- function Hy(e, n, r) {
13582
+ function Ky(e, n, r) {
13553
13583
  if (!r) return [];
13554
13584
  let i = [], a = r;
13555
13585
  for (; a;) {
@@ -13567,44 +13597,44 @@ function Hy(e, n, r) {
13567
13597
  }
13568
13598
  return i;
13569
13599
  }
13570
- function Uy(e, n, r, i) {
13600
+ function qy(e, n, r, i) {
13571
13601
  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) => {
13602
+ 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
13603
  let t = e.name;
13574
13604
  return t === void 0 ? [] : {
13575
13605
  label: t,
13576
13606
  insertText: t,
13577
- kind: fy(e.kind),
13607
+ kind: gy(e.kind),
13578
13608
  range: void 0
13579
13609
  };
13580
13610
  }) });
13581
13611
  }
13582
- function Wy(e, t, n, i) {
13612
+ function Jy(e, t, n, i) {
13583
13613
  switch (e.container.scopeKind(t, n)) {
13584
13614
  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);
13615
+ case Q.TABLEPARTIAL: return Zy(e, t, n, i);
13616
+ case Q.PROJECT: return Qy(e, t, n, i);
13617
+ case Q.INDEXES: return rb(e, t, n);
13618
+ case Q.ENUM: return Xy(e, t, n, i);
13589
13619
  case Q.REF:
13590
13620
  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;
13621
+ let r = $y(e, t, n);
13622
+ return e.container.token(t, n).token?.kind === v.COLON && _y(e.container.token(t, n).token, n) ? vy(r) : r;
13593
13623
  }
13594
- case Q.TABLEGROUP: return Qy(e, t);
13595
- case Q.DIAGRAMVIEW: return ib();
13624
+ case Q.TABLEGROUP: return nb(e, t);
13625
+ case Q.DIAGRAMVIEW: return cb();
13596
13626
  case Q.CUSTOM: {
13597
13627
  let i = e.container.element(t, n);
13598
13628
  if (i instanceof z) {
13599
13629
  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);
13630
+ if (o instanceof z && o.isKind(r.DiagramView)) return lb(e, t, n, i);
13601
13631
  }
13602
13632
  return Z();
13603
13633
  }
13604
13634
  default: return Z();
13605
13635
  }
13606
13636
  }
13607
- function Gy() {
13637
+ function Yy() {
13608
13638
  return { suggestions: [
13609
13639
  "Table",
13610
13640
  "TableGroup",
@@ -13624,14 +13654,14 @@ function Gy() {
13624
13654
  range: void 0
13625
13655
  })) };
13626
13656
  }
13627
- function Ky(e, t, n, r) {
13628
- return r?.callee && nb(n, r) === 1 ? Iy(e, t, n, e.container.element(t, n), [
13657
+ function Xy(e, t, n, r) {
13658
+ return r?.callee && ob(n, r) === 1 ? By(e, t, n, e.container.element(t, n), [
13629
13659
  I.Schema,
13630
13660
  I.Table,
13631
13661
  I.Column
13632
13662
  ]) : Z();
13633
13663
  }
13634
- function qy(e, t, n, r) {
13664
+ function Zy(e, t, n, r) {
13635
13665
  let i = [
13636
13666
  "Note",
13637
13667
  "indexes",
@@ -13645,17 +13675,17 @@ function qy(e, t, n, r) {
13645
13675
  kind: Y.Keyword,
13646
13676
  range: void 0
13647
13677
  })) };
13648
- let a = nb(n, r);
13678
+ let a = ob(n, r);
13649
13679
  return a === 0 ? { suggestions: i.map((e) => ({
13650
13680
  label: e,
13651
13681
  insertText: e,
13652
13682
  insertTextRules: X.KeepWhitespace,
13653
13683
  kind: Y.Keyword,
13654
13684
  range: void 0
13655
- })) } : a === 1 ? eb(e, t, n) : Z();
13685
+ })) } : a === 1 ? ib(e, t, n) : Z();
13656
13686
  }
13657
- function Jy(e, t, n, r) {
13658
- return !r?.callee || nb(n, r) === 0 ? { suggestions: [
13687
+ function Qy(e, t, n, r) {
13688
+ return !r?.callee || ob(n, r) === 0 ? { suggestions: [
13659
13689
  "Table",
13660
13690
  "TableGroup",
13661
13691
  "Enum",
@@ -13671,47 +13701,47 @@ function Jy(e, t, n, r) {
13671
13701
  range: void 0
13672
13702
  })) } : Z();
13673
13703
  }
13674
- function Yy(e, t, n) {
13675
- return Iy(e, t, n, e.container.element(t, n), [
13704
+ function $y(e, t, n) {
13705
+ return By(e, t, n, e.container.element(t, n), [
13676
13706
  I.Schema,
13677
13707
  I.Table,
13678
13708
  I.Column
13679
13709
  ]);
13680
13710
  }
13681
- function Xy(e, t, n, i) {
13682
- return i.isKind(r.Records) ? Iy(e, t, n, i.parent, [I.Schema, I.Table]) : Z();
13711
+ function eb(e, t, n, i) {
13712
+ return i.isKind(r.Records) ? By(e, t, n, i.parent, [I.Schema, I.Table]) : Z();
13683
13713
  }
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]);
13714
+ function tb(e, n, i, a) {
13715
+ let o = e.container.element(n, i), s = a.callee && uy(i, a.callee), c = a.argumentList && uy(i, a.argumentList);
13716
+ if (o instanceof z && o.isKind(r.Records) && dy(i, o)) {
13717
+ if (s) return By(e, n, i, o.parent, [I.Schema, I.Table]);
13688
13718
  if (!c) return Z();
13689
13719
  let r = a.callee;
13690
13720
  if (!r) return Z();
13691
13721
  let l = Vf(r) ?? [r], u = l[l.length - 1], d = u ? e.nodeReferee(u).getFiltered(t) : void 0;
13692
13722
  if (!d) return Z();
13693
- let f = Fy(e, d, [I.Column]), { argumentList: p } = a;
13694
- return !p || !zf(p) ? f : gy(f);
13723
+ let f = zy(e, d, [I.Column]), { argumentList: p } = a;
13724
+ return !p || !zf(p) ? f : by(f);
13695
13725
  }
13696
13726
  let l = [...e.container.stack(n, i)];
13697
13727
  for (let o of l) {
13698
13728
  if (!c || !(o instanceof U) || o.callee !== a || (P(a.callee) ?? "").toLowerCase() !== r.Records) continue;
13699
13729
  let s = e.nodeSymbol(e.container.element(n, i)).getFiltered(t);
13700
13730
  if (!s) return Z();
13701
- let l = Fy(e, s, [I.Column]), { argumentList: u } = a;
13702
- return !u || !zf(u) ? l : gy(l);
13731
+ let l = zy(e, s, [I.Column]), { argumentList: u } = a;
13732
+ return !u || !zf(u) ? l : by(l);
13703
13733
  }
13704
13734
  return Z();
13705
13735
  }
13706
- function Qy(e, t) {
13707
- return { suggestions: [...hy({ suggestions: (e.parse.publicSymbolTable(t) ?? []).flatMap((e) => {
13736
+ function nb(e, t) {
13737
+ return { suggestions: [...yy({ suggestions: (e.parse.publicSymbolTable(t) ?? []).flatMap((e) => {
13708
13738
  if (e.kind !== I.Table && e.kind !== I.Schema) return [];
13709
13739
  let t = e.name;
13710
13740
  return t === void 0 || e instanceof yp && e.isPublicSchema() ? [] : {
13711
13741
  label: t,
13712
13742
  insertText: t,
13713
13743
  insertTextRules: X.KeepWhitespace,
13714
- kind: fy(e.kind),
13744
+ kind: gy(e.kind),
13715
13745
  range: void 0
13716
13746
  };
13717
13747
  }) }).suggestions, ...["Note"].map((e) => ({
@@ -13722,10 +13752,10 @@ function Qy(e, t) {
13722
13752
  range: void 0
13723
13753
  }))] };
13724
13754
  }
13725
- function $y(e, t, n) {
13726
- return tb(e, t, n);
13755
+ function rb(e, t, n) {
13756
+ return ab(e, t, n);
13727
13757
  }
13728
- function eb(e, t, n) {
13758
+ function ib(e, t, n) {
13729
13759
  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
13760
  label: e,
13731
13761
  insertText: e,
@@ -13733,36 +13763,36 @@ function eb(e, t, n) {
13733
13763
  kind: Y.TypeParameter,
13734
13764
  sortText: Y.TypeParameter.toString().padStart(2, "0"),
13735
13765
  range: void 0
13736
- })), ...Iy(e, t, n, e.container.element(t, n), [I.Enum, I.Schema]).suggestions] };
13766
+ })), ...By(e, t, n, e.container.element(t, n), [I.Enum, I.Schema]).suggestions] };
13737
13767
  }
13738
- function tb(e, n, r) {
13768
+ function ab(e, n, r) {
13739
13769
  let i = e.container.element(n, r)?.parent, a = i ? e.nodeSymbol(i).getFiltered(t) : void 0;
13740
13770
  if (!a || !a?.isKind(I.Table)) return Z();
13741
13771
  let o = e.symbolMembers(a).getFiltered(t);
13742
- return o ? hy({ suggestions: o.flatMap((n) => {
13772
+ return o ? yy({ suggestions: o.flatMap((n) => {
13743
13773
  let r = n.declaration ? e.nodeFullname(n.declaration) : void 0, i = r && !r.hasValue(t) ? r.getValue()?.at(-1) : void 0;
13744
13774
  return i ? {
13745
13775
  label: i,
13746
13776
  insertText: i,
13747
13777
  insertTextRules: X.KeepWhitespace,
13748
- kind: fy(I.Column),
13778
+ kind: gy(I.Column),
13749
13779
  range: void 0
13750
13780
  } : [];
13751
13781
  }) }) : Z();
13752
13782
  }
13753
- function nb(e, t) {
13783
+ function ob(e, t) {
13754
13784
  if (!t.callee) return -1;
13755
13785
  let n = [t.callee, ...t.args], r = n.findIndex((t) => e <= t.end);
13756
13786
  return r === -1 ? n.length : r;
13757
13787
  }
13758
- var rb = {
13788
+ var sb = {
13759
13789
  label: "*",
13760
13790
  insertText: "*",
13761
13791
  insertTextRules: X.KeepWhitespace,
13762
13792
  kind: Y.Keyword,
13763
13793
  range: void 0
13764
13794
  };
13765
- function ib() {
13795
+ function cb() {
13766
13796
  return { suggestions: [...[
13767
13797
  "Tables",
13768
13798
  "TableGroups",
@@ -13774,14 +13804,14 @@ function ib() {
13774
13804
  insertTextRules: X.KeepWhitespace,
13775
13805
  kind: Y.Keyword,
13776
13806
  range: void 0
13777
- })), rb] };
13807
+ })), sb] };
13778
13808
  }
13779
- function ab(e, t, n, i) {
13809
+ function lb(e, t, n, i) {
13780
13810
  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] };
13811
+ case r.DiagramViewTables: return { suggestions: [sb, ...By(e, t, n, e.parse.ast(t), [I.Table, I.Schema]).suggestions] };
13812
+ case r.DiagramViewTableGroups: return { suggestions: [sb, ...By(e, t, n, e.parse.ast(t), [I.TableGroup]).suggestions] };
13783
13813
  case r.DiagramViewSchemas: return { suggestions: [
13784
- rb,
13814
+ sb,
13785
13815
  {
13786
13816
  label: y,
13787
13817
  insertText: y,
@@ -13789,15 +13819,15 @@ function ab(e, t, n, i) {
13789
13819
  kind: Y.Module,
13790
13820
  range: void 0
13791
13821
  },
13792
- ...Iy(e, t, n, e.parse.ast(t), [I.Schema]).suggestions
13822
+ ...By(e, t, n, e.parse.ast(t), [I.Schema]).suggestions
13793
13823
  ] };
13794
- case r.DiagramViewNotes: return { suggestions: [rb, ...Iy(e, t, n, e.parse.ast(t), [I.StickyNote]).suggestions] };
13824
+ case r.DiagramViewNotes: return { suggestions: [sb, ...By(e, t, n, e.parse.ast(t), [I.StickyNote]).suggestions] };
13795
13825
  default: return Z();
13796
13826
  }
13797
13827
  }
13798
13828
  //#endregion
13799
13829
  //#region src/services/monarch.ts
13800
- var ob = {
13830
+ var ub = {
13801
13831
  comments: {
13802
13832
  lineComment: "//",
13803
13833
  blockComment: ["/*", "*/"]
@@ -13863,7 +13893,7 @@ var ob = {
13863
13893
  increaseIndentPattern: /^(.*\{[^}]*|\s*[{[].*)$/,
13864
13894
  decreaseIndentPattern: /^(.*\}.*|\s*[}\]].*)$/
13865
13895
  }
13866
- }, sb = {
13896
+ }, db = {
13867
13897
  tokenPostfix: ".dbml",
13868
13898
  brackets: [
13869
13899
  {
@@ -14067,12 +14097,12 @@ var ob = {
14067
14097
  };
14068
14098
  //#endregion
14069
14099
  //#region src/compiler/queries/container/stack.ts
14070
- function cb(e, t) {
14100
+ function fb(e, t) {
14071
14101
  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
14102
  if (a === -1) return [this.parse.ast(e)];
14073
14103
  let o = n[a].start, s = this.parse.ast(e), c = [s];
14074
14104
  for (;;) {
14075
- let e = Tm(s).find((e) => oy(o, e));
14105
+ let e = Tm(s).find((e) => uy(o, e));
14076
14106
  if (e === void 0 || e instanceof Va) break;
14077
14107
  c.push(e), s = e;
14078
14108
  }
@@ -14093,7 +14123,7 @@ function cb(e, t) {
14093
14123
  }
14094
14124
  //#endregion
14095
14125
  //#region src/compiler/queries/container/token.ts
14096
- function lb(e, t) {
14126
+ function pb(e, t) {
14097
14127
  let n = this.token.flatStream(e).findIndex((e) => e.start >= t);
14098
14128
  return n === void 0 || n <= 0 ? {
14099
14129
  token: void 0,
@@ -14105,14 +14135,14 @@ function lb(e, t) {
14105
14135
  }
14106
14136
  //#endregion
14107
14137
  //#region src/compiler/queries/container/element.ts
14108
- function ub(e, t) {
14138
+ function mb(e, t) {
14109
14139
  let n = this.container.stack(e, t);
14110
14140
  for (let e = n.length - 1; e >= 0; --e) if (n[e] instanceof z) return n[e];
14111
14141
  return this.parse.ast(e);
14112
14142
  }
14113
14143
  //#endregion
14114
14144
  //#region src/compiler/queries/container/scope.ts
14115
- function db(e, n) {
14145
+ function hb(e, n) {
14116
14146
  let r = this.container.element(e, n);
14117
14147
  if (!r) return;
14118
14148
  let i = this.nodeSymbol(r);
@@ -14127,7 +14157,7 @@ var Q = /* @__PURE__ */ function(e) {
14127
14157
  }({});
14128
14158
  //#endregion
14129
14159
  //#region src/compiler/queries/container/scopeKind.ts
14130
- function fb(e, t) {
14160
+ function gb(e, t) {
14131
14161
  let n = this.container.element(e, t);
14132
14162
  if (n instanceof R) return Q.TOPLEVEL;
14133
14163
  switch (n.type?.value.toLowerCase()) {
@@ -14148,9 +14178,9 @@ function fb(e, t) {
14148
14178
  }
14149
14179
  //#endregion
14150
14180
  //#region src/compiler/queries/canonicalName.ts
14151
- function pb(e, t) {
14181
+ function _b(e, t) {
14152
14182
  let r = t.originalSymbol;
14153
- if (r.filepath.equals(e)) return n.create(hb(this, r));
14183
+ if (r.filepath.equals(e)) return n.create(yb(this, r));
14154
14184
  let i = [...this.symbolUses(r).getValue(), ...this.symbolAliases(r).getValue()].filter((t) => t.filepath.equals(e));
14155
14185
  for (let e of i) {
14156
14186
  let t = e.name;
@@ -14159,12 +14189,12 @@ function pb(e, t) {
14159
14189
  schema: "",
14160
14190
  name: t
14161
14191
  });
14162
- let i = mb(this, e);
14192
+ let i = vb(this, e);
14163
14193
  if (i.length > 0) return n.create({
14164
14194
  schema: i.join("."),
14165
14195
  name: t
14166
14196
  });
14167
- let a = hb(this, r);
14197
+ let a = yb(this, r);
14168
14198
  return a ? n.create({
14169
14199
  ...a,
14170
14200
  name: t
@@ -14173,9 +14203,9 @@ function pb(e, t) {
14173
14203
  name: t
14174
14204
  });
14175
14205
  }
14176
- return n.create(hb(this, r));
14206
+ return n.create(yb(this, r));
14177
14207
  }
14178
- function mb(e, t) {
14208
+ function vb(e, t) {
14179
14209
  let n = [], r = t;
14180
14210
  for (; r;) {
14181
14211
  let t = e.symbolParent(r).find((e) => e instanceof yp && e.isKind(I.Schema));
@@ -14184,7 +14214,7 @@ function mb(e, t) {
14184
14214
  }
14185
14215
  return n;
14186
14216
  }
14187
- function hb(e, n) {
14217
+ function yb(e, n) {
14188
14218
  if (!n.declaration) return n.name ? {
14189
14219
  schema: y,
14190
14220
  name: n.name
@@ -14202,7 +14232,7 @@ function hb(e, n) {
14202
14232
  }
14203
14233
  //#endregion
14204
14234
  //#region src/compiler/queries/files/fileDependencies.ts
14205
- function gb(e) {
14235
+ function bb(e) {
14206
14236
  let { ast: t } = this.parseFile(e).getValue(), n = [], r = /* @__PURE__ */ new Set();
14207
14237
  for (let i of t.body) {
14208
14238
  if (!(i instanceof Vp) || !i.importPath) continue;
@@ -14213,7 +14243,7 @@ function gb(e) {
14213
14243
  }
14214
14244
  //#endregion
14215
14245
  //#region src/compiler/queries/files/reachableFiles.ts
14216
- function _b(e, t) {
14246
+ function xb(e, t) {
14217
14247
  let n = /* @__PURE__ */ new Set(), r = [], i = [...t], a = 0;
14218
14248
  for (; a < i.length;) {
14219
14249
  let t = i[a++], o = t.intern();
@@ -14224,49 +14254,49 @@ function _b(e, t) {
14224
14254
  }
14225
14255
  return r;
14226
14256
  }
14227
- function vb(e) {
14228
- return _b(this, e ? [e] : this.layout.getEntrypoints());
14257
+ function Sb(e) {
14258
+ return xb(this, e ? [e] : this.layout.getEntrypoints());
14229
14259
  }
14230
14260
  //#endregion
14231
14261
  //#region src/compiler/queries/legacy/parse.ts
14232
- function yb(e) {
14262
+ function Cb(e) {
14233
14263
  return this.bindFile(e), this.parseFile(e).getValue().ast;
14234
14264
  }
14235
- function bb(e) {
14265
+ function wb(e) {
14236
14266
  return this.interpretFile(e).getErrors();
14237
14267
  }
14238
- function xb(e) {
14268
+ function Tb(e) {
14239
14269
  return this.interpretFile(e).getWarnings();
14240
14270
  }
14241
- function Sb(e) {
14271
+ function Eb(e) {
14242
14272
  return this.parseFile(e).getValue().tokens;
14243
14273
  }
14244
- function Cb(e) {
14274
+ function Db(e) {
14245
14275
  let n = this.parseFile(e).getValue().ast, r = this.nodeSymbol(n).getFiltered(t);
14246
14276
  if (r) return this.interpretSymbol(r, e).getFiltered(t);
14247
14277
  }
14248
- function wb(e) {
14278
+ function Ob(e) {
14249
14279
  let n = this.parseFile(e).getValue().ast, r = this.nodeSymbol(n).getFiltered(t);
14250
14280
  if (r) return this.symbolMembers(r).getFiltered(t);
14251
14281
  }
14252
14282
  //#endregion
14253
14283
  //#region src/compiler/queries/legacy/token.ts
14254
- function Tb(e) {
14284
+ function kb(e) {
14255
14285
  return this.parseFile(e).getValue().tokens.flatMap((e) => [
14256
14286
  ...e.leadingInvalid,
14257
14287
  e,
14258
14288
  ...e.trailingInvalid
14259
14289
  ]);
14260
14290
  }
14261
- function Eb(e) {
14291
+ function Ab(e) {
14262
14292
  return this.parseFile(e).getValue().tokens.filter(Qa);
14263
14293
  }
14264
14294
  //#endregion
14265
14295
  //#region src/compiler/queries/nodeAtPosition.ts
14266
- function Db(e, t) {
14296
+ function jb(e, t) {
14267
14297
  let n = this.parse.ast(e);
14268
14298
  for (;;) {
14269
- let e = Tm(n).find((e) => oy(t, e));
14299
+ let e = Tm(n).find((e) => uy(t, e));
14270
14300
  if (e === void 0) return n;
14271
14301
  if (e instanceof Va) return e;
14272
14302
  n = e;
@@ -14274,12 +14304,12 @@ function Db(e, t) {
14274
14304
  }
14275
14305
  //#endregion
14276
14306
  //#region src/compiler/queries/pipeline/bind.ts
14277
- function Ob(e) {
14307
+ function Mb(e) {
14278
14308
  let t = this.validateFile(e), r = this.parseFile(e).getValue().ast, i = this.bindNode(r).map(() => void 0);
14279
14309
  return new n(void 0, [...t.getErrors(), ...i.getErrors()], [...t.getWarnings(), ...i.getWarnings()]);
14280
14310
  }
14281
- function kb() {
14282
- let e = wg(this, this.layout.getEntrypoints()), t = /* @__PURE__ */ new Map();
14311
+ function Nb() {
14312
+ let e = Og(this, this.layout.getEntrypoints()), t = /* @__PURE__ */ new Map();
14283
14313
  for (let n of e) {
14284
14314
  let e = this.bindFile(n);
14285
14315
  t.set(n.absolute, e);
@@ -14288,11 +14318,11 @@ function kb() {
14288
14318
  }
14289
14319
  //#endregion
14290
14320
  //#region src/compiler/queries/pipeline/interpret.ts
14291
- function Ab(e) {
14321
+ function Pb(e) {
14292
14322
  let { ast: r } = this.parseFile(e).getValue(), i = this.nodeSymbol(r).getFiltered(t);
14293
14323
  return i ? this.interpretSymbol(i, e).map((e) => e === t || !e ? void 0 : e) : n.create(void 0);
14294
14324
  }
14295
- function jb() {
14325
+ function Fb() {
14296
14326
  let e = [], r = [], i = /* @__PURE__ */ new Set(), a = [];
14297
14327
  for (let e of this.layout.getEntrypoints()) for (let t of this.reachableFiles(e)) {
14298
14328
  let e = t.intern();
@@ -14313,12 +14343,12 @@ function jb() {
14313
14343
  }
14314
14344
  //#endregion
14315
14345
  //#region src/compiler/queries/pipeline/validate.ts
14316
- function Mb(e) {
14346
+ function Ib(e) {
14317
14347
  return this.parseFile(e).chain(({ ast: e }) => this.validateNode(e).map(() => void 0));
14318
14348
  }
14319
14349
  //#endregion
14320
14350
  //#region src/core/lexer/lexer.ts
14321
- var Nb = class {
14351
+ var Lb = class {
14322
14352
  constructor(e, t) {
14323
14353
  this.start = {
14324
14354
  offset: 0,
@@ -14603,9 +14633,9 @@ var Nb = class {
14603
14633
  default: return this.text[this.current.offset - 1];
14604
14634
  }
14605
14635
  }
14606
- }, Pb = /* @__PURE__ */ function(e) {
14636
+ }, Rb = /* @__PURE__ */ function(e) {
14607
14637
  return e[e.ListExpression = 0] = "ListExpression", e[e.GroupExpression = 1] = "GroupExpression", e[e.BlockExpression = 2] = "BlockExpression", e;
14608
- }({}), Fb = class {
14638
+ }({}), zb = class {
14609
14639
  constructor() {
14610
14640
  this.stack = [], this.numberOfNestedLParens = 0, this.numberOfNestedLBrackets = 0, this.numberOfNestedLBraces = 0;
14611
14641
  }
@@ -14655,7 +14685,7 @@ var Nb = class {
14655
14685
  default: break;
14656
14686
  }
14657
14687
  }
14658
- }, Ib = class {
14688
+ }, Bb = class {
14659
14689
  constructor(e, t) {
14660
14690
  this.generator = e, this.filepath = t;
14661
14691
  }
@@ -14666,9 +14696,9 @@ var Nb = class {
14666
14696
  constructor(e, t, n) {
14667
14697
  this.token = e, this.partialNode = t, this.handlerContext = n;
14668
14698
  }
14669
- }, Lb = class {
14699
+ }, Vb = class {
14670
14700
  constructor(e, t, n, r) {
14671
- this.current = 0, this.errors = [], this.contextStack = new Fb(), this.useSpecifierList = this.contextStack.withContextDo(Pb.BlockExpression, () => {
14701
+ this.current = 0, this.errors = [], this.contextStack = new zb(), this.useSpecifierList = this.contextStack.withContextDo(Rb.BlockExpression, () => {
14672
14702
  let e = { specifiers: [] }, t = () => this.nodeFactory.create(Up, e);
14673
14703
  try {
14674
14704
  this.consume("Expect an opening brace '{'", v.LBRACE), e.openBrace = this.previous();
@@ -14717,7 +14747,7 @@ var Nb = class {
14717
14747
  if (this.check(v.COLON, v.LBRACE, v.LBRACKET)) break;
14718
14748
  K(e), this.advance();
14719
14749
  }
14720
- }, this.blockExpression = this.contextStack.withContextDo(Pb.BlockExpression, () => {
14750
+ }, this.blockExpression = this.contextStack.withContextDo(Rb.BlockExpression, () => {
14721
14751
  let e = { body: [] }, t = () => this.nodeFactory.create(W, e);
14722
14752
  try {
14723
14753
  this.consume("Expect an opening brace '{'", v.LBRACE), e.blockOpenBrace = this.previous();
@@ -14747,7 +14777,7 @@ var Nb = class {
14747
14777
  if (this.check(v.RBRACE) || Ua(this.previous(), e)) break;
14748
14778
  K(e), this.advance();
14749
14779
  }
14750
- }, this.tupleExpression = this.contextStack.withContextDo(Pb.GroupExpression, () => {
14780
+ }, this.tupleExpression = this.contextStack.withContextDo(Rb.GroupExpression, () => {
14751
14781
  let e = {
14752
14782
  elementList: [],
14753
14783
  commaList: []
@@ -14791,7 +14821,7 @@ var Nb = class {
14791
14821
  if (this.check(v.RPAREN, v.COMMA)) break;
14792
14822
  K(e), this.advance();
14793
14823
  }
14794
- }, this.listExpression = this.contextStack.withContextDo(Pb.ListExpression, () => {
14824
+ }, this.listExpression = this.contextStack.withContextDo(Rb.ListExpression, () => {
14795
14825
  let e = {
14796
14826
  elementList: [],
14797
14827
  commaList: []
@@ -14843,7 +14873,7 @@ var Nb = class {
14843
14873
  if (this.check(v.COMMA, v.RBRACKET)) break;
14844
14874
  K(e), this.advance();
14845
14875
  }
14846
- }, this.source = e, this.tokens = t, this.nodeFactory = new Ib(n, r), this.filepath = r;
14876
+ }, this.source = e, this.tokens = t, this.nodeFactory = new Bb(n, r), this.filepath = r;
14847
14877
  }
14848
14878
  isAtEnd() {
14849
14879
  return this.current >= this.tokens.length || this.tokens[this.current].kind === v.EOF;
@@ -15091,7 +15121,7 @@ var Nb = class {
15091
15121
  for (; !this.isAtEnd();) {
15092
15122
  let n = this.peek();
15093
15123
  if (n.kind === v.LPAREN) {
15094
- let { left: r } = Ub(n);
15124
+ let { left: r } = qb(n);
15095
15125
  if (r < e || Ua(this.previous(), n) && !this.contextStack.isWithinGroupExpressionContext() && !this.contextStack.isWithinListExpressionContext()) break;
15096
15126
  try {
15097
15127
  t = this.nodeFactory.create(Xp, {
@@ -15118,7 +15148,7 @@ var Nb = class {
15118
15148
  }), new $(e.token, t, e.handlerContext)) : e;
15119
15149
  }
15120
15150
  } else if (Ba(n)) {
15121
- let r = n, i = Ub(r);
15151
+ let r = n, i = qb(r);
15122
15152
  if (i.left !== null) {
15123
15153
  if (i.left <= e) break;
15124
15154
  this.advance(), t = this.nodeFactory.create(Gp, {
@@ -15126,7 +15156,7 @@ var Nb = class {
15126
15156
  op: r
15127
15157
  });
15128
15158
  } else {
15129
- let n = zb(r);
15159
+ let n = Ub(r);
15130
15160
  if (n.left === null || n.left <= e) break;
15131
15161
  this.advance();
15132
15162
  try {
@@ -15152,7 +15182,7 @@ var Nb = class {
15152
15182
  if (Ba(this.peek())) {
15153
15183
  let t = {};
15154
15184
  t.op = this.peek();
15155
- let n = Vb(t.op);
15185
+ let n = Gb(t.op);
15156
15186
  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
15187
  this.advance();
15158
15188
  try {
@@ -15224,7 +15254,7 @@ var Nb = class {
15224
15254
  logError(e, t, n) {
15225
15255
  this.errors.push(new T(t, n, e));
15226
15256
  }
15227
- }, Rb = {
15257
+ }, Hb = {
15228
15258
  "+": {
15229
15259
  left: 9,
15230
15260
  right: 10
@@ -15286,13 +15316,13 @@ var Nb = class {
15286
15316
  right: 17
15287
15317
  }
15288
15318
  };
15289
- function zb(e) {
15290
- return Rb[e.value] || {
15319
+ function Ub(e) {
15320
+ return Hb[e.value] || {
15291
15321
  left: null,
15292
15322
  right: null
15293
15323
  };
15294
15324
  }
15295
- var Bb = {
15325
+ var Wb = {
15296
15326
  "+": {
15297
15327
  left: null,
15298
15328
  right: 15
@@ -15330,34 +15360,34 @@ var Bb = {
15330
15360
  right: 15
15331
15361
  }
15332
15362
  };
15333
- function Vb(e) {
15334
- return Bb[e.value] || {
15363
+ function Gb(e) {
15364
+ return Wb[e.value] || {
15335
15365
  left: null,
15336
15366
  right: null
15337
15367
  };
15338
15368
  }
15339
- var Hb = { "(": {
15369
+ var Kb = { "(": {
15340
15370
  left: 14,
15341
15371
  right: null
15342
15372
  } };
15343
- function Ub(e) {
15344
- return Hb[e.value] || {
15373
+ function qb(e) {
15374
+ return Kb[e.value] || {
15345
15375
  left: null,
15346
15376
  right: null
15347
15377
  };
15348
15378
  }
15349
15379
  //#endregion
15350
15380
  //#region src/compiler/queries/pipeline/parse.ts
15351
- function Wb(e) {
15381
+ function Jb(e) {
15352
15382
  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 }) => ({
15383
+ return new Lb(t ?? "", e).lex().chain((n) => new Vb(t ?? "", n, this.nodeIdGenerator, e).parse()).map(({ ast: t, tokens: n }) => ({
15354
15384
  ast: t,
15355
15385
  tokens: n,
15356
15386
  path: e
15357
15387
  }));
15358
15388
  }
15359
- function Gb() {
15360
- let e = wg(this, this.layout.getEntrypoints()), t = /* @__PURE__ */ new Map();
15389
+ function Yb() {
15390
+ let e = Og(this, this.layout.getEntrypoints()), t = /* @__PURE__ */ new Map();
15361
15391
  for (let n of e) {
15362
15392
  let e = this.parseFile(n);
15363
15393
  t.set(n.absolute, e);
@@ -15366,17 +15396,17 @@ function Gb() {
15366
15396
  }
15367
15397
  //#endregion
15368
15398
  //#region src/compiler/queries/symbol/lookupMembers.ts
15369
- function Kb(e) {
15399
+ function Xb(e) {
15370
15400
  let n = this.symbolMembers(e).getFiltered(t), r = /* @__PURE__ */ new Map();
15371
15401
  if (n) for (let e of n) {
15372
- let t = e instanceof Lp ? Xh.visibleName(this, e)?.at(-1) : e.name;
15402
+ let t = e instanceof Lp ? eg.visibleName(this, e)?.at(-1) : e.name;
15373
15403
  if (t === void 0) continue;
15374
15404
  let n = r.get(t);
15375
15405
  n || (n = [], r.set(t, n)), n.push(e);
15376
15406
  }
15377
15407
  return r;
15378
15408
  }
15379
- function qb(e, n, r) {
15409
+ function Zb(e, n, r) {
15380
15410
  let i;
15381
15411
  if (e instanceof vp) i = e;
15382
15412
  else {
@@ -15389,13 +15419,13 @@ function qb(e, n, r) {
15389
15419
  }
15390
15420
  //#endregion
15391
15421
  //#region src/compiler/queries/symbol/symbolAliases.ts
15392
- function Jb(e) {
15422
+ function Qb(e) {
15393
15423
  let t = e.originalSymbol;
15394
- return Tg(this).map((n) => n.filter((n) => n instanceof Ip && n.originalSymbol === t && n !== e));
15424
+ return kg(this).map((n) => n.filter((n) => n instanceof Ip && n.originalSymbol === t && n !== e));
15395
15425
  }
15396
15426
  //#endregion
15397
15427
  //#region src/compiler/queries/resolutionIndex.ts
15398
- function Yb() {
15428
+ function $b() {
15399
15429
  let e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = this.parseProject();
15400
15430
  this.bindProject();
15401
15431
  let i = /* @__PURE__ */ new Set(), a = (t, n) => {
@@ -15458,32 +15488,32 @@ function Yb() {
15458
15488
  parents: s
15459
15489
  };
15460
15490
  }
15461
- function Xb(e) {
15491
+ function ex(e) {
15462
15492
  return this.resolutionIndex().parents.get(e.intern()) ?? [];
15463
15493
  }
15464
- function Zb(e) {
15494
+ function tx(e) {
15465
15495
  return this.resolutionIndex().references.get(e.intern()) ?? [];
15466
15496
  }
15467
- function Qb(e) {
15497
+ function nx(e) {
15468
15498
  return this.resolutionIndex().metadata.get(e.intern()) ?? [];
15469
15499
  }
15470
15500
  //#endregion
15471
15501
  //#region src/compiler/queries/symbol/symbolUses.ts
15472
- function $b(e) {
15502
+ function rx(e) {
15473
15503
  let t = e.originalSymbol;
15474
- return Tg(this).map((n) => n.filter((n) => n instanceof Lp && n.originalSymbol === t && n !== e));
15504
+ return kg(this).map((n) => n.filter((n) => n instanceof Lp && n.originalSymbol === t && n !== e));
15475
15505
  }
15476
15506
  //#endregion
15477
15507
  //#region src/compiler/queries/transform/applyTextEdits.ts
15478
- function ex(e, t, n = !1) {
15508
+ function ix(e, t, n = !1) {
15479
15509
  let r = n ? t : [...t].sort((e, t) => t.start - e.start), i = e;
15480
15510
  for (let { start: e, end: t, newText: n } of r) i = i.substring(0, e) + n + i.substring(t);
15481
15511
  return i;
15482
15512
  }
15483
15513
  //#endregion
15484
15514
  //#region src/core/utils/setting.ts
15485
- function tx(e, t) {
15486
- let n = ax(e);
15515
+ function ax(e, t) {
15516
+ let n = lx(e);
15487
15517
  if (n) {
15488
15518
  let e = n.elementList ?? [], r = e.findIndex((e) => e instanceof B ? qf(e)?.toLowerCase() === t.toLowerCase() : !1);
15489
15519
  if (r !== -1) return {
@@ -15494,15 +15524,15 @@ function tx(e, t) {
15494
15524
  };
15495
15525
  }
15496
15526
  if (e instanceof z) {
15497
- let n = ox(e, t);
15527
+ let n = ux(e, t);
15498
15528
  if (n) return {
15499
15529
  kind: "body",
15500
15530
  declaration: n
15501
15531
  };
15502
15532
  }
15503
15533
  }
15504
- function nx(e, t) {
15505
- let n = ax(e);
15534
+ function ox(e, t) {
15535
+ let n = lx(e);
15506
15536
  if (n) {
15507
15537
  let e = n.end - 1;
15508
15538
  return {
@@ -15525,9 +15555,9 @@ function nx(e, t) {
15525
15555
  newText: ` [${t}]`
15526
15556
  };
15527
15557
  }
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);
15558
+ function sx(e, t, n, r) {
15559
+ if (n === null) return cx(e, t, r);
15560
+ let i = n === void 0 ? t : `${t}: ${n}`, a = ax(e, t);
15531
15561
  if (a) {
15532
15562
  let e = a.kind === "attribute" ? a.settingNode : a.declaration;
15533
15563
  return {
@@ -15536,10 +15566,10 @@ function rx(e, t, n, r) {
15536
15566
  newText: i
15537
15567
  };
15538
15568
  }
15539
- return nx(e, i);
15569
+ return ox(e, i);
15540
15570
  }
15541
- function ix(e, t, n) {
15542
- let r = tx(e, t);
15571
+ function cx(e, t, n) {
15572
+ let r = ax(e, t);
15543
15573
  if (!r) return;
15544
15574
  if (r.kind === "body") return {
15545
15575
  start: r.declaration.start,
@@ -15571,7 +15601,7 @@ function ix(e, t, n) {
15571
15601
  newText: ""
15572
15602
  };
15573
15603
  }
15574
- function ax(e) {
15604
+ function lx(e) {
15575
15605
  if (e instanceof U) return e.args.find((e) => e instanceof G);
15576
15606
  if (e instanceof z) {
15577
15607
  if (e.attributeList) return e.attributeList;
@@ -15579,7 +15609,7 @@ function ax(e) {
15579
15609
  if (t instanceof U) return t.args.find((e) => e instanceof G);
15580
15610
  }
15581
15611
  }
15582
- function ox(e, t) {
15612
+ function ux(e, t) {
15583
15613
  let n = e.body;
15584
15614
  if (!(!n || uf(e) || n instanceof U)) {
15585
15615
  for (let e of n.body) if (e instanceof z && e.type?.value?.toLowerCase() === t.toLowerCase()) return e;
@@ -15587,17 +15617,17 @@ function ox(e, t) {
15587
15617
  }
15588
15618
  //#endregion
15589
15619
  //#region src/compiler/queries/transform/utils/ref.ts
15590
- function sx(e, n, r) {
15620
+ function dx(e, n, r) {
15591
15621
  let a = e.parseFile(n).getValue().ast, o = e.nodeSymbol(a).getFiltered(t);
15592
15622
  if (!o) return;
15593
15623
  let s = e.getSource(n) ?? "";
15594
- for (let t of e.symbolMetadata(o)) if (t instanceof sm && lx(e, t, r)) {
15624
+ for (let t of e.symbolMetadata(o)) if (t instanceof sm && px(e, t, r)) {
15595
15625
  if (t.declaration instanceof B) {
15596
15626
  let n = t.op(e);
15597
15627
  if (!n) continue;
15598
15628
  let r = t.declaration.parentOfKind(U);
15599
15629
  if (!r) continue;
15600
- let a = ix(r, i.Ref, s);
15630
+ let a = cx(r, i.Ref, s);
15601
15631
  if (!a) continue;
15602
15632
  return {
15603
15633
  kind: "inline",
@@ -15615,38 +15645,38 @@ function sx(e, n, r) {
15615
15645
  }
15616
15646
  }
15617
15647
  }
15618
- function cx(e, t, n) {
15648
+ function fx(e, t, n) {
15619
15649
  if (!e?.name || e.name !== n.tableName) return !1;
15620
15650
  let r = n.fieldNames ?? [];
15621
15651
  return r.length === 0 ? !0 : t.length === r.length ? t.every((e, t) => e.name === r[t]) : !1;
15622
15652
  }
15623
- function lx(e, t, n) {
15653
+ function px(e, t, n) {
15624
15654
  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);
15655
+ return fx(r, i, s) && fx(a, o, c) || fx(r, i, c) && fx(a, o, s);
15626
15656
  }
15627
15657
  //#endregion
15628
15658
  //#region src/compiler/queries/transform/utils/index.ts
15629
- function ux(e) {
15659
+ function mx(e) {
15630
15660
  return e && e.length > 0 ? e : y;
15631
15661
  }
15632
- function dx(e, t) {
15633
- if (ux(e.schemaName) !== ux(t.schemaName) || e.tableName !== t.tableName) return !1;
15662
+ function hx(e, t) {
15663
+ if (mx(e.schemaName) !== mx(t.schemaName) || e.tableName !== t.tableName) return !1;
15634
15664
  let n = e.fieldNames ?? [], r = t.fieldNames ?? [];
15635
15665
  return n.length === r.length ? n.every((e, t) => e === r[t]) : !1;
15636
15666
  }
15637
- function fx(e, t) {
15638
- if (ux(e.schemaName) !== ux(t.schemaName) || e.tableName !== t.tableName) return !1;
15667
+ function gx(e, t) {
15668
+ if (mx(e.schemaName) !== mx(t.schemaName) || e.tableName !== t.tableName) return !1;
15639
15669
  let n = t.fieldNames ?? [];
15640
15670
  if (n.length === 0) return !0;
15641
15671
  let r = e.fieldNames ?? [];
15642
15672
  return r.length === n.length ? r.every((e, t) => e === n[t]) : !1;
15643
15673
  }
15644
- function px(e) {
15674
+ function _x(e) {
15645
15675
  if (typeof e != "string") return {
15646
15676
  schema: e.schema ?? "public",
15647
15677
  table: e.table
15648
15678
  };
15649
- let t = Cg(e);
15679
+ let t = Dg(e);
15650
15680
  if (t.length === 0) return {
15651
15681
  schema: y,
15652
15682
  table: ""
@@ -15665,34 +15695,34 @@ function px(e) {
15665
15695
  table: n
15666
15696
  };
15667
15697
  }
15668
- function mx(e, n, r, i, a = I.Table) {
15698
+ function vx(e, n, r, i, a = I.Table) {
15669
15699
  let o = e.parseFile(n).getValue().ast, s = e.nodeSymbol(o).getFiltered(t);
15670
15700
  if (!s) return;
15671
15701
  if (r === "public") return e.lookupMembers(s, a, i) ?? void 0;
15672
15702
  let c = e.lookupMembers(s, I.Schema, r);
15673
15703
  if (c) return e.lookupMembers(c, a, i) ?? void 0;
15674
15704
  }
15675
- function hx(e) {
15705
+ function yx(e) {
15676
15706
  return e.startsWith("\"") && e.endsWith("\"") && e.length >= 2 ? e.slice(1, -1) : e;
15677
15707
  }
15678
- function gx(e) {
15708
+ function bx(e) {
15679
15709
  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));
15710
+ e.schemaName && e.schemaName !== "public" && t.push(Sg(e.schemaName)), t.push(Sg(e.tableName));
15711
+ for (let n of e.fieldNames ?? []) t.push(Sg(n));
15682
15712
  return t.join(".");
15683
15713
  }
15684
- function _x(e, t) {
15714
+ function xx(e, t) {
15685
15715
  return t === void 0 ? e : t === null ? "" : `${e}: ${t}`;
15686
15716
  }
15687
15717
  //#endregion
15688
15718
  //#region src/compiler/queries/transform/renameTable.ts
15689
- function vx(e, t) {
15719
+ function Sx(e, t) {
15690
15720
  if (!e || !(e instanceof z)) return !1;
15691
15721
  let n = e.name;
15692
15722
  return n ? t.substring(n.start, n.end).includes("\"") : !1;
15693
15723
  }
15694
- function yx(e, t, n) {
15695
- let r = !_g(t), i = !_g(e), a = n || r, o = n || i;
15724
+ function Cx(e, t, n) {
15725
+ let r = !xg(t), i = !xg(e), a = n || r, o = n || i;
15696
15726
  return {
15697
15727
  schema: e,
15698
15728
  table: t,
@@ -15702,10 +15732,10 @@ function yx(e, t, n) {
15702
15732
  shouldQuoteTable: a
15703
15733
  };
15704
15734
  }
15705
- function bx(e, t, n, r, i, a) {
15706
- return n === i && r === a ? !1 : mx(e, t, i, a) !== void 0;
15735
+ function wx(e, t, n, r, i, a) {
15736
+ return n === i && r === a ? !1 : vx(e, t, i, a) !== void 0;
15707
15737
  }
15708
- function xx(e, t, n) {
15738
+ function Tx(e, t, n) {
15709
15739
  let r = e.start - 1;
15710
15740
  for (; r >= 0 && /\s/.test(n[r]);) r--;
15711
15741
  if (r < 0 || n[r] !== ".") return null;
@@ -15720,19 +15750,19 @@ function xx(e, t, n) {
15720
15750
  for (a = r + 1; r >= 0 && /[a-zA-Z0-9_]/.test(n[r]);) r--;
15721
15751
  i = r + 1;
15722
15752
  }
15723
- return hx(n.substring(i, a)) === t ? {
15753
+ return yx(n.substring(i, a)) === t ? {
15724
15754
  start: i,
15725
15755
  end: e.end
15726
15756
  } : null;
15727
15757
  }
15728
- function Sx(e) {
15758
+ function Ex(e) {
15729
15759
  return e.schema === "public" ? e.formattedTable : `${e.formattedSchema}.${e.formattedTable}`;
15730
15760
  }
15731
- function Cx(e, t, n, r, i) {
15732
- let a = [], o = /* @__PURE__ */ new Set(), s = Sx(r);
15761
+ function Dx(e, t, n, r, i) {
15762
+ let a = [], o = /* @__PURE__ */ new Set(), s = Ex(r);
15733
15763
  for (let r of e) {
15734
- if (hx(i.substring(r.start, r.end)) !== n) continue;
15735
- let e = xx(r, t, i) ?? {
15764
+ if (yx(i.substring(r.start, r.end)) !== n) continue;
15765
+ let e = Tx(r, t, i) ?? {
15736
15766
  start: r.start,
15737
15767
  end: r.end
15738
15768
  }, c = `${e.start}-${e.end}`;
@@ -15744,19 +15774,19 @@ function Cx(e, t, n, r, i) {
15744
15774
  }
15745
15775
  return a;
15746
15776
  }
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();
15777
+ function Ox(e, n, r) {
15778
+ 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);
15779
+ if (!u || u instanceof Ip || wx(this, e, o, s, c, l)) return /* @__PURE__ */ new Map();
15750
15780
  if (u instanceof Lp && u.useSpecifierDeclaration instanceof Hp && u.useSpecifierDeclaration.alias) {
15751
15781
  let n = u.useSpecifierDeclaration;
15752
- if (this.nodeAlias(n).getFiltered(t) === s) return Tx(this, e, n, u, c, l);
15782
+ if (this.nodeAlias(n).getFiltered(t) === s) return kx(this, e, n, u, c, l);
15753
15783
  }
15754
- return Ex(this, u, o, s, c, l);
15784
+ return Ax(this, u, o, s, c, l);
15755
15785
  }
15756
- function Tx(e, t, n, r, i, a) {
15786
+ function kx(e, t, n, r, i, a) {
15757
15787
  let o = e.getSource(t) ?? "";
15758
15788
  if (!n.alias) return /* @__PURE__ */ new Map();
15759
- let s = yx(i, a, o.substring(n.alias.start, n.alias.end).includes("\"")), c = [];
15789
+ let s = Cx(i, a, o.substring(n.alias.start, n.alias.end).includes("\"")), c = [];
15760
15790
  c.push({
15761
15791
  start: n.alias.start,
15762
15792
  end: n.alias.end,
@@ -15768,14 +15798,14 @@ function Tx(e, t, n, r, i, a) {
15768
15798
  end: e.end,
15769
15799
  newText: s.formattedTable
15770
15800
  });
15771
- return new Map([[t.absolute, ex(o, c)]]);
15801
+ return new Map([[t.absolute, ix(o, c)]]);
15772
15802
  }
15773
- function Ex(e, t, n, r, i, a) {
15803
+ function Ax(e, t, n, r, i, a) {
15774
15804
  let o = t.originalSymbol, s = o.declaration;
15775
15805
  if (!s || !(s instanceof z)) return /* @__PURE__ */ new Map();
15776
15806
  let c = s.filepath;
15777
15807
  if (!c) return /* @__PURE__ */ new Map();
15778
- let l = yx(i, a, vx(s, e.getSource(c) ?? "")), u = /* @__PURE__ */ new Map(), d = (e, t) => {
15808
+ let l = Cx(i, a, Sx(s, e.getSource(c) ?? "")), u = /* @__PURE__ */ new Map(), d = (e, t) => {
15779
15809
  let n = e.absolute, r = u.get(n);
15780
15810
  r || (r = {
15781
15811
  fp: e,
@@ -15785,46 +15815,46 @@ function Ex(e, t, n, r, i, a) {
15785
15815
  f && d(c, {
15786
15816
  start: f.start,
15787
15817
  end: f.end,
15788
- newText: Sx(l)
15818
+ newText: Ex(l)
15789
15819
  });
15790
15820
  let p = e.symbolReferences(o);
15791
15821
  for (let t of p) {
15792
15822
  if (t === f) continue;
15793
15823
  let i = t.filepath, a = e.getSource(i) ?? "";
15794
- for (let e of Cx([t], n, r, l, a)) d(i, e);
15824
+ for (let e of Dx([t], n, r, l, a)) d(i, e);
15795
15825
  }
15796
15826
  let m = /* @__PURE__ */ new Map();
15797
15827
  for (let { fp: t, edits: n } of u.values()) {
15798
15828
  let r = e.getSource(t) ?? "";
15799
- m.set(t.absolute, ex(r, n));
15829
+ m.set(t.absolute, ix(r, n));
15800
15830
  }
15801
15831
  return m;
15802
15832
  }
15803
15833
  //#endregion
15804
15834
  //#region src/core/utils/note.ts
15805
- function Dx(e, t) {
15806
- let n = Ax(e);
15835
+ function jx(e, t) {
15836
+ let n = Px(e);
15807
15837
  if (n) return {
15808
15838
  start: n.noteValueStart,
15809
15839
  end: n.noteValueEnd,
15810
- newText: Eg(t)
15840
+ newText: Ag(t)
15811
15841
  };
15812
15842
  }
15813
- function Ox(e) {
15814
- let t = Ax(e);
15843
+ function Mx(e) {
15844
+ let t = Px(e);
15815
15845
  if (t) return {
15816
15846
  start: t.fullNoteStart,
15817
15847
  end: t.fullNoteEnd,
15818
15848
  newText: ""
15819
15849
  };
15820
15850
  }
15821
- function kx(e, t) {
15822
- if (Ax(e) || !(e instanceof z)) return;
15823
- let n = jx(e);
15851
+ function Nx(e, t) {
15852
+ if (Px(e) || !(e instanceof z)) return;
15853
+ let n = Fx(e);
15824
15854
  if (n !== void 0) return {
15825
15855
  start: n,
15826
15856
  end: n,
15827
- newText: ` note: ${Eg(t)}\n`
15857
+ newText: ` note: ${Ag(t)}\n`
15828
15858
  };
15829
15859
  let r = e.body;
15830
15860
  if (r instanceof U) {
@@ -15834,22 +15864,22 @@ function kx(e, t) {
15834
15864
  return {
15835
15865
  start: n.listCloseBracket.start,
15836
15866
  end: n.listCloseBracket.start,
15837
- newText: `${e}note: ${Eg(t)}`
15867
+ newText: `${e}note: ${Ag(t)}`
15838
15868
  };
15839
15869
  }
15840
15870
  return {
15841
15871
  start: e.end,
15842
15872
  end: e.end,
15843
- newText: ` [note: ${Eg(t)}]`
15873
+ newText: ` [note: ${Ag(t)}]`
15844
15874
  };
15845
15875
  }
15846
15876
  }
15847
- function Ax(e) {
15877
+ function Px(e) {
15848
15878
  if (!(e instanceof z)) return;
15849
15879
  let t = e.body;
15850
15880
  if (t && !(t instanceof U)) for (let e of t.body) {
15851
15881
  if (!(e instanceof z) || !e.isKind(r.Note)) continue;
15852
- let t = Mx(e);
15882
+ let t = Ix(e);
15853
15883
  if (t) return {
15854
15884
  kind: Bp.ELEMENT_DECLARATION,
15855
15885
  noteValueStart: t.start,
@@ -15859,18 +15889,18 @@ function Ax(e) {
15859
15889
  };
15860
15890
  }
15861
15891
  let n = e.attributeList ?? (t instanceof U ? t.args.find((e) => e instanceof G) : void 0);
15862
- if (n) return Nx(n);
15892
+ if (n) return Lx(n);
15863
15893
  }
15864
- function jx(e) {
15894
+ function Fx(e) {
15865
15895
  let t = e.body;
15866
15896
  if (!(!t || t instanceof U) && t.blockCloseBrace) return t.blockCloseBrace.start;
15867
15897
  }
15868
- function Mx(e) {
15898
+ function Ix(e) {
15869
15899
  let t = e.body;
15870
15900
  if (t instanceof U) return t.callee ?? void 0;
15871
15901
  if (t instanceof W && t.body[0] instanceof U) return t.body[0].callee ?? void 0;
15872
15902
  }
15873
- function Nx(e) {
15903
+ function Lx(e) {
15874
15904
  let t = E(e).getValue()[i.Note];
15875
15905
  if (!t?.length) return;
15876
15906
  let n = t[0];
@@ -15886,36 +15916,36 @@ function Nx(e) {
15886
15916
  }
15887
15917
  //#endregion
15888
15918
  //#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));
15919
+ function Rx(e, t, n) {
15920
+ let r = this.getSource(e) ?? "", i = this.parseFile(e).getValue().ast, a = n ?? Vx(i), o = Hx(r, i), s = [];
15921
+ for (let e of t) s.push(...Yx(r, e, a, o));
15892
15922
  return s.sort((e, t) => t.start - e.start), {
15893
- newDbml: ex(r, s, !0),
15923
+ newDbml: ix(r, s, !0),
15894
15924
  edits: s
15895
15925
  };
15896
15926
  }
15897
- function Fx(e) {
15898
- let t = new Nb(e, To).lex();
15927
+ function zx(e) {
15928
+ let t = new Lb(e, To).lex();
15899
15929
  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);
15930
+ let n = new Vb(e, t.getValue(), new zp(), To).parse();
15931
+ return n.getErrors().length > 0 ? [] : Vx(n.getValue().ast);
15902
15932
  }
15903
- function Ix(e, t) {
15904
- return `Dep [color: ${t}] {\n ${gx(e.upstream)} -> ${gx(e.downstream)}\n}`;
15933
+ function Bx(e, t) {
15934
+ return `Dep [color: ${t}] {\n ${bx(e.upstream)} -> ${bx(e.downstream)}\n}`;
15905
15935
  }
15906
- function Lx(e) {
15936
+ function Vx(e) {
15907
15937
  let t = [];
15908
15938
  for (let n of e.declarations) {
15909
15939
  if (!(n instanceof z) || !n.isKind(r.Dep)) continue;
15910
15940
  let e = [], i = n.body;
15911
15941
  if (i instanceof U) {
15912
15942
  if (i.callee instanceof H) {
15913
- let t = zx(i.callee);
15943
+ let t = Ux(i.callee);
15914
15944
  t && e.push(t);
15915
15945
  }
15916
15946
  } else if (i) {
15917
15947
  for (let t of i.body) if (t instanceof U && t.callee instanceof H) {
15918
- let n = zx(t.callee);
15948
+ let n = Ux(t.callee);
15919
15949
  n && e.push(n);
15920
15950
  }
15921
15951
  }
@@ -15928,7 +15958,7 @@ function Lx(e) {
15928
15958
  }
15929
15959
  return t;
15930
15960
  }
15931
- function Rx(e, t) {
15961
+ function Hx(e, t) {
15932
15962
  let n = [];
15933
15963
  for (let a of t.declarations) {
15934
15964
  if (!(a instanceof z) || !a.isKind(r.Table)) continue;
@@ -15943,8 +15973,8 @@ function Rx(e, t) {
15943
15973
  schemaName: s,
15944
15974
  tableName: o,
15945
15975
  fieldNames: [r]
15946
- }, c = ix(t, i.Dep, e);
15947
- if (c) for (let e of Vx(t, a)) n.push({
15976
+ }, c = cx(t, i.Dep, e);
15977
+ if (c) for (let e of Gx(t, a)) n.push({
15948
15978
  edge: e,
15949
15979
  fullStart: c.start,
15950
15980
  fullEnd: c.end
@@ -15953,20 +15983,20 @@ function Rx(e, t) {
15953
15983
  }
15954
15984
  return n;
15955
15985
  }
15956
- function zx(e) {
15986
+ function Ux(e) {
15957
15987
  let t = e.op?.value;
15958
15988
  if (t !== "->" && t !== "<-") return;
15959
15989
  let n = e.leftExpression, r = e.rightExpression;
15960
15990
  if (!n || !r) return;
15961
15991
  let i = t === "<-" ? r : n, a = t === "<-" ? n : r, o = M(i), s = M(a);
15962
15992
  if (!o || !s) return;
15963
- let c = o.length > 1 && s.length > 1, l = Bx(o, c), u = Bx(s, c);
15993
+ let c = o.length > 1 && s.length > 1, l = Wx(o, c), u = Wx(s, c);
15964
15994
  if (!(!l || !u)) return {
15965
15995
  upstream: l,
15966
15996
  downstream: u
15967
15997
  };
15968
15998
  }
15969
- function Bx(e, t) {
15999
+ function Wx(e, t) {
15970
16000
  if (e.length === 0) return;
15971
16001
  if (!t) {
15972
16002
  let t = e[e.length - 1];
@@ -15983,7 +16013,7 @@ function Bx(e, t) {
15983
16013
  fieldNames: n
15984
16014
  };
15985
16015
  }
15986
- function Vx(e, t) {
16016
+ function Gx(e, t) {
15987
16017
  let n = e.args.find((e) => e instanceof G);
15988
16018
  if (!n) return [];
15989
16019
  let r = [];
@@ -15995,7 +16025,7 @@ function Vx(e, t) {
15995
16025
  if (a !== "->" && a !== "<-") continue;
15996
16026
  let o = M(n.expression);
15997
16027
  if (!o) continue;
15998
- let s = Bx(o, o.length > 1);
16028
+ let s = Wx(o, o.length > 1);
15999
16029
  s && r.push(a === "->" ? {
16000
16030
  upstream: t,
16001
16031
  downstream: s
@@ -16006,25 +16036,25 @@ function Vx(e, t) {
16006
16036
  }
16007
16037
  return r;
16008
16038
  }
16009
- function Hx(e, t) {
16010
- return dx(e.upstream, t.upstream) && dx(e.downstream, t.downstream);
16039
+ function Kx(e, t) {
16040
+ return hx(e.upstream, t.upstream) && hx(e.downstream, t.downstream);
16011
16041
  }
16012
- function Ux(e, t) {
16013
- return e.edges.some((e) => Hx(e, t));
16042
+ function qx(e, t) {
16043
+ return e.edges.some((e) => Kx(e, t));
16014
16044
  }
16015
- function Wx(e, t) {
16016
- return e.find((e) => Ux(e, t));
16045
+ function Jx(e, t) {
16046
+ return e.find((e) => qx(e, t));
16017
16047
  }
16018
- function Gx(e, t, n, r) {
16048
+ function Yx(e, t, n, r) {
16019
16049
  switch (t.operation) {
16020
- case "create": return qx(e, t, n, r);
16050
+ case "create": return Zx(e, t, n, r);
16021
16051
  case "update": {
16022
- let r = Wx(n, t.edge);
16023
- return r ? Kx(t, r, e) : [];
16052
+ let r = Jx(n, t.edge);
16053
+ return r ? Xx(t, r, e) : [];
16024
16054
  }
16025
16055
  case "remove": {
16026
- let r = Wx(n, t.edge);
16027
- return r ? Kx({
16056
+ let r = Jx(n, t.edge);
16057
+ return r ? Xx({
16028
16058
  ...t,
16029
16059
  color: void 0,
16030
16060
  note: void 0
@@ -16033,29 +16063,29 @@ function Gx(e, t, n, r) {
16033
16063
  default: return [];
16034
16064
  }
16035
16065
  }
16036
- function Kx(e, t, n) {
16066
+ function Xx(e, t, n) {
16037
16067
  let r = [];
16038
16068
  if (e.color !== void 0) {
16039
- let a = rx(t.declaration, i.Color, e.color, n);
16069
+ let a = sx(t.declaration, i.Color, e.color, n);
16040
16070
  a && r.push(a);
16041
16071
  }
16042
16072
  if (e.note === null) {
16043
- let e = Ox(t.declaration);
16073
+ let e = Mx(t.declaration);
16044
16074
  e && r.push(e);
16045
16075
  } else if (e.note !== void 0) {
16046
- let n = Dx(t.declaration, e.note) ?? kx(t.declaration, e.note);
16076
+ let n = jx(t.declaration, e.note) ?? Nx(t.declaration, e.note);
16047
16077
  n && r.push(n);
16048
16078
  }
16049
16079
  return r;
16050
16080
  }
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 = {
16081
+ function Zx(e, t, n, r) {
16082
+ let i = Jx(n, t.edge);
16083
+ if (i) return Xx(t, i, e);
16084
+ let a = Bx(t.edge, t.color ?? ""), o = {
16055
16085
  start: e.length,
16056
16086
  end: e.length,
16057
16087
  newText: "\n\n" + a + "\n"
16058
- }, s = r.find((e) => Hx(e.edge, t.edge));
16088
+ }, s = r.find((e) => Kx(e.edge, t.edge));
16059
16089
  return s ? [{
16060
16090
  start: s.fullStart,
16061
16091
  end: s.fullEnd,
@@ -16064,40 +16094,40 @@ function qx(e, t, n, r) {
16064
16094
  }
16065
16095
  //#endregion
16066
16096
  //#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);
16097
+ function Qx(e, t, n, r) {
16098
+ if (t.kind === "dep") return tS(this, e, t, n, r);
16099
+ if (t.kind === "ref") return nS(this, e, t, n, r);
16100
+ let i = eS(this, e, t);
16071
16101
  if (!i) return [];
16072
- let a = rx(i, n, r, this.getSource(e) ?? "");
16102
+ let a = sx(i, n, r, this.getSource(e) ?? "");
16073
16103
  return a ? [a] : [];
16074
16104
  }
16075
- function Yx(e, t, n, r) {
16105
+ function $x(e, t, n, r) {
16076
16106
  let i = this.getSource(e) ?? "", a = this.updateElementSettingEdit(e, t, n, r);
16077
- return a.length === 0 ? i : ex(i, a);
16107
+ return a.length === 0 ? i : ix(i, a);
16078
16108
  }
16079
- function Xx(e, t, n) {
16109
+ function eS(e, t, n) {
16080
16110
  let r = ("schema" in n ? n.schema : void 0) ?? "public";
16081
16111
  switch (n.kind) {
16082
16112
  case I.Column: {
16083
- let i = mx(e, t, r, n.table, I.Table);
16113
+ let i = vx(e, t, r, n.table, I.Table);
16084
16114
  return i ? e.lookupMembers(i, I.Column, n.column)?.declaration : void 0;
16085
16115
  }
16086
- case I.Table: return mx(e, t, r, n.table)?.declaration;
16116
+ case I.Table: return vx(e, t, r, n.table)?.declaration;
16087
16117
  case I.Enum:
16088
16118
  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;
16119
+ case I.TableGroup: return vx(e, t, r, n.name, n.kind)?.declaration;
16120
+ case I.Schema: return vx(e, t, n.schema, "", I.Schema)?.declaration;
16091
16121
  default: return;
16092
16122
  }
16093
16123
  }
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)));
16124
+ function tS(e, t, n, r, i) {
16125
+ 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
16126
  if (!s) {
16097
16127
  if (i === null) return [];
16098
- let e = Rx(a, o).find((e) => fx(e.edge.upstream, n.upstream) && fx(e.edge.downstream, n.downstream));
16128
+ let e = Hx(a, o).find((e) => gx(e.edge.upstream, n.upstream) && gx(e.edge.downstream, n.downstream));
16099
16129
  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}`;
16130
+ 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
16131
  return [{
16102
16132
  start: e.fullStart,
16103
16133
  end: e.fullEnd,
@@ -16110,20 +16140,20 @@ function Zx(e, t, n, r, i) {
16110
16140
  }
16111
16141
  let { declaration: c } = s, { body: l } = c;
16112
16142
  if (l instanceof U) {
16113
- let e = rx(c, r, i, a);
16143
+ let e = sx(c, r, i, a);
16114
16144
  if (e) return [e];
16115
- let t = rx(l, r, i, a);
16145
+ let t = sx(l, r, i, a);
16116
16146
  return t ? [t] : [];
16117
16147
  }
16118
- let u = rx(c, r, i, a);
16148
+ let u = sx(c, r, i, a);
16119
16149
  return u ? [u] : [];
16120
16150
  }
16121
- function Qx(e, t, n, r, i) {
16122
- let a = e.getSource(t) ?? "", o = sx(e, t, n);
16151
+ function nS(e, t, n, r, i) {
16152
+ let a = e.getSource(t) ?? "", o = dx(e, t, n);
16123
16153
  if (!o) return [];
16124
16154
  if (o.kind === "inline") {
16125
16155
  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}`;
16156
+ 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
16157
  return [{
16128
16158
  start: o.fullStart,
16129
16159
  end: o.fullEnd,
@@ -16134,15 +16164,15 @@ function Qx(e, t, n, r, i) {
16134
16164
  newText: "\n\n" + c + "\n"
16135
16165
  }];
16136
16166
  }
16137
- let s = rx(o.node, r, i, a);
16167
+ let s = sx(o.node, r, i, a);
16138
16168
  return s ? [s] : [];
16139
16169
  }
16140
16170
  //#endregion
16141
16171
  //#region src/compiler/queries/transform/syncDiagramView.ts
16142
- function $x(e) {
16143
- let t = [], n = new Nb(e, To).lex();
16172
+ function rS(e) {
16173
+ let t = [], n = new Lb(e, To).lex();
16144
16174
  if (n.getErrors().length > 0) return t;
16145
- let i = new Lb(e, n.getValue(), new zp(), To).parse();
16175
+ let i = new Vb(e, n.getValue(), new zp(), To).parse();
16146
16176
  if (i.getErrors().length > 0) return t;
16147
16177
  let a = i.getValue().ast;
16148
16178
  for (let e of a.declarations) if (e.isKind(r.DiagramView)) {
@@ -16155,66 +16185,66 @@ function $x(e) {
16155
16185
  }
16156
16186
  return t;
16157
16187
  }
16158
- function eS(e, t, n) {
16188
+ function iS(e, t, n) {
16159
16189
  e.push(` ${t} {`), n.forEach((t) => e.push(` ${t}`)), e.push(" }");
16160
16190
  }
16161
- function tS(e, t) {
16191
+ function aS(e, t) {
16162
16192
  e.push(` ${t} { * }`);
16163
16193
  }
16164
- function nS(e) {
16194
+ function oS(e) {
16165
16195
  return e == null ? "null" : e.length === 0 ? "empty" : "items";
16166
16196
  }
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}`;
16197
+ function sS(e, t) {
16198
+ let n = `DiagramView ${Sg(e)} {`, r = (e) => Sg(e.name), i = t?.tables?.map((e) => {
16199
+ let t = Sg(e.name);
16200
+ return e.schemaName === "public" ? t : `${Sg(e.schemaName)}.${t}`;
16171
16201
  }) ?? [], a = t?.tableGroups?.map(r) ?? [], o = t?.schemas?.map(r) ?? [], s = t?.stickyNotes?.map(r) ?? [];
16172
16202
  if (!t) return `${n}\n}`;
16173
16203
  let c = {
16174
- tables: nS(t.tables),
16175
- tableGroups: nS(t.tableGroups),
16176
- schemas: nS(t.schemas),
16177
- stickyNotes: nS(t.stickyNotes)
16204
+ tables: oS(t.tables),
16205
+ tableGroups: oS(t.tableGroups),
16206
+ schemas: oS(t.schemas),
16207
+ stickyNotes: oS(t.stickyNotes)
16178
16208
  };
16179
16209
  if (Object.values(c).every((e) => e === "null")) return `${n}\n}`;
16180
16210
  if (Object.values(c).every((e) => e === "empty")) return `${n}\n *\n}`;
16181
16211
  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");
16212
+ 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
16213
  }
16184
- function iS(e, t, n) {
16185
- let r = this.getSource(e) ?? "", i = n ?? $x(r), a = [];
16214
+ function cS(e, t, n) {
16215
+ let r = this.getSource(e) ?? "", i = n ?? rS(r), a = [];
16186
16216
  for (let e of t) {
16187
- let t = aS(r, e, i);
16217
+ let t = lS(r, e, i);
16188
16218
  a.push(...t);
16189
16219
  }
16190
16220
  return a.sort((e, t) => t.start - e.start), {
16191
- newDbml: ex(r, a, !0),
16221
+ newDbml: ix(r, a, !0),
16192
16222
  edits: a
16193
16223
  };
16194
16224
  }
16195
- function aS(e, t, n) {
16225
+ function lS(e, t, n) {
16196
16226
  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);
16227
+ case "create": return uS(e, t, n);
16228
+ case "update": return dS(e, t, n);
16229
+ case "delete": return fS(e, t, n);
16200
16230
  default: return [];
16201
16231
  }
16202
16232
  }
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";
16233
+ function uS(e, t, n) {
16234
+ if (n.find((e) => e.name === t.name)) return dS(e, t, n);
16235
+ let r = "\n\n" + sS(t.name, t.visibleEntities) + "\n";
16206
16236
  return [{
16207
16237
  start: e.length,
16208
16238
  end: e.length,
16209
16239
  newText: r
16210
16240
  }];
16211
16241
  }
16212
- function sS(e, t, n) {
16242
+ function dS(e, t, n) {
16213
16243
  let r = n.find((e) => e.name === t.name);
16214
16244
  if (!r) return [];
16215
16245
  let i = [];
16216
16246
  if (t.newName || t.visibleEntities) {
16217
- let e = rS(t.newName || t.name, t.visibleEntities);
16247
+ let e = sS(t.newName || t.name, t.visibleEntities);
16218
16248
  i.push({
16219
16249
  start: r.startIndex,
16220
16250
  end: r.endIndex,
@@ -16223,7 +16253,7 @@ function sS(e, t, n) {
16223
16253
  }
16224
16254
  return i;
16225
16255
  }
16226
- function cS(e, t, n) {
16256
+ function fS(e, t, n) {
16227
16257
  let r = n.find((e) => e.name === t.name);
16228
16258
  if (!r) return [];
16229
16259
  let i = r.startIndex, a = r.endIndex;
@@ -16243,25 +16273,25 @@ function cS(e, t, n) {
16243
16273
  }
16244
16274
  //#endregion
16245
16275
  //#region src/compiler/index.ts
16246
- var lS = Symbol("COMPUTING"), uS = class {
16276
+ var pS = Symbol("COMPUTING"), mS = class {
16247
16277
  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)
16278
+ 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 = {
16279
+ invalidStream: this.localQuery(Ab),
16280
+ flatStream: this.localQuery(kb)
16251
16281
  }, this.parse = {
16252
16282
  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)
16283
+ ast: (e = To) => Cb.call(this, e),
16284
+ errors: (e = To) => wb.call(this, e),
16285
+ warnings: (e = To) => Tb.call(this, e),
16286
+ tokens: (e = To) => Eb.call(this, e),
16287
+ rawDb: (e = To) => Db.call(this, e),
16288
+ publicSymbolTable: (e = To) => Ob.call(this, e)
16259
16289
  }, 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)
16290
+ stack: this.localQuery(fb),
16291
+ token: this.localQuery(pb),
16292
+ element: this.localQuery(mb),
16293
+ scope: this.localQuery(hb),
16294
+ scopeKind: this.localQuery(gb)
16265
16295
  };
16266
16296
  }
16267
16297
  getSource(e) {
@@ -16274,7 +16304,7 @@ var lS = Symbol("COMPUTING"), uS = class {
16274
16304
  cleanStaleGlobalCache() {
16275
16305
  let e = this.layout.getEntrypoints(), t = !1;
16276
16306
  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);
16307
+ for (let t of xb(this, e)) this.cleanStaleLocalCache(t);
16278
16308
  t && this.globalCache.clear();
16279
16309
  }
16280
16310
  globalQuery(e) {
@@ -16287,10 +16317,10 @@ var lS = Symbol("COMPUTING"), uS = class {
16287
16317
  r || (r = /* @__PURE__ */ new Map(), this.globalCache.set(t, r));
16288
16318
  let i = n.length === 0 ? "" : n.length === 1 ? bm(n[0]) : n.map((e) => bm(e)).join("\0"), a = r.get(i);
16289
16319
  if (a) {
16290
- if (a === lS) throw Error(`Cycle detected in query: ${e.name}(${i})`);
16320
+ if (a === pS) throw Error(`Cycle detected in query: ${e.name}(${i})`);
16291
16321
  return a;
16292
16322
  }
16293
- r.set(i, lS);
16323
+ r.set(i, pS);
16294
16324
  try {
16295
16325
  let t = e.apply(this, n);
16296
16326
  return r.set(i, t), t;
@@ -16312,10 +16342,10 @@ var lS = Symbol("COMPUTING"), uS = class {
16312
16342
  let c = s.get(t);
16313
16343
  if (c || (c = /* @__PURE__ */ new Map(), s.set(t, c)), c.has(o)) {
16314
16344
  let t = c.get(o);
16315
- if (t === lS) throw Error(`Cycle detected in query: ${e.name}(${a}, ${o})`);
16345
+ if (t === pS) throw Error(`Cycle detected in query: ${e.name}(${a}, ${o})`);
16316
16346
  return t;
16317
16347
  }
16318
- c.set(o, lS);
16348
+ c.set(o, pS);
16319
16349
  try {
16320
16350
  let t = e.apply(this, n);
16321
16351
  return c.set(o, t), t;
@@ -16327,13 +16357,13 @@ var lS = Symbol("COMPUTING"), uS = class {
16327
16357
  initMonacoServices(e) {
16328
16358
  let t = e?.autocompletion?.triggerCharacters ?? [];
16329
16359
  return {
16330
- definitionProvider: new ry(this),
16331
- referenceProvider: new ay(this),
16332
- autocompletionProvider: new My(this, { triggerCharacters: t }),
16333
- diagnosticsProvider: new iy(this)
16360
+ definitionProvider: new sy(this),
16361
+ referenceProvider: new ly(this),
16362
+ autocompletionProvider: new Iy(this, { triggerCharacters: t }),
16363
+ diagnosticsProvider: new cy(this)
16334
16364
  };
16335
16365
  }
16336
- }, dS = class e {
16366
+ }, hS = class e {
16337
16367
  constructor(e = {}) {
16338
16368
  this.files = e instanceof Map ? new Map(e) : new Map(Object.entries(e));
16339
16369
  }
@@ -16377,4 +16407,4 @@ var lS = Symbol("COMPUTING"), uS = class {
16377
16407
  }
16378
16408
  };
16379
16409
  //#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 };
16410
+ 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 };