UPD2:
Ki.state.bloom.inventory.forEach(((n,i)=>{a===n.type&&e>n.tier&&n.tier>t&&(t=n.tier,r=i)}))
should be
Ki.state.bloom.inventory.forEach(((n,i)=>{a===n.type&&e>n.tier&&t>n.tier&&(t=n.tier,r=i)}))
I created a PR in the source repo to fix this. The code you suggest seems to be the minimized source, not the source from the repo.
https://github.com/Tendsty/gooboo/pull/49