Home > CPU > CPU Buyer's Guide

Best CPUs for RX 7900 XT in 2024 – top picks from Intel and AMD

The AMD Radeon 7900 XT should have a good partner - here are our picks
Last Updated on May 13, 2024
AMD Radeon RX 7900 XT graphics card with four fans, set against a dual-tone blue and green background, featuring the "Best CPUs for RX 7900 XT" logo in the top left corner.
You can trust PC Guide: Our team of experts use a combination of independent consumer research, in-depth testing where appropriate - which will be flagged as such, and market analysis when recommending products, software and services. Find out how we test here.

We can’t deny that AMD has a lot of gamers who love their products. And the RX 7900 series may even win over Nvidia fans with its performance-per-watt and lower cost. And if you’re picking up the smaller sibling, you’ll want one of the best CPUs for RX 7900 XT in your system.

If you’re thinking about or already have an RX 7900 XT GPU, then matching it with the best CPU in the market should be your priority right now. That’s why we’ve made a list of the best CPUs for RX 7900 XT.

The 7900 XT is a 20GB GDDR6 graphics card built on the Navi 31 version of the RDNA 3 architecture. This GPU, according to AMD, achieves a 50% generational improvement in performance-per-watt, with Team Red using a TSMC 5nm node to give life to this card. To sum up, this state-of-the-art GPU needs an equally powerful CPU to deliver every bit of power it has to give.

In this guide, we have listed some of the top CPUs that will work well with the 7900 XT. 

Products at a glance

How we picked

We do as we say. We’ve considered a vast list of features in the candidates before we select them as a top pick. Among the features we use to pick the best chipset for the RX 7900 XT are: power consumption, clock speed, cache memory, price, socket type, compatibility, and cores.

You certainly won’t want a CPU that’s too old. But, you needn’t necessarily pick an AMD CPU to go with your 7900 XT either. We’ve considered Intel and AMD CPUs, to pick the best options for you.

If you’re interested in more RX 7900 XT articles, then head over to our RX 7900XT review, or our RTX 4070 vs RX 7900 XT comparison guide. Looking for more desktop processor recommendations? Then, check out our best budget CPUs article.

Best CPU for RX 7900 XT

Best CPU for RX 7900 XT
01
  • AMD Ryzen 9 7900X processor in a transparent case set beside its box on a table with a purple and pink lit background.
Excellent
4.5 /5
Editor’s Rating
How We Review
Specifications
  • Cores: 12
  • Threads : 24
  • Boost speed : up to 5.6 GHz
  • Base speed: 4.7 GHz
  • L3 Cache: 64 MB
  • TDP: 170 W
  • Platform: AMD (AM5)
What We Think

We’d say that the AMD Ryzen 9 7900X is a powerful CPU to pair with the RX 7900 XT. If you want an uncompromised, smooth performance without any bottlenecks, then we think this is the way to go.

Reasons to Buy
  • High core count (12 cores and 24 threads)
  • Great base and boost speeds
  • Uses the new AM5 socket
  • Gives you potential for future upgrades
Reasons to Avoid
  • Can run hot, might need efficient cooling
  • Power consumption is high at 170 Watts

It shouldn’t come as a surprise that the AMD GPUs work well with AMD CPUs, and that is why our top pick is the AMD Ryzen 9 7900X – one of the best AMD CPUs from that lineup.

To start with, the processor comes with 12 cores and 34 threads, which translates into effortless multitasking as well as exceptional performance for single-core tasks such as gaming. In our AMD Ryzen 9 7900X review, we found that this CPU was exceptionally at multitasking – especially the productivity tasks.

Further, it has a base clock speed of 4.7 GHz, which can be taken to 5.6 GHz. These clock speeds are really fast, and you shouldn’t feel your system or processes lagging or experience any in-game disruptions due to bottleneck issues. However, it does come unlocked for overclocking, and you should be able to take it beyond the maximum frequency for even better performance.

As far as its power draw is concerned, you know what they say: with great power comes a high TDP, and this CPU has a default TDP of 170W. While this doesn’t mean that it’ll always be drawing in 170W, it could go above that, depending on how much load it’s under. Another factor in this equation is its temperature. The more power it draws, the more heat it will generate, and it will need a better cooling solution. It is also recommended by AMD that you use a liquid cooler with this CPU, and to that end, we’ve got you covered with our best AIO water cooler guide, which has the top picks.

