playlist-data-engine 1.1.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/LICENSE +21 -0
- package/README.md +352 -0
- package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
- package/dist/constants/DefaultClasses.d.ts +46 -0
- package/dist/constants/DefaultClasses.d.ts.map +1 -0
- package/dist/constants/DefaultEnchantments.d.ts +337 -0
- package/dist/constants/DefaultEnchantments.d.ts.map +1 -0
- package/dist/constants/DefaultEnemies.d.ts +83 -0
- package/dist/constants/DefaultEnemies.d.ts.map +1 -0
- package/dist/constants/DefaultEquipment.d.ts +23 -0
- package/dist/constants/DefaultEquipment.d.ts.map +1 -0
- package/dist/constants/DefaultFeatures.d.ts +22 -0
- package/dist/constants/DefaultFeatures.d.ts.map +1 -0
- package/dist/constants/DefaultRaces.d.ts +102 -0
- package/dist/constants/DefaultRaces.d.ts.map +1 -0
- package/dist/constants/DefaultSkills.d.ts +26 -0
- package/dist/constants/DefaultSkills.d.ts.map +1 -0
- package/dist/constants/DefaultSpells.d.ts +41 -0
- package/dist/constants/DefaultSpells.d.ts.map +1 -0
- package/dist/constants/EncounterBalance.d.ts +208 -0
- package/dist/constants/EncounterBalance.d.ts.map +1 -0
- package/dist/constants/EnemyEquipment.d.ts +71 -0
- package/dist/constants/EnemyEquipment.d.ts.map +1 -0
- package/dist/constants/EnemyRarity.d.ts +79 -0
- package/dist/constants/EnemyRarity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts +68 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts +64 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts +62 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts +61 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts.map +1 -0
- package/dist/constants/ItemTemplates.d.ts +40 -0
- package/dist/constants/ItemTemplates.d.ts.map +1 -0
- package/dist/constants/MagicItems.d.ts +30 -0
- package/dist/constants/MagicItems.d.ts.map +1 -0
- package/dist/constants/SpellSlots.d.ts +30 -0
- package/dist/constants/SpellSlots.d.ts.map +1 -0
- package/dist/constants/StatScaling.d.ts +113 -0
- package/dist/constants/StatScaling.d.ts.map +1 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts +599 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/ColorExtractor.d.ts +64 -0
- package/dist/core/analysis/ColorExtractor.d.ts.map +1 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts +282 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/LevelSerializer.d.ts +265 -0
- package/dist/core/analysis/LevelSerializer.d.ts.map +1 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts +283 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts +214 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MusicClassifier.d.ts +524 -0
- package/dist/core/analysis/MusicClassifier.d.ts.map +1 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts +266 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/PitchDetector.d.ts +251 -0
- package/dist/core/analysis/PitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/SpectrumScanner.d.ts +52 -0
- package/dist/core/analysis/SpectrumScanner.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts +477 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts +170 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatStream.d.ts +316 -0
- package/dist/core/analysis/beat/BeatStream.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts +205 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts +137 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts.map +1 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts +180 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts +246 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts +1082 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts +192 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts +133 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts.map +1 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts +230 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts +399 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts +262 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts.map +1 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts +275 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts +256 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts +220 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts +303 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts +180 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts.map +1 -0
- package/dist/core/analysis/beat/index.d.ts +41 -0
- package/dist/core/analysis/beat/index.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts +204 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts +404 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts +61 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts +33 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/index.d.ts +18 -0
- package/dist/core/analysis/index.d.ts.map +1 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts +108 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatAI.d.ts +179 -0
- package/dist/core/combat/AI/CombatAI.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts +30 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts.map +1 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts +170 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts +231 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts +203 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts +201 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts.map +1 -0
- package/dist/core/combat/AttackResolver.d.ts +220 -0
- package/dist/core/combat/AttackResolver.d.ts.map +1 -0
- package/dist/core/combat/CombatEngine.d.ts +388 -0
- package/dist/core/combat/CombatEngine.d.ts.map +1 -0
- package/dist/core/combat/DiceRoller.d.ts +115 -0
- package/dist/core/combat/DiceRoller.d.ts.map +1 -0
- package/dist/core/combat/InitiativeRoller.d.ts +62 -0
- package/dist/core/combat/InitiativeRoller.d.ts.map +1 -0
- package/dist/core/combat/PartyAnalyzer.d.ts +215 -0
- package/dist/core/combat/PartyAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/SeededDiceRoller.d.ts +120 -0
- package/dist/core/combat/SeededDiceRoller.d.ts.map +1 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts +366 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts.map +1 -0
- package/dist/core/combat/SpellCaster.d.ts +113 -0
- package/dist/core/combat/SpellCaster.d.ts.map +1 -0
- package/dist/core/config/index.d.ts +24 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/progressionConfig.d.ts +73 -0
- package/dist/core/config/progressionConfig.d.ts.map +1 -0
- package/dist/core/config/sensorConfig.d.ts +134 -0
- package/dist/core/config/sensorConfig.d.ts.map +1 -0
- package/dist/core/equipment/BoxOpener.d.ts +175 -0
- package/dist/core/equipment/BoxOpener.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts +189 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentModifier.d.ts +327 -0
- package/dist/core/equipment/EquipmentModifier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts +246 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentValidator.d.ts +173 -0
- package/dist/core/equipment/EquipmentValidator.d.ts.map +1 -0
- package/dist/core/extensions/ExtensionManager.d.ts +517 -0
- package/dist/core/extensions/ExtensionManager.d.ts.map +1 -0
- package/dist/core/extensions/WeightedSelector.d.ts +156 -0
- package/dist/core/extensions/WeightedSelector.d.ts.map +1 -0
- package/dist/core/extensions/index.d.ts +11 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/initializeDefaults.d.ts +170 -0
- package/dist/core/extensions/initializeDefaults.d.ts.map +1 -0
- package/dist/core/features/FeatureEffectApplier.d.ts +102 -0
- package/dist/core/features/FeatureEffectApplier.d.ts.map +1 -0
- package/dist/core/features/FeatureQuery.d.ts +368 -0
- package/dist/core/features/FeatureQuery.d.ts.map +1 -0
- package/dist/core/features/FeatureTypes.d.ts +199 -0
- package/dist/core/features/FeatureTypes.d.ts.map +1 -0
- package/dist/core/features/FeatureValidator.d.ts +149 -0
- package/dist/core/features/FeatureValidator.d.ts.map +1 -0
- package/dist/core/features/index.d.ts +12 -0
- package/dist/core/features/index.d.ts.map +1 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts +83 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts.map +1 -0
- package/dist/core/generation/AppearanceGenerator.d.ts +32 -0
- package/dist/core/generation/AppearanceGenerator.d.ts.map +1 -0
- package/dist/core/generation/BeatConverter.d.ts +127 -0
- package/dist/core/generation/BeatConverter.d.ts.map +1 -0
- package/dist/core/generation/ButtonMapper.d.ts +346 -0
- package/dist/core/generation/ButtonMapper.d.ts.map +1 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts +92 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts.map +1 -0
- package/dist/core/generation/CRLevelConverter.d.ts +242 -0
- package/dist/core/generation/CRLevelConverter.d.ts.map +1 -0
- package/dist/core/generation/CharacterGenerator.d.ts +194 -0
- package/dist/core/generation/CharacterGenerator.d.ts.map +1 -0
- package/dist/core/generation/ClassSuggester.d.ts +184 -0
- package/dist/core/generation/ClassSuggester.d.ts.map +1 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts +151 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/EnemyGenerator.d.ts +595 -0
- package/dist/core/generation/EnemyGenerator.d.ts.map +1 -0
- package/dist/core/generation/EquipmentGenerator.d.ts +204 -0
- package/dist/core/generation/EquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/LegendaryGenerator.d.ts +213 -0
- package/dist/core/generation/LegendaryGenerator.d.ts.map +1 -0
- package/dist/core/generation/LevelGenerator.d.ts +390 -0
- package/dist/core/generation/LevelGenerator.d.ts.map +1 -0
- package/dist/core/generation/NamingEngine.d.ts +136 -0
- package/dist/core/generation/NamingEngine.d.ts.map +1 -0
- package/dist/core/generation/PitchBeatLinker.d.ts +150 -0
- package/dist/core/generation/PitchBeatLinker.d.ts.map +1 -0
- package/dist/core/generation/RaceSelector.d.ts +58 -0
- package/dist/core/generation/RaceSelector.d.ts.map +1 -0
- package/dist/core/generation/RhythmGenerator.d.ts +597 -0
- package/dist/core/generation/RhythmGenerator.d.ts.map +1 -0
- package/dist/core/generation/SkillAssigner.d.ts +78 -0
- package/dist/core/generation/SkillAssigner.d.ts.map +1 -0
- package/dist/core/generation/SpellManager.d.ts +132 -0
- package/dist/core/generation/SpellManager.d.ts.map +1 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts +255 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts.map +1 -0
- package/dist/core/generation/index.d.ts +41 -0
- package/dist/core/generation/index.d.ts.map +1 -0
- package/dist/core/parser/MetadataExtractor.d.ts +66 -0
- package/dist/core/parser/MetadataExtractor.d.ts.map +1 -0
- package/dist/core/parser/PlaylistParser.d.ts +45 -0
- package/dist/core/parser/PlaylistParser.d.ts.map +1 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts +333 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts.map +1 -0
- package/dist/core/playback/index.d.ts +5 -0
- package/dist/core/playback/index.d.ts.map +1 -0
- package/dist/core/progression/CharacterUpdater.d.ts +203 -0
- package/dist/core/progression/CharacterUpdater.d.ts.map +1 -0
- package/dist/core/progression/LevelUpProcessor.d.ts +234 -0
- package/dist/core/progression/LevelUpProcessor.d.ts.map +1 -0
- package/dist/core/progression/PrestigeSystem.d.ts +217 -0
- package/dist/core/progression/PrestigeSystem.d.ts.map +1 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts +182 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts.map +1 -0
- package/dist/core/progression/SessionTracker.d.ts +169 -0
- package/dist/core/progression/SessionTracker.d.ts.map +1 -0
- package/dist/core/progression/XPCalculator.d.ts +128 -0
- package/dist/core/progression/XPCalculator.d.ts.map +1 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts +97 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts.map +1 -0
- package/dist/core/progression/stat/StatManager.d.ts +179 -0
- package/dist/core/progression/stat/StatManager.d.ts.map +1 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts +301 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts.map +1 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts +162 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts.map +1 -0
- package/dist/core/sensors/GeolocationProvider.d.ts +156 -0
- package/dist/core/sensors/GeolocationProvider.d.ts.map +1 -0
- package/dist/core/sensors/MotionDetector.d.ts +58 -0
- package/dist/core/sensors/MotionDetector.d.ts.map +1 -0
- package/dist/core/sensors/SteamAPIClient.d.ts +108 -0
- package/dist/core/sensors/SteamAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts +360 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts +144 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts.map +1 -0
- package/dist/core/skills/SkillQuery.d.ts +159 -0
- package/dist/core/skills/SkillQuery.d.ts.map +1 -0
- package/dist/core/skills/SkillTypes.d.ts +233 -0
- package/dist/core/skills/SkillTypes.d.ts.map +1 -0
- package/dist/core/skills/SkillValidator.d.ts +146 -0
- package/dist/core/skills/SkillValidator.d.ts.map +1 -0
- package/dist/core/skills/index.d.ts +11 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/spells/SpellQuery.d.ts +194 -0
- package/dist/core/spells/SpellQuery.d.ts.map +1 -0
- package/dist/core/spells/SpellTypes.d.ts +71 -0
- package/dist/core/spells/SpellTypes.d.ts.map +1 -0
- package/dist/core/spells/SpellValidator.d.ts +129 -0
- package/dist/core/spells/SpellValidator.d.ts.map +1 -0
- package/dist/core/spells/index.d.ts +11 -0
- package/dist/core/spells/index.d.ts.map +1 -0
- package/dist/core/types/AudioProfile.d.ts +143 -0
- package/dist/core/types/AudioProfile.d.ts.map +1 -0
- package/dist/core/types/BeatMap.d.ts +1825 -0
- package/dist/core/types/BeatMap.d.ts.map +1 -0
- package/dist/core/types/ButtonMapping.d.ts +345 -0
- package/dist/core/types/ButtonMapping.d.ts.map +1 -0
- package/dist/core/types/Character.d.ts +397 -0
- package/dist/core/types/Character.d.ts.map +1 -0
- package/dist/core/types/ChartedBeatMap.d.ts +169 -0
- package/dist/core/types/ChartedBeatMap.d.ts.map +1 -0
- package/dist/core/types/Combat.d.ts +268 -0
- package/dist/core/types/Combat.d.ts.map +1 -0
- package/dist/core/types/CombatAI.d.ts +143 -0
- package/dist/core/types/CombatAI.d.ts.map +1 -0
- package/dist/core/types/Enemy.d.ts +447 -0
- package/dist/core/types/Enemy.d.ts.map +1 -0
- package/dist/core/types/Environmental.d.ts +213 -0
- package/dist/core/types/Environmental.d.ts.map +1 -0
- package/dist/core/types/Equipment.d.ts +309 -0
- package/dist/core/types/Equipment.d.ts.map +1 -0
- package/dist/core/types/ISessionTracker.d.ts +48 -0
- package/dist/core/types/ISessionTracker.d.ts.map +1 -0
- package/dist/core/types/LevelExport.d.ts +366 -0
- package/dist/core/types/LevelExport.d.ts.map +1 -0
- package/dist/core/types/Playlist.d.ts +70 -0
- package/dist/core/types/Playlist.d.ts.map +1 -0
- package/dist/core/types/Prestige.d.ts +94 -0
- package/dist/core/types/Prestige.d.ts.map +1 -0
- package/dist/core/types/Progression.d.ts +214 -0
- package/dist/core/types/Progression.d.ts.map +1 -0
- package/dist/core/types/RhythmXP.d.ts +398 -0
- package/dist/core/types/RhythmXP.d.ts.map +1 -0
- package/dist/core/utils/AbilityConstants.d.ts +31 -0
- package/dist/core/utils/AbilityConstants.d.ts.map +1 -0
- package/dist/core/utils/EffectApplierUtils.d.ts +56 -0
- package/dist/core/utils/EffectApplierUtils.d.ts.map +1 -0
- package/dist/core/utils/ImageValidator.d.ts +66 -0
- package/dist/core/utils/ImageValidator.d.ts.map +1 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts +88 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts.map +1 -0
- package/dist/essentia-wasm.es-BUEnKUts.js +2990 -0
- package/dist/essentia.js-model.es-CGA0xotH.js +306 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/playlist-data-engine.js +124 -0
- package/dist/playlist-data-engine.mjs +49251 -0
- package/dist/utils/EnchantmentLibrary.d.ts +378 -0
- package/dist/utils/EnchantmentLibrary.d.ts.map +1 -0
- package/dist/utils/arweaveGatewayManager.d.ts +485 -0
- package/dist/utils/arweaveGatewayManager.d.ts.map +1 -0
- package/dist/utils/arweaveUtils.d.ts +118 -0
- package/dist/utils/arweaveUtils.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +439 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/equipmentConstants.d.ts +60 -0
- package/dist/utils/equipmentConstants.d.ts.map +1 -0
- package/dist/utils/hash.d.ts +33 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +192 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/magicItemExamples.d.ts +46 -0
- package/dist/utils/magicItemExamples.d.ts.map +1 -0
- package/dist/utils/playlistUtils.d.ts +149 -0
- package/dist/utils/playlistUtils.d.ts.map +1 -0
- package/dist/utils/random.d.ts +34 -0
- package/dist/utils/random.d.ts.map +1 -0
- package/dist/utils/sensorDashboard.d.ts +60 -0
- package/dist/utils/sensorDashboard.d.ts.map +1 -0
- package/dist/utils/validators.d.ts +189 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EquipmentGenerator - Manages equipment assignment, inventory, and equipped items
|
|
3
|
+
*
|
|
4
|
+
* Supports extensibility through ExtensionManager for custom equipment.
|
|
5
|
+
* All equipment lookups check both default and custom equipment databases.
|
|
6
|
+
*
|
|
7
|
+
* Enhanced to support equipment properties, effects, modifications, and D&D 5e stats.
|
|
8
|
+
*/
|
|
9
|
+
import type { Class, CharacterSheet } from '../types/Character.js';
|
|
10
|
+
import type { CharacterEquipment, EnhancedEquipment, EnhancedInventoryItem, EquipmentProperty, EquipmentModification } from '../types/Equipment.js';
|
|
11
|
+
/**
|
|
12
|
+
* Basic equipment data interface (for backward compatibility)
|
|
13
|
+
*/
|
|
14
|
+
export interface Equipment {
|
|
15
|
+
name: string;
|
|
16
|
+
type: 'weapon' | 'armor' | 'item' | 'box';
|
|
17
|
+
rarity: 'common' | 'uncommon' | 'rare' | 'very_rare' | 'legendary';
|
|
18
|
+
weight: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Inventory item with quantity (basic version, for backward compatibility)
|
|
22
|
+
*/
|
|
23
|
+
export interface InventoryItem {
|
|
24
|
+
name: string;
|
|
25
|
+
quantity: number;
|
|
26
|
+
equipped: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare class EquipmentGenerator {
|
|
29
|
+
/**
|
|
30
|
+
* Ensure equipment defaults are initialized
|
|
31
|
+
* Safe to call multiple times
|
|
32
|
+
*/
|
|
33
|
+
private static ensureInitialized;
|
|
34
|
+
/**
|
|
35
|
+
* Get equipment data from extended database (defaults + custom)
|
|
36
|
+
*
|
|
37
|
+
* Public static method for external access.
|
|
38
|
+
*
|
|
39
|
+
* @param itemName - Name of the equipment to look up
|
|
40
|
+
* @returns EnhancedEquipment data or undefined if not found
|
|
41
|
+
*/
|
|
42
|
+
static getEquipmentDataStatic(itemName: string): EnhancedEquipment | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Get equipment data from extended database (defaults + custom)
|
|
45
|
+
*
|
|
46
|
+
* @param itemName - Name of the equipment to look up
|
|
47
|
+
* @returns EnhancedEquipment data or undefined if not found
|
|
48
|
+
*/
|
|
49
|
+
private static getEquipmentData;
|
|
50
|
+
/**
|
|
51
|
+
* Get starting equipment for a class
|
|
52
|
+
*
|
|
53
|
+
* Supports custom classes registered via the 'classStartingEquipment.${ClassName}' category in ExtensionManager.
|
|
54
|
+
*
|
|
55
|
+
* @param characterClass - The character's class
|
|
56
|
+
* @returns Object with weapons, armor, and items arrays
|
|
57
|
+
*/
|
|
58
|
+
static getStartingEquipment(characterClass: Class): {
|
|
59
|
+
weapons: string[];
|
|
60
|
+
armor: string[];
|
|
61
|
+
items: string[];
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Initialize complete equipment for a character
|
|
65
|
+
*
|
|
66
|
+
* @param characterClass - The character's class
|
|
67
|
+
* @returns CharacterEquipment with starting gear in inventory
|
|
68
|
+
*/
|
|
69
|
+
static initializeEquipment(characterClass: Class): CharacterEquipment;
|
|
70
|
+
/**
|
|
71
|
+
* Add an item to inventory
|
|
72
|
+
*
|
|
73
|
+
* @param equipment - Current equipment state
|
|
74
|
+
* @param itemName - Name of item to add
|
|
75
|
+
* @param quantity - Quantity to add (default: 1)
|
|
76
|
+
* @returns Updated equipment with new item
|
|
77
|
+
*/
|
|
78
|
+
static addItem(equipment: CharacterEquipment, itemName: string, quantity?: number): CharacterEquipment;
|
|
79
|
+
/**
|
|
80
|
+
* Remove an item from inventory
|
|
81
|
+
*
|
|
82
|
+
* @param equipment - Current equipment state
|
|
83
|
+
* @param itemName - Name of item to remove
|
|
84
|
+
* @param quantity - Quantity to remove (default: 1)
|
|
85
|
+
* @returns Updated equipment with item removed
|
|
86
|
+
*/
|
|
87
|
+
static removeItem(equipment: CharacterEquipment, itemName: string, quantity?: number): CharacterEquipment;
|
|
88
|
+
/**
|
|
89
|
+
* Equip an item from inventory
|
|
90
|
+
*
|
|
91
|
+
* @param equipment - Current equipment state
|
|
92
|
+
* @param itemName - Name of item to equip
|
|
93
|
+
* @param character - Optional character to apply equipment effects to
|
|
94
|
+
* @returns Updated equipment with item equipped
|
|
95
|
+
*/
|
|
96
|
+
static equipItem(equipment: CharacterEquipment, itemName: string, character?: CharacterSheet): CharacterEquipment;
|
|
97
|
+
/**
|
|
98
|
+
* Unequip an item
|
|
99
|
+
*
|
|
100
|
+
* @param equipment - Current equipment state
|
|
101
|
+
* @param itemName - Name of item to unequip
|
|
102
|
+
* @param character - Optional character to remove equipment effects from
|
|
103
|
+
* @returns Updated equipment with item unequipped
|
|
104
|
+
*/
|
|
105
|
+
static unequipItem(equipment: CharacterEquipment, itemName: string, character?: CharacterSheet): CharacterEquipment;
|
|
106
|
+
/**
|
|
107
|
+
* Get inventory as flattened list
|
|
108
|
+
*
|
|
109
|
+
* @param equipment - Current equipment state
|
|
110
|
+
* @returns Array of all inventory items
|
|
111
|
+
*/
|
|
112
|
+
static getInventoryList(equipment: CharacterEquipment): EnhancedInventoryItem[];
|
|
113
|
+
/**
|
|
114
|
+
* Get equipment by type
|
|
115
|
+
*
|
|
116
|
+
* Utility method to retrieve a specific equipment category (weapons, armor, or items)
|
|
117
|
+
* from a CharacterEquipment object.
|
|
118
|
+
*
|
|
119
|
+
* @param equipment - Current equipment state
|
|
120
|
+
* @param type - Equipment category to retrieve
|
|
121
|
+
* @returns Array of inventory items for the specified type
|
|
122
|
+
*/
|
|
123
|
+
static getEquipmentByType(equipment: CharacterEquipment, type: 'weapons' | 'armor' | 'items'): EnhancedInventoryItem[];
|
|
124
|
+
/**
|
|
125
|
+
* Calculate total weight of all equipment
|
|
126
|
+
*
|
|
127
|
+
* @param weapons - Weapon inventory
|
|
128
|
+
* @param armor - Armor inventory
|
|
129
|
+
* @param items - Item inventory
|
|
130
|
+
* @returns Total weight in pounds
|
|
131
|
+
*/
|
|
132
|
+
private static calculateTotalWeight;
|
|
133
|
+
/**
|
|
134
|
+
* Calculate weight of equipped items only
|
|
135
|
+
*
|
|
136
|
+
* @param weapons - Weapon inventory
|
|
137
|
+
* @param armor - Armor inventory
|
|
138
|
+
* @param items - Item inventory
|
|
139
|
+
* @returns Total equipped weight in pounds
|
|
140
|
+
*/
|
|
141
|
+
private static calculateEquippedWeight;
|
|
142
|
+
/**
|
|
143
|
+
* Create a deep clone of equipment state
|
|
144
|
+
*
|
|
145
|
+
* @param equipment - Equipment to clone
|
|
146
|
+
* @returns Cloned equipment
|
|
147
|
+
*/
|
|
148
|
+
private static cloneEquipment;
|
|
149
|
+
/**
|
|
150
|
+
* Get the type of ammunition a class uses based on their starting weapons
|
|
151
|
+
*
|
|
152
|
+
* @param characterClass - The character's class
|
|
153
|
+
* @param weapons - Array of weapon names the class starts with
|
|
154
|
+
* @returns Ammunition type ('Arrow', 'Bolt', etc.) or null if not applicable
|
|
155
|
+
*/
|
|
156
|
+
private static getAmmunitionType;
|
|
157
|
+
/**
|
|
158
|
+
* Get the quantity of ammunition a class starts with
|
|
159
|
+
*
|
|
160
|
+
* @param characterClass - The character's class
|
|
161
|
+
* @returns Number of ammunition items
|
|
162
|
+
*/
|
|
163
|
+
private static getAmmunitionQuantity;
|
|
164
|
+
/**
|
|
165
|
+
* Add a modification to an equipment item (per-instance)
|
|
166
|
+
*
|
|
167
|
+
* @param equipment - Current equipment state
|
|
168
|
+
* @param itemName - Name of the item to modify
|
|
169
|
+
* @param modification - The modification to apply
|
|
170
|
+
* @param instanceId - Optional instance ID (for multi-item tracking)
|
|
171
|
+
* @param character - Optional character to reapply effects to
|
|
172
|
+
* @returns Updated equipment with modification applied
|
|
173
|
+
*/
|
|
174
|
+
static addModification(equipment: CharacterEquipment, itemName: string, modification: EquipmentModification, instanceId?: string, character?: CharacterSheet): CharacterEquipment;
|
|
175
|
+
/**
|
|
176
|
+
* Remove a modification from an equipment item
|
|
177
|
+
*
|
|
178
|
+
* @param equipment - Current equipment state
|
|
179
|
+
* @param itemName - Name of the item
|
|
180
|
+
* @param modificationId - ID of the modification to remove
|
|
181
|
+
* @param character - Optional character to reapply effects to
|
|
182
|
+
* @returns Updated equipment with modification removed
|
|
183
|
+
*/
|
|
184
|
+
static removeModification(equipment: CharacterEquipment, itemName: string, modificationId: string, character?: CharacterSheet): CharacterEquipment;
|
|
185
|
+
/**
|
|
186
|
+
* Get all active effects from an equipment item (base + modifications)
|
|
187
|
+
*
|
|
188
|
+
* @param equipment - Current equipment state
|
|
189
|
+
* @param itemName - Name of the item
|
|
190
|
+
* @param instanceId - Optional instance ID
|
|
191
|
+
* @returns Array of all active equipment properties
|
|
192
|
+
*/
|
|
193
|
+
static getActiveEffects(equipment: CharacterEquipment, itemName: string, instanceId?: string): EquipmentProperty[];
|
|
194
|
+
/**
|
|
195
|
+
* Apply combined effects from base equipment and modifications
|
|
196
|
+
*
|
|
197
|
+
* @param character - Character to apply effects to
|
|
198
|
+
* @param baseEquipment - Base equipment data
|
|
199
|
+
* @param modification - Modification to apply
|
|
200
|
+
* @param instanceId - Instance ID for tracking
|
|
201
|
+
*/
|
|
202
|
+
private static applyCombinedEffects;
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=EquipmentGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EquipmentGenerator.d.ts","sourceRoot":"","sources":["../../../src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AkB,EAC7B,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,SAAS,CAAC,EAAE,cAAc,GACzB,kBAAkB;IAmDrB;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,SAAS,EAAE,kBAAkB,EAC7B,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,iBAAiB,EAAE;IAsCtB;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;CAoBpC"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LegendaryGenerator - Generates legendary actions and resistances for boss enemies
|
|
3
|
+
*
|
|
4
|
+
* Provides legendary action generation with:
|
|
5
|
+
* - Deterministic seeded generation
|
|
6
|
+
* - Archetype-appropriate action selection
|
|
7
|
+
* - Configurable legendary resistances per CR tier
|
|
8
|
+
*/
|
|
9
|
+
import type { EnemyArchetype, EnemyRarity } from '../types/Enemy.js';
|
|
10
|
+
import { SeededRNG } from '../../utils/random.js';
|
|
11
|
+
/**
|
|
12
|
+
* Legendary action that a boss can perform
|
|
13
|
+
*
|
|
14
|
+
* Legendary actions are special abilities that boss enemies can use at the end
|
|
15
|
+
* of another creature's turn, spending legendary action points (typically 3 per round).
|
|
16
|
+
*/
|
|
17
|
+
export interface LegendaryAction {
|
|
18
|
+
/** Unique identifier for this action */
|
|
19
|
+
id: string;
|
|
20
|
+
/** Display name shown to players */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Detailed description of what the action does */
|
|
23
|
+
description: string;
|
|
24
|
+
/** Cost in legendary action points (1, 2, or 3) */
|
|
25
|
+
cost: number;
|
|
26
|
+
/** Effect description for combat system */
|
|
27
|
+
effect: string;
|
|
28
|
+
/** Damage dice if this action deals damage */
|
|
29
|
+
damage?: string;
|
|
30
|
+
/** Damage type for damaging actions */
|
|
31
|
+
damageType?: string;
|
|
32
|
+
/** Archetypes this action is appropriate for */
|
|
33
|
+
archetypes: EnemyArchetype[];
|
|
34
|
+
/** Tags for filtering and categorization */
|
|
35
|
+
tags?: string[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Legendary configuration for a boss enemy
|
|
39
|
+
*
|
|
40
|
+
* Contains all legendary-specific data for a boss-tier enemy.
|
|
41
|
+
*/
|
|
42
|
+
export interface LegendaryConfig {
|
|
43
|
+
/** Number of legendary resistances per day (usually 3) */
|
|
44
|
+
resistances: number;
|
|
45
|
+
/** Array of legendary actions available to this boss */
|
|
46
|
+
actions: LegendaryAction[];
|
|
47
|
+
/** Optional lair action hint for encounter design */
|
|
48
|
+
lairActionHint?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Legendary action pool organized by archetype
|
|
52
|
+
*
|
|
53
|
+
* Each archetype has a pool of legendary actions to choose from.
|
|
54
|
+
* Boss enemies receive 3 legendary actions selected from their archetype pool,
|
|
55
|
+
* with at least one movement option guaranteed.
|
|
56
|
+
*/
|
|
57
|
+
export declare const LEGENDARY_ACTIONS: Record<EnemyArchetype, LegendaryAction[]>;
|
|
58
|
+
/**
|
|
59
|
+
* Legendary resistances per CR tier
|
|
60
|
+
*
|
|
61
|
+
* Bosses gain a number of legendary resistances per day (typically 3).
|
|
62
|
+
* Higher CR bosses may have more legendary resistances.
|
|
63
|
+
*/
|
|
64
|
+
export declare const LEGENDARY_RESISTANCES: Record<number, number>;
|
|
65
|
+
/**
|
|
66
|
+
* Legendary action count per boss tier
|
|
67
|
+
*
|
|
68
|
+
* Defines how many legendary actions a boss receives (always 3 for standard bosses).
|
|
69
|
+
*/
|
|
70
|
+
export declare const LEGENDARY_ACTION_COUNT = 3;
|
|
71
|
+
/**
|
|
72
|
+
* LegendaryGenerator - Static class for legendary action generation
|
|
73
|
+
*
|
|
74
|
+
* Generates legendary actions and resistances for boss-tier enemies.
|
|
75
|
+
* All generation is deterministic based on the provided seed.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const legendary = LegendaryGenerator.generate({
|
|
80
|
+
* archetype: 'brute',
|
|
81
|
+
* cr: 8,
|
|
82
|
+
* seed: 'dragon-lair-1'
|
|
83
|
+
* });
|
|
84
|
+
* // Returns: { resistances: 3, actions: [...], lairActionHint?: string }
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export declare class LegendaryGenerator {
|
|
88
|
+
/**
|
|
89
|
+
* Generate legendary configuration for a boss enemy
|
|
90
|
+
*
|
|
91
|
+
* Selects 3 legendary actions for the boss based on archetype,
|
|
92
|
+
* with at least one movement option guaranteed.
|
|
93
|
+
*
|
|
94
|
+
* @param options - Generation options
|
|
95
|
+
* @returns Legendary configuration with actions and resistances
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const config = LegendaryGenerator.generate({
|
|
100
|
+
* archetype: 'brute',
|
|
101
|
+
* cr: 8,
|
|
102
|
+
* seed: 'boss-1'
|
|
103
|
+
* });
|
|
104
|
+
* console.log(config.actions); // 3 legendary actions
|
|
105
|
+
* console.log(config.resistances); // 3 per day
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
static generate(options: {
|
|
109
|
+
archetype: EnemyArchetype;
|
|
110
|
+
cr: number;
|
|
111
|
+
seed: string;
|
|
112
|
+
}): LegendaryConfig;
|
|
113
|
+
/**
|
|
114
|
+
* Generate legendary configuration using an existing SeededRNG instance
|
|
115
|
+
*
|
|
116
|
+
* Same as generate() but accepts a pre-existing RNG for internal use.
|
|
117
|
+
*
|
|
118
|
+
* @param options - Generation options with RNG instance
|
|
119
|
+
* @returns Legendary configuration
|
|
120
|
+
*/
|
|
121
|
+
static generateWithRNG(options: {
|
|
122
|
+
archetype: EnemyArchetype;
|
|
123
|
+
cr: number;
|
|
124
|
+
rng: SeededRNG;
|
|
125
|
+
}): LegendaryConfig;
|
|
126
|
+
/**
|
|
127
|
+
* Select legendary actions from the available pool
|
|
128
|
+
*
|
|
129
|
+
* Selects exactly 3 legendary actions with the following rules:
|
|
130
|
+
* - At least one movement option (tags include 'movement')
|
|
131
|
+
* - Actions are selected without replacement
|
|
132
|
+
* - Uses weighted selection favoring variety
|
|
133
|
+
*
|
|
134
|
+
* @param availableActions - Pool of actions to select from
|
|
135
|
+
* @param rng - Seeded RNG for deterministic selection
|
|
136
|
+
* @returns Array of 3 legendary actions
|
|
137
|
+
*/
|
|
138
|
+
private static selectLegendaryActions;
|
|
139
|
+
/**
|
|
140
|
+
* Get legendary resistances for a given CR
|
|
141
|
+
*
|
|
142
|
+
* Returns the number of legendary resistances per day based on CR.
|
|
143
|
+
* Uses the closest CR tier (rounds up for in-between values).
|
|
144
|
+
*
|
|
145
|
+
* @param cr - Challenge rating
|
|
146
|
+
* @returns Number of legendary resistances per day
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```typescript
|
|
150
|
+
* LegendaryGenerator.getResistancesForCR(5); // 3
|
|
151
|
+
* LegendaryGenerator.getResistancesForCR(12); // 4
|
|
152
|
+
* LegendaryGenerator.getResistancesForCR(20); // 5
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
static getResistancesForCR(cr: number): number;
|
|
156
|
+
/**
|
|
157
|
+
* Generate a lair action hint for encounter design
|
|
158
|
+
*
|
|
159
|
+
* Creates a brief description of what lair actions this boss
|
|
160
|
+
* might have, for use by game masters when designing encounters.
|
|
161
|
+
*
|
|
162
|
+
* @param archetype - Boss archetype for thematic hints
|
|
163
|
+
* @param rng - Seeded RNG
|
|
164
|
+
* @returns Lair action hint string
|
|
165
|
+
*/
|
|
166
|
+
private static generateLairActionHint;
|
|
167
|
+
/**
|
|
168
|
+
* Get legendary action by ID
|
|
169
|
+
*
|
|
170
|
+
* Searches all action pools for a matching ID.
|
|
171
|
+
*
|
|
172
|
+
* @param id - Action ID to find
|
|
173
|
+
* @returns Legendary action if found, undefined otherwise
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```typescript
|
|
177
|
+
* const action = LegendaryGenerator.getActionById('teleport');
|
|
178
|
+
* console.log(action?.name); // 'Teleport'
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
static getActionById(id: string): LegendaryAction | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Get all legendary actions for an archetype
|
|
184
|
+
*
|
|
185
|
+
* Returns archetype-specific actions plus universal actions.
|
|
186
|
+
*
|
|
187
|
+
* @param archetype - Enemy archetype
|
|
188
|
+
* @returns Array of legendary actions
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```typescript
|
|
192
|
+
* const actions = LegendaryGenerator.getActionsForArchetype('brute');
|
|
193
|
+
* // Returns: [...bruteActions, ...universalActions]
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
static getActionsForArchetype(archetype: EnemyArchetype): LegendaryAction[];
|
|
197
|
+
/**
|
|
198
|
+
* Check if a rarity tier should have legendary actions
|
|
199
|
+
*
|
|
200
|
+
* Only boss rarity receives legendary actions.
|
|
201
|
+
*
|
|
202
|
+
* @param rarity - Enemy rarity tier
|
|
203
|
+
* @returns True if rarity should have legendary actions
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```typescript
|
|
207
|
+
* LegendaryGenerator.shouldHaveLegendary('boss'); // true
|
|
208
|
+
* LegendaryGenerator.shouldHaveLegendary('elite'); // false
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
static shouldHaveLegendary(rarity: EnemyRarity): boolean;
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=LegendaryGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendaryGenerator.d.ts","sourceRoot":"","sources":["../../../src/core/generation/LegendaryGenerator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,SAAS,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