@arisutalk/character-spec 0.0.0 → 0.0.1

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 (46) hide show
  1. package/LICENSE +202 -202
  2. package/README.md +152 -64
  3. package/dist/index.d.ts +15 -166
  4. package/dist/index.js +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/v0/Character/Assets.d.ts +30 -0
  7. package/dist/v0/Character/Assets.js +21 -0
  8. package/dist/v0/Character/Assets.js.map +1 -0
  9. package/dist/v0/Character/Character.d.ts +242 -0
  10. package/dist/v0/Character/Character.js +42 -0
  11. package/dist/v0/Character/Character.js.map +1 -0
  12. package/dist/v0/Character/Chat.d.ts +73 -0
  13. package/dist/v0/Character/Chat.js +19 -0
  14. package/dist/v0/Character/Chat.js.map +1 -0
  15. package/dist/v0/Character/Lorebook.d.ts +98 -0
  16. package/dist/v0/Character/Lorebook.js +68 -0
  17. package/dist/v0/Character/Lorebook.js.map +1 -0
  18. package/dist/v0/Character/Message.d.ts +32 -0
  19. package/dist/v0/Character/Message.js +34 -0
  20. package/dist/v0/Character/Message.js.map +1 -0
  21. package/dist/v0/Character/Meta.js +22 -0
  22. package/dist/v0/Character/Meta.js.map +1 -0
  23. package/dist/v0/Character/index.d.ts +6 -0
  24. package/dist/v0/Character.d.ts +6 -0
  25. package/dist/v0/Character.js +19 -0
  26. package/dist/v0/Character.js.map +1 -0
  27. package/dist/v0/Executables/Executable.d.ts +120 -0
  28. package/dist/v0/Executables/Executable.js +21 -0
  29. package/dist/v0/Executables/Executable.js.map +1 -0
  30. package/dist/v0/Executables/ReplaceHook.d.ts +161 -0
  31. package/dist/v0/Executables/ReplaceHook.js +57 -0
  32. package/dist/v0/Executables/ReplaceHook.js.map +1 -0
  33. package/dist/v0/Executables/index.d.ts +3 -0
  34. package/dist/v0/Executables.d.ts +3 -0
  35. package/dist/v0/Executables.js +9 -0
  36. package/dist/v0/Executables.js.map +1 -0
  37. package/dist/v0/index.d.ts +2 -0
  38. package/dist/v0/utils.d.ts +11 -0
  39. package/dist/v0/utils.js +14 -0
  40. package/dist/v0/utils.js.map +1 -0
  41. package/dist/v0.d.ts +2 -507
  42. package/dist/v0.js +4 -96
  43. package/dist/v0.js.map +1 -1
  44. package/package.json +13 -11
  45. package/dist/Character-Didq99iq.js +0 -157
  46. package/dist/Character-Didq99iq.js.map +0 -1
