@prisma/orm-framework 8.0.0-rc.18-dev.32 → 8.0.0-rc.18-dev.34

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.
Files changed (123) hide show
  1. package/dist/{authoring-BY3RNM--.d.mts → authoring-BJgarhJI.d.mts} +10 -8
  2. package/dist/authoring-BJgarhJI.d.mts.map +1 -0
  3. package/dist/{authoring-D77CrCtb.mjs → authoring-so3aBYD8.mjs} +70 -42
  4. package/dist/authoring-so3aBYD8.mjs.map +1 -0
  5. package/dist/{binder-Cm0N-oPu-deLbJ-j9.d.mts → binder-Cm0N-oPu-WASgR3Jw.d.mts} +12 -12
  6. package/dist/{binder-Cm0N-oPu-deLbJ-j9.d.mts.map → binder-Cm0N-oPu-WASgR3Jw.d.mts.map} +1 -1
  7. package/dist/codec-DGRG8oEH.mjs +56 -0
  8. package/dist/codec-DGRG8oEH.mjs.map +1 -0
  9. package/dist/{codec-CGFT5YKu.d.mts → codec-DkiEF2cQ.d.mts} +15 -3
  10. package/dist/codec-DkiEF2cQ.d.mts.map +1 -0
  11. package/dist/{codec-descriptor-DEfL2Kb6-B-vOB0ue.mjs → codec-descriptor-V2-N5Qmm-BR-5owl6.mjs} +3 -3
  12. package/dist/{codec-descriptor-DEfL2Kb6-B-vOB0ue.mjs.map → codec-descriptor-V2-N5Qmm-BR-5owl6.mjs.map} +1 -1
  13. package/dist/{codec-types-B5_YzEwo-DVCRRWlg.d.mts → codec-types-DjozIOvT-BIcpyFea.d.mts} +10 -2
  14. package/dist/codec-types-DjozIOvT-BIcpyFea.d.mts.map +1 -0
  15. package/dist/{components-BdXloTpj.d.mts → components-BbJVTEds.d.mts} +4 -4
  16. package/dist/{components-BdXloTpj.d.mts.map → components-BbJVTEds.d.mts.map} +1 -1
  17. package/dist/components.d.mts +16 -16
  18. package/dist/components.mjs +6 -6
  19. package/dist/components__authoring.d.mts +3 -3
  20. package/dist/components__authoring.mjs +1 -1
  21. package/dist/components__codec.d.mts +3 -3
  22. package/dist/components__codec.mjs +4 -4
  23. package/dist/components__components.d.mts +3 -3
  24. package/dist/components__control.d.mts +3 -3
  25. package/dist/components__control.mjs +2 -2
  26. package/dist/components__emission.d.mts +3 -3
  27. package/dist/components__execution.d.mts +1 -1
  28. package/dist/components__psl-ast.d.mts +3 -3
  29. package/dist/components__runtime.d.mts +1 -1
  30. package/dist/{config-types-BXw8w6h9.d.mts → config-types-DWa3fsKB.d.mts} +9 -9
  31. package/dist/{config-types-BXw8w6h9.d.mts.map → config-types-DWa3fsKB.d.mts.map} +1 -1
  32. package/dist/config.d.mts +1 -1
  33. package/dist/config__config-types.d.mts +1 -1
  34. package/dist/contract-authoring.d.mts +5 -5
  35. package/dist/contract-authoring.mjs +3 -3
  36. package/dist/contract-authoring.mjs.map +1 -1
  37. package/dist/contract.d.mts +3 -3
  38. package/dist/contract.mjs +1 -1
  39. package/dist/contract__enum-accessor.d.mts +1 -1
  40. package/dist/contract__enum-accessor.mjs +1 -1
  41. package/dist/contract__types.d.mts +2 -2
  42. package/dist/{control-C_zs63JQ-BFg3u8U5.d.mts → control-B5ezUWD2-DSW4M09S.d.mts} +6 -4
  43. package/dist/{control-C_zs63JQ-BFg3u8U5.d.mts.map → control-B5ezUWD2-DSW4M09S.d.mts.map} +1 -1
  44. package/dist/{control-D2f07K6R.d.mts → control-BKuRvAVY.d.mts} +44 -23
  45. package/dist/control-BKuRvAVY.d.mts.map +1 -0
  46. package/dist/control-CgOeB4TR.d.mts +1 -0
  47. package/dist/{control-BJypoZfu.mjs → control-DrorRbwa.mjs} +77 -3
  48. package/dist/control-DrorRbwa.mjs.map +1 -0
  49. package/dist/{control-Bv8UK63M-dBsEDbTP.mjs → control-KsXr4fYD-BWq94TJe.mjs} +5 -4
  50. package/dist/control-KsXr4fYD-BWq94TJe.mjs.map +1 -0
  51. package/dist/{data-type-DPhZLx30-DP2Kmnf5.mjs → data-type-CVNHtd6y-BFa_VnCb.mjs} +4 -3
  52. package/dist/data-type-CVNHtd6y-BFa_VnCb.mjs.map +1 -0
  53. package/dist/emission-XBYOUuHN.d.mts +2 -0
  54. package/dist/{emission-types-CH6r1DQ8-eg79TO6Y.d.mts → emission-types-sz0-pyyS-D3-ssRUu.d.mts} +4 -4
  55. package/dist/{emission-types-CH6r1DQ8-eg79TO6Y.d.mts.map → emission-types-sz0-pyyS-D3-ssRUu.d.mts.map} +1 -1
  56. package/dist/{enum-accessor-BUVBc6ZH.d.mts → enum-accessor-2OZgavDX.d.mts} +4 -2
  57. package/dist/enum-accessor-2OZgavDX.d.mts.map +1 -0
  58. package/dist/{enum-accessor-CAlX-HOl.mjs → enum-accessor-B-A2wNok.mjs} +17 -4
  59. package/dist/enum-accessor-B-A2wNok.mjs.map +1 -0
  60. package/dist/errors.d.mts +5 -5
  61. package/dist/errors.mjs +4 -4
  62. package/dist/errors__control.d.mts +2 -2
  63. package/dist/errors__control.mjs +1 -1
  64. package/dist/errors__execution.d.mts +2 -2
  65. package/dist/errors__execution.mjs +2 -2
  66. package/dist/errors__migration.d.mts +1 -1
  67. package/dist/errors__migration.mjs +1 -1
  68. package/dist/{execution-B_f4fR5R.d.mts → execution-Dnl9Zc7s.d.mts} +4 -14
  69. package/dist/{execution-B_f4fR5R.d.mts.map → execution-Dnl9Zc7s.d.mts.map} +1 -1
  70. package/dist/{execution-okmamhD2.mjs → execution-YDOVHN67.mjs} +3 -15
  71. package/dist/{execution-okmamhD2.mjs.map → execution-YDOVHN67.mjs.map} +1 -1
  72. package/dist/{execution-DbU_RTsu.d.mts → execution-oZAqgZPd.d.mts} +2 -2
  73. package/dist/{execution-DbU_RTsu.d.mts.map → execution-oZAqgZPd.d.mts.map} +1 -1
  74. package/dist/{framework-authoring-CdKfPz3Y-BGocjz36.d.mts → framework-authoring-D3AsJskV-BALZR-J9.d.mts} +131 -10
  75. package/dist/framework-authoring-D3AsJskV-BALZR-J9.d.mts.map +1 -0
  76. package/dist/{framework-components-CDiuJNYP-CwszHrSy.d.mts → framework-components-CTibZus8-BK5QlxM-.d.mts} +5 -5
  77. package/dist/{framework-components-CDiuJNYP-CwszHrSy.d.mts.map → framework-components-CTibZus8-BK5QlxM-.d.mts.map} +1 -1
  78. package/dist/ids.d.mts +1 -1
  79. package/dist/{migration-BfUEEHWP.mjs → migration-BOOO5ZD-.mjs} +2 -2
  80. package/dist/{migration-BfUEEHWP.mjs.map → migration-BOOO5ZD-.mjs.map} +1 -1
  81. package/dist/{migration-BmIe8pwt.d.mts → migration-CHa1k8VR.d.mts} +2 -2
  82. package/dist/{migration-BmIe8pwt.d.mts.map → migration-CHa1k8VR.d.mts.map} +1 -1
  83. package/dist/{parse-CJtBvEYy-wRfXv1HQ.d.mts → parse-CJtBvEYy-CW8BvW5O.d.mts} +6 -6
  84. package/dist/{parse-CJtBvEYy-wRfXv1HQ.d.mts.map → parse-CJtBvEYy-CW8BvW5O.d.mts.map} +1 -1
  85. package/dist/psl-ast-DOJH1ZST.d.mts +2 -0
  86. package/dist/{psl-ast-DJhMWL6S-Bwyl-NrU.d.mts → psl-ast-JQykH4Uz-D6tMHdnz.d.mts} +3 -3
  87. package/dist/{psl-ast-DJhMWL6S-Bwyl-NrU.d.mts.map → psl-ast-JQykH4Uz-D6tMHdnz.d.mts.map} +1 -1
  88. package/dist/psl-parser.d.mts +19 -14
  89. package/dist/psl-parser.d.mts.map +1 -1
  90. package/dist/psl-parser.mjs +145 -116
  91. package/dist/psl-parser.mjs.map +1 -1
  92. package/dist/psl-parser__format.d.mts +1 -1
  93. package/dist/psl-parser__interpret.d.mts +6 -6
  94. package/dist/psl-parser__syntax.d.mts +1 -1
  95. package/dist/psl-printer.d.mts +4 -4
  96. package/dist/{runtime-CsMROQco.d.mts → runtime-BXPhK_oW.d.mts} +2 -2
  97. package/dist/{runtime-CsMROQco.d.mts.map → runtime-BXPhK_oW.d.mts.map} +1 -1
  98. package/dist/{written-value-CQt_C72W-aKFkxVmA.d.mts → temporal-presets-adW53vQH-DPdAe_Oe.d.mts} +4 -125
  99. package/dist/temporal-presets-adW53vQH-DPdAe_Oe.d.mts.map +1 -0
  100. package/dist/{types-BBb-tMcj.d.mts → types-GNXJ7xW2.d.mts} +16 -3
  101. package/dist/types-GNXJ7xW2.d.mts.map +1 -0
  102. package/dist/{types-import-spec-B2nK2jwW-DkF7t1NL.d.mts → types-import-spec-hkPsnreE-C-fa8812.d.mts} +3 -3
  103. package/dist/{types-import-spec-B2nK2jwW-DkF7t1NL.d.mts.map → types-import-spec-hkPsnreE-C-fa8812.d.mts.map} +1 -1
  104. package/dist/utils.d.mts +1 -1
  105. package/package.json +15 -15
  106. package/dist/authoring-BY3RNM--.d.mts.map +0 -1
  107. package/dist/authoring-D77CrCtb.mjs.map +0 -1
  108. package/dist/codec-BYGt3r-S.mjs +0 -28
  109. package/dist/codec-BYGt3r-S.mjs.map +0 -1
  110. package/dist/codec-CGFT5YKu.d.mts.map +0 -1
  111. package/dist/codec-types-B5_YzEwo-DVCRRWlg.d.mts.map +0 -1
  112. package/dist/control-BJypoZfu.mjs.map +0 -1
  113. package/dist/control-Bv8UK63M-dBsEDbTP.mjs.map +0 -1
  114. package/dist/control-D2f07K6R.d.mts.map +0 -1
  115. package/dist/control-GrJDRvbD.d.mts +0 -1
  116. package/dist/data-type-DPhZLx30-DP2Kmnf5.mjs.map +0 -1
  117. package/dist/emission-D9fjPyAg.d.mts +0 -2
  118. package/dist/enum-accessor-BUVBc6ZH.d.mts.map +0 -1
  119. package/dist/enum-accessor-CAlX-HOl.mjs.map +0 -1
  120. package/dist/framework-authoring-CdKfPz3Y-BGocjz36.d.mts.map +0 -1
  121. package/dist/psl-ast-BrpUfqBu.d.mts +0 -2
  122. package/dist/types-BBb-tMcj.d.mts.map +0 -1
  123. package/dist/written-value-CQt_C72W-aKFkxVmA.d.mts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { B as JsonValue } from "./domain-envelope-CN721GnP-4huRt7Wc.mjs";
2
- import { i as Codec, p as CodecLookupWithDescriptors } from "./codec-types-B5_YzEwo-DVCRRWlg.mjs";
3
- import { $ as instantiateAuthoringTypeConstructor, D as AuthoringTypeConstructorDescriptor, F as ParsedPslExtensionBlock, U as PslSpan, a as AuthoringContributions, k as AuthoringTypeNamespace, p as AuthoringFieldPresetDescriptor, s as AuthoringEntityContext } from "./framework-authoring-CdKfPz3Y-BGocjz36.mjs";
2
+ import { i as Codec, p as CodecLookupWithDescriptors } from "./codec-types-DjozIOvT-BIcpyFea.mjs";
4
3
  import { r as Result } from "./result-BYCOANWy.mjs";
