{"version":"1.0","type":"rich","title":"Treasure Chest - Private Class Features","description":"This example demonstrates a JavaScript class called `TreasureChest` that manages private bronze, silver, and gold coin counts, along with a customizable loot message. The code uses ECMAScript private class features (denoted by `#` prefixes) for instance properties and methods, including a static `#shuffle` utility and an `#emit` method that dispatches custom events like `treasure:bronze`. Public methods such as `addBronze`, `addSilver`, and `addGold` update the private values and trigger events, while `getLoot` returns a formatted string with the current totals. The interaction is intended to occur through the browser’s console, with no visual rendering or external data sources.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-268bc27a6544bd33c3369a95a1030ba8?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}