package/dist/v0.js CHANGED
@@ -1,99 +1,7 @@
1
- import { a as s, C as l, b as c, c as m, d as p, L as b } from "./Character-Didq99iq.js";
2
- import * as e from "valibot";
3
- const a = e.union([
4
- e.literal("user"),
5
- e.literal("assistant"),
6
- e.literal("system")
7
- ]), t = {
8
- text: e.object({
9
- /**
10
- * string: The message content is a simple string.
11
- */
12
- type: e.literal("string"),
13
- /**
14
- * The message content.
15
- */
16
- data: e.string()
17
- }),
18
- file: e.object({
19
- /**
20
- * file: The file content is stored in the separated storage.
21
- */
22
- type: e.literal("file"),
23
- /**
24
- * URL of the file. May be absolute or relative, or even uuid.
25
- * Client should handle the actual file loading.
26
- * Don't use base64 encoded file. Instead, use with type:"inline_file".
27
- */
28
- data: e.string(),
29
- /**
30
- * MIME type of the file.
31
- */
32
- mimeType: e.string()
33
- }),
34
- inline_file: e.object({
35
- /**
36
- * inline_file: The file content is embedded in the message.
37
- */
38
- type: e.literal("inline_file"),
39
- /**
40
- * File content. May be base64 encoded or file, or blob.
41
- * It's good to use url with type:"file" instead, to avoid getting too large message.
42
- */
43
- data: e.union([e.file(), e.pipe(e.string(), e.base64()), e.blob()]),
44
- /**
45
- * MIME type of the file.
46
- */
47
- mimeType: e.string()
48
- })
49
- }, i = e.object({
50
- /** Unique identifier for the message. */
51
- id: e.string(),
52
- /** The role of the message sender. */
53
- role: a,
54
- /** The content of the message. */
55
- content: e.variant("type", [
56
- t.text,
57
- t.file,
58
- t.inline_file
59
- ]),
60
- /** The timestamp when the message was created. */
61
- timestamp: e.optional(e.number())
62
- }), o = e.object({
63
- /**
64
- * Unique identifier for the chat session.
65
- */
66
- id: e.string(),
67
- /**
68
- * The ID of the character associated with this chat.
69
- */
70
- characterId: e.string(),
71
- /**
72
- * The list of messages in this chat.
73
- */
74
- messages: e.array(i),
75
- /**
76
- * Optional title for the chat.
77
- */
78
- title: e.optional(e.string()),
79
- /**
80
- * creation timestamp(unix epoch)
81
- */
82
- createdAt: e.optional(e.number(), Date.now),
83
- /**
84
- * Last updated timestamp(unix epoch)
85
- */
86
- updatedAt: e.optional(e.number(), Date.now)
87
- });
1
+ import { ImageURLSchema as m, positiveInteger as o, unique as r } from "./v0/utils.js";
88
2
  export {
89
- s as CharacterPromptDataSchema,
90
- l as CharacterSchema,
91
- o as ChatSchema,
92
- c as LorebookConditionDetailSchema,
93
- m as LorebookConditionSchema,
94
- p as LorebookDataSchema,
95
- b as LorebookEntrySchema,
96
- i as MessageSchema,
97
- a as RoleSchema
3
+ m as ImageURLSchema,
4
+ o as positiveInteger,
5
+ r as unique
98
6
  };
99
7
  //# sourceMappingURL=v0.js.map