Overall, this CPU is a powerhouse that should deliver exceptional performance without any bottleneck issues while future-proofing your build.

PC Guide

The Ryzen 9 7900X comes with the latest AM5 socket, which works with the PCIe 5.0 express configuration. What this means is that it requires a motherboard with an AM5 socket and other components that are built for the next generation such as DDR5 memory. To make sure you’re using a compatible motherboard, we’ve put together the best AM5 motherboard guide, which has the top picks available.

Lastly, it has a 76 MB L3 and 768KB L1 cache. Previously, we’ve seen a maximum of 512 KB of L1 cache – so 768 KB feels a bit more roomy. How cache’s work is that the closer they are to the CPU, the faster they are and have a lower number. So, L1 is the fastest, and L3 is the slowest, but it can hold the most data. That is important because caches also act as repositories for all cores to access the data. So this means that more data can be accessed and processed quickly with this CPU, which should lead to better general and in-game performance.

Overall, this CPU is a powerhouse that should deliver exceptional performance without any bottleneck issues while future-proofing your build. You should easily be able to game in 4K with this pairing, but it comes at a premium and is definitely an enthusiast pick.

What users say

Based on the Amazon reviews, customers were pleased with the performance and mentioned that the CPU was easy to install. One of the reviews sums it up perfectly – ”While it’s not an i9-14900KS CPU, it’s still a great processor for high-end video editing, training artificial intelligence models, or even gaming.” However, some people think that the processor runs a little hot. Overall, users seem to be satisfied with the Ryzen 9 7900X processor as it has a 4.7-star rating.

Best Intel CPU for RX 7900 XT

Best Intel CPU for RX 7900 XT
02
  • Close-up of a computer's motherboard featuring a mounted Intel Core i5-13600K processor with visible socket and screws on a detailed circuit background.
  • Close-up of an Intel Core i5-13600K processor in focus, with a blurred blue computer case in the background.
  • An Intel Core i5-13600K processor displayed in front of a blurred computer case.
  • Intel Core i5-13600K CPU against a plain white background.
Excellent
4.5 /5
Editor’s Rating
How We Review
Specifications
  • Cores: 14 (6P-8E)
  • Threads: 20
  • Boost speed : P-Core 5.1GHz / E-Core 3.5GHz
  • Base speed: P-Core 3.5GHz / E-Core 2.6GHz
  • L3 Cache: 24MB
  • TDP: 181W
  • Platform: Intel (LGA 1700)
What We Think

If you prefer Intel CPUs, then we think that the Intel Core i5-13600K is a good choice. It is a fairly new chipset that has overclocking abilities. Plus, you can dodge bottlenecks and futureproof your system.

Reasons to Buy
  • High core count (6 Performance cores and 8 Efficient cores)
  • “K” processor unlocked for overclocking
  • Uses the new LGA 1700 socket
Reasons to Avoid
  • Can heat up during intense workloads, needs a good cooling solution
  • Slightly power hungry

If you prefer Intel CPUs for your build, then we think that the Intel Core i5-13600K is a good processor to pair with the RX 7900 XT.

To start with, this CPU comes with 14 cores (6 Performance cores and 8 Efficient cores) and 20 threads, which means you can expect smooth multitasking and great performance with single-threaded tasks. In our Intel Core i5-13600K review, we saw that this processor has a high multi-core score (16,989), which makes it suitable for multitasking (gaming and productivity).

Further, the Intel processor packs a base clock of 3.5 GHz and a max turbo frequency reaching an impressive 5.1 GHz, the i5-13600K, which helps deliver exceptional responsiveness and reduce lags and stutters. As this is a “K” processor, it is unlocked by the manufacturer, so you can push the clock speeds. 

If you prefer Intel CPUs for your build, then we think that the Intel Core i5-13600K is a good processor to pair with the RX 7900 XT.

PC Guide

Much like most powerful CPUs, the i5-13600K is also a bit power-hungry. It has a base TDP (Thermal Design Power) of 125W, but it can reach higher levels under heavy workloads. So if you are planning to push its performance, you will need an air or a liquid cooler. 

The i5-13600K utilizes the LGA 1700 socket, which is compatible with the latest PCIe 5.0 technology. This ensures compatibility with next-generation components like DDR5 memory for a future-proof system.

Overall, the Intel Core i5-13600K is a solution for gamers and users who need to future-proof their system and avoid bottlenecking. Plus, the overclocking abilities add a good touch – you just need to ensure proper cooling.

