@toa.io/extensions.exposition 1.0.0-alpha.286 → 1.0.0-alpha.288

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 (219) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/components/identity.basic/tsconfig.tsbuildinfo +1 -1
  3. package/components/identity.clients/tsconfig.tsbuildinfo +1 -1
  4. package/components/identity.credentials/tsconfig.tsbuildinfo +1 -1
  5. package/components/identity.federation/tsconfig.tsbuildinfo +1 -1
  6. package/components/identity.grants/tsconfig.tsbuildinfo +1 -1
  7. package/components/identity.keys/tsconfig.tsbuildinfo +1 -1
  8. package/components/identity.otp/tsconfig.tsbuildinfo +1 -1
  9. package/components/identity.passkeys/manifest.toa.yaml +2 -1
  10. package/components/identity.passkeys/source/errors.test.ts +34 -0
  11. package/components/identity.passkeys/source/webauthn.test.ts +26 -0
  12. package/components/identity.passkeys/tsconfig.tsbuildinfo +1 -1
  13. package/components/identity.passkeys/types/toa.d.ts +1 -1
  14. package/components/identity.tokens/tsconfig.tsbuildinfo +1 -1
  15. package/documentation/access.md +22 -4
  16. package/documentation/discovery.md +81 -0
  17. package/documentation/help.md +109 -0
  18. package/documentation/introspection.md +34 -9
  19. package/documentation/mcp.md +13 -16
  20. package/features/cors.feature +31 -1
  21. package/features/dev.feature +2 -0
  22. package/features/discovery.feature +211 -0
  23. package/features/discovery.ui.feature +197 -0
  24. package/features/help.feature +466 -0
  25. package/features/introspection.feature +94 -8
  26. package/features/map.feature +1 -0
  27. package/features/mcp.feature +74 -12
  28. package/features/methods.feature +2 -1
  29. package/features/oauth.grants.feature +3 -1
  30. package/features/octets.download.feature +1 -0
  31. package/features/octets.meta.feature +1 -0
  32. package/features/site/_app/immutable/asset.js +1 -0
  33. package/features/site/favicon.ico +0 -0
  34. package/features/site/index.html +10 -0
  35. package/features/steps/Parameters.ts +12 -0
  36. package/package.json +6 -4
  37. package/readme.md +3 -0
  38. package/source/Directive.ts +4 -0
  39. package/source/Discovery/Explorer.ts +34 -0
  40. package/source/Discovery/Site.test.ts +147 -0
  41. package/source/Discovery/Site.ts +202 -0
  42. package/source/Discovery/index.ts +3 -0
  43. package/source/Discovery/tree.test.ts +175 -0
  44. package/source/Discovery/tree.ts +77 -0
  45. package/source/Discovery/trunk.ts +23 -0
  46. package/source/Endpoint.ts +4 -0
  47. package/source/Gateway.ts +34 -4
  48. package/source/HTTP/Context.ts +7 -0
  49. package/source/Introspection.ts +33 -10
  50. package/source/MCP/schema.ts +16 -5
  51. package/source/MCP/tools.ts +14 -32
  52. package/source/Mapping.ts +5 -0
  53. package/source/Query.ts +17 -2
  54. package/source/RTD/Directives.ts +10 -0
  55. package/source/RTD/Endpoint.ts +8 -1
  56. package/source/RTD/Node.ts +20 -6
  57. package/source/RTD/Tree.ts +19 -9
  58. package/source/RTD/factory.ts +37 -1
  59. package/source/RTD/segment.ts +21 -0
  60. package/source/const.ts +8 -0
  61. package/source/directives/auth/Anonymous.test.ts +31 -5
  62. package/source/directives/auth/Anonymous.ts +5 -3
  63. package/source/directives/auth/Anyone.ts +6 -0
  64. package/source/directives/auth/Assert.ts +5 -0
  65. package/source/directives/auth/Delegate.ts +5 -2
  66. package/source/directives/auth/Federation.ts +11 -0
  67. package/source/directives/auth/Id.ts +15 -0
  68. package/source/directives/auth/Input.ts +5 -0
  69. package/source/directives/auth/Role.ts +17 -0
  70. package/source/directives/cors/CORS.test.ts +75 -0
  71. package/source/directives/cors/CORS.ts +10 -3
  72. package/source/directives/help/Family.ts +118 -0
  73. package/source/directives/help/Help.test.ts +227 -0
  74. package/source/directives/help/Help.ts +26 -0
  75. package/source/directives/help/Parameters.ts +47 -0
  76. package/source/directives/help/described.ts +57 -0
  77. package/source/directives/help/index.ts +45 -0
  78. package/source/directives/index.ts +8 -1
  79. package/source/directives/map/Headers.ts +6 -6
  80. package/source/directives/mcp/MCP.ts +12 -21
  81. package/source/directives/mcp/Tool.test.ts +22 -68
  82. package/source/directives/mcp/Tool.ts +14 -41
  83. package/transpiled/Directive.d.ts +1 -0
  84. package/transpiled/Directive.js +3 -0
  85. package/transpiled/Directive.js.map +1 -1
  86. package/transpiled/Discovery/Explorer.d.ts +11 -0
  87. package/transpiled/Discovery/Explorer.js +29 -0
  88. package/transpiled/Discovery/Explorer.js.map +1 -0
  89. package/transpiled/Discovery/Site.d.ts +43 -0
  90. package/transpiled/Discovery/Site.js +171 -0
  91. package/transpiled/Discovery/Site.js.map +1 -0
  92. package/transpiled/Discovery/index.d.ts +3 -0
  93. package/transpiled/Discovery/index.js +4 -0
  94. package/transpiled/Discovery/index.js.map +1 -0
  95. package/transpiled/Discovery/tree.d.ts +26 -0
  96. package/transpiled/Discovery/tree.js +50 -0
  97. package/transpiled/Discovery/tree.js.map +1 -0
  98. package/transpiled/Discovery/trunk.d.ts +10 -0
  99. package/transpiled/Discovery/trunk.js +21 -0
  100. package/transpiled/Discovery/trunk.js.map +1 -0
  101. package/transpiled/Endpoint.d.ts +2 -1
  102. package/transpiled/Endpoint.js +3 -0
  103. package/transpiled/Endpoint.js.map +1 -1
  104. package/transpiled/Gateway.d.ts +4 -0
  105. package/transpiled/Gateway.js +29 -4
  106. package/transpiled/Gateway.js.map +1 -1
  107. package/transpiled/HTTP/Context.d.ts +6 -0
  108. package/transpiled/HTTP/Context.js +6 -0
  109. package/transpiled/HTTP/Context.js.map +1 -1
  110. package/transpiled/Introspection.d.ts +18 -7
  111. package/transpiled/Introspection.js +16 -1
  112. package/transpiled/Introspection.js.map +1 -1
  113. package/transpiled/MCP/schema.d.ts +2 -2
  114. package/transpiled/MCP/schema.js +11 -5
  115. package/transpiled/MCP/schema.js.map +1 -1
  116. package/transpiled/MCP/tools.d.ts +1 -1
  117. package/transpiled/MCP/tools.js +12 -28
  118. package/transpiled/MCP/tools.js.map +1 -1
  119. package/transpiled/Mapping.d.ts +2 -0
  120. package/transpiled/Mapping.js +4 -0
  121. package/transpiled/Mapping.js.map +1 -1
  122. package/transpiled/Query.d.ts +12 -0
  123. package/transpiled/Query.js +16 -2
  124. package/transpiled/Query.js.map +1 -1
  125. package/transpiled/RTD/Directives.d.ts +8 -0
  126. package/transpiled/RTD/Endpoint.d.ts +7 -1
  127. package/transpiled/RTD/Node.d.ts +11 -2
  128. package/transpiled/RTD/Node.js +12 -2
  129. package/transpiled/RTD/Node.js.map +1 -1
  130. package/transpiled/RTD/Tree.js +15 -8
  131. package/transpiled/RTD/Tree.js.map +1 -1
  132. package/transpiled/RTD/factory.js +27 -1
  133. package/transpiled/RTD/factory.js.map +1 -1
  134. package/transpiled/RTD/segment.d.ts +7 -0
  135. package/transpiled/RTD/segment.js +17 -0
  136. package/transpiled/RTD/segment.js.map +1 -1
  137. package/transpiled/const.d.ts +7 -0
  138. package/transpiled/const.js +7 -0
  139. package/transpiled/const.js.map +1 -1
  140. package/transpiled/directives/auth/Anonymous.d.ts +4 -2
  141. package/transpiled/directives/auth/Anonymous.js +5 -3
  142. package/transpiled/directives/auth/Anonymous.js.map +1 -1
  143. package/transpiled/directives/auth/Anyone.d.ts +3 -0
  144. package/transpiled/directives/auth/Anyone.js +4 -0
  145. package/transpiled/directives/auth/Anyone.js.map +1 -1
  146. package/transpiled/directives/auth/Assert.d.ts +2 -0
  147. package/transpiled/directives/auth/Assert.js +4 -0
  148. package/transpiled/directives/auth/Assert.js.map +1 -1
  149. package/transpiled/directives/auth/Delegate.d.ts +4 -1
  150. package/transpiled/directives/auth/Delegate.js +5 -2
  151. package/transpiled/directives/auth/Delegate.js.map +1 -1
  152. package/transpiled/directives/auth/Federation.d.ts +5 -0
  153. package/transpiled/directives/auth/Federation.js +8 -0
  154. package/transpiled/directives/auth/Federation.js.map +1 -1
  155. package/transpiled/directives/auth/Id.d.ts +9 -0
  156. package/transpiled/directives/auth/Id.js +12 -0
  157. package/transpiled/directives/auth/Id.js.map +1 -1
  158. package/transpiled/directives/auth/Input.d.ts +2 -0
  159. package/transpiled/directives/auth/Input.js +4 -0
  160. package/transpiled/directives/auth/Input.js.map +1 -1
  161. package/transpiled/directives/auth/Role.d.ts +7 -0
  162. package/transpiled/directives/auth/Role.js +11 -0
  163. package/transpiled/directives/auth/Role.js.map +1 -1
  164. package/transpiled/directives/cors/CORS.js +9 -2
  165. package/transpiled/directives/cors/CORS.js.map +1 -1
  166. package/transpiled/directives/help/Family.d.ts +28 -0
  167. package/transpiled/directives/help/Family.js +79 -0
  168. package/transpiled/directives/help/Family.js.map +1 -0
  169. package/transpiled/directives/help/Help.d.ts +16 -0
  170. package/transpiled/directives/help/Help.js +22 -0
  171. package/transpiled/directives/help/Help.js.map +1 -0
  172. package/transpiled/directives/help/Parameters.d.ts +18 -0
  173. package/transpiled/directives/help/Parameters.js +34 -0
  174. package/transpiled/directives/help/Parameters.js.map +1 -0
  175. package/transpiled/directives/help/described.d.ts +16 -0
  176. package/transpiled/directives/help/described.js +23 -0
  177. package/transpiled/directives/help/described.js.map +1 -0
  178. package/transpiled/directives/help/index.d.ts +22 -0
  179. package/transpiled/directives/help/index.js +34 -0
  180. package/transpiled/directives/help/index.js.map +1 -0
  181. package/transpiled/directives/index.d.ts +4 -0
  182. package/transpiled/directives/index.js +8 -1
  183. package/transpiled/directives/index.js.map +1 -1
  184. package/transpiled/directives/map/Headers.d.ts +5 -0
  185. package/transpiled/directives/map/Headers.js +7 -5
  186. package/transpiled/directives/map/Headers.js.map +1 -1
  187. package/transpiled/directives/mcp/MCP.d.ts +8 -5
  188. package/transpiled/directives/mcp/MCP.js +9 -13
  189. package/transpiled/directives/mcp/MCP.js.map +1 -1
  190. package/transpiled/directives/mcp/Tool.d.ts +6 -12
  191. package/transpiled/directives/mcp/Tool.js +10 -23
  192. package/transpiled/directives/mcp/Tool.js.map +1 -1
  193. package/tsconfig.tsbuildinfo +1 -1
  194. package/ui/dist/_app/env.js +1 -0
  195. package/ui/dist/_app/immutable/assets/0.BcIGtTfw.css +2 -0
  196. package/ui/dist/_app/immutable/assets/2.BC0-Jhqu.css +1 -0
  197. package/ui/dist/_app/immutable/assets/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2 +0 -0
  198. package/ui/dist/_app/immutable/assets/inter-cyrillic-wght-normal.DqGufNeO.woff2 +0 -0
  199. package/ui/dist/_app/immutable/assets/inter-greek-ext-wght-normal.DlzME5K_.woff2 +0 -0
  200. package/ui/dist/_app/immutable/assets/inter-greek-wght-normal.CkhJZR-_.woff2 +0 -0
  201. package/ui/dist/_app/immutable/assets/inter-latin-ext-wght-normal.DO1Apj_S.woff2 +0 -0
  202. package/ui/dist/_app/immutable/assets/inter-latin-wght-normal.Dx4kXJAl.woff2 +0 -0
  203. package/ui/dist/_app/immutable/assets/inter-vietnamese-wght-normal.CBcvBZtf.woff2 +0 -0
  204. package/ui/dist/_app/immutable/chunks/BgTrzN6u.js +1 -0
  205. package/ui/dist/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  206. package/ui/dist/_app/immutable/chunks/CWJaG9mK.js +6 -0
  207. package/ui/dist/_app/immutable/chunks/DjIYL2zC.js +3 -0
  208. package/ui/dist/_app/immutable/chunks/xihTtKlq.js +1 -0
  209. package/ui/dist/_app/immutable/chunks/yDQhitF9.js +1 -0
  210. package/ui/dist/_app/immutable/entry/app.WZSMBcGf.js +2 -0
  211. package/ui/dist/_app/immutable/entry/start._LkoC6Lz.js +1 -0
  212. package/ui/dist/_app/immutable/nodes/0.Dl2DqINo.js +1 -0
  213. package/ui/dist/_app/immutable/nodes/1.CSSnGhVD.js +1 -0
  214. package/ui/dist/_app/immutable/nodes/2.DmolQyNG.js +14 -0
  215. package/ui/dist/_app/version.json +1 -0
  216. package/ui/dist/apple-touch-icon.png +0 -0
  217. package/ui/dist/favicon-96x96.png +0 -0
  218. package/ui/dist/favicon.ico +0 -0
  219. package/ui/dist/index.html +66 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Headers.js","sourceRoot":"","sources":["../../../source/directives/map/Headers.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,I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,CACtC,CAAC,UAAkC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE;YACzD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YAE7C,IAAI,KAAK,KAAK,SAAS;gBACrB,UAAU,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;YAExE,OAAO,UAAU,CAAA;QACnB,CAAC,EACD,EAAE,CACH,CAAA;IACH,CAAC;CACF"}
