@opra/common 1.0.0-alpha.32 → 1.0.0-alpha.33

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.
@@ -10,10 +10,10 @@ var __export = (target, all) => {
10
10
  __defProp(target, name, { get: all[name], enumerable: true });
11
11
  };
12
12
 
13
- // ../../build/common/esm/document/index.js
13
+ // src/document/index.ts
14
14
  import "reflect-metadata";
15
15
 
16
- // ../../build/common/esm/helpers/monkey-patches.js
16
+ // src/helpers/monkey-patches.ts
17
17
  if (!BigInt.prototype.toJSON) {
18
18
  BigInt.prototype.toJSON = function() {
19
19
  return this.toString();
@@ -25,10 +25,10 @@ if (!RegExp.prototype.toJSON) {
25
25
  };
26
26
  }
27
27
 
28
- // ../../build/common/esm/helpers/function-utils.js
28
+ // src/helpers/function-utils.ts
29
29
  import promisify from "putil-promisify";
30
30
 
31
- // ../../build/common/esm/helpers/type-guards.js
31
+ // src/helpers/type-guards.ts
32
32
  function isConstructor(fn) {
33
33
  return typeof fn === "function" && fn.prototype && fn.prototype.constructor === fn && fn.prototype.constructor.name !== "Function" && fn.prototype.constructor.name !== "embedded";
34
34
  }
@@ -70,7 +70,7 @@ function isAsyncIterable(x) {
70
70
  }
71
71
  __name(isAsyncIterable, "isAsyncIterable");
72
72
 
73
- // ../../build/common/esm/helpers/function-utils.js
73
+ // src/helpers/function-utils.ts
74
74
  async function resolveThunk(thunk) {
75
75
  thunk = promisify.isPromise(thunk) ? await thunk : thunk;
76
76
  if (typeof thunk === "function") {
@@ -82,7 +82,7 @@ async function resolveThunk(thunk) {
82
82
  }
83
83
  __name(resolveThunk, "resolveThunk");
84
84
 
85
- // ../../build/common/esm/helpers/get-stack-filename.js
85
+ // src/helpers/get-stack-filename.ts
86
86
  var PATH_PATTERN = /^(?:file:\/\/)?(.+)$/;
87
87
  function getStackFileName(position = 1) {
88
88
  if (position >= Error.stackTraceLimit) {
@@ -117,7 +117,7 @@ function getErrorStack(position = 1) {
117
117
  }
118
118
  __name(getErrorStack, "getErrorStack");
119
119
 
120
- // ../../build/common/esm/helpers/mixin-utils.js
120
+ // src/helpers/mixin-utils.ts
121
121
  function mergePrototype(targetProto, baseProto, filter) {
122
122
  for (const k of Object.getOwnPropertyNames(baseProto)) {
123
123
  if (k === "constructor" || k === "__proto__" || k === "toJSON" || k === "toString" || filter && !filter(k)) {
@@ -139,11 +139,11 @@ function inheritPropertyInitializers(target, clazz, isPropertyInherited = (key)
139
139
  }
140
140
  __name(inheritPropertyInitializers, "inheritPropertyInitializers");
141
141
 
142
- // ../../build/common/esm/helpers/object-utils.js
142
+ // src/helpers/object-utils.ts
143
143
  import isPlainObject from "putil-isplainobject";
144
144
  import merge from "putil-merge";
145
145
 
146
- // ../../build/common/esm/document/constants.js
146
+ // src/document/constants.ts
147
147
  var DATATYPE_METADATA = Symbol.for("opra.type.metadata");
148
148
  var HTTP_CONTROLLER_METADATA = Symbol("opra.http-controller.metadata");
149
149
  var DECODER = Symbol.for("opra.type.decoder");
@@ -157,7 +157,7 @@ var kDataTypeMap = Symbol.for("kDataTypeMap");
157
157
  var kCtorMap = Symbol.for("kCtorMap");
158
158
  var kTypeNSMap = Symbol.for("kTypeNSMap");
159
159
 
160
- // ../../build/common/esm/helpers/object-utils.js
160
+ // src/helpers/object-utils.ts
161
161
  function cloneObject(obj, jsonOnly) {
162
162
  return merge({}, obj, {
163
163
  deep: /* @__PURE__ */ __name((v) => isPlainObject(v) && !v[DATATYPE_METADATA], "deep"),
@@ -194,21 +194,19 @@ function omitNullish(obj, recursive) {
194
194
  }
195
195
  __name(omitNullish, "omitNullish");
196
196
 
197
- // ../../build/common/esm/helpers/parse-fields-projection.js
197
+ // src/helpers/parse-fields-projection.ts
198
198
  import { splitString } from "fast-tokenizer";
199
199
  var FIELD_PATTERN = /^([+-])?([a-z_$]\w*)$/i;
200
200
  var NO_DOT_BRACKET_PATTERN = /[^.]\(/g;
201
- var FieldsProjection = class {
202
- static {
203
- __name(this, "FieldsProjection");
204
- }
201
+ var _FieldsProjection = class _FieldsProjection {
205
202
  };
203
+ __name(_FieldsProjection, "FieldsProjection");
204
+ var FieldsProjection = _FieldsProjection;
206
205
  (function(FieldsProjection2) {
207
- class Item {
208
- static {
209
- __name(this, "Item");
210
- }
211
- }
206
+ const _Item = class _Item {
207
+ };
208
+ __name(_Item, "Item");
209
+ let Item = _Item;
212
210
  FieldsProjection2.Item = Item;
213
211
  })(FieldsProjection || (FieldsProjection = {}));
214
212
  function parseFieldsProjection(projection, keepCase) {
@@ -260,7 +258,7 @@ function parse(input, target) {
260
258
  }
261
259
  __name(parse, "parse");
262
260
 
263
- // ../../build/common/esm/helpers/responsive-map.js
261
+ // src/helpers/responsive-map.ts
264
262
  function isMap(v) {
265
263
  return v && typeof v.forEach === "function";
266
264
  }
@@ -270,10 +268,7 @@ var kKeyMap = Symbol.for("kKeyMap");
270
268
  var kWellKnownKeys = Symbol.for("kWellKnownKeys");
271
269
  var kOptions = Symbol.for("kOptions");
272
270
  var kSize = Symbol.for("kSize");
273
- var ResponsiveMap = class {
274
- static {
275
- __name(this, "ResponsiveMap");
276
- }
271
+ var _ResponsiveMap = class _ResponsiveMap {
277
272
  constructor(init, options) {
278
273
  Object.defineProperty(this, kSize, {
279
274
  value: 0,
@@ -295,14 +290,14 @@ var ResponsiveMap = class {
295
290
  enumerable: false,
296
291
  writable: true
297
292
  });
298
- const caseSensitive = !!options?.caseSensitive;
293
+ const caseSensitive = !!(options == null ? void 0 : options.caseSensitive);
299
294
  Object.defineProperty(this, kOptions, {
300
295
  value: {
301
296
  caseSensitive
302
297
  },
303
298
  enumerable: false
304
299
  });
305
- if (options?.wellKnownKeys) {
300
+ if (options == null ? void 0 : options.wellKnownKeys) {
306
301
  options.wellKnownKeys.forEach((k) => {
307
302
  if (caseSensitive)
308
303
  this[kWellKnownKeys][k] = k;
@@ -413,53 +408,55 @@ var ResponsiveMap = class {
413
408
  return key.toLowerCase();
414
409
  }
415
410
  };
411
+ __name(_ResponsiveMap, "ResponsiveMap");
412
+ var ResponsiveMap = _ResponsiveMap;
416
413
 
417
- // ../../build/common/esm/schema/constants.js
414
+ // src/schema/constants.ts
418
415
  var SpecVersion = "1.0";
419
416
 
420
- // ../../build/common/esm/schema/data-type/complex-type.interface.js
417
+ // src/schema/data-type/complex-type.interface.ts
421
418
  var ComplexType;
422
419
  (function(ComplexType3) {
423
420
  ComplexType3.Kind = "ComplexType";
424
421
  })(ComplexType || (ComplexType = {}));
425
422
 
426
- // ../../build/common/esm/schema/data-type/enum-type.interface.js
423
+ // src/schema/data-type/enum-type.interface.ts
427
424
  var EnumType;
428
425
  (function(EnumType3) {
429
426
  EnumType3.Kind = "EnumType";
430
427
  })(EnumType || (EnumType = {}));
431
428
 
432
- // ../../build/common/esm/schema/data-type/mapped-type.interface.js
429
+ // src/schema/data-type/mapped-type.interface.ts
433
430
  var MappedType;
434
431
  (function(MappedType3) {
435
432
  MappedType3.Kind = "MappedType";
436
433
  })(MappedType || (MappedType = {}));
437
434
 
438
- // ../../build/common/esm/schema/data-type/mixin-type.interface.js
435
+ // src/schema/data-type/mixin-type.interface.ts
439
436
  var MixinType;
440
437
  (function(MixinType3) {
441
438
  MixinType3.Kind = "MixinType";
442
439
  })(MixinType || (MixinType = {}));
443
440
 
444
- // ../../build/common/esm/schema/data-type/simple-type.interface.js
441
+ // src/schema/data-type/simple-type.interface.ts
445
442
  var SimpleType;
446
443
  (function(SimpleType3) {
447
444
  SimpleType3.Kind = "SimpleType";
448
445
  })(SimpleType || (SimpleType = {}));
449
446
 
450
- // ../../build/common/esm/schema/http/http-controller.interface.js
447
+ // src/schema/http/http-controller.interface.ts
451
448
  var HttpController;
452
449
  (function(HttpController3) {
453
450
  HttpController3.Kind = "HttpController";
454
451
  })(HttpController || (HttpController = {}));
455
452
 
456
- // ../../build/common/esm/schema/http/http-operation.interface.js
453
+ // src/schema/http/http-operation.interface.ts
457
454
  var HttpOperation;
458
455
  (function(HttpOperation3) {
459
456
  HttpOperation3.Kind = "HttpOperation";
460
457
  })(HttpOperation || (HttpOperation = {}));
461
458
 
462
- // ../../build/common/esm/schema/type-guards.js
459
+ // src/schema/type-guards.ts
463
460
  function isDataType(obj) {
464
461
  return obj && typeof obj === "object" && (obj.kind === ComplexType.Kind || obj.kind === EnumType.Kind || obj.kind === MappedType.Kind || obj.kind === SimpleType.Kind || obj.kind === MixinType.Kind);
465
462
  }
@@ -489,17 +486,41 @@ function isHttpController(obj) {
489
486
  }
490
487
  __name(isHttpController, "isHttpController");
491
488
 
492
- // ../../build/common/esm/schema/index.js
489
+ // src/schema/index.ts
493
490
  var OpraSchema;
494
491
  (function(OpraSchema2) {
495
492
  OpraSchema2.SpecVersion = SpecVersion;
493
+ OpraSchema2.Protocol = void 0;
494
+ OpraSchema2.ApiDocument = void 0;
495
+ OpraSchema2.DocumentInfo = void 0;
496
+ OpraSchema2.ContactPerson = void 0;
497
+ OpraSchema2.LicenseInfo = void 0;
498
+ OpraSchema2.DocumentReference = void 0;
499
+ OpraSchema2.HttpApi = void 0;
500
+ OpraSchema2.Api = void 0;
501
+ OpraSchema2.HttpMethod = void 0;
502
+ OpraSchema2.HttpParameterLocation = void 0;
503
+ OpraSchema2.HttpMultipartFieldType = void 0;
504
+ OpraSchema2.Value = void 0;
496
505
  OpraSchema2.ComplexType = ComplexType;
506
+ OpraSchema2.DataType = void 0;
507
+ OpraSchema2.DataTypeBase = void 0;
508
+ OpraSchema2.DataTypeExample = void 0;
497
509
  OpraSchema2.EnumType = EnumType;
510
+ OpraSchema2.Field = void 0;
498
511
  OpraSchema2.MappedType = MappedType;
499
512
  OpraSchema2.MixinType = MixinType;
500
513
  OpraSchema2.SimpleType = SimpleType;
514
+ OpraSchema2.Attribute = void 0;
515
+ OpraSchema2.DataTypeContainer = void 0;
501
516
  OpraSchema2.HttpController = HttpController;
517
+ OpraSchema2.HttpMediaType = void 0;
518
+ OpraSchema2.HttpMultipartField = void 0;
502
519
  OpraSchema2.HttpOperation = HttpOperation;
520
+ OpraSchema2.HttpParameter = void 0;
521
+ OpraSchema2.HttpRequestBody = void 0;
522
+ OpraSchema2.HttpStatusRange = void 0;
523
+ OpraSchema2.HttpOperationResponse = void 0;
503
524
  OpraSchema2.isComplexType = isComplexType;
504
525
  OpraSchema2.isDataType = isDataType;
505
526
  OpraSchema2.isSimpleType = isSimpleType;
@@ -509,11 +530,11 @@ var OpraSchema;
509
530
  OpraSchema2.isHttpController = isHttpController;
510
531
  })(OpraSchema || (OpraSchema = {}));
511
532
 
512
- // ../../build/common/esm/i18n/i18n.js
533
+ // src/i18n/i18n.ts
513
534
  import i18next from "@browsery/i18next";
514
535
  import { splitString as splitString2, tokenize } from "fast-tokenizer";
515
536
 
516
- // ../../build/common/esm/i18n/string-utils.js
537
+ // src/i18n/string-utils.ts
517
538
  var unescapeRegEx = /\\(.)/g;
518
539
  var escapeRegEx = /(\\)/g;
519
540
  function escapeString(s) {
@@ -525,12 +546,9 @@ function unescapeString(s) {
525
546
  }
526
547
  __name(unescapeString, "unescapeString");
527
548
 
528
- // ../../build/common/esm/i18n/i18n.js
549
+ // src/i18n/i18n.ts
529
550
  var BaseI18n = Object.getPrototypeOf(i18next.createInstance()).constructor;
530
- var I18n = class _I18n extends BaseI18n {
531
- static {
532
- __name(this, "I18n");
533
- }
551
+ var _I18n = class _I18n extends BaseI18n {
534
552
  async init(arg0, arg1) {
535
553
  const options = typeof arg0 === "object" ? arg0 : {};
536
554
  const callback = typeof arg0 === "function" ? arg0 : arg1;
@@ -540,7 +558,7 @@ var I18n = class _I18n extends BaseI18n {
540
558
  formatter.add("lowercase", (value, lng) => value.toLocaleLowerCase(lng));
541
559
  formatter.add("uppercase", (value, lng) => value.toLocaleUpperCase(lng));
542
560
  formatter.add("upperFirst", (value, lng) => value.charAt(0).toLocaleUpperCase(lng) + value.substring(1));
543
- if (options?.resources) {
561
+ if (options == null ? void 0 : options.resources) {
544
562
  for (const lang of Object.keys(options.resources)) {
545
563
  const langObj = options.resources[lang];
546
564
  for (const ns of Object.keys(langObj)) {
@@ -572,7 +590,7 @@ var I18n = class _I18n extends BaseI18n {
572
590
  _deepTranslate(input, objectStack, options) {
573
591
  if (input == null)
574
592
  return input;
575
- if (options?.ignore && options.ignore(input, this))
593
+ if ((options == null ? void 0 : options.ignore) && options.ignore(input, this))
576
594
  return input;
577
595
  if (typeof input === "object" && objectStack.has(input))
578
596
  return objectStack.get(input);
@@ -638,9 +656,11 @@ var I18n = class _I18n extends BaseI18n {
638
656
  return defaultInstance;
639
657
  }
640
658
  };
659
+ __name(_I18n, "I18n");
660
+ var I18n = _I18n;
641
661
  var defaultInstance = I18n.createInstance();
642
662
 
643
- // ../../build/common/esm/i18n/translate.js
663
+ // src/i18n/translate.ts
644
664
  var bracketRegEx = /(\))/g;
645
665
  function translate(key, arg0, arg1) {
646
666
  const options = arg0 && typeof arg0 === "object" ? arg0 : void 0;
@@ -649,15 +669,12 @@ function translate(key, arg0, arg1) {
649
669
  }
650
670
  __name(translate, "translate");
651
671
 
652
- // ../../build/common/esm/i18n/index.js
672
+ // src/i18n/index.ts
653
673
  var i18n = I18n.createInstance();
654
674
  i18n.init().catch(() => void 0);
655
675
 
656
- // ../../build/common/esm/exception/opra-exception.js
657
- var OpraException = class extends Error {
658
- static {
659
- __name(this, "OpraException");
660
- }
676
+ // src/exception/opra-exception.ts
677
+ var _OpraException = class _OpraException extends Error {
661
678
  constructor(issue, cause) {
662
679
  super("Unknown error");
663
680
  this.severity = "error";
@@ -681,19 +698,20 @@ var OpraException = class extends Error {
681
698
  return i18n.deep(this.message);
682
699
  }
683
700
  toJSON() {
684
- const env = process.env.NODE_ENV;
701
+ var _a45;
702
+ const env = "development";
685
703
  return omitUndefined({
686
704
  message: this.message,
687
705
  severity: this.severity,
688
706
  system: this.system,
689
707
  code: this.code,
690
708
  details: this.details,
691
- stack: env === "dev" || env === "development" || env === "test" ? this.stack?.split("\n") : void 0
709
+ stack: env === "dev" || env === "development" || env === "test" ? (_a45 = this.stack) == null ? void 0 : _a45.split("\n") : void 0
692
710
  }, true);
693
711
  }
694
712
  init(issue) {
695
- this.message = issue?.message || this.constructor.name;
696
- this.severity = issue?.severity || "error";
713
+ this.message = (issue == null ? void 0 : issue.message) || this.constructor.name;
714
+ this.severity = (issue == null ? void 0 : issue.severity) || "error";
697
715
  if (issue) {
698
716
  this.system = issue.system;
699
717
  this.code = issue.code;
@@ -715,12 +733,11 @@ var OpraException = class extends Error {
715
733
  });
716
734
  }
717
735
  };
736
+ __name(_OpraException, "OpraException");
737
+ var OpraException = _OpraException;
718
738
 
719
- // ../../build/common/esm/document/common/opra-document-error.js
720
- var OpraDocumentError = class extends OpraException {
721
- static {
722
- __name(this, "OpraDocumentError");
723
- }
739
+ // src/document/common/opra-document-error.ts
740
+ var _OpraDocumentError = class _OpraDocumentError extends OpraException {
724
741
  constructor() {
725
742
  super("");
726
743
  this.details = [];
@@ -730,17 +747,16 @@ var OpraDocumentError = class extends OpraException {
730
747
  return this;
731
748
  }
732
749
  };
750
+ __name(_OpraDocumentError, "OpraDocumentError");
751
+ var OpraDocumentError = _OpraDocumentError;
733
752
 
734
- // ../../build/common/esm/document/common/document-init-context.js
735
- var DocumentInitContext = class {
736
- static {
737
- __name(this, "DocumentInitContext");
738
- }
753
+ // src/document/common/document-init-context.ts
754
+ var _DocumentInitContext = class _DocumentInitContext {
739
755
  constructor(options) {
740
756
  this.path = "";
741
757
  this.error = new OpraDocumentError();
742
758
  this.showErrorDetails = true;
743
- this.maxErrors = options?.maxErrors || 0;
759
+ this.maxErrors = (options == null ? void 0 : options.maxErrors) || 0;
744
760
  this.error.message = "";
745
761
  }
746
762
  addError(error) {
@@ -794,23 +810,26 @@ var DocumentInitContext = class {
794
810
  return out;
795
811
  }
796
812
  };
813
+ __name(_DocumentInitContext, "DocumentInitContext");
814
+ var DocumentInitContext = _DocumentInitContext;
797
815
 
798
- // ../../build/common/esm/document/data-type/complex-type.js
816
+ // src/document/data-type/complex-type.ts
799
817
  import "reflect-metadata";
800
818
  import { asMutable as asMutable5 } from "ts-gems";
801
819
 
802
- // ../../build/common/esm/document/decorators/complex-type.decorator.js
820
+ // src/document/decorators/complex-type.decorator.ts
803
821
  import omit from "lodash.omit";
804
822
  function ComplexTypeDecorator(options) {
805
823
  return function(target) {
824
+ var _a45;
806
825
  let name;
807
- if (!options?.embedded) {
808
- if (options?.name) {
826
+ if (!(options == null ? void 0 : options.embedded)) {
827
+ if (options == null ? void 0 : options.name) {
809
828
  if (!CLASS_NAME_PATTERN.test(options.name))
810
829
  throw new TypeError(`"${options.name}" is not a valid type name`);
811
830
  name = options.name;
812
831
  } else {
813
- name = target.name.match(EXTRACT_TYPENAME_PATTERN)?.[1] || target.name;
832
+ name = ((_a45 = target.name.match(EXTRACT_TYPENAME_PATTERN)) == null ? void 0 : _a45[1]) || target.name;
814
833
  }
815
834
  }
816
835
  let metadata = Reflect.getOwnMetadata(DATATYPE_METADATA, target);
@@ -826,18 +845,15 @@ function ComplexTypeDecorator(options) {
826
845
  }
827
846
  __name(ComplexTypeDecorator, "ComplexTypeDecorator");
828
847
 
829
- // ../../build/common/esm/document/data-type/api-field.js
848
+ // src/document/data-type/api-field.ts
830
849
  import { asMutable as asMutable4 } from "ts-gems";
831
850
 
832
- // ../../build/common/esm/document/common/document-element.js
851
+ // src/document/common/document-element.ts
833
852
  import { asMutable } from "ts-gems";
834
853
  import { uid } from "uid";
835
854
 
836
- // ../../build/common/esm/document/common/document-node.js
837
- var DocumentNode = class {
838
- static {
839
- __name(this, "DocumentNode");
840
- }
855
+ // src/document/common/document-node.ts
856
+ var _DocumentNode = class _DocumentNode {
841
857
  constructor(element, parent) {
842
858
  this.element = element;
843
859
  this.parent = parent;
@@ -852,13 +868,15 @@ var DocumentNode = class {
852
868
  throw new Error("ApiDocument not found in document tree");
853
869
  }
854
870
  hasDataType(nameOrCtor) {
855
- const result = this[kDataTypeMap]?.has(nameOrCtor);
871
+ var _a45;
872
+ const result = (_a45 = this[kDataTypeMap]) == null ? void 0 : _a45.has(nameOrCtor);
856
873
  if (result)
857
874
  return result;
858
875
  return this.parent ? this.parent.hasDataType(nameOrCtor) : false;
859
876
  }
860
877
  findDataType(nameOrCtor) {
861
- const result = this[kDataTypeMap]?.get(nameOrCtor);
878
+ var _a45;
879
+ const result = (_a45 = this[kDataTypeMap]) == null ? void 0 : _a45.get(nameOrCtor);
862
880
  if (result)
863
881
  return result;
864
882
  return this.parent ? this.parent.findDataType(nameOrCtor) : void 0;
@@ -877,7 +895,7 @@ var DocumentNode = class {
877
895
  name = metadata.name;
878
896
  } else if (typeof nameOrCtor === "object") {
879
897
  const metadata = nameOrCtor[DATATYPE_METADATA];
880
- name = metadata?.name;
898
+ name = metadata == null ? void 0 : metadata.name;
881
899
  }
882
900
  if (typeof nameOrCtor === "string")
883
901
  name = nameOrCtor;
@@ -950,15 +968,17 @@ var DocumentNode = class {
950
968
  throw new TypeError(`Data type "${t.name || t}" is not a MixinType`);
951
969
  }
952
970
  };
971
+ __name(_DocumentNode, "DocumentNode");
972
+ var DocumentNode = _DocumentNode;
953
973
 
954
- // ../../build/common/esm/document/common/document-element.js
974
+ // src/document/common/document-element.ts
955
975
  var DocumentElement = /* @__PURE__ */ __name(function(owner) {
956
976
  if (!this)
957
977
  throw new TypeError('"this" should be passed to call class constructor');
958
978
  const _this = asMutable(this);
959
979
  _this.id = uid(16);
960
980
  Object.defineProperty(_this, "node", {
961
- value: new DocumentNode(this, owner?.node),
981
+ value: new DocumentNode(this, owner == null ? void 0 : owner.node),
962
982
  enumerable: false,
963
983
  writable: true
964
984
  });
@@ -970,14 +990,13 @@ var DocumentElement = /* @__PURE__ */ __name(function(owner) {
970
990
  });
971
991
  }
972
992
  }, "DocumentElement");
973
- var DocumentElementClass = class {
974
- static {
975
- __name(this, "DocumentElementClass");
976
- }
993
+ var _DocumentElementClass = class _DocumentElementClass {
977
994
  };
995
+ __name(_DocumentElementClass, "DocumentElementClass");
996
+ var DocumentElementClass = _DocumentElementClass;
978
997
  DocumentElement.prototype = DocumentElementClass.prototype;
979
998
 
980
- // ../../build/common/esm/document/decorators/api-field-decorator.js
999
+ // src/document/decorators/api-field-decorator.ts
981
1000
  function ApiFieldDecorator(options) {
982
1001
  return function(target, propertyKey) {
983
1002
  if (typeof propertyKey !== "string")
@@ -998,24 +1017,24 @@ function ApiFieldDecorator(options) {
998
1017
  }
999
1018
  __name(ApiFieldDecorator, "ApiFieldDecorator");
1000
1019
 
1001
- // ../../build/common/esm/document/data-type/complex-type-base.js
1020
+ // src/document/data-type/complex-type-base.ts
1002
1021
  import { asMutable as asMutable3 } from "ts-gems";
1003
1022
  import { validator, vg } from "valgen";
1004
1023
 
1005
- // ../../build/common/esm/document/data-type/data-type.js
1024
+ // src/document/data-type/data-type.ts
1006
1025
  import { asMutable as asMutable2 } from "ts-gems";
1007
1026
 
1008
- // ../../build/common/esm/document/utils/inspect.util.js
1027
+ // src/document/utils/inspect.util.ts
1009
1028
  var nodeInspectCustom = Symbol.for("nodejs.util.inspect.custom");
1010
1029
  var colorReset = "\x1B[0m";
1011
1030
  var colorFgYellow = "\x1B[33m";
1012
1031
  var colorFgMagenta = "\x1B[35m";
1013
1032
 
1014
- // ../../build/common/esm/document/data-type/data-type.js
1015
- var DataType = /* @__PURE__ */ __name(function(owner, initArgs, context) {
1033
+ // src/document/data-type/data-type.ts
1034
+ var DataType2 = /* @__PURE__ */ __name(function(owner, initArgs, context) {
1016
1035
  if (!this)
1017
1036
  throw new TypeError('"this" should be passed to call class constructor');
1018
- if (initArgs?.name && !CLASS_NAME_PATTERN.test(initArgs.name)) {
1037
+ if ((initArgs == null ? void 0 : initArgs.name) && !CLASS_NAME_PATTERN.test(initArgs.name)) {
1019
1038
  throw new TypeError(`"${initArgs.name}" is not a valid DataType name`);
1020
1039
  }
1021
1040
  DocumentElement.call(this, owner);
@@ -1026,10 +1045,7 @@ var DataType = /* @__PURE__ */ __name(function(owner, initArgs, context) {
1026
1045
  _this.abstract = initArgs.abstract;
1027
1046
  _this.examples = initArgs.examples;
1028
1047
  }, "DataType");
1029
- var DataTypeClass = class extends DocumentElement {
1030
- static {
1031
- __name(this, "DataTypeClass");
1032
- }
1048
+ var _DataTypeClass = class _DataTypeClass extends DocumentElement {
1033
1049
  get embedded() {
1034
1050
  return !this.name;
1035
1051
  }
@@ -1048,22 +1064,21 @@ var DataTypeClass = class extends DocumentElement {
1048
1064
  return `[${colorFgYellow + Object.getPrototypeOf(this).constructor.name + colorReset} ${colorFgMagenta + this.name + colorReset}]`;
1049
1065
  }
1050
1066
  };
1051
- DataType.prototype = DataTypeClass.prototype;
1067
+ __name(_DataTypeClass, "DataTypeClass");
1068
+ var DataTypeClass = _DataTypeClass;
1069
+ DataType2.prototype = DataTypeClass.prototype;
1052
1070
 
1053
- // ../../build/common/esm/document/data-type/complex-type-base.js
1071
+ // src/document/data-type/complex-type-base.ts
1054
1072
  var FIELD_PATH_PATTERN = /^([+-])?([a-z$_][\w.]*)$/i;
1055
1073
  var ComplexTypeBase = /* @__PURE__ */ __name(function(...args) {
1056
1074
  if (!this)
1057
1075
  throw new TypeError('"this" should be passed to call class constructor');
1058
1076
  const [owner, initArgs, context] = args;
1059
- DataType.call(this, owner, initArgs, context);
1077
+ DataType2.call(this, owner, initArgs, context);
1060
1078
  const _this = asMutable3(this);
1061
1079
  _this.fields = new ResponsiveMap();
1062
1080
  }, "ComplexTypeBase");
1063
- var ComplexTypeBaseClass = class extends DataType {
1064
- static {
1065
- __name(this, "ComplexTypeBaseClass");
1066
- }
1081
+ var _ComplexTypeBaseClass = class _ComplexTypeBaseClass extends DataType2 {
1067
1082
  /**
1068
1083
  *
1069
1084
  */
@@ -1071,7 +1086,7 @@ var ComplexTypeBaseClass = class extends DataType {
1071
1086
  if (nameOrPath.includes(".")) {
1072
1087
  const fieldPath = this.parseFieldPath(nameOrPath);
1073
1088
  const lastItem = fieldPath.pop();
1074
- return lastItem?.field;
1089
+ return lastItem == null ? void 0 : lastItem.field;
1075
1090
  }
1076
1091
  return this.fields.get(nameOrPath);
1077
1092
  }
@@ -1088,13 +1103,14 @@ var ComplexTypeBaseClass = class extends DataType {
1088
1103
  *
1089
1104
  */
1090
1105
  parseFieldPath(fieldPath, options) {
1106
+ var _a45, _b2, _c2;
1091
1107
  let dataType = this;
1092
1108
  let field;
1093
1109
  const arr = fieldPath.split(".");
1094
1110
  const len = arr.length;
1095
1111
  const out = [];
1096
1112
  const objectType = this.owner.node.getDataType("object");
1097
- const allowSigns = options?.allowSigns;
1113
+ const allowSigns = options == null ? void 0 : options.allowSigns;
1098
1114
  const getStrPath = /* @__PURE__ */ __name(() => out.map((x) => x.fieldName).join("."), "getStrPath");
1099
1115
  for (let i = 0; i < len; i++) {
1100
1116
  const item = {
@@ -1120,13 +1136,13 @@ var ComplexTypeBaseClass = class extends DataType {
1120
1136
  dataType = field.type;
1121
1137
  continue;
1122
1138
  }
1123
- if (dataType.additionalFields?.[0] === true) {
1139
+ if (((_a45 = dataType.additionalFields) == null ? void 0 : _a45[0]) === true) {
1124
1140
  item.additionalField = true;
1125
1141
  item.dataType = objectType;
1126
1142
  dataType = void 0;
1127
1143
  continue;
1128
1144
  }
1129
- if (dataType.additionalFields?.[0] === "type" && dataType.additionalFields?.[1] instanceof DataType) {
1145
+ if (((_b2 = dataType.additionalFields) == null ? void 0 : _b2[0]) === "type" && ((_c2 = dataType.additionalFields) == null ? void 0 : _c2[1]) instanceof DataType2) {
1130
1146
  item.additionalField = true;
1131
1147
  item.dataType = dataType.additionalFields[1];
1132
1148
  dataType = dataType.additionalFields[1];
@@ -1151,10 +1167,10 @@ var ComplexTypeBaseClass = class extends DataType {
1151
1167
  *
1152
1168
  */
1153
1169
  generateCodec(codec, options) {
1154
- const projection = Array.isArray(options?.projection) ? parseFieldsProjection(options.projection) : options?.projection;
1170
+ const projection = Array.isArray(options == null ? void 0 : options.projection) ? parseFieldsProjection(options.projection) : options == null ? void 0 : options.projection;
1155
1171
  const schema = this._generateSchema(codec, { ...options, projection, currentPath: "" });
1156
1172
  let additionalFields;
1157
- if (this.additionalFields instanceof DataType) {
1173
+ if (this.additionalFields instanceof DataType2) {
1158
1174
  additionalFields = this.additionalFields.generateCodec(codec, options);
1159
1175
  } else if (typeof this.additionalFields === "boolean")
1160
1176
  additionalFields = this.additionalFields;
@@ -1171,8 +1187,8 @@ var ComplexTypeBaseClass = class extends DataType {
1171
1187
  additionalFields,
1172
1188
  name: this.name,
1173
1189
  coerce: true,
1174
- caseInSensitive: options?.caseInSensitive,
1175
- onFail: options?.onFail
1190
+ caseInSensitive: options == null ? void 0 : options.caseInSensitive,
1191
+ onFail: options == null ? void 0 : options.onFail
1176
1192
  });
1177
1193
  }
1178
1194
  _generateSchema(codec, context) {
@@ -1188,10 +1204,10 @@ var ComplexTypeBaseClass = class extends DataType {
1188
1204
  fieldName = field.name;
1189
1205
  let p;
1190
1206
  if (projection !== "*") {
1191
- p = projection?.[fieldName.toLowerCase()];
1207
+ p = projection == null ? void 0 : projection[fieldName.toLowerCase()];
1192
1208
  if (
1193
1209
  /** Ignore if field is omitted */
1194
- p?.sign === "-" || /** Ignore if default fields ignored and field is not in projection */
1210
+ (p == null ? void 0 : p.sign) === "-" || /** Ignore if default fields ignored and field is not in projection */
1195
1211
  pickList && !p || /** Ignore if default fields enabled and fields is exclusive */
1196
1212
  !pickList && field.exclusive && !p
1197
1213
  ) {
@@ -1218,9 +1234,11 @@ var ComplexTypeBaseClass = class extends DataType {
1218
1234
  return fn;
1219
1235
  }
1220
1236
  };
1237
+ __name(_ComplexTypeBaseClass, "ComplexTypeBaseClass");
1238
+ var ComplexTypeBaseClass = _ComplexTypeBaseClass;
1221
1239
  ComplexTypeBase.prototype = ComplexTypeBaseClass.prototype;
1222
1240
 
1223
- // ../../build/common/esm/document/data-type/api-field.js
1241
+ // src/document/data-type/api-field.ts
1224
1242
  var ApiField = /* @__PURE__ */ __name(function(...args) {
1225
1243
  if (!this) {
1226
1244
  const [options] = args;
@@ -1249,14 +1267,12 @@ var ApiField = /* @__PURE__ */ __name(function(...args) {
1249
1267
  _this.examples = initArgs.examples;
1250
1268
  _this.hidden = initArgs.hidden;
1251
1269
  }, "ApiField");
1252
- var ApiFieldClass = class extends DocumentElement {
1253
- static {
1254
- __name(this, "ApiFieldClass");
1255
- }
1270
+ var _ApiFieldClass = class _ApiFieldClass extends DocumentElement {
1256
1271
  toJSON() {
1272
+ var _a45;
1257
1273
  const typeName = this.type ? this.node.getDataTypeNameWithNs(this.type) : void 0;
1258
1274
  return omitUndefined({
1259
- type: typeName ? typeName : this.type?.toJSON(),
1275
+ type: typeName ? typeName : (_a45 = this.type) == null ? void 0 : _a45.toJSON(),
1260
1276
  description: this.description,
1261
1277
  isArray: this.isArray || void 0,
1262
1278
  default: this.default,
@@ -1271,12 +1287,15 @@ var ApiFieldClass = class extends DocumentElement {
1271
1287
  });
1272
1288
  }
1273
1289
  };
1290
+ __name(_ApiFieldClass, "ApiFieldClass");
1291
+ var ApiFieldClass = _ApiFieldClass;
1274
1292
  ApiField.prototype = ApiFieldClass.prototype;
1275
1293
  Object.assign(ApiField, ApiFieldDecorator);
1276
1294
  ApiField[DECORATOR] = ApiFieldDecorator;
1277
1295
 
1278
- // ../../build/common/esm/document/data-type/complex-type.js
1296
+ // src/document/data-type/complex-type.ts
1279
1297
  var ComplexType2 = /* @__PURE__ */ __name(function(...args) {
1298
+ var _a45;
1280
1299
  if (!this)
1281
1300
  return ComplexType2[DECORATOR].apply(void 0, args);
1282
1301
  const [owner, initArgs] = args;
@@ -1300,7 +1319,7 @@ var ComplexType2 = /* @__PURE__ */ __name(function(...args) {
1300
1319
  }
1301
1320
  });
1302
1321
  }
1303
- _this.ctor = initArgs.ctor || _this.base?.ctor;
1322
+ _this.ctor = initArgs.ctor || ((_a45 = _this.base) == null ? void 0 : _a45.ctor);
1304
1323
  if (initArgs.fields) {
1305
1324
  context.enter(".fields", () => {
1306
1325
  for (const [k, v] of Object.entries(initArgs.fields)) {
@@ -1313,18 +1332,16 @@ var ComplexType2 = /* @__PURE__ */ __name(function(...args) {
1313
1332
  });
1314
1333
  }
1315
1334
  }, "ComplexType");
1316
- var ComplexTypeClass = class extends ComplexTypeBase {
1317
- static {
1318
- __name(this, "ComplexTypeClass");
1319
- }
1335
+ var _ComplexTypeClass = class _ComplexTypeClass extends ComplexTypeBase {
1320
1336
  extendsFrom(baseType) {
1321
- if (!(baseType instanceof DataType))
1337
+ var _a45;
1338
+ if (!(baseType instanceof DataType2))
1322
1339
  baseType = this.node.getDataType(baseType);
1323
1340
  if (!(baseType instanceof ComplexTypeBase))
1324
1341
  return false;
1325
1342
  if (baseType === this)
1326
1343
  return true;
1327
- return !!this.base?.extendsFrom(baseType);
1344
+ return !!((_a45 = this.base) == null ? void 0 : _a45.extendsFrom(baseType));
1328
1345
  }
1329
1346
  toJSON() {
1330
1347
  const baseName = this.base ? this.node.getDataTypeNameWithNs(this.base) : void 0;
@@ -1334,7 +1351,7 @@ var ComplexTypeClass = class extends ComplexTypeBase {
1334
1351
  base: this.base ? baseName ? baseName : this.base.toJSON() : void 0
1335
1352
  });
1336
1353
  if (this.additionalFields) {
1337
- if (this.additionalFields instanceof DataType) {
1354
+ if (this.additionalFields instanceof DataType2) {
1338
1355
  const typeName = this.node.getDataTypeNameWithNs(this.additionalFields);
1339
1356
  out.additionalFields = typeName ? typeName : this.additionalFields.toJSON();
1340
1357
  } else
@@ -1355,11 +1372,13 @@ var ComplexTypeClass = class extends ComplexTypeBase {
1355
1372
  return omitUndefined(out);
1356
1373
  }
1357
1374
  };
1375
+ __name(_ComplexTypeClass, "ComplexTypeClass");
1376
+ var ComplexTypeClass = _ComplexTypeClass;
1358
1377
  ComplexType2.prototype = ComplexTypeClass.prototype;
1359
1378
  Object.assign(ComplexType2, ComplexTypeDecorator);
1360
1379
  ComplexType2[DECORATOR] = ComplexTypeDecorator;
1361
1380
 
1362
- // ../../build/common/esm/document/data-type/enum-type.js
1381
+ // src/document/data-type/enum-type.ts
1363
1382
  import "reflect-metadata";
1364
1383
  import { asMutable as asMutable6 } from "ts-gems";
1365
1384
  import { vg as vg2 } from "valgen";
@@ -1367,7 +1386,7 @@ var EnumType2 = /* @__PURE__ */ __name(function(...args) {
1367
1386
  if (!this)
1368
1387
  return EnumType2[DECORATOR].apply(void 0, args);
1369
1388
  const [owner, initArgs, context] = args;
1370
- DataType.call(this, owner, initArgs, context);
1389
+ DataType2.call(this, owner, initArgs, context);
1371
1390
  const _this = asMutable6(this);
1372
1391
  _this.kind = OpraSchema.EnumType.Kind;
1373
1392
  if (initArgs.base) {
@@ -1383,18 +1402,16 @@ var EnumType2 = /* @__PURE__ */ __name(function(...args) {
1383
1402
  _this.attributes[k] = el;
1384
1403
  }
1385
1404
  }, "EnumType");
1386
- var EnumTypeClass = class extends DataType {
1387
- static {
1388
- __name(this, "EnumTypeClass");
1389
- }
1405
+ var _EnumTypeClass = class _EnumTypeClass extends DataType2 {
1390
1406
  extendsFrom(baseType) {
1391
- if (!(baseType instanceof DataType))
1407
+ var _a45;
1408
+ if (!(baseType instanceof DataType2))
1392
1409
  baseType = this.node.getDataType(baseType);
1393
1410
  if (!(baseType instanceof EnumType2))
1394
1411
  return false;
1395
1412
  if (baseType === this)
1396
1413
  return true;
1397
- return !!this.base?.extendsFrom(baseType);
1414
+ return !!((_a45 = this.base) == null ? void 0 : _a45.extendsFrom(baseType));
1398
1415
  }
1399
1416
  generateCodec() {
1400
1417
  return vg2.isEnum(Object.keys(this.attributes));
@@ -1402,12 +1419,14 @@ var EnumTypeClass = class extends DataType {
1402
1419
  toJSON() {
1403
1420
  const baseName = this.base ? this.node.getDataTypeNameWithNs(this.base) : void 0;
1404
1421
  return omitUndefined({
1405
- ...DataType.prototype.toJSON.call(this),
1422
+ ...DataType2.prototype.toJSON.call(this),
1406
1423
  base: this.base ? baseName ? baseName : this.base.toJSON() : void 0,
1407
1424
  attributes: cloneObject(this.ownAttributes)
1408
1425
  });
1409
1426
  }
1410
1427
  };
1428
+ __name(_EnumTypeClass, "EnumTypeClass");
1429
+ var EnumTypeClass = _EnumTypeClass;
1411
1430
  EnumType2.prototype = EnumTypeClass.prototype;
1412
1431
  Object.assign(EnumType2, EnumTypeClass);
1413
1432
  function EnumTypeFactory(enumSource, ...args) {
@@ -1423,7 +1442,8 @@ function EnumTypeFactory(enumSource, ...args) {
1423
1442
  }
1424
1443
  attributes = {};
1425
1444
  enumSource.forEach((k) => {
1426
- const description = options?.meanings?.[k];
1445
+ var _a45;
1446
+ const description = (_a45 = options == null ? void 0 : options.meanings) == null ? void 0 : _a45[k];
1427
1447
  attributes[k] = omitUndefined({ description });
1428
1448
  });
1429
1449
  } else {
@@ -1433,7 +1453,8 @@ function EnumTypeFactory(enumSource, ...args) {
1433
1453
  out = { ...base, ...enumSource };
1434
1454
  }
1435
1455
  Object.keys(enumSource).forEach((k) => {
1436
- const description = options?.meanings?.[k];
1456
+ var _a45;
1457
+ const description = (_a45 = options == null ? void 0 : options.meanings) == null ? void 0 : _a45[k];
1437
1458
  attributes[enumSource[k]] = omitUndefined({ alias: k, description });
1438
1459
  });
1439
1460
  }
@@ -1442,7 +1463,7 @@ function EnumTypeFactory(enumSource, ...args) {
1442
1463
  attributes,
1443
1464
  base: options.base,
1444
1465
  name: options.name,
1445
- description: options?.description
1466
+ description: options == null ? void 0 : options.description
1446
1467
  };
1447
1468
  Object.defineProperty(enumSource, DATATYPE_METADATA, {
1448
1469
  value: metadata,
@@ -1456,14 +1477,14 @@ __name(EnumTypeFactory, "EnumTypeFactory");
1456
1477
  EnumType2.prototype = EnumTypeClass.prototype;
1457
1478
  EnumType2[DECORATOR] = EnumTypeFactory;
1458
1479
 
1459
- // ../../build/common/esm/document/data-type/mapped-type.js
1480
+ // src/document/data-type/mapped-type.ts
1460
1481
  import "reflect-metadata";
1461
1482
  import { asMutable as asMutable7 } from "ts-gems";
1462
1483
 
1463
- // ../../build/common/esm/document/data-type/utils/get-is-inherited-predicate-fn.js
1484
+ // src/document/data-type/utils/get-is-inherited-predicate-fn.ts
1464
1485
  function getIsInheritedPredicateFn(pick, omit5) {
1465
- const pickKeys = pick?.map((x) => String(x).toLowerCase());
1466
- const omitKeys = omit5?.map((x) => String(x).toLowerCase());
1486
+ const pickKeys = pick == null ? void 0 : pick.map((x) => String(x).toLowerCase());
1487
+ const omitKeys = omit5 == null ? void 0 : omit5.map((x) => String(x).toLowerCase());
1467
1488
  return (propertyName) => {
1468
1489
  if (omitKeys && omitKeys.includes(propertyName.toLowerCase()))
1469
1490
  return false;
@@ -1474,8 +1495,9 @@ function getIsInheritedPredicateFn(pick, omit5) {
1474
1495
  }
1475
1496
  __name(getIsInheritedPredicateFn, "getIsInheritedPredicateFn");
1476
1497
 
1477
- // ../../build/common/esm/document/data-type/mapped-type.js
1498
+ // src/document/data-type/mapped-type.ts
1478
1499
  var MappedType2 = /* @__PURE__ */ __name(function(...args) {
1500
+ var _a45;
1479
1501
  if (!this)
1480
1502
  throw new TypeError('"this" should be passed to call class constructor');
1481
1503
  const [owner, initArgs, context] = args;
@@ -1512,25 +1534,23 @@ var MappedType2 = /* @__PURE__ */ __name(function(...args) {
1512
1534
  const field = new ApiField(this, meta);
1513
1535
  _this.fields.set(field.name, field);
1514
1536
  }
1515
- if (!_this.pick || _this.base.additionalFields === false || Array.isArray(_this.base.additionalFields) && _this.base.additionalFields?.[0] === "error") {
1537
+ if (!_this.pick || _this.base.additionalFields === false || Array.isArray(_this.base.additionalFields) && ((_a45 = _this.base.additionalFields) == null ? void 0 : _a45[0]) === "error") {
1516
1538
  _this.additionalFields = _this.base.additionalFields;
1517
1539
  }
1518
1540
  if (initArgs.base.keyField && isInheritedPredicate(initArgs.base.keyField))
1519
1541
  _this.keyField = initArgs.base.keyField;
1520
1542
  }
1521
1543
  }, "MappedType");
1522
- var MappedTypeClass = class extends ComplexTypeBase {
1523
- static {
1524
- __name(this, "MappedTypeClass");
1525
- }
1544
+ var _MappedTypeClass = class _MappedTypeClass extends ComplexTypeBase {
1526
1545
  extendsFrom(baseType) {
1527
- if (!(baseType instanceof DataType))
1546
+ var _a45;
1547
+ if (!(baseType instanceof DataType2))
1528
1548
  baseType = this.node.getDataType(baseType);
1529
1549
  if (!(baseType instanceof ComplexTypeBase))
1530
1550
  return false;
1531
1551
  if (baseType === this)
1532
1552
  return true;
1533
- return !!this.base?.extendsFrom(baseType);
1553
+ return !!((_a45 = this.base) == null ? void 0 : _a45.extendsFrom(baseType));
1534
1554
  }
1535
1555
  toJSON() {
1536
1556
  const baseName = this.base ? this.node.getDataTypeNameWithNs(this.base) : void 0;
@@ -1545,10 +1565,12 @@ var MappedTypeClass = class extends ComplexTypeBase {
1545
1565
  });
1546
1566
  }
1547
1567
  };
1568
+ __name(_MappedTypeClass, "MappedTypeClass");
1569
+ var MappedTypeClass = _MappedTypeClass;
1548
1570
  MappedType2.prototype = MappedTypeClass.prototype;
1549
1571
  MappedType2._applyMixin = () => void 0;
1550
1572
 
1551
- // ../../build/common/esm/document/data-type/mixin-type.js
1573
+ // src/document/data-type/mixin-type.ts
1552
1574
  import "reflect-metadata";
1553
1575
  import { asMutable as asMutable8 } from "ts-gems";
1554
1576
  var MixinType2 = /* @__PURE__ */ __name(function(...args) {
@@ -1575,12 +1597,9 @@ var MixinType2 = /* @__PURE__ */ __name(function(...args) {
1575
1597
  _this.keyField = base.keyField;
1576
1598
  }
1577
1599
  }, "MixinType");
1578
- var MixinTypeClass = class extends ComplexTypeBase {
1579
- static {
1580
- __name(this, "MixinTypeClass");
1581
- }
1600
+ var _MixinTypeClass = class _MixinTypeClass extends ComplexTypeBase {
1582
1601
  extendsFrom(baseType) {
1583
- if (!(baseType instanceof DataType))
1602
+ if (!(baseType instanceof DataType2))
1584
1603
  baseType = this.node.getDataType(baseType);
1585
1604
  if (!(baseType instanceof ComplexTypeBase))
1586
1605
  return false;
@@ -1603,6 +1622,8 @@ var MixinTypeClass = class extends ComplexTypeBase {
1603
1622
  });
1604
1623
  }
1605
1624
  };
1625
+ __name(_MixinTypeClass, "MixinTypeClass");
1626
+ var MixinTypeClass = _MixinTypeClass;
1606
1627
  MixinType2.prototype = MixinTypeClass.prototype;
1607
1628
  MixinType2[DECORATOR] = MixinTypeFactory;
1608
1629
  function MixinTypeFactory(...args) {
@@ -1639,24 +1660,25 @@ function MixinTypeFactory(...args) {
1639
1660
  }
1640
1661
  __name(MixinTypeFactory, "MixinTypeFactory");
1641
1662
 
1642
- // ../../build/common/esm/document/data-type/simple-type.js
1663
+ // src/document/data-type/simple-type.ts
1643
1664
  import "reflect-metadata";
1644
1665
  import { asMutable as asMutable9 } from "ts-gems";
1645
1666
  import { isAny } from "valgen";
1646
1667
 
1647
- // ../../build/common/esm/document/decorators/simple-type.decorator.js
1668
+ // src/document/decorators/simple-type.decorator.ts
1648
1669
  import omit2 from "lodash.omit";
1649
1670
  function SimpleTypeDecoratorFactory(options) {
1650
1671
  const decoratorChain = [];
1651
1672
  const decorator = /* @__PURE__ */ __name(function(target) {
1673
+ var _a45;
1652
1674
  let name;
1653
- if (!options?.embedded) {
1654
- if (options?.name) {
1675
+ if (!(options == null ? void 0 : options.embedded)) {
1676
+ if (options == null ? void 0 : options.name) {
1655
1677
  if (!CLASS_NAME_PATTERN.test(options.name))
1656
1678
  throw new TypeError(`"${options.name}" is not a valid type name`);
1657
1679
  name = options.name;
1658
1680
  } else {
1659
- name = target.name.match(EXTRACT_TYPENAME_PATTERN)?.[1] || target.name;
1681
+ name = ((_a45 = target.name.match(EXTRACT_TYPENAME_PATTERN)) == null ? void 0 : _a45[1]) || target.name;
1660
1682
  name = name.toLowerCase();
1661
1683
  }
1662
1684
  }
@@ -1694,21 +1716,22 @@ function AttributeDecoratorFactory(options) {
1694
1716
  metadata.kind = OpraSchema.SimpleType.Kind;
1695
1717
  metadata.attributes = metadata.attributes || {};
1696
1718
  metadata.attributes[propertyKey] = {
1697
- format: options?.format || format,
1698
- description: options?.description,
1699
- deprecated: options?.deprecated
1719
+ format: (options == null ? void 0 : options.format) || format,
1720
+ description: options == null ? void 0 : options.description,
1721
+ deprecated: options == null ? void 0 : options.deprecated
1700
1722
  };
1701
1723
  Reflect.defineMetadata(DATATYPE_METADATA, metadata, target.constructor);
1702
1724
  };
1703
1725
  }
1704
1726
  __name(AttributeDecoratorFactory, "AttributeDecoratorFactory");
1705
1727
 
1706
- // ../../build/common/esm/document/data-type/simple-type.js
1728
+ // src/document/data-type/simple-type.ts
1707
1729
  var SimpleType2 = /* @__PURE__ */ __name(function(...args) {
1730
+ var _a45, _b2;
1708
1731
  if (!this)
1709
1732
  return SimpleType2[DECORATOR](...args);
1710
1733
  const [owner, initArgs, context] = args;
1711
- DataType.call(this, owner, initArgs, context);
1734
+ DataType2.call(this, owner, initArgs, context);
1712
1735
  const _this = asMutable9(this);
1713
1736
  _this.kind = OpraSchema.SimpleType.Kind;
1714
1737
  if (initArgs.base) {
@@ -1719,12 +1742,12 @@ var SimpleType2 = /* @__PURE__ */ __name(function(...args) {
1719
1742
  }
1720
1743
  _this.properties = initArgs.properties;
1721
1744
  _this.ownNameMappings = { ...initArgs.nameMappings };
1722
- _this.nameMappings = { ..._this.base?.nameMappings, ...initArgs.nameMappings };
1745
+ _this.nameMappings = { ...(_a45 = _this.base) == null ? void 0 : _a45.nameMappings, ...initArgs.nameMappings };
1723
1746
  _this.ownAttributes = cloneObject(initArgs.attributes || {});
1724
1747
  _this.attributes = _this.base ? cloneObject(_this.base.attributes) : {};
1725
1748
  if (_this.ownAttributes) {
1726
1749
  for (const [k, el] of Object.entries(_this.ownAttributes)) {
1727
- if (_this.attributes[k]?.sealed)
1750
+ if ((_b2 = _this.attributes[k]) == null ? void 0 : _b2.sealed)
1728
1751
  throw new TypeError(`Sealed attribute "${k}" can not be overwritten`);
1729
1752
  _this.attributes[k] = el;
1730
1753
  }
@@ -1732,18 +1755,16 @@ var SimpleType2 = /* @__PURE__ */ __name(function(...args) {
1732
1755
  _this._generateDecoder = initArgs.generateDecoder;
1733
1756
  _this._generateEncoder = initArgs.generateEncoder;
1734
1757
  }, "SimpleType");
1735
- var SimpleTypeClass = class extends DataType {
1736
- static {
1737
- __name(this, "SimpleTypeClass");
1738
- }
1758
+ var _SimpleTypeClass = class _SimpleTypeClass extends DataType2 {
1739
1759
  extendsFrom(baseType) {
1740
- if (!(baseType instanceof DataType))
1760
+ var _a45;
1761
+ if (!(baseType instanceof DataType2))
1741
1762
  baseType = this.node.getDataType(baseType);
1742
1763
  if (!(baseType instanceof SimpleType2))
1743
1764
  return false;
1744
1765
  if (baseType === this)
1745
1766
  return true;
1746
- return !!this.base?.extendsFrom(baseType);
1767
+ return !!((_a45 = this.base) == null ? void 0 : _a45.extendsFrom(baseType));
1747
1768
  }
1748
1769
  generateCodec(codec, options, properties) {
1749
1770
  const prop = {
@@ -1754,7 +1775,7 @@ var SimpleTypeClass = class extends DataType {
1754
1775
  let t2 = this;
1755
1776
  while (t2) {
1756
1777
  if (t2._generateDecoder)
1757
- return t2._generateDecoder(prop, options?.documentElement || this.owner);
1778
+ return t2._generateDecoder(prop, (options == null ? void 0 : options.documentElement) || this.owner);
1758
1779
  t2 = this.base;
1759
1780
  }
1760
1781
  return isAny;
@@ -1762,7 +1783,7 @@ var SimpleTypeClass = class extends DataType {
1762
1783
  let t = this;
1763
1784
  while (t) {
1764
1785
  if (t._generateEncoder)
1765
- return t._generateEncoder(prop, options?.documentElement || this.owner);
1786
+ return t._generateEncoder(prop, (options == null ? void 0 : options.documentElement) || this.owner);
1766
1787
  t = this.base;
1767
1788
  }
1768
1789
  return isAny;
@@ -1776,7 +1797,7 @@ var SimpleTypeClass = class extends DataType {
1776
1797
  properties = this.properties ? cloneObject(this.properties) : {};
1777
1798
  const baseName = this.base ? this.node.getDataTypeNameWithNs(this.base) : void 0;
1778
1799
  const out = omitUndefined({
1779
- ...DataType.prototype.toJSON.apply(this),
1800
+ ...DataType2.prototype.toJSON.apply(this),
1780
1801
  base: this.base ? baseName ? baseName : this.base.toJSON() : void 0,
1781
1802
  attributes: attributes && Object.keys(attributes).length ? attributes : void 0,
1782
1803
  properties: Object.keys(properties).length ? properties : void 0
@@ -1786,17 +1807,16 @@ var SimpleTypeClass = class extends DataType {
1786
1807
  return out;
1787
1808
  }
1788
1809
  };
1810
+ __name(_SimpleTypeClass, "SimpleTypeClass");
1811
+ var SimpleTypeClass = _SimpleTypeClass;
1789
1812
  SimpleType2.prototype = SimpleTypeClass.prototype;
1790
1813
  Object.assign(SimpleType2, SimpleTypeDecoratorFactory);
1791
1814
  SimpleType2[DECORATOR] = SimpleTypeDecoratorFactory;
1792
1815
  SimpleType2.Attribute = AttributeDecoratorFactory;
1793
1816
 
1794
- // ../../build/common/esm/document/factory/data-type.factory.js
1817
+ // src/document/factory/data-type.factory.ts
1795
1818
  var initializingSymbol = Symbol("initializing");
1796
- var DataTypeFactory = class {
1797
- static {
1798
- __name(this, "DataTypeFactory");
1799
- }
1819
+ var _DataTypeFactory = class _DataTypeFactory {
1800
1820
  static async createDataType(context, owner, thunk) {
1801
1821
  context = context || new DocumentInitContext({ maxErrors: 0 });
1802
1822
  const initArgs = await this._importDataTypeArgs(context, owner, thunk);
@@ -1820,7 +1840,7 @@ var DataTypeFactory = class {
1820
1840
  if (!importedTypes)
1821
1841
  return;
1822
1842
  for (const dataType of importedTypes) {
1823
- if (dataType?.name) {
1843
+ if (dataType == null ? void 0 : dataType.name) {
1824
1844
  dataTypeMap.set(dataType.name, dataType);
1825
1845
  }
1826
1846
  }
@@ -1906,10 +1926,11 @@ var DataTypeFactory = class {
1906
1926
  * @protected
1907
1927
  */
1908
1928
  static async _importDataTypeArgs(context, owner, thunk) {
1929
+ var _a45;
1909
1930
  thunk = await resolveThunk(thunk);
1910
1931
  const { importQueue, initArgsMap } = context;
1911
1932
  const dataType = owner.node.findDataType(thunk);
1912
- if (dataType instanceof DataType)
1933
+ if (dataType instanceof DataType2)
1913
1934
  return dataType.name;
1914
1935
  let metadata;
1915
1936
  let ctor;
@@ -1922,7 +1943,7 @@ var DataTypeFactory = class {
1922
1943
  }
1923
1944
  if (typeof thunk === "string") {
1924
1945
  const name = thunk;
1925
- thunk = importQueue?.get(name) || context.initArgsMap?.get(name);
1946
+ thunk = (importQueue == null ? void 0 : importQueue.get(name)) || ((_a45 = context.initArgsMap) == null ? void 0 : _a45.get(name));
1926
1947
  if (!thunk)
1927
1948
  return context.addError(`Unknown data type (${name})`);
1928
1949
  } else {
@@ -1966,7 +1987,7 @@ var DataTypeFactory = class {
1966
1987
  return context.addError(`No DataType metadata found`);
1967
1988
  return context.enterAsync(metadata.name ? `[${metadata.name}]` : "", async () => {
1968
1989
  if (metadata.name) {
1969
- const curr = initArgsMap?.get(metadata.name);
1990
+ const curr = initArgsMap == null ? void 0 : initArgsMap.get(metadata.name);
1970
1991
  if (curr) {
1971
1992
  if (curr[initializingSymbol])
1972
1993
  return context.addError("Circular reference detected");
@@ -1980,8 +2001,8 @@ var DataTypeFactory = class {
1980
2001
  out[initializingSymbol] = true;
1981
2002
  try {
1982
2003
  if (out.name) {
1983
- if (importQueue?.has(out.name)) {
1984
- initArgsMap?.set(metadata.name, out);
2004
+ if (importQueue == null ? void 0 : importQueue.has(out.name)) {
2005
+ initArgsMap == null ? void 0 : initArgsMap.set(metadata.name, out);
1985
2006
  out._instance = { name: metadata.name };
1986
2007
  out[kDataTypeMap] = owner.node[kDataTypeMap];
1987
2008
  } else {
@@ -2012,7 +2033,7 @@ var DataTypeFactory = class {
2012
2033
  }
2013
2034
  } finally {
2014
2035
  if (out.name)
2015
- importQueue?.delete(out.name);
2036
+ importQueue == null ? void 0 : importQueue.delete(out.name);
2016
2037
  delete out[initializingSymbol];
2017
2038
  }
2018
2039
  return importQueue && out.name ? out.name : out;
@@ -2085,6 +2106,7 @@ var DataTypeFactory = class {
2085
2106
  initArgs.attributes = cloneObject(metadata.attributes);
2086
2107
  }
2087
2108
  static async _prepareSimpleTypeArgs(context, owner, initArgs, metadata) {
2109
+ var _a45, _b2, _c2, _d;
2088
2110
  await this._prepareDataTypeArgs(context, initArgs, metadata);
2089
2111
  await context.enterAsync(".base", async () => {
2090
2112
  let baseArgs;
@@ -2107,11 +2129,11 @@ var DataTypeFactory = class {
2107
2129
  initArgs.properties = new initArgs.ctor();
2108
2130
  if (metadata.attributes)
2109
2131
  initArgs.attributes = cloneObject(metadata.attributes);
2110
- if (typeof initArgs.properties?.[DECODER] === "function") {
2111
- initArgs.generateDecoder = initArgs.properties?.[DECODER].bind(initArgs.properties);
2132
+ if (typeof ((_a45 = initArgs.properties) == null ? void 0 : _a45[DECODER]) === "function") {
2133
+ initArgs.generateDecoder = (_b2 = initArgs.properties) == null ? void 0 : _b2[DECODER].bind(initArgs.properties);
2112
2134
  }
2113
- if (typeof initArgs.properties?.[ENCODER] === "function") {
2114
- initArgs.generateEncoder = initArgs.properties?.[ENCODER].bind(initArgs.properties);
2135
+ if (typeof ((_c2 = initArgs.properties) == null ? void 0 : _c2[ENCODER]) === "function") {
2136
+ initArgs.generateEncoder = (_d = initArgs.properties) == null ? void 0 : _d[ENCODER].bind(initArgs.properties);
2115
2137
  }
2116
2138
  }
2117
2139
  static async _prepareMappedTypeArgs(context, owner, initArgs, metadata) {
@@ -2158,19 +2180,20 @@ var DataTypeFactory = class {
2158
2180
  });
2159
2181
  }
2160
2182
  static _createDataType(context, owner, args) {
2183
+ var _a45;
2161
2184
  let dataType = owner.node.findDataType(typeof args === "string" ? args : args.name || "");
2162
- if (dataType instanceof DataType)
2185
+ if (dataType instanceof DataType2)
2163
2186
  return dataType;
2164
- const initArgs = typeof args === "string" ? context.initArgsMap?.get(args) : args;
2187
+ const initArgs = typeof args === "string" ? (_a45 = context.initArgsMap) == null ? void 0 : _a45.get(args) : args;
2165
2188
  if (initArgs) {
2166
2189
  const dataTypeMap = initArgs[kDataTypeMap];
2167
2190
  if (!dataTypeMap)
2168
2191
  delete initArgs._instance;
2169
2192
  dataType = initArgs._instance;
2170
- if (dataType?.name && dataTypeMap) {
2193
+ if ((dataType == null ? void 0 : dataType.name) && dataTypeMap) {
2171
2194
  dataTypeMap.set(dataType.name, dataType);
2172
2195
  }
2173
- switch (initArgs?.kind) {
2196
+ switch (initArgs == null ? void 0 : initArgs.kind) {
2174
2197
  case OpraSchema.ComplexType.Kind:
2175
2198
  return this._createComplexType(context, owner, initArgs);
2176
2199
  case OpraSchema.EnumType.Kind:
@@ -2262,7 +2285,7 @@ var DataTypeFactory = class {
2262
2285
  context.enter(`[${i++}]`, () => {
2263
2286
  const base = this._createDataType(context, owner, t);
2264
2287
  if (!(base instanceof ComplexTypeBase)) {
2265
- throw new TypeError(`"${base?.kind}" can't be set as base for a "${initArgs.kind}"`);
2288
+ throw new TypeError(`"${base == null ? void 0 : base.kind}" can't be set as base for a "${initArgs.kind}"`);
2266
2289
  }
2267
2290
  initArgs.types.push(base);
2268
2291
  });
@@ -2285,16 +2308,15 @@ var DataTypeFactory = class {
2285
2308
  return dataType;
2286
2309
  }
2287
2310
  };
2311
+ __name(_DataTypeFactory, "DataTypeFactory");
2312
+ var DataTypeFactory = _DataTypeFactory;
2288
2313
  function preferName(initArgs) {
2289
2314
  return typeof initArgs === "object" ? initArgs.name ? initArgs.name : initArgs : initArgs;
2290
2315
  }
2291
2316
  __name(preferName, "preferName");
2292
2317
 
2293
- // ../../build/common/esm/document/common/api-base.js
2294
- var ApiBase = class extends DocumentElement {
2295
- static {
2296
- __name(this, "ApiBase");
2297
- }
2318
+ // src/document/common/api-base.ts
2319
+ var _ApiBase = class _ApiBase extends DocumentElement {
2298
2320
  constructor(owner) {
2299
2321
  super(owner);
2300
2322
  this.name = "OpraApi";
@@ -2311,23 +2333,22 @@ var ApiBase = class extends DocumentElement {
2311
2333
  if (!CLASS_NAME_PATTERN.test(init.name))
2312
2334
  throw new TypeError(`Invalid api name (${init.name})`);
2313
2335
  this.name = init.name;
2314
- this.description = init?.description;
2336
+ this.description = init == null ? void 0 : init.description;
2315
2337
  }
2316
2338
  };
2339
+ __name(_ApiBase, "ApiBase");
2340
+ var ApiBase = _ApiBase;
2317
2341
 
2318
- // ../../build/common/esm/document/http/http-controller.js
2319
- import nodePath from "node:path";
2342
+ // src/document/http/http-controller.ts
2343
+ import nodePath from "path-browserify";
2320
2344
  import { asMutable as asMutable10 } from "ts-gems";
2321
2345
 
2322
- // ../../build/common/esm/document/common/data-type-map.js
2346
+ // src/document/common/data-type-map.ts
2323
2347
  var _a;
2324
2348
  var _b;
2325
2349
  var kMap = Symbol.for("kMap");
2326
2350
  var kCtorMap2 = Symbol.for("kCtorMap");
2327
- var DataTypeMap = class {
2328
- static {
2329
- __name(this, "DataTypeMap");
2330
- }
2351
+ var _DataTypeMap = class _DataTypeMap {
2331
2352
  constructor() {
2332
2353
  this[_a] = new ResponsiveMap();
2333
2354
  this[_b] = /* @__PURE__ */ new WeakMap();
@@ -2342,11 +2363,11 @@ var DataTypeMap = class {
2342
2363
  let name = typeof nameOrCtor === "string" ? nameOrCtor : this[kCtorMap2].get(nameOrCtor);
2343
2364
  if (!name && typeof nameOrCtor === "function") {
2344
2365
  const metadata = Reflect.getMetadata(DATATYPE_METADATA, nameOrCtor);
2345
- name = metadata?.name;
2366
+ name = metadata == null ? void 0 : metadata.name;
2346
2367
  }
2347
2368
  if (!name && typeof nameOrCtor === "object") {
2348
2369
  const metadata = nameOrCtor[DATATYPE_METADATA];
2349
- name = metadata?.name;
2370
+ name = metadata == null ? void 0 : metadata.name;
2350
2371
  }
2351
2372
  return name ? this[kMap].get(name) : void 0;
2352
2373
  }
@@ -2358,7 +2379,7 @@ var DataTypeMap = class {
2358
2379
  this[kCtorMap2].set(dataType.instance, name);
2359
2380
  }
2360
2381
  has(nameOrCtor) {
2361
- if (nameOrCtor instanceof DataType)
2382
+ if (nameOrCtor instanceof DataType2)
2362
2383
  return !!nameOrCtor.name && this[kMap].has(nameOrCtor.name);
2363
2384
  const name = typeof nameOrCtor === "string" ? nameOrCtor : this[kCtorMap2].get(nameOrCtor);
2364
2385
  return name ? this[kMap].has(name) : false;
@@ -2380,17 +2401,20 @@ var DataTypeMap = class {
2380
2401
  return this[kMap][Symbol.iterator]();
2381
2402
  }
2382
2403
  };
2404
+ __name(_DataTypeMap, "DataTypeMap");
2405
+ var DataTypeMap = _DataTypeMap;
2383
2406
 
2384
- // ../../build/common/esm/document/decorators/http-controller.decorator.js
2407
+ // src/document/decorators/http-controller.decorator.ts
2385
2408
  import omit3 from "lodash.omit";
2386
2409
  import merge2 from "putil-merge";
2387
2410
  var CLASS_NAME_PATTERN2 = /^(.*)(Collection|Singleton|Resource|Controller)$/;
2388
2411
  function HttpControllerDecoratorFactory(options) {
2389
2412
  const decoratorChain = [];
2390
2413
  const decorator = /* @__PURE__ */ __name(function(target) {
2391
- let name = options?.name;
2414
+ var _a45;
2415
+ let name = options == null ? void 0 : options.name;
2392
2416
  if (!name)
2393
- name = CLASS_NAME_PATTERN2.exec(target.name)?.[1] || target.name;
2417
+ name = ((_a45 = CLASS_NAME_PATTERN2.exec(target.name)) == null ? void 0 : _a45[1]) || target.name;
2394
2418
  const metadata = {};
2395
2419
  const baseMetadata = Reflect.getOwnMetadata(HTTP_CONTROLLER_METADATA, Object.getPrototypeOf(target));
2396
2420
  if (baseMetadata)
@@ -2459,7 +2483,8 @@ function HttpControllerDecoratorFactory(options) {
2459
2483
  };
2460
2484
  decorator.KeyParam = (name, arg1) => {
2461
2485
  decoratorChain.push((meta) => {
2462
- if (!meta.path?.includes(":" + name))
2486
+ var _a45;
2487
+ if (!((_a45 = meta.path) == null ? void 0 : _a45.includes(":" + name)))
2463
2488
  meta.path = (meta.path || "") + "@:" + name;
2464
2489
  const paramMeta = typeof arg1 === "string" || typeof arg1 === "function" ? {
2465
2490
  name,
@@ -2488,8 +2513,9 @@ function HttpControllerDecoratorFactory(options) {
2488
2513
  }
2489
2514
  __name(HttpControllerDecoratorFactory, "HttpControllerDecoratorFactory");
2490
2515
 
2491
- // ../../build/common/esm/document/http/http-controller.js
2516
+ // src/document/http/http-controller.ts
2492
2517
  var HttpController2 = /* @__PURE__ */ __name(function(...args) {
2518
+ var _a45;
2493
2519
  if (!this)
2494
2520
  return HttpController2[DECORATOR].apply(void 0, args);
2495
2521
  const [owner, initArgs] = args;
@@ -2508,12 +2534,9 @@ var HttpController2 = /* @__PURE__ */ __name(function(...args) {
2508
2534
  _this.instance = initArgs.instance;
2509
2535
  _this.ctor = initArgs.ctor;
2510
2536
  _this._controllerReverseMap = /* @__PURE__ */ new WeakMap();
2511
- _this._initialize?.(initArgs);
2537
+ (_a45 = _this._initialize) == null ? void 0 : _a45.call(_this, initArgs);
2512
2538
  }, "HttpController");
2513
- var HttpControllerClass = class extends DocumentElement {
2514
- static {
2515
- __name(this, "HttpControllerClass");
2516
- }
2539
+ var _HttpControllerClass = class _HttpControllerClass extends DocumentElement {
2517
2540
  /**
2518
2541
  * @property isRoot
2519
2542
  */
@@ -2622,15 +2645,14 @@ var HttpControllerClass = class extends DocumentElement {
2622
2645
  return `[${colorFgYellow}HttpController${colorFgMagenta + this.name + colorReset}]`;
2623
2646
  }
2624
2647
  };
2648
+ __name(_HttpControllerClass, "HttpControllerClass");
2649
+ var HttpControllerClass = _HttpControllerClass;
2625
2650
  HttpController2.prototype = HttpControllerClass.prototype;
2626
2651
  Object.assign(HttpController2, HttpControllerDecoratorFactory);
2627
2652
  HttpController2[DECORATOR] = HttpControllerDecoratorFactory;
2628
2653
 
2629
- // ../../build/common/esm/document/http/http-api.js
2630
- var HttpApi = class extends ApiBase {
2631
- static {
2632
- __name(this, "HttpApi");
2633
- }
2654
+ // src/document/http/http-api.ts
2655
+ var _HttpApi = class _HttpApi extends ApiBase {
2634
2656
  constructor(owner) {
2635
2657
  super(owner);
2636
2658
  this._controllerReverseMap = /* @__PURE__ */ new WeakMap();
@@ -2642,7 +2664,7 @@ var HttpApi = class extends ApiBase {
2642
2664
  }
2643
2665
  findOperation(arg0, operationName) {
2644
2666
  const controller = this.findController(arg0);
2645
- return controller?.operations.get(operationName);
2667
+ return controller == null ? void 0 : controller.operations.get(operationName);
2646
2668
  }
2647
2669
  toJSON() {
2648
2670
  const schema = super.toJSON();
@@ -2658,12 +2680,14 @@ var HttpApi = class extends ApiBase {
2658
2680
  return out;
2659
2681
  }
2660
2682
  };
2683
+ __name(_HttpApi, "HttpApi");
2684
+ var HttpApi2 = _HttpApi;
2661
2685
 
2662
- // ../../build/common/esm/document/http/http-media-type.js
2686
+ // src/document/http/http-media-type.ts
2663
2687
  import typeIs from "@browsery/type-is";
2664
2688
  import { asMutable as asMutable11 } from "ts-gems";
2665
2689
  import { isAny as isAny2, vg as vg3 } from "valgen";
2666
- var HttpMediaType = /* @__PURE__ */ __name(function(owner, initArgs) {
2690
+ var HttpMediaType2 = /* @__PURE__ */ __name(function(owner, initArgs) {
2667
2691
  if (!this)
2668
2692
  throw new TypeError('"this" should be passed to call class constructor');
2669
2693
  DocumentElement.call(this, owner);
@@ -2682,15 +2706,12 @@ var HttpMediaType = /* @__PURE__ */ __name(function(owner, initArgs) {
2682
2706
  _this.maxFiles = initArgs.maxFiles;
2683
2707
  _this.maxFileSize = initArgs.maxFileSize;
2684
2708
  _this.maxTotalFileSize = initArgs.maxTotalFileSize;
2685
- if (initArgs?.type) {
2686
- _this.type = initArgs?.type instanceof DataType ? initArgs.type : _this.owner.node.getDataType(initArgs.type);
2709
+ if (initArgs == null ? void 0 : initArgs.type) {
2710
+ _this.type = (initArgs == null ? void 0 : initArgs.type) instanceof DataType2 ? initArgs.type : _this.owner.node.getDataType(initArgs.type);
2687
2711
  }
2688
2712
  _this.isArray = initArgs.isArray;
2689
2713
  }, "HttpMediaType");
2690
- var HttpMediaTypeClass = class extends DocumentElement {
2691
- static {
2692
- __name(this, "HttpMediaTypeClass");
2693
- }
2714
+ var _HttpMediaTypeClass = class _HttpMediaTypeClass extends DocumentElement {
2694
2715
  findMultipartField(fieldName, fieldType) {
2695
2716
  if (!this.multipartFields)
2696
2717
  return;
@@ -2701,12 +2722,13 @@ var HttpMediaTypeClass = class extends DocumentElement {
2701
2722
  }
2702
2723
  }
2703
2724
  toJSON() {
2725
+ var _a45, _b2;
2704
2726
  const typeName = this.type ? this.node.getDataTypeNameWithNs(this.type) : void 0;
2705
2727
  const out = omitUndefined({
2706
2728
  description: this.description,
2707
2729
  contentType: this.contentType,
2708
2730
  contentEncoding: this.contentEncoding,
2709
- type: typeName ? typeName : this.type?.toJSON(),
2731
+ type: typeName ? typeName : (_a45 = this.type) == null ? void 0 : _a45.toJSON(),
2710
2732
  isArray: this.isArray,
2711
2733
  example: this.example,
2712
2734
  examples: this.examples,
@@ -2716,7 +2738,7 @@ var HttpMediaTypeClass = class extends DocumentElement {
2716
2738
  maxFileSize: this.maxFileSize,
2717
2739
  maxTotalFileSize: this.maxTotalFileSize
2718
2740
  });
2719
- if (this.multipartFields?.length) {
2741
+ if ((_b2 = this.multipartFields) == null ? void 0 : _b2.length) {
2720
2742
  out.multipartFields = this.multipartFields.map((x) => x.toJSON());
2721
2743
  }
2722
2744
  return out;
@@ -2735,21 +2757,23 @@ var HttpMediaTypeClass = class extends DocumentElement {
2735
2757
  return this.isArray ? vg3.isArray(fn) : fn;
2736
2758
  }
2737
2759
  };
2738
- HttpMediaType.prototype = HttpMediaTypeClass.prototype;
2760
+ __name(_HttpMediaTypeClass, "HttpMediaTypeClass");
2761
+ var HttpMediaTypeClass = _HttpMediaTypeClass;
2762
+ HttpMediaType2.prototype = HttpMediaTypeClass.prototype;
2739
2763
 
2740
- // ../../build/common/esm/document/utils/parse-regexp.util.js
2764
+ // src/document/utils/parse-regexp.util.ts
2741
2765
  function parseRegExp(str, options) {
2742
2766
  const i = str.lastIndexOf("/");
2743
2767
  if (str.startsWith("/") && i) {
2744
2768
  const s = str.substring(1, i);
2745
2769
  let flags = str.substring(i + 1);
2746
- if (options?.includeFlags) {
2747
- for (const f of options?.includeFlags)
2770
+ if (options == null ? void 0 : options.includeFlags) {
2771
+ for (const f of options == null ? void 0 : options.includeFlags)
2748
2772
  if (!flags.includes(f))
2749
2773
  flags += f;
2750
2774
  }
2751
- if (options?.excludeFlags) {
2752
- for (const f of options?.excludeFlags)
2775
+ if (options == null ? void 0 : options.excludeFlags) {
2776
+ for (const f of options == null ? void 0 : options.excludeFlags)
2753
2777
  flags.replace(f, "");
2754
2778
  }
2755
2779
  return new RegExp(s, flags);
@@ -2758,11 +2782,8 @@ function parseRegExp(str, options) {
2758
2782
  }
2759
2783
  __name(parseRegExp, "parseRegExp");
2760
2784
 
2761
- // ../../build/common/esm/document/http/http-multipart-field.js
2762
- var HttpMultipartField = class extends HttpMediaType {
2763
- static {
2764
- __name(this, "HttpMultipartField");
2765
- }
2785
+ // src/document/http/http-multipart-field.ts
2786
+ var _HttpMultipartField = class _HttpMultipartField extends HttpMediaType2 {
2766
2787
  constructor(owner, initArgs) {
2767
2788
  super(owner, initArgs);
2768
2789
  this.owner = owner;
@@ -2779,15 +2800,17 @@ var HttpMultipartField = class extends HttpMediaType {
2779
2800
  });
2780
2801
  }
2781
2802
  };
2803
+ __name(_HttpMultipartField, "HttpMultipartField");
2804
+ var HttpMultipartField2 = _HttpMultipartField;
2782
2805
 
2783
- // ../../build/common/esm/document/http/http-operation.js
2784
- import nodePath2 from "node:path";
2806
+ // src/document/http/http-operation.ts
2807
+ import nodePath2 from "path-browserify";
2785
2808
  import { asMutable as asMutable12 } from "ts-gems";
2786
2809
 
2787
- // ../../build/common/esm/document/decorators/http-operation.decorator.js
2810
+ // src/document/decorators/http-operation.decorator.ts
2788
2811
  import omit4 from "lodash.omit";
2789
2812
 
2790
- // ../../build/common/esm/http/enums/http-headers-codes.enum.js
2813
+ // src/http/enums/http-headers-codes.enum.ts
2791
2814
  var HttpHeaderCodes;
2792
2815
  (function(HttpHeaderCodes2) {
2793
2816
  HttpHeaderCodes2["X_Opra_Version"] = "X-Opra-Version";
@@ -2882,7 +2905,7 @@ var HttpHeaderCodes;
2882
2905
  HttpHeaderCodes2["Max_Forwards"] = "Max-Forwards";
2883
2906
  })(HttpHeaderCodes || (HttpHeaderCodes = {}));
2884
2907
 
2885
- // ../../build/common/esm/http/enums/http-status-codes.enum.js
2908
+ // src/http/enums/http-status-codes.enum.ts
2886
2909
  var HttpStatusCode;
2887
2910
  (function(HttpStatusCode2) {
2888
2911
  HttpStatusCode2[HttpStatusCode2["CONTINUE"] = 100] = "CONTINUE";
@@ -2943,7 +2966,7 @@ var HttpStatusCode;
2943
2966
  HttpStatusCode2[HttpStatusCode2["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
2944
2967
  })(HttpStatusCode || (HttpStatusCode = {}));
2945
2968
 
2946
- // ../../build/common/esm/http/enums/http-status-messages.js
2969
+ // src/http/enums/http-status-messages.ts
2947
2970
  var HttpStatusMessages = {
2948
2971
  "100": "Continue",
2949
2972
  "101": "Switching Protocols",
@@ -3010,7 +3033,7 @@ var HttpStatusMessages = {
3010
3033
  "511": "Network Authentication Required"
3011
3034
  };
3012
3035
 
3013
- // ../../build/common/esm/http/enums/mime-types.enum.js
3036
+ // src/http/enums/mime-types.enum.ts
3014
3037
  var MimeTypes;
3015
3038
  (function(MimeTypes2) {
3016
3039
  MimeTypes2["json"] = "application/json";
@@ -3022,7 +3045,7 @@ var MimeTypes;
3022
3045
  MimeTypes2["binary"] = "binary/octet-stream";
3023
3046
  })(MimeTypes || (MimeTypes = {}));
3024
3047
 
3025
- // ../../build/common/esm/document/decorators/http-operation.decorator.js
3048
+ // src/document/decorators/http-operation.decorator.ts
3026
3049
  function HttpOperationDecoratorFactory(decoratorChain, options) {
3027
3050
  const decorator = /* @__PURE__ */ __name((target, propertyKey) => {
3028
3051
  if (typeof propertyKey !== "string")
@@ -3129,7 +3152,7 @@ function HttpOperationDecoratorFactory(decoratorChain, options) {
3129
3152
  decorator.MultipartContent = function(contentOpts, subInit) {
3130
3153
  const contentMetadata = {
3131
3154
  ...contentOpts,
3132
- contentType: contentOpts?.contentType || "multipart/form-data"
3155
+ contentType: (contentOpts == null ? void 0 : contentOpts.contentType) || "multipart/form-data"
3133
3156
  };
3134
3157
  decoratorChain.push((operationMetadata) => {
3135
3158
  operationMetadata.requestBody = operationMetadata.requestBody || { required: true, content: [] };
@@ -3172,7 +3195,7 @@ function HttpOperationDecoratorFactory(decoratorChain, options) {
3172
3195
  }
3173
3196
  __name(HttpOperationDecoratorFactory, "HttpOperationDecoratorFactory");
3174
3197
 
3175
- // ../../build/common/esm/document/http/http-operation.js
3198
+ // src/document/http/http-operation.ts
3176
3199
  var HttpOperation2 = /* @__PURE__ */ __name(function(...args) {
3177
3200
  if (!this) {
3178
3201
  const [options] = args;
@@ -3195,10 +3218,7 @@ var HttpOperation2 = /* @__PURE__ */ __name(function(...args) {
3195
3218
  _this.composition = initArgs.composition;
3196
3219
  _this.compositionOptions = initArgs.compositionOptions ? cloneObject(initArgs.compositionOptions) : void 0;
3197
3220
  }, "HttpOperation");
3198
- var HttpOperationClass = class extends DocumentElement {
3199
- static {
3200
- __name(this, "HttpOperationClass");
3201
- }
3221
+ var _HttpOperationClass = class _HttpOperationClass extends DocumentElement {
3202
3222
  findParameter(paramName, location) {
3203
3223
  const paramNameLower = paramName.toLowerCase();
3204
3224
  let prm;
@@ -3227,6 +3247,7 @@ var HttpOperationClass = class extends DocumentElement {
3227
3247
  return this.path || "/";
3228
3248
  }
3229
3249
  toJSON() {
3250
+ var _a45;
3230
3251
  const out = omitUndefined({
3231
3252
  kind: OpraSchema.HttpOperation.Kind,
3232
3253
  description: this.description,
@@ -3234,7 +3255,7 @@ var HttpOperationClass = class extends DocumentElement {
3234
3255
  path: this.path,
3235
3256
  mergePath: this.mergePath,
3236
3257
  composition: this.composition,
3237
- requestBody: this.requestBody?.toJSON()
3258
+ requestBody: (_a45 = this.requestBody) == null ? void 0 : _a45.toJSON()
3238
3259
  });
3239
3260
  if (this.parameters.length) {
3240
3261
  out.parameters = [];
@@ -3247,6 +3268,8 @@ var HttpOperationClass = class extends DocumentElement {
3247
3268
  return out;
3248
3269
  }
3249
3270
  };
3271
+ __name(_HttpOperationClass, "HttpOperationClass");
3272
+ var HttpOperationClass = _HttpOperationClass;
3250
3273
  HttpOperation2.prototype = HttpOperationClass.prototype;
3251
3274
  HttpOperation2[DECORATOR] = HttpOperationDecoratorFactory;
3252
3275
  HttpOperation2.GET = function(options) {
@@ -3274,12 +3297,9 @@ HttpOperation2.SEARCH = function(options) {
3274
3297
  return HttpOperationDecoratorFactory([], { ...options, method: "SEARCH" });
3275
3298
  };
3276
3299
 
3277
- // ../../build/common/esm/document/http/http-status-range.js
3300
+ // src/document/http/http-status-range.ts
3278
3301
  var STATUS_RANGE_PATTERN = /^([1-6]\d{2})(?:-([1-6]\d{2}))?$/;
3279
- var HttpStatusRange = class {
3280
- static {
3281
- __name(this, "HttpStatusRange");
3282
- }
3302
+ var _HttpStatusRange = class _HttpStatusRange {
3283
3303
  constructor(arg0, arg1) {
3284
3304
  this.start = 0;
3285
3305
  this.end = 0;
@@ -3314,16 +3334,15 @@ var HttpStatusRange = class {
3314
3334
  return !this.end || this.start === this.end ? this.start : { start: this.start, end: this.end };
3315
3335
  }
3316
3336
  };
3337
+ __name(_HttpStatusRange, "HttpStatusRange");
3338
+ var HttpStatusRange2 = _HttpStatusRange;
3317
3339
 
3318
- // ../../build/common/esm/document/http/http-operation-response.js
3319
- var HttpOperationResponse = class extends HttpMediaType {
3320
- static {
3321
- __name(this, "HttpOperationResponse");
3322
- }
3340
+ // src/document/http/http-operation-response.ts
3341
+ var _HttpOperationResponse = class _HttpOperationResponse extends HttpMediaType2 {
3323
3342
  constructor(owner, init) {
3324
3343
  super(owner, init);
3325
3344
  this.parameters = [];
3326
- this.statusCode = (Array.isArray(init.statusCode) ? init.statusCode : [init.statusCode]).map((x) => typeof x === "object" ? new HttpStatusRange(x.start, x.end) : new HttpStatusRange(x));
3345
+ this.statusCode = (Array.isArray(init.statusCode) ? init.statusCode : [init.statusCode]).map((x) => typeof x === "object" ? new HttpStatusRange2(x.start, x.end) : new HttpStatusRange2(x));
3327
3346
  this.partial = init.partial;
3328
3347
  }
3329
3348
  findParameter(paramName, location) {
@@ -3350,13 +3369,15 @@ var HttpOperationResponse = class extends HttpMediaType {
3350
3369
  return out;
3351
3370
  }
3352
3371
  };
3372
+ __name(_HttpOperationResponse, "HttpOperationResponse");
3373
+ var HttpOperationResponse2 = _HttpOperationResponse;
3353
3374
 
3354
- // ../../build/common/esm/document/http/http-parameter.js
3375
+ // src/document/http/http-parameter.ts
3355
3376
  import { asMutable as asMutable14 } from "ts-gems";
3356
3377
 
3357
- // ../../build/common/esm/document/common/value.js
3378
+ // src/document/common/value.ts
3358
3379
  import { asMutable as asMutable13 } from "ts-gems";
3359
- var Value = /* @__PURE__ */ __name(function(owner, initArgs) {
3380
+ var Value2 = /* @__PURE__ */ __name(function(owner, initArgs) {
3360
3381
  if (!this)
3361
3382
  throw new TypeError('"this" should be passed to call class constructor');
3362
3383
  DocumentElement.call(this, owner);
@@ -3366,10 +3387,7 @@ var Value = /* @__PURE__ */ __name(function(owner, initArgs) {
3366
3387
  _this.examples = initArgs.examples;
3367
3388
  _this.isArray = initArgs.isArray;
3368
3389
  }, "Value");
3369
- var ValueClass = class extends DocumentElement {
3370
- static {
3371
- __name(this, "ValueClass");
3372
- }
3390
+ var _ValueClass = class _ValueClass extends DocumentElement {
3373
3391
  toJSON() {
3374
3392
  const typeName = this.type ? this.node.getDataTypeNameWithNs(this.type) : void 0;
3375
3393
  return omitUndefined({
@@ -3380,13 +3398,15 @@ var ValueClass = class extends DocumentElement {
3380
3398
  });
3381
3399
  }
3382
3400
  };
3383
- Value.prototype = ValueClass.prototype;
3401
+ __name(_ValueClass, "ValueClass");
3402
+ var ValueClass = _ValueClass;
3403
+ Value2.prototype = ValueClass.prototype;
3384
3404
 
3385
- // ../../build/common/esm/document/http/http-parameter.js
3386
- var HttpParameter = /* @__PURE__ */ __name(function(owner, initArgs) {
3405
+ // src/document/http/http-parameter.ts
3406
+ var HttpParameter2 = /* @__PURE__ */ __name(function(owner, initArgs) {
3387
3407
  if (!this)
3388
3408
  throw new TypeError('"this" should be passed to call class constructor');
3389
- Value.call(this, owner, initArgs);
3409
+ Value2.call(this, owner, initArgs);
3390
3410
  const _this = asMutable14(this);
3391
3411
  if (initArgs.name) {
3392
3412
  _this.name = initArgs.name instanceof RegExp ? initArgs.name : initArgs.name.startsWith("/") ? parseRegExp(initArgs.name, {
@@ -3402,10 +3422,7 @@ var HttpParameter = /* @__PURE__ */ __name(function(owner, initArgs) {
3402
3422
  _this.arraySeparator = initArgs.arraySeparator;
3403
3423
  _this.keyParam = initArgs.keyParam;
3404
3424
  }, "HttpParameter");
3405
- var HttpParameterClass = class extends Value {
3406
- static {
3407
- __name(this, "HttpParameterClass");
3408
- }
3425
+ var _HttpParameterClass = class _HttpParameterClass extends Value2 {
3409
3426
  toJSON() {
3410
3427
  return omitUndefined({
3411
3428
  ...super.toJSON(),
@@ -3418,13 +3435,12 @@ var HttpParameterClass = class extends Value {
3418
3435
  });
3419
3436
  }
3420
3437
  };
3421
- HttpParameter.prototype = HttpParameterClass.prototype;
3438
+ __name(_HttpParameterClass, "HttpParameterClass");
3439
+ var HttpParameterClass = _HttpParameterClass;
3440
+ HttpParameter2.prototype = HttpParameterClass.prototype;
3422
3441
 
3423
- // ../../build/common/esm/document/http/http-request-body.js
3424
- var HttpRequestBody = class extends DocumentElement {
3425
- static {
3426
- __name(this, "HttpRequestBody");
3427
- }
3442
+ // src/document/http/http-request-body.ts
3443
+ var _HttpRequestBody = class _HttpRequestBody extends DocumentElement {
3428
3444
  constructor(owner) {
3429
3445
  super(owner);
3430
3446
  this.content = [];
@@ -3439,12 +3455,11 @@ var HttpRequestBody = class extends DocumentElement {
3439
3455
  });
3440
3456
  }
3441
3457
  };
3458
+ __name(_HttpRequestBody, "HttpRequestBody");
3459
+ var HttpRequestBody2 = _HttpRequestBody;
3442
3460
 
3443
- // ../../build/common/esm/document/factory/http-api.factory.js
3444
- var HttpApiFactory = class {
3445
- static {
3446
- __name(this, "HttpApiFactory");
3447
- }
3461
+ // src/document/factory/http-api.factory.ts
3462
+ var _HttpApiFactory = class _HttpApiFactory {
3448
3463
  /**
3449
3464
  * Generates HttpApi
3450
3465
  * @param context
@@ -3452,7 +3467,7 @@ var HttpApiFactory = class {
3452
3467
  * @param init
3453
3468
  */
3454
3469
  static async createApi(context, document, init) {
3455
- const api = new HttpApi(document);
3470
+ const api = new HttpApi2(document);
3456
3471
  api.name = init.name;
3457
3472
  api.description = init.description;
3458
3473
  api.url = init.url;
@@ -3532,7 +3547,7 @@ var HttpApiFactory = class {
3532
3547
  if (!prmArgs.type)
3533
3548
  prmArgs.type = controller.node.getDataType("any");
3534
3549
  });
3535
- const prm = new HttpParameter(controller, prmArgs);
3550
+ const prm = new HttpParameter2(controller, prmArgs);
3536
3551
  controller.parameters.push(prm);
3537
3552
  });
3538
3553
  }
@@ -3614,7 +3629,7 @@ var HttpApiFactory = class {
3614
3629
  if (!prmArgs.type)
3615
3630
  prmArgs.type = operation.node.getDataType("any");
3616
3631
  });
3617
- const prm = new HttpParameter(operation, prmArgs);
3632
+ const prm = new HttpParameter2(operation, prmArgs);
3618
3633
  operation.parameters.push(prm);
3619
3634
  });
3620
3635
  }
@@ -3625,7 +3640,7 @@ var HttpApiFactory = class {
3625
3640
  let i = 0;
3626
3641
  for (const v of metadata.responses) {
3627
3642
  await context.enterAsync(`[${i++}]`, async () => {
3628
- const response = new HttpOperationResponse(operation, { statusCode: v.statusCode });
3643
+ const response = new HttpOperationResponse2(operation, { statusCode: v.statusCode });
3629
3644
  await this._initHttpOperationResponse(context, response, v);
3630
3645
  operation.responses.push(response);
3631
3646
  });
@@ -3634,7 +3649,7 @@ var HttpApiFactory = class {
3634
3649
  }
3635
3650
  if (metadata.requestBody) {
3636
3651
  await context.enterAsync(".requestBody", async () => {
3637
- const requestBody = new HttpRequestBody(operation);
3652
+ const requestBody = new HttpRequestBody2(operation);
3638
3653
  await this._initHttpRequestBody(context, requestBody, metadata.requestBody);
3639
3654
  operation.requestBody = requestBody;
3640
3655
  });
@@ -3649,7 +3664,7 @@ var HttpApiFactory = class {
3649
3664
  * @protected
3650
3665
  */
3651
3666
  static async _initHttpMediaType(context, target, metadata) {
3652
- HttpMediaType.call(target, target.owner, {
3667
+ HttpMediaType2.call(target, target.owner, {
3653
3668
  ...metadata,
3654
3669
  type: void 0,
3655
3670
  multipartFields: void 0
@@ -3670,7 +3685,7 @@ var HttpApiFactory = class {
3670
3685
  for (let i = 0; i < metadata.multipartFields.length; i++) {
3671
3686
  await context.enterAsync(`[${i}]`, async () => {
3672
3687
  const src = metadata.multipartFields[i];
3673
- const field = new HttpMultipartField(target, { fieldName: src.fieldName, fieldType: src.fieldType });
3688
+ const field = new HttpMultipartField2(target, { fieldName: src.fieldName, fieldType: src.fieldType });
3674
3689
  await this._initHttpMediaType(context, field, src);
3675
3690
  target.multipartFields.push(field);
3676
3691
  });
@@ -3703,7 +3718,7 @@ var HttpApiFactory = class {
3703
3718
  if (!prmArgs.type)
3704
3719
  prmArgs.type = target.node.getDataType("any");
3705
3720
  });
3706
- const prm = new HttpParameter(target, prmArgs);
3721
+ const prm = new HttpParameter2(target, prmArgs);
3707
3722
  target.parameters.push(prm);
3708
3723
  });
3709
3724
  }
@@ -3728,7 +3743,7 @@ var HttpApiFactory = class {
3728
3743
  for (let i = 0; i < metadata.content.length; i++) {
3729
3744
  await context.enterAsync(`[${i}]`, async () => {
3730
3745
  const src = metadata.content[i];
3731
- const field = new HttpMediaType(target, String(i));
3746
+ const field = new HttpMediaType2(target, String(i));
3732
3747
  await this._initHttpMediaType(context, field, src);
3733
3748
  target.content.push(field);
3734
3749
  });
@@ -3737,14 +3752,13 @@ var HttpApiFactory = class {
3737
3752
  }
3738
3753
  }
3739
3754
  };
3755
+ __name(_HttpApiFactory, "HttpApiFactory");
3756
+ var HttpApiFactory = _HttpApiFactory;
3740
3757
 
3741
- // ../../build/common/esm/document/api-document.js
3758
+ // src/document/api-document.ts
3742
3759
  import { md5 } from "super-fast-md5";
3743
3760
  var _a2;
3744
- var ApiDocument = class extends DocumentElement {
3745
- static {
3746
- __name(this, "ApiDocument");
3747
- }
3761
+ var _ApiDocument = class _ApiDocument extends DocumentElement {
3748
3762
  constructor() {
3749
3763
  super(null);
3750
3764
  this[_a2] = /* @__PURE__ */ new WeakMap();
@@ -3760,7 +3774,7 @@ var ApiDocument = class extends DocumentElement {
3760
3774
  * @param nameOrCtor
3761
3775
  */
3762
3776
  getDataTypeNs(nameOrCtor) {
3763
- const dt = nameOrCtor instanceof DataType ? this._findDataType(nameOrCtor.name || "") : this._findDataType(nameOrCtor);
3777
+ const dt = nameOrCtor instanceof DataType2 ? this._findDataType(nameOrCtor.name || "") : this._findDataType(nameOrCtor);
3764
3778
  if (dt)
3765
3779
  return this[kTypeNSMap].get(dt);
3766
3780
  }
@@ -3845,9 +3859,9 @@ var ApiDocument = class extends DocumentElement {
3845
3859
  const references = Array.from(this.references.keys()).reverse();
3846
3860
  for (const refNs of references) {
3847
3861
  const ref = this.references.get(refNs);
3848
- result = ref?.types.get(nameOrCtor);
3862
+ result = ref == null ? void 0 : ref.types.get(nameOrCtor);
3849
3863
  if (result) {
3850
- this[kTypeNSMap].set(result, ref?.[BUILTIN] ? "" : refNs);
3864
+ this[kTypeNSMap].set(result, (ref == null ? void 0 : ref[BUILTIN]) ? "" : refNs);
3851
3865
  return result;
3852
3866
  }
3853
3867
  }
@@ -3856,21 +3870,22 @@ var ApiDocument = class extends DocumentElement {
3856
3870
  visitedRefs.set(ref, true);
3857
3871
  result = ref._findDataType(nameOrCtor, visitedRefs);
3858
3872
  if (result) {
3859
- this[kTypeNSMap].set(result, ref?.[BUILTIN] ? "" : refNs);
3873
+ this[kTypeNSMap].set(result, (ref == null ? void 0 : ref[BUILTIN]) ? "" : refNs);
3860
3874
  return result;
3861
3875
  }
3862
3876
  }
3863
3877
  }
3864
3878
  };
3879
+ __name(_ApiDocument, "ApiDocument");
3880
+ var ApiDocument = _ApiDocument;
3865
3881
  _a2 = kTypeNSMap;
3866
3882
 
3867
- // ../../build/common/esm/document/data-type/extended-types/base64.type.js
3883
+ // src/document/data-type/extended-types/base64.type.ts
3868
3884
  import { __decorate, __metadata } from "tslib";
3869
3885
  import { vg as vg4 } from "valgen";
3870
- var Base64Type = class Base64Type2 {
3871
- static {
3872
- __name(this, "Base64Type");
3873
- }
3886
+ var _a3;
3887
+ var _a4;
3888
+ var Base64Type = (_a4 = class {
3874
3889
  constructor(attributes) {
3875
3890
  if (attributes)
3876
3891
  Object.assign(this, attributes);
@@ -3881,7 +3896,7 @@ var Base64Type = class Base64Type2 {
3881
3896
  [ENCODER]() {
3882
3897
  return vg4.isBase64({ coerce: true });
3883
3898
  }
3884
- };
3899
+ }, __name(_a4, "Base64Type"), _a4);
3885
3900
  Base64Type = __decorate([
3886
3901
  SimpleType2({
3887
3902
  description: "A stream of bytes, base64 encoded",
@@ -3890,16 +3905,15 @@ Base64Type = __decorate([
3890
3905
  json: "string"
3891
3906
  }
3892
3907
  }),
3893
- __metadata("design:paramtypes", [Object])
3908
+ __metadata("design:paramtypes", [typeof (_a3 = typeof Partial !== "undefined" && Partial) === "function" ? _a3 : Object])
3894
3909
  ], Base64Type);
3895
3910
 
3896
- // ../../build/common/esm/document/data-type/extended-types/date.type.js
3911
+ // src/document/data-type/extended-types/date.type.ts
3897
3912
  import { __decorate as __decorate2, __metadata as __metadata2 } from "tslib";
3898
3913
  import { isDateString, toString, vg as vg5 } from "valgen";
3899
- var DateType = class DateType2 {
3900
- static {
3901
- __name(this, "DateType");
3902
- }
3914
+ var _a5;
3915
+ var _a6;
3916
+ var DateType = (_a6 = class {
3903
3917
  constructor(attributes) {
3904
3918
  if (attributes)
3905
3919
  Object.assign(this, attributes);
@@ -3930,7 +3944,7 @@ var DateType = class DateType2 {
3930
3944
  }
3931
3945
  return x.length > 0 ? vg5.pipe([fn, ...x], { returnIndex: 0 }) : fn;
3932
3946
  }
3933
- };
3947
+ }, __name(_a6, "DateType"), _a6);
3934
3948
  __decorate2([
3935
3949
  SimpleType2.Attribute({
3936
3950
  description: "Minimum value"
@@ -3951,16 +3965,15 @@ DateType = __decorate2([
3951
3965
  json: "string"
3952
3966
  }
3953
3967
  }).Example("2021-04-18", "Full date value"),
3954
- __metadata2("design:paramtypes", [Object])
3968
+ __metadata2("design:paramtypes", [typeof (_a5 = typeof Partial !== "undefined" && Partial) === "function" ? _a5 : Object])
3955
3969
  ], DateType);
3956
3970
 
3957
- // ../../build/common/esm/document/data-type/extended-types/date-string.type.js
3971
+ // src/document/data-type/extended-types/date-string.type.ts
3958
3972
  import { __decorate as __decorate3, __metadata as __metadata3 } from "tslib";
3959
3973
  import { vg as vg6 } from "valgen";
3960
- var DateStringType = class DateStringType2 {
3961
- static {
3962
- __name(this, "DateStringType");
3963
- }
3974
+ var _a7;
3975
+ var _a8;
3976
+ var DateStringType = (_a8 = class {
3964
3977
  constructor(attributes) {
3965
3978
  if (attributes)
3966
3979
  Object.assign(this, attributes);
@@ -3977,7 +3990,7 @@ var DateStringType = class DateStringType2 {
3977
3990
  [ENCODER](properties) {
3978
3991
  return this[DECODER](properties);
3979
3992
  }
3980
- };
3993
+ }, __name(_a8, "DateStringType"), _a8);
3981
3994
  __decorate3([
3982
3995
  SimpleType2.Attribute({
3983
3996
  description: "Minimum value"
@@ -3998,16 +4011,15 @@ DateStringType = __decorate3([
3998
4011
  json: "string"
3999
4012
  }
4000
4013
  }).Example("2021-04-18", "Full date value").Example("2021-04", "Date value without day").Example("2021", "Year only value"),
4001
- __metadata3("design:paramtypes", [Object])
4014
+ __metadata3("design:paramtypes", [typeof (_a7 = typeof Partial !== "undefined" && Partial) === "function" ? _a7 : Object])
4002
4015
  ], DateStringType);
4003
4016
 
4004
- // ../../build/common/esm/document/data-type/extended-types/date-time.type.js
4017
+ // src/document/data-type/extended-types/date-time.type.ts
4005
4018
  import { __decorate as __decorate4, __metadata as __metadata4 } from "tslib";
4006
4019
  import { isDateString as isDateString2, toString as toString2, vg as vg7 } from "valgen";
4007
- var DateTimeType = class DateTimeType2 {
4008
- static {
4009
- __name(this, "DateTimeType");
4010
- }
4020
+ var _a9;
4021
+ var _a10;
4022
+ var DateTimeType = (_a10 = class {
4011
4023
  constructor(attributes) {
4012
4024
  if (attributes)
4013
4025
  Object.assign(this, attributes);
@@ -4038,7 +4050,7 @@ var DateTimeType = class DateTimeType2 {
4038
4050
  }
4039
4051
  return x.length > 0 ? vg7.pipe([fn, ...x], { returnIndex: 0 }) : fn;
4040
4052
  }
4041
- };
4053
+ }, __name(_a10, "DateTimeType"), _a10);
4042
4054
  __decorate4([
4043
4055
  SimpleType2.Attribute({
4044
4056
  description: "Minimum value"
@@ -4059,16 +4071,15 @@ DateTimeType = __decorate4([
4059
4071
  json: "string"
4060
4072
  }
4061
4073
  }).Example("2021-04-18T22:30:15").Example("2021-04-18 22:30:15").Example("2021-04-18 22:30"),
4062
- __metadata4("design:paramtypes", [Object])
4074
+ __metadata4("design:paramtypes", [typeof (_a9 = typeof Partial !== "undefined" && Partial) === "function" ? _a9 : Object])
4063
4075
  ], DateTimeType);
4064
4076
 
4065
- // ../../build/common/esm/document/data-type/extended-types/date-time-string.type.js
4077
+ // src/document/data-type/extended-types/date-time-string.type.ts
4066
4078
  import { __decorate as __decorate5, __metadata as __metadata5 } from "tslib";
4067
4079
  import { vg as vg8 } from "valgen";
4068
- var DateTimeStringType = class DateTimeStringType2 {
4069
- static {
4070
- __name(this, "DateTimeStringType");
4071
- }
4080
+ var _a11;
4081
+ var _a12;
4082
+ var DateTimeStringType = (_a12 = class {
4072
4083
  constructor(attributes) {
4073
4084
  if (attributes)
4074
4085
  Object.assign(this, attributes);
@@ -4085,7 +4096,7 @@ var DateTimeStringType = class DateTimeStringType2 {
4085
4096
  [ENCODER](properties) {
4086
4097
  return this[DECODER](properties);
4087
4098
  }
4088
- };
4099
+ }, __name(_a12, "DateTimeStringType"), _a12);
4089
4100
  __decorate5([
4090
4101
  SimpleType2.Attribute({
4091
4102
  description: "Minimum value"
@@ -4106,16 +4117,15 @@ DateTimeStringType = __decorate5([
4106
4117
  json: "string"
4107
4118
  }
4108
4119
  }).Example("2021-04-18T22:30:15+01:00", "Full date-time value with timezone").Example("2021-04-18T22:30:15", "Full date-time value without timezone").Example("2021-04-18 22:30", "Date-time value").Example("2021-04-18", "Date value").Example("2021-04", "Date value without day").Example("2021", "Year only value"),
4109
- __metadata5("design:paramtypes", [Object])
4120
+ __metadata5("design:paramtypes", [typeof (_a11 = typeof Partial !== "undefined" && Partial) === "function" ? _a11 : Object])
4110
4121
  ], DateTimeStringType);
4111
4122
 
4112
- // ../../build/common/esm/document/data-type/extended-types/email.type.js
4123
+ // src/document/data-type/extended-types/email.type.ts
4113
4124
  import { __decorate as __decorate6, __metadata as __metadata6 } from "tslib";
4114
4125
  import { vg as vg9 } from "valgen";
4115
- var EmailType = class EmailType2 {
4116
- static {
4117
- __name(this, "EmailType");
4118
- }
4126
+ var _a13;
4127
+ var _a14;
4128
+ var EmailType = (_a14 = class {
4119
4129
  constructor(attributes) {
4120
4130
  if (attributes)
4121
4131
  Object.assign(this, attributes);
@@ -4126,7 +4136,7 @@ var EmailType = class EmailType2 {
4126
4136
  [ENCODER](properties) {
4127
4137
  return vg9.isEmail({ ...properties, coerce: true });
4128
4138
  }
4129
- };
4139
+ }, __name(_a14, "EmailType"), _a14);
4130
4140
  __decorate6([
4131
4141
  SimpleType2.Attribute({
4132
4142
  description: "If set to `true`, the validator will also match `Display Name <email-address>",
@@ -4195,16 +4205,15 @@ EmailType = __decorate6([
4195
4205
  json: "string"
4196
4206
  }
4197
4207
  }).Example("some.body@example.com"),
4198
- __metadata6("design:paramtypes", [Object])
4208
+ __metadata6("design:paramtypes", [typeof (_a13 = typeof Partial !== "undefined" && Partial) === "function" ? _a13 : Object])
4199
4209
  ], EmailType);
4200
4210
 
4201
- // ../../build/common/esm/document/data-type/extended-types/field-path.type.js
4211
+ // src/document/data-type/extended-types/field-path.type.ts
4202
4212
  import { __decorate as __decorate7, __metadata as __metadata7 } from "tslib";
4203
4213
  import { toString as toString3, validator as validator2, vg as vg10 } from "valgen";
4204
- var FieldPathType = class FieldPathType2 {
4205
- static {
4206
- __name(this, "FieldPathType");
4207
- }
4214
+ var _a15;
4215
+ var _a16;
4216
+ var FieldPathType = (_a16 = class {
4208
4217
  constructor(attributes) {
4209
4218
  if (attributes)
4210
4219
  Object.assign(this, attributes);
@@ -4226,7 +4235,7 @@ var FieldPathType = class FieldPathType2 {
4226
4235
  allowSigns: properties.allowSigns
4227
4236
  };
4228
4237
  }
4229
- };
4238
+ }, __name(_a16, "FieldPathType"), _a16);
4230
4239
  __decorate7([
4231
4240
  SimpleType2.Attribute({
4232
4241
  description: "Data type which field belong to"
@@ -4247,18 +4256,15 @@ FieldPathType = __decorate7([
4247
4256
  json: "string"
4248
4257
  }
4249
4258
  }),
4250
- __metadata7("design:paramtypes", [Object])
4259
+ __metadata7("design:paramtypes", [typeof (_a15 = typeof Partial !== "undefined" && Partial) === "function" ? _a15 : Object])
4251
4260
  ], FieldPathType);
4252
4261
 
4253
- // ../../build/common/esm/document/data-type/extended-types/filter.type.js
4262
+ // src/document/data-type/extended-types/filter.type.ts
4254
4263
  import { __decorate as __decorate8, __metadata as __metadata8 } from "tslib";
4255
4264
  import { validator as validator3 } from "valgen";
4256
4265
 
4257
- // ../../build/common/esm/exception/opra-http-error.js
4258
- var OpraHttpError = class extends OpraException {
4259
- static {
4260
- __name(this, "OpraHttpError");
4261
- }
4266
+ // src/exception/opra-http-error.ts
4267
+ var _OpraHttpError = class _OpraHttpError extends OpraException {
4262
4268
  constructor(issue, arg1, arg2) {
4263
4269
  super(issue, arg1 instanceof Error ? arg1 : void 0);
4264
4270
  this.status = (typeof arg1 === "number" ? arg1 : Number(arg2)) || 500;
@@ -4275,12 +4281,11 @@ var OpraHttpError = class extends OpraException {
4275
4281
  super.initError(issue);
4276
4282
  }
4277
4283
  };
4284
+ __name(_OpraHttpError, "OpraHttpError");
4285
+ var OpraHttpError = _OpraHttpError;
4278
4286
 
4279
- // ../../build/common/esm/exception/http-errors/bad-request.error.js
4280
- var BadRequestError = class extends OpraHttpError {
4281
- static {
4282
- __name(this, "BadRequestError");
4283
- }
4287
+ // src/exception/http-errors/bad-request.error.ts
4288
+ var _BadRequestError = class _BadRequestError extends OpraHttpError {
4284
4289
  constructor() {
4285
4290
  super(...arguments);
4286
4291
  this.status = 400;
@@ -4293,12 +4298,11 @@ var BadRequestError = class extends OpraHttpError {
4293
4298
  });
4294
4299
  }
4295
4300
  };
4301
+ __name(_BadRequestError, "BadRequestError");
4302
+ var BadRequestError = _BadRequestError;
4296
4303
 
4297
- // ../../build/common/esm/exception/http-errors/conflict.error.js
4298
- var ConflictError = class extends OpraHttpError {
4299
- static {
4300
- __name(this, "ConflictError");
4301
- }
4304
+ // src/exception/http-errors/conflict.error.ts
4305
+ var _ConflictError = class _ConflictError extends OpraHttpError {
4302
4306
  constructor() {
4303
4307
  super(...arguments);
4304
4308
  this.status = 409;
@@ -4311,12 +4315,11 @@ var ConflictError = class extends OpraHttpError {
4311
4315
  });
4312
4316
  }
4313
4317
  };
4318
+ __name(_ConflictError, "ConflictError");
4319
+ var ConflictError = _ConflictError;
4314
4320
 
4315
- // ../../build/common/esm/exception/http-errors/failed-dependency.error.js
4316
- var FailedDependencyError = class extends OpraHttpError {
4317
- static {
4318
- __name(this, "FailedDependencyError");
4319
- }
4321
+ // src/exception/http-errors/failed-dependency.error.ts
4322
+ var _FailedDependencyError = class _FailedDependencyError extends OpraHttpError {
4320
4323
  constructor() {
4321
4324
  super(...arguments);
4322
4325
  this.status = 424;
@@ -4329,12 +4332,11 @@ var FailedDependencyError = class extends OpraHttpError {
4329
4332
  });
4330
4333
  }
4331
4334
  };
4335
+ __name(_FailedDependencyError, "FailedDependencyError");
4336
+ var FailedDependencyError = _FailedDependencyError;
4332
4337
 
4333
- // ../../build/common/esm/exception/http-errors/forbidden.error.js
4334
- var ForbiddenError = class extends OpraHttpError {
4335
- static {
4336
- __name(this, "ForbiddenError");
4337
- }
4338
+ // src/exception/http-errors/forbidden.error.ts
4339
+ var _ForbiddenError = class _ForbiddenError extends OpraHttpError {
4338
4340
  constructor() {
4339
4341
  super(...arguments);
4340
4342
  this.status = HttpStatusCode.FORBIDDEN;
@@ -4347,12 +4349,11 @@ var ForbiddenError = class extends OpraHttpError {
4347
4349
  });
4348
4350
  }
4349
4351
  };
4352
+ __name(_ForbiddenError, "ForbiddenError");
4353
+ var ForbiddenError = _ForbiddenError;
4350
4354
 
4351
- // ../../build/common/esm/exception/http-errors/internal-server.error.js
4352
- var InternalServerError = class extends OpraHttpError {
4353
- static {
4354
- __name(this, "InternalServerError");
4355
- }
4355
+ // src/exception/http-errors/internal-server.error.ts
4356
+ var _InternalServerError = class _InternalServerError extends OpraHttpError {
4356
4357
  constructor() {
4357
4358
  super(...arguments);
4358
4359
  this.status = 500;
@@ -4366,12 +4367,11 @@ var InternalServerError = class extends OpraHttpError {
4366
4367
  });
4367
4368
  }
4368
4369
  };
4370
+ __name(_InternalServerError, "InternalServerError");
4371
+ var InternalServerError = _InternalServerError;
4369
4372
 
4370
- // ../../build/common/esm/exception/http-errors/method-not-allowed.error.js
4371
- var MethodNotAllowedError = class extends OpraHttpError {
4372
- static {
4373
- __name(this, "MethodNotAllowedError");
4374
- }
4373
+ // src/exception/http-errors/method-not-allowed.error.ts
4374
+ var _MethodNotAllowedError = class _MethodNotAllowedError extends OpraHttpError {
4375
4375
  constructor() {
4376
4376
  super(...arguments);
4377
4377
  this.status = 405;
@@ -4384,12 +4384,11 @@ var MethodNotAllowedError = class extends OpraHttpError {
4384
4384
  });
4385
4385
  }
4386
4386
  };
4387
+ __name(_MethodNotAllowedError, "MethodNotAllowedError");
4388
+ var MethodNotAllowedError = _MethodNotAllowedError;
4387
4389
 
4388
- // ../../build/common/esm/exception/http-errors/not-acceptable.error.js
4389
- var NotAcceptableError = class extends OpraHttpError {
4390
- static {
4391
- __name(this, "NotAcceptableError");
4392
- }
4390
+ // src/exception/http-errors/not-acceptable.error.ts
4391
+ var _NotAcceptableError = class _NotAcceptableError extends OpraHttpError {
4393
4392
  constructor() {
4394
4393
  super(...arguments);
4395
4394
  this.status = 406;
@@ -4402,12 +4401,11 @@ var NotAcceptableError = class extends OpraHttpError {
4402
4401
  });
4403
4402
  }
4404
4403
  };
4404
+ __name(_NotAcceptableError, "NotAcceptableError");
4405
+ var NotAcceptableError = _NotAcceptableError;
4405
4406
 
4406
- // ../../build/common/esm/exception/http-errors/not-found.error.js
4407
- var NotFoundError = class extends OpraHttpError {
4408
- static {
4409
- __name(this, "NotFoundError");
4410
- }
4407
+ // src/exception/http-errors/not-found.error.ts
4408
+ var _NotFoundError = class _NotFoundError extends OpraHttpError {
4411
4409
  constructor() {
4412
4410
  super(...arguments);
4413
4411
  this.status = 404;
@@ -4420,12 +4418,11 @@ var NotFoundError = class extends OpraHttpError {
4420
4418
  });
4421
4419
  }
4422
4420
  };
4421
+ __name(_NotFoundError, "NotFoundError");
4422
+ var NotFoundError = _NotFoundError;
4423
4423
 
4424
- // ../../build/common/esm/exception/http-errors/permission.error.js
4425
- var PermissionError = class extends ForbiddenError {
4426
- static {
4427
- __name(this, "PermissionError");
4428
- }
4424
+ // src/exception/http-errors/permission.error.ts
4425
+ var _PermissionError = class _PermissionError extends ForbiddenError {
4429
4426
  init(issue) {
4430
4427
  super.init({
4431
4428
  message: translate("error:PERMISSION_ERROR", "You dont have permission for this operation"),
@@ -4434,12 +4431,11 @@ var PermissionError = class extends ForbiddenError {
4434
4431
  });
4435
4432
  }
4436
4433
  };
4434
+ __name(_PermissionError, "PermissionError");
4435
+ var PermissionError = _PermissionError;
4437
4436
 
4438
- // ../../build/common/esm/exception/http-errors/resource-conflict.error.js
4439
- var ResourceConflictError = class extends OpraHttpError {
4440
- static {
4441
- __name(this, "ResourceConflictError");
4442
- }
4437
+ // src/exception/http-errors/resource-conflict.error.ts
4438
+ var _ResourceConflictError = class _ResourceConflictError extends OpraHttpError {
4443
4439
  constructor(resource, fields, cause) {
4444
4440
  super({
4445
4441
  message: translate(`error:RESOURCE_CONFLICT`, { resource, fields }, `There is already an other {{resource}} resource with same values ({{fields}})`),
@@ -4453,12 +4449,11 @@ var ResourceConflictError = class extends OpraHttpError {
4453
4449
  this.status = 409;
4454
4450
  }
4455
4451
  };
4452
+ __name(_ResourceConflictError, "ResourceConflictError");
4453
+ var ResourceConflictError = _ResourceConflictError;
4456
4454
 
4457
- // ../../build/common/esm/exception/http-errors/resource-not.available.error.js
4458
- var ResourceNotAvailableError = class extends OpraHttpError {
4459
- static {
4460
- __name(this, "ResourceNotAvailableError");
4461
- }
4455
+ // src/exception/http-errors/resource-not.available.error.ts
4456
+ var _ResourceNotAvailableError = class _ResourceNotAvailableError extends OpraHttpError {
4462
4457
  constructor(resource, keyValue, cause) {
4463
4458
  super({
4464
4459
  message: translate(`error:RESOURCE_NOT_AVAILABLE`, `Resource "${resource}${keyValue ? "/" + keyValue : ""}" is not available`),
@@ -4471,12 +4466,11 @@ var ResourceNotAvailableError = class extends OpraHttpError {
4471
4466
  }, cause, HttpStatusCode.UNPROCESSABLE_ENTITY);
4472
4467
  }
4473
4468
  };
4469
+ __name(_ResourceNotAvailableError, "ResourceNotAvailableError");
4470
+ var ResourceNotAvailableError = _ResourceNotAvailableError;
4474
4471
 
4475
- // ../../build/common/esm/exception/http-errors/unauthorized.error.js
4476
- var UnauthorizedError = class extends OpraHttpError {
4477
- static {
4478
- __name(this, "UnauthorizedError");
4479
- }
4472
+ // src/exception/http-errors/unauthorized.error.ts
4473
+ var _UnauthorizedError = class _UnauthorizedError extends OpraHttpError {
4480
4474
  constructor() {
4481
4475
  super(...arguments);
4482
4476
  this.status = 401;
@@ -4489,12 +4483,11 @@ var UnauthorizedError = class extends OpraHttpError {
4489
4483
  });
4490
4484
  }
4491
4485
  };
4486
+ __name(_UnauthorizedError, "UnauthorizedError");
4487
+ var UnauthorizedError = _UnauthorizedError;
4492
4488
 
4493
- // ../../build/common/esm/exception/http-errors/unprocessable-entity.error.js
4494
- var UnprocessableEntityError = class extends OpraHttpError {
4495
- static {
4496
- __name(this, "UnprocessableEntityError");
4497
- }
4489
+ // src/exception/http-errors/unprocessable-entity.error.ts
4490
+ var _UnprocessableEntityError = class _UnprocessableEntityError extends OpraHttpError {
4498
4491
  constructor() {
4499
4492
  super(...arguments);
4500
4493
  this.status = 422;
@@ -4508,8 +4501,10 @@ var UnprocessableEntityError = class extends OpraHttpError {
4508
4501
  });
4509
4502
  }
4510
4503
  };
4504
+ __name(_UnprocessableEntityError, "UnprocessableEntityError");
4505
+ var UnprocessableEntityError = _UnprocessableEntityError;
4511
4506
 
4512
- // ../../build/common/esm/exception/issue-severity.enum.js
4507
+ // src/exception/issue-severity.enum.ts
4513
4508
  var IssueSeverity;
4514
4509
  (function(IssueSeverity2) {
4515
4510
  let Enum;
@@ -4530,7 +4525,7 @@ var IssueSeverity;
4530
4525
  };
4531
4526
  })(IssueSeverity || (IssueSeverity = {}));
4532
4527
 
4533
- // ../../build/common/esm/filter/opra-filter.ns.js
4528
+ // src/filter/opra-filter.ns.ts
4534
4529
  var opra_filter_ns_exports = {};
4535
4530
  __export(opra_filter_ns_exports, {
4536
4531
  $and: () => $and,
@@ -4577,35 +4572,29 @@ __export(opra_filter_ns_exports, {
4577
4572
  parse: () => parse2
4578
4573
  });
4579
4574
 
4580
- // ../../build/common/esm/filter/ast/abstract/ast.js
4581
- var Ast = class {
4582
- static {
4583
- __name(this, "Ast");
4584
- }
4575
+ // src/filter/ast/abstract/ast.ts
4576
+ var _Ast = class _Ast {
4585
4577
  constructor() {
4586
4578
  this.kind = Object.getPrototypeOf(this).constructor.name;
4587
4579
  }
4588
4580
  };
4581
+ __name(_Ast, "Ast");
4582
+ var Ast = _Ast;
4589
4583
 
4590
- // ../../build/common/esm/filter/ast/abstract/expression.js
4591
- var Expression = class extends Ast {
4592
- static {
4593
- __name(this, "Expression");
4594
- }
4584
+ // src/filter/ast/abstract/expression.ts
4585
+ var _Expression = class _Expression extends Ast {
4595
4586
  };
4587
+ __name(_Expression, "Expression");
4588
+ var Expression = _Expression;
4596
4589
 
4597
- // ../../build/common/esm/filter/ast/abstract/term.js
4598
- var Term = class extends Expression {
4599
- static {
4600
- __name(this, "Term");
4601
- }
4590
+ // src/filter/ast/abstract/term.ts
4591
+ var _Term = class _Term extends Expression {
4602
4592
  };
4593
+ __name(_Term, "Term");
4594
+ var Term = _Term;
4603
4595
 
4604
- // ../../build/common/esm/filter/ast/abstract/literal.js
4605
- var Literal = class extends Term {
4606
- static {
4607
- __name(this, "Literal");
4608
- }
4596
+ // src/filter/ast/abstract/literal.ts
4597
+ var _Literal = class _Literal extends Term {
4609
4598
  constructor(value) {
4610
4599
  super();
4611
4600
  this.value = value;
@@ -4614,12 +4603,11 @@ var Literal = class extends Term {
4614
4603
  return "" + this.value;
4615
4604
  }
4616
4605
  };
4606
+ __name(_Literal, "Literal");
4607
+ var Literal = _Literal;
4617
4608
 
4618
- // ../../build/common/esm/filter/ast/expressions/arithmetic-expression.js
4619
- var ArithmeticExpression = class extends Expression {
4620
- static {
4621
- __name(this, "ArithmeticExpression");
4622
- }
4609
+ // src/filter/ast/expressions/arithmetic-expression.ts
4610
+ var _ArithmeticExpression = class _ArithmeticExpression extends Expression {
4623
4611
  constructor() {
4624
4612
  super();
4625
4613
  this.items = [];
@@ -4635,20 +4623,18 @@ var ArithmeticExpression = class extends Expression {
4635
4623
  return this.items.map((child, i) => (i > 0 ? child.op : "") + child.expression).join("");
4636
4624
  }
4637
4625
  };
4638
- var ArithmeticExpressionItem = class {
4639
- static {
4640
- __name(this, "ArithmeticExpressionItem");
4641
- }
4626
+ __name(_ArithmeticExpression, "ArithmeticExpression");
4627
+ var ArithmeticExpression = _ArithmeticExpression;
4628
+ var _ArithmeticExpressionItem = class _ArithmeticExpressionItem {
4642
4629
  constructor(o) {
4643
4630
  Object.assign(this, o);
4644
4631
  }
4645
4632
  };
4633
+ __name(_ArithmeticExpressionItem, "ArithmeticExpressionItem");
4634
+ var ArithmeticExpressionItem = _ArithmeticExpressionItem;
4646
4635
 
4647
- // ../../build/common/esm/filter/ast/expressions/array-expression.js
4648
- var ArrayExpression = class extends Term {
4649
- static {
4650
- __name(this, "ArrayExpression");
4651
- }
4636
+ // src/filter/ast/expressions/array-expression.ts
4637
+ var _ArrayExpression = class _ArrayExpression extends Term {
4652
4638
  constructor(items) {
4653
4639
  super();
4654
4640
  this.items = items;
@@ -4657,13 +4643,12 @@ var ArrayExpression = class extends Term {
4657
4643
  return "[" + this.items.map((child) => "" + child).join(",") + "]";
4658
4644
  }
4659
4645
  };
4646
+ __name(_ArrayExpression, "ArrayExpression");
4647
+ var ArrayExpression = _ArrayExpression;
4660
4648
 
4661
- // ../../build/common/esm/filter/ast/expressions/comparison-expression.js
4649
+ // src/filter/ast/expressions/comparison-expression.ts
4662
4650
  var WORD_PATTERN = /\w/;
4663
- var ComparisonExpression = class extends Expression {
4664
- static {
4665
- __name(this, "ComparisonExpression");
4666
- }
4651
+ var _ComparisonExpression = class _ComparisonExpression extends Expression {
4667
4652
  constructor(o) {
4668
4653
  super();
4669
4654
  Object.assign(this, o);
@@ -4672,12 +4657,11 @@ var ComparisonExpression = class extends Expression {
4672
4657
  return `${this.left}${WORD_PATTERN.test(this.op) ? " " + this.op + " " : this.op}${this.right}`;
4673
4658
  }
4674
4659
  };
4660
+ __name(_ComparisonExpression, "ComparisonExpression");
4661
+ var ComparisonExpression = _ComparisonExpression;
4675
4662
 
4676
- // ../../build/common/esm/filter/ast/expressions/logical-expression.js
4677
- var LogicalExpression = class extends Expression {
4678
- static {
4679
- __name(this, "LogicalExpression");
4680
- }
4663
+ // src/filter/ast/expressions/logical-expression.ts
4664
+ var _LogicalExpression = class _LogicalExpression extends Expression {
4681
4665
  constructor(o) {
4682
4666
  super();
4683
4667
  Object.assign(this, o);
@@ -4690,12 +4674,11 @@ var LogicalExpression = class extends Expression {
4690
4674
  return this.items.map((child) => "" + child).join(" " + this.op + " ");
4691
4675
  }
4692
4676
  };
4677
+ __name(_LogicalExpression, "LogicalExpression");
4678
+ var LogicalExpression = _LogicalExpression;
4693
4679
 
4694
- // ../../build/common/esm/filter/ast/expressions/negative-expression.js
4695
- var NegativeExpression = class extends Expression {
4696
- static {
4697
- __name(this, "NegativeExpression");
4698
- }
4680
+ // src/filter/ast/expressions/negative-expression.ts
4681
+ var _NegativeExpression = class _NegativeExpression extends Expression {
4699
4682
  constructor(expression) {
4700
4683
  super();
4701
4684
  this.expression = expression;
@@ -4704,12 +4687,11 @@ var NegativeExpression = class extends Expression {
4704
4687
  return `(${this.expression})`;
4705
4688
  }
4706
4689
  };
4690
+ __name(_NegativeExpression, "NegativeExpression");
4691
+ var NegativeExpression = _NegativeExpression;
4707
4692
 
4708
- // ../../build/common/esm/filter/ast/expressions/parenthesized-expression.js
4709
- var ParenthesizedExpression = class extends Expression {
4710
- static {
4711
- __name(this, "ParenthesizedExpression");
4712
- }
4693
+ // src/filter/ast/expressions/parenthesized-expression.ts
4694
+ var _ParenthesizedExpression = class _ParenthesizedExpression extends Expression {
4713
4695
  constructor(expression) {
4714
4696
  super();
4715
4697
  this.expression = expression;
@@ -4718,47 +4700,45 @@ var ParenthesizedExpression = class extends Expression {
4718
4700
  return `(${this.expression})`;
4719
4701
  }
4720
4702
  };
4703
+ __name(_ParenthesizedExpression, "ParenthesizedExpression");
4704
+ var ParenthesizedExpression = _ParenthesizedExpression;
4721
4705
 
4722
- // ../../build/common/esm/filter/ast/terms/boolean-literal.js
4723
- var BooleanLiteral = class extends Literal {
4724
- static {
4725
- __name(this, "BooleanLiteral");
4726
- }
4706
+ // src/filter/ast/terms/boolean-literal.ts
4707
+ var _BooleanLiteral = class _BooleanLiteral extends Literal {
4727
4708
  constructor(value) {
4728
4709
  super(value);
4729
4710
  }
4730
4711
  };
4712
+ __name(_BooleanLiteral, "BooleanLiteral");
4713
+ var BooleanLiteral = _BooleanLiteral;
4731
4714
 
4732
- // ../../build/common/esm/filter/ast/terms/date-literal.js
4715
+ // src/filter/ast/terms/date-literal.ts
4733
4716
  import { toDateDef } from "putil-varhelpers";
4734
4717
 
4735
- // ../../build/common/esm/filter/errors.js
4736
- var SyntaxError = class extends TypeError {
4737
- static {
4738
- __name(this, "SyntaxError");
4739
- }
4718
+ // src/filter/errors.ts
4719
+ var _SyntaxError = class _SyntaxError extends TypeError {
4740
4720
  };
4741
- var FilterValidationError = class extends TypeError {
4742
- static {
4743
- __name(this, "FilterValidationError");
4744
- }
4721
+ __name(_SyntaxError, "SyntaxError");
4722
+ var SyntaxError = _SyntaxError;
4723
+ var _FilterValidationError = class _FilterValidationError extends TypeError {
4745
4724
  constructor(message) {
4746
- super(typeof message === "string" ? message : message?.message);
4725
+ super(typeof message === "string" ? message : message == null ? void 0 : message.message);
4747
4726
  if (typeof message === "object")
4748
4727
  Object.assign(this, message);
4749
4728
  }
4750
4729
  };
4751
- var FilterParseError = class extends Error {
4752
- static {
4753
- __name(this, "FilterParseError");
4754
- }
4730
+ __name(_FilterValidationError, "FilterValidationError");
4731
+ var FilterValidationError = _FilterValidationError;
4732
+ var _FilterParseError = class _FilterParseError extends Error {
4755
4733
  constructor(message, args) {
4756
4734
  super(message);
4757
4735
  Object.assign(this, args);
4758
4736
  }
4759
4737
  };
4738
+ __name(_FilterParseError, "FilterParseError");
4739
+ var FilterParseError = _FilterParseError;
4760
4740
 
4761
- // ../../build/common/esm/filter/utils.js
4741
+ // src/filter/utils.ts
4762
4742
  var quotesRegEx = /'/g;
4763
4743
  var escapeRegEx2 = /(\\)/g;
4764
4744
  var unescapeRegEx2 = /\\(.)/g;
@@ -4782,12 +4762,9 @@ function unquoteFilterString(s) {
4782
4762
  }
4783
4763
  __name(unquoteFilterString, "unquoteFilterString");
4784
4764
 
4785
- // ../../build/common/esm/filter/ast/terms/date-literal.js
4765
+ // src/filter/ast/terms/date-literal.ts
4786
4766
  var NullDate = /* @__PURE__ */ new Date(0);
4787
- var DateLiteral = class extends Literal {
4788
- static {
4789
- __name(this, "DateLiteral");
4790
- }
4767
+ var _DateLiteral = class _DateLiteral extends Literal {
4791
4768
  constructor(value) {
4792
4769
  super("");
4793
4770
  if (value instanceof Date) {
@@ -4804,23 +4781,21 @@ var DateLiteral = class extends Literal {
4804
4781
  return quoteFilterString(this.value);
4805
4782
  }
4806
4783
  };
4784
+ __name(_DateLiteral, "DateLiteral");
4785
+ var DateLiteral = _DateLiteral;
4807
4786
 
4808
- // ../../build/common/esm/filter/ast/terms/null-literal.js
4809
- var NullLiteral = class extends Literal {
4810
- static {
4811
- __name(this, "NullLiteral");
4812
- }
4787
+ // src/filter/ast/terms/null-literal.ts
4788
+ var _NullLiteral = class _NullLiteral extends Literal {
4813
4789
  constructor() {
4814
4790
  super(null);
4815
4791
  this.value = null;
4816
4792
  }
4817
4793
  };
4794
+ __name(_NullLiteral, "NullLiteral");
4795
+ var NullLiteral = _NullLiteral;
4818
4796
 
4819
- // ../../build/common/esm/filter/ast/terms/number-literal.js
4820
- var NumberLiteral = class extends Literal {
4821
- static {
4822
- __name(this, "NumberLiteral");
4823
- }
4797
+ // src/filter/ast/terms/number-literal.ts
4798
+ var _NumberLiteral = class _NumberLiteral extends Literal {
4824
4799
  constructor(value) {
4825
4800
  super(0);
4826
4801
  if (typeof value === "number" || typeof value === "bigint") {
@@ -4848,22 +4823,20 @@ var NumberLiteral = class extends Literal {
4848
4823
  return typeof this.value === "bigint" ? ("" + this.value).replace(/n$/, "") : "" + this.value;
4849
4824
  }
4850
4825
  };
4826
+ __name(_NumberLiteral, "NumberLiteral");
4827
+ var NumberLiteral = _NumberLiteral;
4851
4828
 
4852
- // ../../build/common/esm/filter/ast/terms/qualified-identifier.js
4853
- var QualifiedIdentifier = class extends Literal {
4854
- static {
4855
- __name(this, "QualifiedIdentifier");
4856
- }
4829
+ // src/filter/ast/terms/qualified-identifier.ts
4830
+ var _QualifiedIdentifier = class _QualifiedIdentifier extends Literal {
4857
4831
  constructor(value) {
4858
4832
  super("" + value);
4859
4833
  }
4860
4834
  };
4835
+ __name(_QualifiedIdentifier, "QualifiedIdentifier");
4836
+ var QualifiedIdentifier = _QualifiedIdentifier;
4861
4837
 
4862
- // ../../build/common/esm/filter/ast/terms/string-literal.js
4863
- var StringLiteral = class extends Literal {
4864
- static {
4865
- __name(this, "StringLiteral");
4866
- }
4838
+ // src/filter/ast/terms/string-literal.ts
4839
+ var _StringLiteral = class _StringLiteral extends Literal {
4867
4840
  constructor(value) {
4868
4841
  super("" + value);
4869
4842
  }
@@ -4871,13 +4844,12 @@ var StringLiteral = class extends Literal {
4871
4844
  return quoteFilterString(this.value);
4872
4845
  }
4873
4846
  };
4847
+ __name(_StringLiteral, "StringLiteral");
4848
+ var StringLiteral = _StringLiteral;
4874
4849
 
4875
- // ../../build/common/esm/filter/ast/terms/time-literal.js
4850
+ // src/filter/ast/terms/time-literal.ts
4876
4851
  var TIME_PATTERN = /^([01]\d|2[0-3]):([0-5]\d)(:[0-5]\d)?(\.(\d+))?$/;
4877
- var TimeLiteral = class extends Literal {
4878
- static {
4879
- __name(this, "TimeLiteral");
4880
- }
4852
+ var _TimeLiteral = class _TimeLiteral extends Literal {
4881
4853
  constructor(value) {
4882
4854
  super("");
4883
4855
  if (value instanceof Date) {
@@ -4894,12 +4866,14 @@ var TimeLiteral = class extends Literal {
4894
4866
  return quoteFilterString(this.value);
4895
4867
  }
4896
4868
  };
4869
+ __name(_TimeLiteral, "TimeLiteral");
4870
+ var TimeLiteral = _TimeLiteral;
4897
4871
  function pad(n) {
4898
4872
  return n <= 9 ? "0" + n : "" + n;
4899
4873
  }
4900
4874
  __name(pad, "pad");
4901
4875
 
4902
- // ../../build/common/esm/filter/build.js
4876
+ // src/filter/build.ts
4903
4877
  function $or(...items) {
4904
4878
  return new LogicalExpression({ op: "or", items });
4905
4879
  }
@@ -5023,15 +4997,12 @@ var _wrapEntryValue = /* @__PURE__ */ __name((v) => {
5023
4997
  return new StringLiteral("" + v);
5024
4998
  }, "_wrapEntryValue");
5025
4999
 
5026
- // ../../build/common/esm/filter/filter-tree-visitor.js
5000
+ // src/filter/filter-tree-visitor.ts
5027
5001
  import { ParseTreeVisitor } from "@browsery/antlr4";
5028
5002
 
5029
- // ../../build/common/esm/filter/antlr/OpraFilterParser.js
5003
+ // src/filter/antlr/OpraFilterParser.ts
5030
5004
  import { ATN, ATNDeserializer, DFA, FailedPredicateException, NoViableAltException, Parser, ParserATNSimulator, ParserRuleContext, PredictionContextCache, RecognitionException, Token } from "@browsery/antlr4";
5031
- var OpraFilterParser = class _OpraFilterParser extends Parser {
5032
- static {
5033
- __name(this, "OpraFilterParser");
5034
- }
5005
+ var _OpraFilterParser = class _OpraFilterParser extends Parser {
5035
5006
  get grammarFileName() {
5036
5007
  return "OpraFilter.g4";
5037
5008
  }
@@ -5736,6 +5707,8 @@ var OpraFilterParser = class _OpraFilterParser extends Parser {
5736
5707
  return _OpraFilterParser.__ATN;
5737
5708
  }
5738
5709
  };
5710
+ __name(_OpraFilterParser, "OpraFilterParser");
5711
+ var OpraFilterParser = _OpraFilterParser;
5739
5712
  OpraFilterParser.T__0 = 1;
5740
5713
  OpraFilterParser.T__1 = 2;
5741
5714
  OpraFilterParser.T__2 = 3;
@@ -6913,10 +6886,7 @@ OpraFilterParser._serializedATN = [
6913
6886
  ];
6914
6887
  OpraFilterParser.DecisionsToDFA = OpraFilterParser._ATN.decisionToState.map((ds, index) => new DFA(ds, index));
6915
6888
  var OpraFilterParser_default = OpraFilterParser;
6916
- var RootContext = class extends ParserRuleContext {
6917
- static {
6918
- __name(this, "RootContext");
6919
- }
6889
+ var _RootContext = class _RootContext extends ParserRuleContext {
6920
6890
  constructor(parser, parent, invokingState) {
6921
6891
  super(parent, invokingState);
6922
6892
  this.parser = parser;
@@ -6948,10 +6918,9 @@ var RootContext = class extends ParserRuleContext {
6948
6918
  return visitor.visitChildren(this);
6949
6919
  }
6950
6920
  };
6951
- var ExpressionContext = class extends ParserRuleContext {
6952
- static {
6953
- __name(this, "ExpressionContext");
6954
- }
6921
+ __name(_RootContext, "RootContext");
6922
+ var RootContext = _RootContext;
6923
+ var _ExpressionContext = class _ExpressionContext extends ParserRuleContext {
6955
6924
  constructor(parser, parent, invokingState) {
6956
6925
  super(parent, invokingState);
6957
6926
  this.parser = parser;
@@ -6963,10 +6932,9 @@ var ExpressionContext = class extends ParserRuleContext {
6963
6932
  super.copyFrom(ctx);
6964
6933
  }
6965
6934
  };
6966
- var ParenthesizedExpressionContext = class extends ExpressionContext {
6967
- static {
6968
- __name(this, "ParenthesizedExpressionContext");
6969
- }
6935
+ __name(_ExpressionContext, "ExpressionContext");
6936
+ var ExpressionContext = _ExpressionContext;
6937
+ var _ParenthesizedExpressionContext = class _ParenthesizedExpressionContext extends ExpressionContext {
6970
6938
  constructor(parser, ctx) {
6971
6939
  super(parser, ctx.parentCtx, ctx.invokingState);
6972
6940
  super.copyFrom(ctx);
@@ -6992,10 +6960,9 @@ var ParenthesizedExpressionContext = class extends ExpressionContext {
6992
6960
  return visitor.visitChildren(this);
6993
6961
  }
6994
6962
  };
6995
- var NegativeExpressionContext = class extends ExpressionContext {
6996
- static {
6997
- __name(this, "NegativeExpressionContext");
6998
- }
6963
+ __name(_ParenthesizedExpressionContext, "ParenthesizedExpressionContext");
6964
+ var ParenthesizedExpressionContext = _ParenthesizedExpressionContext;
6965
+ var _NegativeExpressionContext = class _NegativeExpressionContext extends ExpressionContext {
6999
6966
  constructor(parser, ctx) {
7000
6967
  super(parser, ctx.parentCtx, ctx.invokingState);
7001
6968
  super.copyFrom(ctx);
@@ -7021,10 +6988,9 @@ var NegativeExpressionContext = class extends ExpressionContext {
7021
6988
  return visitor.visitChildren(this);
7022
6989
  }
7023
6990
  };
7024
- var ComparisonExpressionContext = class extends ExpressionContext {
7025
- static {
7026
- __name(this, "ComparisonExpressionContext");
7027
- }
6991
+ __name(_NegativeExpressionContext, "NegativeExpressionContext");
6992
+ var NegativeExpressionContext = _NegativeExpressionContext;
6993
+ var _ComparisonExpressionContext = class _ComparisonExpressionContext extends ExpressionContext {
7028
6994
  constructor(parser, ctx) {
7029
6995
  super(parser, ctx.parentCtx, ctx.invokingState);
7030
6996
  super.copyFrom(ctx);
@@ -7056,10 +7022,9 @@ var ComparisonExpressionContext = class extends ExpressionContext {
7056
7022
  return visitor.visitChildren(this);
7057
7023
  }
7058
7024
  };
7059
- var LogicalExpressionContext = class extends ExpressionContext {
7060
- static {
7061
- __name(this, "LogicalExpressionContext");
7062
- }
7025
+ __name(_ComparisonExpressionContext, "ComparisonExpressionContext");
7026
+ var ComparisonExpressionContext = _ComparisonExpressionContext;
7027
+ var _LogicalExpressionContext = class _LogicalExpressionContext extends ExpressionContext {
7063
7028
  constructor(parser, ctx) {
7064
7029
  super(parser, ctx.parentCtx, ctx.invokingState);
7065
7030
  super.copyFrom(ctx);
@@ -7091,10 +7056,9 @@ var LogicalExpressionContext = class extends ExpressionContext {
7091
7056
  return visitor.visitChildren(this);
7092
7057
  }
7093
7058
  };
7094
- var ComparisonLeftContext = class extends ParserRuleContext {
7095
- static {
7096
- __name(this, "ComparisonLeftContext");
7097
- }
7059
+ __name(_LogicalExpressionContext, "LogicalExpressionContext");
7060
+ var LogicalExpressionContext = _LogicalExpressionContext;
7061
+ var _ComparisonLeftContext = class _ComparisonLeftContext extends ParserRuleContext {
7098
7062
  constructor(parser, parent, invokingState) {
7099
7063
  super(parent, invokingState);
7100
7064
  this.parser = parser;
@@ -7123,10 +7087,9 @@ var ComparisonLeftContext = class extends ParserRuleContext {
7123
7087
  return visitor.visitChildren(this);
7124
7088
  }
7125
7089
  };
7126
- var ComparisonRightContext = class extends ParserRuleContext {
7127
- static {
7128
- __name(this, "ComparisonRightContext");
7129
- }
7090
+ __name(_ComparisonLeftContext, "ComparisonLeftContext");
7091
+ var ComparisonLeftContext = _ComparisonLeftContext;
7092
+ var _ComparisonRightContext = class _ComparisonRightContext extends ParserRuleContext {
7130
7093
  constructor(parser, parent, invokingState) {
7131
7094
  super(parent, invokingState);
7132
7095
  this.parser = parser;
@@ -7164,10 +7127,9 @@ var ComparisonRightContext = class extends ParserRuleContext {
7164
7127
  return visitor.visitChildren(this);
7165
7128
  }
7166
7129
  };
7167
- var ParenthesizedItemContext = class extends ParserRuleContext {
7168
- static {
7169
- __name(this, "ParenthesizedItemContext");
7170
- }
7130
+ __name(_ComparisonRightContext, "ComparisonRightContext");
7131
+ var ComparisonRightContext = _ComparisonRightContext;
7132
+ var _ParenthesizedItemContext = class _ParenthesizedItemContext extends ParserRuleContext {
7171
7133
  constructor(parser, parent, invokingState) {
7172
7134
  super(parent, invokingState);
7173
7135
  this.parser = parser;
@@ -7196,10 +7158,9 @@ var ParenthesizedItemContext = class extends ParserRuleContext {
7196
7158
  return visitor.visitChildren(this);
7197
7159
  }
7198
7160
  };
7199
- var ValueContext = class extends ParserRuleContext {
7200
- static {
7201
- __name(this, "ValueContext");
7202
- }
7161
+ __name(_ParenthesizedItemContext, "ParenthesizedItemContext");
7162
+ var ParenthesizedItemContext = _ParenthesizedItemContext;
7163
+ var _ValueContext = class _ValueContext extends ParserRuleContext {
7203
7164
  constructor(parser, parent, invokingState) {
7204
7165
  super(parent, invokingState);
7205
7166
  this.parser = parser;
@@ -7211,10 +7172,9 @@ var ValueContext = class extends ParserRuleContext {
7211
7172
  super.copyFrom(ctx);
7212
7173
  }
7213
7174
  };
7214
- var TimeLiteralContext = class extends ValueContext {
7215
- static {
7216
- __name(this, "TimeLiteralContext");
7217
- }
7175
+ __name(_ValueContext, "ValueContext");
7176
+ var ValueContext = _ValueContext;
7177
+ var _TimeLiteralContext = class _TimeLiteralContext extends ValueContext {
7218
7178
  constructor(parser, ctx) {
7219
7179
  super(parser, ctx.parentCtx, ctx.invokingState);
7220
7180
  super.copyFrom(ctx);
@@ -7240,10 +7200,9 @@ var TimeLiteralContext = class extends ValueContext {
7240
7200
  return visitor.visitChildren(this);
7241
7201
  }
7242
7202
  };
7243
- var NullLiteralContext = class extends ValueContext {
7244
- static {
7245
- __name(this, "NullLiteralContext");
7246
- }
7203
+ __name(_TimeLiteralContext, "TimeLiteralContext");
7204
+ var TimeLiteralContext = _TimeLiteralContext;
7205
+ var _NullLiteralContext = class _NullLiteralContext extends ValueContext {
7247
7206
  constructor(parser, ctx) {
7248
7207
  super(parser, ctx.parentCtx, ctx.invokingState);
7249
7208
  super.copyFrom(ctx);
@@ -7269,10 +7228,9 @@ var NullLiteralContext = class extends ValueContext {
7269
7228
  return visitor.visitChildren(this);
7270
7229
  }
7271
7230
  };
7272
- var DateTimeLiteralContext = class extends ValueContext {
7273
- static {
7274
- __name(this, "DateTimeLiteralContext");
7275
- }
7231
+ __name(_NullLiteralContext, "NullLiteralContext");
7232
+ var NullLiteralContext = _NullLiteralContext;
7233
+ var _DateTimeLiteralContext = class _DateTimeLiteralContext extends ValueContext {
7276
7234
  constructor(parser, ctx) {
7277
7235
  super(parser, ctx.parentCtx, ctx.invokingState);
7278
7236
  super.copyFrom(ctx);
@@ -7298,10 +7256,9 @@ var DateTimeLiteralContext = class extends ValueContext {
7298
7256
  return visitor.visitChildren(this);
7299
7257
  }
7300
7258
  };
7301
- var StringLiteralContext = class extends ValueContext {
7302
- static {
7303
- __name(this, "StringLiteralContext");
7304
- }
7259
+ __name(_DateTimeLiteralContext, "DateTimeLiteralContext");
7260
+ var DateTimeLiteralContext = _DateTimeLiteralContext;
7261
+ var _StringLiteralContext = class _StringLiteralContext extends ValueContext {
7305
7262
  constructor(parser, ctx) {
7306
7263
  super(parser, ctx.parentCtx, ctx.invokingState);
7307
7264
  super.copyFrom(ctx);
@@ -7327,10 +7284,9 @@ var StringLiteralContext = class extends ValueContext {
7327
7284
  return visitor.visitChildren(this);
7328
7285
  }
7329
7286
  };
7330
- var DateLiteralContext = class extends ValueContext {
7331
- static {
7332
- __name(this, "DateLiteralContext");
7333
- }
7287
+ __name(_StringLiteralContext, "StringLiteralContext");
7288
+ var StringLiteralContext = _StringLiteralContext;
7289
+ var _DateLiteralContext = class _DateLiteralContext extends ValueContext {
7334
7290
  constructor(parser, ctx) {
7335
7291
  super(parser, ctx.parentCtx, ctx.invokingState);
7336
7292
  super.copyFrom(ctx);
@@ -7356,10 +7312,9 @@ var DateLiteralContext = class extends ValueContext {
7356
7312
  return visitor.visitChildren(this);
7357
7313
  }
7358
7314
  };
7359
- var InfinityLiteralContext = class extends ValueContext {
7360
- static {
7361
- __name(this, "InfinityLiteralContext");
7362
- }
7315
+ __name(_DateLiteralContext, "DateLiteralContext");
7316
+ var DateLiteralContext = _DateLiteralContext;
7317
+ var _InfinityLiteralContext = class _InfinityLiteralContext extends ValueContext {
7363
7318
  constructor(parser, ctx) {
7364
7319
  super(parser, ctx.parentCtx, ctx.invokingState);
7365
7320
  super.copyFrom(ctx);
@@ -7385,10 +7340,9 @@ var InfinityLiteralContext = class extends ValueContext {
7385
7340
  return visitor.visitChildren(this);
7386
7341
  }
7387
7342
  };
7388
- var BooleanLiteralContext = class extends ValueContext {
7389
- static {
7390
- __name(this, "BooleanLiteralContext");
7391
- }
7343
+ __name(_InfinityLiteralContext, "InfinityLiteralContext");
7344
+ var InfinityLiteralContext = _InfinityLiteralContext;
7345
+ var _BooleanLiteralContext = class _BooleanLiteralContext extends ValueContext {
7392
7346
  constructor(parser, ctx) {
7393
7347
  super(parser, ctx.parentCtx, ctx.invokingState);
7394
7348
  super.copyFrom(ctx);
@@ -7414,10 +7368,9 @@ var BooleanLiteralContext = class extends ValueContext {
7414
7368
  return visitor.visitChildren(this);
7415
7369
  }
7416
7370
  };
7417
- var NumberLiteralContext = class extends ValueContext {
7418
- static {
7419
- __name(this, "NumberLiteralContext");
7420
- }
7371
+ __name(_BooleanLiteralContext, "BooleanLiteralContext");
7372
+ var BooleanLiteralContext = _BooleanLiteralContext;
7373
+ var _NumberLiteralContext = class _NumberLiteralContext extends ValueContext {
7421
7374
  constructor(parser, ctx) {
7422
7375
  super(parser, ctx.parentCtx, ctx.invokingState);
7423
7376
  super.copyFrom(ctx);
@@ -7443,10 +7396,9 @@ var NumberLiteralContext = class extends ValueContext {
7443
7396
  return visitor.visitChildren(this);
7444
7397
  }
7445
7398
  };
7446
- var QualifiedIdentifierContext = class extends ParserRuleContext {
7447
- static {
7448
- __name(this, "QualifiedIdentifierContext");
7449
- }
7399
+ __name(_NumberLiteralContext, "NumberLiteralContext");
7400
+ var NumberLiteralContext = _NumberLiteralContext;
7401
+ var _QualifiedIdentifierContext = class _QualifiedIdentifierContext extends ParserRuleContext {
7450
7402
  constructor(parser, parent, invokingState) {
7451
7403
  super(parent, invokingState);
7452
7404
  this.parser = parser;
@@ -7478,10 +7430,9 @@ var QualifiedIdentifierContext = class extends ParserRuleContext {
7478
7430
  return visitor.visitChildren(this);
7479
7431
  }
7480
7432
  };
7481
- var ExternalConstantContext = class extends ParserRuleContext {
7482
- static {
7483
- __name(this, "ExternalConstantContext");
7484
- }
7433
+ __name(_QualifiedIdentifierContext, "QualifiedIdentifierContext");
7434
+ var QualifiedIdentifierContext = _QualifiedIdentifierContext;
7435
+ var _ExternalConstantContext = class _ExternalConstantContext extends ParserRuleContext {
7485
7436
  constructor(parser, parent, invokingState) {
7486
7437
  super(parent, invokingState);
7487
7438
  this.parser = parser;
@@ -7510,10 +7461,9 @@ var ExternalConstantContext = class extends ParserRuleContext {
7510
7461
  return visitor.visitChildren(this);
7511
7462
  }
7512
7463
  };
7513
- var IdentifierContext = class extends ParserRuleContext {
7514
- static {
7515
- __name(this, "IdentifierContext");
7516
- }
7464
+ __name(_ExternalConstantContext, "ExternalConstantContext");
7465
+ var ExternalConstantContext = _ExternalConstantContext;
7466
+ var _IdentifierContext = class _IdentifierContext extends ParserRuleContext {
7517
7467
  constructor(parser, parent, invokingState) {
7518
7468
  super(parent, invokingState);
7519
7469
  this.parser = parser;
@@ -7542,10 +7492,9 @@ var IdentifierContext = class extends ParserRuleContext {
7542
7492
  return visitor.visitChildren(this);
7543
7493
  }
7544
7494
  };
7545
- var ArrayValueContext = class extends ParserRuleContext {
7546
- static {
7547
- __name(this, "ArrayValueContext");
7548
- }
7495
+ __name(_IdentifierContext, "IdentifierContext");
7496
+ var IdentifierContext = _IdentifierContext;
7497
+ var _ArrayValueContext = class _ArrayValueContext extends ParserRuleContext {
7549
7498
  constructor(parser, parent, invokingState) {
7550
7499
  super(parent, invokingState);
7551
7500
  this.parser = parser;
@@ -7577,10 +7526,9 @@ var ArrayValueContext = class extends ParserRuleContext {
7577
7526
  return visitor.visitChildren(this);
7578
7527
  }
7579
7528
  };
7580
- var BooleanContext = class extends ParserRuleContext {
7581
- static {
7582
- __name(this, "BooleanContext");
7583
- }
7529
+ __name(_ArrayValueContext, "ArrayValueContext");
7530
+ var ArrayValueContext = _ArrayValueContext;
7531
+ var _BooleanContext = class _BooleanContext extends ParserRuleContext {
7584
7532
  constructor(parser, parent, invokingState) {
7585
7533
  super(parent, invokingState);
7586
7534
  this.parser = parser;
@@ -7606,10 +7554,9 @@ var BooleanContext = class extends ParserRuleContext {
7606
7554
  return visitor.visitChildren(this);
7607
7555
  }
7608
7556
  };
7609
- var NullContext = class extends ParserRuleContext {
7610
- static {
7611
- __name(this, "NullContext");
7612
- }
7557
+ __name(_BooleanContext, "BooleanContext");
7558
+ var BooleanContext = _BooleanContext;
7559
+ var _NullContext = class _NullContext extends ParserRuleContext {
7613
7560
  constructor(parser, parent, invokingState) {
7614
7561
  super(parent, invokingState);
7615
7562
  this.parser = parser;
@@ -7635,10 +7582,9 @@ var NullContext = class extends ParserRuleContext {
7635
7582
  return visitor.visitChildren(this);
7636
7583
  }
7637
7584
  };
7638
- var InfinityContext = class extends ParserRuleContext {
7639
- static {
7640
- __name(this, "InfinityContext");
7641
- }
7585
+ __name(_NullContext, "NullContext");
7586
+ var NullContext = _NullContext;
7587
+ var _InfinityContext = class _InfinityContext extends ParserRuleContext {
7642
7588
  constructor(parser, parent, invokingState) {
7643
7589
  super(parent, invokingState);
7644
7590
  this.parser = parser;
@@ -7664,10 +7610,9 @@ var InfinityContext = class extends ParserRuleContext {
7664
7610
  return visitor.visitChildren(this);
7665
7611
  }
7666
7612
  };
7667
- var ArithmeticOperatorContext = class extends ParserRuleContext {
7668
- static {
7669
- __name(this, "ArithmeticOperatorContext");
7670
- }
7613
+ __name(_InfinityContext, "InfinityContext");
7614
+ var InfinityContext = _InfinityContext;
7615
+ var _ArithmeticOperatorContext = class _ArithmeticOperatorContext extends ParserRuleContext {
7671
7616
  constructor(parser, parent, invokingState) {
7672
7617
  super(parent, invokingState);
7673
7618
  this.parser = parser;
@@ -7693,10 +7638,9 @@ var ArithmeticOperatorContext = class extends ParserRuleContext {
7693
7638
  return visitor.visitChildren(this);
7694
7639
  }
7695
7640
  };
7696
- var ComparisonOperatorContext = class extends ParserRuleContext {
7697
- static {
7698
- __name(this, "ComparisonOperatorContext");
7699
- }
7641
+ __name(_ArithmeticOperatorContext, "ArithmeticOperatorContext");
7642
+ var ArithmeticOperatorContext = _ArithmeticOperatorContext;
7643
+ var _ComparisonOperatorContext = class _ComparisonOperatorContext extends ParserRuleContext {
7700
7644
  constructor(parser, parent, invokingState) {
7701
7645
  super(parent, invokingState);
7702
7646
  this.parser = parser;
@@ -7722,10 +7666,9 @@ var ComparisonOperatorContext = class extends ParserRuleContext {
7722
7666
  return visitor.visitChildren(this);
7723
7667
  }
7724
7668
  };
7725
- var LogicalOperatorContext = class extends ParserRuleContext {
7726
- static {
7727
- __name(this, "LogicalOperatorContext");
7728
- }
7669
+ __name(_ComparisonOperatorContext, "ComparisonOperatorContext");
7670
+ var ComparisonOperatorContext = _ComparisonOperatorContext;
7671
+ var _LogicalOperatorContext = class _LogicalOperatorContext extends ParserRuleContext {
7729
7672
  constructor(parser, parent, invokingState) {
7730
7673
  super(parent, invokingState);
7731
7674
  this.parser = parser;
@@ -7751,10 +7694,9 @@ var LogicalOperatorContext = class extends ParserRuleContext {
7751
7694
  return visitor.visitChildren(this);
7752
7695
  }
7753
7696
  };
7754
- var PolarityOperatorContext = class extends ParserRuleContext {
7755
- static {
7756
- __name(this, "PolarityOperatorContext");
7757
- }
7697
+ __name(_LogicalOperatorContext, "LogicalOperatorContext");
7698
+ var LogicalOperatorContext = _LogicalOperatorContext;
7699
+ var _PolarityOperatorContext = class _PolarityOperatorContext extends ParserRuleContext {
7758
7700
  constructor(parser, parent, invokingState) {
7759
7701
  super(parent, invokingState);
7760
7702
  this.parser = parser;
@@ -7783,12 +7725,11 @@ var PolarityOperatorContext = class extends ParserRuleContext {
7783
7725
  return visitor.visitChildren(this);
7784
7726
  }
7785
7727
  };
7728
+ __name(_PolarityOperatorContext, "PolarityOperatorContext");
7729
+ var PolarityOperatorContext = _PolarityOperatorContext;
7786
7730
 
7787
- // ../../build/common/esm/filter/ast/terms/external-constant.js
7788
- var ExternalConstant = class extends Literal {
7789
- static {
7790
- __name(this, "ExternalConstant");
7791
- }
7731
+ // src/filter/ast/terms/external-constant.ts
7732
+ var _ExternalConstant = class _ExternalConstant extends Literal {
7792
7733
  constructor(value) {
7793
7734
  super("" + value);
7794
7735
  }
@@ -7796,15 +7737,14 @@ var ExternalConstant = class extends Literal {
7796
7737
  return "@" + super.toString();
7797
7738
  }
7798
7739
  };
7740
+ __name(_ExternalConstant, "ExternalConstant");
7741
+ var ExternalConstant = _ExternalConstant;
7799
7742
 
7800
- // ../../build/common/esm/filter/filter-tree-visitor.js
7801
- var FilterTreeVisitor = class extends ParseTreeVisitor {
7802
- static {
7803
- __name(this, "FilterTreeVisitor");
7804
- }
7743
+ // src/filter/filter-tree-visitor.ts
7744
+ var _FilterTreeVisitor = class _FilterTreeVisitor extends ParseTreeVisitor {
7805
7745
  constructor(options) {
7806
7746
  super();
7807
- this._timeZone = options?.timeZone;
7747
+ this._timeZone = options == null ? void 0 : options.timeZone;
7808
7748
  }
7809
7749
  visitChildren(node) {
7810
7750
  const result = super.visitChildren(node);
@@ -7888,13 +7828,12 @@ var FilterTreeVisitor = class extends ParseTreeVisitor {
7888
7828
  return new ArrayExpression(ctx.value_list().map((child) => this.visit(child)));
7889
7829
  }
7890
7830
  };
7831
+ __name(_FilterTreeVisitor, "FilterTreeVisitor");
7832
+ var FilterTreeVisitor = _FilterTreeVisitor;
7891
7833
 
7892
- // ../../build/common/esm/filter/opra-error-listener.js
7834
+ // src/filter/opra-error-listener.ts
7893
7835
  import { ErrorListener } from "@browsery/antlr4";
7894
- var OpraErrorListener = class extends ErrorListener {
7895
- static {
7896
- __name(this, "OpraErrorListener");
7897
- }
7836
+ var _OpraErrorListener = class _OpraErrorListener extends ErrorListener {
7898
7837
  constructor(errors) {
7899
7838
  super();
7900
7839
  this.errors = errors;
@@ -7903,16 +7842,15 @@ var OpraErrorListener = class extends ErrorListener {
7903
7842
  this.errors.push(new FilterParseError(msg, { recognizer, offendingSymbol, line, column, e }));
7904
7843
  }
7905
7844
  };
7845
+ __name(_OpraErrorListener, "OpraErrorListener");
7846
+ var OpraErrorListener = _OpraErrorListener;
7906
7847
 
7907
- // ../../build/common/esm/filter/parse.js
7848
+ // src/filter/parse.ts
7908
7849
  import { CharStream, CommonTokenStream } from "@browsery/antlr4";
7909
7850
 
7910
- // ../../build/common/esm/filter/antlr/OpraFilterLexer.js
7851
+ // src/filter/antlr/OpraFilterLexer.ts
7911
7852
  import { ATNDeserializer as ATNDeserializer2, DFA as DFA2, Lexer, LexerATNSimulator, PredictionContextCache as PredictionContextCache2, Token as Token2 } from "@browsery/antlr4";
7912
- var OpraFilterLexer = class _OpraFilterLexer extends Lexer {
7913
- static {
7914
- __name(this, "OpraFilterLexer");
7915
- }
7853
+ var _OpraFilterLexer = class _OpraFilterLexer extends Lexer {
7916
7854
  constructor(input) {
7917
7855
  super(input);
7918
7856
  this._interp = new LexerATNSimulator(this, _OpraFilterLexer._ATN, _OpraFilterLexer.DecisionsToDFA, new PredictionContextCache2());
@@ -7945,6 +7883,8 @@ var OpraFilterLexer = class _OpraFilterLexer extends Lexer {
7945
7883
  return _OpraFilterLexer.__ATN;
7946
7884
  }
7947
7885
  };
7886
+ __name(_OpraFilterLexer, "OpraFilterLexer");
7887
+ var OpraFilterLexer = _OpraFilterLexer;
7948
7888
  OpraFilterLexer.T__0 = 1;
7949
7889
  OpraFilterLexer.T__1 = 2;
7950
7890
  OpraFilterLexer.T__2 = 3;
@@ -11983,7 +11923,7 @@ OpraFilterLexer._serializedATN = [
11983
11923
  OpraFilterLexer.DecisionsToDFA = OpraFilterLexer._ATN.decisionToState.map((ds, index) => new DFA2(ds, index));
11984
11924
  var OpraFilterLexer_default = OpraFilterLexer;
11985
11925
 
11986
- // ../../build/common/esm/filter/parse.js
11926
+ // src/filter/parse.ts
11987
11927
  function parse2(text, visitor) {
11988
11928
  const chars = new CharStream(text);
11989
11929
  const lexer = new OpraFilterLexer_default(chars);
@@ -12011,15 +11951,12 @@ function parse2(text, visitor) {
12011
11951
  }
12012
11952
  __name(parse2, "parse");
12013
11953
 
12014
- // ../../build/common/esm/filter/filter-rules.js
12015
- var FilterRules = class {
12016
- static {
12017
- __name(this, "FilterRules");
12018
- }
11954
+ // src/filter/filter-rules.ts
11955
+ var _FilterRules = class _FilterRules {
12019
11956
  constructor(rules, options) {
12020
11957
  this._rules = new ResponsiveMap();
12021
11958
  Object.defineProperty(this, "_rules", {
12022
- value: new ResponsiveMap(null, { caseSensitive: options?.caseSensitive }),
11959
+ value: new ResponsiveMap(null, { caseSensitive: options == null ? void 0 : options.caseSensitive }),
12023
11960
  enumerable: false
12024
11961
  });
12025
11962
  if (rules) {
@@ -12029,7 +11966,7 @@ var FilterRules = class {
12029
11966
  }
12030
11967
  }
12031
11968
  set(fieldName, options) {
12032
- const operators = typeof options?.operators === "string" ? options.operators.split(/\s*[,| ]\s*/) : options?.operators;
11969
+ const operators = typeof (options == null ? void 0 : options.operators) === "string" ? options.operators.split(/\s*[,| ]\s*/) : options == null ? void 0 : options.operators;
12033
11970
  this._rules.set(fieldName, omitUndefined({
12034
11971
  ...options,
12035
11972
  operators
@@ -12097,12 +12034,14 @@ var FilterRules = class {
12097
12034
  return this._rules.entries();
12098
12035
  }
12099
12036
  };
12037
+ __name(_FilterRules, "FilterRules");
12038
+ var FilterRules = _FilterRules;
12100
12039
 
12101
- // ../../build/common/esm/document/data-type/extended-types/filter.type.js
12102
- var FilterType = class FilterType2 {
12103
- static {
12104
- __name(this, "FilterType");
12105
- }
12040
+ // src/document/data-type/extended-types/filter.type.ts
12041
+ var _a17;
12042
+ var _c;
12043
+ var _a18;
12044
+ var FilterType = (_a18 = class {
12106
12045
  constructor(attributes) {
12107
12046
  if (attributes)
12108
12047
  Object.assign(this, attributes);
@@ -12122,7 +12061,7 @@ var FilterType = class FilterType2 {
12122
12061
  rules: properties.rules
12123
12062
  };
12124
12063
  }
12125
- };
12064
+ }, __name(_a18, "FilterType"), _a18);
12126
12065
  __decorate8([
12127
12066
  SimpleType2.Attribute({
12128
12067
  description: "Data type which filtering fields belong to"
@@ -12134,7 +12073,7 @@ __decorate8([
12134
12073
  description: "Stringified JSON object defines filtering rules",
12135
12074
  format: "string"
12136
12075
  }),
12137
- __metadata8("design:type", Object)
12076
+ __metadata8("design:type", typeof (_c = typeof Record !== "undefined" && Record) === "function" ? _c : Object)
12138
12077
  ], FilterType.prototype, "rules", void 0);
12139
12078
  FilterType = __decorate8([
12140
12079
  SimpleType2({
@@ -12144,7 +12083,7 @@ FilterType = __decorate8([
12144
12083
  json: "string"
12145
12084
  }
12146
12085
  }),
12147
- __metadata8("design:paramtypes", [Object])
12086
+ __metadata8("design:paramtypes", [typeof (_a17 = typeof Partial !== "undefined" && Partial) === "function" ? _a17 : Object])
12148
12087
  ], FilterType);
12149
12088
  var decodeFilter = /* @__PURE__ */ __name((dataType, rules) => validator3("decodeFilter", (input, context, _this) => {
12150
12089
  if (typeof input === "string") {
@@ -12167,13 +12106,12 @@ var encodeFilter = validator3("encodeFilter", (input, context, _this) => {
12167
12106
  context.fail(_this, `Not a valid filter expression`, input);
12168
12107
  });
12169
12108
 
12170
- // ../../build/common/esm/document/data-type/extended-types/object-id.type.js
12109
+ // src/document/data-type/extended-types/object-id.type.ts
12171
12110
  import { __decorate as __decorate9, __metadata as __metadata9 } from "tslib";
12172
12111
  import { vg as vg11 } from "valgen";
12173
- var ObjectIdType = class ObjectIdType2 {
12174
- static {
12175
- __name(this, "ObjectIdType");
12176
- }
12112
+ var _a19;
12113
+ var _a20;
12114
+ var ObjectIdType = (_a20 = class {
12177
12115
  constructor(attributes) {
12178
12116
  if (attributes)
12179
12117
  Object.assign(this, attributes);
@@ -12184,7 +12122,7 @@ var ObjectIdType = class ObjectIdType2 {
12184
12122
  [ENCODER]() {
12185
12123
  return vg11.isObjectId({ coerce: true });
12186
12124
  }
12187
- };
12125
+ }, __name(_a20, "ObjectIdType"), _a20);
12188
12126
  ObjectIdType = __decorate9([
12189
12127
  SimpleType2({
12190
12128
  description: "A MongoDB ObjectID value",
@@ -12193,20 +12131,20 @@ ObjectIdType = __decorate9([
12193
12131
  json: "string"
12194
12132
  }
12195
12133
  }),
12196
- __metadata9("design:paramtypes", [Object])
12134
+ __metadata9("design:paramtypes", [typeof (_a19 = typeof Partial !== "undefined" && Partial) === "function" ? _a19 : Object])
12197
12135
  ], ObjectIdType);
12198
12136
 
12199
- // ../../build/common/esm/document/data-type/extended-types/operation-result.type.js
12137
+ // src/document/data-type/extended-types/operation-result.type.ts
12200
12138
  import { __decorate as __decorate10, __metadata as __metadata10 } from "tslib";
12201
- var OperationResult = class OperationResult2 {
12202
- static {
12203
- __name(this, "OperationResult");
12204
- }
12139
+ import { DeepPartial } from "ts-gems";
12140
+ var _a21;
12141
+ var _a22;
12142
+ var OperationResult = (_a22 = class {
12205
12143
  constructor(init) {
12206
12144
  if (init)
12207
12145
  Object.assign(this, init);
12208
12146
  }
12209
- };
12147
+ }, __name(_a22, "OperationResult"), _a22);
12210
12148
  __decorate10([
12211
12149
  ApiField(),
12212
12150
  __metadata10("design:type", Number)
@@ -12239,18 +12177,16 @@ OperationResult = __decorate10([
12239
12177
  ComplexType2({
12240
12178
  description: "Operation result"
12241
12179
  }),
12242
- __metadata10("design:paramtypes", [Object])
12180
+ __metadata10("design:paramtypes", [typeof (_a21 = typeof DeepPartial !== "undefined" && DeepPartial) === "function" ? _a21 : Object])
12243
12181
  ], OperationResult);
12244
- (function(OperationResult3) {
12182
+ (function(OperationResult2) {
12245
12183
  function forPayload(type) {
12246
- let OperationResult_ = class OperationResult_ extends OperationResult3 {
12247
- static {
12248
- __name(this, "OperationResult_");
12249
- }
12184
+ var _a45;
12185
+ let OperationResult_ = (_a45 = class extends OperationResult2 {
12250
12186
  constructor(...args) {
12251
12187
  super(...args);
12252
12188
  }
12253
- };
12189
+ }, __name(_a45, "OperationResult_"), _a45);
12254
12190
  __decorate10([
12255
12191
  ApiField({ type, required: true }),
12256
12192
  __metadata10("design:type", Object)
@@ -12262,17 +12198,16 @@ OperationResult = __decorate10([
12262
12198
  return OperationResult_;
12263
12199
  }
12264
12200
  __name(forPayload, "forPayload");
12265
- OperationResult3.forPayload = forPayload;
12201
+ OperationResult2.forPayload = forPayload;
12266
12202
  })(OperationResult || (OperationResult = {}));
12267
12203
 
12268
- // ../../build/common/esm/document/data-type/extended-types/time.type.js
12204
+ // src/document/data-type/extended-types/time.type.ts
12269
12205
  import { __decorate as __decorate11, __metadata as __metadata11 } from "tslib";
12270
12206
  import { vg as vg12 } from "valgen";
12207
+ var _a23;
12271
12208
  var TIME_PATTERN2 = /^([0-1][0-9]|2[0-4]):([0-5][0-9])(?::([0-5][0-9]))?$/;
12272
- var TimeType = class TimeType2 {
12273
- static {
12274
- __name(this, "TimeType");
12275
- }
12209
+ var _a24;
12210
+ var TimeType = (_a24 = class {
12276
12211
  constructor(attributes) {
12277
12212
  if (attributes)
12278
12213
  Object.assign(this, attributes);
@@ -12292,7 +12227,7 @@ var TimeType = class TimeType2 {
12292
12227
  [ENCODER](properties) {
12293
12228
  return this[DECODER](properties);
12294
12229
  }
12295
- };
12230
+ }, __name(_a24, "TimeType"), _a24);
12296
12231
  __decorate11([
12297
12232
  SimpleType2.Attribute({
12298
12233
  description: "Minimum value"
@@ -12313,16 +12248,15 @@ TimeType = __decorate11([
12313
12248
  json: "string"
12314
12249
  }
12315
12250
  }).Example("18:23:00", "Full time value").Example("18:23:00", "Time value without seconds"),
12316
- __metadata11("design:paramtypes", [Object])
12251
+ __metadata11("design:paramtypes", [typeof (_a23 = typeof Partial !== "undefined" && Partial) === "function" ? _a23 : Object])
12317
12252
  ], TimeType);
12318
12253
 
12319
- // ../../build/common/esm/document/data-type/extended-types/url.type.js
12254
+ // src/document/data-type/extended-types/url.type.ts
12320
12255
  import { __decorate as __decorate12, __metadata as __metadata12 } from "tslib";
12321
12256
  import { vg as vg13 } from "valgen";
12322
- var UrlType = class UrlType2 {
12323
- static {
12324
- __name(this, "UrlType");
12325
- }
12257
+ var _a25;
12258
+ var _a26;
12259
+ var UrlType = (_a26 = class {
12326
12260
  constructor(attributes) {
12327
12261
  if (attributes)
12328
12262
  Object.assign(this, attributes);
@@ -12333,7 +12267,7 @@ var UrlType = class UrlType2 {
12333
12267
  [ENCODER]() {
12334
12268
  return vg13.isURL({ coerce: true });
12335
12269
  }
12336
- };
12270
+ }, __name(_a26, "UrlType"), _a26);
12337
12271
  UrlType = __decorate12([
12338
12272
  SimpleType2({
12339
12273
  description: "A Uniform Resource Identifier Reference (RFC 3986 icon) value",
@@ -12342,27 +12276,26 @@ UrlType = __decorate12([
12342
12276
  json: "string"
12343
12277
  }
12344
12278
  }).Example("http://tempuri.org"),
12345
- __metadata12("design:paramtypes", [Object])
12279
+ __metadata12("design:paramtypes", [typeof (_a25 = typeof Partial !== "undefined" && Partial) === "function" ? _a25 : Object])
12346
12280
  ], UrlType);
12347
12281
 
12348
- // ../../build/common/esm/document/data-type/extended-types/uuid.type.js
12282
+ // src/document/data-type/extended-types/uuid.type.ts
12349
12283
  import { __decorate as __decorate13, __metadata as __metadata13 } from "tslib";
12350
12284
  import { vg as vg14 } from "valgen";
12351
- var UuidType = class UuidType2 {
12352
- static {
12353
- __name(this, "UuidType");
12354
- }
12285
+ var _a27;
12286
+ var _a28;
12287
+ var UuidType = (_a28 = class {
12355
12288
  constructor(attributes) {
12356
12289
  if (attributes)
12357
12290
  Object.assign(this, attributes);
12358
12291
  }
12359
12292
  [DECODER](properties) {
12360
- return vg14.isUUID(properties?.version, { coerce: true });
12293
+ return vg14.isUUID(properties == null ? void 0 : properties.version, { coerce: true });
12361
12294
  }
12362
12295
  [ENCODER](properties) {
12363
- return vg14.isUUID(properties?.version, { coerce: true });
12296
+ return vg14.isUUID(properties == null ? void 0 : properties.version, { coerce: true });
12364
12297
  }
12365
- };
12298
+ }, __name(_a28, "UuidType"), _a28);
12366
12299
  __decorate13([
12367
12300
  SimpleType2.Attribute({
12368
12301
  description: "Version of the UUID"
@@ -12377,14 +12310,14 @@ UuidType = __decorate13([
12377
12310
  json: "string"
12378
12311
  }
12379
12312
  }),
12380
- __metadata13("design:paramtypes", [Object])
12313
+ __metadata13("design:paramtypes", [typeof (_a27 = typeof Partial !== "undefined" && Partial) === "function" ? _a27 : Object])
12381
12314
  ], UuidType);
12382
12315
 
12383
- // ../../build/common/esm/document/data-type/utils/create-mapped-class.js
12316
+ // src/document/data-type/utils/create-mapped-class.ts
12384
12317
  function createMappedClass(source, config, options) {
12385
12318
  const isInheritedPredicate = getIsInheritedPredicateFn(config.pick, config.omit);
12386
12319
  const sourceName = typeof source === "string" ? source.charAt(0).toUpperCase() + source.substring(1) : source.name;
12387
- const className = options?.name || sourceName + "Mapped";
12320
+ const className = (options == null ? void 0 : options.name) || sourceName + "Mapped";
12388
12321
  const MappedClass = {
12389
12322
  [className]: class {
12390
12323
  constructor() {
@@ -12427,13 +12360,13 @@ function createMappedClass(source, config, options) {
12427
12360
  }
12428
12361
  __name(createMappedClass, "createMappedClass");
12429
12362
 
12430
- // ../../build/common/esm/document/data-type/omit-type.js
12363
+ // src/document/data-type/omit-type.ts
12431
12364
  function OmitType(baseType, keys, options) {
12432
12365
  return createMappedClass(baseType, { omit: keys }, options);
12433
12366
  }
12434
12367
  __name(OmitType, "OmitType");
12435
12368
 
12436
- // ../../build/common/esm/document/data-type/partial-type.js
12369
+ // src/document/data-type/partial-type.ts
12437
12370
  function PartialType(base, ...args) {
12438
12371
  const keys = Array.isArray(args[0]) ? args[0] : true;
12439
12372
  const options = Array.isArray(args[0]) ? args[1] : args[0];
@@ -12441,19 +12374,18 @@ function PartialType(base, ...args) {
12441
12374
  }
12442
12375
  __name(PartialType, "PartialType");
12443
12376
 
12444
- // ../../build/common/esm/document/data-type/pick-type.js
12377
+ // src/document/data-type/pick-type.ts
12445
12378
  function PickType(baseType, keys, options) {
12446
12379
  return createMappedClass(baseType, { pick: keys }, options);
12447
12380
  }
12448
12381
  __name(PickType, "PickType");
12449
12382
 
12450
- // ../../build/common/esm/document/data-type/primitive-types/any.type.js
12383
+ // src/document/data-type/primitive-types/any.type.ts
12451
12384
  import { __decorate as __decorate14, __metadata as __metadata14 } from "tslib";
12452
12385
  import { isAny as isAny3 } from "valgen";
12453
- var AnyType = class AnyType2 {
12454
- static {
12455
- __name(this, "AnyType");
12456
- }
12386
+ var _a29;
12387
+ var _a30;
12388
+ var AnyType = (_a30 = class {
12457
12389
  constructor(properties) {
12458
12390
  if (properties)
12459
12391
  Object.assign(this, properties);
@@ -12464,25 +12396,24 @@ var AnyType = class AnyType2 {
12464
12396
  [ENCODER]() {
12465
12397
  return isAny3;
12466
12398
  }
12467
- };
12399
+ }, __name(_a30, "AnyType"), _a30);
12468
12400
  AnyType = __decorate14([
12469
12401
  SimpleType2({
12470
12402
  description: "Represents any value"
12471
12403
  }),
12472
- __metadata14("design:paramtypes", [Object])
12404
+ __metadata14("design:paramtypes", [typeof (_a29 = typeof Partial !== "undefined" && Partial) === "function" ? _a29 : Object])
12473
12405
  ], AnyType);
12474
12406
 
12475
- // ../../build/common/esm/document/data-type/primitive-types/bigint.type.js
12407
+ // src/document/data-type/primitive-types/bigint.type.ts
12476
12408
  import { __decorate as __decorate16, __metadata as __metadata16 } from "tslib";
12477
12409
  import { toBigint, vg as vg16 } from "valgen";
12478
12410
 
12479
- // ../../build/common/esm/document/data-type/primitive-types/number.type.js
12411
+ // src/document/data-type/primitive-types/number.type.ts
12480
12412
  import { __decorate as __decorate15, __metadata as __metadata15 } from "tslib";
12481
12413
  import { toNumber, vg as vg15 } from "valgen";
12482
- var NumberType = class NumberType2 {
12483
- static {
12484
- __name(this, "NumberType");
12485
- }
12414
+ var _a31;
12415
+ var _a32;
12416
+ var NumberType = (_a32 = class {
12486
12417
  constructor(properties) {
12487
12418
  if (properties)
12488
12419
  Object.assign(this, properties);
@@ -12498,7 +12429,7 @@ var NumberType = class NumberType2 {
12498
12429
  [ENCODER](properties) {
12499
12430
  return this[DECODER](properties);
12500
12431
  }
12501
- };
12432
+ }, __name(_a32, "NumberType"), _a32);
12502
12433
  __decorate15([
12503
12434
  SimpleType2.Attribute({
12504
12435
  description: "Determines the minimum value"
@@ -12519,14 +12450,13 @@ NumberType = __decorate15([
12519
12450
  json: "number"
12520
12451
  }
12521
12452
  }),
12522
- __metadata15("design:paramtypes", [Object])
12453
+ __metadata15("design:paramtypes", [typeof (_a31 = typeof Partial !== "undefined" && Partial) === "function" ? _a31 : Object])
12523
12454
  ], NumberType);
12524
12455
 
12525
- // ../../build/common/esm/document/data-type/primitive-types/bigint.type.js
12526
- var BigintType = class BigintType2 extends NumberType {
12527
- static {
12528
- __name(this, "BigintType");
12529
- }
12456
+ // src/document/data-type/primitive-types/bigint.type.ts
12457
+ var _a33;
12458
+ var _a34;
12459
+ var BigintType = (_a34 = class extends NumberType {
12530
12460
  constructor(attributes) {
12531
12461
  super(attributes);
12532
12462
  }
@@ -12541,7 +12471,7 @@ var BigintType = class BigintType2 extends NumberType {
12541
12471
  [ENCODER](properties) {
12542
12472
  return this[DECODER](properties);
12543
12473
  }
12544
- };
12474
+ }, __name(_a34, "BigintType"), _a34);
12545
12475
  BigintType = __decorate16([
12546
12476
  SimpleType2({
12547
12477
  description: "BigInt number",
@@ -12550,16 +12480,15 @@ BigintType = __decorate16([
12550
12480
  json: "string"
12551
12481
  }
12552
12482
  }),
12553
- __metadata16("design:paramtypes", [Object])
12483
+ __metadata16("design:paramtypes", [typeof (_a33 = typeof Partial !== "undefined" && Partial) === "function" ? _a33 : Object])
12554
12484
  ], BigintType);
12555
12485
 
12556
- // ../../build/common/esm/document/data-type/primitive-types/boolean.type.js
12486
+ // src/document/data-type/primitive-types/boolean.type.ts
12557
12487
  import { __decorate as __decorate17, __metadata as __metadata17 } from "tslib";
12558
12488
  import { toBoolean } from "valgen";
12559
- var BooleanType = class BooleanType2 {
12560
- static {
12561
- __name(this, "BooleanType");
12562
- }
12489
+ var _a35;
12490
+ var _a36;
12491
+ var BooleanType = (_a36 = class {
12563
12492
  constructor(properties) {
12564
12493
  if (properties)
12565
12494
  Object.assign(this, properties);
@@ -12570,7 +12499,7 @@ var BooleanType = class BooleanType2 {
12570
12499
  [ENCODER]() {
12571
12500
  return toBoolean;
12572
12501
  }
12573
- };
12502
+ }, __name(_a36, "BooleanType"), _a36);
12574
12503
  BooleanType = __decorate17([
12575
12504
  SimpleType2({
12576
12505
  description: "Simple true/false value",
@@ -12579,16 +12508,15 @@ BooleanType = __decorate17([
12579
12508
  json: "boolean"
12580
12509
  }
12581
12510
  }),
12582
- __metadata17("design:paramtypes", [Object])
12511
+ __metadata17("design:paramtypes", [typeof (_a35 = typeof Partial !== "undefined" && Partial) === "function" ? _a35 : Object])
12583
12512
  ], BooleanType);
12584
12513
 
12585
- // ../../build/common/esm/document/data-type/primitive-types/integer.type.js
12514
+ // src/document/data-type/primitive-types/integer.type.ts
12586
12515
  import { __decorate as __decorate18, __metadata as __metadata18 } from "tslib";
12587
12516
  import { toInteger, vg as vg17 } from "valgen";
12588
- var IntegerType = class IntegerType2 extends NumberType {
12589
- static {
12590
- __name(this, "IntegerType");
12591
- }
12517
+ var _a37;
12518
+ var _a38;
12519
+ var IntegerType = (_a38 = class extends NumberType {
12592
12520
  constructor(properties) {
12593
12521
  super(properties);
12594
12522
  }
@@ -12603,7 +12531,7 @@ var IntegerType = class IntegerType2 extends NumberType {
12603
12531
  [ENCODER](properties) {
12604
12532
  return this[DECODER](properties);
12605
12533
  }
12606
- };
12534
+ }, __name(_a38, "IntegerType"), _a38);
12607
12535
  IntegerType = __decorate18([
12608
12536
  SimpleType2({
12609
12537
  description: "An integer number",
@@ -12612,16 +12540,15 @@ IntegerType = __decorate18([
12612
12540
  json: "number"
12613
12541
  }
12614
12542
  }),
12615
- __metadata18("design:paramtypes", [Object])
12543
+ __metadata18("design:paramtypes", [typeof (_a37 = typeof Partial !== "undefined" && Partial) === "function" ? _a37 : Object])
12616
12544
  ], IntegerType);
12617
12545
 
12618
- // ../../build/common/esm/document/data-type/primitive-types/null.type.js
12546
+ // src/document/data-type/primitive-types/null.type.ts
12619
12547
  import { __decorate as __decorate19, __metadata as __metadata19 } from "tslib";
12620
12548
  import { isNull } from "valgen";
12621
- var NullType = class NullType2 {
12622
- static {
12623
- __name(this, "NullType");
12624
- }
12549
+ var _a39;
12550
+ var _a40;
12551
+ var NullType = (_a40 = class {
12625
12552
  constructor(properties) {
12626
12553
  if (properties)
12627
12554
  Object.assign(this, properties);
@@ -12632,7 +12559,7 @@ var NullType = class NullType2 {
12632
12559
  [ENCODER]() {
12633
12560
  return isNull;
12634
12561
  }
12635
- };
12562
+ }, __name(_a40, "NullType"), _a40);
12636
12563
  NullType = __decorate19([
12637
12564
  SimpleType2({
12638
12565
  description: "A Null value",
@@ -12641,36 +12568,34 @@ NullType = __decorate19([
12641
12568
  json: "null"
12642
12569
  }
12643
12570
  }),
12644
- __metadata19("design:paramtypes", [Object])
12571
+ __metadata19("design:paramtypes", [typeof (_a39 = typeof Partial !== "undefined" && Partial) === "function" ? _a39 : Object])
12645
12572
  ], NullType);
12646
12573
 
12647
- // ../../build/common/esm/document/data-type/primitive-types/object.type.js
12574
+ // src/document/data-type/primitive-types/object.type.ts
12648
12575
  import { __decorate as __decorate20, __metadata as __metadata20 } from "tslib";
12649
- var ObjectType = class ObjectType2 {
12650
- static {
12651
- __name(this, "ObjectType");
12652
- }
12576
+ var _a41;
12577
+ var _a42;
12578
+ var ObjectType = (_a42 = class {
12653
12579
  constructor(properties) {
12654
12580
  if (properties)
12655
12581
  Object.assign(this, properties);
12656
12582
  }
12657
- };
12583
+ }, __name(_a42, "ObjectType"), _a42);
12658
12584
  ObjectType = __decorate20([
12659
12585
  ComplexType2({
12660
12586
  name: "object",
12661
12587
  description: "A non modelled object",
12662
12588
  additionalFields: true
12663
12589
  }),
12664
- __metadata20("design:paramtypes", [Object])
12590
+ __metadata20("design:paramtypes", [typeof (_a41 = typeof Partial !== "undefined" && Partial) === "function" ? _a41 : Object])
12665
12591
  ], ObjectType);
12666
12592
 
12667
- // ../../build/common/esm/document/data-type/primitive-types/string.type.js
12593
+ // src/document/data-type/primitive-types/string.type.ts
12668
12594
  import { __decorate as __decorate21, __metadata as __metadata21 } from "tslib";
12669
12595
  import { toString as toString4, vg as vg18 } from "valgen";
12670
- var StringType = class StringType2 {
12671
- static {
12672
- __name(this, "StringType");
12673
- }
12596
+ var _a43;
12597
+ var _a44;
12598
+ var StringType = (_a44 = class {
12674
12599
  constructor(properties) {
12675
12600
  if (properties)
12676
12601
  Object.assign(this, properties);
@@ -12694,7 +12619,7 @@ var StringType = class StringType2 {
12694
12619
  [ENCODER](properties) {
12695
12620
  return this[DECODER](properties);
12696
12621
  }
12697
- };
12622
+ }, __name(_a44, "StringType"), _a44);
12698
12623
  __decorate21([
12699
12624
  SimpleType2.Attribute({
12700
12625
  description: "Regex pattern to be used for validation"
@@ -12727,10 +12652,10 @@ StringType = __decorate21([
12727
12652
  json: "string"
12728
12653
  }
12729
12654
  }),
12730
- __metadata21("design:paramtypes", [Object])
12655
+ __metadata21("design:paramtypes", [typeof (_a43 = typeof Partial !== "undefined" && Partial) === "function" ? _a43 : Object])
12731
12656
  ], StringType);
12732
12657
 
12733
- // ../../build/common/esm/document/data-type/required-type.js
12658
+ // src/document/data-type/required-type.ts
12734
12659
  function RequiredType(base, ...args) {
12735
12660
  const keys = Array.isArray(args[0]) ? args[0] : true;
12736
12661
  const options = Array.isArray(args[0]) ? args[1] : args[0];
@@ -12738,9 +12663,10 @@ function RequiredType(base, ...args) {
12738
12663
  }
12739
12664
  __name(RequiredType, "RequiredType");
12740
12665
 
12741
- // ../../build/common/esm/document/decorators/http-operation-entity.decorator.js
12666
+ // src/document/decorators/http-operation-entity.decorator.ts
12742
12667
  HttpOperation2.Entity = {};
12743
12668
  HttpOperation2.Entity.Create = function(arg0, arg1) {
12669
+ var _a45;
12744
12670
  let args;
12745
12671
  if (typeof arg0 === "object" && !arg0[DATATYPE_METADATA]) {
12746
12672
  args = arg0;
@@ -12765,7 +12691,7 @@ HttpOperation2.Entity.Create = function(arg0, arg1) {
12765
12691
  }),
12766
12692
  isArray: true,
12767
12693
  arraySeparator: ","
12768
- }).RequestContent(args.requestBody?.type || args.type).Response(HttpStatusCode.CREATED, {
12694
+ }).RequestContent(((_a45 = args.requestBody) == null ? void 0 : _a45.type) || args.type).Response(HttpStatusCode.CREATED, {
12769
12695
  description: 'Operation is successful. Returns OperationResult with "payload" field that contains the created resource.',
12770
12696
  contentType: MimeTypes.opra_response_json,
12771
12697
  type: args.type,
@@ -12813,7 +12739,8 @@ HttpOperation2.Entity.Delete = function(arg0, arg1) {
12813
12739
  };
12814
12740
  decorator.PathParam(name, paramMeta);
12815
12741
  decoratorChain.push((meta) => {
12816
- if (!meta.path?.includes(":" + name))
12742
+ var _a45;
12743
+ if (!((_a45 = meta.path) == null ? void 0 : _a45.includes(":" + name)))
12817
12744
  meta.path = (meta.path || "") + "@:" + name;
12818
12745
  meta.mergePath = true;
12819
12746
  });
@@ -12994,7 +12921,8 @@ HttpOperation2.Entity.Get = function(arg0, arg1) {
12994
12921
  };
12995
12922
  decorator.PathParam(name, paramMeta);
12996
12923
  decoratorChain.push((meta) => {
12997
- if (!meta.path?.includes(":" + name))
12924
+ var _a45;
12925
+ if (!((_a45 = meta.path) == null ? void 0 : _a45.includes(":" + name)))
12998
12926
  meta.path = (meta.path || "") + "@:" + name;
12999
12927
  meta.mergePath = true;
13000
12928
  });
@@ -13007,6 +12935,7 @@ HttpOperation2.Entity.Get = function(arg0, arg1) {
13007
12935
  return decorator;
13008
12936
  };
13009
12937
  HttpOperation2.Entity.UpdateMany = function(arg0, arg1) {
12938
+ var _a45;
13010
12939
  let args;
13011
12940
  if (typeof arg0 === "object" && !arg0[DATATYPE_METADATA]) {
13012
12941
  args = arg0;
@@ -13027,7 +12956,7 @@ HttpOperation2.Entity.UpdateMany = function(arg0, arg1) {
13027
12956
  required: true
13028
12957
  }
13029
12958
  });
13030
- decorator.RequestContent(args.requestBody?.type || args.type).Response(HttpStatusCode.OK, {
12959
+ decorator.RequestContent(((_a45 = args.requestBody) == null ? void 0 : _a45.type) || args.type).Response(HttpStatusCode.OK, {
13031
12960
  description: 'Operation is successful. Returns OperationResult with "affected" field.',
13032
12961
  contentType: MimeTypes.opra_response_json
13033
12962
  }).Response(HttpStatusCode.UNPROCESSABLE_ENTITY, {
@@ -13051,6 +12980,7 @@ HttpOperation2.Entity.UpdateMany = function(arg0, arg1) {
13051
12980
  return decorator;
13052
12981
  };
13053
12982
  HttpOperation2.Entity.Update = function(arg0, arg1) {
12983
+ var _a45;
13054
12984
  let args;
13055
12985
  if (typeof arg0 === "object" && !arg0[DATATYPE_METADATA]) {
13056
12986
  args = arg0;
@@ -13082,7 +13012,7 @@ HttpOperation2.Entity.Update = function(arg0, arg1) {
13082
13012
  }).QueryParam("filter", {
13083
13013
  type: filterType,
13084
13014
  description: "Determines filter fields"
13085
- }).RequestContent(args.requestBody?.type || args.type).Response(HttpStatusCode.OK, {
13015
+ }).RequestContent(((_a45 = args.requestBody) == null ? void 0 : _a45.type) || args.type).Response(HttpStatusCode.OK, {
13086
13016
  description: 'Operation is successful. Returns OperationResult with "payload" field that contains updated resource.',
13087
13017
  contentType: MimeTypes.opra_response_json,
13088
13018
  type: args.type,
@@ -13107,7 +13037,8 @@ HttpOperation2.Entity.Update = function(arg0, arg1) {
13107
13037
  };
13108
13038
  decorator.PathParam(name, paramMeta);
13109
13039
  decoratorChain.push((meta) => {
13110
- if (!meta.path?.includes(":" + name))
13040
+ var _a46;
13041
+ if (!((_a46 = meta.path) == null ? void 0 : _a46.includes(":" + name)))
13111
13042
  meta.path = (meta.path || "") + "@:" + name;
13112
13043
  meta.mergePath = true;
13113
13044
  });
@@ -13132,18 +13063,15 @@ function getDataTypeName(typ) {
13132
13063
  const metadata = Reflect.getMetadata(DATATYPE_METADATA, typ);
13133
13064
  if (!metadata)
13134
13065
  throw new TypeError(`Type (${typ}) is not decorated with any datatype decorators`);
13135
- if (metadata?.name)
13066
+ if (metadata == null ? void 0 : metadata.name)
13136
13067
  return metadata.name;
13137
13068
  throw new TypeError(`You should provide named data type but embedded one found`);
13138
13069
  }
13139
13070
  __name(getDataTypeName, "getDataTypeName");
13140
13071
 
13141
- // ../../build/common/esm/document/factory/api-document.factory.js
13072
+ // src/document/factory/api-document.factory.ts
13142
13073
  var OPRA_SPEC_URL = "https://oprajs.com/spec/v" + OpraSchema.SpecVersion;
13143
- var ApiDocumentFactory = class _ApiDocumentFactory {
13144
- static {
13145
- __name(this, "ApiDocumentFactory");
13146
- }
13074
+ var _ApiDocumentFactory = class _ApiDocumentFactory {
13147
13075
  /**
13148
13076
  * Creates ApiDocument instance from given schema object
13149
13077
  */
@@ -13192,7 +13120,7 @@ var ApiDocumentFactory = class _ApiDocumentFactory {
13192
13120
  let builtinDocument;
13193
13121
  if (!document[BUILTIN]) {
13194
13122
  const t = document.node.findDataType("string");
13195
- builtinDocument = t?.node.getDocument();
13123
+ builtinDocument = t == null ? void 0 : t.node.getDocument();
13196
13124
  if (!builtinDocument) {
13197
13125
  builtinDocument = await this.createBuiltinDocument(context);
13198
13126
  document.references.set("opra", builtinDocument);
@@ -13304,15 +13232,17 @@ var ApiDocumentFactory = class _ApiDocumentFactory {
13304
13232
  return document;
13305
13233
  }
13306
13234
  };
13235
+ __name(_ApiDocumentFactory, "ApiDocumentFactory");
13236
+ var ApiDocumentFactory = _ApiDocumentFactory;
13307
13237
 
13308
- // ../../build/common/esm/document/index.js
13238
+ // src/document/index.ts
13309
13239
  var classes;
13310
13240
  (function(classes2) {
13311
13241
  classes2.HttpApiFactory = HttpApiFactory;
13312
13242
  classes2.DataTypeFactory = DataTypeFactory;
13313
13243
  })(classes || (classes = {}));
13314
13244
 
13315
- // ../../build/common/esm/index.js
13245
+ // src/index.ts
13316
13246
  import { uid as uid2 } from "uid";
13317
13247
  export {
13318
13248
  AnyType,
@@ -13332,7 +13262,7 @@ export {
13332
13262
  DATATYPE_METADATA,
13333
13263
  DECODER,
13334
13264
  DECORATOR,
13335
- DataType,
13265
+ DataType2 as DataType,
13336
13266
  DataTypeMap,
13337
13267
  DateStringType,
13338
13268
  DateTimeStringType,
@@ -13351,18 +13281,18 @@ export {
13351
13281
  FilterType,
13352
13282
  ForbiddenError,
13353
13283
  HTTP_CONTROLLER_METADATA,
13354
- HttpApi,
13284
+ HttpApi2 as HttpApi,
13355
13285
  HttpController2 as HttpController,
13356
13286
  HttpHeaderCodes,
13357
- HttpMediaType,
13358
- HttpMultipartField,
13287
+ HttpMediaType2 as HttpMediaType,
13288
+ HttpMultipartField2 as HttpMultipartField,
13359
13289
  HttpOperation2 as HttpOperation,
13360
- HttpOperationResponse,
13361
- HttpParameter,
13362
- HttpRequestBody,
13290
+ HttpOperationResponse2 as HttpOperationResponse,
13291
+ HttpParameter2 as HttpParameter,
13292
+ HttpRequestBody2 as HttpRequestBody,
13363
13293
  HttpStatusCode,
13364
13294
  HttpStatusMessages,
13365
- HttpStatusRange,
13295
+ HttpStatusRange2 as HttpStatusRange,
13366
13296
  I18n,
13367
13297
  IntegerType,
13368
13298
  InternalServerError,