What users say

Most Amazon users were happy with the quality, speed, and performance of the Intel Core i5-13600K processor. One of the user reviews says, “I have had no issues with this processor. The temps are low even when heavily gaming. This PC is gonna last a really long time.” However, a few users mentioned that the CPU can run hot while gaming and performing other demanding tasks – “Can run hot under heavy load, requiring beefy cooling solutions to maintain optimal performance and prevent thermal throttling.” Overall, the i5-13600K has 4.8/5.0 stars. 

Best AM4 CPU for RX 7900 XT

Best AM4 CPU for RX 7900 XT
03
AMD Radeon RX 7900 XT graphics card with four fans, set against a dual-tone blue and green background, featuring the "Best CPUs for RX 7900 XT" logo in the top left corner.

What We Think

If you want good gaming performance and don’t mind getting last-gen components, then the Ryzen 5 5800X3D can be a good choice. The CPU comes with AMD’s special 3D V-Cache technology, good core count, decent speeds, and relatively low power consumption.

Reasons to Buy
  • Comes with AMD’s 3D V-Cache tech (massive L3 cache)
  • Good core count (8 cores, 16 threads)
  • Decent base and boost speeds
  • Relatively low power consumption (105Watts)
Reasons to Avoid
  • AM4 socket may keep you from using advanced tech (like DDR5 RAM)

If are on a budget and don’t mind getting last-gen components, then we think that the Ryzen 5 5800X3D is a good choice. 

To start with, the Ryzen 5 5800X3D is from the “X3D” lineup of AMD’s CPUs. These processors come with 3D V-Cache technology, which aims to improve performance. To be more specific, with this cache, the processor can stack a massive 96 MB of L3 cache on the CPU, which enhances data access speeds while gaming.

Further, this CPU has 8 cores and 16 threads, which might not be as high of a count as some other rival processors. However, the focus here is the 3D V-Cache that powers up your frame rates and overall performance. 

This CPU has 8 cores and 16 threads, which might not be as high of a count as some other rival processors. However, the focus here is the 3D V-Cache that powers up your frame rates and overall performance. 

PC Guide

Coming to clock speeds, the processor gives you a base clock of 3.4 GHz and can reach up to 4.5 GHz with AMD’s Precision Boost technology. If you combine these speeds with the massive cache, you can see why this processor is good for gaming and demanding tasks. 

Despite being fairly powerful, the CPU has a TDP of 105W, which we think strikes a good balance between power and power efficiency. Also, low power consumption usually means less heat and quieter operation, so you don’t have to worry about advanced thermal management. 

Now, as mentioned above, the AMD Ryzen 5 5800X3D is compatible with the AM4 socket. This means it is compatible with last gen components like DDR4 RAM. If you don’t really want the latest and the most advanced tech, then this CPU is certainly a bang for your buck. 

What users say

If you look at the Amazon reviews for AMD Ryzen 7 5800X3D, over 5,000 people have reviewed it, and it has a 4.8-star rating. Reviewers mention that the processor delivers great performance and offers good value. A user review says that “this CPU is an incredible value for anyone that is enthusiastic about gaming performance.” Meanwhile, a few reviews said that the processor runs a little hot. 

Best budget CPU for RX 7900 XT

Best budget CPU for RX 7900 XT
04
  • AMD Ryzen 5 7600X CPU in front of its packaging, featuring the "7000 series processor" label.
  • AMD Ryzen 5 7600X processor with visible pins on a white background.
Excellent
4.5 /5
Editor’s Rating
How We Review
Specifications
  • Cores: 6
  • Threads : 12
  • Boost speed : 5.3 GHz
  • Base speed: 4.7 GHz
  • L3 Cache: 32 MB
  • TDP: 105W
  • Platform: AMD (AM5)
What We Think

If you’re on a budget, then we think that the Ryzen 5 7600X strikes a good balance between price and performance. Plus, you get socket compatibility for AM5, which allows for future-proofing.

Reasons to Buy
  • Good base and boost speeds
  • 38MB L3 cache for faster performance
  • Relatively low power draw (105 Watts)
  • Reasonably priced
Reasons to Avoid
  • A few user reviews mentioned heating issues and lagginess
  • Fewer cores mean it’s not as good as it could be for heavy workstation tasks