@@ -1,15 +1,18 @@
1
1
  import { Tool } from './Tool.js';
2
+ import type { DirectiveFamily } from '../../RTD/index.js';
2
3
  import type { Context } from '../../HTTP/index.js';
3
4
  import type { Introspection } from '../../Introspection.js';
4
- import type { DirectiveFamily } from '../../RTD/index.js';
5
5
  /** The name the family is declared under, and what `MCP` asks a method for. */
6
6
  export declare const FAMILY = "mcp";
7
7
  export declare class MCP implements DirectiveFamily<Tool> {
8
8
  readonly name = "mcp";
9
9
  readonly mandatory = false;
10
- /** What this method is published as, which is what the nearest declaration says. */
11
- static published(directives: Tool[] | undefined): Tool | null;
12
- create(name: string, value: unknown, _: unknown, route: string): Tool;
13
- /** What the route states this method is, which is the only thing that states it. */
10
+ /** Whether this method is published, which is what the nearest declaration says. */
11
+ static published(directives: Tool[] | undefined): boolean;
12
+ /**
13
+ * Whether this method is published to a model, which is what the route declares. Whether
14
+ * one is served at all is the annotation's, and a route says nothing of that.
15
+ */
14
16
  explain(directives: Tool[], _: Context, introspection: Introspection): Introspection;
17
+ create(name: string, value: unknown, _: unknown, route: string): Tool;
15
18
  }