package/dist/v0.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v0.js","sources":["../src/types/v0/Message.ts","../src/types/v0/Chat.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Represents the role of the message sender.\n */\nexport const RoleSchema = v.union([\n v.literal(\"user\"),\n v.literal(\"assistant\"),\n v.literal(\"system\"),\n]);\n\nconst MessageContentSchema = {\n text: v.object({\n /**\n * string: The message content is a simple string.\n */\n type: v.literal(\"string\"),\n /**\n * The message content.\n */\n data: v.string(),\n }),\n file: v.object({\n /**\n * file: The file content is stored in the separated storage.\n */\n type: v.literal(\"file\"),\n /**\n * URL of the file. May be absolute or relative, or even uuid.\n * Client should handle the actual file loading.\n * Don't use base64 encoded file. Instead, use with type:\"inline_file\".\n */\n data: v.string(),\n /**\n * MIME type of the file.\n */\n mimeType: v.string(),\n }),\n inline_file: v.object({\n /**\n * inline_file: The file content is embedded in the message.\n */\n type: v.literal(\"inline_file\"),\n /**\n * File content. May be base64 encoded or file, or blob.\n * It's good to use url with type:\"file\" instead, to avoid getting too large message.\n */\n data: v.union([v.file(), v.pipe(v.string(), v.base64()), v.blob()]),\n /**\n * MIME type of the file.\n */\n mimeType: v.string(),\n }),\n};\n\n/**\n * @see {@link Message}\n */\nexport const MessageSchema = v.object({\n /** Unique identifier for the message. */\n id: v.string(),\n /** The role of the message sender. */\n role: RoleSchema,\n /** The content of the message. */\n content: v.variant(\"type\", [\n MessageContentSchema.text,\n MessageContentSchema.file,\n MessageContentSchema.inline_file,\n ]),\n /** The timestamp when the message was created. */\n timestamp: v.optional(v.number()),\n});\n\n/**\n * Represents a single message in a chat history.\n */\nexport type Message = v.InferOutput<typeof MessageSchema>;\n","import * as v from \"valibot\";\nimport { MessageSchema } from \"@/types/v0/Message\";\n\n/**\n * @see {@link Chat}\n */\nexport const ChatSchema = v.object({\n /**\n * Unique identifier for the chat session.\n */\n id: v.string(),\n /**\n * The ID of the character associated with this chat.\n */\n characterId: v.string(),\n /**\n * The list of messages in this chat.\n */\n messages: v.array(MessageSchema),\n /**\n * Optional title for the chat.\n */\n title: v.optional(v.string()),\n /**\n * creation timestamp(unix epoch)\n */\n createdAt: v.optional(v.number(), Date.now),\n /**\n * Last updated timestamp(unix epoch)\n */\n updatedAt: v.optional(v.number(), Date.now),\n});\n\n/**\n * Represents a chat session with a character.\n */\nexport type Chat = v.InferOutput<typeof ChatSchema>;\n"],"names":["RoleSchema","v","MessageContentSchema","MessageSchema","ChatSchema"],"mappings":";;AAKO,MAAMA,IAAaC,EAAE,MAAM;AAAA,EAC9BA,EAAE,QAAQ,MAAM;AAAA,EAChBA,EAAE,QAAQ,WAAW;AAAA,EACrBA,EAAE,QAAQ,QAAQ;AACtB,CAAC,GAEKC,IAAuB;AAAA,EACzB,MAAMD,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,IAIX,MAAMA,EAAE,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA,IAIxB,MAAMA,EAAE,O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AAU,KAAK,GAAG;AAC9C,CAAC;"}
1
+ {"version":3,"file":"v0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arisutalk/character-spec",
3
3
  "description": "Character specification, schema & migration for ArisuTalk",
4
- "version": "0.0.0",
4
+ "version": "0.0.1",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "concertypin",
@@ -23,33 +23,35 @@
23
23
  ],
24
24
  "type": "module",
25
25
  "scripts": {
26
- "build": "vite build",
26
+ "build": "vite build && pnpm generate-types",
27
+ "generate-types": "tsx scripts/generate-types.ts",
27
28
  "prepare": "pnpm exec simple-git-hooks",
28
29
  "format": "biome format --write .",
29
30
  "lint": "biome check ."
30
31
  },
31
32
  "peerDependencies": {
32
- "valibot": "^1.2.0"
33
+ "zod": "^4.1.13"
33
34
  },
34
35
  "devDependencies": {
35
36
  "@biomejs/biome": "^2.3.5",
36
37
  "lint-staged": "^16.2.6",
37
38
  "simple-git-hooks": "^2.13.1",
38
- "typescript": "^5.9.3",
39
- "valibot": "^1.2.0",
39
+ "tsx": "^4.19.2",
40
+ "typescript": "~5.9.3",
40
41
  "vite": "^6.4.1",
41
- "vite-plugin-dts": "^4.5.4",
42
- "vite-tsconfig-paths": "^5.1.4"
42
+ "vite-tsconfig-paths": "^5.1.4",
43
+ "zod": "^4.1.13",
44
+ "zod-to-ts": "^2.0.0"
43
45
  },
44
46
  "exports": {
45
47
  ".": {
46
48
  "import": "./dist/index.js",
47
49
  "types": "./dist/index.d.ts"
48
50
  },
49
- "./v0": {
50
- "import": "./dist/v0.js",
51
- "types": "./dist/v0.d.ts"
51
+ "./*": {
52
+ "import": "./dist/*.js",
53
+ "types": "./dist/*.d.ts"
52
54
  }
53
55
  },
54
56
  "packageManager": "pnpm@10.16.1+sha512.0e155aa2629db8672b49e8475da6226aa4bdea85fdcdfdc15350874946d4f3c91faaf64cbdc4a5d1ab8002f473d5c3fcedcd197989cf0390f9badd3c04678706"
55
- }
57
+ }
@@ -1,157 +0,0 @@
1
- import * as t from "valibot";
2
- const i = t.object({
3
- /**
4
- * Internally generated ID.
5
- */
6
- id: t.optional(t.string()),
7
- /**
8
- * Human readable name for the lorebook.
9
- */
10
- name: t.string(),
11
- /**
12
- * The condition for the lorebook to be activated.
13
- * If empty, it will not be activated.
14
- * Duplicated condition is no effect.
15
- * Use 'always' to activate without any condition. {@link LorebookConditionTypeMap#always}
16
- */
17
- condition: t.optional(t.array(t.custom(() => !0))),
18
- /**
19
- * The strategy for resolving multiple conditions.
20
- * "all" means all conditions must be met.
21
- * "any" means at least one condition must be met.
22
- */
23
- multipleConditionResolveStrategy: t.optional(t.picklist(["all", "any"])),
24
- /**
25
- * The lorebook content to be added on AI prompt.
26
- * Not for human reading, and it's scriptable.
27
- */
28
- content: t.string(),
29
- /**
30
- * The priority of the lorebook.
31
- * Higher priority means it will be activated first, remains when token limit is exceeded.
32
- * May be negative. Base is 0. Allows demical.
33
- */
34
- priority: t.optional(t.number()),
35
- /**
36
- * Whether the lorebook is enabled.
37
- */
38
- enabled: t.optional(t.boolean())
39
- }), o = {
40
- regex: t.object({
41
- /**
42
- * The type of the condition.
43
- * This condition matches the regex pattern.
44
- */
45
- type: t.literal("regex_match"),
46
- /**
47
- * The regex pattern to match.
48
- * Note that this is scriptable.
49
- */
50
- regexPattern: t.string(),
51
- /**
52
- * The regex flags to use.
53
- * Note that this is not scriptable.
54
- */
55
- regexFlags: t.optional(t.string())
56
- }),
57
- plainText: t.object({
58
- /**
59
- * The type of the condition.
60
- * This condition simply matches the text.
61
- */
62
- type: t.literal("plain_text_match"),
63
- /**
64
- * The text to match.
65
- * Note that this is scriptable.
66
- * No case sensitive.
67
- */
68
- text: t.string()
69
- }),
70
- always: t.object({
71
- /**
72
- * The type of the condition.
73
- * This condition is always true.
74
- */
75
- type: t.literal("always")
76
- })
77
- }, l = t.variant("type", [
78
- o.regex,
79
- o.plainText,
80
- o.always
81
- ]), n = t.object({
82
- /**
83
- * The configuration for the lorebook.
84
- * It is not scriptable.
85
- */
86
- config: t.object({
87
- /**
88
- * The token limit for the lorebook.
89
- * When the token limit is exceeded, some low-priority lorebooks will be deactivated to keep the token usage within the limit.
90
- * Positive integer.
91
- */
92
- tokenLimit: t.pipe(t.number(), t.integer(), t.minValue(1))
93
- }),
94
- /**
95
- * Contains the actual lorebooks.
96
- * Duplicated id is not allowed.
97
- */
98
- data: t.optional(
99
- t.pipe(
100
- t.array(i),
101
- t.check(
102
- (a) => a.map((e) => e.id).length === new Set(a.map((e) => e.id)).size,
103
- "Duplicated id is not allowed."
104
- )
105
- ),
106
- []
107
- )
108
- }), r = t.object({
109
- /**
110
- * The character description.
111
- */
112
- description: t.string(),
113
- /**
114
- * The authors note. It's usually used to mock the user's message(differ by prompt).
115
- */
116
- authorsNote: t.string(),
117
- /**
118
- * Lorebook data.
119
- * @see {@link LorebookDataSchema}
120
- */
121
- lorebook: n
122
- }), s = t.object({
123
- /**
124
- * The version of the character spec.
125
- * This is used to determine which schema to use for parsing.
126
- * Also tries to migrate the character to the latest version.
127
- */
128
- specVersion: t.literal(0),
129
- /**
130
- * Unique identifier for the character.
131
- */
132
- id: t.string(),
133
- /**
134
- * The display name of the character.
135
- * Human readable, not scriptable.
136
- */
137
- name: t.string(),
138
- /**
139
- * A short description of the character.
140
- * Human readable, not scriptable.
141
- */
142
- description: t.string(),
143
- /**
144
- * Optional URL for the character's avatar image.
145
- */
146
- avatarUrl: t.optional(t.pipe(t.string(), t.url())),
147
- prompt: r
148
- });
149
- export {
150
- s as C,
151
- i as L,
152
- r as a,
153
- o as b,
154
- l as c,
155
- n as d
156
- };
157
- //# sourceMappingURL=Character-Didq99iq.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Character-Didq99iq.js","sources":["../src/types/v0/Lorebook.ts","../src/types/v0/Character.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * @see {@link LorebookEntry}\n */\nexport const LorebookEntrySchema = v.object({\n /**\n * Internally generated ID.\n */\n id: v.optional(v.string()),\n /**\n * Human readable name for the lorebook.\n */\n name: v.string(),\n /**\n * The condition for the lorebook to be activated.\n * If empty, it will not be activated.\n * Duplicated condition is no effect.\n * Use 'always' to activate without any condition. {@link LorebookConditionTypeMap#always}\n */\n condition: v.optional(v.array(v.custom<LorebookCondition>(() => true))),\n /**\n * The strategy for resolving multiple conditions.\n * \"all\" means all conditions must be met.\n * \"any\" means at least one condition must be met.\n */\n multipleConditionResolveStrategy: v.optional(v.picklist([\"all\", \"any\"])),\n /**\n * The lorebook content to be added on AI prompt.\n * Not for human reading, and it's scriptable.\n */\n content: v.string(),\n /**\n * The priority of the lorebook.\n * Higher priority means it will be activated first, remains when token limit is exceeded.\n * May be negative. Base is 0. Allows demical.\n */\n priority: v.optional(v.number()),\n /**\n * Whether the lorebook is enabled.\n */\n enabled: v.optional(v.boolean()),\n});\n/**\n * A lorebook is a collection of lorebooks.\n * Lorebook is a small part of prompts which is activated by session's text matching.\n */\nexport type LorebookEntry = v.InferOutput<typeof LorebookEntrySchema>;\n\n/**\n * @see {@link LorebookConditionSchema}\n */\nexport const LorebookConditionDetailSchema = {\n regex: v.object({\n /**\n * The type of the condition.\n * This condition matches the regex pattern.\n */\n type: v.literal(\"regex_match\"),\n /**\n * The regex pattern to match.\n * Note that this is scriptable.\n */\n regexPattern: v.string(),\n /**\n * The regex flags to use.\n * Note that this is not scriptable.\n */\n regexFlags: v.optional(v.string()),\n }),\n plainText: v.object({\n /**\n * The type of the condition.\n * This condition simply matches the text.\n */\n type: v.literal(\"plain_text_match\"),\n /**\n * The text to match.\n * Note that this is scriptable.\n * No case sensitive.\n */\n text: v.string(),\n }),\n always: v.object({\n /**\n * The type of the condition.\n * This condition is always true.\n */\n type: v.literal(\"always\"),\n }),\n} as const;\n\n/**\n * The condition for the lorebook to be activated.\n */\nexport const LorebookConditionSchema = v.variant(\"type\", [\n LorebookConditionDetailSchema.regex,\n LorebookConditionDetailSchema.plainText,\n LorebookConditionDetailSchema.always,\n]);\n\n/**\n * The condition for the lorebook to be activated.\n * @see {@link LorebookConditionSchema}\n */\nexport type LorebookCondition = v.InferOutput<typeof LorebookConditionSchema>;\n\n/**\n * @see {@link LorebookData}\n */\nexport const LorebookDataSchema = v.object({\n /**\n * The configuration for the lorebook.\n * It is not scriptable.\n */\n config: v.object({\n /**\n * The token limit for the lorebook.\n * When the token limit is exceeded, some low-priority lorebooks will be deactivated to keep the token usage within the limit.\n * Positive integer.\n */\n tokenLimit: v.pipe(v.number(), v.integer(), v.minValue(1)),\n }),\n /**\n * Contains the actual lorebooks.\n * Duplicated id is not allowed.\n */\n data: v.optional(\n v.pipe(\n v.array(LorebookEntrySchema),\n v.check(\n (data) =>\n data.map((i) => i.id).length ===\n new Set(data.map((i) => i.id)).size,\n \"Duplicated id is not allowed.\",\n ),\n ),\n [],\n ),\n});\n/**\n * Object containing all data for the lorebook.\n * It's meant to be stored in the database and many other places.\n */\nexport type LorebookData = v.InferOutput<typeof LorebookDataSchema>;\n","import * as v from \"valibot\";\nimport { LorebookDataSchema } from \"@/types/v0/Lorebook\";\n\n/**\n * The prompt data for a character.\n * It is used to generate the character's persona.\n * All of parameters are for AI prompt, and scriptable.\n */\nexport type CharacterPromptData = v.InferOutput<\n typeof CharacterPromptDataSchema\n>;\n\n/**\n * @see {@link CharacterPromptData}\n */\nexport const CharacterPromptDataSchema = v.object({\n /**\n * The character description.\n */\n description: v.string(),\n /**\n * The authors note. It's usually used to mock the user's message(differ by prompt).\n */\n authorsNote: v.string(),\n /**\n * Lorebook data.\n * @see {@link LorebookDataSchema}\n */\n lorebook: LorebookDataSchema,\n});\n\n/**\n * @see {@link Character}\n */\nexport const CharacterSchema = v.object({\n /**\n * The version of the character spec.\n * This is used to determine which schema to use for parsing.\n * Also tries to migrate the character to the latest version.\n */\n specVersion: v.literal(0),\n /**\n * Unique identifier for the character.\n */\n id: v.string(),\n /**\n * The display name of the character.\n * Human readable, not scriptable.\n */\n name: v.string(),\n /**\n * A short description of the character.\n * Human readable, not scriptable.\n */\n description: v.string(),\n /**\n * Optional URL for the character's avatar image.\n */\n avatarUrl: v.optional(v.pipe(v.string(), v.url())),\n prompt: CharacterPromptDataSchema,\n});\n\n/**\n * Represents a specific AI character personality.\n */\nexport type Character = v.InferOutput<typeof CharacterSchema>;\n"],"names":["LorebookEntrySchema","v","LorebookConditionDetailSchema","LorebookConditionSchema","LorebookDataSchema","data","i","CharacterPromptDataSchema","CharacterSchema"],"mappings":";AAKO,MAAMA,IAAsBC,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAIxC,IAAIA,EAAE,SAASA,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIzB,MAAMA,EAAE,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOR,WAAWA,EAAE,SAASA,EAAE,MAAMA,EAAE,OAA0B,MAAM,EAAI,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtE,kCAAkCA,EAAE,SAASA,EAAE,SAAS,CAAC,OAAO,KAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKvE,SAASA,EAAE,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMX,UAAUA,EAAE,SAASA,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAI/B,SAASA,EAAE,SAASA,EAAE,SAAS;AACnC,CAAC,GAUYC,IAAgC;AAAA,EACzC,OAAOD,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKZ,MAAMA,EAAE,QAAQ,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,IAK7B,cAAcA,EAAE,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKhB,YAAYA,EAAE,SAASA,EAAE,QAAQ;AAAA,EAAA,CACpC;AAAA,EACD,WAAWA,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKhB,MAAMA,EAAE,QAAQ,kBAAkB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