If you want the best budget CPU for your RX 7900 XT graphics card, then we think that the AMD Ryzen 5 7600X is a strong contender here.

The CPU comes loaded with 6 cores and 12 threads, which may not sound like a lot if you compare it to some of the more expensive models. However, this core count is enough for multitasking – so you can expect good performance while gaming as well as everyday productivity. 

Further, the processor delivers a base clock of 4.7 GHz with a boost clock reaching up to 5.3 GHz. Much like other AMD CPUs we have seen so far, this chipset also has AMD’s Precision Boost technology, which boosts speeds, delivers smooth responsiveness, and reduces lag. Plus, the CPU has 38 MB of L3 cache, which helps store frequently accessed data for quicker retrieval, which should further speed up the processor.

The Ryzen 5 7600X offers good core performance, high clock speeds, power efficiency, and future upgradeability at a budget.

PC Guide

Interestingly, even though the processor packs considerable power, it has a TDP of 105W, which makes it one of the most power-efficient processors on this list.

As far as future-proofing is concerned, this processor uses the AM5 socket, which supports the latest PCIe 5.0 standard. So if you are looking to make upgrades to your setup, this CPU would easily enable you to do so. And like we mentioned in our AMD Ryzen 5 7600X review, this CPU is a good entry-level option for your AM5 and DDR5 upgrades.

Overall, the Ryzen 5 7600X offers good core performance, high clock speeds, power efficiency, and future upgradeability. All you have to do is ensure that your build has a compatible motherboard and DDR5 memory for the newer AM5 platform.

What users say

On Amazon, the Ryzen 5 7600X has been reviewed by over 1,500 people, and it has a rating of 4.7 stars. Most reviews say that the processor is great for gaming as well as multitasking. A review reads, “Overall, the Ryzen 5 7600X is the best value bargain deal in terms of ALL CPUs on the market right now- regardless if you prefer AMD or Intel.” However, a few reviews mention that this CPU can get a little hot, and some have reported experiencing “glitchiness.”

Best performance CPU for RX 7900 XT

Best performance CPU for RX 7900 XT
05
  • An Intel Core i9-13900K processor installed in a motherboard socket, surrounded by circuits and components.
Highly Recommended
4 /5
Editor’s Rating
How We Review
What We Think

If you prefer Intel chipsets and want the very best, then we think that the Intel Core i9-13900K is a really good option. You get advanced tech, futureproofing possibilities, and uncompromised performance. The only drawback here might be high power consumption and price.

Reasons to Buy
  • Really high core count (24 cores and 32 threads)
  • 36MB Intel Smart Cache + large L2 cache for better performance
  • High clock speed and ability to overclock
Reasons to Avoid
  • May seem pricey compared to other options
  • Relatively high power consumption (125 Watts)

If you’re looking for the best Intel CPU to pair with your RX 7900 XT, we recommend the i9-13900K. Before we get into the technical details, let’s address an important question – now that the Intel 14th-generation CPUs are out, should you be investing in a 13th-generation processor?

Well, according to our hands-on review of the i9-14900K, we found the difference to be minimal, but you can check it out yourself and make a decision that best suits your budget and requirements.

For starters, the i9-13900K boasts a total of 24 cores and 32 threads, meaning that its multi-core performance should be able to handle parallel processing without a hitch. However, that doesn’t mean its single-core performance is lacking, as it should be able to handle any level of gaming you throw at it.

Regarding its cores, those are divided into eight performance cores and 16 efficient cores. How this division works is that the performance cores do the heavy lifting and process resource-intensive tasks while the efficient cores handle minor and background tasks that don’t require a lot of muscle. What this does is provide a balance between performance and efficiency and also help keep the power draw and temperatures under control.

The Intel Core i9-13900K is suitable for people who work with complex workloads and gamers who don’t want to compromise on performance.

PC Guide

Moving on, the processor has a maximum clock speed of 5.80 GHz, which should be more than enough to handle any real-world tasks. However, if you’re a PC enthusiast who likes to push your setup to the limit, this CPU comes unlocked for easy overclocking. This means you can squeeze out even more performance from this CPU.

Coming to the cache performance, the CPU comes with a massive 36 MB Intel Smart Cache, which helps quicken data access speeds. This, combined with the larger total L2 cache, minimizes delays and ensures smooth operation even under heavy loads.