5
- import "./written-value-CQt_C72W-aKFkxVmA.mjs";
4
+ import { D as AuthoringTypeConstructorDescriptor, G as PslSpan, L as ParsedPslExtensionBlock, _t as instantiateAuthoringTypeConstructor, a as AuthoringContributions, k as AuthoringTypeNamespace, p as AuthoringFieldPresetDescriptor, s as AuthoringEntityContext } from "./framework-authoring-D3AsJskV-BALZR-J9.mjs";
5
+ import "./temporal-presets-adW53vQH-DPdAe_Oe.mjs";
6
6
  //#region ../../../1-framework/1-core/framework-components/dist/authoring.d.mts
7
7
  //#region src/shared/authoring-type-constructor-call.d.ts
8
8
  /** What a type constructor call produces for a column. */
@@ -40,11 +40,13 @@ interface DuplicateStoredValue {
40
40
  readonly earlier: string;
41
41
  readonly later: string;
42
42
  readonly stored: JsonValue;
43
+ /** The earlier member's stored form, present when it differs from `stored` and the data type's equality holds the two equal. */
44
+ readonly earlierStored?: JsonValue;
43
45
  }
44
46
  /**
45
- * Each enum member whose stored form equals an earlier member's, paired with the first such member. Stored forms are compared as `contract.json` holds them, so negative zero is zero, and by `canonicalStringify`, so two objects with the same entries in a different order are equal. Every enum authoring surface refuses the members this returns.
47
+ * Each enum member whose stored form equals an earlier member's, paired with the first such member. Stored forms are compared as `contract.json` holds them, so negative zero is zero, and by `canonicalStringify`, so two objects with the same entries in a different order are equal; or, when the enum's data type declares an `equalityKey`, by that key, so `0.5` and `0.50` are one `numeric` value. Every enum authoring surface refuses the members this returns.
46
48
  */
47
- declare function duplicateStoredMembers(members: readonly StoredEnumMember[]): readonly DuplicateStoredValue[];
49
+ declare function duplicateStoredMembers(members: readonly StoredEnumMember[], equalityKey?: (json: JsonValue) => string): readonly DuplicateStoredValue[];
48
50
  //#endregion
49
51
  //#region src/shared/enum-members.d.ts
50
52
  /** An enum whose members hold the values the application sees, before its codec stores them. */
