Today I want to share yet another “electrical basics” post with you. This one is super simple, but it’s one that a few of you have asked for specifically — how to wire an electrical out. If you’ve never installed an electrical outlet before, and have been afraid to take that face plate off and see what’s under there, I think you’ll be surprised at how easy this is.

And since this is probably the most common situation you’ll find, I’ll be demonstrating how to install an electrical out in the middle of a circuit.

First and foremost, before doing anything with switches or outlets or lighting or any other electrical thing, you need to be sure that the power is switched off at the breaker box. If you don’t know how to do this, or don’t know which circuit breaker feeds what area of your house, or you don’t know how to use a circuit tester, DO NOT PROCEED.

After you’ve switched the circuit breaker off, always be sure to test the circuit with a circuit tester.

In my particular case, I didn’t have to do any of that because none of the wiring for this room has even been wired to the breaker box yet. If I go into the closet where my breaker box is, I just have five wires for the five circuits for my studio hanging down inside the closet from the attic, and none of them are anywhere near the breaker box yet. Wiring those to the breaker box will be the last step. Anyway, moving on…

I’ve explained this before in a previous post, but to refresh your memory, a circuit is simply a series of outlets and/or switches that receive their power from one circuit breaker in the breaker box.

The circuit I wired last night is the this one, where the wire comes from one circuit breaker in the breaker box in the guest bedroom closet, travels across the attic, and goes to the outlet labeled #1. From there, it goes to #2, and #3, and so on.

And in the pictures on this post, I’ll be wiring the outlet labeled #2 in the photo above. So it’s receiving it’s power from the outlet #1, and then sending power on to outlet #3 in the circuit.