Again, a powerful CPU like the i9-13900K consumes a lot of power. To be more specific, the CPU has a base TDP of 125W, and it will increase as you boost the performance. To combat heating issues, you will have to arrange an efficient cooling system.

Overall, the Intel Core i9-13900K is suitable for people who work with complex workloads and gamers who don’t want to compromise on performance. Plus, as this CPU is loaded with next-gen components like DDR5 memory and PCIe 5.0, you should be able to futureproof your build. And as we saw in our Intel Core i9-13900K review, this CPU remains a powerful chip when paired with either Z690 or Z790 motherboards and should be a decent upgrade from Alder Lake.

What users say

On Amazon, the Intel Core i9-13900K processor has been reviewed by over 1,300 people and has a rating of 4.7 stars. Most user reviews say that they were happy with speed, performance, and thermal management. A review says that “the Intel Core i9-13900K Gaming Desktop Processor has exceeded my expectations in terms of performance, gaming prowess, multitasking capabilities, technology integration, and thermal management.” However, a few users commented that the processor was power-hungry and costly. 

Best gaming CPU for RX 7900 XT

Best gaming CPU for RX 7900 XT
06
  • Product packaging of an AMD Ryzen 7 7800X3D processor featuring 3D V-Cache technology, with an orange and black color scheme.
  • Close-up view of an AMD Ryzen 7 7800X3D processor installed in a motherboard socket
  • A close-up of an AMD Ryzen 7 7800X3D processor
  • A close-up of an AMD Ryzen 7 processor on a white table
  • 7800X3D facing down showing contact pads on a white table
Excellent
4.5 /5
Editor’s Rating
How We Review
Specifications
  • Cores: 8
  • Threads: 16
  • Boost speed : up to 5 GHz
  • Base speed: 4.2 GHz
  • L3 Cache: 96 MB
  • TDP: 120 W
  • Platform: AMD (AM5)
What We Think

If you want to level up your build with one of the latest AMD gaming CPUs, then we think that the AMD Ryzen 7 7800X3D is a good option. The processor comes with AMD’s V-Cache technology, good core count, and future-proofing possibilities.

Reasons to Buy
  • Comes with AMD’s V-Cache tech for quick cache access
  • Good core count (8 cores and 16 threads)
  • Uses new AM5 socket
  • Moderate power consumption (120 Watt)
Reasons to Avoid
  • May experience heating issues, needs cooling solution

If you are after a gaming build, then we think that the Ryzen 7 7800X3D would be a good processor to pair with the RX 7900 XT.

To start with, the Ryzen 7 7800X3D processor comes with 8-core and 16-thread, which makes multitasking a breeze. Now, the core count may look lower than that of its competitors, but this CPU relies more on its cache access for performance, which is AMD’s 3D V-Cache technology. In simpler words, the V-Cache stacks a massive amount of extra L3 cache on top of the CPU, which is supposed to improve data access speeds for games. 

Coming to speeds, the processor packs in a base clock of 4.2 GHz can reach up to 5.0 GHz with AMD’s Precision Boost technology, which can come in handy while playing demanding games. 

AMD’s V-Cache stacks a massive amount of extra L3 cache on top of the CPU, which is supposed to improve data access speeds for games. 

PC Guide

Interestingly, despite being a powerful processor, its power consumption is quite moderate. This CPU has a TDP of 120W, which makes it operate quietly and manage its temperature.

As the AMD Ryzen 7 7800X3D processor is fairly new, it uses the new AM5 socket and supports the latest PCIe 5.0 standard. This means that the processor is compatible with new components, like DDR5 RAM, and will allow you to futureproof your rig. 

Overall, as you can see, the AMD Ryzen 7 7800X3D has made its mark mostly as a gaming CPU. While the core count might be lower than some Ryzen 9 offerings, the massive L3 cache with the 3D V-Cache technology really makes up for it. However, to reach its full potential, you will need to pair it with a compatible motherboard and DDR5 RAM. 

What users say

On BestBuy, the AMD Ryzen 7 7800X3D processor has been reviewed by 590 people and has an average rating of 4.9 stars. Most reviewers say that this CPU was a good choice for their gaming builds, and the users were satisfied with the performance. One of the reviews reads, “From gaming to content creation, this powerhouse CPU delivers unparalleled performance that exceeds expectations on every front.” A few reviewers say they experienced heating issues. 

How to pick the best CPU for RX 7900 XT

