An efficient intermolecular [Pd]-catalyzed C–C and intramolecular [Cu]-catalyzed C–O bonds formation: synthesis of functionalized flavans and benzoxepine