@templatical/ai-kit 0.51.1 → 0.52.0
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.
- package/dist/adapters/anthropic.d.ts +1 -3
- package/dist/adapters/anthropic.js +2 -3
- package/dist/adapters/openai.d.ts +1 -3
- package/dist/adapters/openai.js +2 -3
- package/dist/adapters/vercel.d.ts +1 -3
- package/dist/adapters/vercel.js +2 -3
- package/dist/{checks-DvLD3892.js → checks-B-TtaywP.js} +12 -22
- package/dist/{checks-DvLD3892.js.map → checks-B-TtaywP.js.map} +1 -1
- package/dist/client/index.d.ts +2 -6
- package/dist/client/index.js +2 -2
- package/dist/{errors-DWshWx18.js → errors-BtORdtK2.js} +3 -4
- package/dist/{errors-DWshWx18.js.map → errors-BtORdtK2.js.map} +1 -1
- package/dist/{http-provider-Cb41NXd5.d.ts → http-provider-B5riig95.d.ts} +1 -3
- package/dist/{http-provider-Cx2ZcLRB.js → http-provider-DLJYM4l8.js} +5 -7
- package/dist/{http-provider-Cx2ZcLRB.js.map → http-provider-DLJYM4l8.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{model-xJvGTfLB.d.ts → model-VqqOlLS2.d.ts} +1 -5
- package/dist/server/index.d.ts +2 -24
- package/dist/server/index.js +5 -8
- package/dist/server/index.js.map +1 -1
- package/dist/{shared-BuhccY6c.js → shared-DOEVSpBX.js} +4 -5
- package/dist/{shared-BuhccY6c.js.map → shared-DOEVSpBX.js.map} +1 -1
- package/dist/testing/index.d.ts +3 -15
- package/dist/testing/index.js +20 -35
- package/dist/testing/index.js.map +1 -1
- package/dist/{wire-Cv7Fk-7n.d.ts → wire-BJ4-EWvR.d.ts} +1 -3
- package/dist/{wire-B6AF_UGT.js → wire-cYO4W7GH.js} +2 -3
- package/dist/{wire-B6AF_UGT.js.map → wire-cYO4W7GH.js.map} +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire-B6AF_UGT.js","names":[],"sources":["../src/wire.ts"],"sourcesContent":["import type {\n AiAppliedBatch,\n AiAltTextRequest,\n AiChatMessage,\n AiChatAttachment,\n AiErrorCode,\n AiFixFinding,\n AiMergeTags,\n AiRewritePreset,\n Operation,\n TemplateContent,\n} from \"@templatical/types\";\n\n/** Sent as {@link AI_WIRE_HEADER} on every request and response. */\nexport const AI_WIRE_VERSION = \"1\";\nexport const AI_WIRE_HEADER = \"Templatical-AI-Wire\";\n/** The editor session, on turns, Undo, Redo and replay settlement. */\nexport const AI_SESSION_HEADER = \"X-Templatical-Session\";\n\nexport type AiRouteName =\n | \"generate\"\n | \"fixFinding\"\n | \"rewriteText\"\n | \"altText\"\n | \"conversationMessages\"\n | \"undoMessage\"\n | \"redoMessage\"\n | \"clearConversation\"\n | \"settleReplay\";\n\nexport interface AiRoute {\n method: \"GET\" | \"POST\" | \"DELETE\";\n /** Relative to the base URL the integrator chooses. */\n path: string;\n}\n\n/** The wire's routes (A1 §4). */\nexport const AI_ROUTES: Readonly<Record<AiRouteName, AiRoute>> = {\n generate: { method: \"POST\", path: \"/templates/{template}/ai/generate\" },\n fixFinding: { method: \"POST\", path: \"/templates/{template}/ai/fix-finding\" },\n rewriteText: {\n method: \"POST\",\n path: \"/templates/{template}/ai/rewrite-text\",\n },\n altText: { method: \"POST\", path: \"/templates/{template}/ai/alt-text\" },\n conversationMessages: {\n method: \"GET\",\n path: \"/templates/{template}/ai/conversation-messages\",\n },\n undoMessage: {\n method: \"POST\",\n path: \"/templates/{template}/ai/messages/{message}/undo\",\n },\n redoMessage: {\n method: \"POST\",\n path: \"/templates/{template}/ai/messages/{message}/redo\",\n },\n settleReplay: {\n method: \"POST\",\n path: \"/templates/{template}/ai/messages/{message}/replays/{replayId}\",\n },\n clearConversation: {\n method: \"DELETE\",\n path: \"/templates/{template}/ai/conversation\",\n },\n};\n\n/** A route's path with its ids filled in, each URI-encoded. */\nexport function aiRoutePath(\n route: AiRouteName,\n params: { template: string; message?: string; replayId?: string },\n): string {\n return AI_ROUTES[route].path.replace(\n /\\{(template|message|replayId)\\}/g,\n (_, key: \"template\" | \"message\" | \"replayId\") =>\n encodeURIComponent(params[key] ?? \"\"),\n );\n}\n\nexport interface AiRouteMatch {\n route: AiRouteName;\n template: string;\n message: string | null;\n replayId?: string;\n}\n\nconst MATCHERS = (Object.keys(AI_ROUTES) as AiRouteName[]).map((route) => ({\n route,\n method: AI_ROUTES[route].method,\n pattern: new RegExp(\n `${AI_ROUTES[route].path\n .replace(\"{template}\", \"([^/]+)\")\n .replace(\"{message}\", \"([^/]+)\")\n .replace(\"{replayId}\", \"([^/]+)\")}$`,\n ),\n hasMessage: AI_ROUTES[route].path.includes(\"{message}\"),\n}));\n\n/**\n * Which route a request is, whatever path the backend mounts the wire under:\n * the route must end the pathname. `null` for anything else.\n */\nexport function matchAiRoute(\n method: string,\n pathname: string,\n): AiRouteMatch | null {\n const upper = method.toUpperCase();\n for (const matcher of MATCHERS) {\n if (matcher.method !== upper) continue;\n const found = matcher.pattern.exec(pathname);\n if (!found) continue;\n try {\n return {\n route: matcher.route,\n template: decodeURIComponent(found[1]),\n message: matcher.hasMessage ? decodeURIComponent(found[2]) : null,\n ...(matcher.route === \"settleReplay\"\n ? { replayId: decodeURIComponent(found[3]) }\n : {}),\n };\n } catch (error) {\n if (error instanceof URIError) return null;\n throw error;\n }\n }\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Server-sent events: `data: {json}` lines, `: ping` comments\n// ---------------------------------------------------------------------------\n\n/** A chunk of the reply (chat, fix) or of the rewritten text. */\nexport interface AiTextEvent {\n type: \"text\";\n text: string;\n}\n\n/** Operations for the editor to apply (new in A1). */\nexport interface AiOperationsEvent {\n type: \"operations\";\n ops: Operation[];\n}\n\n/** A batch the backend applied to its copy of the template. */\nexport interface AiAppliedEvent extends AiAppliedBatch {\n type: \"applied\";\n}\n\n/** The last event of a successful stream: turns require `messageId`, or `null`\n * without history; rewrite requires `html`.\n */\nexport type AiDoneEvent = { type: \"done\" } & (\n | { messageId: string | null; html?: never; alt?: never }\n | { html: string; messageId?: never; alt?: never }\n | { alt: string; messageId?: never; html?: never }\n);\n\n/** The last event of a failed stream; other fields are the error's details. */\nexport interface AiErrorEvent {\n type: \"error\";\n code: string;\n message: string;\n [detail: string]: unknown;\n}\n\nexport type AiWireEvent =\n AiTextEvent | AiOperationsEvent | AiAppliedEvent | AiDoneEvent | AiErrorEvent;\n\n// ---------------------------------------------------------------------------\n// Request bodies\n// ---------------------------------------------------------------------------\n\nexport type AiAltTextBody = Omit<AiAltTextRequest, \"templateId\" | \"sessionId\">;\n\nexport interface AiGenerateBody {\n attachments: AiChatAttachment[];\n message: string;\n selectedBlockId: string | null;\n mergeTags: AiMergeTags;\n content: TemplateContent;\n revision: number | null;\n}\n\nexport interface AiFixFindingBody {\n finding: AiFixFinding;\n mergeTags: AiMergeTags;\n content: TemplateContent;\n revision: number | null;\n}\n\nexport interface AiRewriteBody {\n html: string;\n preset: AiRewritePreset | null;\n language: string | null;\n instruction: string | null;\n mergeTags: AiMergeTags;\n}\n\n/** The multipart fields of generate; mergeTags and content are JSON strings. */\nexport const AI_GENERATE_FIELDS = {\n message: \"message\",\n selectedBlockId: \"selectedBlockId\",\n mergeTags: \"mergeTags\",\n content: \"content\",\n revision: \"revision\",\n attachment: \"attachment\",\n} as const;\n\n/** `GET …/conversation-messages`. */\nexport interface AiConversationResponse {\n data: AiChatMessage[];\n}\n\n/** `POST …/messages/{m}/undo` and `…/redo`. */\nexport interface AiReplayResponse {\n data:\n | { operations: Operation[]; replayId: string }\n | { batchId: string; revision: number };\n}\n\n// ---------------------------------------------------------------------------\n// Errors and limits\n// ---------------------------------------------------------------------------\n\n/** The HTTP status each code answers with before a stream starts. */\nexport const AI_ERROR_STATUS: Readonly<Record<string, number>> = {\n feature_unavailable: 403,\n limit_reached: 403,\n rate_limited: 429,\n ai_turn_running: 409,\n content_too_large: 413,\n ai_output_invalid: 422,\n ai_provider_error: 502,\n not_found: 404,\n block_exists: 409,\n block_missing: 409,\n anchor_missing: 409,\n precondition_failed: 409,\n lock_held: 409,\n locked_by_others: 409,\n invalid_operation: 422,\n};\n\n/** Default messages, user-presentable, for the AI codes. */\nexport const AI_ERROR_MESSAGES: Readonly<Record<AiErrorCode, string>> = {\n feature_unavailable: \"This AI feature isn't available.\",\n limit_reached: \"You've used up your AI allowance for now.\",\n rate_limited: \"Too many AI requests. Try again in a moment.\",\n ai_turn_running: \"An AI request is already running on this template.\",\n content_too_large: \"This template is too large for AI.\",\n ai_output_invalid: \"The AI couldn't produce a valid result. Try again.\",\n ai_provider_error: \"AI is unavailable right now. Try again later.\",\n};\n\n/** The wire's request limits (S7 Y3), shared by the client and the kit. */\nexport const AI_LIMITS = {\n contentMaxBytes: 200_000,\n messageMaxChars: 4000,\n attachmentsMax: 4,\n attachmentMaxBytes: 5 * 1024 * 1024,\n attachmentsTotalMaxBytes: 10 * 1024 * 1024,\n rewriteHtmlMaxChars: 20_000,\n instructionMaxChars: 500,\n mergeTagsMax: 500,\n opsPerBatchMax: 100,\n} as const;\n"],"mappings":";;AAcA,MAAa,kBAAkB;AAC/B,MAAa,iBAAiB;;AAE9B,MAAa,oBAAoB;;AAoBjC,MAAa,YAAoD;CAC/D,UAAU;EAAE,QAAQ;EAAQ,MAAM;CAAoC;CACtE,YAAY;EAAE,QAAQ;EAAQ,MAAM;CAAuC;CAC3E,aAAa;EACX,QAAQ;EACR,MAAM;CACR;CACA,SAAS;EAAE,QAAQ;EAAQ,MAAM;CAAoC;CACrE,sBAAsB;EACpB,QAAQ;EACR,MAAM;CACR;CACA,aAAa;EACX,QAAQ;EACR,MAAM;CACR;CACA,aAAa;EACX,QAAQ;EACR,MAAM;CACR;CACA,cAAc;EACZ,QAAQ;EACR,MAAM;CACR;CACA,mBAAmB;EACjB,QAAQ;EACR,MAAM;CACR;AACF;;AAGA,SAAgB,YACd,OACA,QACQ;CACR,OAAO,UAAU,MAAM,CAAC,KAAK,QA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;CACf,cAAc;CACd,iBAAiB;CACjB,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;AACrB;;AAGA,MAAa,YAAY;CACvB,iBAAiB;CACjB,iBAAiB;CACjB,gBAAgB;CAChB,oBAAoB;CACpB,0BAA0B;CAC1B,qBAAqB;CACrB,qBAAqB;CACrB,cAAc;CACd,gBAAgB;AAClB"}
|
|
1
|
+
{"version":3,"file":"wire-cYO4W7GH.js","names":[],"sources":["../src/wire.ts"],"sourcesContent":["import type {\n AiAppliedBatch,\n AiAltTextRequest,\n AiChatMessage,\n AiChatAttachment,\n AiErrorCode,\n AiFixFinding,\n AiMergeTags,\n AiRewritePreset,\n Operation,\n TemplateContent,\n} from \"@templatical/types\";\n\n/** Sent as {@link AI_WIRE_HEADER} on every request and response. */\nexport const AI_WIRE_VERSION = \"1\";\nexport const AI_WIRE_HEADER = \"Templatical-AI-Wire\";\n/** The editor session, on turns, Undo, Redo and replay settlement. */\nexport const AI_SESSION_HEADER = \"X-Templatical-Session\";\n\nexport type AiRouteName =\n | \"generate\"\n | \"fixFinding\"\n | \"rewriteText\"\n | \"altText\"\n | \"conversationMessages\"\n | \"undoMessage\"\n | \"redoMessage\"\n | \"clearConversation\"\n | \"settleReplay\";\n\nexport interface AiRoute {\n method: \"GET\" | \"POST\" | \"DELETE\";\n /** Relative to the base URL the integrator chooses. */\n path: string;\n}\n\n/** The wire's routes (A1 §4). */\nexport const AI_ROUTES: Readonly<Record<AiRouteName, AiRoute>> = {\n generate: { method: \"POST\", path: \"/templates/{template}/ai/generate\" },\n fixFinding: { method: \"POST\", path: \"/templates/{template}/ai/fix-finding\" },\n rewriteText: {\n method: \"POST\",\n path: \"/templates/{template}/ai/rewrite-text\",\n },\n altText: { method: \"POST\", path: \"/templates/{template}/ai/alt-text\" },\n conversationMessages: {\n method: \"GET\",\n path: \"/templates/{template}/ai/conversation-messages\",\n },\n undoMessage: {\n method: \"POST\",\n path: \"/templates/{template}/ai/messages/{message}/undo\",\n },\n redoMessage: {\n method: \"POST\",\n path: \"/templates/{template}/ai/messages/{message}/redo\",\n },\n settleReplay: {\n method: \"POST\",\n path: \"/templates/{template}/ai/messages/{message}/replays/{replayId}\",\n },\n clearConversation: {\n method: \"DELETE\",\n path: \"/templates/{template}/ai/conversation\",\n },\n};\n\n/** A route's path with its ids filled in, each URI-encoded. */\nexport function aiRoutePath(\n route: AiRouteName,\n params: { template: string; message?: string; replayId?: string },\n): string {\n return AI_ROUTES[route].path.replace(\n /\\{(template|message|replayId)\\}/g,\n (_, key: \"template\" | \"message\" | \"replayId\") =>\n encodeURIComponent(params[key] ?? \"\"),\n );\n}\n\nexport interface AiRouteMatch {\n route: AiRouteName;\n template: string;\n message: string | null;\n replayId?: string;\n}\n\nconst MATCHERS = (Object.keys(AI_ROUTES) as AiRouteName[]).map((route) => ({\n route,\n method: AI_ROUTES[route].method,\n pattern: new RegExp(\n `${AI_ROUTES[route].path\n .replace(\"{template}\", \"([^/]+)\")\n .replace(\"{message}\", \"([^/]+)\")\n .replace(\"{replayId}\", \"([^/]+)\")}$`,\n ),\n hasMessage: AI_ROUTES[route].path.includes(\"{message}\"),\n}));\n\n/**\n * Which route a request is, whatever path the backend mounts the wire under:\n * the route must end the pathname. `null` for anything else.\n */\nexport function matchAiRoute(\n method: string,\n pathname: string,\n): AiRouteMatch | null {\n const upper = method.toUpperCase();\n for (const matcher of MATCHERS) {\n if (matcher.method !== upper) continue;\n const found = matcher.pattern.exec(pathname);\n if (!found) continue;\n try {\n return {\n route: matcher.route,\n template: decodeURIComponent(found[1]),\n message: matcher.hasMessage ? decodeURIComponent(found[2]) : null,\n ...(matcher.route === \"settleReplay\"\n ? { replayId: decodeURIComponent(found[3]) }\n : {}),\n };\n } catch (error) {\n if (error instanceof URIError) return null;\n throw error;\n }\n }\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Server-sent events: `data: {json}` lines, `: ping` comments\n// ---------------------------------------------------------------------------\n\n/** A chunk of the reply (chat, fix) or of the rewritten text. */\nexport interface AiTextEvent {\n type: \"text\";\n text: string;\n}\n\n/** Operations for the editor to apply (new in A1). */\nexport interface AiOperationsEvent {\n type: \"operations\";\n ops: Operation[];\n}\n\n/** A batch the backend applied to its copy of the template. */\nexport interface AiAppliedEvent extends AiAppliedBatch {\n type: \"applied\";\n}\n\n/** The last event of a successful stream: turns require `messageId`, or `null`\n * without history; rewrite requires `html`.\n */\nexport type AiDoneEvent = { type: \"done\" } & (\n | { messageId: string | null; html?: never; alt?: never }\n | { html: string; messageId?: never; alt?: never }\n | { alt: string; messageId?: never; html?: never }\n);\n\n/** The last event of a failed stream; other fields are the error's details. */\nexport interface AiErrorEvent {\n type: \"error\";\n code: string;\n message: string;\n [detail: string]: unknown;\n}\n\nexport type AiWireEvent =\n AiTextEvent | AiOperationsEvent | AiAppliedEvent | AiDoneEvent | AiErrorEvent;\n\n// ---------------------------------------------------------------------------\n// Request bodies\n// ---------------------------------------------------------------------------\n\nexport type AiAltTextBody = Omit<AiAltTextRequest, \"templateId\" | \"sessionId\">;\n\nexport interface AiGenerateBody {\n attachments: AiChatAttachment[];\n message: string;\n selectedBlockId: string | null;\n mergeTags: AiMergeTags;\n content: TemplateContent;\n revision: number | null;\n}\n\nexport interface AiFixFindingBody {\n finding: AiFixFinding;\n mergeTags: AiMergeTags;\n content: TemplateContent;\n revision: number | null;\n}\n\nexport interface AiRewriteBody {\n html: string;\n preset: AiRewritePreset | null;\n language: string | null;\n instruction: string | null;\n mergeTags: AiMergeTags;\n}\n\n/** The multipart fields of generate; mergeTags and content are JSON strings. */\nexport const AI_GENERATE_FIELDS = {\n message: \"message\",\n selectedBlockId: \"selectedBlockId\",\n mergeTags: \"mergeTags\",\n content: \"content\",\n revision: \"revision\",\n attachment: \"attachment\",\n} as const;\n\n/** `GET …/conversation-messages`. */\nexport interface AiConversationResponse {\n data: AiChatMessage[];\n}\n\n/** `POST …/messages/{m}/undo` and `…/redo`. */\nexport interface AiReplayResponse {\n data:\n | { operations: Operation[]; replayId: string }\n | { batchId: string; revision: number };\n}\n\n// ---------------------------------------------------------------------------\n// Errors and limits\n// ---------------------------------------------------------------------------\n\n/** The HTTP status each code answers with before a stream starts. */\nexport const AI_ERROR_STATUS: Readonly<Record<string, number>> = {\n feature_unavailable: 403,\n limit_reached: 403,\n rate_limited: 429,\n ai_turn_running: 409,\n content_too_large: 413,\n ai_output_invalid: 422,\n ai_provider_error: 502,\n not_found: 404,\n block_exists: 409,\n block_missing: 409,\n anchor_missing: 409,\n precondition_failed: 409,\n lock_held: 409,\n locked_by_others: 409,\n invalid_operation: 422,\n};\n\n/** Default messages, user-presentable, for the AI codes. */\nexport const AI_ERROR_MESSAGES: Readonly<Record<AiErrorCode, string>> = {\n feature_unavailable: \"This AI feature isn't available.\",\n limit_reached: \"You've used up your AI allowance for now.\",\n rate_limited: \"Too many AI requests. Try again in a moment.\",\n ai_turn_running: \"An AI request is already running on this template.\",\n content_too_large: \"This template is too large for AI.\",\n ai_output_invalid: \"The AI couldn't produce a valid result. Try again.\",\n ai_provider_error: \"AI is unavailable right now. Try again later.\",\n};\n\n/** The wire's request limits (S7 Y3), shared by the client and the kit. */\nexport const AI_LIMITS = {\n contentMaxBytes: 200_000,\n messageMaxChars: 4000,\n attachmentsMax: 4,\n attachmentMaxBytes: 5 * 1024 * 1024,\n attachmentsTotalMaxBytes: 10 * 1024 * 1024,\n rewriteHtmlMaxChars: 20_000,\n instructionMaxChars: 500,\n mergeTagsMax: 500,\n opsPerBatchMax: 100,\n} as const;\n"],"mappings":";;AAcA,MAAa,kBAAkB;AAC/B,MAAa,iBAAiB;;AAE9B,MAAa,oBAAoB;;AAoBjC,MAAa,YAAoD;CAC/D,UAAU;EAAE,QAAQ;EAAQ,MAAM;CAAoC;CACtE,YAAY;EAAE,QAAQ;EAAQ,MAAM;CAAuC;CAC3E,aAAa;EACX,QAAQ;EACR,MAAM;CACR;CACA,SAAS;EAAE,QAAQ;EAAQ,MAAM;CAAoC;CACrE,sBAAsB;EACpB,QAAQ;EACR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,qBAAqB;CACrB,eAAe;CACf,cAAc;CACd,iBAAiB;CACjB,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,WAAW;CACX,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,qBAAqB;CACrB,WAAW;CACX,kBAAkB;CAClB,mBAAmB;AACrB;;AAGA,MAAa,oBAA2D;CACtE,qBAAqB;CACrB,eAAe;CACf,cAAc;CACd,iBAAiB;CACjB,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;AACrB;;AAGA,MAAa,YAAY;CACvB,iBAAiB;CACjB,iBAAiB;CACjB,gBAAgB;CAChB,oBAAoB;CACpB,0BAA0B;CAC1B,qBAAqB;CACrB,qBAAqB;CACrB,cAAc;CACd,gBAAgB;AAClB"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@templatical/ai-kit",
|
|
3
3
|
"description": "Bring your own AI backend to the Templatical email editor: the wire, an HTTP provider, a server kit with prompts and tools, and a conformance suite",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.52.0",
|
|
5
5
|
"bugs": "https://github.com/templatical/sdk/issues",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@templatical/types": "0.
|
|
7
|
+
"@templatical/types": "0.52.0"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@anthropic-ai/sdk": "^1.
|
|
11
|
-
"@types/node": "^
|
|
12
|
-
"ai": "^7.0.
|
|
13
|
-
"openai": "^7.
|
|
10
|
+
"@anthropic-ai/sdk": "^1.3.0",
|
|
11
|
+
"@types/node": "^26.6.5",
|
|
12
|
+
"ai": "^7.0.156",
|
|
13
|
+
"openai": "^7.45.1",
|
|
14
14
|
"typescript": "^6.0.3",
|
|
15
15
|
"vitest": "^5.0.5"
|
|
16
16
|
},
|