The RX 7900 XTX is a powerhouse with impressive features and specifications. To ensure all of these features work as best as possible, you need to pair it with a strong CPU, and for that, you need to keep a couple of things in mind so you can make an informed decision. We’ve listed some of these factors below.

Compatibility

The first thing you need to consider is compatibility, specifically whether the CPU you’re leaning towards will work well with the GPU. Since the RX 7900 XTX is the top AMD card, choosing a less powerful CPU will hinder its ability to perform at its best. Another thing to look out for is the express configuration the CPU supports. If it works with 4.0, you can use it on an older build and call a day. However, if it works with the latest 5.0 version, you might have to purchase a new motherboard and RAM as well if you don’t have them already. A workaround for this is to go for the 13th-generation Intel processors, as they’re compatible with PCIe 4.0 and 5.0.

Clock speed and cores

This is another important aspect to keep in mind, as a higher clock speed generally means that the CPU can process instructions faster, which can improve your computer’s overall performance. Additionally, you’ll need to look at the cache and cores. If you’re mainly using the rig for gaming, core count shouldn’t be a priority. On the other hand, if you are using it for productivity, then you want a good number of cores ready to take the workload.

Cache

The cache goes down the same line. This is a small amount of very fast memory that is built into the CPU and is used to store frequently accessed data. A larger cache can improve the performance of the CPU, as it allows it to access data more quickly. This means that you should be able to get better load times, reduced access time, and better in-game performance.

Temperature and cooling solutions

The temperature of the processor can have an impact on its performance. If it gets too hot, it’ll start to thermal throttle, leading to decreased performance. As this is a powerful GPU, you’re most likely looking at a powerful CPU for that. However, the more decked out they are, the more power they consume, which will generate more heat. So, consider your ambient temperature, check out reviews for the CPU, and see whether an air cooler could keep the temperature under control or if you will need an AIO or a custom water loop cooling solution.

Camilo is a contributor for PC Guide. He's been into tech since he was a teen, surfing through the web and local stores trying to find the cheapest way to play the latest Half-Life on his old Windows