In the junction box, I have two wires. As I explained before, I always label my wires, so you can see one says “power in” (meaning it’s coming from outlet #1) and the other says “power out” (meaning that it’s heading to the next outlet in the circuit, outlet #3).

The first step is to strip the yellow sheathing off of the wires, and I use this tool for that…

The circled areas are specifically for stripping this outside sheathing off of 14/2 and 12/2 wire. My wire is 12/2, so I use the larger one.

I try to cut the sheathing as far into the box as possible, which generally leaves about an inch or so of the sheathing visible in the box.

And once the yellow sheathing is stripped off (the wire cutters cut it very easily, and then you just pull it off), there are six separate wires exposed — two black, two white, and two bare copper.

The outlets that I use are these labeled “back and side wire outlet.”

When working with 12-gauge wire, I use these exclusively. They cost a bit more than the cheap outlets you can buy in the bulk contractors packs, but these save so much time and are a lot less work because under the terminal screws, they have these little metal plates…

If you have an outlet that doesn’t have those little metal plates under the terminal screws, that means you have to bend the ends of your wire into little hooks or loops and wrap the wire around the screws. That’s not a big deal when dealing with 14-gauge wire, but it’s such a frustrating headache when dealing with 12-gauge wire.

So I opt for these outlets that have those little plates/clamps under the screws. This allows you to simply insert the wire straight under the plate/clamp and tighten the screw. No having to hook the wire and wrap it around the screw. This is so much easier, and such a time saver!

So back to the box, I cut the excess wire off so that what’s left is about four inches of wire sticking out past the front of the box. That gives me a total of about 7-8 inches of wire to work with.

That’s a guesstimate. It might be a bit more or less than four inches past the front of the box. Just keep in mind that if you cut them too short, you’re kind of up a creek, and it’ll make things really difficult to wire. If you leave them too long, it’s hard to get all of that wire tucked in the box when you’re done.

Next, I use the same wire strippers, and use these smaller areas to strip the individual wires. There’s one for 14-gauge wire, and one for 12-gauge wire. Mine is 12-gauge, so that’s the one I used.

I stripped about 3/8 inch from the ends of the wires.

You do not have to guess at how much to strip from the ends of the wires. Every single outlet or switch that you purchase will come with a strip gauge on the back of the outlet or switch (or if it’s not there, it’ll be inside the packaging) telling you exactly how much you need to strip for that particular outlet or switch.

With the wires cut and stripped the appropriate amount, I’m ready to wire up the outlet.

On one side, you’ll find silver screws. Those are the neutral terminals that the white (neutral) wires go to.

On the other side, you’ll find brass screws. Those are the terminals where the black (hot) wires will go.

So on the right side, where the brass screws are, I simply insert the stripped ends of the black wires underneath those metal plates/clamps, and tighten the screws to hold the wires in place.

Remember how I labeled my wires (i.e., power in, power out)? I always put the one labeled “power in” on top, and the ones labeled “power out” on bottom. That way I always know which direction a particular wire is going, and there’s no confusion if I need to get in there and do something in that junction box at a later date.

And then repeat that process on the other side with the white wires going to the silver terminals.

And again, if you don’t purchase the outlets with the little plates/clamps under the screws, and all you see are screws there, then you just have to form a little loop in the end of the wire and wrap it around the screw. Such a pain. 😀

So now I have my black (hot) wires connected, and my white (neutral) wires connected. That just leaves the ground wires.

I like to use these push-in connectors, which you can use in place of wire nuts. Because again, working with uncooperative 12-gauge wire makes me want to cuss, so I’ve found that these make the job so much easier than all of that twisting and screwing on wire nuts.

I start by attaching the two ground wires together using a push-in connector.

That connected the ground wire from the wire coming into the box, and the ground wire from the wire leaving the box and going to the next outlet. But you’ll notice that that did nothing to actually ground the outlet because there’s still nothing going to the little green screw on the outlet.

So to remedy that, I cut a small piece of wire about six inches long…

…and I inserted one end into the push-in connector to create what’s called a “pigtail.”

And then the other end of that pigtail gets connected to the green/ground screw on the outlet.

That screw doesn’t have a plate/clamp on it, so I generally do go ahead and make a hook in the end of the wire and wrap it around. But I noticed that it has a little area that my cheaper outlets don’t have where the wire can easily slip in and be held very tightly when the screw is tightened. There are no specifics on the written instructions that come with this outlet about this, but I tested it by pulling very tightly on the wire and it seemed to hold perfectly like this. While this seems to hold very securely, I’d recommend creating a bend at the end of the wire and wrapping it around the screw.

And then the outlet is ready to be screwed into place in the junction box. This is probably the hardest part of the whole process if you’re working with 12-gauge wire. I’m telling you that those things just do not want to bend and cooperate, so it might take a bit of gentle wrestling to get everything in there far enough to get the outlet screwed onto the junction box, but just be firm but gentle, and a little patient, and it’ll get there.

But that’s it! Wiring an electrical outlet is really so simple! And once it’s all wired and screwed into place, you can turn the circuit breaker back on and test the outlet to be sure that it’s all working properly. Easy peasy! And of course, you’ll want to add a face plate to finish up the job. I’m not going to do that right now because the drywall guys are still taping and mudding, and when they’re done, I’ll be priming and painting. I’ll add face plates when the walls are finished.

I was also going to show how to wire a light switch today, but this post got a little long. So I’ll save the switch wiring post for later.

``` ```
``` On March 7, 2019 • By Kristi Linauer 29 You Might Also Like... Painting Kitchen (And Bathroom) Cabinets – Pros & Cons Of Four Different Methods I’ve Personally Used August 24, 2017 Laminate Table Top Success (Mostly) & A Change Of Heart August 29, 2019 The Finished Studio Work Table! August 30, 2019 Previous Post Studio Progress -- An Amazing Back Entry Transformation! Next Post Studio Painting Progress And A Slight Change Of Plans 29 Comments Leave a Comment Name * Email * Website Δdocument.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ); This site uses Akismet to reduce spam. Learn how your comment data is processed. Reply To This Comment ↓ Theresa P March 7, 2019 at 11:19 am I love you! Seriously! This stuff should be part of a basic adulting course. I know that “home ec” is theoretically that course. But, really, basic car maintenance (like oil changes), time value of money (like save up for your car instead of financing it), and this stuff should really be part of the course. I have a master’s degree, but don’t know jack about how the electricity flows through my house. What kind of sense does that make?!?! Your next venture needs to be a You-Tube channel. There are tons of You-Tube videos out there, many where the person isn’t even in the video. You already have your scripts written out! You just need to make the videos! Reply To This Comment ↓ Nadine March 7, 2019 at 3:23 pm Completely agree. I am in awe of all the stuff that Kristi can do. Would also love to see more videos from her. Reply To This Comment ↓ Chelle Ellis March 7, 2019 at 11:42 am Thank you! I’ve done this before but would love a quick how to reference for future installation of: ceiling lights/chandeliers You’re awesome, thanks always! Reply To This Comment ↓ Heidi March 7, 2019 at 12:04 pm I’m just curious as to why you’re using 12/2 wire rather than 14/2? My apologies if you explained it somewhere else. Reply To This Comment ↓ Kristi March 7, 2019 at 12:14 pm 12/2 is pretty standard for all residential wiring these days. I know some people still use 14/2, and in my humble opinion, it’s still perfectly fine for residential use. But 12/2 is the standard now. Reply To This Comment ↓ Heidi March 7, 2019 at 3:17 pm Ah, makes sense. Where I live (in Canada), I think 14/2 is still pretty standard for regular wiring. That’s what we’ve been using anyway, for the large amounts of rewiring we’ve been doing in our house. Reply To This Comment ↓ Vicky March 10, 2019 at 1:32 am 12/2 allows more amperage. That means you can p,up in stuff that has a high draw (like your iron) without popping the circuit. I just wired two bedrooms of a 1938 house my husband and I gutted. We are redoing the plumbing and electrical systems, which means the walls came a tumbling down. Reply To This Comment ↓ Vicky March 10, 2019 at 1:33 am That was supposed to say plug in. Reply To This Comment ↓ B.Kaye Beckner March 7, 2019 at 12:19 pm I actually th8nk I could follow your directions and do this! Thank you! My only question is, when you said you used electrical tape, was it around the two ground wires together? Reply To This Comment ↓ Kristi March 7, 2019 at 12:28 pm I made two full laps around the sides of the outlet, so it covered all five screws. Reply To This Comment ↓ Olivia S. March 7, 2019 at 12:38 pm You explain it so well. I should have known it was seriously hard to do. I am going to print your instructions out on my printer and put it in my house manual binder. I have some cream plugs that I would like to be white. My mum has always done the electronic work this including putting in ceiling fans, etc. She is only 4’11”. She is in her late 70s now and I don’t want her to fall and have to get another 21 steel pins put in her shoulder/arm. She informed us that she wasn’t climbing and just fell over the dog (I didn’t buy this, but my sister did). Reply To This Comment ↓ Sherre March 7, 2019 at 2:12 pm I’ve never wired a new outlet, but I’ve always switched out the outlets in my houses with shiny new white ones. I think it makes such a difference and makes everything look so clean! I once stupidly switched out a light switch without turning off the breaker (just completely forgot). When I was struggling with the wires to get it back into the box, two of the screws hit the sides of the metal junction box. Sparks flew, things popped, lights went off, I screamed. Now I have my tester with me at all times and I check three or four times before I get started, haha!! Reply To This Comment ↓ Heidi March 7, 2019 at 3:23 pm We were ripping out a pony wall a few years ago, and didn’t realize there were wires in the wall. I think we must have just looked at the one side of the wall or something. Oops. That was dumb. My husband yanked on a stud and ripped the wire out of the outlet. Something popped and sparks flew. Yikes! We’ve definitely been more careful with wiring since! Reply To This Comment ↓ Sherre March 8, 2019 at 5:30 am Yikes! One thing is for sure. Once you’ve made a careless mistake with electricity, you will never do it again!! haha Reply To This Comment ↓ MissElaineous March 7, 2019 at 4:38 pm I’ve watched several videos on electrical wiring before I received your post and lemme tell ya you REEEAAAALLLLLY made it super easy to understand. I feel 100% confident that I can do this project myself when the time comes! I’m going to print this out and put it in my binder so when the time comes I’ll have it handy. Thank you for giving me the confidence I needed. Can’t wait to see what you do next 🙂 Reply To This Comment ↓ Ksthleen March 7, 2019 at 6:48 pm Ditto on how great it is to have this information absent all the man-splaining I’ve had in the past when asking a simple question. Like Olivia, I want to replace my 1980s cream outlets with white and this tutorial is PERFECT. Especially good to know about those outlets. I can’t wait until tomorrow for the switches tutorial. Thank you, thank you, thank you! Reply To This Comment ↓ Mark Stephens March 7, 2019 at 7:38 pm That is good info but you should always wrap the two bare grounds together before putting on of the on the screw. You get a better connection that way. I always hook up the ground first then the neutral wire than the black. When disconnecting do black then white then ground. As an electrician this protects you if for some reason the power gets turned on or there is a feedback. Great info. Reply To This Comment ↓ Kristi March 7, 2019 at 7:56 pm Thank you! That’s very helpful. I can see how you would get better connection wrapping the grounds together first, and then putting one on the screw. I’ll do that with the rest of the outlets I have to wire this weekend. Reply To This Comment ↓ Judy March 7, 2019 at 7:52 pm My husband is a contractor in San Francisco. My question is: Don’t you need to get permits before doing electrical, plumbing and carpentry work? When he is done with the work, it has to go through a city inspector and be signed off. I have not seen you mention every going through the city for these requirements. Reply To This Comment ↓ Kristi March 7, 2019 at 8:02 pm I do mention quite often that these requirements are different from state to state, and even from one city or county to the next. You should always contact your local building permit office to see what’s required in your specific area, and not rely on that type of info from someone who lives in a different state or even a different city in your same state. And generally when you hire a contractor (as I have done on this area) they are the ones who that for you. The homeowner doesn’t do that for the contractor. Now with that said, this post was just for general information purposes because I’ve had several people ask me how to swap out their outlets (i.e., from antique white to white). I’ve never heard of a homeowner getting a permit to swap out outlets when there’s already a box and wiring there. Reply To This Comment ↓ Rich C. March 8, 2019 at 9:34 am While I appreciate all of the work put into this post, as a 30+ year Electrician I must point out some points of common practice, as well as some code violations. I’ll start with #12 is not the new normal in residential buildings. The average electrical box (3x2x3-1/2) is 18 cubic inches. For every colored wire count 1, for all of the ground wires count 1, and for every device count 1. In the pictures show this equals 4+1+1 or 6 conductors. For #14 each is 2 CI and for #12 it’s 2.25 CI. So using #14 would use up 12 CI while the #12 uses 13.5 CI. Adding one more #12 cable would max out the box, while you could ad 2 more #14 cables. Next, electrical code requires the conductors to extend 6″ past the front of the box, so only 4″ is a code violation. I would also note here that by pigtailing the wires together you only end up with a black, white, and ground going to the outlet. This makes the installation of the outlet into the box much easier with less stress to the outlet terminals. Next is that ground splice, A crimp or wirenut is required by code, simply wrapping them together is not the right way to do it. When it comes to that ground screw, as well as any other screw terminal like it, the wire is required by code to wrap 3/4 of the way around the screw and in the direction the screw is turned to be tightened, such as twisting to the right. Lastly regarding wrapping tape around the outlet, there’s a reason Electricians don’t do it…it’s flammable. That’s right, by wrapping the tape you’re introducing a flammable material to the inside of the box, effectively defeating the entire reason for the box in the first place. I’m not trying to bash or embarrass anyone, I’m just try to help make sure the work is done correct and safe. Reply To This Comment ↓ Kristi March 8, 2019 at 12:16 pm Thank you for the info. I did make changes to the post. But I will also disagree with you about the 12/2 wire. Maybe it’s a regional thing, specific to Texas, or even to my city/county, but in my area (central Texas), you will not find a new build house that’s being wired with 14/2 wire. It’s all 12/2 wire, and in fact when I went to Home Depot a couple of years ago to purchase some 14/2 wire for a project, I specifically asked the guy (a retired electrician who worked in this area) if I could use 14/2 to wire my room, and he said, “Well, as long as you don’t plan to have it inspected. But an inspector will require 12/2.” So again, maybe that’s a regional-specific code, but it doesn’t seem like it. Every time I see a new build house on TV, on blogs, etc., all I see is yellow (12/2) Romex. I don’t see the white (14/2) anymore on new construction. Reply To This Comment ↓ Kristi March 9, 2019 at 12:35 am Also… NEC 2017 300.14 Length of Free Conductors at Outlets, Junctions, and Switch Points. At least 150 mm (6 in.) of free conductor, measured from the point in the box where it emerges from its raceway or cable sheath, shall be left at each outlet, junction, and switch point for splices or the connection of luminaires or devices. Where the opening to an outlet, junction, or switch point is less than 200 mm (8 in.) in any dimension, each conductor shall be long enough to extend at least 75 mm (3 in.) outside the opening. Exception: Conductors that are not spliced or terminated at the outlet, junction, or switch point shall not be required to comply with 300.14. __________________________________ That does NOT say measured from the front of the junction box. It’s measured from where the conductors emerge from their raceway or cable sheath inside the box. Reply To This Comment ↓ Rich C. March 9, 2019 at 2:27 am I’m aware of the wording of article 300.14 of the NEC code. My comment was focused the cable sheaths as shown in your pictures which come to the front of the box. So in the pictures you have posted there is not a minimum of 6″ of conductors exposed. Reply To This Comment ↓ BarbBQ March 8, 2019 at 10:06 am Kristi; I have a question about replacing existing outlets & switches. Is it important to know which wires are the PowerIN and which are the PowerOut in the circuit? In other words, what happens if I guess wrong? Is there any way to tell which are IN and which are OUT? Reply To This Comment ↓ Kristi March 9, 2019 at 12:45 am No, it’s really not necessary. I just like to know because I’m a bit obsessive about knowing stuff like that. 😀 But if you’re not sure, you can still change out your outlets. When you turn the power off and remove the old outlet, you should be able to see that one set of hot, neutral and ground wires are sheathed together, and another set of hot, neutral and ground wires are sheathed together. It’s not necessary to know which one is feeding power to that outlet, and which one is sending power to the next outlet. As long as you get both hot wires, both neutral wires, and both ground wires connected properly, it’ll be fine. Reply To This Comment ↓ Betsy March 8, 2019 at 8:16 pm I don’t know if I’ll ever need to use this but I love that your instructions on anything are always one of the best out there. Reply To This Comment ↓ Stephanie March 15, 2019 at 10:32 pm Hi Kristy! Thanks for the awesome tutorial! Just curious if you are replacing or working with existing outlets and need to push them forward, e.g. because of adding a tile backsplash, how would you complete? Thanks again! Reply To This Comment ↓ Kristi March 16, 2019 at 1:17 pm There are small plastic spacers made for this purpose. They attach to the two screws that hold the outlet in place. They come in strips with about ten spacers attached together, and they fold like an accordion. So you can fold as many as you need together (you’ll often need two or three) and place on the screw. Just keep in mind that you might need to purchase longer screws. ```
``` ```
``` ```
``` ```
``` Well, hello there! I’m Kristi… I'm a DIY fanatic remodeling my way through our 1948 fixer upper.More About Kristi Addicted 2 Decorating is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. ```
``` ```
``` addicted2decorating The new Flor carpet tiles are installed in the hom It’s hard to believe that when we bought this ho Today on the blog, I shared five home improvement I still need to finish some projects on the front Progress on our home gym. It’s getting there! Would you ever try making your own backsplash tile Load More... Follow on Instagram Facebook Twitter Instagram Pinterest Youtube Copyright 2007-2022 - Kristi Linauer, LLC. All Rights Reserved. Addicted 2 Decorating is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. Privacy Policy Terms and Conditions ```
``` ```
``` 'use strict';(function(){function B(d,b){function a(){this.constructor=d}if("function"!==typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");O(d,b);d.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}function Q(d,b,a,c){var e=arguments.length,f=3>e?b:null===c?c=Object.getOwnPropertyDescriptor(b,a):c,g;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)f=Reflect.decorate(d,b,a,c);else for(var h=d.length-1;0<=h;h--)if(g= d[h])f=(3>e?g(f):3<e?g(b,a,f):g(b,a))||f;return 3<e&&f&&Object.defineProperty(b,a,f),f}function I(d,b){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(d,b)}function J(d){var b="function"===typeof Symbol&&Symbol.iterator,a=b&&d[b],c=0;if(a)return a.call(d);if(d&&"number"===typeof d.length)return{next:function(){d&&c>=d.length&&(d=void 0);return{value:d&&d[c++],done:!d}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.");}function p(d, b){var a="function"===typeof Symbol&&d[Symbol.iterator];if(!a)return d;d=a.call(d);var c,e=[];try{for(;(void 0===b||0<b--)&&!(c=d.next()).done;)e.push(c.value)}catch(g){var f={error:g}}finally{try{c&&!c.done&&(a=d["return"])&&a.call(d)}finally{if(f)throw f.error;}}return e}function w(d,b,a){if(a||2===arguments.length)for(var c=0,e=b.length,f;c<e;c++)!f&&c in b||(f||(f=Array.prototype.slice.call(b,0,c)),f[c]=b[c]);return d.concat(f||Array.prototype.slice.call(b))}window.adthriveCLS.buildDate="2023-03-23"; var t=function(d,b){return null==d||d!==d?b:d},ha=function(d){var b=d.clientWidth;getComputedStyle&&(d=getComputedStyle(d,null),b-=parseFloat(d.paddingLeft||"0")+parseFloat(d.paddingRight||"0"));return b},ia=function(d){var b=d.offsetHeight,a=d.offsetWidth,c=d.getBoundingClientRect(),e=document.body,f=document.documentElement;d=Math.round(c.top+(window.pageYOffset||f.scrollTop||e.scrollTop)-(f.clientTop||e.clientTop||0));c=Math.round(c.left+(window.pageXOffset||f.scrollLeft||e.scrollLeft)-(f.clientLeft|| e.clientLeft||0));return{top:d,left:c,bottom:d+b,right:c+a,width:a,height:b}},R=function(){var d=navigator.userAgent,b=/Tablet|iPad|Playbook|Nook|webOS|Kindle|Android (?!.*Mobile).*Safari/i.test(d);return/Mobi|iP(hone|od)|Opera Mini/i.test(d)&&!b},O=function(d,b){O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var e in c)Object.prototype.hasOwnProperty.call(c,e)&&(a[e]=c[e])};return O(d,b)},x=function(){x=Object.assign||function(d){for(var b, a=1,c=arguments.length;a<c;a++){b=arguments[a];for(var e in b)Object.prototype.hasOwnProperty.call(b,e)&&(d[e]=b[e])}return d};return x.apply(this,arguments)},ja=function(d){void 0===d&&(d=document);return(d===document?document.body:d).getBoundingClientRect().top},ka=function(d){return d.includes(",")?d.split(","):[d]},la=function(d){void 0===d&&(d=document);d=d.querySelectorAll("article");return 0===d.length?null:(d=Array.from(d).reduce(function(b,a){return a.offsetHeight>b.offsetHeight?a:b}))&& d.offsetHeight>1.5*window.innerHeight?d:null},ma=function(d,b,a){void 0===a&&(a=document);var c=la(a),e=c?[c]:[],f=[];d.forEach(function(h){var l=Array.from(a.querySelectorAll(h.elementSelector)).slice(0,h.skip);ka(h.elementSelector).forEach(function(k){var u=a.querySelectorAll(k);k=function(r){var m=u[r];if(b.map.some(function(z){return z.el.isEqualNode(m)}))return"continue";(r=m&&m.parentElement)&&r!==document.body?e.push(r):e.push(m);-1===l.indexOf(m)&&f.push({dynamicAd:h,element:m})};for(var q= 0;q<u.length;q++)k(q)})});var g=ja(a);d=f.sort(function(h,l){return h.element.getBoundingClientRect().top-g-(l.element.getBoundingClientRect().top-g)});return[e,d]},na=function(d,b,a){void 0===a&&(a=document);b=p(ma(d,b,a),2);d=b[0];b=b[1];if(0===d.length)throw Error("No Main Content Elements Found");return[Array.from(d).reduce(function(c,e){return e.offsetHeight>c.offsetHeight?e:c})||document.body,b]},A;(function(d){d.Prebid="prebid";d.GAM="gam";d.Amazon="amazon";d.WebVitals="webvitals";d.Marmalade= "marmalade";d.Floors="floors";d.CMP="cmp"})(A||(A={}));var C;(function(d){d.fpvNonLazy="fpvNonLazy";d.lazy="lazy";d.refresh="refresh";d.session="session";d.crossDomain="crossdomain";d.highSequence="highsequence"})(C||(C={}));var S;(function(d){d.prebidLoad="prebidLoad";d.amazonLoad="amazonLoad";d.gptLoad="gptLoad"})(S||(S={}));var H;(function(d){d.Desktop="desktop";d.Mobile="mobile"})(H||(H={}));var D;(function(d){d.Video_Collapse_Autoplay_SoundOff="Video_Collapse_Autoplay_SoundOff";d.Video_Individual_Autoplay_SOff= "Video_Individual_Autoplay_SOff";d.Video_Coll_SOff_Smartphone="Video_Coll_SOff_Smartphone";d.Video_In_Post_ClicktoPlay_SoundOn="Video_In-Post_ClicktoPlay_SoundOn"})(D||(D={}));var T;(T||(T={})).None="none";var U;(function(d){d.WEIGHTEDCHOICE="weightedChoice";d.BERNOULLITRIAL="bernoulliTrial"})(U||(U={}));var V;(function(d){d.INTEGER="integer";d.FLOAT="float";d.BOOLEAN="boolean";d.STRING="string"})(V||(V={}));var W;(function(d){d.DESKTOP="desktop";d.MOBILE="mobile";d.ALL="all"})(W||(W={}));var E;(function(d){d.AdDensity= "addensity";d.FooterCloseButton="footerclose";d.Interstitial="interstitial";d.RemoveVideoTitleWrapper="removevideotitlewrapper";d.StickyOutstream="stickyoutstream";d.StickyOutstreamOnStickyPlayer="sospp";d.VideoAdvancePlaylistRelatedPlayer="videoadvanceplaylistrp";d.MobileStickyPlayerPosition="mspp"})(E||(E={}));var oa=function(d,b){var a=d.adDensityEnabled;d=d.adDensityLayout.pageOverrides.find(function(c){return!!document.querySelector(c.pageSelector)&&(c[b].onePerViewport||"number"===typeof c[b].adDensity)}); return a?!d:!0};A=function(){function d(){this._timeOrigin=0}d.prototype.resetTimeOrigin=function(){this._timeOrigin=window.performance.now()};d.prototype.now=function(){try{return Math.round(window.performance.now()-this._timeOrigin)}catch(b){return 0}};return d}();window.adthrive.windowPerformance=window.adthrive.windowPerformance||new A;A=window.adthrive.windowPerformance;var P=A.now.bind(A),X=function(d){try{return{valid:!0,elements:document.querySelectorAll(d)}}catch(b){return x({valid:!1},b)}}, Y=function(d){return""===d?{valid:!0}:X(d)},n=new (function(){function d(){}d.prototype.info=function(b,a){for(var c=[],e=2;e<arguments.length;e++)c[e-2]=arguments[e];this.call.apply(this,w([console.info,b,a],p(c),!1))};d.prototype.warn=function(b,a){for(var c=[],e=2;e<arguments.length;e++)c[e-2]=arguments[e];this.call.apply(this,w([console.warn,b,a],p(c),!1))};d.prototype.error=function(b,a){for(var c=[],e=2;e<arguments.length;e++)c[e-2]=arguments[e];this.call.apply(this,w([console.error,b,a],p(c), !1));this.sendErrorLogToCommandQueue.apply(this,w([b,a],p(c),!1))};d.prototype.event=function(b,a){for(var c,e=2;e<arguments.length;e++);"debug"===(null===(c=window.adthriveCLS)||void 0===c?void 0:c.bucket)&&this.info(b,a)};d.prototype.sendErrorLogToCommandQueue=function(b,a){for(var c=[],e=2;e<arguments.length;e++)c[e-2]=arguments[e];window.adthrive=window.adthrive||{};window.adthrive.cmd=window.adthrive.cmd||[];window.adthrive.cmd.push(function(){void 0!==window.adthrive.logError&&"function"=== typeof window.adthrive.logError&&window.adthrive.logError(b,a,c)}.bind(b,a,c))};d.prototype.call=function(b,a,c){for(var e=[],f=3;f<arguments.length;f++)e[f-3]=arguments[f];f=["%c".concat(a,"::").concat(c," ")];var g=["color: #999; font-weight: bold;"];0<e.length&&"string"===typeof e[0]&&f.push(e.shift());g.push.apply(g,w([],p(e),!1));try{Function.prototype.apply.call(b,console,w([f.join("")],p(g),!1))}catch(h){console.error(h)}};return d}()),pa=function(d){var b=d.reduce(function(a,c){return c.weight? c.weight+a:a},0);return 0<d.length&&d.every(function(a){var c=a.value;a=a.weight;return!(void 0===c||null===c||"number"===typeof c&&isNaN(c)||!a)})&&100===b},qa=["siteId","siteName","adOptions","breakpoints","adUnits"],Z=function(){function d(){this._clsGlobalData=window.adthriveCLS}Object.defineProperty(d.prototype,"enabled",{get:function(){var b;if(b=!!this._clsGlobalData&&!!this._clsGlobalData.siteAds)a:{b=this._clsGlobalData.siteAds;var a=void 0;void 0===a&&(a=qa);if(b){for(var c=0;c<a.length;c++)if(!b[a[c]]){b= !1;break a}b=!0}else b=!1}return b},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"error",{get:function(){return!(!this._clsGlobalData||!this._clsGlobalData.error)},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"siteAds",{get:function(){return this._clsGlobalData.siteAds},set:function(b){this._clsGlobalData.siteAds=b},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"disableAds",{get:function(){return this._clsGlobalData.disableAds},set:function(b){this._clsGlobalData.disableAds= b},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"enabledLocations",{get:function(){return this._clsGlobalData.enabledLocations},set:function(b){this._clsGlobalData.enabledLocations=b},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"injectedFromPlugin",{get:function(){return this._clsGlobalData.injectedFromPlugin},set:function(b){this._clsGlobalData.injectedFromPlugin=b},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"injectedFromSiteAds", {get:function(){return this._clsGlobalData.injectedFromSiteAds},set:function(b){this._clsGlobalData.injectedFromSiteAds=b},enumerable:!1,configurable:!0});d.prototype.overwriteInjectedSlots=function(b){this._clsGlobalData.injectedSlots=b};d.prototype.setInjectedSlots=function(b){this._clsGlobalData.injectedSlots=this._clsGlobalData.injectedSlots||[];this._clsGlobalData.injectedSlots.push(b)};Object.defineProperty(d.prototype,"injectedSlots",{get:function(){return this._clsGlobalData.injectedSlots}, enumerable:!1,configurable:!0});d.prototype.setInjectedVideoSlots=function(b){this._clsGlobalData.injectedVideoSlots=this._clsGlobalData.injectedVideoSlots||[];this._clsGlobalData.injectedVideoSlots.push(b)};Object.defineProperty(d.prototype,"injectedVideoSlots",{get:function(){return this._clsGlobalData.injectedVideoSlots},enumerable:!1,configurable:!0});d.prototype.setInjectedScripts=function(b){this._clsGlobalData.injectedScripts=this._clsGlobalData.injectedScripts||[];this._clsGlobalData.injectedScripts.push(b)}; Object.defineProperty(d.prototype,"getInjectedScripts",{get:function(){return this._clsGlobalData.injectedScripts},enumerable:!1,configurable:!0});d.prototype.setExperiment=function(b,a,c){void 0===c&&(c=!1);this._clsGlobalData.experiments=this._clsGlobalData.experiments||{};this._clsGlobalData.siteExperiments=this._clsGlobalData.siteExperiments||{};(c?this._clsGlobalData.siteExperiments:this._clsGlobalData.experiments)[b]=a};d.prototype.getExperiment=function(b,a){void 0===a&&(a=!1);return(a=a?this._clsGlobalData.siteExperiments: this._clsGlobalData.experiments)&&a[b]};d.prototype.setWeightedChoiceExperiment=function(b,a,c){void 0===c&&(c=!1);this._clsGlobalData.experimentsWeightedChoice=this._clsGlobalData.experimentsWeightedChoice||{};this._clsGlobalData.siteExperimentsWeightedChoice=this._clsGlobalData.siteExperimentsWeightedChoice||{};(c?this._clsGlobalData.siteExperimentsWeightedChoice:this._clsGlobalData.experimentsWeightedChoice)[b]=a};d.prototype.getWeightedChoiceExperiment=function(b,a){var c,e;void 0===a&&(a=!1); return(a=a?null===(c=this._clsGlobalData)||void 0===c?void 0:c.siteExperimentsWeightedChoice:null===(e=this._clsGlobalData)||void 0===e?void 0:e.experimentsWeightedChoice)&&a[b]};Object.defineProperty(d.prototype,"branch",{get:function(){return this._clsGlobalData.branch},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"bucket",{get:function(){return this._clsGlobalData.bucket},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"videoDisabledFromPlugin",{get:function(){return this._clsGlobalData.videoDisabledFromPlugin}, set:function(b){this._clsGlobalData.videoDisabledFromPlugin=b},enumerable:!1,configurable:!0});Object.defineProperty(d.prototype,"targetDensityLog",{get:function(){return this._clsGlobalData.targetDensityLog},set:function(b){this._clsGlobalData.targetDensityLog=b},enumerable:!1,configurable:!0});return d}(),ra=function(){function d(){}d.getScrollTop=function(){return(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0)};d.shufflePlaylist=function(b){for(var a= b.length,c,e;0!==a;)e=Math.floor(Math.random()*b.length),--a,c=b[a],b[a]=b[e],b[e]=c;return b};d.isMobileLandscape=function(){return window.matchMedia("(orientation: landscape) and (max-height: 480px)").matches};d.playerViewable=function(b){b=b.getBoundingClientRect();return this.isMobileLandscape()?window.innerHeight>b.top+b.height/2&&0<b.top+b.height/2:window.innerHeight>b.top+b.height/2};d.playerVisible=function(b){b=b.getBoundingClientRect();return window.innerHeight>b.top};d.createQueryString= function(b){return Object.keys(b).map(function(a){return"".concat(a,"=").concat(b[a])}).join("&")};d.createEncodedQueryString=function(b){return Object.keys(b).map(function(a){return"".concat(a,"=").concat(encodeURIComponent(b[a]))}).join("&")};d.setMobileLocation=function(b){b=b||"bottom-right";"top-left"===b?b="adthrive-collapse-top-left":"top-right"===b?b="adthrive-collapse-top-right":"bottom-left"===b?b="adthrive-collapse-bottom-left":"bottom-right"===b?b="adthrive-collapse-bottom-right":"top-center"=== b&&(b=R()?"adthrive-collapse-top-center":"adthrive-collapse-bottom-right");return b};return d}(),sa=function(){return function(d){this._clsOptions=d;this.removeVideoTitleWrapper=t(this._clsOptions.siteAds.adOptions.removeVideoTitleWrapper,!1);d=this._clsOptions.siteAds.videoPlayers;this.footerSelector=t(d&&d.footerSelector,"");this.players=t(d&&d.players.map(function(b){b.mobileLocation=ra.setMobileLocation(b.mobileLocation);return b}),[]);this.contextualSettings=d&&d.contextual}}(),ta=function(){return function(d){this.contextualPlayerAdded= this.playlistPlayerAdded=this.mobileStickyPlayerOnPage=!1;this.footerSelector="";this.removeVideoTitleWrapper=!1;this.videoAdOptions=new sa(d);this.players=this.videoAdOptions.players;this.contextualSettings=this.videoAdOptions.contextualSettings;this.removeVideoTitleWrapper=this.videoAdOptions.removeVideoTitleWrapper;this.footerSelector=this.videoAdOptions.footerSelector}}();C=function(){return function(){}}();var aa=function(d){function b(a){var c=d.call(this)||this;c._probability=a;return c}B(b, d);b.prototype.get=function(){if(0>this._probability||1<this._probability)throw Error("Invalid probability: ".concat(this._probability));return Math.random()<this._probability};return b}(C);A=function(){function d(){this._clsOptions=new Z;this.shouldUseCoreExperimentsConfig=!1}d.prototype.setExperimentKey=function(b){void 0===b&&(b=!1);this._clsOptions.setExperiment(this.key,this.result,b)};return d}();var ua=function(d){function b(){var a=d.call(this)||this;a._result=!1;a._choices=[{choice:!0},{choice:!1}]; a.key="smhd100";a._result=a.run();a.setExperimentKey();return a}B(b,d);Object.defineProperty(b.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0});b.prototype.run=function(){return(new aa(.1)).get()};return b}(A),va=[[728,90],[300,250],[300,600],[320,50],[970,250],[160,600],[300,1050],[336,280],[970,90],[300,50],[320,100],[468,60],[250,250],[120,240],[1,1],[300,300],[552,334],[300,420],[728,250],[320,300],[300,390]],wa=new Map([["Footer",1],["Header",2],["Sidebar", 3],["Content",4],["Recipe",5],["Sidebar_sticky",6],["Below Post",7]]),xa=function(d){return va.filter(function(b){b=p(b,2);var a=b[0],c=b[1];return d.some(function(e){e=p(e,2);var f=e[1];return a===e[0]&&c===f})})},ya=function(d,b){var a=new ua;return b.filter(function(c){return void 0!==c.dynamic&&c.dynamic.enabled}).map(function(c){var e=c.location.replace(/\s+/g,"_");return{auctionPriority:wa.get(e)||8,location:e,sequence:t(c.sequence,1),sizes:xa(c.adSizes).filter(function(f){var g=c.location, h=p(f,2);f=h[0];h=h[1];return!("Footer"===g&&"phone"===d&&320===f&&100===h||"Header"===g&&100<h&&a.result)}),devices:c.devices,pageSelector:t(c.dynamic.pageSelector,"").trim(),elementSelector:t(c.dynamic.elementSelector,"").trim(),position:t(c.dynamic.position,"beforebegin"),max:Math.floor(t(c.dynamic.max,0)),spacing:t(c.dynamic.spacing,0),skip:Math.floor(t(c.dynamic.skip,0)),every:Math.max(Math.floor(t(c.dynamic.every,1)),1),classNames:c.dynamic.classNames||[],sticky:"Footer"===c.location?!0:c.sticky, stickyOverlapSelector:t(c.stickyOverlapSelector,"").trim(),autosize:c.autosize,special:t(c.targeting,[]).filter(function(f){return"special"===f.key}).reduce(function(f,g){return f.concat.apply(f,w([],p(g.value),!1))},[]),lazy:t(c.dynamic.lazy,!1),lazyMax:t(c.dynamic.lazyMax,2),lazyMaxDefaulted:0===c.dynamic.lazyMax?!1:!c.dynamic.lazyMax}})},ba=function(d,b){var a=ha(b),c=d.sticky&&"Sidebar"===d.location;return d.sizes.filter(function(e){var f=c?e[1]<=window.innerHeight-100:!0;return(d.autosize?e[0]<= a||320>=e[0]:!0)&&f})},za=function(){return function(d){this.clsOptions=d;this.enabledLocations=["Below_Post","Content","Recipe","Sidebar"]}}(),Aa=function(d){var b=document.body;d="adthrive-device-".concat(d);if(!b.classList.contains(d))try{b.classList.add(d)}catch(a){n.error("BodyDeviceClassComponent","init",{message:a.message}),b="classList"in document.createElement("_"),n.error("BodyDeviceClassComponent","init.support",{support:b})}},Ba=function(d){d='\n .adthrive-device-phone .adthrive-sticky-content {\n height: 450px !important;\n margin-bottom: 100px !important;\n }\n .adthrive-content.adthrive-sticky {\n position: -webkit-sticky;\n position: sticky !important;\n top: 42px !important;\n margin-top: 42px !important;\n }\n .adthrive-content.adthrive-sticky:after {\n content: "\u2014 Advertisement. Scroll down to continue. \u2014";\n font-size: 10pt;\n margin-top: 5px;\n margin-bottom: 5px;\n display:block;\n color: #888;\n }\n body.single .adthrive-content {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n min-height:'.concat(d? d:400,"px !important;\n margin: 10px 0 10px 0;\n background-color: #FAFAFA;\n padding-bottom:0px;\n }\n body.single .adthrive-content > div {\n flex-basis: unset;\n position: sticky !important;\n display: block;\n flex-direction: column;\n top: 5px;\n }\n ");var b=void 0;void 0===b&&(b={});b=b.insertAt;if(d&&"undefined"!==typeof document){var a=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css";"top"===b?a.firstChild? a.insertBefore(c,a.firstChild):a.appendChild(c):a.appendChild(c);c.styleSheet?c.styleSheet.cssText=d:c.appendChild(document.createTextNode(d))}},ca=function(d){function b(a,c){void 0===a&&(a=[]);var e=d.call(this)||this;e._choices=a;e._default=c;return e}B(b,d);b.fromArray=function(a,c){return new b(a.map(function(e){e=p(e,2);return{choice:e[0],weight:e[1]}}),c)};b.prototype.addChoice=function(a,c){this._choices.push({choice:a,weight:c})};b.prototype.get=function(){var a,c=100*Math.random(),e=0;try{for(var f= J(this._choices),g=f.next();!g.done;g=f.next()){var h=g.value,l=h.choice;e+=h.weight;if(e>=c)return l}}catch(u){var k={error:u}}finally{try{g&&!g.done&&(a=f.return)&&a.call(f)}finally{if(k)throw k.error;}}return this._default};Object.defineProperty(b.prototype,"totalWeight",{get:function(){return this._choices.reduce(function(a,c){return a+c.weight},0)},enumerable:!1,configurable:!0});return b}(C),Ca=function(d){for(var b=5381,a=d.length;a;)b=33*b^d.charCodeAt(--a);return b>>>0},K=new (function(){function d(){var b= this;this.name="Session";this.disable=!1;this.removeSessionValue=function(a){window.localStorage.removeItem("adthrive_".concat(a.toLowerCase()))};this.getSessionValue=function(a,c,e){void 0===e&&(e=!1);if(b.disable)return null;try{var f=window.localStorage.getItem("adthrive_".concat(a.toLowerCase()));if(f){var g=JSON.parse(f),h=void 0!==c&&Date.now()-g.created>=c;if(g&&!h)return e&&b.setSessionValue(a,g.value),g.value}}catch(l){}return null};this.setSessionValue=function(a,c){try{var e={value:c,created:Date.now()}; window.localStorage.setItem("adthrive_".concat(a.toLowerCase()),JSON.stringify(e))}catch(f){}};this.isValidABGroupSessionValue=function(a){return void 0!==a&&null!==a&&!("number"===typeof a&&isNaN(a))};this.getOrSetSessionValue=function(a,c,e,f,g){void 0===f&&(f=!0);e=b.getSessionValue(a,e,f);if(null!==e)return e;c=c();b.setSessionValue(a,c);g&&g(c);return c};this.getOrSetABGroupSessionValue=function(a,c,e,f,g){var h;void 0===f&&(f=!0);e=b.getSessionValue("abgroup",e,f);if(null!==e&&(f=e[a],b.isValidABGroupSessionValue(f)))return f; c=c();a=x(x({},e),(h={},h[a]=c,h));b.setSessionValue("abgroup",a);g&&g();return c}}d.prototype.init=function(){};return d}()),Da=function(){return function(d,b,a){var c=a.value;c&&(a.value=function(){for(var e=this,f,g=[],h=0;h<arguments.length;h++)g[h]=arguments[h];h=Array.isArray(this._choices)?Ca(JSON.stringify(this._choices)).toString(16):null;var l=this.key?this.key.toLowerCase():"";h=h?"".concat(l,"_").concat(h):l;h=this.sessionStoragePrefix?"".concat(this.sessionStoragePrefix,"-").concat(h): h;!1===(null===(f=K.getSessionValue("branch"))||void 0===f?void 0:f.enabled)&&K.removeSessionValue(h);return K.getOrSetABGroupSessionValue(h,function(){return c.apply(e,g)},864E5)})}};C=function(d){function b(){var a=null!==d&&d.apply(this,arguments)||this;a._resultValidator=function(){return!0};return a}B(b,d);b.prototype._isValidResult=function(a){var c=this;return d.prototype._isValidResult.call(this,a,function(){return c._resultValidator(a)||"control"===a})};b.prototype.run=function(){if(!this.enabled)return n.error("CLSWeightedChoiceSiteExperiment", "run","() => %o","No experiment config found. Defaulting to control."),"control";if(!this._mappedChoices||0===this._mappedChoices.length)return n.error("CLSWeightedChoiceSiteExperiment","run","() => %o","No experiment variants found. Defaulting to control."),"control";var a=(new ca(this._mappedChoices)).get();if(this._isValidResult(a))return a;n.error("CLSWeightedChoiceSiteExperiment","run","() => %o","Invalid result from experiment choices. Defaulting to control.");return"control"};return b}(function(){function d(){} Object.defineProperty(d.prototype,"enabled",{get:function(){return void 0!==this.experimentConfig},enumerable:!1,configurable:!0});d.prototype._isValidResult=function(b,a){void 0===a&&(a=function(){return!0});return a()&&K.isValidABGroupSessionValue(b)};return d}());var Ea=function(){function d(b){var a=this,c,e;this.siteExperiments=[];this._clsOptions=b;this._device=R()?"mobile":"desktop";this.siteExperiments=null!==(e=null===(c=this._clsOptions.siteAds.siteExperiments)||void 0===c?void 0:c.filter(function(f){var g= f.key;var h=a._device;if(f){var l=!!f.enabled,k=null==f.dateStart||Date.now()>=f.dateStart,u=null==f.dateEnd||Date.now()<=f.dateEnd,q=null===f.selector||""!==f.selector&&!!document.querySelector(f.selector),r="mobile"===f.platform&&"mobile"===h;h="desktop"===f.platform&&"desktop"===h;r=null===f.platform||"all"===f.platform||r||h;(h="bernoulliTrial"===f.experimentType?1===f.variants.length:pa(f.variants))||n.error("ValidateSiteExperiment","util","experiment presented invalid choices for key:",f.key, f.variants);f=l&&k&&u&&q&&r&&h}else f=!1;a:switch(l=a._clsOptions.siteAds,g){case E.AdDensity:var m=oa(l,a._device);break a;case E.StickyOutstream:var z,y;m=(g=null===(y=null===(z=null===(m=l.videoPlayers)||void 0===m?void 0:m.partners)||void 0===z?void 0:z.stickyOutstream)||void 0===y?void 0:y.blockedPageSelectors)?!document.querySelector(g):!0;break a;case E.Interstitial:m=(m=l.adOptions.interstitialBlockedPageSelectors||l.adOptions.mobileInterstitialBlockedPageSelectors)?!document.querySelector(m): !0;break a;default:m=!0}return f&&m}))&&void 0!==e?e:[]}d.prototype.getSiteExperimentByKey=function(b){return this.siteExperiments.filter(function(a){return a.key.toLowerCase()===b.toLowerCase()})[0]};return d}(),Fa=function(d){function b(a){var c=d.call(this)||this;c._choices=[];c._mappedChoices=[];c._result="control";c._resultValidator=function(e){return"number"===typeof e};c.key=E.AdDensity;c._clsSiteExperiments=new Ea(a);c.experimentConfig=c._clsSiteExperiments.getSiteExperimentByKey(c.key);c.enabled&& c.experimentConfig&&(c._choices=c.experimentConfig.variants,c._mappedChoices=c._mapChoices(),c._result=c.run(),a.setWeightedChoiceExperiment(c.key,c._result,!0));return c}B(b,d);Object.defineProperty(b.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0});b.prototype.run=function(){if(!this.enabled)return n.error("CLSTargetAdDensitySiteExperiment","run","() => %o","No experiment config found. Defaulting to control."),"control";var a=(new ca(this._mappedChoices)).get(); if(this._isValidResult(a))return a;n.error("CLSTargetAdDensitySiteExperiment","run","() => %o","Invalid result from experiment choices. Defaulting to control.");return"control"};b.prototype._mapChoices=function(){return this._choices.map(function(a){var c=a.value;return{weight:a.weight,choice:"number"===typeof c?(c||0)/100:"control"}})};Q([Da(),I("design:type",Function),I("design:paramtypes",[]),I("design:returntype",void 0)],b.prototype,"run",null);return b}(C),da=function(d,b,a,c,e,f){d=Math.round(f- e);b=[];e=[];b.push("(",a.map(function(){return"%o"}).join(", "),")");e.push.apply(e,w([],p(a),!1));void 0!==c&&(b.push(" => %o"),e.push(c));b.push(" %c(".concat(d,"ms)"));e.push("color: #999;")},ea=function(d,b,a){var c=void 0!==a.get?a.get:a.value;return function(){for(var e=[],f=0;f<arguments.length;f++)e[f]=arguments[f];try{var g=P(),h=c.apply(this,e);if(h instanceof Promise)return h.then(function(k){var u=P();da(d,b,e,k,g,u);return Promise.resolve(k)}).catch(function(k){k.logged||(n.error(d, b,k),k.logged=!0);throw k;});var l=P();da(d,b,e,h,g,l);return h}catch(k){throw k.logged||(n.error(d,b,k),k.logged=!0),k;}}},Ga=function(d,b){void 0===b&&(b=!1);return function(a){var c,e=Object.getOwnPropertyNames(a.prototype).filter(function(q){return b||0!==q.indexOf("_")}).map(function(q){return[q,Object.getOwnPropertyDescriptor(a.prototype,q)]});try{for(var f=J(e),g=f.next();!g.done;g=f.next()){var h=p(g.value,2),l=h[0],k=h[1];void 0!==k&&"function"===typeof k.value?a.prototype[l]=ea(d,l,k):void 0!== k&&void 0!==k.get&&"function"===typeof k.get&&Object.defineProperty(a.prototype,l,x(x({},k),{get:ea(d,l,k)}))}}catch(q){var u={error:q}}finally{try{g&&!g.done&&(c=f.return)&&c.call(f)}finally{if(u)throw u.error;}}}},Ha=function(d){function b(){var a=d.call(this)||this;a._result=!1;a.key="scae";a._choices=[{choice:!0},{choice:!1}];a.weight=.99;a._result=a.run();a.setExperimentKey();return a}B(b,d);Object.defineProperty(b.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0}); b.prototype.run=function(){return(new aa(this.weight)).get()};return b=Q([Ga("StickyContainerAdsExperiment"),I("design:paramtypes",[])],b)}(A),Ka=function(){function d(b,a){this._clsOptions=b;this._adInjectionMap=a;this._mainContentHeight=this._recipeCount=0;this._mainContentDiv=null;this._totalAvailableElements=[];this._minDivHeight=250;this._densityDevice=H.Desktop;this._pubLog={onePerViewport:!1,targetDensity:0,targetDensityUnits:0,combinedMax:0};this._densityMax=.99;this._smallerIncrementAttempts= 0;this._absoluteMinimumSpacingByDevice=250;this._usedAbsoluteMinimum=!1;this._infPageEndOffset=0;this.locationMaxLazySequence=new Map([["Recipe",5]]);this.locationToMinHeight={Below_Post:"250px",Content:"250px",Recipe:"250px",Sidebar:"250px"};a=this._clsOptions.siteAds.breakpoints;var c=a.tablet;var e=window.innerWidth;a=e>=a.desktop?"desktop":e>=c?"tablet":"phone";this._device=a;this._config=new za(b);this._clsOptions.enabledLocations=this._config.enabledLocations;this._clsTargetAdDensitySiteExperiment= this._clsOptions.siteAds.siteExperiments?new Fa(this._clsOptions):null}d.prototype.start=function(){var b=this,a,c,e,f;try{Aa(this._device);var g=ya(this._device,this._clsOptions.siteAds.adUnits).filter(function(k){return b._locationEnabled(k)}).filter(function(k){return k.devices.includes(b._device)}).filter(function(k){return 0===k.pageSelector.length||null!==document.querySelector(k.pageSelector)}),h=this.inject(g),l=new Ha;(null===(c=null===(a=this._clsOptions.siteAds.adOptions.stickyContainerConfig)|| void 0===a?void 0:a.content)||void 0===c?0:c.enabled)&&l.result&&Ba(null===(f=null===(e=this._clsOptions.siteAds.adOptions.stickyContainerConfig)||void 0===e?void 0:e.content)||void 0===f?void 0:f.minHeight);h.forEach(function(k){return b._clsOptions.setInjectedSlots(k)})}catch(k){n.error("ClsDynamicAdsInjector","start",k)}};d.prototype.inject=function(b,a){void 0===a&&(a=document);this._densityDevice="desktop"===this._device?H.Desktop:H.Mobile;this._overrideDefaultAdDensitySettingsWithSiteExperiment(); var c=this._clsOptions.siteAds,e=t(c.adDensityEnabled,!0),f=c.adDensityLayout&&e;c=b.filter(function(g){return f?"Content"!==g.location:g});b=b.filter(function(g){return f?"Content"===g.location:null});return w(w([],p(c.length?this._injectNonDensitySlots(c,a):[]),!1),p(b.length?this._injectDensitySlots(b,a):[]),!1)};d.prototype._injectNonDensitySlots=function(b,a){var c,e=this;void 0===a&&(a=document);var f=[],g=[];try{for(var h=J(b),l=h.next();!l.done;l=h.next()){var k=l.value,u=0,q=0,r=0;0<k.spacing&& (q=u=window.innerHeight*k.spacing);var m=this._repeatDynamicAds(k),z=this.getElements(k.elementSelector,a);b=function(v){if(r+1>m.length)return"break";var F=z[v];if(0<u){v=ia(F).bottom;if(v<=q)return"continue";q=v+u}v=m[r];var fa="".concat(v.location,"_").concat(v.sequence);f.some(function(Ia){return Ia.name===fa})&&(r+=1);var L=y.getDynamicElementId(v),M="adthrive-".concat(k.location.replace("_","-").toLowerCase()),Ja="".concat(M,"-").concat(k.sequence);M=w([M,Ja],p(k.classNames),!1);if(F=y.addAd(F, L,k.position,M))L=ba(v,F),L.length&&(f.push({clsDynamicAd:k,dynamicAd:v,element:F,sizes:L,name:fa,infinite:a!==document}),g.push({location:v.location,element:F}),"Recipe"===k.location&&++y._recipeCount,r+=1)};for(var y=this,G=k.skip;G<z.length&&"break"!==b(G);G+=k.every);}}catch(v){var N={error:v}}finally{try{l&&!l.done&&(c=h.return)&&c.call(h)}finally{if(N)throw N.error;}}g.forEach(function(v){v.element.style.minHeight=e.locationToMinHeight[v.location]});return f};d.prototype._injectDensitySlots= function(b,a){void 0===a&&(a=document);try{this._calculateMainContentHeightAndAllElements(b,a)}catch(h){return[]}var c=this._getDensitySettings(b,a);b=c.onePerViewport;var e=c.targetAll,f=c.targetDensityUnits,g=c.combinedMax;c=c.numberOfUnits;this._absoluteMinimumSpacingByDevice=b?window.innerHeight:this._absoluteMinimumSpacingByDevice;if(!c)return[];this._adInjectionMap.filterUsed();this._findElementsForAds(c,b,e,g,f,a);return this._insertAds()};d.prototype._overrideDefaultAdDensitySettingsWithSiteExperiment= function(){var b;if(null===(b=this._clsTargetAdDensitySiteExperiment)||void 0===b?0:b.enabled)b=this._clsTargetAdDensitySiteExperiment.result,"number"===typeof b&&(this._clsOptions.siteAds.adDensityEnabled=!0,this._clsOptions.siteAds.adDensityLayout[this._densityDevice].adDensity=b)};d.prototype._getDensitySettings=function(b,a){void 0===a&&(a=document);var c=this._clsOptions.siteAds.adDensityLayout,e=this._determineOverrides(c.pageOverrides);e=e.length?e[0]:c[this._densityDevice];c=e.adDensity;e= e.onePerViewport;var f=this._shouldTargetAllEligible(c),g=this._getTargetDensityUnits(c,f);b=this._getCombinedMax(b,a);a=Math.min.apply(Math,w([],p(w([this._totalAvailableElements.length,g],p(0<b?[b]:[]),!1)),!1));this._pubLog={onePerViewport:e,targetDensity:c,targetDensityUnits:g,combinedMax:b};return{onePerViewport:e,targetAll:f,targetDensityUnits:g,combinedMax:b,numberOfUnits:a}};d.prototype._determineOverrides=function(b){var a=this;return b.filter(function(c){var e=Y(c.pageSelector);return""=== c.pageSelector||e.elements&&e.elements.length}).map(function(c){return c[a._densityDevice]})};d.prototype._shouldTargetAllEligible=function(b){return b===this._densityMax};d.prototype._getTargetDensityUnits=function(b,a){return a?this._totalAvailableElements.length:Math.floor(b*this._mainContentHeight/(1-b)/this._minDivHeight)-this._recipeCount};d.prototype._getCombinedMax=function(b,a){void 0===a&&(a=document);return t(b.filter(function(c){try{var e=a.querySelector(c.elementSelector)}catch(f){}return e}).map(function(c){return Number(c.max)+ Number(c.lazyMaxDefaulted?0:c.lazyMax)}).sort(function(c,e){return e-c})[0],0)};d.prototype._elementLargerThanMainContent=function(b){return b.offsetHeight>=this._mainContentHeight&&1<this._totalAvailableElements.length};d.prototype._elementDisplayNone=function(b){var a=window.getComputedStyle(b,null).display;return a&&"none"===a||"none"===b.style.display};d.prototype._isBelowMaxes=function(b,a){return this._adInjectionMap.map.length<b&&this._adInjectionMap.map.length<a};d.prototype._findElementsForAds= function(b,a,c,e,f,g){var h=this;void 0===g&&(g=document);this._clsOptions.targetDensityLog={onePerViewport:a,combinedMax:e,targetDensityUnits:f,targetDensityPercentage:this._pubLog.targetDensity,mainContentHeight:this._mainContentHeight,recipeCount:this._recipeCount,numberOfEls:this._totalAvailableElements.length};var l=function(k){var u;try{for(var q=J(h._totalAvailableElements),r=q.next();!r.done;r=q.next()){var m=r.value,z=m.dynamicAd,y=m.element;h._logDensityInfo(y,z.elementSelector,k);if(!(!c&& h._elementLargerThanMainContent(y)||h._elementDisplayNone(y)))if(h._isBelowMaxes(e,f))h._checkElementSpacing({dynamicAd:z,element:y,insertEvery:k,targetAll:c,target:g});else break}}catch(N){var G={error:N}}finally{try{r&&!r.done&&(u=q.return)&&u.call(q)}finally{if(G)throw G.error;}}!h._usedAbsoluteMinimum&&5>h._smallerIncrementAttempts&&(++h._smallerIncrementAttempts,l(h._getSmallerIncrement(k)))};b=this._getInsertEvery(b,a,f);l(b)};d.prototype._getSmallerIncrement=function(b){b*=.6;b<=this._absoluteMinimumSpacingByDevice&& (b=this._absoluteMinimumSpacingByDevice,this._usedAbsoluteMinimum=!0);return b};d.prototype._insertAds=function(){var b=this,a=[];this._adInjectionMap.filterUsed();this._adInjectionMap.map.forEach(function(c,e){var f=c.el,g=c.dynamicAd;c=c.target;e=Number(g.sequence)+e;var h=g.max;h=g.lazy&&e>h;g.sequence=e;g.lazy=h;if(f=b._addContentAd(f,g,c))g.used=!0,a.push(f)});return a};d.prototype._getInsertEvery=function(b,a,c){this._moreAvailableElementsThanUnitsToInject(c,b)?(this._usedAbsoluteMinimum=!1, b=this._useWiderSpacing(c,b)):(this._usedAbsoluteMinimum=!0,b=this._useSmallestSpacing(a));return a&&window.innerHeight>b?window.innerHeight:b};d.prototype._useWiderSpacing=function(b,a){return this._mainContentHeight/Math.min(b,a)};d.prototype._useSmallestSpacing=function(b){return b&&window.innerHeight>this._absoluteMinimumSpacingByDevice?window.innerHeight:this._absoluteMinimumSpacingByDevice};d.prototype._moreAvailableElementsThanUnitsToInject=function(b,a){return this._totalAvailableElements.length> b||this._totalAvailableElements.length>a};d.prototype._logDensityInfo=function(b,a,c){b=this._pubLog;b.onePerViewport;b.targetDensity;b.combinedMax};d.prototype._checkElementSpacing=function(b){var a=b.dynamicAd,c=b.element,e=b.insertEvery,f=b.targetAll;b=b.target;b=void 0===b?document:b;(this._isFirstAdInjected()||this._hasProperSpacing(c,a,f,e))&&this._markSpotForContentAd(c,x({},a),b)};d.prototype._isFirstAdInjected=function(){return!this._adInjectionMap.map.length};d.prototype._markSpotForContentAd= function(b,a,c){void 0===c&&(c=document);this._adInjectionMap.add(b,this._getElementCoords(b,"beforebegin"===a.position||"afterbegin"===a.position),a,c);this._adInjectionMap.sort()};d.prototype._hasProperSpacing=function(b,a,c,e){var f="beforebegin"===a.position||"afterbegin"===a.position;a="beforeend"===a.position||"afterbegin"===a.position;c=c||this._isElementFarEnoughFromOtherAdElements(b,e,f);f=a||this._isElementNotInRow(b,f);b=-1===b.id.indexOf("AdThrive_".concat("Below_Post"));return c&&f&& b};d.prototype._isElementFarEnoughFromOtherAdElements=function(b,a,c){b=this._getElementCoords(b,c);var e=!1;for(c=0;c<this._adInjectionMap.map.length&&!(e=this._adInjectionMap.map[c+1]&&this._adInjectionMap.map[c+1].coords,e=b-a>this._adInjectionMap.map[c].coords&&(!e||b+a<e));c++);return e};d.prototype._isElementNotInRow=function(b,a){var c=b.previousElementSibling,e=b.nextElementSibling;return(a=a?!c&&e||c&&b.tagName!==c.tagName?e:c:e)&&0===b.getBoundingClientRect().height?!0:a?b.getBoundingClientRect().top!== a.getBoundingClientRect().top:!0};d.prototype._calculateMainContentHeightAndAllElements=function(b,a){void 0===a&&(a=document);b=p(na(b,this._adInjectionMap,a),2);a=b[1];this._mainContentDiv=b[0];this._totalAvailableElements=a;b=this._mainContentDiv;a=void 0;void 0===a&&(a="div #comments, section .comments");this._mainContentHeight=(a=b.querySelector(a))?b.offsetHeight-a.offsetHeight:b.offsetHeight};d.prototype._getElementCoords=function(b,a){void 0===a&&(a=!1);b=b.getBoundingClientRect();return(a? b.top:b.bottom)+window.scrollY};d.prototype._addContentAd=function(b,a,c){void 0===c&&(c=document);var e=null,f="adthrive-".concat(a.location.replace("_","-").toLowerCase()),g="".concat(f,"-").concat(a.sequence);if(b=this.addAd(b,this.getDynamicElementId(a),a.position,w([f,g],p(a.classNames),!1)))f=ba(a,b),f.length&&(b.style.minHeight=this.locationToMinHeight[a.location],e="".concat(a.location,"_").concat(a.sequence),e={clsDynamicAd:a,dynamicAd:a,element:b,sizes:f,name:e,infinite:c!==document});return e}; d.prototype.getDynamicElementId=function(b){return"".concat("AdThrive","_").concat(b.location,"_").concat(b.sequence,"_").concat(this._device)};d.prototype.getElements=function(b,a){void 0===a&&(a=document);return a.querySelectorAll(b)};d.prototype.addAd=function(b,a,c,e){void 0===e&&(e=[]);document.getElementById(a)||(e='<div id="'.concat(a,'" class="adthrive-ad ').concat(e.join(" "),'"></div>'),b.insertAdjacentHTML(c,e));return document.getElementById(a)};d.prototype._repeatDynamicAds=function(b){var a= [],c=b.lazy?t(this.locationMaxLazySequence.get(b.location),0):0,e=b.max,f=b.lazyMax;c=Math.max(e,0===c&&b.lazy?e+f:Math.min(Math.max(c-b.sequence+1,0),e+f));for(f=0;f<c;f++){var g=Number(b.sequence)+f,h=b.lazy&&f>=e;a.push(x(x({},b),{sequence:g,lazy:h}))}return a};d.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"),c=!document.body.classList.contains("adthrive-disable-content")&& !this._clsOptions.disableAds.reasons.has("content_plugin");return b&&!a&&c};return d}(),La=function(d){function b(a,c){var e=d.call(this,a,"ClsVideoInsertion")||this;e._videoConfig=a;e._clsOptions=c;e._IN_POST_SELECTOR=".adthrive-video-player";e._WRAPPER_BAR_HEIGHT=36;e._playersAddedFromPlugin=[];return e}B(b,d);b.prototype.init=function(){this._initializePlayers()};b.prototype._wrapJWPlayerWithCLS=function(a,c,e){void 0===e&&(e=0);return a.parentNode?(c=this._createGenericCLSWrapper(.5625*a.offsetWidth, c,e),a.parentNode.insertBefore(c,a),c.appendChild(a),c):null};b.prototype._createGenericCLSWrapper=function(a,c,e){var f=document.createElement("div");f.id="cls-video-container-".concat(c);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 c=window.getComputedStyle(a),e=parseInt(c.height,10),f=parseInt(c.marginTop,10);c=parseInt(c.marginBottom,10);document.body.removeChild(a); return Math.min(e+c+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,c){var e="mobile"===this._device?[400,225]:[640,360],f=D.Video_In_Post_ClicktoPlay_SoundOn;c&&a.mediaId&&(c=this._wrapJWPlayerWithCLS(c,a.mediaId),this._playersAddedFromPlugin.push(a.mediaId),c&&this._clsOptions.setInjectedVideoSlots({playerId:a.playerId, playerName:f,playerSize:e,element:c,type:"stationaryRelated"}))};b.prototype._createStickyRelatedPlayer=function(a,c){var e="mobile"===this._device?[400,225]:[640,360],f=D.Video_Individual_Autoplay_SOff;this._stickyRelatedOnPage=!0;this._videoConfig.mobileStickyPlayerOnPage="mobile"===this._device;if(c&&a.position&&a.mediaId){var g=document.createElement("div");c.insertAdjacentElement(a.position,g);c=document.createElement("h3");c.style.margin="10px 0";c=this._getTitleHeight(c);c=this._wrapJWPlayerWithCLS(g, a.mediaId,this._WRAPPER_BAR_HEIGHT+c);this._playersAddedFromPlugin.push(a.mediaId);c&&this._clsOptions.setInjectedVideoSlots({playlistId:a.playlistId,playerId:a.playerId,playerSize:e,playerName:f,element:g,type:"stickyRelated"})}};b.prototype._createPlaylistPlayer=function(a,c){var e=a.playlistId,f="mobile"===this._device?D.Video_Coll_SOff_Smartphone:D.Video_Collapse_Autoplay_SoundOff,g="mobile"===this._device?[400,225]:[640,360];this._videoConfig.mobileStickyPlayerOnPage=!0;var h=document.createElement("div"); c.insertAdjacentElement(a.position,h);c=this._wrapJWPlayerWithCLS(h,e,this._WRAPPER_BAR_HEIGHT);this._playersAddedFromPlugin.push("playlist-".concat(e));c&&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 c="";a.reasons.has("video_tag")?c="video tag":a.reasons.has("video_plugin")?c="video plugin":a.reasons.has("video_page")&& (c="command queue");n.error(c?"ClsVideoInsertionMigrated":"ClsVideoInsertion","isVideoAllowedOnPage",Error("DBP: Disabled by publisher via ".concat(c||"other")));return!1}return this._clsOptions.videoDisabledFromPlugin?!1:!0};return b}(function(d){function b(a,c){var e=d.call(this)||this;e._videoConfig=a;e._component=c;e._stickyRelatedOnPage=!1;e._contextualMediaIds=[];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}B(b,d);b.prototype.setPotentialPlayersMap=function(){var a=this._videoConfig.players||[],c=this._filterPlayerMap();a=a.filter(function(e){return"stationaryRelated"===e.type&&e.enabled});c.stationaryRelated=a;return this._potentialPlayerMap=c};b.prototype._filterPlayerMap=function(){var a=this,c=this._videoConfig.players,e={stickyRelated:[],stickyPlaylist:[],stationaryRelated:[]};return c&&c.length?c.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]||(n.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 c=this;a=this._potentialPlayerMap[a].map(function(e){return{player:e,playerElement:c._getPlacementElement(e)}});return a.length?a[0]:{player:null,playerElement:null}};b.prototype._getOverrideElement=function(a,c,e){a&&c?(e=document.createElement("div"), c.insertAdjacentElement(a.position,e)):(c=this._checkPlayerSelectorOnPage("stickyPlaylist"),a=c.player,c=c.playerElement,a&&c&&(e=document.createElement("div"),c.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.contextualSettings?this._videoConfig.contextualSettings.overrideEmbedLocation:!1};b.prototype._getPlacementElement=function(a){var c=Y(a.pageSelector), e=X(a.elementSelector);if(!c.valid)return n.error("VideoUtils","getPlacementElement",Error("".concat(a.pageSelector," is not a valid selector"))),null;if(a.pageSelector&&!c.elements.length)return n.event("VideoUtils","getPlacementElement",Error("PSNF: ".concat(a.pageSelector," does not exist on the page"))),null;if(!e.valid)return n.error("VideoUtils","getPlacementElement",Error("".concat(a.elementSelector," is not a valid selector"))),null;if(e.elements.length>a.skip)return e.elements[a.skip];n.event("VideoUtils", "getPlacementElement",Error("ESNF: ".concat(a.elementSelector," does not exist on the page")));return null};b.prototype._getEmbeddedPlayerType=function(a){(a=a.getAttribute("data-player-type"))&&"default"!==a||(a=this._videoConfig.contextualSettings?this._videoConfig.contextualSettings.defaultPlayerType:"static");this._stickyRelatedOnPage&&(a="static");return a};b.prototype._getUnusedMediaId=function(a){return(a=a.getAttribute("data-video-id"))&&!this._contextualMediaIds.includes(a)?(this._contextualMediaIds.push(a), a):!1};b.prototype._createRelatedPlayer=function(a,c,e){"collapse"===c?this._createCollapsePlayer(a,e):"static"===c&&this._createStaticPlayer(a,e)};b.prototype._createCollapsePlayer=function(a,c){var e=this._checkPlayerSelectorOnPage("stickyRelated"),f=e.player;e=e.playerElement;var g=f?f:this._potentialPlayerMap.stationaryRelated[0];g&&g.playerId?(this._shouldOverrideElement(c)&&(c=this._getOverrideElement(f,e,c)),c=document.querySelector("#cls-video-container-".concat(a," > div"))||c,this._createStickyRelatedPlayer(x(x({}, g),{mediaId:a}),c)):n.error(this._component,"_createCollapsePlayer","No video player found")};b.prototype._createStaticPlayer=function(a,c){this._potentialPlayerMap.stationaryRelated.length&&this._potentialPlayerMap.stationaryRelated[0].playerId?this._createStationaryRelatedPlayer(x(x({},this._potentialPlayerMap.stationaryRelated[0]),{mediaId:a}),c):n.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,c="VideoManagerComponent"===a,e=this._config;if(this._stickyRelatedOnPage)n.event(a,"stickyRelatedOnPage",c&&{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):n.event(a, "noStickyPlaylist",c&&{vendor:"none",device:e&&e.context.device,isDesktop:this._device}||{})}};b.prototype._initializeRelatedPlayers=function(a){for(var c=0;c<a.length;c++){var e=a[c],f=this._getEmbeddedPlayerType(e),g=this._getUnusedMediaId(e);g&&this._createRelatedPlayer(g,f,e)}};return b}(function(){function d(){}Object.defineProperty(d.prototype,"enabled",{get:function(){return!0},enumerable:!1,configurable:!0});return d}())),Ma=function(d){function b(){return null!==d&&d.apply(this,arguments)|| this}B(b,d);return b}(function(){function d(){this._map=[]}d.prototype.add=function(b,a,c,e){void 0===e&&(e=document);this._map.push({el:b,coords:a,dynamicAd:c,target:e})};Object.defineProperty(d.prototype,"map",{get:function(){return this._map},enumerable:!1,configurable:!0});d.prototype.sort=function(){this._map.sort(function(b,a){return b.coords-a.coords})};d.prototype.filterUsed=function(){this._map=this._map.filter(function(b){return!b.dynamicAd.used})};return d}());try{(function(){var d=new Z; d&&d.enabled&&((new Ka(d,new Ma)).start(),(new La(new ta(d),d)).init())})()}catch(d){n.error("CLS","pluginsertion-iife",d),window.adthriveCLS&&(window.adthriveCLS.injectedFromPlugin=!1)}})() (function () {var clsElements = document.querySelectorAll("script[id^='cls-']"); window.adthriveCLS && clsElements && clsElements.length === 0 ? window.adthriveCLS.injectedFromPlugin = false : ""; })(); var _paq = _paq || []; _paq.push(['setCustomDimension', 1, '{"ID":2,"name":"Kristi Linauer","avatar":"aa1a9d70b06d3fa3718b1015641d9ee6"}']); _paq.push(['trackPageView']); (function () { var u = "https://stats1.wpmudev.com/"; _paq.push(['setTrackerUrl', u + 'track/']); _paq.push(['setSiteId', '101782']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.type = 'text/javascript'; g.async = true; g.defer = true; g.src = 'https://stats.wpmucdn.com/analytics.js'; s.parentNode.insertBefore(g, s); })(); var sbiajaxurl = "https://www.addicted2decorating.com/wp-admin/admin-ajax.php"; /* <![CDATA[ */ var PT_CV_PUBLIC = {"_prefix":"pt-cv-","page_to_show":"5","_nonce":"2545c61660","is_admin":"","is_mobile":"","ajaxurl":"https:\/\/www.addicted2decorating.com\/wp-admin\/admin-ajax.php","lang":"","loading_image_src":"data:image\/gif;base64,R0lGODlhDwAPALMPAMrKygwMDJOTkz09PZWVla+vr3p6euTk5M7OzuXl5TMzMwAAAJmZmWZmZszMzP\/\/\/yH\/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAPACwAAAAADwAPAAAEQvDJaZaZOIcV8iQK8VRX4iTYoAwZ4iCYoAjZ4RxejhVNoT+mRGP4cyF4Pp0N98sBGIBMEMOotl6YZ3S61Bmbkm4mAgAh+QQFCgAPACwAAAAADQANAAAENPDJSRSZeA418itN8QiK8BiLITVsFiyBBIoYqnoewAD4xPw9iY4XLGYSjkQR4UAUD45DLwIAIfkEBQoADwAsAAAAAA8ACQAABC\/wyVlamTi3nSdgwFNdhEJgTJoNyoB9ISYoQmdjiZPcj7EYCAeCF1gEDo4Dz2eIAAAh+QQFCgAPACwCAAAADQANAAAEM\/DJBxiYeLKdX3IJZT1FU0iIg2RNKx3OkZVnZ98ToRD4MyiDnkAh6BkNC0MvsAj0kMpHBAAh+QQFCgAPACwGAAAACQAPAAAEMDC59KpFDll73HkAA2wVY5KgiK5b0RRoI6MuzG6EQqCDMlSGheEhUAgqgUUAFRySIgAh+QQFCgAPACwCAAIADQANAAAEM\/DJKZNLND\/kkKaHc3xk+QAMYDKsiaqmZCxGVjSFFCxB1vwy2oOgIDxuucxAMTAJFAJNBAAh+QQFCgAPACwAAAYADwAJAAAEMNAs86q1yaWwwv2Ig0jUZx3OYa4XoRAfwADXoAwfo1+CIjyFRuEho60aSNYlOPxEAAAh+QQFCgAPACwAAAIADQANAAAENPA9s4y8+IUVcqaWJ4qEQozSoAzoIyhCK2NFU2SJk0hNnyEOhKR2AzAAj4Pj4GE4W0bkJQIAOw==","is_mobile_tablet":"","sf_no_post_found":"No posts found."}; var PT_CV_PAGINATION = {"first":"\u00ab","prev":"\u2039","next":"\u203a","last":"\u00bb","goto_first":"Go to first page","goto_prev":"Go to previous page","goto_next":"Go to next page","goto_last":"Go to last page","current_page":"Current page is","goto_page":"Go to page"}; /* ]]> */ /* <![CDATA[ */ var sb_instagram_js_options = {"font_method":"svg","resized_url":"https:\/\/www.addicted2decorating.com\/wp-content\/uploads\/sb-instagram-feed-images\/","placeholder":"https:\/\/www.addicted2decorating.com\/wp-content\/plugins\/instagram-feed\/img\/placeholder.png","ajax_url":"https:\/\/www.addicted2decorating.com\/wp-admin\/admin-ajax.php"}; /* ]]> */ _stq = window._stq || []; _stq.push([ 'view', {v:'ext',j:'1:11.1.2',blog:'104326663',post:'37360',tz:'-5',srv:'www.addicted2decorating.com'} ]); _stq.push([ 'clickTrackerInit', '104326663', '37360' ]); !function(){"use strict";!function(e){if(-1===e.cookie.indexOf("__adblocker")){e.cookie="__adblocker=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";var t=new XMLHttpRequest;t.open("GET","https://www.npttech.com/advertising.js",!0),t.onreadystatechange=function(){if(XMLHttpRequest.DONE===t.readyState)if(200===t.status){var n=e.createElement("script");n.innerHTML=t.responseText,e.getElementsByTagName("head")[0].appendChild(n)}else{var a=new Date;a.setTime(a.getTime()+3e5),e.cookie="__adblocker=true; expires="+a.toUTCString()+"; path=/"}},t.send()}}(document)}(); !function(){"use strict";var e;e=document,function(){var t,n;function r(){var t=e.createElement("script");t.src="https://cafemedia-com.videoplayerhub.com/galleryplayer.js",e.head.appendChild(t)}function a(){var t=e.cookie.match("(^|[^;]+)\\s*__adblocker\\s*=\\s*([^;]+)");return t&&t.pop()}function c(){clearInterval(n)}return{init:function(){var e;"true"===(t=a())?r():(e=0,n=setInterval((function(){100!==e&&"false"!==t||c(),"true"===t&&(r(),c()),t=a(),e++}),50))}}}().init()}(); ```