@pokepc/dataset 6.7.0 → 6.8.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.
Files changed (205) hide show
  1. package/README.md +15 -3
  2. package/build/{box-preset-sanitizer-DHGv5TJj.mjs → box-preset-sanitizer-CmgPzVjb.mjs} +2 -2
  3. package/build/{box-preset-sanitizer-DHGv5TJj.mjs.map → box-preset-sanitizer-CmgPzVjb.mjs.map} +1 -1
  4. package/build/{build-DvGzwIK8.mjs → build-D2oPkkzJ.mjs} +52 -52
  5. package/build/{build-DvGzwIK8.mjs.map → build-D2oPkkzJ.mjs.map} +1 -1
  6. package/build/{enums-DlMg7WLl.mjs → enums-u8n-nN0B.mjs} +5 -2
  7. package/build/enums-u8n-nN0B.mjs.map +1 -0
  8. package/build/lib/box-preset-sanitizer.mjs +1 -1
  9. package/build/lib/box-preset-transform.mjs +2 -2
  10. package/build/lib/fs.d.mts +6 -6
  11. package/build/lib/fs.d.mts.map +1 -1
  12. package/build/lib/fs.mjs +21 -29
  13. package/build/lib/fs.mjs.map +1 -1
  14. package/build/lib/schemas.d.mts +1 -1
  15. package/build/lib/schemas.mjs +1 -1
  16. package/build/lib/search.d.mts +2 -0
  17. package/build/lib/search.d.mts.map +1 -1
  18. package/build/lib/search.mjs +3 -3
  19. package/build/lib/search.mjs.map +1 -1
  20. package/build/lib/types.d.mts +1 -1
  21. package/build/lib/utils.d.mts +2 -0
  22. package/build/lib/utils.d.mts.map +1 -1
  23. package/build/lib/utils.mjs +3 -2
  24. package/build/lib-next/_build.mjs +1 -1
  25. package/build/lib-next/enums.d.mts.map +1 -1
  26. package/build/lib-next/enums.mjs +1 -1
  27. package/build/lib-next/schemas.d.mts +8 -8
  28. package/build/lib-next/schemas.mjs +1 -1
  29. package/build/{schemas-Bj1AIX0P.mjs → schemas-CWE4YPI2.mjs} +2 -2
  30. package/build/{schemas-Bj1AIX0P.mjs.map → schemas-CWE4YPI2.mjs.map} +1 -1
  31. package/build/{schemas-CcUqoHNr.mjs → schemas-DvWBehAR.mjs} +5 -1
  32. package/build/schemas-DvWBehAR.mjs.map +1 -0
  33. package/build/{schemas-CDSWgtoj.d.mts → schemas-jxei_N2z.d.mts} +54 -48
  34. package/build/schemas-jxei_N2z.d.mts.map +1 -0
  35. package/build/{utils-BwovRocd.mjs → utils-BTjKkD-_.mjs} +2 -2
  36. package/build/utils-BTjKkD-_.mjs.map +1 -0
  37. package/build/utils-internal-C-UStMrZ.d.mts +7 -0
  38. package/build/utils-internal-C-UStMrZ.d.mts.map +1 -0
  39. package/build/{utils-internal-Czgdbnkv.mjs → utils-internal-DPjO9kQX.mjs} +7 -2
  40. package/build/{utils-internal-Czgdbnkv.mjs.map → utils-internal-DPjO9kQX.mjs.map} +1 -1
  41. package/data/games/b2w2-b2.json +4 -0
  42. package/data/games/b2w2-w2.json +4 -0
  43. package/data/games/b2w2.json +4 -0
  44. package/data/games/bdsp-bd.json +4 -0
  45. package/data/games/bdsp-sp.json +4 -0
  46. package/data/games/bdsp.json +4 -0
  47. package/data/games/bw-b.json +4 -0
  48. package/data/games/bw-w.json +4 -0
  49. package/data/games/bw.json +4 -0
  50. package/data/games/bwb2w2.json +4 -0
  51. package/data/games/c.json +4 -0
  52. package/data/games/champions.json +4 -0
  53. package/data/games/col.json +4 -0
  54. package/data/games/dp-d.json +4 -0
  55. package/data/games/dp-p.json +4 -0
  56. package/data/games/dp.json +4 -0
  57. package/data/games/dppt.json +4 -0
  58. package/data/games/e.json +4 -0
  59. package/data/games/frlg-fr.json +4 -0
  60. package/data/games/frlg-lg.json +4 -0
  61. package/data/games/frlg.json +4 -0
  62. package/data/games/go.json +4 -0
  63. package/data/games/gs-g.json +4 -0
  64. package/data/games/gs-s.json +4 -0
  65. package/data/games/gs.json +4 -0
  66. package/data/games/gsc.json +4 -0
  67. package/data/games/hgss-hg.json +4 -0
  68. package/data/games/hgss-ss.json +4 -0
  69. package/data/games/hgss.json +4 -0
  70. package/data/games/home.json +4 -0
  71. package/data/games/la.json +4 -0
  72. package/data/games/lgpe-lge.json +4 -0
  73. package/data/games/lgpe-lgp.json +4 -0
  74. package/data/games/lgpe.json +4 -0
  75. package/data/games/lza-megadimension.json +4 -0
  76. package/data/games/lza.json +4 -0
  77. package/data/games/oras-as.json +4 -0
  78. package/data/games/oras-or.json +4 -0
  79. package/data/games/oras.json +4 -0
  80. package/data/games/pokopia-bubblybasin.json +4 -0
  81. package/data/games/pokopia.json +4 -0
  82. package/data/games/pt.json +4 -0
  83. package/data/games/rb-b.json +4 -0
  84. package/data/games/rb-r.json +4 -0
  85. package/data/games/rb.json +4 -0
  86. package/data/games/rby.json +4 -0
  87. package/data/games/rs-r.json +4 -0
  88. package/data/games/rs-s.json +4 -0
  89. package/data/games/rs.json +4 -0
  90. package/data/games/rse.json +4 -0
  91. package/data/games/sm-m.json +4 -0
  92. package/data/games/sm-s.json +4 -0
  93. package/data/games/sm.json +4 -0
  94. package/data/games/smusum.json +4 -0
  95. package/data/games/sv-indigodisk.json +4 -0
  96. package/data/games/sv-s.json +4 -0
  97. package/data/games/sv-tealmask.json +4 -0
  98. package/data/games/sv-v.json +4 -0
  99. package/data/games/sv.json +4 -0
  100. package/data/games/swsh-crowntundra.json +4 -0
  101. package/data/games/swsh-islearmor.json +4 -0
  102. package/data/games/swsh-sh.json +4 -0
  103. package/data/games/swsh-sw.json +4 -0
  104. package/data/games/swsh.json +4 -0
  105. package/data/games/usum-um.json +4 -0
  106. package/data/games/usum-us.json +4 -0
  107. package/data/games/usum.json +4 -0
  108. package/data/games/wiwa-wa.json +4 -0
  109. package/data/games/wiwa-wi.json +4 -0
  110. package/data/games/wiwa.json +4 -0
  111. package/data/games/xd.json +4 -0
  112. package/data/games/xy-x.json +4 -0
  113. package/data/games/xy-y.json +4 -0
  114. package/data/games/xy.json +4 -0
  115. package/data/games/y.json +4 -0
  116. package/data/pokedexes/hoenn-oras.json +12 -0
  117. package/data/pokedexes/kanto-lgpe.json +11 -0
  118. package/data/pokedexes/national-oras.json +27 -0
  119. package/data/pokemon/abomasnow-mega.json +1 -1
  120. package/data/pokemon/aggron-mega.json +1 -1
  121. package/data/pokemon/ampharos-mega.json +1 -1
  122. package/data/pokemon/blastoise-mega.json +12 -1
  123. package/data/pokemon/blaziken-mega.json +1 -1
  124. package/data/pokemon/charizard-mega-x.json +12 -2
  125. package/data/pokemon/charizard-mega-y.json +12 -2
  126. package/data/pokemon/gengar-mega.json +1 -1
  127. package/data/pokemon/heracross-mega.json +1 -1
  128. package/data/pokemon/houndoom-mega.json +1 -1
  129. package/data/pokemon/kangaskhan-mega.json +1 -1
  130. package/data/pokemon/lucario-mega.json +1 -1
  131. package/data/pokemon/manectric-mega.json +1 -1
  132. package/data/pokemon/mawile-mega.json +2 -1
  133. package/data/pokemon/mewtwo-mega-x.json +10 -1
  134. package/data/pokemon/mewtwo-mega-y.json +10 -1
  135. package/data/pokemon/pinsir-mega.json +1 -1
  136. package/data/pokemon/sableye-mega.json +1 -1
  137. package/data/pokemon/scizor-mega.json +1 -1
  138. package/data/pokemon/tyranitar-mega.json +1 -1
  139. package/data/pokemon/venusaur-mega.json +12 -1
  140. package/data-next/champions/abilities.json +117 -5
  141. package/data-next/champions/battle-states.json +24 -3
  142. package/data-next/champions/i18n/chs/abilities.json +104 -6
  143. package/data-next/champions/i18n/chs/battle-states.json +24 -3
  144. package/data-next/champions/i18n/chs/items.json +144 -0
  145. package/data-next/champions/i18n/chs/moves.json +25 -25
  146. package/data-next/champions/i18n/chs/pokemon.json +195 -0
  147. package/data-next/champions/i18n/cht/abilities.json +105 -7
  148. package/data-next/champions/i18n/cht/battle-states.json +24 -3
  149. package/data-next/champions/i18n/cht/items.json +144 -0
  150. package/data-next/champions/i18n/cht/moves.json +25 -25
  151. package/data-next/champions/i18n/cht/pokemon.json +195 -0
  152. package/data-next/champions/i18n/deu/abilities.json +105 -7
  153. package/data-next/champions/i18n/deu/battle-states.json +24 -3
  154. package/data-next/champions/i18n/deu/items.json +144 -0
  155. package/data-next/champions/i18n/deu/moves.json +28 -28
  156. package/data-next/champions/i18n/deu/pokemon.json +195 -0
  157. package/data-next/champions/i18n/eng/abilities.json +102 -4
  158. package/data-next/champions/i18n/eng/battle-states.json +24 -3
  159. package/data-next/champions/i18n/eng/items.json +144 -0
  160. package/data-next/champions/i18n/eng/moves.json +25 -25
  161. package/data-next/champions/i18n/eng/pokemon.json +195 -0
  162. package/data-next/champions/i18n/es-es/abilities.json +106 -8
  163. package/data-next/champions/i18n/es-es/battle-states.json +24 -3
  164. package/data-next/champions/i18n/es-es/items.json +145 -1
  165. package/data-next/champions/i18n/es-es/moves.json +25 -25
  166. package/data-next/champions/i18n/es-es/pokemon.json +195 -0
  167. package/data-next/champions/i18n/es-la/abilities.json +106 -8
  168. package/data-next/champions/i18n/es-la/battle-states.json +24 -3
  169. package/data-next/champions/i18n/es-la/items.json +145 -1
  170. package/data-next/champions/i18n/es-la/moves.json +26 -26
  171. package/data-next/champions/i18n/es-la/pokemon.json +195 -0
  172. package/data-next/champions/i18n/fra/abilities.json +105 -7
  173. package/data-next/champions/i18n/fra/battle-states.json +24 -3
  174. package/data-next/champions/i18n/fra/items.json +144 -0
  175. package/data-next/champions/i18n/fra/moves.json +25 -25
  176. package/data-next/champions/i18n/fra/pokemon.json +195 -0
  177. package/data-next/champions/i18n/ita/abilities.json +116 -18
  178. package/data-next/champions/i18n/ita/battle-states.json +24 -3
  179. package/data-next/champions/i18n/ita/items.json +145 -1
  180. package/data-next/champions/i18n/ita/moves.json +28 -28
  181. package/data-next/champions/i18n/ita/pokemon.json +195 -0
  182. package/data-next/champions/i18n/jpn/abilities.json +104 -6
  183. package/data-next/champions/i18n/jpn/battle-states.json +24 -3
  184. package/data-next/champions/i18n/jpn/items.json +144 -0
  185. package/data-next/champions/i18n/jpn/moves.json +25 -25
  186. package/data-next/champions/i18n/jpn/pokemon.json +195 -0
  187. package/data-next/champions/i18n/kor/abilities.json +104 -6
  188. package/data-next/champions/i18n/kor/battle-states.json +24 -3
  189. package/data-next/champions/i18n/kor/items.json +144 -0
  190. package/data-next/champions/i18n/kor/moves.json +25 -25
  191. package/data-next/champions/i18n/kor/pokemon.json +195 -0
  192. package/data-next/champions/i18n/pt-br/abilities.json +102 -4
  193. package/data-next/champions/i18n/pt-br/battle-states.json +24 -3
  194. package/data-next/champions/i18n/pt-br/items.json +144 -0
  195. package/data-next/champions/i18n/pt-br/moves.json +25 -25
  196. package/data-next/champions/i18n/pt-br/pokemon.json +195 -0
  197. package/data-next/champions/items.json +180 -0
  198. package/data-next/champions/moves.json +61 -61
  199. package/data-next/champions/pokemon-moves.json +1882 -173
  200. package/data-next/champions/pokemon.json +913 -21
  201. package/package.json +17 -9
  202. package/build/enums-DlMg7WLl.mjs.map +0 -1
  203. package/build/schemas-CDSWgtoj.d.mts.map +0 -1
  204. package/build/schemas-CcUqoHNr.mjs.map +0 -1
  205. package/build/utils-BwovRocd.mjs.map +0 -1