@@ -5,25 +5,21 @@ export const FAMILY = 'mcp';
5
5
  export class MCP {
6
6
  name = FAMILY;
7
7
  mandatory = false;
8
- /** What this method is published as, which is what the nearest declaration says. */
8
+ /** Whether this method is published, which is what the nearest declaration says. */
9
9
  static published(directives) {
10
- return directives?.[0] ?? null;
10
+ return directives?.[0]?.published ?? false;
11
+ }
12
+ /**
13
+ * Whether this method is published to a model, which is what the route declares. Whether
14
+ * one is served at all is the annotation's, and a route says nothing of that.
15
+ */
16
+ explain(directives, _, introspection) {
17
+ return MCP.published(directives) ? { ...introspection, mcp: true } : introspection;
11
18
  }
12
19
  // eslint-disable-next-line max-params
13
20
  create(name, value, _, route) {
14
21
  assert.ok(name === 'tool', `Unknown directive: mcp:${name}`);
15
22
  return new Tool(value, route);
16
23
  }
17
- /** What the route states this method is, which is the only thing that states it. */
18
- explain(directives, _, introspection) {
19
- const tool = MCP.published(directives);
20
- if (tool === null)
21
- return introspection;
22
- return {
23
- ...introspection,
24
- description: tool.description,
25
- ...(tool.title === undefined ? {} : { title: tool.title })
26
- };
27
- }
28
24
  }