@@ -112,8 +114,8 @@ interface EnumBlockSite {
112
114
  */
113
115
  declare function enumMemberProblemDiagnostic(problem: EnumMemberProblem, site: EnumBlockSite): EnumBlockDiagnostic;
114
116
  /**
115
- * Reads the members of an `enum` block through its codec. A member written as a number literal is read from its source text as a column default is read, when the family gives a reader for it (`ctx.readWrittenNumber`), so no digit is lost; when that reader refuses the number, the codec's data type and then the codec read it, and only if they refuse it too is the reader's reason reported. Every other member is read the same way, as a value of the codec's data type converted by `fromDataTypeValue`, and a bare member is read from its own name.
116
- * Pushes a diagnostic and returns `undefined` when the codec refuses a member, when two members
117
+ * Reads the members of an `enum` block through its codec. When the family gives a reader for written values (`ctx.readWrittenValueForCodec`), each member is read as a column default is read: its syntax gives it a data type, the codec's data type takes it directly or through a cast, and the codec checks it, so a number keeps every digit and a quoted value is text. A bare member is read from its own name, as text. Without that reader, a member is read as JSON by the codec's data type and then the codec.
118
+ * Pushes a diagnostic and returns `undefined` when a member is refused, when two members
117
119
  * store the same value, or when the block has no members. Shared by every family's enum factory.
118
120
  */
119
121
  declare function readEnumBlockMembers(block: ParsedPslExtensionBlock<Readonly<Record<string, JsonValue | undefined>>>, codecId: string, codec: Codec, ctx: AuthoringEntityContext): readonly EnumBlockMember[] | undefined;
@@ -129,4 +131,4 @@ declare function fieldPresetSpellings(contributions: AuthoringContributions | un
129
131
  declare function getAuthoringFieldPreset(contributions: AuthoringContributions | undefined, path: readonly string[]): AuthoringFieldPresetDescriptor | undefined;
130
132
  //#endregion
131
133
  export { findAuthoringTypeConstructorCall as _, EncodedEnumMember as a, EnumBlockSite as c, authoringTypeConstructorArguments as d, authoringTypeConstructors as f, fieldPresetSpellings as g, enumMemberProblemDiagnostic as h, DuplicateStoredValue as i, EnumMemberProblem as l, encodeEnumMembers as m, AuthoringTypeConstructorOutput as n, EnumBlockDiagnostic as o, duplicateStoredMembers as p, DecodedEnum as r, EnumBlockMember as s, AuthoringTypeConstructorCall as t, StoredEnumMember as u, getAuthoringFieldPreset as v, readEnumBlockMembers as y };
132
- //# sourceMappingURL=authoring-BY3RNM--.d.mts.map
134
+ //# sourceMappingURL=authoring-BJgarhJI.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authoring-BJgarhJI.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/authoring.d.mts"],"mappings":";;;;;;;;KAOK,iCAAiC,kBAAkB;;UAE9C;WACC;WACA;;;iBAGM,0BAA0B,WAAW,wBAAwB,2BAA2B;WAC9F;WACA,YAAY;;;;;;;iBAON,kCAAkC,YAAY,oCAAoC,QAAQ;;;;;;;iBAO1F,iCAAiC,WAAW,wBAAwB,QAAQ,iCAAiC;;;UAGpH;WACC;WACA,QAAQ;;UAET;WACC;WACA;WACA,QAAQ;;WAER,gBAAgB;;;;;iBAKV,uBAAuB,kBAAkB,oBAAoB,eAAe,MAAM,gCAAgC;;;;UAIzH;WACC;WACA;aACE;aACA;;;;UAIH;WACC;WACA,OAAO;;UAER;WACC;WACA;WACA;WACA;;UAED;WACC;WACA;WACA;WACA,QAAQ;WACR;;KAEN;WACM;WACA;;WAEA;IACP,qBAAqB;WACd;IACP;;;;iBAIa,kBAAkB,aAAa,aAAa,aAAa,6BAA6B,gBAAgB,8BAA8B;;;UAG3I;WACC;WACA;;UAED;WACC;WACA;WACA;WACA,MAAM;;;;;UAKP;WACC;WACA;WACA;WACA,MAAM;WACN,aAAa,SAAS,eAAe;;;;;iBAK/B,4BAA4B,SAAS,mBAAmB,MAAM,gBAAgB;;;;;;iBAM9E,qBAAqB,OAAO,wBAAwB,SAAS,eAAe,0BAA0B,iBAAiB,OAAO,OAAO,KAAK,kCAAkC;;;;;;iBAM5K,qBAAqB,eAAe,oCAAoC;;;;iBAIxE,wBAAwB,eAAe,oCAAoC,0BAA0B"}
@@ -2,9 +2,9 @@ import { t as canonicalStringify } from "./canonical-stringify-DY4NaAJi.mjs";
2
2
  import { r as isInternalError, t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
3
3
  import { n as notOk, r as ok } from "./result-8OXF26MN.mjs";
4
4
  import { t as canonicalizeJson } from "./canonicalize-json-ZPawceQR-Dua1VNEB.mjs";
5
- import { u as dataTypeId } from "./data-type-DPhZLx30-DP2Kmnf5.mjs";
5
+ import { u as dataTypeId } from "./data-type-CVNHtd6y-BFa_VnCb.mjs";
6
6
  import { C as isAuthoringTypeConstructorDescriptor, D as printedTaggedLiteralReadsBack, E as printTaggedLiteral, _ as isAuthoringArgRef, g as instantiateAuthoringTypeConstructor, y as isAuthoringFieldPresetDescriptor } from "./temporal-presets-BcDyr_hK-CFplJNGz.mjs";
7
- import { a as readContractValue, i as enumRefusalOf } from "./codec-descriptor-DEfL2Kb6-B-vOB0ue.mjs";
7
+ import { a as readContractValue, i as enumRefusalOf } from "./codec-descriptor-V2-N5Qmm-BR-5owl6.mjs";
8
8
  //#region ../../../1-framework/1-core/framework-components/dist/authoring.mjs
9
9
  /** Every type constructor of `namespace`, with its path, in namespace order. */
10
10
  function* authoringTypeConstructors(namespace, path = []) {
@@ -60,20 +60,28 @@ function findAuthoringTypeConstructorCall(namespace, output) {
60
60
  }
61
61
  }
62
62
  /**
63
- * Each enum member whose stored form equals an earlier member's, paired with the first such member. Stored forms are compared as `contract.json` holds them, so negative zero is zero, and by `canonicalStringify`, so two objects with the same entries in a different order are equal. Every enum authoring surface refuses the members this returns.
63
+ * Each enum member whose stored form equals an earlier member's, paired with the first such member. Stored forms are compared as `contract.json` holds them, so negative zero is zero, and by `canonicalStringify`, so two objects with the same entries in a different order are equal; or, when the enum's data type declares an `equalityKey`, by that key, so `0.5` and `0.50` are one `numeric` value. Every enum authoring surface refuses the members this returns.
64
64
  */
65
- function duplicateStoredMembers(members) {
66
- const memberByStoredForm = /* @__PURE__ */ new Map();
65
+ function duplicateStoredMembers(members, equalityKey) {
66
+ const storedFormOf = (stored) => canonicalStringify(JSON.parse(JSON.stringify(stored)));
67
+ const memberByKey = /* @__PURE__ */ new Map();
67
68
  const duplicates = [];
68
- for (const { name, stored } of members) {
69
- const key = canonicalStringify(JSON.parse(JSON.stringify(stored)));
70
- const earlier = memberByStoredForm.get(key);
71
- if (earlier === void 0) memberByStoredForm.set(key, name);
72
- else duplicates.push({
73
- earlier,
69
+ for (const member of members) {
70
+ const { name, stored } = member;
71
+ const key = equalityKey?.(stored) ?? storedFormOf(stored);
72
+ const earlier = memberByKey.get(key);
73
+ if (earlier === void 0) memberByKey.set(key, member);
74
+ else if (storedFormOf(earlier.stored) === storedFormOf(stored)) duplicates.push({
75
+ earlier: earlier.name,
74
76
  later: name,
75
77
  stored
76
78
  });
79
+ else duplicates.push({
80
+ earlier: earlier.name,
81
+ later: name,
82
+ stored,
83
+ earlierStored: earlier.stored
84
+ });
77
85
  }
78
86
  return duplicates;
79
87
  }
@@ -111,14 +119,14 @@ function enumMemberProblemDiagnostic(problem, site) {
111
119
  };
112
120
  case "duplicate-member-value": return {
113
121
  code: "PSL_ENUM_DUPLICATE_MEMBER_VALUE",
114
- message: `enum "${enumName}": members "${problem.earlier}" and "${problem.later}" both store ${JSON.stringify(problem.stored)}`,
122
+ message: problem.earlierStored === void 0 ? `enum "${enumName}": members "${problem.earlier}" and "${problem.later}" both store ${JSON.stringify(problem.stored)}` : `enum "${enumName}": members "${problem.earlier}" and "${problem.later}" store ${JSON.stringify(problem.earlierStored)} and ${JSON.stringify(problem.stored)}, which the database holds equal`,
115
123
  ...at(problem.later)
116
124
  };
117
125
  }
118
126
  }
119
127
  /**
120
- * Reads the members of an `enum` block through its codec. A member written as a number literal is read from its source text as a column default is read, when the family gives a reader for it (`ctx.readWrittenNumber`), so no digit is lost; when that reader refuses the number, the codec's data type and then the codec read it, and only if they refuse it too is the reader's reason reported. Every other member is read the same way, as a value of the codec's data type converted by `fromDataTypeValue`, and a bare member is read from its own name.
121
- * Pushes a diagnostic and returns `undefined` when the codec refuses a member, when two members
128
+ * Reads the members of an `enum` block through its codec. When the family gives a reader for written values (`ctx.readWrittenValueForCodec`), each member is read as a column default is read: its syntax gives it a data type, the codec's data type takes it directly or through a cast, and the codec checks it, so a number keeps every digit and a quoted value is text. A bare member is read from its own name, as text. Without that reader, a member is read as JSON by the codec's data type and then the codec.
129
+ * Pushes a diagnostic and returns `undefined` when a member is refused, when two members
122
130
  * store the same value, or when the block has no members. Shared by every family's enum factory.
123
131
  */
124
132
  function readEnumBlockMembers(block, codecId, codec, ctx) {
@@ -136,28 +144,38 @@ function readEnumBlockMembers(block, codecId, codec, ctx) {
136
144
  let memberError = false;
137
145
  for (const [memberName, memberValue] of Object.entries(block.values)) {
138
146
  const span = block.parameterSpans[memberName] ?? block.span;
139
- const reading = typeof memberValue === "number" ? ctx.readWrittenNumber?.({
140
- text: block.numberTexts?.[memberName] ?? String(memberValue),
147
+ const bareMemberRefused = () => ({
148
+ code: "PSL_ENUM_BARE_MEMBER_NON_STRING_CODEC",
149
+ message: `enum "${block.name}" member "${memberName}" has no value and codec "${codecId}" does not accept a bare name as input`,
150
+ sourceId,
151
+ span
152
+ });
153
+ const written = block.writtenValues?.[memberName] ?? (memberValue === void 0 ? {
154
+ kind: "string",
155
+ text: memberName
156
+ } : void 0);
157
+ const reading = written === void 0 ? void 0 : ctx.readWrittenValueForCodec?.({
158
+ written,
141
159
  codecId,
142
160
  subject: `enum "${block.name}" member "${memberName}"`
143
- }) : void 0;
144
- const written = reading?.ok ? reading.value : memberValue === void 0 ? memberName : memberValue;
161
+ });
162
+ if (reading !== void 0 && !reading.ok) {
163
+ diagnostics?.push(memberValue === void 0 ? bareMemberRefused() : {
164
+ code: reading.code,
165
+ message: reading.message,
166
+ sourceId,
167
+ span
168
+ });
169
+ memberError = true;
170
+ continue;
171
+ }
172
+ const stored = reading?.ok ? reading.value : memberValue === void 0 ? memberName : memberValue;
145
173
  let read;
146
174
  try {
147
- read = readContractValue(codec, written, void 0);
175
+ read = readContractValue(codec, stored, void 0);
148
176
  } catch (err) {
149
177
  if (isInternalError(err)) throw err;
150
- diagnostics?.push(reading !== void 0 && !reading.ok ? {
151
- code: "PSL_EXTENSION_INVALID_VALUE",
152
- message: reading.message,
153
- sourceId,
154
- span
155
- } : memberValue === void 0 ? {
156
- code: "PSL_ENUM_BARE_MEMBER_NON_STRING_CODEC",
157
- message: `enum "${block.name}" member "${memberName}" has no value and codec "${codecId}" does not accept a bare name as input`,
158
- sourceId,
159
- span
160
- } : {
178
+ diagnostics?.push(memberValue === void 0 ? bareMemberRefused() : {
161
179
  code: "PSL_EXTENSION_INVALID_VALUE",
162
180
  message: `enum "${block.name}" member "${memberName}" was rejected by codec "${codecId}": ${err instanceof Error ? err.message : String(err)}`,
163
181
  sourceId,
@@ -175,7 +193,7 @@ function readEnumBlockMembers(block, codecId, codec, ctx) {
175
193
  stored: codec.dataType.toContract(codec.toDataTypeValue(read))
176
194
  });
177
195
  }
178
- for (const duplicate of duplicateStoredMembers(storedMembers)) {
196
+ for (const duplicate of duplicateStoredMembers(storedMembers, codec.dataType.equalityKey)) {
179
197
  diagnostics?.push(enumMemberProblemDiagnostic({
180
198
  kind: "duplicate-member-value",
181
199
  ...duplicate
@@ -272,7 +290,7 @@ function encodeEnumMembers(decodedEnum, codecLookup) {
272
290
  for (const duplicate of duplicateStoredMembers(members.map(({ name, value }) => ({
273
291
  name,
274
292
  stored: value
275
- })))) problems.push({
293
+ })), codec.dataType.equalityKey)) problems.push({
276
294
  kind: "duplicate-member-value",
277
295
  ...duplicate
278
296
  });
@@ -340,21 +358,31 @@ function describeRefusedValueType(refused, support, guidance) {
340
358
  function isSameForm(a, b) {
341
359
  return a.kind === "tag" && b.kind === "tag" ? a.tag === b.tag : a.kind === b.kind;
342
360
  }
361
+ /** Text a contract source reads as a number literal. */
362
+ const NUMBER_TEXT = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$|^[+-]?(?:NaN|Infinity)$/;
343
363
  /**
344
- * The literal to write in place of a quoted string that `receivingType` refuses under `receivingParams`: the string as a literal of the first tag the type admits. `undefined` when the value is not a quoted string, the type admits no tag, the literal would not read back as the same text, or the type would refuse the literal too.
364
+ * The literal to write in place of a quoted string that `receivingType` refuses under `receivingParams`: the string as a literal of the first tag the type admits, or else the string's text unquoted, as a number or a boolean. `undefined` when the value is not a quoted string, no such literal reads back as the same text, or the type would refuse each of them too.
345
365
  */
346
366
  function exactRewrite(support, receiving, written) {
347
- const { receivingType, receivingParams } = receiving;
348
- const [tag] = admittedTags(support, receivingType);
349
- if (written.kind !== "string" || tag === void 0) return void 0;
350
- if (!printedTaggedLiteralReadsBack(written.text)) return void 0;
351
- const read = readWrittenValue(support, {
367
+ if (written.kind !== "string") return void 0;
368
+ const admits = (candidate) => {
369
+ const read = readWrittenValue(support, candidate);
370
+ return read.ok && castTypedValue(support, receiving.receivingType, receiving.receivingParams, read.value).ok;
371
+ };
372
+ const [tag] = admittedTags(support, receiving.receivingType);
373
+ if (tag !== void 0 && printedTaggedLiteralReadsBack(written.text) && admits({
352
374
  kind: "tag",
353
375
  tag,
354
376
  text: written.text
355
- });
356
- if (!read.ok || !castTypedValue(support, receivingType, receivingParams, read.value).ok) return;
357
- return printTaggedLiteral(tag, written.text);
377
+ })) return printTaggedLiteral(tag, written.text);
378
+ if (NUMBER_TEXT.test(written.text) && admits({
379
+ kind: "number",
380
+ text: written.text
381
+ })) return written.text;
382
+ if ((written.text === "true" || written.text === "false") && admits({
383
+ kind: "boolean",
384
+ value: written.text === "true"
385
+ })) return written.text;
358
386
  }
359
387
  function findEntry(support, matches) {
360
388
  for (const [key, entry] of Object.entries(support.entries)) if (matches(entry)) return {
@@ -503,4 +531,4 @@ function describeAdmittedForms(support, dataType) {
503
531
  //#endregion
504
532
  export { tagForm as S, findAuthoringTypeConstructorCall as _, castTypedValue as a, readEnumBlockMembers as b, describeRefusal as c, encodeEnumMembers as d, entryForPlain as f, fieldPresetSpellings as g, exactRewrite as h, authoringTypeConstructors as i, describeRefusedValueType as l, enumMemberProblemDiagnostic as m, admittedTags as n, describeAdmittedForms as o, entryForTag as p, authoringTypeConstructorArguments as r, describeExpected as s, admittedForms as t, duplicateStoredMembers as u, getAuthoringFieldPreset as v, readWrittenValue as x, knownTags as y };
505
533
 
506
- //# sourceMappingURL=authoring-D77CrCtb.mjs.map
534
+ //# sourceMappingURL=authoring-so3aBYD8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authoring-so3aBYD8.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/authoring.mjs"],"sourcesContent":["import { t as canonicalizeJson } from \"./canonicalize-json-ZPawceQR.mjs\";\nimport { a as dataTypeId } from \"./data-type-CVNHtd6y.mjs\";\nimport { a as readContractValue, r as enumRefusalOf } from \"./codec-descriptor-V2-N5Qmm.mjs\";\nimport { A as isAuthoringModelAttributeDescriptor, C as getAuthoringTypeConstructor, D as isAuthoringArgRef, E as instantiateAuthoringTypeConstructor, F as mergeAuthoringNamespaces, I as resolveAuthoringTemplateValue, L as resolveEnumCodecId, M as isAuthoringSelectRef, N as isAuthoringTypeConstructorDescriptor, O as isAuthoringEntityTypeDescriptor, R as validateAuthoringHelperArguments, S as flushAuthoringWarnings, T as instantiateAuthoringFieldPreset, _ as assertNoCrossRegistryCollisions, a as temporalCodecPreset, d as describeTaggedLiteralFailure, f as printTaggedLiteral, g as tsTaggedTemplateSource, h as resolveTemplateTagEscapes, i as temporalAuthoringPresets, j as isAuthoringPslBlockDescriptor, k as isAuthoringFieldPresetDescriptor, n as TEMPORAL_ON_UPDATE_ARG, o as temporalPhaseTemplate, p as printedTaggedLiteralReadsBack, r as TIMESTAMP_NOW_GENERATOR_ID, s as temporalPhaseTemplateWithParams, t as TEMPORAL_ON_CREATE_ARG, u as canonicalizeTaggedLiteralBody, v as assertResolvableTypeConstructorTemplates, w as instantiateAuthoringEntityType, x as collectScalarTypeConstructors, y as classifyEnumMemberType, z as validateAuthoringTypeParams } from \"./temporal-presets-BcDyr_hK.mjs\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { canonicalStringify } from \"@internal/utils/canonical-stringify\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/shared/authoring-type-constructor-call.ts\n/** Every type constructor of `namespace`, with its path, in namespace order. */\nfunction* authoringTypeConstructors(namespace, path = []) {\n\tfor (const [name, value] of Object.entries(namespace)) if (isAuthoringTypeConstructorDescriptor(value)) yield {\n\t\tpath: [...path, name],\n\t\tdescriptor: value\n\t};\n\telse yield* authoringTypeConstructors(value, [...path, name]);\n}\nfunction produces(produced, wanted) {\n\tconst wantedFields = {\n\t\t...wanted,\n\t\ttypeParams: wanted.typeParams ?? {}\n\t};\n\treturn Object.entries({\n\t\t...produced,\n\t\ttypeParams: produced.typeParams ?? {}\n\t}).every(([key, value]) => canonicalizeJson(value) === canonicalizeJson(wantedFields[key]));\n}\n/**\n* The arguments that make `descriptor` produce exactly `output`, when each of its type parameters\n* comes straight from one argument; `undefined` when it cannot produce `output`, including when\n* `output` has no value for an argument the constructor requires.\n*/\nfunction authoringTypeConstructorArguments(descriptor, output) {\n\tif (descriptor.entityRefArg !== void 0 || descriptor.output.codecId !== output.codecId) return;\n\tconst args = [];\n\tfor (const [key, template] of Object.entries(descriptor.output.typeParams ?? {})) {\n\t\tconst value = output.typeParams?.[key];\n\t\tif (value !== void 0 && isAuthoringArgRef(template) && template.path === void 0) args[template.index] = value;\n\t}\n\tconst requiredArgs = (descriptor.args ?? []).filter((arg) => arg.optional !== true).length;\n\tif (args.length < requiredArgs || Array.from(args).includes(void 0)) return void 0;\n\ttry {\n\t\treturn produces(instantiateAuthoringTypeConstructor(descriptor, args), output) ? args : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* The first call, in namespace order, to a type constructor in `namespace` that produces exactly\n* `output`. The inverse of {@link instantiateAuthoringTypeConstructor} for constructors whose type\n* parameters each come straight from one argument. A constructor whose argument names another\n* entity is never chosen. `undefined` when no call produces `output`.\n*/\nfunction findAuthoringTypeConstructorCall(namespace, output) {\n\tfor (const { path, descriptor } of authoringTypeConstructors(namespace)) {\n\t\tconst args = authoringTypeConstructorArguments(descriptor, output);\n\t\tif (args !== void 0) return {\n\t\t\tpath,\n\t\t\targs\n\t\t};\n\t}\n}\n//#endregion\n//#region src/shared/enum-stored-members.ts\n/**\n* Each enum member whose stored form equals an earlier member's, paired with the first such member. Stored forms are compared as `contract.json` holds them, so negative zero is zero, and by `canonicalStringify`, so two objects with the same entries in a different order are equal; or, when the enum's data type declares an `equalityKey`, by that key, so `0.5` and `0.50` are one `numeric` value. Every enum authoring surface refuses the members this returns.\n*/\nfunction duplicateStoredMembers(members, equalityKey) {\n\tconst storedFormOf = (stored) => canonicalStringify(JSON.parse(JSON.stringify(stored)));\n\tconst memberByKey = /* @__PURE__ */ new Map();\n\tconst duplicates = [];\n\tfor (const member of members) {\n\t\tconst { name, stored } = member;\n\t\tconst key = equalityKey?.(stored) ?? storedFormOf(stored);\n\t\tconst earlier = memberByKey.get(key);\n\t\tif (earlier === void 0) memberByKey.set(key, member);\n\t\telse if (storedFormOf(earlier.stored) === storedFormOf(stored)) duplicates.push({\n\t\t\tearlier: earlier.name,\n\t\t\tlater: name,\n\t\t\tstored\n\t\t});\n\t\telse duplicates.push({\n\t\t\tearlier: earlier.name,\n\t\t\tlater: name,\n\t\t\tstored,\n\t\t\tearlierStored: earlier.stored\n\t\t});\n\t}\n\treturn duplicates;\n}\n//#endregion\n//#region src/shared/enum-block-members.ts\n/**\n* A problem with an enum's members as a diagnostic at the member, or at the block when the problem is the enum's codec.\n*/\nfunction enumMemberProblemDiagnostic(problem, site) {\n\tconst { enumName, codecId, sourceId } = site;\n\tconst at = (member) => ({\n\t\tsourceId,\n\t\tspan: site.memberSpans[member] ?? site.span\n\t});\n\tswitch (problem.kind) {\n\t\tcase \"codec-not-for-enums\": return {\n\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\tmessage: `enum \"${enumName}\" cannot use the codec \"${codecId}\". ${problem.refusal}`,\n\t\t\tsourceId,\n\t\t\tspan: site.span\n\t\t};\n\t\tcase \"codec-missing\": return {\n\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\tmessage: `enum \"${enumName}\" uses codec \"${codecId}\", which no pack in the contract provides`,\n\t\t\tsourceId,\n\t\t\tspan: site.span\n\t\t};\n\t\tcase \"codec-refused-member\": return {\n\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\tmessage: `enum \"${enumName}\" member \"${problem.member}\" was rejected by codec \"${codecId}\": ${problem.reason}`,\n\t\t\t...at(problem.member)\n\t\t};\n\t\tcase \"member-not-stored-as-written\": return {\n\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\tmessage: `enum \"${enumName}\" member \"${problem.member}\" is written ${problem.written}, but its codec stores ${JSON.stringify(problem.stored)}. Write the member as ${problem.writeAs}.`,\n\t\t\t...at(problem.member)\n\t\t};\n\t\tcase \"duplicate-member-value\": return {\n\t\t\tcode: \"PSL_ENUM_DUPLICATE_MEMBER_VALUE\",\n\t\t\tmessage: problem.earlierStored === void 0 ? `enum \"${enumName}\": members \"${problem.earlier}\" and \"${problem.later}\" both store ${JSON.stringify(problem.stored)}` : `enum \"${enumName}\": members \"${problem.earlier}\" and \"${problem.later}\" store ${JSON.stringify(problem.earlierStored)} and ${JSON.stringify(problem.stored)}, which the database holds equal`,\n\t\t\t...at(problem.later)\n\t\t};\n\t}\n}\n/**\n* Reads the members of an `enum` block through its codec. When the family gives a reader for written values (`ctx.readWrittenValueForCodec`), each member is read as a column default is read: its syntax gives it a data type, the codec's data type takes it directly or through a cast, and the codec checks it, so a number keeps every digit and a quoted value is text. A bare member is read from its own name, as text. Without that reader, a member is read as JSON by the codec's data type and then the codec.\n* Pushes a diagnostic and returns `undefined` when a member is refused, when two members\n* store the same value, or when the block has no members. Shared by every family's enum factory.\n*/\nfunction readEnumBlockMembers(block, codecId, codec, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst diagnostics = ctx.diagnostics;\n\tconst site = {\n\t\tenumName: block.name,\n\t\tcodecId,\n\t\tsourceId,\n\t\tspan: block.span,\n\t\tmemberSpans: block.parameterSpans\n\t};\n\tconst members = [];\n\tconst storedMembers = [];\n\tlet memberError = false;\n\tfor (const [memberName, memberValue] of Object.entries(block.values)) {\n\t\tconst span = block.parameterSpans[memberName] ?? block.span;\n\t\tconst bareMemberRefused = () => ({\n\t\t\tcode: \"PSL_ENUM_BARE_MEMBER_NON_STRING_CODEC\",\n\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" has no value and codec \"${codecId}\" does not accept a bare name as input`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t\tconst written = block.writtenValues?.[memberName] ?? (memberValue === void 0 ? {\n\t\t\tkind: \"string\",\n\t\t\ttext: memberName\n\t\t} : void 0);\n\t\tconst reading = written === void 0 ? void 0 : ctx.readWrittenValueForCodec?.({\n\t\t\twritten,\n\t\t\tcodecId,\n\t\t\tsubject: `enum \"${block.name}\" member \"${memberName}\"`\n\t\t});\n\t\tif (reading !== void 0 && !reading.ok) {\n\t\t\tdiagnostics?.push(memberValue === void 0 ? bareMemberRefused() : {\n\t\t\t\tcode: reading.code,\n\t\t\t\tmessage: reading.message,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tconst stored = reading?.ok ? reading.value : memberValue === void 0 ? memberName : memberValue;\n\t\tlet read;\n\t\ttry {\n\t\t\tread = readContractValue(codec, stored, void 0);\n\t\t} catch (err) {\n\t\t\tif (isInternalError(err)) throw err;\n\t\t\tdiagnostics?.push(memberValue === void 0 ? bareMemberRefused() : {\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" was rejected by codec \"${codecId}\": ${err instanceof Error ? err.message : String(err)}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tmembers.push({\n\t\t\tname: memberName,\n\t\t\tvalue: read\n\t\t});\n\t\tstoredMembers.push({\n\t\t\tname: memberName,\n\t\t\tstored: codec.dataType.toContract(codec.toDataTypeValue(read))\n\t\t});\n\t}\n\tfor (const duplicate of duplicateStoredMembers(storedMembers, codec.dataType.equalityKey)) {\n\t\tdiagnostics?.push(enumMemberProblemDiagnostic({\n\t\t\tkind: \"duplicate-member-value\",\n\t\t\t...duplicate\n\t\t}, site));\n\t\tmemberError = true;\n\t}\n\tif (memberError) return void 0;\n\tif (members.length === 0) {\n\t\tdiagnostics?.push({\n\t\t\tcode: \"PSL_ENUM_MISSING_TYPE\",\n\t\t\tmessage: `enum \"${block.name}\" must have at least one member`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn members;\n}\n//#endregion\n//#region src/shared/enum-members.ts\n/** Whether TypeScript gives the value a literal type: a primitive, or an array or plain object of them. */\nfunction hasLiteralType(value) {\n\tif ([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"boolean\",\n\t\t\"bigint\"\n\t].includes(typeof value)) return true;\n\tif (Array.isArray(value)) return value.every(hasLiteralType);\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn (prototype === Object.prototype || prototype === null) && Object.values(value).every(hasLiteralType);\n}\n/**\n* A member's value in the form its codec stores it, and that form read back by the codec. A codec that throws on either is a refusal naming the member; an internal error is not the member's fault and propagates.\n*/\nfunction encodeEnumMember(member, codec) {\n\ttry {\n\t\tconst stored = codec.dataType.toContract(codec.toDataTypeValue(member.value));\n\t\treturn ok({\n\t\t\tstored,\n\t\t\treadBack: readContractValue(codec, stored, void 0)\n\t\t});\n\t} catch (cause) {\n\t\tif (isInternalError(cause)) throw cause;\n\t\treturn notOk({\n\t\t\tkind: \"codec-refused-member\",\n\t\t\tmember: member.name,\n\t\t\treason: cause instanceof Error ? cause.message : String(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/**\n* Refuses a member its codec reads back as a different value from the one written. A member with no literal type has nothing to compare.\n*/\nfunction notStoredAsWritten(member, stored, readBack) {\n\tif (!hasLiteralType(member.value)) return void 0;\n\tif (hasLiteralType(readBack) && canonicalStringify(readBack) === canonicalStringify(member.value)) return void 0;\n\treturn {\n\t\tkind: \"member-not-stored-as-written\",\n\t\tmember: member.name,\n\t\twritten: canonicalStringify(member.value),\n\t\tstored,\n\t\twriteAs: hasLiteralType(readBack) ? canonicalStringify(readBack) : JSON.stringify(stored)\n\t};\n}\n/**\n* Each member of an enum in the form its codec stores it. Refuses a codec an enum cannot use, a codec the lookup does not have, a member the codec refuses, a member the codec reads back as another value, and two members stored as the same value. Every family's contract build calls this, and reports the problems in its own terms.\n*/\nfunction encodeEnumMembers(decodedEnum, codecLookup) {\n\tconst descriptor = codecLookup.descriptorFor(decodedEnum.codecId);\n\tconst refusal = descriptor === void 0 ? void 0 : enumRefusalOf(descriptor);\n\tif (refusal !== void 0) return notOk([{\n\t\tkind: \"codec-not-for-enums\",\n\t\trefusal\n\t}]);\n\tconst codec = codecLookup.get(decodedEnum.codecId);\n\tif (codec === void 0) return notOk([{ kind: \"codec-missing\" }]);\n\tconst problems = [];\n\tconst members = [];\n\tfor (const member of decodedEnum.enumMembers) {\n\t\tconst encoded = encodeEnumMember(member, codec);\n\t\tif (!encoded.ok) {\n\t\t\tproblems.push(encoded.failure);\n\t\t\tcontinue;\n\t\t}\n\t\tconst { stored, readBack } = encoded.value;\n\t\tconst mismatch = notStoredAsWritten(member, stored, readBack);\n\t\tif (mismatch !== void 0) problems.push(mismatch);\n\t\tmembers.push({\n\t\t\tname: member.name,\n\t\t\tvalue: stored\n\t\t});\n\t}\n\tfor (const duplicate of duplicateStoredMembers(members.map(({ name, value }) => ({\n\t\tname,\n\t\tstored: value\n\t})), codec.dataType.equalityKey)) problems.push({\n\t\tkind: \"duplicate-member-value\",\n\t\t...duplicate\n\t});\n\treturn problems.length > 0 ? notOk(problems) : ok(members);\n}\n//#endregion\n//#region src/shared/field-preset-resolution.ts\nfunction presetSpellingsUnder(members, prefix) {\n\treturn Object.entries(members).flatMap(([name, member]) => isAuthoringFieldPresetDescriptor(member) ? [`${prefix}.${name}(${(member.args ?? []).map((arg, index) => arg.name ?? `argument${index + 1}`).join(\", \")})`] : presetSpellingsUnder(member, `${prefix}.${name}`));\n}\n/**\n* How each field preset registered under `namespace`, at any depth, is written, with the names of its arguments: `temporal.timestamp(onCreate, onUpdate)`.\n*/\nfunction fieldPresetSpellings(contributions, namespace) {\n\tconst members = contributions?.field?.[namespace];\n\tif (members === void 0 || isAuthoringFieldPresetDescriptor(members)) return [];\n\treturn presetSpellingsUnder(members, namespace);\n}\n/**\n* Walks `authoringContributions.field` segment by segment and returns the field-preset descriptor at the path, or `undefined` when none is registered there.\n*/\nfunction getAuthoringFieldPreset(contributions, path) {\n\tlet current = contributions?.field;\n\tfor (const segment of path) {\n\t\tif (typeof current !== \"object\" || current === null || \"kind\" in current) return;\n\t\tcurrent = current[segment];\n\t}\n\treturn current !== void 0 && isAuthoringFieldPresetDescriptor(current) ? current : void 0;\n}\n//#endregion\n//#region src/shared/written-value.ts\n/**\n* Words a refusal of the cast rule. The message leads with what to write; the types are named only when the value has a form the position admits and its type is still refused, such as a number too large for the receiving type.\n*/\nfunction describeRefusal(refusal, support, guidance) {\n\tswitch (refusal.kind) {\n\t\tcase \"unknown-tag\": return {\n\t\t\tcode: \"PSL_UNKNOWN_LITERAL_TAG\",\n\t\t\tmessage: `Unknown literal tag \"${refusal.tag}\". Known tags: ${refusal.known.join(\", \")}.`\n\t\t};\n\t\tcase \"unwritable\": return {\n\t\t\tcode: \"PSL_VALUE_TYPE_INCOMPATIBLE\",\n\t\t\tmessage: `${describeExpected(guidance.forms)}; this target has no data type for a ${refusal.syntax} value`\n\t\t};\n\t\tcase \"unreadable\":\n\t\tcase \"refused-by-type\": return {\n\t\t\tcode: \"PSL_INVALID_LITERAL\",\n\t\t\tmessage: refusal.message\n\t\t};\n\t\tcase \"no-cast\": return {\n\t\t\tcode: \"PSL_VALUE_TYPE_INCOMPATIBLE\",\n\t\t\tmessage: describeRefusedValueType(refusal, support, guidance)\n\t\t};\n\t}\n}\n/** `Expected <forms>`, the forms joined with `or`: the start of every refusal that says what to write. */\nfunction describeExpected(forms) {\n\treturn `Expected ${joinForms(forms)}`;\n}\n/**\n* Words a value of type `valueType` that `receivingType` refuses, where `guidance.forms` may be written. The types are named only when the value has one of those forms.\n*/\nfunction describeRefusedValueType(refused, support, guidance) {\n\tconst expected = describeExpected(guidance.forms);\n\tconst valueForm = writtenForm(support, refused.valueType);\n\tif (valueForm !== void 0 && guidance.forms.some((form) => isSameForm(form, valueForm))) return `${expected} that ${refused.receivingType} can hold; got ${refused.valueType}`;\n\treturn guidance.rewrite === void 0 ? expected : `${expected}; write ${guidance.rewrite}`;\n}\nfunction isSameForm(a, b) {\n\treturn a.kind === \"tag\" && b.kind === \"tag\" ? a.tag === b.tag : a.kind === b.kind;\n}\n/** Text a contract source reads as a number literal. */\nconst NUMBER_TEXT = /^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?$|^[+-]?(?:NaN|Infinity)$/;\n/**\n* The literal to write in place of a quoted string that `receivingType` refuses under `receivingParams`: the string as a literal of the first tag the type admits, or else the string's text unquoted, as a number or a boolean. `undefined` when the value is not a quoted string, no such literal reads back as the same text, or the type would refuse each of them too.\n*/\nfunction exactRewrite(support, receiving, written) {\n\tif (written.kind !== \"string\") return void 0;\n\tconst admits = (candidate) => {\n\t\tconst read = readWrittenValue(support, candidate);\n\t\treturn read.ok && castTypedValue(support, receiving.receivingType, receiving.receivingParams, read.value).ok;\n\t};\n\tconst [tag] = admittedTags(support, receiving.receivingType);\n\tif (tag !== void 0 && printedTaggedLiteralReadsBack(written.text) && admits({\n\t\tkind: \"tag\",\n\t\ttag,\n\t\ttext: written.text\n\t})) return printTaggedLiteral(tag, written.text);\n\tif (NUMBER_TEXT.test(written.text) && admits({\n\t\tkind: \"number\",\n\t\ttext: written.text\n\t})) return written.text;\n\tif ((written.text === \"true\" || written.text === \"false\") && admits({\n\t\tkind: \"boolean\",\n\t\tvalue: written.text === \"true\"\n\t})) return written.text;\n}\nfunction findEntry(support, matches) {\n\tfor (const [key, entry] of Object.entries(support.entries)) if (matches(entry)) return {\n\t\tkey,\n\t\tentry\n\t};\n}\n/** The entry a tag names, or `undefined` when no pack registered that tag. */\nfunction entryForTag(support, tag) {\n\treturn findEntry(support, ({ written }) => written.kind === \"tag\" && written.tag === tag);\n}\n/** The entry that reads a plain string, boolean or number, or `undefined` when none does. */\nfunction entryForPlain(support, syntax) {\n\treturn findEntry(support, ({ written }) => written.kind === \"plain\" && written.syntax === syntax);\n}\n/** Every tag a stack registers, in the order the entries were merged. */\nfunction knownTags(support) {\n\treturn Object.values(support.entries).flatMap((entry) => entry.written.kind === \"tag\" ? [entry.written.tag] : []);\n}\nfunction textOf(written) {\n\treturn written.kind === \"boolean\" ? String(written.value) : written.text;\n}\nfunction messageOf(error) {\n\treturn error instanceof Error ? error.message : String(error);\n}\n/** The value of `type` that `json` gives under `params`, constructed by that type; a refusal is worded for a diagnostic. */\nfunction valueOfType(support, type, json, params, refuse) {\n\tconst declaration = support.lookup.get(type);\n\tif (declaration === void 0) throw new InternalError(`A value of \"${type}\" was written, and this stack does not register it.`);\n\ttry {\n\t\treturn ok(declaration.valueFrom(json(), params));\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\treturn notOk(refuse(messageOf(error)));\n\t}\n}\n/** Read one written value through the authoring entry for its syntax, as a value its type constructs. */\nfunction readWrittenValue(support, written) {\n\tconst found = written.kind === \"tag\" ? entryForTag(support, written.tag) : entryForPlain(support, written.kind);\n\tif (found === void 0) return written.kind === \"tag\" ? notOk({\n\t\tkind: \"unknown-tag\",\n\t\ttag: written.tag,\n\t\tknown: knownTags(support)\n\t}) : notOk({\n\t\tkind: \"unwritable\",\n\t\tsyntax: written.kind\n\t});\n\tconst text = textOf(written);\n\tconst form = found.entry.written;\n\tconst unreadable = (message) => ({\n\t\tkind: \"unreadable\",\n\t\tmessage\n\t});\n\tif (form.kind === \"plain\" && form.syntax === \"number\") {\n\t\tconst classified = form.classify(text);\n\t\treturn classified === void 0 ? notOk(unreadable(`no data type of this target holds the number ${text}`)) : valueOfType(support, classified.type, () => classified.value, {}, unreadable);\n\t}\n\treturn valueOfType(support, dataTypeId(found.key), () => form.parse(text), {}, unreadable);\n}\n/** Take a value into the receiving type, directly or through the cast that type declares; the receiving type constructs the result under `receivingParams`, the parameters of the position that receives it. */\nfunction castTypedValue(support, receivingType, receivingParams, value) {\n\tconst refusedByType = (message) => ({\n\t\tkind: \"refused-by-type\",\n\t\treceivingType,\n\t\tmessage\n\t});\n\tif (value.type === receivingType) return valueOfType(support, receivingType, () => value.value, receivingParams, refusedByType);\n\tconst declaration = support.lookup.get(receivingType);\n\tconst cast = declaration?.casts[value.type];\n\tif (cast === void 0) return notOk({\n\t\tkind: \"no-cast\",\n\t\treceivingType,\n\t\treceivingParams,\n\t\tvalueType: value.type,\n\t\tcasts: Object.keys(declaration?.casts ?? {})\n\t});\n\tconst source = support.lookup.get(value.type);\n\tif (source === void 0) throw new InternalError(`A value of \"${value.type}\" was cast, and this stack does not register it.`);\n\tlet json;\n\ttry {\n\t\tjson = cast(source.toContract(value));\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\treturn notOk({\n\t\t\tkind: \"unreadable\",\n\t\t\tmessage: messageOf(error)\n\t\t});\n\t}\n\treturn valueOfType(support, receivingType, () => json, receivingParams, refusedByType);\n}\n/** The type itself, then each type it casts from, in key order. */\nfunction admittedTypes(support, dataType) {\n\treturn [dataType, ...Object.keys(support.lookup.get(dataType)?.casts ?? {})];\n}\n/** The tags a position of `dataType` admits: its own tag, then the tags of the types it casts from. */\nfunction admittedTags(support, dataType) {\n\tconst tags = admittedTypes(support, dataType).flatMap((type) => {\n\t\tconst written = support.entries[type]?.written;\n\t\treturn written?.kind === \"tag\" ? [written.tag] : [];\n\t});\n\treturn [...new Set(tags)];\n}\n/** The form a value of a tagged literal's type is written in. */\nfunction tagForm(tag) {\n\treturn {\n\t\tkind: \"tag\",\n\t\ttag,\n\t\tphrase: `${tag}\\`...\\``\n\t};\n}\nconst PLAIN_PHRASES = {\n\tstring: \"a quoted string\",\n\tboolean: \"true or false\",\n\tnumber: \"a number\"\n};\nfunction writtenForm(support, type) {\n\tconst written = support.entries[type]?.written;\n\tif (written?.kind === \"tag\") return tagForm(written.tag);\n\tif (written?.kind === \"plain\" && written.syntax !== \"number\") return {\n\t\tkind: written.syntax,\n\t\tphrase: PLAIN_PHRASES[written.syntax]\n\t};\n\treturn Object.entries(support.entries).some(([key, entry]) => entry.written.kind === \"plain\" && entry.written.syntax === \"number\" && (key === type || entry.written.types.some((listed) => listed === type))) ? {\n\t\tkind: \"number\",\n\t\tphrase: PLAIN_PHRASES.number\n\t} : void 0;\n}\n/** What {@link describeAdmittedForms} returns for a type that nothing writes. */\nconst NO_WRITTEN_FORM = \"no written form\";\n/** Each form a position receiving every one of `receivingTypes` admits, once, in order: ``sql`...` ``, `true or false`. */\nfunction admittedForms(support, receivingTypes) {\n\tconst forms = [];\n\tfor (const type of receivingTypes.flatMap((receiving) => admittedTypes(support, receiving))) {\n\t\tconst form = writtenForm(support, type);\n\t\tif (form !== void 0 && !forms.some((listed) => isSameForm(listed, form))) forms.push(form);\n\t}\n\treturn forms;\n}\nfunction joinForms(forms) {\n\treturn forms.length === 0 ? NO_WRITTEN_FORM : forms.map((form) => form.phrase).join(\" or \");\n}\n/** How a position of `dataType` can be written, for a diagnostic: ``sql`...` ``, `true or false`. */\nfunction describeAdmittedForms(support, dataType) {\n\treturn joinForms(admittedForms(support, [dataType]));\n}\n//#endregion\nexport { TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, admittedForms, admittedTags, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, authoringTypeConstructorArguments, authoringTypeConstructors, canonicalizeTaggedLiteralBody, castTypedValue, classifyEnumMemberType, collectScalarTypeConstructors, describeAdmittedForms, describeExpected, describeRefusal, describeRefusedValueType, describeTaggedLiteralFailure, duplicateStoredMembers, encodeEnumMembers, entryForPlain, entryForTag, enumMemberProblemDiagnostic, exactRewrite, fieldPresetSpellings, findAuthoringTypeConstructorCall, flushAuthoringWarnings, getAuthoringFieldPreset, getAuthoringTypeConstructor, instantiateAuthoringEntityType, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringFieldPresetDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringSelectRef, isAuthoringTypeConstructorDescriptor, knownTags, mergeAuthoringNamespaces, printTaggedLiteral, printedTaggedLiteralReadsBack, readEnumBlockMembers, readWrittenValue, resolveAuthoringTemplateValue, resolveEnumCodecId, resolveTemplateTagEscapes, tagForm, temporalAuthoringPresets, temporalCodecPreset, temporalPhaseTemplate, temporalPhaseTemplateWithParams, tsTaggedTemplateSource, validateAuthoringHelperArguments, validateAuthoringTypeParams };\n\n//# sourceMappingURL=authoring.mjs.map"],"mappings":";;;;;;;;;AASA,UAAU,0BAA0B,WAAW,OAAO,CAAC,GAAG;CACzD,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,SAAS,GAAG,IAAI,qCAAqC,KAAK,GAAG,MAAM;EAC7G,MAAM,CAAC,GAAG,MAAM,IAAI;EACpB,YAAY;CACb;MACK,OAAO,0BAA0B,OAAO,CAAC,GAAG,MAAM,IAAI,CA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CACvD,IAAI,SAAS,SAAS,WAAW,QAAQ,WAAW,UAAU,OAAO;EACpE,MAAM,QAAQ;EACd,QAAQ,cAAc,QAAQ;CAC/B;CACA,OAAO,OAAO,QAAQ,QAAQ,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,WAAW,MAAM,QAAQ,SAAS,WAAW,MAAM,QAAQ,WAAW,aAAa,QAAQ,QAAQ,MAAM,QAAQ,MAAM,MAAM,WAAW,WAAW,IAAI,EAAE,IAAI;EAC/M,MAAM;EACN,QAAQ,cAAc;CACvB,IAAI,KAAK;AACV;;AAEA,MAAM,kBAAkB;;AAExB,SAAS,cAAc,SAAS,gBAAgB;CAC/C,MAAM,QAAQ,CAAC;CACf,KAAK,MAAM,QAAQ,eAAe,SAAS,cAAc,cAAc,SAAS,SAAS,CAAC,GAAG;EAC5F,MAAM,OAAO,YAAY,SAAS,IAAI;EACtC,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM,MAAM,WAAW,WAAW,QAAQ,IAAI,CAAC,GAAG,MAAM,KAAK,IAAI;CAC1F;CACA,OAAO;AACR;AACA,SAAS,UAAU,OAAO;CACzB,OAAO,MAAM,WAAW,IAAI,kBAAkB,MAAM,KAAK,SAAS,KAAK,MAAM,CAAC,CAAC,KAAK,MAAM;AAC3F;;AAEA,SAAS,sBAAsB,SAAS,UAAU;CACjD,OAAO,UAAU,cAAc,SAAS,CAAC,QAAQ,CAAC,CAAC;AACpD"}
@@ -1,16 +1,16 @@
1
1
  import { B as JsonValue } from "./domain-envelope-CN721GnP-4huRt7Wc.mjs";
2
- import { T as DataTypeValue, v as DataTypeId } from "./codec-types-B5_YzEwo-DVCRRWlg.mjs";
3
- import { D as AuthoringTypeConstructorDescriptor, U as PslSpan, p as AuthoringFieldPresetDescriptor } from "./framework-authoring-CdKfPz3Y-BGocjz36.mjs";
4
- import { i as ControlMutationDefaults } from "./mutation-default-types-js6llINX-WGmpaAAL.mjs";
2
+ import { T as DataTypeValue, v as DataTypeId } from "./codec-types-DjozIOvT-BIcpyFea.mjs";
5
3
  import { r as Result } from "./result-BYCOANWy.mjs";
6
- import { d as TaggedLiteralCanonicalization } from "./written-value-CQt_C72W-aKFkxVmA.mjs";
7
- import "./authoring-BY3RNM--.mjs";
8
- import "./codec-CGFT5YKu.mjs";
9
- import { l as SignatureArgumentOutput, u as SignatureOptionalArgument } from "./components-BdXloTpj.mjs";
10
- import "./control-D2f07K6R.mjs";
11
- import "./psl-ast-BrpUfqBu.mjs";
12
- import { n as ContractSourceContext } from "./config-types-BXw8w6h9.mjs";
13
- import { $ as TypeAnnotationAst, A as NamespaceDeclarationAst, D as ModelAttributeAst, F as ParseDiagnostic, O as ModelDeclarationAst, T as MixinDeclarationAst, V as PslSources, Y as SyntaxNode, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, k as NamedTypeDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, w as KeyValuePairAst, z as PslDiagnostic } from "./parse-CJtBvEYy-wRfXv1HQ.mjs";
4
+ import { D as AuthoringTypeConstructorDescriptor, G as PslSpan, p as AuthoringFieldPresetDescriptor } from "./framework-authoring-D3AsJskV-BALZR-J9.mjs";
5
+ import { i as ControlMutationDefaults } from "./mutation-default-types-js6llINX-WGmpaAAL.mjs";
6
+ import { o as TaggedLiteralCanonicalization } from "./temporal-presets-adW53vQH-DPdAe_Oe.mjs";
7
+ import "./authoring-BJgarhJI.mjs";
8
+ import "./codec-DkiEF2cQ.mjs";
9
+ import { l as SignatureArgumentOutput, u as SignatureOptionalArgument } from "./components-BbJVTEds.mjs";
10
+ import "./control-BKuRvAVY.mjs";
11
+ import "./psl-ast-DOJH1ZST.mjs";
12
+ import { n as ContractSourceContext } from "./config-types-DWa3fsKB.mjs";
13
+ import { $ as TypeAnnotationAst, A as NamespaceDeclarationAst, D as ModelAttributeAst, F as ParseDiagnostic, O as ModelDeclarationAst, T as MixinDeclarationAst, V as PslSources, Y as SyntaxNode, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, k as NamedTypeDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, w as KeyValuePairAst, z as PslDiagnostic } from "./parse-CJtBvEYy-CW8BvW5O.mjs";
14
14
  import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
15
15
  //#region ../../../1-framework/2-authoring/psl-parser/dist/binder-Cm0N-oPu.d.mts
16
16
  //#region src/resolve.d.ts
@@ -507,4 +507,4 @@ declare function contributedTypeOf(resolution: Resolution | undefined, binder: B
507
507
  declare function createBinder(input: CreateBinderInput): BinderResult;
508
508
  //#endregion
509
509
  export { ModelSymbol as $, DescribeUnresolvedType as A, SymbolTableResult as At, FixedStrArgType as B, createBinder as Bt, ContributedTypeNamespace as C, ResolvedAttributeArg as Ct, CtxOf as D, Scope as Dt, CreateBinderInput as E, ResolvedTypeConstructorCall as Et, FieldAttributeCtx as F, UnrestrictedNumArgType as Ft, InferAttr as G, memberEntries as Gt, FuncCallSig as H, isNamespaceLike as Ht, FieldRefArgType as I, UnrestrictedStrArgType as It, JsonArgType as J, readResolvedAttributes as Jt, InspectableArgType as K, nodePslSpan as Kt, FieldSymbol as L, UnsupportedAttribute as Lt, EntityDeclaration as M, TypedFuncCall as Mt, EntityRefArgType as N, UnresolvedTypeReference as Nt, DataTypeValueArgType as O, ScopeResolution as Ot, EntitySelector as P, UnrestrictedIdentifierArgType as Pt, ModelAttributeCtx as Q, FixedIdentifierArgType as R, buildSymbolTable as Rt, ContributedTypeDescriptor as S, ResolvedAttribute as St, ContributedTypeSymbol as T, ResolvedNamedTypeBinding as Tt, FunctionSymbol as U, keywordPslSpan as Ut, FuncCallArgType as V, entityReference as Vt, IdentifierArgType as W, matchesSelector as Wt, ListArgType as X, typeReferenceNode as Xt, JsonValueArgType as Y, readResolvedConstructorCall as Yt, MixinSymbol as Z, CompositeTypeSymbol as _, RecordArgType as _t, AttributeLevel as a, NumLiteralArgType as at, ContributedMember as b, RequiredContextFor as bt, AttributeSymbol as c, OutOf as ct, BinderResult as d, ParameterSymbol as dt, NamedOut as et, BlockAttributeCtx as f, ParsedTaggedLiteral as ft, BuildSymbolTableOptions as g, PslSymbol as gt, BoundSpec as h, PositionalParam as ht, AttributeCtx as i, NumLiteral as it, DescribeUnsupportedAttribute as j, TaggedLiteralArgType as jt, DeclarationFor as k, SymbolTable as kt, Binder as l, PSL_UNRESOLVED_REFERENCE as lt, BoolArgType as m, PosOut as mt, ArgType as n, NamespaceSymbol as nt, AttributeOut as o, OneOfArgType as ot, BlockSymbol as p, ParsedTypedValue as pt, IntArgType as q, readResolvedAttribute as qt, ArgTypeKind as r, NullArgType as rt, AttributeSpec as s, OptionalArgType as st, AnyArgType as t, NamedTypeSymbol as tt, BinderContext as u, Param as ut, ConstantSymbol as v, ReferencedFieldRefArgType as vt, ContributedTypeScope as w, ResolvedEntityReference as wt, ContributedNamespaceSymbol as x, Resolution as xt, ContextForRequirement as y, RejectingArgType as yt, FixedNumArgType as z, contributedTypeOf as zt };
510
- //# sourceMappingURL=binder-Cm0N-oPu-deLbJ-j9.d.mts.map
510
+ //# sourceMappingURL=binder-Cm0N-oPu-WASgR3Jw.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"binder-Cm0N-oPu-deLbJ-j9.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/binder-Cm0N-oPu.d.mts"],"mappings":";;;;;;;;;;;;;;;;UAWU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP,kBAAkB,cAAc,oBAAoB,oBAAoB,oBAAoB;WAC3F;WACA,eAAe;WACf,MAAM;WACN,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,cAAc,oBAAoB,mBAAmB,WAAW,OAAO,SAAS,aAAa,kBAAkB;iBACrI,uBAAuB,cAAc,oBAAoB,mBAAmB,YAAY,SAAS,QAAQ,SAAS,sBAAsB,kBAAkB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,MAAM,aAAa;EACjC,QAAQ,MAAM,aAAa;;UAEnB;WACC,WAAW;WACX;WACA,OAAO;WACP,OAAO;;KAEb,gCAAgC,aAAa,yBAAyB;UACjE;WACC,OAAO;WACP,OAAO;WACP;;KAEN,0BAA0B,YAAY;UACjC,sBAAsB,KAAK;WAC1B,yBAAyB,KAAK;;UAE/B;WACC,SAAS;WACT,aAAa;WACb,SAAS;;UAEV;WACC,QAAQ;WACR,sBAAsB;;iBAEhB,kBAAkB,QAAQ,cAAc,kBAAkB;iBAC1D,kBAAkB,YAAY,wBAAwB,QAAQ,SAAS;iBACvE,aAAa,OAAO,oBAAoB"}
1
+ {"version":3,"file":"binder-Cm0N-oPu-WASgR3Jw.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/binder-Cm0N-oPu.d.mts"],"mappings":";;;;;;;;;;;;;;;;UAWU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP,kBAAkB,cAAc,oBAAoB,oBAAoB,oBAAoB;WAC3F;WACA,eAAe;WACf,MAAM;WACN,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,cAAc,oBAAoB,mBAAmB,WAAW,OAAO,SAAS,aAAa,kBAAkB;iBACrI,uBAAuB,cAAc,oBAAoB,mBAAmB,YAAY,SAAS,QAAQ,SAAS,sBAAsB,kBAAkB;iBAC1J,4BAA4B,YAAY,+BAA+B,SAAS,aAAa;iBAC7F,YAAY,MAAM,YAAY,SAAS,aAAa;;iBAEpD,eAAe,MAAM,YAAY,iBAAiB,SAAS,aAAa;;;UAG/E;WACC,kBAAkB;WAClB,YAAY,eAAe;WAC3B,YAAY,eAAe;;UAE5B;WACC,MAAM;WACN,MAAM;;UAEP;WACC;WACA;WACA;WACA,uBAAuB;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;WAC/B,QAAQ,eAAe;WACvB,QAAQ,eAAe;;UAExB;WACC;WACA;WACA,MAAM;WACN,MAAM;EACf,QAA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AAO,oBAAoB"}
@@ -0,0 +1,56 @@
1
+ import { s as tsStringLiteral } from "./dist-D1f6xr7F.mjs";
2
+ //#region ../../../1-framework/1-core/framework-components/dist/codec.mjs
3
+ /**
4
+ * Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.
5
+ */
6
+ function column(codecFactory, codecId, typeParams) {
7
+ return {
8
+ codecFactory,
9
+ codecId,
10
+ typeParams
11
+ };
12
+ }
13
+ const DECIMAL_TEXT = /^([+-]?)(\d*)(?:\.(\d*))?$/;
14
+ /**
15
+ * The key two decimal texts share exactly when they are the same number, for a data type that stores a decimal as text and keeps the scale it was written with, as `numeric` stores `0.5` and `0.50`: leading zeros, trailing fraction zeros and the sign of zero do not count. `NaN` and the infinities keep their own keys.
16
+ */
17
+ function decimalTextEqualityKey(json) {
18
+ const text = String(json);
19
+ const match = DECIMAL_TEXT.exec(text);
20
+ if (match === null) return text;
21
+ const [, sign = "", whole = "", fraction = ""] = match;
22
+ const digits = whole.replace(/^0+/, "");
23
+ const decimals = fraction.replace(/0+$/, "");
24
+ if (digits === "" && decimals === "") return "0";
25
+ const magnitude = decimals === "" ? digits || "0" : `${digits || "0"}.${decimals}`;
26
+ return sign === "-" ? `-${magnitude}` : magnitude;
27
+ }
28
+ /**
29
+ * Renders a stored value as a TypeScript literal (e.g. `"low"`, `1`, `true`), or `undefined`
30
+ * when the value isn't literal-expressible (objects, arrays, null).
31
+ *
32
+ * Valid **only for codecs whose application value is the stored JSON** (text, int, float, bool). A
33
+ * codec whose application value differs from the stored JSON (e.g. digit text read as a `bigint`)
34
+ * must NOT use this: it renders the application value in its own `renderValueLiteral`.
35
+ */
36
+ function renderTsLiteral(value) {
37
+ if (typeof value === "string") return tsStringLiteral(value);
38
+ if (typeof value === "number" || typeof value === "boolean") return String(value);
39
+ }
40
+ const DECIMAL_INTEGER = /^-?\d+$/;
41
+ /** Renders decimal integer text, read as a `number`, as a number literal, or `undefined` for any other value. */
42
+ function decimalTextNumberLiteral(value) {
43
+ return typeof value === "string" && DECIMAL_INTEGER.test(value) ? value : void 0;
44
+ }
45
+ /** Renders decimal integer text, read as a `bigint`, as a bigint literal, or `undefined` for any other value. */
46
+ function decimalTextBigintLiteral(value) {
47
+ return typeof value === "string" && DECIMAL_INTEGER.test(value) ? `${value}n` : void 0;
48
+ }
49
+ /** Renders a float's stored number as a number literal. A target stores an infinity, and NaN where it holds one (SQLite does not), as text, which has no literal type, so it renders nothing. */
50
+ function floatNumberLiteral(value) {
51
+ return typeof value === "number" ? String(value) : void 0;
52
+ }
53
+ //#endregion
54
+ export { floatNumberLiteral as a, decimalTextNumberLiteral as i, decimalTextBigintLiteral as n, renderTsLiteral as o, decimalTextEqualityKey as r, column as t };
55
+
56
+ //# sourceMappingURL=codec-DGRG8oEH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-DGRG8oEH.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.mjs"],"sourcesContent":["import { C as readJsonInteger, D as refuseJsonValue, E as readJsonString, O as DATA_TYPE_ID_PATTERN, S as readJsonFloat, T as readJsonMatching, _ as SAFE_INTEGER_RANGE, a as dataTypeId, b as isNonFiniteText, c as dataTypeValuesEqual, d as requiredParamKeys, f as requiredSchemaKeys, g as SAFE_INTEGER_BIGINT_RANGE, h as INT64_RANGE, i as dataType, l as objectSchemaKeys, m as INT32_RANGE, n as assertDataTypeParams, o as dataTypeParams, p as schemaKeysAllowing, r as createDataTypeLookup, s as dataTypeParamsProblem, t as assembleDataTypes, u as requireValueOf, v as floatToJson, w as readJsonIntegerText, x as readJsonBoolean, y as isIntegerIn } from \"./data-type-CVNHtd6y.mjs\";\nimport { a as readContractValue, i as CodecImpl, n as CodecDescriptorTemplateImpl, r as enumRefusalOf, t as CodecDescriptorImpl } from \"./codec-descriptor-V2-N5Qmm.mjs\";\nimport { t as emptyCodecLookup } from \"./codec-types-BXLUbk-Y.mjs\";\nimport { a as resolveCodecDescriptorOrThrow, i as materializeCodec, o as validateCodecTypeParams, r as codecForRef, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-qqMjZrmn.mjs\";\nimport { tsStringLiteral } from \"@internal/ts-render\";\n//#region src/shared/column-spec.ts\n/**\n* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.\n*/\nfunction column(codecFactory, codecId, typeParams) {\n\treturn {\n\t\tcodecFactory,\n\t\tcodecId,\n\t\ttypeParams\n\t};\n}\n//#endregion\n//#region src/shared/decimal-text-equality.ts\nconst DECIMAL_TEXT = /^([+-]?)(\\d*)(?:\\.(\\d*))?$/;\n/**\n* The key two decimal texts share exactly when they are the same number, for a data type that stores a decimal as text and keeps the scale it was written with, as `numeric` stores `0.5` and `0.50`: leading zeros, trailing fraction zeros and the sign of zero do not count. `NaN` and the infinities keep their own keys.\n*/\nfunction decimalTextEqualityKey(json) {\n\tconst text = String(json);\n\tconst match = DECIMAL_TEXT.exec(text);\n\tif (match === null) return text;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\"] = match;\n\tconst digits = whole.replace(/^0+/, \"\");\n\tconst decimals = fraction.replace(/0+$/, \"\");\n\tif (digits === \"\" && decimals === \"\") return \"0\";\n\tconst magnitude = decimals === \"\" ? digits || \"0\" : `${digits || \"0\"}.${decimals}`;\n\treturn sign === \"-\" ? `-${magnitude}` : magnitude;\n}\n//#endregion\n//#region src/shared/render-ts-literal.ts\n/**\n* Renders a stored value as a TypeScript literal (e.g. `\"low\"`, `1`, `true`), or `undefined`\n* when the value isn't literal-expressible (objects, arrays, null).\n*\n* Valid **only for codecs whose application value is the stored JSON** (text, int, float, bool). A\n* codec whose application value differs from the stored JSON (e.g. digit text read as a `bigint`)\n* must NOT use this: it renders the application value in its own `renderValueLiteral`.\n*/\nfunction renderTsLiteral(value) {\n\tif (typeof value === \"string\") return tsStringLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n}\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/** Renders decimal integer text, read as a `number`, as a number literal, or `undefined` for any other value. */\nfunction decimalTextNumberLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? value : void 0;\n}\n/** Renders decimal integer text, read as a `bigint`, as a bigint literal, or `undefined` for any other value. */\nfunction decimalTextBigintLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? `${value}n` : void 0;\n}\n/** Renders a float's stored number as a number literal. A target stores an infinity, and NaN where it holds one (SQLite does not), as text, which has no literal type, so it renders nothing. */\nfunction floatNumberLiteral(value) {\n\treturn typeof value === \"number\" ? String(value) : void 0;\n}\n//#endregion\nexport { CONTRACT_CODEC_DESCRIPTOR_MISSING, CodecDescriptorImpl, CodecDescriptorTemplateImpl, CodecImpl, DATA_TYPE_ID_PATTERN, INT32_RANGE, INT64_RANGE, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, assembleDataTypes, assertDataTypeParams, codecForRef, column, createDataTypeLookup, dataType, dataTypeId, dataTypeParams, dataTypeParamsProblem, dataTypeValuesEqual, decimalTextBigintLiteral, decimalTextEqualityKey, decimalTextNumberLiteral, emptyCodecLookup, enumRefusalOf, floatNumberLiteral, floatToJson, isIntegerIn, isNonFiniteText, materializeCodec, objectSchemaKeys, readContractValue, readJsonBoolean, readJsonFloat, readJsonInteger, readJsonIntegerText, readJsonMatching, readJsonString, refuseJsonValue, renderTsLiteral, requireValueOf, requiredParamKeys, requiredSchemaKeys, resolveCodecDescriptorOrThrow, schemaKeysAllowing, validateCodecTypeParams };\n\n//# sourceMappingURL=codec.mjs.map"],"mappings":";;;;;AASA,SAAS,OAAO,cAAc,SAAS,YAAY;CAClD,OAAO;EACN;EACA;EACA;CACD;AACD;AAGA,MAAM,eAAe;;;;AAIrB,SAAS,uBAAuB,MAAM;CACrC,MAAM,OAAO,OAAO,IAAI;CACxB,MAAM,QAAQ,aAAa,KAAK,IAAI;CACpC,IAAI,UAAU,MAAM,OAAO;CAC3B,MAAM,GAAG,OAAO,IAAI,QAAQ,IAAI,WAAW,MAAM;CACjD,MAAM,SAAS,MAAM,QAAQ,OAAO,EAAE;CACtC,MAAM,WAAW,SAAS,QAAQ,OAAO,EAAE;CAC3C,IAAI,WAAW,MAAM,aAAa,IAAI,OAAO;CAC7C,MAAM,YAAY,aAAa,KAAK,UAAU,MAAM,GAAG,UAAU,IAAI,GAAG;CACxE,OAAO,SAAS,MAAM,IAAI,cAAc;AACzC;;;;;;;;;AAWA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,UAAU,OAAO,gBAAgB,KAAK;CAC3D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;AACjF;AACA,MAAM,kBAAkB;;AAExB,SAAS,yBAAyB,OAAO;CACxC,OAAO,OAAO,UAAU,YAAY,gBAAgB,KAAK,KAAK,IAAI,QAAQ,KAAK;AAChF;;AAEA,SAAS,yBAAyB,OAAO;CACxC,OAAO,OAAO,UAAU,YAAY,gBAAgB,KAAK,KAAK,IAAI,GAAG,MAAM,KAAK,KAAK;AACtF;;AAEA,SAAS,mBAAmB,OAAO;CAClC,OAAO,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK;AACzD"}
@@ -1,5 +1,5 @@
1
1
  import { B as JsonValue, d as ContractField, tt as ValueSetRef } from "./domain-envelope-CN721GnP-4huRt7Wc.mjs";
2
- import { c as CodecDescriptorTemplate, d as CodecInstanceContext, i as Codec, m as CodecRef, p as CodecLookupWithDescriptors, t as AnyCodecDescriptor } from "./codec-types-B5_YzEwo-DVCRRWlg.mjs";
2
+ import { c as CodecDescriptorTemplate, d as CodecInstanceContext, i as Codec, m as CodecRef, p as CodecLookupWithDescriptors, t as AnyCodecDescriptor } from "./codec-types-DjozIOvT-BIcpyFea.mjs";
3
3
  //#region ../../../1-framework/1-core/framework-components/dist/codec.d.mts
4
4
  //#region src/shared/column-spec.d.ts
5
5
  /**
@@ -84,6 +84,12 @@ type ColumnHelperParams<D extends CodecDescriptorTemplate<any>> = Parameters<D['
84
84
  /** The whole of what a data type id is: `owner/name` in lower case, with no version. */
85
85
  declare const DATA_TYPE_ID_PATTERN: RegExp;
86
86
  //#endregion
87
+ //#region src/shared/decimal-text-equality.d.ts
88
+ /**
89
+ * The key two decimal texts share exactly when they are the same number, for a data type that stores a decimal as text and keeps the scale it was written with, as `numeric` stores `0.5` and `0.50`: leading zeros, trailing fraction zeros and the sign of zero do not count. `NaN` and the infinities keep their own keys.
90
+ */
91
+ declare function decimalTextEqualityKey(json: JsonValue): string;
92
+ //#endregion
87
93
  //#region src/shared/json-readers.d.ts
88
94
  /**
89
95
  * The refusal of a JSON value: `RUNTIME.DECODE_FAILED`, `<owner> JSON value must be <expected>`, with `meta.received`, the value it was given as JSON text, cut to 100 characters, and `meta.dataType` or `meta.codecId` naming the owner. A data type id carries no version and a codec id does, so the id says which it is.
@@ -132,6 +138,12 @@ declare function readJsonFloat(owner: string, json: JsonValue): number;
132
138
  * must NOT use this: it renders the application value in its own `renderValueLiteral`.
133
139
  */
134
140
  declare function renderTsLiteral(value: JsonValue): string | undefined;
141
+ /** Renders decimal integer text, read as a `number`, as a number literal, or `undefined` for any other value. */
142
+ declare function decimalTextNumberLiteral(value: JsonValue): string | undefined;
143
+ /** Renders decimal integer text, read as a `bigint`, as a bigint literal, or `undefined` for any other value. */
144
+ declare function decimalTextBigintLiteral(value: JsonValue): string | undefined;
145
+ /** Renders a float's stored number as a number literal. A target stores an infinity, and NaN where it holds one (SQLite does not), as text, which has no literal type, so it renders nothing. */
146
+ declare function floatNumberLiteral(value: JsonValue): string | undefined;
135
147
  //#endregion
136
148
  //#region src/shared/resolve-codec.d.ts
137
149
  declare const CONTRACT_CODEC_DESCRIPTOR_MISSING: "CONTRACT.CODEC_DESCRIPTOR_MISSING";
@@ -165,5 +177,5 @@ declare function materializeCodec(descriptor: AnyCodecDescriptor, ref: CodecRef,
165
177
  */
166
178
  declare function codecForRef(lookup: Pick<CodecLookupWithDescriptors, 'descriptorFor'>, ref: CodecRef): Codec | undefined;
167
179
  //#endregion
168
- export { resolveCodecDescriptorOrThrow as A, readJsonFloat as C, readJsonString as D, readJsonMatching as E, refuseJsonValue as O, readJsonBoolean as S, readJsonIntegerText as T, column as _, ColumnHelperForStrict as a, isNonFiniteText as b, DATA_TYPE_ID_PATTERN as c, IntegerRange as d, SAFE_INTEGER_BIGINT_RANGE as f, codecForRef as g, ScalarFieldDeclarationBuilder as h, ColumnHelperFor as i, validateCodecTypeParams as j, renderTsLiteral as k, INT32_RANGE as l, ScalarFieldDeclaration as m, CONTRACT_CODEC_DESCRIPTOR_MISSING as n, ColumnSpec as o, SAFE_INTEGER_RANGE as p, CodecDescriptorRef as r, ColumnTypeDescriptor as s, BigIntRange as t, INT64_RANGE as u, floatToJson as v, readJsonInteger as w, materializeCodec as x, isIntegerIn as y };
169
- //# sourceMappingURL=codec-CGFT5YKu.d.mts.map
180
+ export { readJsonMatching as A, isIntegerIn as C, readJsonFloat as D, readJsonBoolean as E, validateCodecTypeParams as F, refuseJsonValue as M, renderTsLiteral as N, readJsonInteger as O, resolveCodecDescriptorOrThrow as P, floatToJson as S, materializeCodec as T, column as _, ColumnHelperForStrict as a, decimalTextNumberLiteral as b, DATA_TYPE_ID_PATTERN as c, IntegerRange as d, SAFE_INTEGER_BIGINT_RANGE as f, codecForRef as g, ScalarFieldDeclarationBuilder as h, ColumnHelperFor as i, readJsonString as j, readJsonIntegerText as k, INT32_RANGE as l, ScalarFieldDeclaration as m, CONTRACT_CODEC_DESCRIPTOR_MISSING as n, ColumnSpec as o, SAFE_INTEGER_RANGE as p, CodecDescriptorRef as r, ColumnTypeDescriptor as s, BigIntRange as t, INT64_RANGE as u, decimalTextBigintLiteral as v, isNonFiniteText as w, floatNumberLiteral as x, decimalTextEqualityKey as y };
181
+ //# sourceMappingURL=codec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hB,YAAY,gBAAgB;iBAC5B,cAAc,eAAe,MAAM;;;;;;;;;;;iBAWnC,gBAAgB,OAAO;;iBAEvB,yBAAyB,OAAO;;iBAEhC,yBAAyB,OAAO;;iBAEhC,mBAAmB,OAAO;;;cAG7B;;;;;;;iBAOG,8BAA8B,gBAAgB,oBAAoB,gCAAgC,KAAK,UAAU,iFAAiF;;;;;;;;;;;iBAWlM,wBAAwB,YAAY,oBAAoB,KAAK;;;;;;;iBAO7D,iBAAiB,YAAY,oBAAoB,KAAK,UAAU,KAAK,uBAAuB;;;;iBAI5F,YAAY,QAAQ,KAAK,8CAA8C,KAAK,WAAW"}
@@ -1,6 +1,6 @@
1
1
  import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
2
- import { T as requireValueOf, d as dataTypeParams } from "./data-type-DPhZLx30-DP2Kmnf5.mjs";
3
- //#region ../../../1-framework/1-core/framework-components/dist/codec-descriptor-DEfL2Kb6.mjs
2
+ import { T as requireValueOf, d as dataTypeParams } from "./data-type-CVNHtd6y-BFa_VnCb.mjs";
3
+ //#region ../../../1-framework/1-core/framework-components/dist/codec-descriptor-V2-N5Qmm.mjs
4
4
  /**
5
5
  * The application value `codec` gives for `json`, a value a contract stores for a column with the column's `typeParams`: the codec's data type reads it with the parameters it declares, and the codec converts the value.
6
6
  */
@@ -75,4 +75,4 @@ var CodecDescriptorImpl = class extends CodecDescriptorTemplateImpl {};
75
75
  //#endregion
76
76
  export { readContractValue as a, enumRefusalOf as i, CodecDescriptorTemplateImpl as n, CodecImpl as r, CodecDescriptorImpl as t };
77
77
 
78
- //# sourceMappingURL=codec-descriptor-DEfL2Kb6-B-vOB0ue.mjs.map
78
+ //# sourceMappingURL=codec-descriptor-V2-N5Qmm-BR-5owl6.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"codec-descriptor-DEfL2Kb6-B-vOB0ue.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec-descriptor-DEfL2Kb6.mjs"],"sourcesContent":["import { o as dataTypeParams, u as requireValueOf } from \"./data-type-DPhZLx30.mjs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/shared/codec.ts\n/**\n* The application value `codec` gives for `json`, a value a contract stores for a column with the column's `typeParams`: the codec's data type reads it with the parameters it declares, and the codec converts the value.\n*/\nfunction readContractValue(codec, json, typeParams) {\n\treturn codec.fromDataTypeValue(codec.dataType.fromContract(json, dataTypeParams(codec.dataType, typeParams)));\n}\nfunction namedDataType(descriptor) {\n\treturn Reflect.get(descriptor, \"dataType\");\n}\n/**\n* Abstract base class for concrete codec implementations.\n*\n* A codec is built with its descriptor, the data type it converts values of and the column's parameters of that type. The constructor makes `fromDataTypeValue` refuse a value of another data type before the subclass's conversion runs. `fromDataTypeValue` and `toDataTypeValue` convert between a value of the type and the application value, and `toDataTypeValue` finishes with {@link CodecImpl.dataTypeValueOf}, which constructs the value through the type. `fromWire` and `toWire` read and write what the driver exchanges, asynchronously.\n*/\nvar CodecImpl = class {\n\tdescriptor;\n\tdataType;\n\tdataTypeParams;\n\t/**\n\t* The descriptor is variance-erased: concrete codec subclasses receive the typed descriptor in their own constructors and forward it via `super(descriptor, dataType, params)`; the variance erasure lives at this base because the abstract surface can't carry the concrete `TParams`.\n\t*/\n\tconstructor(descriptor, dataType, dataTypeParams = {}) {\n\t\tthis.descriptor = descriptor;\n\t\tthis.dataType = dataType;\n\t\tthis.dataTypeParams = dataTypeParams;\n\t\tconst named = namedDataType(descriptor);\n\t\tif (named !== void 0 && named !== dataType.id) throw new InternalError(`Codec ${descriptor.codecId} is built with the data type ${dataType.id}, but its descriptor names ${String(named)}.`);\n\t\tconst convert = Reflect.get(this, \"fromDataTypeValue\");\n\t\tObject.defineProperty(this, \"fromDataTypeValue\", {\n\t\t\tvalue: (value) => convert.call(this, requireValueOf(this.dataType.id, value, `Codec ${this.id}`)),\n\t\t\twritable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n\tget id() {\n\t\treturn this.descriptor.codecId;\n\t}\n\t/** The value of the codec's data type that `json` stores, under the codec's parameters. */\n\tdataTypeValueOf(json) {\n\t\treturn this.dataType.valueFrom(json, this.dataTypeParams);\n\t}\n};\n//#endregion\n//#region src/shared/codec-descriptor.ts\n/**\n* Why an enum cannot use the codec `descriptor` describes, or `undefined` when one can: the codec's own {@link CodecDescriptorTemplate.enumRefusal}, else the missing `equality` trait. Every enum authoring surface refuses a codec through this.\n*/\nfunction enumRefusalOf(descriptor) {\n\tif (descriptor.enumRefusal !== void 0) return descriptor.enumRefusal;\n\tif (descriptor.traits.includes(\"equality\")) return void 0;\n\treturn \"The codec does not declare the equality trait, so no value can be compared with a member. Use a codec that declares it.\";\n}\n/**\n* Abstract base class for concrete codec descriptors.\n*\n* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `paramsSchema`, and the curried `factory(params)`.\n*\n* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.\n*/\nvar CodecDescriptorTemplateImpl = class {\n\tget isParameterized() {\n\t\treturn this.paramsSchema !== void 0;\n\t}\n};\n/**\n* Abstract base for a concrete codec descriptor: a {@link CodecDescriptorTemplateImpl} that also\n* names the data type its codec represents.\n*\n* A codec whose data type depends on the target that adopts it extends\n* {@link CodecDescriptorTemplateImpl} instead, and the target names the type when it adapts the\n* template.\n*/\nvar CodecDescriptorImpl = class extends CodecDescriptorTemplateImpl {};\n//#endregion\nexport { readContractValue as a, CodecImpl as i, CodecDescriptorTemplateImpl as n, enumRefusalOf as r, CodecDescriptorImpl as t };\n\n//# sourceMappingURL=codec-descriptor-DEfL2Kb6.mjs.map"],"mappings":";;;;;;AAMA,SAAS,kBAAkB,OAAO,MAAM,YAAY;CACnD,OAAO,MAAM,kBAAkB,MAAM,SAAS,aAAa,MAAM,eAAe,MAAM,UAAU,UAAU,CAAC,CAAC;AAC7G;AACA,SAAS,cAAc,YAAY;CAClC,OAAO,QAAQ,IAAI,YAAY,UAAU;AAC1C;;;;;;AAMA,IAAI,YAAY,MAAM;CACrB;CACA;CACA;;;;CAIA,YAAY,YAAY,UAAU,iBAAiB,CAAC,GAAG;EACtD,KAAK,aAAa;EAClB,KAAK,WAAW;EAChB,KAAK,iBAAiB;EACtB,MAAM,QAAQ,cAAc,UAAU;EACtC,IAAI,UAAU,KAAK,KAAK,UAAU,SAAS,IAAI,MAAM,IAAI,cAAc,SAAS,WAAW,QAAQ,+BAA+B,SAAS,GAAG,6BAA6B,OAAO,KAAK,EAAE,EAAE;EAC3L,MAAM,UAAU,QAAQ,IAAI,MAAM,mBAAmB;EACrD,OAAO,eAAe,MAAM,qBAAqB;GAChD,QAAQ,UAAU,QAAQ,KAAK,MAAM,eAAe,KAAK,SAAS,IAAI,OAAO,SAAS,KAAK,IAAI,CAAC;GAChG,UAAU;GACV,cAAc;EACf,CAAC;CACF;CACA,IAAI,KAAK;EACR,OAAO,KAAK,WAAW;CACxB;;CAEA,gBAAgB,MAAM;EACrB,OAAO,KAAK,SAAS,UAAU,MAAM,KAAK,cAAc;CACzD;AACD;;;;AAMA,SAAS,cAAc,YAAY;CAClC,IAAI,WAAW,gBAAgB,KAAK,GAAG,OAAO,WAAW;CACzD,IAAI,WAAW,OAAO,SAAS,UAAU,GAAG,OAAO,KAAK;CACxD,OAAO;AACR;;;;;;;;AAQA,IAAI,8BAA8B,MAAM;CACvC,IAAI,kBAAkB;EACrB,OAAO,KAAK,iBAAiB,KAAK;CACnC;AACD;;;;;;;;;AASA,IAAI,sBAAsB,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"codec-descriptor-V2-N5Qmm-BR-5owl6.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec-descriptor-V2-N5Qmm.mjs"],"sourcesContent":["import { o as dataTypeParams, u as requireValueOf } from \"./data-type-CVNHtd6y.mjs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/shared/codec.ts\n/**\n* The application value `codec` gives for `json`, a value a contract stores for a column with the column's `typeParams`: the codec's data type reads it with the parameters it declares, and the codec converts the value.\n*/\nfunction readContractValue(codec, json, typeParams) {\n\treturn codec.fromDataTypeValue(codec.dataType.fromContract(json, dataTypeParams(codec.dataType, typeParams)));\n}\nfunction namedDataType(descriptor) {\n\treturn Reflect.get(descriptor, \"dataType\");\n}\n/**\n* Abstract base class for concrete codec implementations.\n*\n* A codec is built with its descriptor, the data type it converts values of and the column's parameters of that type. The constructor makes `fromDataTypeValue` refuse a value of another data type before the subclass's conversion runs. `fromDataTypeValue` and `toDataTypeValue` convert between a value of the type and the application value, and `toDataTypeValue` finishes with {@link CodecImpl.dataTypeValueOf}, which constructs the value through the type. `fromWire` and `toWire` read and write what the driver exchanges, asynchronously.\n*/\nvar CodecImpl = class {\n\tdescriptor;\n\tdataType;\n\tdataTypeParams;\n\t/**\n\t* The descriptor is variance-erased: concrete codec subclasses receive the typed descriptor in their own constructors and forward it via `super(descriptor, dataType, params)`; the variance erasure lives at this base because the abstract surface can't carry the concrete `TParams`.\n\t*/\n\tconstructor(descriptor, dataType, dataTypeParams = {}) {\n\t\tthis.descriptor = descriptor;\n\t\tthis.dataType = dataType;\n\t\tthis.dataTypeParams = dataTypeParams;\n\t\tconst named = namedDataType(descriptor);\n\t\tif (named !== void 0 && named !== dataType.id) throw new InternalError(`Codec ${descriptor.codecId} is built with the data type ${dataType.id}, but its descriptor names ${String(named)}.`);\n\t\tconst convert = Reflect.get(this, \"fromDataTypeValue\");\n\t\tObject.defineProperty(this, \"fromDataTypeValue\", {\n\t\t\tvalue: (value) => convert.call(this, requireValueOf(this.dataType.id, value, `Codec ${this.id}`)),\n\t\t\twritable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n\tget id() {\n\t\treturn this.descriptor.codecId;\n\t}\n\t/** The value of the codec's data type that `json` stores, under the codec's parameters. */\n\tdataTypeValueOf(json) {\n\t\treturn this.dataType.valueFrom(json, this.dataTypeParams);\n\t}\n};\n//#endregion\n//#region src/shared/codec-descriptor.ts\n/**\n* Why an enum cannot use the codec `descriptor` describes, or `undefined` when one can: the codec's own {@link CodecDescriptorTemplate.enumRefusal}, else the missing `equality` trait. Every enum authoring surface refuses a codec through this.\n*/\nfunction enumRefusalOf(descriptor) {\n\tif (descriptor.enumRefusal !== void 0) return descriptor.enumRefusal;\n\tif (descriptor.traits.includes(\"equality\")) return void 0;\n\treturn \"The codec does not declare the equality trait, so no value can be compared with a member. Use a codec that declares it.\";\n}\n/**\n* Abstract base class for concrete codec descriptors.\n*\n* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `paramsSchema`, and the curried `factory(params)`.\n*\n* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.\n*/\nvar CodecDescriptorTemplateImpl = class {\n\tget isParameterized() {\n\t\treturn this.paramsSchema !== void 0;\n\t}\n};\n/**\n* Abstract base for a concrete codec descriptor: a {@link CodecDescriptorTemplateImpl} that also\n* names the data type its codec represents.\n*\n* A codec whose data type depends on the target that adopts it extends\n* {@link CodecDescriptorTemplateImpl} instead, and the target names the type when it adapts the\n* template.\n*/\nvar CodecDescriptorImpl = class extends CodecDescriptorTemplateImpl {};\n//#endregion\nexport { readContractValue as a, CodecImpl as i, CodecDescriptorTemplateImpl as n, enumRefusalOf as r, CodecDescriptorImpl as t };\n\n//# sourceMappingURL=codec-descriptor-V2-N5Qmm.mjs.map"],"mappings":";;;;;;AAMA,SAAS,kBAAkB,OAAO,MAAM,YAAY;CACnD,OAAO,MAAM,kBAAkB,MAAM,SAAS,aAAa,MAAM,eAAe,MAAM,UAAU,UAAU,CAAC,CAAC;AAC7G;AACA,SAAS,cAAc,YAAY;CAClC,OAAO,QAAQ,IAAI,YAAY,UAAU;AAC1C;;;;;;AAMA,IAAI,YAAY,MAAM;CACrB;CACA;CACA;;;;CAIA,YAAY,YAAY,UAAU,iBAAiB,CAAC,GAAG;EACtD,KAAK,aAAa;EAClB,KAAK,WAAW;EAChB,KAAK,iBAAiB;EACtB,MAAM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