package/README.md CHANGED
@@ -78,7 +78,7 @@ pnpm build
78
78
  ```
79
79
 
80
80
  When changing data, run the tests before opening a PR. When changing the static API docs, run
81
- `pnpm build:pages` and check the local Swagger UI with `pnpm dev`.
81
+ `pnpm build:pages` and check the local Swagger UI with `pnpm dev:openapi`.
82
82
 
83
83
  Build a GitHub Pages-ready artifact:
84
84
 
@@ -98,11 +98,23 @@ dist-pages/
98
98
  Preview the Swagger UI locally:
99
99
 
100
100
  ```bash
101
- pnpm dev
101
+ pnpm dev:openapi
102
102
  ```
103
103
 
104
104
  The dev server runs at `http://localhost:4173/` by default. Override the port with
105
- `PORT=4174 pnpm dev` or `node src/openapi/dev.ts --port=4174`.
105
+ `PORT=4174 pnpm dev:openapi` or `node src/openapi/dev.ts --port=4174`.
106
+
107
+ ## Dataset editor
108
+
109
+ Edit this checkout's `data/` with the local maintainer app:
110
+
111
+ ```bash
112
+ pnpm dev:editor
113
+ ```
114
+
115
+ The editor runs on `http://127.0.0.1:3003` without external-directory configuration.
116
+ `pnpm dev:openapi` starts only the OpenAPI preview, and `pnpm dev` runs both in parallel. See the
117
+ [editor guide](docs/editor.md) for editing rules, builds and disposable browser tests.
106
118
 