29
25
  //# sourceMappingURL=MCP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MCP.js","sourceRoot":"","sources":["../../../source/directives/mcp/MCP.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAKhC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAA;AAE3B,MAAM,OAAO,GAAG;IACE,IAAI,GAAG,MAAM,CAAA;IACb,SAAS,GAAG,KAAK,CAAA;IAEjC,oFAAoF;IAC7E,MAAM,CAAC,SAAS,CAAC,UAA8B;QACpD,OAAO,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;IAChC,CAAC;IAED,sCAAsC;IAC/B,MAAM,CAAC,IAAY,EAAE,KAAc,EAAE,CAAU,EAAE,KAAa;QACnE,MAAM,CAAC,EAAE,CAAC,IAAI,KAAK,MAAM,EAAE,0BAA0B,IAAI,EAAE,CAAC,CAAA;QAE5D,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IAC/B,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B,IAAI,EAAE,CAAC,CAAA;QAE5D,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IAC/B,CAAC;CACF"}
@@ -1,18 +1,12 @@
1
1
  /**
2
- * What one method is, published to a model. Declaring it is what publishes it, and what it
3
- * says is what it says it is: a tool a model cannot read the purpose of is one it cannot
4
- * choose, so there is no way to publish one that states nothing.
2
+ * Whether one method is published to a model. Declaring it is what publishes it, and it
3
+ * says nothing else — what a tool is, is [`help:method`](../help/Help.ts), which is what
4
+ * describes the method to everything else as well.
5
5
  *
6
- * A `title` is what a person is shown where a client lists what it may call — a name is an
7
- * address and reads as one. A description alone is written as the value; both are written as
8
- * a mapping.
9
- *
10
- * The operation states what it is too, and that is not this. An operation is written without
11
- * knowledge of any route, and a tool is an operation and a route together — the same
12
- * operation mounted twice is two tools, and one sentence is not true of both.
6
+ * `false` withdraws one: the declaration is inherited, as every directive is, and a node
7
+ * publishing what is under it is how a subtree is published at all.
13
8
  */
