FULL INSIDE STORY! Gripped by dementia, the beloved TV star is wasting away and is said to be on her deathbed.

Sadly, Mary’s battle with diabetes, kidney and heart disease – as well as Alzheimer’s and dementia-related symptoms – is nearing an end, sources say.

With her eyesight and hearing nearly gone, the 77 year old’s remaining strength is fading, following a series of devastating emotional and physical blows, according to insiders.

But now family and friends are joining Mary’s devoted third husband, Dr. Robert Levine, at her bedside in the couple’s Connecticut mansion, multiple sources tell The ENQUIRER.

“Mary often can’t speak due to her deteriorating state, but at times she’s lucid and cries out from memories of her past,” said a source, sharing an intimate glimpse of her sad last days.

The once-bubbly brunette remains haunted by thoughts of her son, Richie Meeker, who tragically died at age 24 in 1980 from a self-inflicted accidental gunshot wound, said the source.

“The death of her dear Richie, which was also the name of her TV son on ‘The Dick Van Dyke Show,’ devastated Mary,” said the source.

“It’s left a lasting impact on her for more than 30 years. Now Mary longs to be at peace, and she knows that in death she’ll be reunited with her only child. She’s been heard to cry out, ‘I’ll be with my Richie soon.’”

Another source told The ENQUIRER: “Mary has been fading, but with all the will she has left, she’s refused to leave her home. She wants to pass peacefully in her bed surrounded by her husband, her pets and closest friends.

“It’s heartbreaking to see her like this – wasting away as she is – but it’s the end for Mary. She’s almost completely blind and deaf.”

As The ENQUIRER reported in its June 9 issue, sources said Mary was exhibiting symptoms similar to dementia and Alzheimer’s disease, and friends feared she could be dead in three months.

The ENQUIRER also reported friends had urged Levine, her cardiologist husband of nearly 31 years, to place Mary in a nursing home after a series of incidents and accidents sent police and medics to their $12 million gated Greenwich estate.

“But Mary refused to enter an assisted-living facility, even though it could offer round-the-clock care and possibly extend her life,” said the source. “It wasn’t what Mary wanted, and her distraught husband wanted to make her as comfortable at home as possible.”

The second source added: “Mary is at peace in her house, but she suffers from a laundry list of physical ailments that are close to taking her.

“She has heart and kidney problems, and at times, she can’t see and she can’t hear.

“She’s almost completely debilitated, and there are fears that she’ll lapse into a vegetable-like state.

“Only a miracle would bring Mary off her deathbed – and while Robert and her friends hope for recovery, it sadly looks like that won’t happen.”

Besides her physical ailments, Mary was crushed emotionally when she learned that longtime Hollywood pal James Garner, 86, had passed away on July 19.

Mary and James, the handsome hero of TV’s “Maverick” and “The Rockford Files,” co-starred in the 1984 made-for-TV movie “Heartsounds.”

“Jim was a dear friend and they grew close when they worked together,” said the source.

“Mary often reminisced about working with Jim, and always said that he was one of Hollywood’s good guys.

“They tried to keep the news that he’d passed from her, but Mary found out. She broke down afterward. I’m afraid Jim’s death reminded her that her own time was coming to an end.”

Mary was distraught that, for the second consecutive year, she was unable to attend the annual fund-raiser for Broadway Barks, the animal charity she founded with actress Bernadette Peters, said the second source.

The July 12 gala in New York’s Shubert Alley featured celebrities from Broadway’s hottest shows promoting adoption of shelter pets and raising money to benefit multiple New York City animal shelters and adoption agencies.

“Mary is a great animal lover, and it’s the one event she looks forward to every year,” said that source. “Missing it was a bitter pill for her to swallow.”

During her glittery career, Mary won two Emmys for “The Dick Van Dyke Show” in the ’60s and three for “The Mary Tyler Moore Show” in the ’70s. She starred with Elvis Presley in the 1969 film “Change of Habit” and was nominated for an Oscar for the 1980 drama “Ordinary People.”

The legendary actress was last photographed in public April 6, 2013, at Los Angeles International Airport while heading home after shooting an episode of the TV Land sitcom “Hot in Cleveland.” She appeared pale, gaunt and hollow-cheeked.

The episode reunited her with former “The Mary Tyler Moore Show” co-stars Valerie Harper, Cloris Leachman, Betty White and Georgia Engel. It aired Sept. 4, 2013, and marked Mary’s last showbiz appearance.

The Hollywood icon filmed the episode despite a years-long struggle with multiple health woes. She has battled Type 1 diabetes for four decades and suffered serious complications.

As The ENQUIRER has reported, Mary also suffered two nasty falls at her home. In one 2013 tumble, she broke her hip and fractured a shoulder. She was hospitalized and then developed pneumonia. In a previous fall, the once-perky star crashed down four stairs, shattering her collarbone and several ribs.

She also required risky surgery in May 2011 to remove a benign brain tumor.

The first source said: “Everyone is praying for the best.”