107
119
  ## Credits
108
120
 
@@ -1,4 +1,4 @@
1
- import { y as modernBoxPresetSlotSchema } from "./schemas-CcUqoHNr.mjs";
1
+ import { y as modernBoxPresetSlotSchema } from "./schemas-DvWBehAR.mjs";
2
2
  //#region src/lib/box-preset-sanitizer.ts
3
3
  const incompatibleClassicPokemonIds = [
4
4
  "greninja--battle-bond",
@@ -51,4 +51,4 @@ function collectModernBoxPresetSanitizerDiagnostics(originalSlots, sanitizedSlot
51
51
  //#endregion
52
52
  export { sanitizeModernBoxPresetSlots as a, sanitizeModernBoxPresetSlot as i, incompatibleClassicPokemonIds as n, modernBoxPresetSlotFilters as r, collectModernBoxPresetSanitizerDiagnostics as t };
53
53
 
54
- //# sourceMappingURL=box-preset-sanitizer-DHGv5TJj.mjs.map
54
+ //# sourceMappingURL=box-preset-sanitizer-CmgPzVjb.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"box-preset-sanitizer-DHGv5TJj.mjs","names":[],"sources":["../src/lib/box-preset-sanitizer.ts"],"sourcesContent":["import { modernBoxPresetSlotSchema } from './schemas'\n\nexport type ModernBoxPresetSlotInput =\n | null\n | string\n | {\n pid: string\n shiny?: boolean\n gmax?: boolean\n shinyLocked?: boolean\n }\n\nexport type ModernBoxPresetSlotSanitizerContext = {\n gameSet: string\n presetId: string\n boxIndex: number\n slotIndex: number\n validPokemonIds: ReadonlySet<string>\n}\n\nexport type ModernBoxPresetSlotFilter = (\n slot: ModernBoxPresetSlotInput,\n context: ModernBoxPresetSlotSanitizerContext,\n) => ModernBoxPresetSlotInput\n\nexport type ModernBoxPresetSanitizerDiagnostic = {\n reason: 'incompatible-classic-pokemon-id'\n pokemon: string\n gameSet: string\n presetId: string\n boxIndex: number\n slotIndex: number\n}\n\nexport const incompatibleClassicPokemonIds = [\n 'greninja--battle-bond',\n 'rockruff--own-tempo',\n 'zygarde--power-construct',\n 'zygarde-10--power-construct',\n] as const\nconst incompatibleClassicPokemonIdSet = new Set<string>(incompatibleClassicPokemonIds)\n\nfunction getSlotPokemonId(slot: ModernBoxPresetSlotInput): string | null {\n if (slot === null) return null\n if (typeof slot === 'string') return slot\n return slot.pid\n}\n\nfunction isIncompatibleClassicPokemonId(slot: ModernBoxPresetSlotInput): boolean {\n const pokemonId = getSlotPokemonId(slot)\n return pokemonId !== null && incompatibleClassicPokemonIdSet.has(pokemonId)\n}\n\nexport const modernBoxPresetSlotFilters: ModernBoxPresetSlotFilter[] = [\n (slot) => (isIncompatibleClassicPokemonId(slot) ? null : slot),\n]\n\nexport function sanitizeModernBoxPresetSlot(\n slot: ModernBoxPresetSlotInput,\n context: ModernBoxPresetSlotSanitizerContext,\n): Pkds.ModernBoxPresetSlot {\n const sanitized = modernBoxPresetSlotFilters.reduce(\n (currentSlot, filter) => filter(currentSlot, context),\n slot,\n )\n if (sanitized === null || typeof sanitized === 'string') {\n return sanitized\n }\n return modernBoxPresetSlotSchema.parse({\n pokemon: sanitized.pid,\n shiny: sanitized.shiny,\n gmax: sanitized.gmax,\n shinyLocked: sanitized.shinyLocked,\n })\n}\n\nexport function sanitizeModernBoxPresetSlots(\n slots: ModernBoxPresetSlotInput[],\n context: Omit<ModernBoxPresetSlotSanitizerContext, 'slotIndex'>,\n): Pkds.ModernBoxPresetSlot[] {\n return slots.map((slot, slotIndex) =>\n sanitizeModernBoxPresetSlot(slot, {\n ...context,\n slotIndex,\n }),\n )\n}\n\nexport function collectModernBoxPresetSanitizerDiagnostics(\n originalSlots: ModernBoxPresetSlotInput[],\n sanitizedSlots: Pkds.ModernBoxPresetSlot[],\n context: Omit<ModernBoxPresetSlotSanitizerContext, 'slotIndex'>,\n): ModernBoxPresetSanitizerDiagnostic[] {\n return originalSlots.flatMap((slot, slotIndex) => {\n const pokemon = getSlotPokemonId(slot)\n if (pokemon === null || sanitizedSlots[slotIndex] !== null) return []\n if (!incompatibleClassicPokemonIdSet.has(pokemon)) return []\n return [\n {\n reason: 'incompatible-classic-pokemon-id' as const,\n pokemon,\n gameSet: context.gameSet,\n presetId: context.presetId,\n boxIndex: context.boxIndex,\n slotIndex,\n },\n ]\n })\n}\n"],"mappings":";;AAkCA,MAAa,gCAAgC;CAC3C;CACA;CACA;CACA;AACF;AACA,MAAM,kCAAkC,IAAI,IAAY,6BAA6B;AAErF,SAAS,iBAAiB,MAA+C;CACvE,IAAI,SAAS,MAAM,OAAO;CAC1B,IAAI,OAAO,SAAS,UAAU,OAAO;CACrC,OAAO,KAAK;AACd;AAEA,SAAS,+BAA+B,MAAyC;CAC/E,MAAM,YAAY,iBAAiB,IAAI;CACvC,OAAO,cAAc,QAAQ,gCAAgC,IAAI,SAAS;AAC5E;AAEA,MAAa,6BAA0D,EACpE,SAAU,+BAA+B,IAAI,IAAI,OAAO,IAC3D;AAEA,SAAgB,4BACd,MACA,SAC0B;CAC1B,MAAM,YAAY,2BAA2B,QAC1C,aAAa,WAAW,OAAO,aAAa,OAAO,GACpD,IACF;CACA,IAAI,cAAc,QAAQ,OAAO,cAAc,UAC7C,OAAO;CAET,OAAO,0BAA0B,MAAM;EACrC,SAAS,UAAU;EACnB,OAAO,UAAU;EACjB,MAAM,UAAU;EAChB,aAAa,UAAU;CACzB,CAAC;AACH;AAEA,SAAgB,6BACd,OACA,SAC4B;CAC5B,OAAO,MAAM,KAAK,MAAM,cACtB,4BAA4B,MAAM;EAChC,GAAG;EACH;CACF,CAAC,CACH;AACF;AAEA,SAAgB,2CACd,eACA,gBACA,SACsC;CACtC,OAAO,cAAc,SAAS,MAAM,cAAc;EAChD,MAAM,UAAU,iBAAiB,IAAI;EACrC,IAAI,YAAY,QAAQ,eAAe,eAAe,MAAM,OAAO,CAAC;EACpE,IAAI,CAAC,gCAAgC,IAAI,OAAO,GAAG,OAAO,CAAC;EAC3D,OAAO,CACL;GACE,QAAQ;GACR;GACA,SAAS,QAAQ;GACjB,UAAU,QAAQ;GAClB,UAAU,QAAQ;GAClB;EACF,CACF;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"box-preset-sanitizer-CmgPzVjb.mjs","names":[],"sources":["../src/lib/box-preset-sanitizer.ts"],"sourcesContent":["import { modernBoxPresetSlotSchema } from './schemas'\n\nexport type ModernBoxPresetSlotInput =\n | null\n | string\n | {\n pid: string\n shiny?: boolean\n gmax?: boolean\n shinyLocked?: boolean\n }\n\nexport type ModernBoxPresetSlotSanitizerContext = {\n gameSet: string\n presetId: string\n boxIndex: number\n slotIndex: number\n validPokemonIds: ReadonlySet<string>\n}\n\nexport type ModernBoxPresetSlotFilter = (\n slot: ModernBoxPresetSlotInput,\n context: ModernBoxPresetSlotSanitizerContext,\n) => ModernBoxPresetSlotInput\n\nexport type ModernBoxPresetSanitizerDiagnostic = {\n reason: 'incompatible-classic-pokemon-id'\n pokemon: string\n gameSet: string\n presetId: string\n boxIndex: number\n slotIndex: number\n}\n\nexport const incompatibleClassicPokemonIds = [\n 'greninja--battle-bond',\n 'rockruff--own-tempo',\n 'zygarde--power-construct',\n 'zygarde-10--power-construct',\n] as const\nconst incompatibleClassicPokemonIdSet = new Set<string>(incompatibleClassicPokemonIds)\n\nfunction getSlotPokemonId(slot: ModernBoxPresetSlotInput): string | null {\n if (slot === null) return null\n if (typeof slot === 'string') return slot\n return slot.pid\n}\n\nfunction isIncompatibleClassicPokemonId(slot: ModernBoxPresetSlotInput): boolean {\n const pokemonId = getSlotPokemonId(slot)\n return pokemonId !== null && incompatibleClassicPokemonIdSet.has(pokemonId)\n}\n\nexport const modernBoxPresetSlotFilters: ModernBoxPresetSlotFilter[] = [\n (slot) => (isIncompatibleClassicPokemonId(slot) ? null : slot),\n]\n\nexport function sanitizeModernBoxPresetSlot(\n slot: ModernBoxPresetSlotInput,\n context: ModernBoxPresetSlotSanitizerContext,\n): Pkds.ModernBoxPresetSlot {\n const sanitized = modernBoxPresetSlotFilters.reduce(\n (currentSlot, filter) => filter(currentSlot, context),\n slot,\n )\n if (sanitized === null || typeof sanitized === 'string') {\n return sanitized\n }\n return modernBoxPresetSlotSchema.parse({\n pokemon: sanitized.pid,\n shiny: sanitized.shiny,\n gmax: sanitized.gmax,\n shinyLocked: sanitized.shinyLocked,\n })\n}\n\nexport function sanitizeModernBoxPresetSlots(\n slots: ModernBoxPresetSlotInput[],\n context: Omit<ModernBoxPresetSlotSanitizerContext, 'slotIndex'>,\n): Pkds.ModernBoxPresetSlot[] {\n return slots.map((slot, slotIndex) =>\n sanitizeModernBoxPresetSlot(slot, {\n ...context,\n slotIndex,\n }),\n )\n}\n\nexport function collectModernBoxPresetSanitizerDiagnostics(\n originalSlots: ModernBoxPresetSlotInput[],\n sanitizedSlots: Pkds.ModernBoxPresetSlot[],\n context: Omit<ModernBoxPresetSlotSanitizerContext, 'slotIndex'>,\n): ModernBoxPresetSanitizerDiagnostic[] {\n return originalSlots.flatMap((slot, slotIndex) => {\n const pokemon = getSlotPokemonId(slot)\n if (pokemon === null || sanitizedSlots[slotIndex] !== null) return []\n if (!incompatibleClassicPokemonIdSet.has(pokemon)) return []\n return [\n {\n reason: 'incompatible-classic-pokemon-id' as const,\n pokemon,\n gameSet: context.gameSet,\n presetId: context.presetId,\n boxIndex: context.boxIndex,\n slotIndex,\n },\n ]\n })\n}\n"],"mappings":";;AAkCA,MAAa,gCAAgC;CAC3C;CACA;CACA;CACA;AACF;AACA,MAAM,kCAAkC,IAAI,IAAY,6BAA6B;AAErF,SAAS,iBAAiB,MAA+C;CACvE,IAAI,SAAS,MAAM,OAAO;CAC1B,IAAI,OAAO,SAAS,UAAU,OAAO;CACrC,OAAO,KAAK;AACd;AAEA,SAAS,+BAA+B,MAAyC;CAC/E,MAAM,YAAY,iBAAiB,IAAI;CACvC,OAAO,cAAc,QAAQ,gCAAgC,IAAI,SAAS;AAC5E;AAEA,MAAa,6BAA0D,EACpE,SAAU,+BAA+B,IAAI,IAAI,OAAO,IAC3D;AAEA,SAAgB,4BACd,MACA,SAC0B;CAC1B,MAAM,YAAY,2BAA2B,QAC1C,aAAa,WAAW,OAAO,aAAa,OAAO,GACpD,IACF;CACA,IAAI,cAAc,QAAQ,OAAO,cAAc,UAC7C,OAAO;CAET,OAAO,0BAA0B,MAAM;EACrC,SAAS,UAAU;EACnB,OAAO,UAAU;EACjB,MAAM,UAAU;EAChB,aAAa,UAAU;CACzB,CAAC;AACH;AAEA,SAAgB,6BACd,OACA,SAC4B;CAC5B,OAAO,MAAM,KAAK,MAAM,cACtB,4BAA4B,MAAM;EAChC,GAAG;EACH;CACF,CAAC,CACH;AACF;AAEA,SAAgB,2CACd,eACA,gBACA,SACsC;CACtC,OAAO,cAAc,SAAS,MAAM,cAAc;EAChD,MAAM,UAAU,iBAAiB,IAAI;EACrC,IAAI,YAAY,QAAQ,eAAe,eAAe,MAAM,OAAO,CAAC;EACpE,IAAI,CAAC,gCAAgC,IAAI,OAAO,GAAG,OAAO,CAAC;EAC3D,OAAO,CACL;GACE,QAAQ;GACR;GACA,SAAS,QAAQ;GACjB,UAAU,QAAQ;GAClB,UAAU,QAAQ;GAClB;EACF,CACF;CACF,CAAC;AACH"}
@@ -1,12 +1,12 @@
1
1
  import { a as appLangsBySlug, l as gameLocales } from "./languages-CY-Q1SED.mjs";
2
- import { n as battleStates } from "./enums-DlMg7WLl.mjs";
3
- import { b as pokemonSchema, c as i18nSchema, d as itemSchema, g as pokemonI18nSchema, i as battleStateSchema, n as abilitySchema, p as moveSchema, u as itemI18nSchema, v as pokemonMovesRecordSchema } from "./schemas-Bj1AIX0P.mjs";
2
+ import { n as battleStates } from "./enums-u8n-nN0B.mjs";
3
+ import { b as pokemonSchema, c as i18nSchema, d as itemSchema, g as pokemonI18nSchema, i as battleStateSchema, n as abilitySchema, p as moveSchema, u as itemI18nSchema, v as pokemonMovesRecordSchema } from "./schemas-CWE4YPI2.mjs";
4
4
  import { copyFileSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  import { dirname, join } from "node:path";
6
6
  //#region \0rolldown/runtime.js
7
7
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
8
8
  //#endregion
9
- //#region src/upstream-adapters/projectpokemon-champout/fixtures/aliases.ts
9
+ //#region src/upstream-adapters/projectpokemon-champout/fixtures/text.ts
10
10
  var import_node = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
11
11
  var B = Object.defineProperty;
12
12
  var Vu = Object.getOwnPropertyDescriptor;
@@ -31907,53 +31907,6 @@ var import_node = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
31907
31907
  transliterate
31908
31908
  });
31909
31909
  })))();