14
9
  export declare class Tool {
15
- readonly description: string;
16
- readonly title: string | undefined;
10
+ readonly published: boolean;
17
11
  constructor(value: unknown, route: string);
18
12
  }
@@ -2,35 +2,22 @@ import assert from 'node:assert';
2
2
  import { refusal } from '../../RPC/names.js';
3
3
  import { segment } from '../../RTD/segment.js';
4
4
  /**
5
- * What one method is, published to a model. Declaring it is what publishes it, and what it
6
- * says is what it says it is: a tool a model cannot read the purpose of is one it cannot
7
- * choose, so there is no way to publish one that states nothing.
5
+ * Whether one method is published to a model. Declaring it is what publishes it, and it
6
+ * says nothing else — what a tool is, is [`help:method`](../help/Help.ts), which is what
7
+ * describes the method to everything else as well.
8
8
  *
9
- * A `title` is what a person is shown where a client lists what it may call — a name is an
10
- * address and reads as one. A description alone is written as the value; both are written as
11
- * a mapping.
12
- *
13
- * The operation states what it is too, and that is not this. An operation is written without
14
- * knowledge of any route, and a tool is an operation and a route together — the same
15
- * operation mounted twice is two tools, and one sentence is not true of both.
9
+ * `false` withdraws one: the declaration is inherited, as every directive is, and a node
10
+ * publishing what is under it is how a subtree is published at all.
16
11
  */
