@azx-pbc/axiom-runtime 0.0.0-stage → 0.0.5

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 (755) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +714 -2
  3. package/dist/cache/index.d.ts +191 -0
  4. package/dist/cache/index.d.ts.map +1 -0
  5. package/dist/cache/index.js +361 -0
  6. package/dist/cache/index.js.map +1 -0
  7. package/dist/canonical/jcs.d.ts +78 -0
  8. package/dist/canonical/jcs.d.ts.map +1 -0
  9. package/dist/canonical/jcs.js +500 -0
  10. package/dist/canonical/jcs.js.map +1 -0
  11. package/dist/canonical/restricted-json.d.ts +7 -0
  12. package/dist/canonical/restricted-json.d.ts.map +1 -0
  13. package/dist/canonical/restricted-json.js +318 -0
  14. package/dist/canonical/restricted-json.js.map +1 -0
  15. package/dist/canonical/restricted-value.d.ts +59 -0
  16. package/dist/canonical/restricted-value.d.ts.map +1 -0
  17. package/dist/canonical/restricted-value.js +156 -0
  18. package/dist/canonical/restricted-value.js.map +1 -0
  19. package/dist/canonical/restricted.d.ts +85 -0
  20. package/dist/canonical/restricted.d.ts.map +1 -0
  21. package/dist/canonical/restricted.js +163 -0
  22. package/dist/canonical/restricted.js.map +1 -0
  23. package/dist/canonical/signature.d.ts +38 -0
  24. package/dist/canonical/signature.d.ts.map +1 -0
  25. package/dist/canonical/signature.js +47 -0
  26. package/dist/canonical/signature.js.map +1 -0
  27. package/dist/eval/access/delivery.d.ts +63 -0
  28. package/dist/eval/access/delivery.d.ts.map +1 -0
  29. package/dist/eval/access/delivery.js +98 -0
  30. package/dist/eval/access/delivery.js.map +1 -0
  31. package/dist/eval/access/overlay.d.ts +72 -0
  32. package/dist/eval/access/overlay.d.ts.map +1 -0
  33. package/dist/eval/access/overlay.js +402 -0
  34. package/dist/eval/access/overlay.js.map +1 -0
  35. package/dist/eval/access/projection.d.ts +159 -0
  36. package/dist/eval/access/projection.d.ts.map +1 -0
  37. package/dist/eval/access/projection.js +211 -0
  38. package/dist/eval/access/projection.js.map +1 -0
  39. package/dist/eval/access/window.d.ts +128 -0
  40. package/dist/eval/access/window.d.ts.map +1 -0
  41. package/dist/eval/access/window.js +254 -0
  42. package/dist/eval/access/window.js.map +1 -0
  43. package/dist/eval/access/write.d.ts +113 -0
  44. package/dist/eval/access/write.d.ts.map +1 -0
  45. package/dist/eval/access/write.js +119 -0
  46. package/dist/eval/access/write.js.map +1 -0
  47. package/dist/eval/addressing.d.ts +131 -0
  48. package/dist/eval/addressing.d.ts.map +1 -0
  49. package/dist/eval/addressing.js +270 -0
  50. package/dist/eval/addressing.js.map +1 -0
  51. package/dist/eval/budget.d.ts +143 -0
  52. package/dist/eval/budget.d.ts.map +1 -0
  53. package/dist/eval/budget.js +387 -0
  54. package/dist/eval/budget.js.map +1 -0
  55. package/dist/eval/computed.d.ts +46 -0
  56. package/dist/eval/computed.d.ts.map +1 -0
  57. package/dist/eval/computed.js +89 -0
  58. package/dist/eval/computed.js.map +1 -0
  59. package/dist/eval/denials.d.ts +64 -0
  60. package/dist/eval/denials.d.ts.map +1 -0
  61. package/dist/eval/denials.js +87 -0
  62. package/dist/eval/denials.js.map +1 -0
  63. package/dist/eval/engine/cancellation.d.ts +12 -0
  64. package/dist/eval/engine/cancellation.d.ts.map +1 -0
  65. package/dist/eval/engine/cancellation.js +56 -0
  66. package/dist/eval/engine/cancellation.js.map +1 -0
  67. package/dist/eval/engine/delta.d.ts +104 -0
  68. package/dist/eval/engine/delta.d.ts.map +1 -0
  69. package/dist/eval/engine/delta.js +466 -0
  70. package/dist/eval/engine/delta.js.map +1 -0
  71. package/dist/eval/engine/deps.d.ts +136 -0
  72. package/dist/eval/engine/deps.d.ts.map +1 -0
  73. package/dist/eval/engine/deps.js +345 -0
  74. package/dist/eval/engine/deps.js.map +1 -0
  75. package/dist/eval/engine/identity.d.ts +128 -0
  76. package/dist/eval/engine/identity.d.ts.map +1 -0
  77. package/dist/eval/engine/identity.js +398 -0
  78. package/dist/eval/engine/identity.js.map +1 -0
  79. package/dist/eval/engine/index.d.ts +200 -0
  80. package/dist/eval/engine/index.d.ts.map +1 -0
  81. package/dist/eval/engine/index.js +1242 -0
  82. package/dist/eval/engine/index.js.map +1 -0
  83. package/dist/eval/engine/measurement.d.ts +23 -0
  84. package/dist/eval/engine/measurement.d.ts.map +1 -0
  85. package/dist/eval/engine/measurement.js +42 -0
  86. package/dist/eval/engine/measurement.js.map +1 -0
  87. package/dist/eval/engine/naive.d.ts +19 -0
  88. package/dist/eval/engine/naive.d.ts.map +1 -0
  89. package/dist/eval/engine/naive.js +59 -0
  90. package/dist/eval/engine/naive.js.map +1 -0
  91. package/dist/eval/engine/ops.d.ts +214 -0
  92. package/dist/eval/engine/ops.d.ts.map +1 -0
  93. package/dist/eval/engine/ops.js +1422 -0
  94. package/dist/eval/engine/ops.js.map +1 -0
  95. package/dist/eval/engine/patches.d.ts +40 -0
  96. package/dist/eval/engine/patches.d.ts.map +1 -0
  97. package/dist/eval/engine/patches.js +125 -0
  98. package/dist/eval/engine/patches.js.map +1 -0
  99. package/dist/eval/engine/ports.d.ts +71 -0
  100. package/dist/eval/engine/ports.d.ts.map +1 -0
  101. package/dist/eval/engine/ports.js +2 -0
  102. package/dist/eval/engine/ports.js.map +1 -0
  103. package/dist/eval/engine/session.d.ts +116 -0
  104. package/dist/eval/engine/session.d.ts.map +1 -0
  105. package/dist/eval/engine/session.js +653 -0
  106. package/dist/eval/engine/session.js.map +1 -0
  107. package/dist/eval/engine/snapshot.d.ts +97 -0
  108. package/dist/eval/engine/snapshot.d.ts.map +1 -0
  109. package/dist/eval/engine/snapshot.js +221 -0
  110. package/dist/eval/engine/snapshot.js.map +1 -0
  111. package/dist/eval/engine/subscriptions.d.ts +47 -0
  112. package/dist/eval/engine/subscriptions.d.ts.map +1 -0
  113. package/dist/eval/engine/subscriptions.js +103 -0
  114. package/dist/eval/engine/subscriptions.js.map +1 -0
  115. package/dist/eval/engine/trace.d.ts +77 -0
  116. package/dist/eval/engine/trace.d.ts.map +1 -0
  117. package/dist/eval/engine/trace.js +140 -0
  118. package/dist/eval/engine/trace.js.map +1 -0
  119. package/dist/eval/error-diagnostic.d.ts +26 -0
  120. package/dist/eval/error-diagnostic.d.ts.map +1 -0
  121. package/dist/eval/error-diagnostic.js +63 -0
  122. package/dist/eval/error-diagnostic.js.map +1 -0
  123. package/dist/eval/evaluate-expr.d.ts +44 -0
  124. package/dist/eval/evaluate-expr.d.ts.map +1 -0
  125. package/dist/eval/evaluate-expr.js +149 -0
  126. package/dist/eval/evaluate-expr.js.map +1 -0
  127. package/dist/eval/evaluate.d.ts +282 -0
  128. package/dist/eval/evaluate.d.ts.map +1 -0
  129. package/dist/eval/evaluate.js +391 -0
  130. package/dist/eval/evaluate.js.map +1 -0
  131. package/dist/eval/evolution/relocate.d.ts +72 -0
  132. package/dist/eval/evolution/relocate.d.ts.map +1 -0
  133. package/dist/eval/evolution/relocate.js +427 -0
  134. package/dist/eval/evolution/relocate.js.map +1 -0
  135. package/dist/eval/evolution/select.d.ts +11 -0
  136. package/dist/eval/evolution/select.d.ts.map +1 -0
  137. package/dist/eval/evolution/select.js +53 -0
  138. package/dist/eval/evolution/select.js.map +1 -0
  139. package/dist/eval/evolution/upcast.d.ts +13 -0
  140. package/dist/eval/evolution/upcast.d.ts.map +1 -0
  141. package/dist/eval/evolution/upcast.js +88 -0
  142. package/dist/eval/evolution/upcast.js.map +1 -0
  143. package/dist/eval/expr/aggregates.d.ts +75 -0
  144. package/dist/eval/expr/aggregates.d.ts.map +1 -0
  145. package/dist/eval/expr/aggregates.js +991 -0
  146. package/dist/eval/expr/aggregates.js.map +1 -0
  147. package/dist/eval/expr/arithmetic.d.ts +26 -0
  148. package/dist/eval/expr/arithmetic.d.ts.map +1 -0
  149. package/dist/eval/expr/arithmetic.js +387 -0
  150. package/dist/eval/expr/arithmetic.js.map +1 -0
  151. package/dist/eval/expr/between.d.ts +17 -0
  152. package/dist/eval/expr/between.d.ts.map +1 -0
  153. package/dist/eval/expr/between.js +46 -0
  154. package/dist/eval/expr/between.js.map +1 -0
  155. package/dist/eval/expr/binder.d.ts +96 -0
  156. package/dist/eval/expr/binder.d.ts.map +1 -0
  157. package/dist/eval/expr/binder.js +253 -0
  158. package/dist/eval/expr/binder.js.map +1 -0
  159. package/dist/eval/expr/call-dispatch.d.ts +28 -0
  160. package/dist/eval/expr/call-dispatch.d.ts.map +1 -0
  161. package/dist/eval/expr/call-dispatch.js +114 -0
  162. package/dist/eval/expr/call-dispatch.js.map +1 -0
  163. package/dist/eval/expr/collections.d.ts +20 -0
  164. package/dist/eval/expr/collections.d.ts.map +1 -0
  165. package/dist/eval/expr/collections.js +66 -0
  166. package/dist/eval/expr/collections.js.map +1 -0
  167. package/dist/eval/expr/compare.d.ts +36 -0
  168. package/dist/eval/expr/compare.d.ts.map +1 -0
  169. package/dist/eval/expr/compare.js +115 -0
  170. package/dist/eval/expr/compare.js.map +1 -0
  171. package/dist/eval/expr/datasets.d.ts +28 -0
  172. package/dist/eval/expr/datasets.d.ts.map +1 -0
  173. package/dist/eval/expr/datasets.js +304 -0
  174. package/dist/eval/expr/datasets.js.map +1 -0
  175. package/dist/eval/expr/digest.d.ts +23 -0
  176. package/dist/eval/expr/digest.d.ts.map +1 -0
  177. package/dist/eval/expr/digest.js +89 -0
  178. package/dist/eval/expr/digest.js.map +1 -0
  179. package/dist/eval/expr/domains.d.ts +19 -0
  180. package/dist/eval/expr/domains.d.ts.map +1 -0
  181. package/dist/eval/expr/domains.js +18 -0
  182. package/dist/eval/expr/domains.js.map +1 -0
  183. package/dist/eval/expr/host.d.ts +152 -0
  184. package/dist/eval/expr/host.d.ts.map +1 -0
  185. package/dist/eval/expr/host.js +36 -0
  186. package/dist/eval/expr/host.js.map +1 -0
  187. package/dist/eval/expr/lists.d.ts +24 -0
  188. package/dist/eval/expr/lists.d.ts.map +1 -0
  189. package/dist/eval/expr/lists.js +155 -0
  190. package/dist/eval/expr/lists.js.map +1 -0
  191. package/dist/eval/expr/member.d.ts +15 -0
  192. package/dist/eval/expr/member.d.ts.map +1 -0
  193. package/dist/eval/expr/member.js +32 -0
  194. package/dist/eval/expr/member.js.map +1 -0
  195. package/dist/eval/expr/money-ops.d.ts +10 -0
  196. package/dist/eval/expr/money-ops.d.ts.map +1 -0
  197. package/dist/eval/expr/money-ops.js +17 -0
  198. package/dist/eval/expr/money-ops.js.map +1 -0
  199. package/dist/eval/expr/operands.d.ts +27 -0
  200. package/dist/eval/expr/operands.d.ts.map +1 -0
  201. package/dist/eval/expr/operands.js +167 -0
  202. package/dist/eval/expr/operands.js.map +1 -0
  203. package/dist/eval/expr/presence.d.ts +27 -0
  204. package/dist/eval/expr/presence.d.ts.map +1 -0
  205. package/dist/eval/expr/presence.js +140 -0
  206. package/dist/eval/expr/presence.js.map +1 -0
  207. package/dist/eval/expr/records.d.ts +22 -0
  208. package/dist/eval/expr/records.d.ts.map +1 -0
  209. package/dist/eval/expr/records.js +101 -0
  210. package/dist/eval/expr/records.js.map +1 -0
  211. package/dist/eval/expr/rule-refs.d.ts +25 -0
  212. package/dist/eval/expr/rule-refs.d.ts.map +1 -0
  213. package/dist/eval/expr/rule-refs.js +60 -0
  214. package/dist/eval/expr/rule-refs.js.map +1 -0
  215. package/dist/eval/expr/sequences.d.ts +26 -0
  216. package/dist/eval/expr/sequences.d.ts.map +1 -0
  217. package/dist/eval/expr/sequences.js +151 -0
  218. package/dist/eval/expr/sequences.js.map +1 -0
  219. package/dist/eval/expr/value.d.ts +99 -0
  220. package/dist/eval/expr/value.d.ts.map +1 -0
  221. package/dist/eval/expr/value.js +14 -0
  222. package/dist/eval/expr/value.js.map +1 -0
  223. package/dist/eval/expression.d.ts +142 -0
  224. package/dist/eval/expression.d.ts.map +1 -0
  225. package/dist/eval/expression.js +446 -0
  226. package/dist/eval/expression.js.map +1 -0
  227. package/dist/eval/firing.d.ts +68 -0
  228. package/dist/eval/firing.d.ts.map +1 -0
  229. package/dist/eval/firing.js +222 -0
  230. package/dist/eval/firing.js.map +1 -0
  231. package/dist/eval/gate.d.ts +110 -0
  232. package/dist/eval/gate.d.ts.map +1 -0
  233. package/dist/eval/gate.js +278 -0
  234. package/dist/eval/gate.js.map +1 -0
  235. package/dist/eval/layout-visibility.d.ts +18 -0
  236. package/dist/eval/layout-visibility.d.ts.map +1 -0
  237. package/dist/eval/layout-visibility.js +61 -0
  238. package/dist/eval/layout-visibility.js.map +1 -0
  239. package/dist/eval/option-availability.d.ts +26 -0
  240. package/dist/eval/option-availability.d.ts.map +1 -0
  241. package/dist/eval/option-availability.js +580 -0
  242. package/dist/eval/option-availability.js.map +1 -0
  243. package/dist/eval/options-boundary.d.ts +15 -0
  244. package/dist/eval/options-boundary.d.ts.map +1 -0
  245. package/dist/eval/options-boundary.js +40 -0
  246. package/dist/eval/options-boundary.js.map +1 -0
  247. package/dist/eval/options.d.ts +99 -0
  248. package/dist/eval/options.d.ts.map +1 -0
  249. package/dist/eval/options.js +96 -0
  250. package/dist/eval/options.js.map +1 -0
  251. package/dist/eval/overrides.d.ts +116 -0
  252. package/dist/eval/overrides.d.ts.map +1 -0
  253. package/dist/eval/overrides.js +176 -0
  254. package/dist/eval/overrides.js.map +1 -0
  255. package/dist/eval/paths.d.ts +25 -0
  256. package/dist/eval/paths.d.ts.map +1 -0
  257. package/dist/eval/paths.js +47 -0
  258. package/dist/eval/paths.js.map +1 -0
  259. package/dist/eval/presentation-reads.d.ts +20 -0
  260. package/dist/eval/presentation-reads.d.ts.map +1 -0
  261. package/dist/eval/presentation-reads.js +2 -0
  262. package/dist/eval/presentation-reads.js.map +1 -0
  263. package/dist/eval/presentation.d.ts +122 -0
  264. package/dist/eval/presentation.d.ts.map +1 -0
  265. package/dist/eval/presentation.js +255 -0
  266. package/dist/eval/presentation.js.map +1 -0
  267. package/dist/eval/reader/context-value.d.ts +41 -0
  268. package/dist/eval/reader/context-value.d.ts.map +1 -0
  269. package/dist/eval/reader/context-value.js +129 -0
  270. package/dist/eval/reader/context-value.js.map +1 -0
  271. package/dist/eval/reader/covered.d.ts +53 -0
  272. package/dist/eval/reader/covered.d.ts.map +1 -0
  273. package/dist/eval/reader/covered.js +139 -0
  274. package/dist/eval/reader/covered.js.map +1 -0
  275. package/dist/eval/reader/declarations.d.ts +182 -0
  276. package/dist/eval/reader/declarations.d.ts.map +1 -0
  277. package/dist/eval/reader/declarations.js +153 -0
  278. package/dist/eval/reader/declarations.js.map +1 -0
  279. package/dist/eval/reader/member-access.d.ts +87 -0
  280. package/dist/eval/reader/member-access.d.ts.map +1 -0
  281. package/dist/eval/reader/member-access.js +212 -0
  282. package/dist/eval/reader/member-access.js.map +1 -0
  283. package/dist/eval/reader/memo.d.ts +34 -0
  284. package/dist/eval/reader/memo.d.ts.map +1 -0
  285. package/dist/eval/reader/memo.js +67 -0
  286. package/dist/eval/reader/memo.js.map +1 -0
  287. package/dist/eval/reader/overlay.d.ts +74 -0
  288. package/dist/eval/reader/overlay.d.ts.map +1 -0
  289. package/dist/eval/reader/overlay.js +365 -0
  290. package/dist/eval/reader/overlay.js.map +1 -0
  291. package/dist/eval/reader/questions.d.ts +37 -0
  292. package/dist/eval/reader/questions.d.ts.map +1 -0
  293. package/dist/eval/reader/questions.js +78 -0
  294. package/dist/eval/reader/questions.js.map +1 -0
  295. package/dist/eval/reader/resolve.d.ts +84 -0
  296. package/dist/eval/reader/resolve.d.ts.map +1 -0
  297. package/dist/eval/reader/resolve.js +310 -0
  298. package/dist/eval/reader/resolve.js.map +1 -0
  299. package/dist/eval/reader/value-read.d.ts +50 -0
  300. package/dist/eval/reader/value-read.d.ts.map +1 -0
  301. package/dist/eval/reader/value-read.js +133 -0
  302. package/dist/eval/reader/value-read.js.map +1 -0
  303. package/dist/eval/reader/withheld.d.ts +48 -0
  304. package/dist/eval/reader/withheld.d.ts.map +1 -0
  305. package/dist/eval/reader/withheld.js +108 -0
  306. package/dist/eval/reader/withheld.js.map +1 -0
  307. package/dist/eval/reader-paths.d.ts +24 -0
  308. package/dist/eval/reader-paths.d.ts.map +1 -0
  309. package/dist/eval/reader-paths.js +23 -0
  310. package/dist/eval/reader-paths.js.map +1 -0
  311. package/dist/eval/reader.d.ts +281 -0
  312. package/dist/eval/reader.d.ts.map +1 -0
  313. package/dist/eval/reader.js +560 -0
  314. package/dist/eval/reader.js.map +1 -0
  315. package/dist/eval/receipt.d.ts +37 -0
  316. package/dist/eval/receipt.d.ts.map +1 -0
  317. package/dist/eval/receipt.js +222 -0
  318. package/dist/eval/receipt.js.map +1 -0
  319. package/dist/eval/report/assemble.d.ts +84 -0
  320. package/dist/eval/report/assemble.d.ts.map +1 -0
  321. package/dist/eval/report/assemble.js +277 -0
  322. package/dist/eval/report/assemble.js.map +1 -0
  323. package/dist/eval/report/fold.d.ts +18 -0
  324. package/dist/eval/report/fold.d.ts.map +1 -0
  325. package/dist/eval/report/fold.js +58 -0
  326. package/dist/eval/report/fold.js.map +1 -0
  327. package/dist/eval/rule/alternatives.d.ts +23 -0
  328. package/dist/eval/rule/alternatives.d.ts.map +1 -0
  329. package/dist/eval/rule/alternatives.js +46 -0
  330. package/dist/eval/rule/alternatives.js.map +1 -0
  331. package/dist/eval/rule/behaviour.d.ts +47 -0
  332. package/dist/eval/rule/behaviour.d.ts.map +1 -0
  333. package/dist/eval/rule/behaviour.js +249 -0
  334. package/dist/eval/rule/behaviour.js.map +1 -0
  335. package/dist/eval/rule/compute.d.ts +46 -0
  336. package/dist/eval/rule/compute.d.ts.map +1 -0
  337. package/dist/eval/rule/compute.js +158 -0
  338. package/dist/eval/rule/compute.js.map +1 -0
  339. package/dist/eval/rule/create-state.d.ts +42 -0
  340. package/dist/eval/rule/create-state.d.ts.map +1 -0
  341. package/dist/eval/rule/create-state.js +134 -0
  342. package/dist/eval/rule/create-state.js.map +1 -0
  343. package/dist/eval/rule/diagnostics.d.ts +24 -0
  344. package/dist/eval/rule/diagnostics.d.ts.map +1 -0
  345. package/dist/eval/rule/diagnostics.js +45 -0
  346. package/dist/eval/rule/diagnostics.js.map +1 -0
  347. package/dist/eval/rule/execution.d.ts +24 -0
  348. package/dist/eval/rule/execution.d.ts.map +1 -0
  349. package/dist/eval/rule/execution.js +495 -0
  350. package/dist/eval/rule/execution.js.map +1 -0
  351. package/dist/eval/rule/gate.d.ts +12 -0
  352. package/dist/eval/rule/gate.d.ts.map +1 -0
  353. package/dist/eval/rule/gate.js +34 -0
  354. package/dist/eval/rule/gate.js.map +1 -0
  355. package/dist/eval/rule/item.d.ts +11 -0
  356. package/dist/eval/rule/item.d.ts.map +1 -0
  357. package/dist/eval/rule/item.js +265 -0
  358. package/dist/eval/rule/item.js.map +1 -0
  359. package/dist/eval/rule/prepare.d.ts +64 -0
  360. package/dist/eval/rule/prepare.d.ts.map +1 -0
  361. package/dist/eval/rule/prepare.js +131 -0
  362. package/dist/eval/rule/prepare.js.map +1 -0
  363. package/dist/eval/rule/result.d.ts +97 -0
  364. package/dist/eval/rule/result.d.ts.map +1 -0
  365. package/dist/eval/rule/result.js +347 -0
  366. package/dist/eval/rule/result.js.map +1 -0
  367. package/dist/eval/rule/runner.d.ts +128 -0
  368. package/dist/eval/rule/runner.d.ts.map +1 -0
  369. package/dist/eval/rule/runner.js +296 -0
  370. package/dist/eval/rule/runner.js.map +1 -0
  371. package/dist/eval/rule/screen.d.ts +32 -0
  372. package/dist/eval/rule/screen.d.ts.map +1 -0
  373. package/dist/eval/rule/screen.js +73 -0
  374. package/dist/eval/rule/screen.js.map +1 -0
  375. package/dist/eval/rule/state.d.ts +137 -0
  376. package/dist/eval/rule/state.d.ts.map +1 -0
  377. package/dist/eval/rule/state.js +2 -0
  378. package/dist/eval/rule/state.js.map +1 -0
  379. package/dist/eval/rule/steps.d.ts +44 -0
  380. package/dist/eval/rule/steps.d.ts.map +1 -0
  381. package/dist/eval/rule/steps.js +367 -0
  382. package/dist/eval/rule/steps.js.map +1 -0
  383. package/dist/eval/rule/visibility.d.ts +18 -0
  384. package/dist/eval/rule/visibility.d.ts.map +1 -0
  385. package/dist/eval/rule/visibility.js +79 -0
  386. package/dist/eval/rule/visibility.js.map +1 -0
  387. package/dist/eval/seal.d.ts +74 -0
  388. package/dist/eval/seal.d.ts.map +1 -0
  389. package/dist/eval/seal.js +154 -0
  390. package/dist/eval/seal.js.map +1 -0
  391. package/dist/eval/signature-coverage.d.ts +19 -0
  392. package/dist/eval/signature-coverage.d.ts.map +1 -0
  393. package/dist/eval/signature-coverage.js +160 -0
  394. package/dist/eval/signature-coverage.js.map +1 -0
  395. package/dist/eval/state/derive.d.ts +72 -0
  396. package/dist/eval/state/derive.d.ts.map +1 -0
  397. package/dist/eval/state/derive.js +61 -0
  398. package/dist/eval/state/derive.js.map +1 -0
  399. package/dist/eval/state/describe.d.ts +18 -0
  400. package/dist/eval/state/describe.d.ts.map +1 -0
  401. package/dist/eval/state/describe.js +19 -0
  402. package/dist/eval/state/describe.js.map +1 -0
  403. package/dist/eval/state/field-state.d.ts +471 -0
  404. package/dist/eval/state/field-state.d.ts.map +1 -0
  405. package/dist/eval/state/field-state.js +1604 -0
  406. package/dist/eval/state/field-state.js.map +1 -0
  407. package/dist/eval/state/measurement.d.ts +136 -0
  408. package/dist/eval/state/measurement.d.ts.map +1 -0
  409. package/dist/eval/state/measurement.js +209 -0
  410. package/dist/eval/state/measurement.js.map +1 -0
  411. package/dist/eval/state/options.d.ts +21 -0
  412. package/dist/eval/state/options.d.ts.map +1 -0
  413. package/dist/eval/state/options.js +3 -0
  414. package/dist/eval/state/options.js.map +1 -0
  415. package/dist/eval/state/readiness.d.ts +400 -0
  416. package/dist/eval/state/readiness.d.ts.map +1 -0
  417. package/dist/eval/state/readiness.js +1067 -0
  418. package/dist/eval/state/readiness.js.map +1 -0
  419. package/dist/eval/state/snapshot.d.ts +130 -0
  420. package/dist/eval/state/snapshot.d.ts.map +1 -0
  421. package/dist/eval/state/snapshot.js +35 -0
  422. package/dist/eval/state/snapshot.js.map +1 -0
  423. package/dist/eval/state/unavailable-options.d.ts +54 -0
  424. package/dist/eval/state/unavailable-options.d.ts.map +1 -0
  425. package/dist/eval/state/unavailable-options.js +82 -0
  426. package/dist/eval/state/unavailable-options.js.map +1 -0
  427. package/dist/eval/state/value-state.d.ts +38 -0
  428. package/dist/eval/state/value-state.d.ts.map +1 -0
  429. package/dist/eval/state/value-state.js +52 -0
  430. package/dist/eval/state/value-state.js.map +1 -0
  431. package/dist/eval/submission/admission.d.ts +50 -0
  432. package/dist/eval/submission/admission.d.ts.map +1 -0
  433. package/dist/eval/submission/admission.js +174 -0
  434. package/dist/eval/submission/admission.js.map +1 -0
  435. package/dist/eval/submission/authority.d.ts +71 -0
  436. package/dist/eval/submission/authority.d.ts.map +1 -0
  437. package/dist/eval/submission/authority.js +118 -0
  438. package/dist/eval/submission/authority.js.map +1 -0
  439. package/dist/eval/submission/datasets.d.ts +28 -0
  440. package/dist/eval/submission/datasets.d.ts.map +1 -0
  441. package/dist/eval/submission/datasets.js +109 -0
  442. package/dist/eval/submission/datasets.js.map +1 -0
  443. package/dist/eval/submission/index.d.ts +15 -0
  444. package/dist/eval/submission/index.d.ts.map +1 -0
  445. package/dist/eval/submission/index.js +13 -0
  446. package/dist/eval/submission/index.js.map +1 -0
  447. package/dist/eval/submission/refusals.d.ts +103 -0
  448. package/dist/eval/submission/refusals.d.ts.map +1 -0
  449. package/dist/eval/submission/refusals.js +15 -0
  450. package/dist/eval/submission/refusals.js.map +1 -0
  451. package/dist/eval/submission/signatures.d.ts +7 -0
  452. package/dist/eval/submission/signatures.d.ts.map +1 -0
  453. package/dist/eval/submission/signatures.js +215 -0
  454. package/dist/eval/submission/signatures.js.map +1 -0
  455. package/dist/eval/submission/writes.d.ts +51 -0
  456. package/dist/eval/submission/writes.d.ts.map +1 -0
  457. package/dist/eval/submission/writes.js +203 -0
  458. package/dist/eval/submission/writes.js.map +1 -0
  459. package/dist/eval/submission.d.ts +53 -0
  460. package/dist/eval/submission.d.ts.map +1 -0
  461. package/dist/eval/submission.js +521 -0
  462. package/dist/eval/submission.js.map +1 -0
  463. package/dist/eval/suggestions-to-engine.d.ts +18 -0
  464. package/dist/eval/suggestions-to-engine.d.ts.map +1 -0
  465. package/dist/eval/suggestions-to-engine.js +40 -0
  466. package/dist/eval/suggestions-to-engine.js.map +1 -0
  467. package/dist/eval/suggestions.d.ts +17 -0
  468. package/dist/eval/suggestions.d.ts.map +1 -0
  469. package/dist/eval/suggestions.js +314 -0
  470. package/dist/eval/suggestions.js.map +1 -0
  471. package/dist/eval/undecided.d.ts +64 -0
  472. package/dist/eval/undecided.d.ts.map +1 -0
  473. package/dist/eval/undecided.js +101 -0
  474. package/dist/eval/undecided.js.map +1 -0
  475. package/dist/eval/verdict.d.ts +66 -0
  476. package/dist/eval/verdict.d.ts.map +1 -0
  477. package/dist/eval/verdict.js +106 -0
  478. package/dist/eval/verdict.js.map +1 -0
  479. package/dist/eval/verify-signature.d.ts +78 -0
  480. package/dist/eval/verify-signature.d.ts.map +1 -0
  481. package/dist/eval/verify-signature.js +185 -0
  482. package/dist/eval/verify-signature.js.map +1 -0
  483. package/dist/eval/version-dispatch.d.ts +38 -0
  484. package/dist/eval/version-dispatch.d.ts.map +1 -0
  485. package/dist/eval/version-dispatch.js +61 -0
  486. package/dist/eval/version-dispatch.js.map +1 -0
  487. package/dist/eval/visibility.d.ts +33 -0
  488. package/dist/eval/visibility.d.ts.map +1 -0
  489. package/dist/eval/visibility.js +83 -0
  490. package/dist/eval/visibility.js.map +1 -0
  491. package/dist/evaluate.d.ts +24 -0
  492. package/dist/evaluate.d.ts.map +1 -0
  493. package/dist/evaluate.js +18 -0
  494. package/dist/evaluate.js.map +1 -0
  495. package/dist/expr/builtin-docs.d.ts +51 -0
  496. package/dist/expr/builtin-docs.d.ts.map +1 -0
  497. package/dist/expr/builtin-docs.js +874 -0
  498. package/dist/expr/builtin-docs.js.map +1 -0
  499. package/dist/expr/builtins.d.ts +50 -0
  500. package/dist/expr/builtins.d.ts.map +1 -0
  501. package/dist/expr/builtins.js +966 -0
  502. package/dist/expr/builtins.js.map +1 -0
  503. package/dist/expr/decimal-precision.d.ts +39 -0
  504. package/dist/expr/decimal-precision.d.ts.map +1 -0
  505. package/dist/expr/decimal-precision.js +62 -0
  506. package/dist/expr/decimal-precision.js.map +1 -0
  507. package/dist/expr/decimal.d.ts +172 -0
  508. package/dist/expr/decimal.d.ts.map +1 -0
  509. package/dist/expr/decimal.js +782 -0
  510. package/dist/expr/decimal.js.map +1 -0
  511. package/dist/expr/deprecations.d.ts +34 -0
  512. package/dist/expr/deprecations.d.ts.map +1 -0
  513. package/dist/expr/deprecations.js +17 -0
  514. package/dist/expr/deprecations.js.map +1 -0
  515. package/dist/expr/diagnostics.d.ts +21 -0
  516. package/dist/expr/diagnostics.d.ts.map +1 -0
  517. package/dist/expr/diagnostics.js +231 -0
  518. package/dist/expr/diagnostics.js.map +1 -0
  519. package/dist/expr/direction.d.ts +30 -0
  520. package/dist/expr/direction.d.ts.map +1 -0
  521. package/dist/expr/direction.js +77 -0
  522. package/dist/expr/direction.js.map +1 -0
  523. package/dist/expr/example-expression.d.ts +62 -0
  524. package/dist/expr/example-expression.d.ts.map +1 -0
  525. package/dist/expr/example-expression.js +670 -0
  526. package/dist/expr/example-expression.js.map +1 -0
  527. package/dist/expr/instant.d.ts +49 -0
  528. package/dist/expr/instant.d.ts.map +1 -0
  529. package/dist/expr/instant.js +111 -0
  530. package/dist/expr/instant.js.map +1 -0
  531. package/dist/expr/logic.d.ts +17 -0
  532. package/dist/expr/logic.d.ts.map +1 -0
  533. package/dist/expr/logic.js +65 -0
  534. package/dist/expr/logic.js.map +1 -0
  535. package/dist/expr/messages.d.ts +45 -0
  536. package/dist/expr/messages.d.ts.map +1 -0
  537. package/dist/expr/messages.js +280 -0
  538. package/dist/expr/messages.js.map +1 -0
  539. package/dist/expr/money.d.ts +38 -0
  540. package/dist/expr/money.d.ts.map +1 -0
  541. package/dist/expr/money.js +127 -0
  542. package/dist/expr/money.js.map +1 -0
  543. package/dist/expr/ordering.d.ts +56 -0
  544. package/dist/expr/ordering.d.ts.map +1 -0
  545. package/dist/expr/ordering.js +167 -0
  546. package/dist/expr/ordering.js.map +1 -0
  547. package/dist/expr/pattern.d.ts +44 -0
  548. package/dist/expr/pattern.d.ts.map +1 -0
  549. package/dist/expr/pattern.js +458 -0
  550. package/dist/expr/pattern.js.map +1 -0
  551. package/dist/expr/plain-date.d.ts +90 -0
  552. package/dist/expr/plain-date.d.ts.map +1 -0
  553. package/dist/expr/plain-date.js +230 -0
  554. package/dist/expr/plain-date.js.map +1 -0
  555. package/dist/expr/plural-categories.d.ts +8 -0
  556. package/dist/expr/plural-categories.d.ts.map +1 -0
  557. package/dist/expr/plural-categories.js +15 -0
  558. package/dist/expr/plural-categories.js.map +1 -0
  559. package/dist/expr/plural-keys.d.ts +39 -0
  560. package/dist/expr/plural-keys.d.ts.map +1 -0
  561. package/dist/expr/plural-keys.js +46 -0
  562. package/dist/expr/plural-keys.js.map +1 -0
  563. package/dist/expr/plural.d.ts +33 -0
  564. package/dist/expr/plural.d.ts.map +1 -0
  565. package/dist/expr/plural.js +50 -0
  566. package/dist/expr/plural.js.map +1 -0
  567. package/dist/expr/quantity.d.ts +31 -0
  568. package/dist/expr/quantity.d.ts.map +1 -0
  569. package/dist/expr/quantity.js +83 -0
  570. package/dist/expr/quantity.js.map +1 -0
  571. package/dist/expr/reduce.d.ts +50 -0
  572. package/dist/expr/reduce.d.ts.map +1 -0
  573. package/dist/expr/reduce.js +236 -0
  574. package/dist/expr/reduce.js.map +1 -0
  575. package/dist/expr/regex.d.ts +108 -0
  576. package/dist/expr/regex.d.ts.map +1 -0
  577. package/dist/expr/regex.js +1210 -0
  578. package/dist/expr/regex.js.map +1 -0
  579. package/dist/expr/select-locale.d.ts +67 -0
  580. package/dist/expr/select-locale.d.ts.map +1 -0
  581. package/dist/expr/select-locale.js +219 -0
  582. package/dist/expr/select-locale.js.map +1 -0
  583. package/dist/expr/sequences.d.ts +123 -0
  584. package/dist/expr/sequences.d.ts.map +1 -0
  585. package/dist/expr/sequences.js +234 -0
  586. package/dist/expr/sequences.js.map +1 -0
  587. package/dist/expr/strings.d.ts +50 -0
  588. package/dist/expr/strings.d.ts.map +1 -0
  589. package/dist/expr/strings.js +184 -0
  590. package/dist/expr/strings.js.map +1 -0
  591. package/dist/expr/validation.d.ts +32 -0
  592. package/dist/expr/validation.d.ts.map +1 -0
  593. package/dist/expr/validation.js +182 -0
  594. package/dist/expr/validation.js.map +1 -0
  595. package/dist/graph/freeze.d.ts +4 -0
  596. package/dist/graph/freeze.d.ts.map +1 -0
  597. package/dist/graph/freeze.js +52 -0
  598. package/dist/graph/freeze.js.map +1 -0
  599. package/dist/graph/index.d.ts +15 -0
  600. package/dist/graph/index.d.ts.map +1 -0
  601. package/dist/graph/index.js +13 -0
  602. package/dist/graph/index.js.map +1 -0
  603. package/dist/graph/inspect.d.ts +76 -0
  604. package/dist/graph/inspect.d.ts.map +1 -0
  605. package/dist/graph/inspect.js +263 -0
  606. package/dist/graph/inspect.js.map +1 -0
  607. package/dist/graph/read-walk.d.ts +101 -0
  608. package/dist/graph/read-walk.d.ts.map +1 -0
  609. package/dist/graph/read-walk.js +358 -0
  610. package/dist/graph/read-walk.js.map +1 -0
  611. package/dist/graph/record-index.d.ts +24 -0
  612. package/dist/graph/record-index.d.ts.map +1 -0
  613. package/dist/graph/record-index.js +35 -0
  614. package/dist/graph/record-index.js.map +1 -0
  615. package/dist/index.d.ts +104 -0
  616. package/dist/index.d.ts.map +1 -0
  617. package/dist/index.js +139 -0
  618. package/dist/index.js.map +1 -0
  619. package/dist/lookup/digest.d.ts +51 -0
  620. package/dist/lookup/digest.d.ts.map +1 -0
  621. package/dist/lookup/digest.js +46 -0
  622. package/dist/lookup/digest.js.map +1 -0
  623. package/dist/lookup/index.d.ts +28 -0
  624. package/dist/lookup/index.d.ts.map +1 -0
  625. package/dist/lookup/index.js +27 -0
  626. package/dist/lookup/index.js.map +1 -0
  627. package/dist/lookup/install.d.ts +48 -0
  628. package/dist/lookup/install.d.ts.map +1 -0
  629. package/dist/lookup/install.js +315 -0
  630. package/dist/lookup/install.js.map +1 -0
  631. package/dist/lookup/pass.d.ts +55 -0
  632. package/dist/lookup/pass.d.ts.map +1 -0
  633. package/dist/lookup/pass.js +212 -0
  634. package/dist/lookup/pass.js.map +1 -0
  635. package/dist/lookup/pins.d.ts +34 -0
  636. package/dist/lookup/pins.d.ts.map +1 -0
  637. package/dist/lookup/pins.js +39 -0
  638. package/dist/lookup/pins.js.map +1 -0
  639. package/dist/lookup/provenance.d.ts +23 -0
  640. package/dist/lookup/provenance.d.ts.map +1 -0
  641. package/dist/lookup/provenance.js +78 -0
  642. package/dist/lookup/provenance.js.map +1 -0
  643. package/dist/lookup/readiness.d.ts +13 -0
  644. package/dist/lookup/readiness.d.ts.map +1 -0
  645. package/dist/lookup/readiness.js +57 -0
  646. package/dist/lookup/readiness.js.map +1 -0
  647. package/dist/lookup/resolve.d.ts +24 -0
  648. package/dist/lookup/resolve.d.ts.map +1 -0
  649. package/dist/lookup/resolve.js +201 -0
  650. package/dist/lookup/resolve.js.map +1 -0
  651. package/dist/lookup/store.d.ts +41 -0
  652. package/dist/lookup/store.d.ts.map +1 -0
  653. package/dist/lookup/store.js +74 -0
  654. package/dist/lookup/store.js.map +1 -0
  655. package/dist/model/access.d.ts +200 -0
  656. package/dist/model/access.d.ts.map +1 -0
  657. package/dist/model/access.js +125 -0
  658. package/dist/model/access.js.map +1 -0
  659. package/dist/model/artifact-members.d.ts +3 -0
  660. package/dist/model/artifact-members.d.ts.map +1 -0
  661. package/dist/model/artifact-members.js +38 -0
  662. package/dist/model/artifact-members.js.map +1 -0
  663. package/dist/model/composition.d.ts +47 -0
  664. package/dist/model/composition.d.ts.map +1 -0
  665. package/dist/model/composition.js +66 -0
  666. package/dist/model/composition.js.map +1 -0
  667. package/dist/model/domain.d.ts +51 -0
  668. package/dist/model/domain.d.ts.map +1 -0
  669. package/dist/model/domain.js +75 -0
  670. package/dist/model/domain.js.map +1 -0
  671. package/dist/model/duration.d.ts +31 -0
  672. package/dist/model/duration.d.ts.map +1 -0
  673. package/dist/model/duration.js +136 -0
  674. package/dist/model/duration.js.map +1 -0
  675. package/dist/model/errors.d.ts +58 -0
  676. package/dist/model/errors.d.ts.map +1 -0
  677. package/dist/model/errors.js +81 -0
  678. package/dist/model/errors.js.map +1 -0
  679. package/dist/model/evolution.d.ts +177 -0
  680. package/dist/model/evolution.d.ts.map +1 -0
  681. package/dist/model/evolution.js +5 -0
  682. package/dist/model/evolution.js.map +1 -0
  683. package/dist/model/expr-children.d.ts +15 -0
  684. package/dist/model/expr-children.d.ts.map +1 -0
  685. package/dist/model/expr-children.js +45 -0
  686. package/dist/model/expr-children.js.map +1 -0
  687. package/dist/model/guards.d.ts +9 -0
  688. package/dist/model/guards.d.ts.map +1 -0
  689. package/dist/model/guards.js +11 -0
  690. package/dist/model/guards.js.map +1 -0
  691. package/dist/model/input.d.ts +42 -0
  692. package/dist/model/input.d.ts.map +1 -0
  693. package/dist/model/input.js +26 -0
  694. package/dist/model/input.js.map +1 -0
  695. package/dist/model/integer.d.ts +14 -0
  696. package/dist/model/integer.d.ts.map +1 -0
  697. package/dist/model/integer.js +16 -0
  698. package/dist/model/integer.js.map +1 -0
  699. package/dist/model/intrinsic.d.ts +18 -0
  700. package/dist/model/intrinsic.d.ts.map +1 -0
  701. package/dist/model/intrinsic.js +21 -0
  702. package/dist/model/intrinsic.js.map +1 -0
  703. package/dist/model/layout.d.ts +129 -0
  704. package/dist/model/layout.d.ts.map +1 -0
  705. package/dist/model/layout.js +2 -0
  706. package/dist/model/layout.js.map +1 -0
  707. package/dist/model/media.d.ts +33 -0
  708. package/dist/model/media.d.ts.map +1 -0
  709. package/dist/model/media.js +86 -0
  710. package/dist/model/media.js.map +1 -0
  711. package/dist/model/members.generated.d.ts +11 -0
  712. package/dist/model/members.generated.d.ts.map +1 -0
  713. package/dist/model/members.generated.js +71 -0
  714. package/dist/model/members.generated.js.map +1 -0
  715. package/dist/model/row-address.d.ts +27 -0
  716. package/dist/model/row-address.d.ts.map +1 -0
  717. package/dist/model/row-address.js +146 -0
  718. package/dist/model/row-address.js.map +1 -0
  719. package/dist/model/schema.d.ts +108 -0
  720. package/dist/model/schema.d.ts.map +1 -0
  721. package/dist/model/schema.js +2 -0
  722. package/dist/model/schema.js.map +1 -0
  723. package/dist/model/shape.d.ts +193 -0
  724. package/dist/model/shape.d.ts.map +1 -0
  725. package/dist/model/shape.js +2 -0
  726. package/dist/model/shape.js.map +1 -0
  727. package/dist/model/time.d.ts +61 -0
  728. package/dist/model/time.d.ts.map +1 -0
  729. package/dist/model/time.js +110 -0
  730. package/dist/model/time.js.map +1 -0
  731. package/dist/model/types.d.ts +1329 -0
  732. package/dist/model/types.d.ts.map +1 -0
  733. package/dist/model/types.js +424 -0
  734. package/dist/model/types.js.map +1 -0
  735. package/dist/model/values.d.ts +91 -0
  736. package/dist/model/values.d.ts.map +1 -0
  737. package/dist/model/values.js +195 -0
  738. package/dist/model/values.js.map +1 -0
  739. package/dist/model/wire.d.ts +356 -0
  740. package/dist/model/wire.d.ts.map +1 -0
  741. package/dist/model/wire.js +1504 -0
  742. package/dist/model/wire.js.map +1 -0
  743. package/dist/offline/index.d.ts +374 -0
  744. package/dist/offline/index.d.ts.map +1 -0
  745. package/dist/offline/index.js +422 -0
  746. package/dist/offline/index.js.map +1 -0
  747. package/dist/testing.d.ts +30 -0
  748. package/dist/testing.d.ts.map +1 -0
  749. package/dist/testing.js +42 -0
  750. package/dist/testing.js.map +1 -0
  751. package/dist/version.d.ts +30 -0
  752. package/dist/version.d.ts.map +1 -0
  753. package/dist/version.js +116 -0
  754. package/dist/version.js.map +1 -0
  755. package/package.json +98 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.js","sourceRoot":"","sources":["../../src/eval/gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MA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;YAChD,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC;QACrC,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,OAAO;QACb,SAAS;KACV,CAAC;AACJ,CAAC","sourcesContent":["import { canonicalHash, canonicalizeRestricted } from '../canonical/jcs.js';\nimport { parsePlainDate } from '../expr/plain-date.js';\nimport { compareCodePoints } from '../expr/strings.js';\nimport { AxiomError } from '../model/errors.js';\nimport type {\n CompiledRule,\n EvaluationReport,\n FieldRef,\n GateItemResult,\n GateOverride,\n GatePolicy,\n GateReport,\n LookupMissReason,\n LookupProvenance,\n Outcome,\n} from '../model/types.js';\nimport { effectiveTier } from '../model/access.js';\nimport type { EvaluationEnv, EvaluationInput } from '../model/access.js';\nimport type { CompiledSchema } from '../model/schema.js';\nimport { toFieldRef } from '../model/wire.js';\nimport { fieldKey } from './access/projection.js';\nimport { createAccessWindow } from './access/window.js';\nimport type { GateOverrideOutcome, ReadOverrides } from './overrides.js';\nimport { applyApprovedOverrideBatch, approvalMatchesReport } from './overrides.js';\nimport { projectSubmission } from './submission.js';\nimport type { SubmissionSnapshot } from './submission.js';\n\n/**\n * The gate's stateless semantics: what a gate status means as a verdict, what a record's\n * input hash binds, and how an approved override is weighed.\n *\n * Everything here is a function of a report and the declarations it was decided under, so\n * the gate surface can be read — and tested — without an evaluation in progress.\n */\n\n/** The four verdicts `evaluateGate()` reports. */\nexport type GateVerdict = 'OPEN' | 'BLOCKED' | 'DEFERRED' | 'OVERRIDDEN';\n\n/** The stateless verdict one gate rule status stands for. */\nexport function gateOutcome(status: Outcome): Exclude<GateVerdict, 'OVERRIDDEN'> {\n switch (status) {\n case 'PASS':\n return 'OPEN';\n case 'DEFERRED':\n return 'DEFERRED';\n case 'FAIL':\n case 'UNKNOWN':\n return 'BLOCKED';\n }\n}\n\n/**\n * A gate's status when a read-only refusal reached it.\n *\n * `policy` is `undefined` for a hard gate, which has no permissive setting. A genuine `FAIL`\n * stays a failure under every policy: the policy governs what an *undecided* gate does, not\n * whether a decided one is overruled.\n */\nexport function gateStatusUnderPolicy(policy: GatePolicy | undefined, status: Outcome): Outcome {\n switch (policy) {\n case undefined:\n case 'block':\n return 'FAIL';\n case 'warn':\n return status === 'FAIL' ? 'FAIL' : 'PASS';\n case 'defer':\n return status === 'FAIL' ? 'FAIL' : 'DEFERRED';\n }\n}\n\n/**\n * The status the report decided for one gate, before any override is applied: an approval\n * binds the verdict it replaced, so a `DEFERRED` gate's approval cannot also describe a `FAIL`.\n * `undefined` when the report carries no result for that gate.\n */\nexport function decidedGateStatus(report: EvaluationReport, gateId: string): Outcome | undefined {\n return report.rules.find((rule) => rule.ruleId === gateId)?.status;\n}\n\n/** Every item result an active gate reported. An inactive gate decided no item, so it has none. */\nexport function gateItemsOf(gate: GateReport | undefined): readonly GateItemResult[] {\n return gate !== undefined && 'items' in gate ? gate.items : [];\n}\n\n/**\n * Every gate item's status, sorted by `itemId` and deduplicated, so the order the artifact\n * declares its items in cannot move an approval and a swapped verdict cannot hide behind an\n * unchanged fold. The compiler refuses two items of one gate sharing an id, so an item's id is\n * its identity and this binds every item the artifact declares. An inactive gate reported no\n * item, so it commits to none.\n */\nexport function gateItemCommitments(\n gate: GateReport | undefined,\n): readonly { readonly itemId: string; readonly status: Outcome }[] {\n const byId = new Map<string, Outcome>();\n for (const item of gateItemsOf(gate)) byId.set(item.itemId, item.status);\n return [...byId.entries()]\n .sort(([left], [right]) => compareCodePoints(left, right))\n .map(([itemId, status]) => ({ itemId, status }));\n}\n\n/** A capability set in the one order and multiplicity a hash may depend on. */\nfunction sortedCapabilities(capabilities: readonly string[] | undefined): readonly string[] {\n return [...new Set(capabilities ?? [])].sort(compareCodePoints);\n}\n\n/**\n * One table a report resolved against, as a commitment an override binds.\n *\n * A resolved table commits to its name, the version the artifact pinned and the digest of\n * the document that answered; `asOfDate` is not a commitment — the record date already bound\n * into the hash derives it, and it stays in the provenance as audit evidence. A table the\n * store could not resolve commits to no version or digest, so the reason it could not answer\n * is bound instead: a gate that saw a missing table and one that saw a table outside the\n * record date did not see the same thing.\n */\ntype TableCommitment =\n | { readonly tableId: string; readonly tableVersion: number; readonly tableSha256: string }\n | { readonly tableId: string; readonly reason: LookupMissReason };\n\n/** The tables a report resolved against, deduplicated and in canonical order. */\nfunction tableCommitments(lookups: readonly LookupProvenance[]): readonly TableCommitment[] {\n const byText = new Map<string, TableCommitment>();\n for (const entry of lookups) {\n const commitment: TableCommitment =\n 'tableSha256' in entry\n ? {\n tableId: entry.tableId,\n tableVersion: entry.tableVersion,\n tableSha256: entry.tableSha256,\n }\n : { tableId: entry.tableId, reason: entry.reason };\n byText.set(canonicalizeRestricted(commitment), commitment);\n }\n return [...byText.entries()]\n .sort(([left], [right]) => compareCodePoints(left, right))\n .map(([, commitment]) => commitment);\n}\n\n/** References validated, normalized and ordered canonically without repeats, so host order cannot move a hash. */\nfunction sortedRefs(refs: readonly FieldRef[], path: string): readonly FieldRef[] {\n const byKey = new Map<string, FieldRef>();\n refs.forEach((raw, index) => {\n const ref = toFieldRef(raw, `${path}[${String(index)}]`);\n byKey.set(fieldKey(ref), ref);\n });\n return [...byKey.entries()]\n .sort(([left], [right]) => compareCodePoints(left, right))\n .map(([, ref]) => ref);\n}\n\n/**\n * The SHA-256 a gate override is approved against: everything the gate actually judged plus\n * everything the submission would carry.\n *\n * `values` is the value tree the gate read, because a `visible` rule never stops an\n * expression reading a hidden field, so a hash of the projection alone would leave a value\n * the gate depended on unbound. `projected` is the submission the same record and snapshot\n * would export, so hiding a value under an `exclude` policy changes the hash without\n * changing any value. `context`, the sorted `redacted` set and `recordDate` are the record's\n * own facts, and `tables` is every version the evaluation resolved — hit or miss, including\n * a set-membership test.\n *\n * `tier`, `capabilities` and the gate's own decision are bound because a gate's verdict is a\n * function of them, not of the record: a client-tier `DEFERRED` approval must not be\n * replayable against the server-tier `FAIL` it deferred to. `gateStatus` is the named gate's\n * pre-override status and `gateItems` every item's, so an approval belongs to the verdict it\n * replaced rather than to a fold that happens to be unchanged. Both are the named gate's own,\n * so re-designating which gate is primary — a presentation choice the artifact states at the\n * document root — leaves every recorded approval valid.\n *\n * Access is not bound as a member of its own, but the submission it shapes is: a value an\n * overlay withholds stops travelling, so the hash moves with it. A record the wire contract\n * cannot read has no hash: the caller refuses the override rather than binding an approval\n * to a record it could not reduce to canonical form.\n */\nexport function gateInputHash(\n compiled: CompiledSchema,\n input: EvaluationInput,\n env: EvaluationEnv,\n report: EvaluationReport,\n gateId: string,\n): string {\n // The projection reads the access answer the evaluation resolved; resolving the same\n // window keeps one answer rather than a second overlay.\n const snapshot: SubmissionSnapshot = {\n report,\n access: createAccessWindow(compiled.fields, input, env).snapshotAccess(),\n };\n if (env.recordDate !== undefined) parsePlainDate(env.recordDate, '$.recordDate');\n const gateStatus = decidedGateStatus(report, gateId);\n return canonicalHash({\n values: input.values,\n projected: projectSubmission(compiled, input, snapshot),\n ...(input.context === undefined ? {} : { context: input.context }),\n ...(input.redacted === undefined ? {} : { redacted: sortedRefs(input.redacted, '$.redacted') }),\n ...(env.recordDate === undefined ? {} : { recordDate: env.recordDate }),\n tier: effectiveTier(env),\n capabilities: sortedCapabilities(env.capabilities),\n ...(gateStatus === undefined ? {} : { gateStatus }),\n gateItems: gateItemCommitments(report.gates?.[gateId]),\n tables: tableCommitments(report.lookups),\n });\n}\n\n/**\n * The input hash an override is matched against, or `undefined` when the record has none.\n *\n * A record outside the canonical wire contract has no hash, so no approval can be shown to\n * belong to it; the evaluation already reported the offending value. A document whose\n * signature would travel without a value it binds is a different failure — an authoring\n * defect that stops the export altogether — so its named refusal reaches the caller instead\n * of being reported as an unreadable record.\n */\nexport function gateInputHashOrNone(\n compiled: CompiledSchema,\n input: EvaluationInput,\n env: EvaluationEnv,\n report: EvaluationReport,\n gateId: string,\n): string | undefined {\n try {\n return gateInputHash(compiled, input, env, report, gateId);\n } catch (error) {\n if (!(error instanceof AxiomError)) throw error;\n if (error.code === 'SIGNATURE_COVER_EXCLUDED') throw error;\n return undefined;\n }\n}\n\n/** Everything one gate call decided, before it is shaped into `GateEvaluation`. */\nexport interface GateDecision {\n /** The verdict of the gate this call decides — the artifact's primary gate. */\n readonly outcome: GateVerdict;\n readonly report: EvaluationReport;\n readonly gate: GateReport;\n readonly overrides: GateOverrideOutcome;\n}\n\n/**\n * Weighs every well-formed override against the gate it names, and reports the primary gate's\n * verdict.\n *\n * An override belongs to one gate's verdict: `inputHashOf` binds that gate's own decision\n * inputs, so re-designating which gate is primary leaves an approval for either gate valid. An\n * override is accepted only when it names a declared gate, that gate is in force and not\n * `hard`, and the record, the gate's own `ruleHash` and the schema's `behaviorHash` all still\n * match the evaluation it would satisfy. An accepted override satisfies its gate and is\n * recorded in the report so the report hash binds it; a refused one is reported with its reason\n * and changes nothing.\n */\nexport function decideGate(request: {\n /** Every declared gate rule, keyed by its `ruleId`. */\n readonly gateRules: ReadonlyMap<string, CompiledRule>;\n /** The gate this call reports a verdict for. */\n readonly primaryGateId: string;\n readonly report: EvaluationReport;\n /** The record's input hash for one gate, or `undefined` when the record has none. */\n readonly inputHashOf: (gateId: string) => string | undefined;\n readonly candidates: ReadOverrides;\n readonly deniedFieldsOf: (gateId: string) => readonly string[];\n}): GateDecision {\n const refused = [...request.candidates.refused];\n // One index of the report's decisions and one grouped candidate list, built before the gate\n // loop: a scan per gate and a re-copied array per approved record made this quadratic in a\n // report with many gates and overrides.\n const resultByRuleId = new Map(\n request.report.rules.map((result) => [result.ruleId, result] as const),\n );\n // Grouped by the rule itself, so a gate the artifact does not declare is refused here and\n // every gate weighed below is one this artifact reported.\n const candidatesByGate = new Map<CompiledRule, GateOverride[]>();\n for (const override of request.candidates.wellFormed) {\n const gateRule = request.gateRules.get(override.gateId);\n if (gateRule === undefined) {\n refused.push({ override, reason: 'unknown_gate' });\n continue;\n }\n const forGate = candidatesByGate.get(gateRule);\n if (forGate === undefined) candidatesByGate.set(gateRule, [override]);\n else forGate.push(override);\n }\n\n const accepted: GateOverride[] = [];\n const acceptedByGate = new Set<string>();\n const approvals: {\n gateRuleId: string;\n accepted: readonly GateOverride[];\n deniedFields: readonly string[];\n }[] = [];\n // Gates are visited in code-point order so the host's list order cannot decide the accepted\n // list. Every candidate is weighed against the original, pre-override report; the report is\n // rewritten once below so one gate's waiver cannot be lost when the next gate is applied.\n for (const gateRule of [...candidatesByGate.keys()].sort((left, right) =>\n compareCodePoints(left.ruleId, right.ruleId),\n )) {\n const gateResult = resultByRuleId.get(gateRule.ruleId);\n const inputHash = request.inputHashOf(gateRule.ruleId);\n const gateReport = request.report.gates?.[gateRule.ruleId];\n if (gateResult === undefined || gateReport === undefined) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `gate ${gateRule.ruleId} reported no gate section`,\n gateRule.ruleId,\n );\n }\n // An inactive gate's section states `active: false` and no items; an active one has no\n // `active` member at all, so the union is narrowed rather than tested for a falsy value.\n const inactive = 'active' in gateReport && gateReport.active === false;\n const approved: GateOverride[] = [];\n for (const override of candidatesByGate.get(gateRule) ?? []) {\n // An inactive gate decided nothing — its `activeWhen` switched it off — so there is no\n // verdict an approval could satisfy or be stale against. The check precedes the hash\n // because an inactive gate reports `PASS`, which is the same status its own approval would\n // bind: accepting here recorded a human approving a gate that never ran.\n if (inactive) {\n refused.push({ override, reason: 'inactive_gate' });\n continue;\n }\n if (gateRule.gate?.hard === true) {\n refused.push({ override, reason: 'hard_gate' });\n continue;\n }\n if (inputHash === undefined || override.inputHash !== inputHash) {\n refused.push({ override, reason: inputHash === undefined ? 'unreadable_input' : 'stale' });\n continue;\n }\n // The same report-stated facts `applyApprovedOverrides` weighs, so the door and the replay\n // helper cannot disagree about whether a record belongs to this gate.\n if (!approvalMatchesReport(request.report, gateResult, override)) {\n refused.push({ override, reason: 'stale' });\n continue;\n }\n approved.push(override);\n }\n if (approved.length === 0) continue;\n // A host may replay a long approval log; appending one at a time keeps a large list a\n // large list rather than an argument-count overflow.\n for (const override of approved) accepted.push(override);\n acceptedByGate.add(gateRule.ruleId);\n approvals.push({\n gateRuleId: gateRule.ruleId,\n accepted: approved,\n deniedFields: request.deniedFieldsOf(gateRule.ruleId),\n });\n }\n const satisfied =\n approvals.length === 0 ? request.report : applyApprovedOverrideBatch(request.report, approvals);\n\n // The records are frozen by the boundary reader; the list a caller receives is frozen here\n // so an accepted approval cannot be dropped from the view of what the call accepted.\n const overrides: GateOverrideOutcome = Object.freeze({\n accepted: Object.freeze(accepted),\n refused: Object.freeze(refused),\n });\n const primary = satisfied.gates?.[request.primaryGateId];\n const primaryResult = satisfied.rules.find((result) => result.ruleId === request.primaryGateId);\n if (primary === undefined || primaryResult === undefined) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `gate ${request.primaryGateId} reported no gate section`,\n request.primaryGateId,\n );\n }\n return {\n outcome: acceptedByGate.has(request.primaryGateId)\n ? 'OVERRIDDEN'\n : gateOutcome(primaryResult.status),\n report: satisfied,\n gate: primary,\n overrides,\n };\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import type { CompiledSchema } from '../model/schema.js';
2
+ import type { PresentationReads } from './presentation-reads.js';
3
+ /**
4
+ * The declared fields a hidden layout section places, `MODEL-3.1.9`.
5
+ *
6
+ * A section's `visibleWhen` is presentation-only: it never decides a value, a rule result or a
7
+ * submission policy. What it does decide is whether the respondent can see a control, and a
8
+ * blocker on an off-screen control is not something anyone can repair. The derived readiness
9
+ * therefore treats these fields exactly as it treats a field a `visible` rule hides: the field's
10
+ * entry is not visible, so its required, validate and declared-fact blockers do not fold.
11
+ *
12
+ * Only a section is a data container in this walk. A hidden callout, SOP block, summary card or
13
+ * instruction-only step places no field, and a group or data-bearing step is refused by the
14
+ * compiler, so none of them contributes an id here.
15
+ */
16
+ export declare function layoutHiddenFields(compiled: CompiledSchema, reads: PresentationReads): ReadonlySet<string>;
17
+ export declare function declaresSectionVisibility(compiled: CompiledSchema): boolean;
18
+ //# sourceMappingURL=layout-visibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-visibility.d.ts","sourceRoot":"","sources":["../../src/eval/layout-visibility.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,iBAAiB,GACvB,WAAW,CAAC,MAAM,CAAC,CAyBrB;AAKD,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAU3E"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * The declared fields a hidden layout section places, `MODEL-3.1.9`.
3
+ *
4
+ * A section's `visibleWhen` is presentation-only: it never decides a value, a rule result or a
5
+ * submission policy. What it does decide is whether the respondent can see a control, and a
6
+ * blocker on an off-screen control is not something anyone can repair. The derived readiness
7
+ * therefore treats these fields exactly as it treats a field a `visible` rule hides: the field's
8
+ * entry is not visible, so its required, validate and declared-fact blockers do not fold.
9
+ *
10
+ * Only a section is a data container in this walk. A hidden callout, SOP block, summary card or
11
+ * instruction-only step places no field, and a group or data-bearing step is refused by the
12
+ * compiler, so none of them contributes an id here.
13
+ */
14
+ export function layoutHiddenFields(compiled, reads) {
15
+ const hidden = new Set();
16
+ if (!declaresSectionVisibility(compiled))
17
+ return hidden;
18
+ const collectFields = (node) => {
19
+ if (node.kind === 'field') {
20
+ hidden.add(node.fieldId);
21
+ return;
22
+ }
23
+ if (!('children' in node))
24
+ return;
25
+ for (const child of node.children)
26
+ collectFields(child);
27
+ };
28
+ const visit = (node) => {
29
+ if (node.kind === 'section') {
30
+ const visibleWhen = node.visibleWhen;
31
+ if (visibleWhen !== undefined && reads.outcomeOf(visibleWhen) === 'FAIL') {
32
+ // Every field below the section is off-screen, including a nested section's, so the
33
+ // whole subtree is collected rather than only the direct children.
34
+ collectFields(node);
35
+ return;
36
+ }
37
+ }
38
+ if ('children' in node)
39
+ for (const child of node.children)
40
+ visit(child);
41
+ };
42
+ for (const node of compiled.layout ?? [])
43
+ visit(node);
44
+ return hidden;
45
+ }
46
+ /** Whether any section declares a predicate, so a derivation can skip the presentation pass. */
47
+ const DECLARES_SECTION_VISIBILITY = new WeakMap();
48
+ export function declaresSectionVisibility(compiled) {
49
+ const cached = DECLARES_SECTION_VISIBILITY.get(compiled);
50
+ if (cached !== undefined)
51
+ return cached;
52
+ const visit = (node) => {
53
+ if (node.kind === 'section' && node.visibleWhen !== undefined)
54
+ return true;
55
+ return 'children' in node ? node.children.some(visit) : false;
56
+ };
57
+ const declared = (compiled.layout ?? []).some(visit);
58
+ DECLARES_SECTION_VISIBILITY.set(compiled, declared);
59
+ return declared;
60
+ }
61
+ //# sourceMappingURL=layout-visibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-visibility.js","sourceRoot":"","sources":["../../src/eval/layout-visibility.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAAwB,EACxB,KAAwB;IAExB,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC;QAAE,OAAO,MAAM,CAAC;IACxD,MAAM,aAAa,GAAG,CAAC,IAAgB,EAAQ,EAAE;QAC/C,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC1B,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC;YAAE,OAAO;QAClC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ;YAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,IAAgB,EAAQ,EAAE;QACvC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAA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O,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import type { LayoutNode } from '../model/layout.js';\nimport type { CompiledSchema } from '../model/schema.js';\nimport type { PresentationReads } from './presentation-reads.js';\n\n/**\n * The declared fields a hidden layout section places, `MODEL-3.1.9`.\n *\n * A section's `visibleWhen` is presentation-only: it never decides a value, a rule result or a\n * submission policy. What it does decide is whether the respondent can see a control, and a\n * blocker on an off-screen control is not something anyone can repair. The derived readiness\n * therefore treats these fields exactly as it treats a field a `visible` rule hides: the field's\n * entry is not visible, so its required, validate and declared-fact blockers do not fold.\n *\n * Only a section is a data container in this walk. A hidden callout, SOP block, summary card or\n * instruction-only step places no field, and a group or data-bearing step is refused by the\n * compiler, so none of them contributes an id here.\n */\nexport function layoutHiddenFields(\n compiled: CompiledSchema,\n reads: PresentationReads,\n): ReadonlySet<string> {\n const hidden = new Set<string>();\n if (!declaresSectionVisibility(compiled)) return hidden;\n const collectFields = (node: LayoutNode): void => {\n if (node.kind === 'field') {\n hidden.add(node.fieldId);\n return;\n }\n if (!('children' in node)) return;\n for (const child of node.children) collectFields(child);\n };\n const visit = (node: LayoutNode): void => {\n if (node.kind === 'section') {\n const visibleWhen = node.visibleWhen;\n if (visibleWhen !== undefined && reads.outcomeOf(visibleWhen) === 'FAIL') {\n // Every field below the section is off-screen, including a nested section's, so the\n // whole subtree is collected rather than only the direct children.\n collectFields(node);\n return;\n }\n }\n if ('children' in node) for (const child of node.children) visit(child);\n };\n for (const node of compiled.layout ?? []) visit(node);\n return hidden;\n}\n\n/** Whether any section declares a predicate, so a derivation can skip the presentation pass. */\nconst DECLARES_SECTION_VISIBILITY: WeakMap<CompiledSchema, boolean> = new WeakMap();\n\nexport function declaresSectionVisibility(compiled: CompiledSchema): boolean {\n const cached = DECLARES_SECTION_VISIBILITY.get(compiled);\n if (cached !== undefined) return cached;\n const visit = (node: LayoutNode): boolean => {\n if (node.kind === 'section' && node.visibleWhen !== undefined) return true;\n return 'children' in node ? node.children.some(visit) : false;\n };\n const declared = (compiled.layout ?? []).some(visit);\n DECLARES_SECTION_VISIBILITY.set(compiled, declared);\n return declared;\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import type { EvaluationState } from './rule/state.js';
2
+ import type { OptionAvailabilityBinding } from './state/snapshot.js';
3
+ /**
4
+ * Every declared option's availability, evaluated on the access-safe reader the rules use, after
5
+ * the writers have produced their values, `RULES-7.1.2`.
6
+ *
7
+ * A session states the declarations its change set could move and carries the others over, so the
8
+ * function takes the set of field ids this pass may have moved. An absent set evaluates every
9
+ * declaration: an open, a hydrate and an access or environment change state no narrower scope.
10
+ *
11
+ * The answer is keyed by the binding's runtime key, `fieldKey`, so a member of an array states
12
+ * one answer per row of the array that holds it. A condition is an Expr v1 boolean in the scope
13
+ * of the field that declares the option, so a row member's condition reads its own row through
14
+ * `$it` exactly as an item-scoped rule does.
15
+ *
16
+ * Three states, never two: a condition that decides neither way leaves the option undetermined,
17
+ * which is not available and is never silently blocked as an invalid code (`RULES-7.1.1`). A
18
+ * condition that raises, answers a non-boolean, or reads a value the report may not state is
19
+ * undetermined for the same reason the presentation channel answers `UNKNOWN` there: an answer
20
+ * derived from a withheld value would disclose it.
21
+ *
22
+ * The alternatives an unavailable option offers are evaluated only for the code the record holds
23
+ * (`RULES-7.1.4`), so the snapshot carries no alternative a host could offer by mistake.
24
+ */
25
+ export declare function evaluateOptionAvailability(state: EvaluationState, scope?: ReadonlySet<string>): ReadonlyMap<string, OptionAvailabilityBinding>;
26
+ //# sourceMappingURL=option-availability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option-availability.d.ts","sourceRoot":"","sources":["../../src/eval/option-availability.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,OAAO,KAAK,EAA4B,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,eAAe,EACtB,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC1B,WAAW,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAKhD"}