31910
- const LOCAL_SLUG_ALIASES = { "vise-grip": ["vice-grip"] };
31911
- function expandLocalSlugAliases(slug) {
31912
- return [slug, ...LOCAL_SLUG_ALIASES[slug] ?? []];
31913
- }
31914
- //#endregion
31915
- //#region src/upstream-adapters/projectpokemon-champout/fixtures/preliminary.ts
31916
- const PRELIMINARY_ABILITIES = [{
31917
- id: "auraguard",
31918
- slug: "aura-guard",
31919
- name: "Aura Guard",
31920
- descriptions: {
31921
- usa: "Halves the damage the Pokémon takes from contact moves.",
31922
- jpn: "接触技で受けるダメージが半減する。",
31923
- kor: "접촉 기술로 입는 데미지가 반감된다.",
31924
- sch: "因接触类招式而受到的伤害会减半。",
31925
- tch: "因接觸類招式而受到的傷害會減半。",
31926
- deu: "Der Schaden, den das Pokémon durch Kontaktattacken erleidet, wird halbiert.",
31927
- fra: "Les dégâts des capacités à contact subis par le Pokémon sont réduits de moitié.",
31928
- ita: "Dimezza i danni subiti dalle mosse da contatto.",
31929
- esp: "Reduce a la mitad el daño recibido por los movimientos de contacto.",
31930
- latam: "Reduce un 50% el daño recibido por los movimientos de contacto."
31931
- }
31932
- }];
31933
- /** Append the preliminary abilities the dump does not carry yet. */
31934
- function applyPreliminaryAbilities(abilities) {
31935
- const known = new Set(abilities.map((ability) => ability.id));
31936
- return [...abilities, ...PRELIMINARY_ABILITIES.filter((ability) => !known.has(ability.id)).map((ability) => abilitySchema.parse({
31937
- id: ability.id,
31938
- championsId: `preliminary-${ability.id}`,
31939
- slug: ability.slug,
31940
- name: ability.name,
31941
- description: ability.descriptions.usa
31942
- }))];
31943
- }
31944
- /** The same abilities for one language's i18n file. */
31945
- function applyPreliminaryAbilityI18n(records, lang) {
31946
- const known = new Set(records.map((record) => record.id));
31947
- return [...records, ...PRELIMINARY_ABILITIES.filter((ability) => !known.has(ability.id)).map((ability) => i18nSchema.parse({
31948
- id: ability.id,
31949
- slug: ability.slug,
31950
- slugLoc: ability.slug,
31951
- name: ability.name,
31952
- description: ability.descriptions[lang]
31953
- }))];
31954
- }
31955
- //#endregion
31956
- //#region src/upstream-adapters/projectpokemon-champout/fixtures/text.ts
31957
31910
  const TEXT_REPLACEMENTS = [{
31958
31911
  path: "rom-txt/usa/wazaname.json",
31959
31912
  labelName: "WAZANAME_011",
@@ -32066,6 +32019,53 @@ function transformInputData(inputData) {
32066
32019
  return inputData.data;
32067
32020
  }
32068
32021
  //#endregion
32022
+ //#region src/upstream-adapters/projectpokemon-champout/fixtures/aliases.ts
32023
+ const LOCAL_SLUG_ALIASES = { "vise-grip": ["vice-grip"] };
32024
+ function expandLocalSlugAliases(slug) {
32025
+ return [slug, ...LOCAL_SLUG_ALIASES[slug] ?? []];
32026
+ }
32027
+ //#endregion
32028
+ //#region src/upstream-adapters/projectpokemon-champout/fixtures/preliminary.ts
32029
+ const PRELIMINARY_ABILITIES = [{
32030
+ id: "auraguard",
32031
+ slug: "aura-guard",
32032
+ name: "Aura Guard",
32033
+ descriptions: {
32034
+ usa: "Halves the damage the Pokémon takes from contact moves.",
32035
+ jpn: "接触技で受けるダメージが半減する。",
32036
+ kor: "접촉 기술로 입는 데미지가 반감된다.",
32037
+ sch: "因接触类招式而受到的伤害会减半。",
32038
+ tch: "因接觸類招式而受到的傷害會減半。",
32039
+ deu: "Der Schaden, den das Pokémon durch Kontaktattacken erleidet, wird halbiert.",
32040
+ fra: "Les dégâts des capacités à contact subis par le Pokémon sont réduits de moitié.",
32041
+ ita: "Dimezza i danni subiti dalle mosse da contatto.",
32042
+ esp: "Reduce a la mitad el daño recibido por los movimientos de contacto.",
32043
+ latam: "Reduce un 50% el daño recibido por los movimientos de contacto."
32044
+ }
32045
+ }];
32046
+ /** Append the preliminary abilities the dump does not carry yet. */
32047
+ function applyPreliminaryAbilities(abilities) {
32048
+ const known = new Set(abilities.map((ability) => ability.id));
32049
+ return [...abilities, ...PRELIMINARY_ABILITIES.filter((ability) => !known.has(ability.id)).map((ability) => abilitySchema.parse({
32050
+ id: ability.id,
32051
+ championsId: `preliminary-${ability.id}`,
32052
+ slug: ability.slug,
32053
+ name: ability.name,
32054
+ description: ability.descriptions.usa
32055
+ }))];
32056
+ }
32057
+ /** The same abilities for one language's i18n file. */
32058
+ function applyPreliminaryAbilityI18n(records, lang) {
32059
+ const known = new Set(records.map((record) => record.id));
32060
+ return [...records, ...PRELIMINARY_ABILITIES.filter((ability) => !known.has(ability.id)).map((ability) => i18nSchema.parse({
32061
+ id: ability.id,
32062
+ slug: ability.slug,
32063
+ slugLoc: ability.slug,
32064
+ name: ability.name,
32065
+ description: ability.descriptions[lang]
32066
+ }))];
32067
+ }
32068
+ //#endregion
32069
32069
  //#region src/upstream-adapters/projectpokemon-champout/mappings.ts
32070
32070
  const I18N_CODE = [
32071
32071
  "deu",
@@ -32612,7 +32612,7 @@ function resolveDefaultPokemonLocalIds(record, localCandidates) {
32612
32612
  function resolveFormPokemonLocalIds(record, localCandidates, formNames) {
32613
32613
  const formName = requireText(formNames, record.msFormLbl, "usa pokemon form names");
32614
32614
  const normalizedFormName = normalizePokemonMapText(formName);
32615
- const matches = localCandidates.filter((pokemon) => pokemon.isForm && !pokemon.isFemaleForm && !pokemon.isGmax && pokemonTypesMatch(record, pokemon) && pokemonStatsMatch(record, pokemon) && localPokemonNameMatchesFormName(pokemon, normalizedFormName));
32615
+ const matches = localCandidates.filter((pokemon) => pokemon.isForm && !(pokemon.isFemaleForm && pokemon.isCosmeticForm) && !pokemon.isGmax && pokemonTypesMatch(record, pokemon) && pokemonStatsMatch(record, pokemon) && localPokemonNameMatchesFormName(pokemon, normalizedFormName));
32616
32616
  if (matches.length !== 1) throw new Error(`Expected one local Pokemon match for Champions ${record.id} "${formName}", found ${matches.length}`);
32617
32617
  return matches.map((pokemon) => pokemon.id);
32618
32618
  }
@@ -33080,4 +33080,4 @@ console.log([
33080
33080
  //#endregion
33081
33081
  export {};
33082
33082
 
33083
- //# sourceMappingURL=build-DvGzwIK8.mjs.map
33083
+ //# sourceMappingURL=build-D2oPkkzJ.mjs.map