17
12
  export class Tool {
18
- description;
19
- title;
13
+ published;
20
14
  constructor(value, route) {
21
- const stated = typeof value === 'string' ? { description: value } : value;
22
- assert.ok(typeof stated === 'object' && stated !== null && !Array.isArray(stated), 'Directive mcp:tool: the value is what the tool is, or a `title` and a `description`');
23
- const { description, title, ...rest } = stated;
24
- assert.ok(Object.keys(rest).length === 0, `Directive mcp:tool: unknown ${Object.keys(rest)
25
- .map((key) => `'${key}'`)
26
- .join(', ')}`);
27
- assert.ok(typeof description === 'string' && description.trim().length > 0, 'Directive mcp:tool: a description cannot be empty');
28
- assert.ok(title === undefined || (typeof title === 'string' && title.trim().length > 0), 'Directive mcp:tool: a title cannot be empty');
15
+ assert.ok(typeof value === 'boolean', 'Directive mcp:tool: the value is whether the method is published; what it is, is `help:method`');
29
16
  // a tool is called by name, so a route that cannot be named cannot be one — said where
30
17
  // the mistake is, rather than as a tool that is quietly never listed
31
- assert.ok(refusal(segment(route)) === null, `Directive mcp:tool: '${route}' holds a segment no tool name can spell`);
32
- this.description = description;
33
- this.title = title;
18
+ if (value)
19
+ assert.ok(refusal(segment(route)) === null, `Directive mcp:tool: '${route}' holds a segment no tool name can spell`);
20
+ this.published = value;
34
21
  }
35
22
  }
36
23
  //# sourceMappingURL=Tool.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tool.js","sourceRoot":"","sources":["../../../source/directives/mcp/Tool.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,IAAI;IACC,WAAW,CAAQ;IACnB,KAAK,CAAoB;IAEzC,YAAmB,KAAc,EAAE,KAAa;QAC9C,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,Q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