A 2D porous pentiptycene-based MOF for efficient detection of Ba2+ and selective adsorption of dyes from water