'),b.insertAdjacentHTML(d,e));return document.getElementById(a)};c.prototype._repeatDynamicAds=function(b){var a= [],d=this._removeRecipeCapExperiment.result&&"Recipe"===b.location?99:this.locationMaxLazySequence.get(b.location),e=b.lazy?u(d,0):0;d=b.max;var f=b.lazyMax;e=Math.max(d,0===e&&b.lazy?d+f:Math.min(Math.max(e-b.sequence+1,0),d+f));for(f=0;f=d;a.push(y(y({},b),{sequence:g,lazy:h}))}return a};c.prototype._locationEnabled=function(b){b=this._clsOptions.enabledLocations.includes(b.location);var a=this._clsOptions.disableAds&&this._clsOptions.disableAds.all|| document.body.classList.contains("adthrive-disable-all"),d=!document.body.classList.contains("adthrive-disable-content")&&!this._clsOptions.disableAds.reasons.has("content_plugin");return b&&!a&&d};return c}(),Za=function(c){function b(a,d){var e=c.call(this,a,"ClsVideoInsertion")||this;e._videoConfig=a;e._clsOptions=d;e._IN_POST_SELECTOR=".adthrive-video-player";e._WRAPPER_BAR_HEIGHT=36;e._playersAddedFromPlugin=[];d.removeVideoTitleWrapper&&(e._WRAPPER_BAR_HEIGHT=0);return e}v(b,c);b.prototype.init= function(){this._initializePlayers()};b.prototype._wrapJWPlayerWithCLS=function(a,d,e){void 0===e&&(e=0);return a.parentNode?(d=this._createGenericCLSWrapper(.5625*a.offsetWidth,d,e),a.parentNode.insertBefore(d,a),d.appendChild(a),d):null};b.prototype._createGenericCLSWrapper=function(a,d,e){var f=document.createElement("div");f.id="cls-video-container-".concat(d);f.className="adthrive";f.style.minHeight="".concat(a+e,"px");return f};b.prototype._getTitleHeight=function(a){a.innerText="Title";a.style.visibility= "hidden";document.body.appendChild(a);var d=window.getComputedStyle(a),e=parseInt(d.height,10),f=parseInt(d.marginTop,10);d=parseInt(d.marginBottom,10);document.body.removeChild(a);return Math.min(e+d+f,50)};b.prototype._initializePlayers=function(){var a=document.querySelectorAll(this._IN_POST_SELECTOR);a.length&&this._initializeRelatedPlayers(a);this._shouldRunAutoplayPlayers()&&this._determineAutoplayPlayers()};b.prototype._createStationaryRelatedPlayer=function(a,d,e){var f="mobile"===this._device? [400,225]:[640,360],g=G.Video_In_Post_ClicktoPlay_SoundOn;d&&a.mediaOrPlaylistId&&(e="".concat(a.mediaOrPlaylistId,"_").concat(e),d=this._wrapJWPlayerWithCLS(d,e),this._playersAddedFromPlugin.push(a.mediaOrPlaylistId),d&&this._clsOptions.setInjectedVideoSlots({playerId:a.playerId,playerName:g,playerSize:f,element:d,type:"stationaryRelated"}))};b.prototype._createStickyRelatedPlayer=function(a,d){var e="mobile"===this._device?[400,225]:[640,360],f=G.Video_Individual_Autoplay_SOff;this._stickyRelatedOnPage= !0;this._videoConfig.mobileStickyPlayerOnPage="mobile"===this._device;if(d&&a.position&&a.mediaId){var g=document.createElement("div");d.insertAdjacentElement(a.position,g);d=document.createElement("h3");d.style.margin="10px 0";d=this._getTitleHeight(d);d=this._wrapJWPlayerWithCLS(g,a.mediaId,this._WRAPPER_BAR_HEIGHT+d);this._playersAddedFromPlugin.push(a.mediaId);d&&this._clsOptions.setInjectedVideoSlots({playlistId:a.playlistId,playerId:a.playerId,playerSize:e,playerName:f,element:g,type:"stickyRelated"})}}; b.prototype._createPlaylistPlayer=function(a,d){var e=a.playlistId,f="mobile"===this._device?G.Video_Coll_SOff_Smartphone:G.Video_Collapse_Autoplay_SoundOff,g="mobile"===this._device?[400,225]:[640,360];this._videoConfig.mobileStickyPlayerOnPage=!0;var h=document.createElement("div");d.insertAdjacentElement(a.position,h);d=this._wrapJWPlayerWithCLS(h,e,this._WRAPPER_BAR_HEIGHT);this._playersAddedFromPlugin.push("playlist-".concat(e));d&&this._clsOptions.setInjectedVideoSlots({playlistId:a.playlistId, playerId:a.playerId,playerSize:g,playerName:f,element:h,type:"stickyPlaylist"})};b.prototype._isVideoAllowedOnPage=function(){var a=this._clsOptions.disableAds;if(a&&a.video){var d="";a.reasons.has("video_tag")?d="video tag":a.reasons.has("video_plugin")?d="video plugin":a.reasons.has("video_page")&&(d="command queue");q.error(d?"ClsVideoInsertionMigrated":"ClsVideoInsertion","isVideoAllowedOnPage",Error("DBP: Disabled by publisher via ".concat(d||"other")));return!1}return this._clsOptions.videoDisabledFromPlugin? !1:!0};return b}(function(c){function b(a,d){var e=c.call(this)||this;e._videoConfig=a;e._component=d;e._stickyRelatedOnPage=!1;e._relatedMediaIds=[];a=void 0;void 0===a&&(a=navigator.userAgent);a=/Windows NT|Macintosh/i.test(a);e._device=a?"desktop":"mobile";e._potentialPlayerMap=e.setPotentialPlayersMap();return e}v(b,c);b.prototype.setPotentialPlayersMap=function(){var a=this._videoConfig.players||[],d=this._filterPlayerMap();a=a.filter(function(e){return"stationaryRelated"===e.type&&e.enabled}); d.stationaryRelated=a;return this._potentialPlayerMap=d};b.prototype._filterPlayerMap=function(){var a=this,d=this._videoConfig.players,e={stickyRelated:[],stickyPlaylist:[],stationaryRelated:[]};return d&&d.length?d.filter(function(f){var g;return null===(g=f.devices)||void 0===g?void 0:g.includes(a._device)}).reduce(function(f,g){f[g.type]||(q.event(a._component,"constructor","Unknown Video Player Type detected",g.type),f[g.type]=[]);g.enabled&&f[g.type].push(g);return f},e):e};b.prototype._checkPlayerSelectorOnPage= function(a){var d=this;a=this._potentialPlayerMap[a].map(function(e){return{player:e,playerElement:d._getPlacementElement(e)}});return a.length?a[0]:{player:null,playerElement:null}};b.prototype._getOverrideElement=function(a,d,e){a&&d?(e=document.createElement("div"),d.insertAdjacentElement(a.position,e)):(d=this._checkPlayerSelectorOnPage("stickyPlaylist"),a=d.player,d=d.playerElement,a&&d&&(e=document.createElement("div"),d.insertAdjacentElement(a.position,e)));return e};b.prototype._shouldOverrideElement= function(a){a=a.getAttribute("override-embed");return"true"===a||"false"===a?"true"===a:this._videoConfig.relatedSettings?this._videoConfig.relatedSettings.overrideEmbedLocation:!1};b.prototype._checkPageSelector=function(a,d,e){void 0===e&&(e=[]);return a&&d&&0===e.length?("/"!==window.location.pathname&&q.event("VideoUtils","getPlacementElement",Error("PSNF: ".concat(a," does not exist on the page"))),!1):!0};b.prototype._getElementSelector=function(a,d,e){if(d&&d.length>e)return d[e];q.event("VideoUtils", "getPlacementElement",Error("ESNF: ".concat(a," does not exist on the page")));return null};b.prototype._getPlacementElement=function(a){var d=a.pageSelector,e=a.elementSelector;a=a.skip;var f=da(d),g=f.valid,h=f.elements;f=S(f,["valid","elements"]);var k=ca(e),l=k.valid,p=k.elements;k=S(k,["valid","elements"]);return""===d||g?l?this._checkPageSelector(d,g,h)?this._getElementSelector(e,p,a)||null:null:(q.error("VideoUtils","getPlacementElement",Error("".concat(e," is not a valid selector")),k),null): (q.error("VideoUtils","getPlacementElement",Error("".concat(d," is not a valid selector")),f),null)};b.prototype._getEmbeddedPlayerType=function(a){(a=a.getAttribute("data-player-type"))&&"default"!==a||(a=this._videoConfig.relatedSettings?this._videoConfig.relatedSettings.defaultPlayerType:"static");this._stickyRelatedOnPage&&(a="static");return a};b.prototype._getMediaId=function(a){return(a=a.getAttribute("data-video-id"))?(this._relatedMediaIds.push(a),a):!1};b.prototype._createRelatedPlayer= function(a,d,e,f){"collapse"===d?this._createCollapsePlayer(a,e):"static"===d&&this._createStaticPlayer(a,e,f)};b.prototype._createCollapsePlayer=function(a,d){var e=this._checkPlayerSelectorOnPage("stickyRelated"),f=e.player;e=e.playerElement;var g=f?f:this._potentialPlayerMap.stationaryRelated[0];g&&g.playerId?(this._shouldOverrideElement(d)&&(d=this._getOverrideElement(f,e,d)),d=document.querySelector("#cls-video-container-".concat(a," > div"))||d,this._createStickyRelatedPlayer(y(y({},g),{mediaId:a}), d)):q.error(this._component,"_createCollapsePlayer","No video player found")};b.prototype._createStaticPlayer=function(a,d,e){this._potentialPlayerMap.stationaryRelated.length&&this._potentialPlayerMap.stationaryRelated[0].playerId?this._createStationaryRelatedPlayer(y(y({},this._potentialPlayerMap.stationaryRelated[0]),{mediaOrPlaylistId:a}),d,e):q.error(this._component,"_createStaticPlayer","No video player found")};b.prototype._shouldRunAutoplayPlayers=function(){return this._isVideoAllowedOnPage()&& (this._potentialPlayerMap.stickyRelated.length||this._potentialPlayerMap.stickyPlaylist.length)?!0:!1};b.prototype._determineAutoplayPlayers=function(){var a=this._component,d="VideoManagerComponent"===a,e=this._config;if(this._stickyRelatedOnPage)q.event(a,"stickyRelatedOnPage",d&&{device:e&&e.context.device,isDesktop:this._device}||{});else{var f=this._checkPlayerSelectorOnPage("stickyPlaylist"),g=f.player;f=f.playerElement;g&&g.playerId&&g.playlistId&&f?this._createPlaylistPlayer(g,f):q.event(a, "noStickyPlaylist",d&&{vendor:"none",device:e&&e.context.device,isDesktop:this._device}||{})}};b.prototype._initializeRelatedPlayers=function(a){for(var d=new Map,e=0;e