December 6, 2020

parenting advice from Care and Feeding.

By haziqbinarif


An older woman holds something in her fingers over a curious-looking little girl.
Photo illustration by Slate. Photos by Daisy-Daisy/iStock/Getty Images Plus and MrPants/iStock/Getty Images Plus.

Care and Feeding is Slate’s parenting advice column. Have a question for Care and Feeding? Submit it here or post it in the Slate Parenting Facebook group.

Dear Care and Feeding,

My smart, fun, 3-year-old daughter loves her grandparents, my father, and my stepmother. (My mother died over a decade ago.) My stepmother’s two adult children both have dogs they dote on, and their mother showers the dogs with affection and loves to talk about her grandpups. Nothing wrong with that! However, since my daughter was born, my stepmother has frequently made comparisons between my daughter and these dogs. For example, when my daughter jumps up for an offered cookie, she’ll say, “Oh, that’s just like [dog’s name]!” I have tended to grin and bear this, though it drives my daughter’s father a little crazy.

But my daughter’s getting older. The last time we visited, she was playing with something she shouldn’t have been playing with, and I told her to stop, which she did. My stepmother then said, “Good girl, [name]” in a voice I can only describe as the sort of voice you use for a puppy. And then she confirmed this by turning to me and saying, “That’s what I say to [dog’s name].” I responded: “Yes, I know. But I don’t say that to her. Maybe we could just say ‘thank you’ instead?”

We moved past it, but it ruffled my feathers because I could tell it ruffled hers. Was I too sensitive about this? And if not, at what point should I draw a line like the one I did, and what is the best way to do that? Let me say I understand completely that people love their dogs. And I know it’s not intentionally demeaning when she talks to my daughter this way, but I confess that I don’t want anyone talking to her the way they talk to a dog, however loved that dog is. I don’t think it’s insulting to dogs to say that people and dogs require different forms of communication.

—Human Mother of a Human Girl

Dear Human,

I don’t think it’s insulting to dogs either. But I also don’t think this eccentricity on her part is what’s really bothering you. It’s bizarre for sure, but so what? As your daughter gets older, she’ll find it puzzling and probably also funny (or else your stepmother will quit talking to her as if she were a dog, which I think is likely once the two of them begin to have actual conversations). I think what’s really ruffling your feathers is that your stepmother seems to love her grandpuppies more than she loves her stepgranddaughter. And who can blame you? It’s only human to be hurt by this. But there’s not a damn thing you can do about it. And I think that unless her stepgrandma is commanding that she sit and stay—or hitting her with a rolled-up newspaper—I’d let the puppy talk go. It’s harmless.

If you missed Friday’s Care and Feeding column, read it here.

Discuss this column in the Slate Parenting Facebook group!

Dear Care and Feeding,

My partner and I have a wonderful 4-month-old girl who is going through a mild and manageable sleep regression and teething. To date, our daughter has been a good sleeper, but we’re definitely experiencing a change from pre-baby levels of sleep. And what with both of us working (from home, with grandparent child care) full time, and the generally crushing despair of a pandemic—yeah, we tired.

My question is about how my partner and I share a bed: She is a very light/bad sleeper who has always struggled to fall asleep unless totally exhausted and is easily awakened and then can’t get back to sleep for a long time. I sleep soundly but I talk/thrash in my sleep. For a while, I thought it was due to drinking/smoking weed before bed, but after we had the baby, I stopped smoking and drink only infrequently. The bottom line is that we are a bad sleep match.

Last night, apparently, I was talking in my sleep. The baby then woke up irritable at 3 a.m. After feeding and going back to sleep, the baby woke up at 6. My partner, as you can imagine, barely got any sleep. When I woke up with the baby this morning, she did the “I’m talking to the baby in a sweet voice but also passive-aggressively saying real things to YOU, Dad” thing (“Mommy was up all night with both you AND Daddy … “) and it tweaked a nerve, probably since I was tired too. We didn’t fight about it, but there were feels for sure. Mostly, I feel bad. I know my partner is operating at a staggering level of sleep deprivation that I’m simply not.

But part of me is defensive: It’s like I can’t even sleep without doing something wrong. Part of me is resentful: It’s not MY fault she’s never been a good sleeper! And the rest of me feels terrible that the person I love is struggling and I’m making things worse for her. I tried to say sorry, but she said I didn’t need to apologize—she knows I’m not doing it on purpose. In a way, that makes it harder because although I feel bad waking her, I can’t even apologize for it! I’ve thought about offering to sleep in our guest room, but that’s not much of a solution either, because then it feels like I’m just bouncing on her and it makes it harder to help out with night/morning baby care. What should I do here? How do I get my head/sleeping situation right to make our lives easier?

—Sleepless in Search of Serenity

Dear Sleepless,

Oh, man, you two are the sleep doppelgängers of my husband and me! I have slept excruciatingly lightly, awakened frequently, then lain awake for hours desperately trying to get back to sleep my whole life; my husband not only talks but yells in his sleep and thrashes so hard he sometimes flings himself out of bed altogether. And when our daughter was a baby, this dynamic, over which neither of us had any control, made nighttime a predictable nightly nightmare. And since our daughter, unlike yours, was a terrible sleeper, I think I got about eight hours of sleep over the course of the first four months of her life.

But here’s the thing: My husband and I are still married—we’re celebrating our 28th anniversary this week. So I am here to tell you that a sleep mismatch is not a fatal flaw in a relationship! We got through those early months and years! And a decade or so ago, I discovered silicone earplugs, which I now buy in bulk (they help a lot). Some nights, when the thrashing gets to be too much, I just abandon him for my daughter’s former bedroom. If we’d had a spare room all those years ago, I wouldn’t have thought twice about moving into it myself during our baby’s first year. Honestly, I’m amazed that your partner hasn’t done this. (Is it possible she wants to but is afraid it would hurt your feelings?) But I think the solution of your sleeping in it is an excellent one. (I think way too much is made of the necessity to share a bed with one’s partner every single night. Especially when there’s a baby in the mix—even a baby who is mostly an obedient sleeper.) Why would this make it harder for you to care for the baby? If your partner is exclusively nursing, there’s nothing you can do in the middle of the night, and it will be easier for her to get back to sleep if you’re not in the bed with her. If she’s not exclusively nursing—or if the baby isn’t necessarily waking up because she’s hungry but because of some other need—and you’re such a heavy sleeper (my husband was and is) the crying doesn’t wake you, for heaven’s sake get a baby monitor and turn it all the way up and sleep with the speaker on the pillow beside you. This should get you up in the morning too.

And if the baby can as easily be cared for by you as by her mother—if a bottle will do the trick, say—then invest in some of those silicone earplugs now and bestow them upon your partner. Perhaps she’ll be able to sleep through (at least some of) her baby’s cries. (Lots of mothers, I warn you, can’t, earplugs or not—they seem to have supernatural hearing when it comes to their kids, and often wake up at the sound of their babies turning over in their cribs.)

But the most important advice I have for you is that you read this column together and the two of you talk about this special misery you are experiencing—and that she go ahead and get mad (it doesn’t matter that you can’t help what you’re doing; it’s still infuriating) and you go ahead and apologize (it’s OK to be sorry for something you have no control over). And also that you take heart in knowing that there’s a much older couple out there who has weathered this particular storm.

Help! How can I support Slate so I can keep reading all the advice from Dear Prudence, Care and Feeding, Ask a Teacher, and How to Do It? Answer: Join Slate Plus.

Dear Care and Feeding,

This feels like a minor problem given the incredibly tough time that so many parents are having right now, but I really do feel like I need help. My husband and I have been working from home since March, both of us at highly demanding full-time jobs—and just before the pandemic, I began a new position at a small startup where I’m the only woman with kids. (Think every cliché about startup culture ever; my boss is a 24-year-old dudebro.) We have two boys, 11 (“James”) and 2½ (“Peter”). James spends some time over at his dad’s house but is with us most often and is doing well, all things considered. He started middle school fully remote, with all the challenges that’s entailed, and though he’s been amazing and I’m very proud of him, his schooling requires a good bit of my support. Peter is a delightful, smart, verbal, and emotionally intelligent toddler … who still takes a bottle at naptime and at bedtime, still relies on his pacifier periodically, and actively seems to hate the idea of potty training. I know—I really do!—that we need to drop the bottles, get rid of the paci, and make progress with potty training. But my day starts at 6 a.m., when Peter wakes up, and the next time I have 10 minutes to myself is around 10 p.m.

Peter was difficult to breastfeed, didn’t sleep through the night until his second birthday, and is a stubborn and picky eater. And I am just … tapped out after eight-plus months of this pandemic life. We have no family nearby, so there’s no outlet, no break, and no help—and of course there’s no sign this will end anytime soon. The idea of a battle of wills with my toddler just makes me want to run away. I know it’s important for my toddler to grow up a little, but I just can’t get myself to the point of rolling up my sleeves and diving in. Please help motivate me, and maybe give me a starting place so I can make a go of it. Or tell me the books to read. My husband and I tag-team most things pretty well, but he tends to defer to me with these kinds of things. While he’s 100 percent on board for anything I ask of him, he won’t be the one to change the status quo. I’m a project manager at work who’s so burned out that I can’t project-manage my own parenting, and I feel like I’m failing my kid.

—He’ll Be in Diapers Till He’s 30 at This Rate

Dear HBiDTH30aTR,

No, he won’t. I promise you he won’t.

Let’s take a few deep breaths together.

It’s not a “minor problem” that you are exhausted, burned out, running on empty. Yes, you’ve got a lot going for you (and sure, it’s a good idea to remind yourself to be grateful that you and your husband are both gainfully employed and able to work at home, that your older son is doing OK with remote learning, and so on), but reaching your breaking point is not a trivial matter. You do need help. While I’m not going to be able to give you the help you’re specifically asking for—because motivation doesn’t come from others, and I don’t think “motivation” is your problem anyway—I do have some advice for you.

The first piece of it is to talk to your husband about how you’re feeling. I don’t mean complain to him about his not taking the lead when it comes to Peter (you and I both get it, yes? He feels like you’re the expert, and my guess is that the very idea of tackling these kinds of toddler-parenting matters is alarming to him); I mean telling him that you are not an expert, that you have no more knowledge about how to proceed than he does, and also that you are at the end of your rope, because even with the tag-teaming, you find yourself feeling that you’re taking on more than you can handle or that the dynamic between the two of you around the kids leaves you feeling you’re supposed to take on more than feels doable. I suspect that just talking about this will be helpful. You sound like you’re ready to explode under pressure, so let some of that pressure out.

But when it comes to this business of what you “know” you “need to do” right now, what I would really like you to do is ease up. Because not only are we in the middle of a pandemic that has upended everything about our lives, which means we all need to cut ourselves some (or a whole lot) of slack for the sake of our mental health, but these rules about what toddlers are supposed to be doing when are mostly bullshit.

Yes, experts issue guidelines on when these things should happen. But the best advice, as far as I’m concerned, is what’s mentioned almost in passing toward the end of this article about kids who refuse to give up their bottles: If your child isn’t ready, he just isn’t ready. Let it go for now. It’s not the end of the world. He will not be drinking from a bottle or sucking a pacifier forever. I absolutely guarantee this.

The fact is, pandemic misery aside, small children are no more similar to other small children than full-grown adults are all like one another. And because humans, from the tiniest to the biggest, are their own individual selves, putting them all on the same timeline makes no sense.

Does transitioning out of babyhood make life easier for parents? Sure, once the battles are over. From putting babies on a convenient feeding schedule to letting them “cry it out”—and, yes, potty training when their parents are ready to get them out of diapers or when their child care providers insist on it—short-term miseries often lead to parenting “wins.” I have my own (strong) feelings about this cost-benefit analysis, but since it seems to me that right now, especially with everything else going on, you’re not feeling that your life would be all that much easier if Peter gave up his bottle, pacifier, and diapers—quite the contrary, that what you are mostly (very) anxious about is the “it’s time” drumbeat that’s pounding away inside your head. Can you shut that down? If your (or, better yet, your husband’s!) efforts to get that bottle/paci out of Peter’s hands fail for now, can you please assure yourself that it’s OK?

And here’s something to cheer you. When it comes to the potty training, you can definitely wait to take that on. (And that’s not only my opinion. I have it on good authority.) But for now? Everything is so hard. It’s all right to go easy in whatever ways you can.

—Michelle

More Advice From Slate

My 15-year-old daughter is best friends with “Emily,” whose family life is precarious at best. Emily is at our house so much that we basically have two daughters. Emily knew she was bi early on. Within the last year or so, my daughter came out as lesbian. Now they’re a couple, which I fully support. But how do we navigate this once/if they break up?

')}function tryGetCriteoFastBid(){try{var fastBidStorageKey="criteo_fast_bid",hashPrefix="// Hash: ",fastBidFromStorage=storage.getDataFromLocalStorage(fastBidStorageKey),firstLineEndPosition,firstLine,publisherTagHash,publisherTag;null!==fastBidFromStorage&&(firstLineEndPosition=fastBidFromStorage.indexOf("n"),firstLine=fastBidFromStorage.substr(0,firstLineEndPosition).trim(),firstLine.substr(0,hashPrefix.length)!==hashPrefix?(__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logWarn("No hash found in FastBid"),storage.removeDataFromLocalStorage(fastBidStorageKey)):(publisherTagHash=firstLine.substr(hashPrefix.length),publisherTag=fastBidFromStorage.substr(firstLineEndPosition+1),Object(__WEBPACK_IMPORTED_MODULE_6_criteo_direct_rsa_validate_build_verify_js__.verify)(publisherTag,publisherTagHash,FAST_BID_PUBKEY_N,FAST_BID_PUBKEY_E)?(__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logInfo("Using Criteo FastBid"),eval(publisherTag)):(__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logWarn("Invalid Criteo FastBid found"),storage.removeDataFromLocalStorage(fastBidStorageKey))))}catch(e){}}Object(__WEBPACK_IMPORTED_MODULE_1__src_adapters_bidderFactory_js__.registerBidder)(spec)},377:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(378),i=r(379);t.verify=function(e,t,r,o){var a=new n.BigInteger(n.b64toHex(t)),s=new n.BigInteger(n.b64toHex(r)),c=a.modPowInt(o,s);return n.removeExtraSymbols(c.toHexString())===i.Sha256.hash(e)}},378:function(e,t,r){var n;Object.defineProperty(t,"__esModule",{value:!0});var i=(o.prototype.toHexString=function(){if(this.s<0)return"-"+this.negate().toHexString();var e,t=!1,r="",n=this.t,i=this.DB-n*this.DB%4;if(0>i)&&(t=!0,r=l(e));0<=n;)i<4?(e=(this[n]&(1<>(i+=this.DB-4)):(e=this[n]>>(i-=4)&15,i<=0&&(i+=this.DB,--n)),0this.DB?(this[this.t-1]|=(i&(1<>this.DB-n):this[this.t-1]|=i<=this.DB&&(n-=this.DB))}this.clamp(),r&&o.ZERO.subTo(this,this)}},o.prototype.negate=function(){var e=a();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.mod=function(e){var t=a();return this.abs().divRemTo(e,null,t),this.s<0&&0>n|a,a=(this[s]&i)<=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}0>this.F2:0),m=this.FV/g,b=(1<=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var a=r+1;a>n;0>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:0>15;0<=--o;){var c=32767&this[e],d=this[e++]>>15,u=s*c+d*a;i=((c=a*c+((32767&u)<<15)+r[n]+(1073741823&i))>>>30)+(u>>>15)+s*d+(i>>>30),r[n++]=1073741823&c}return i},o.prototype.am3=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;0<=--o;){var c=16383&this[e],d=this[e++]>>14,u=s*c+d*a;i=((c=a*c+((16383&u)<<14)+r[n]+i)>>28)+(u>>14)+s*d,r[n++]=268435455&c}return i},o);function o(e){null!==e&&this.fromHexString(e)}function a(){return new i(null)}function s(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}t.BigInteger=i,t.nbi=a,t.nbits=s;for(var c=[],d="0".charCodeAt(0),u=0;u<=9;++u)c[d++]=u;for(d="a".charCodeAt(0),u=10;u<36;++u)c[d++]=u;for(d="A".charCodeAt(0),u=10;u<36;++u)c[d++]=u;function p(e,t){var r=c[e.charCodeAt(t)];return null==r?-1:r}t.intAt=p;var f="0123456789abcdefghijklmnopqrstuvwxyz";function l(e){return f.charAt(e)}t.int2char=l,t.b64toHex=function(e){for(var t="",r=0,n=0,i=0;i>2),n=3&o,1):1==r?(t+=l(n<<2|o>>4),n=15&o,2):2==r?(t+=l(n),t+=l(o>>2),n=3&o,3):(t+=l(n<<2|o>>4),t+=l(15&o),0))}return 1==r&&(t+=l(n<<2)),t},t.removeExtraSymbols=function(e){return e.replace(/^1f+00/,"").replace("3031300d060960864801650304020105000420"https://news.google.com/__i/rss/rd/articles/,"")};var g=(m.prototype.convert=function(e){return e.s<0||0<=e.compareTo(this.m)?e.mod(this.m):e},m.prototype.revert=function(e){return e},m.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m);function m(e){this.m=e}var b=(v.prototype.convert=function(e){var t=a();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&0>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),0<=e.compareTo(this.m)&&e.subTo(this.m,e)},v.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},v.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},v);function v(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>>0;for(a[o-1][14]=Math.floor(d),a[o-1][15]=u,s=0;s>>0;var l=r[0],g=r[1],m=r[2],b=r[3],v=r[4],y=r[5],h=r[6],_=r[7];for(f=0;f<64;f++){var S=_+i.z1(v)+i.Ch(v,y,h)+t[f]+p[f],I=i.z0(l)+i.Maj(l,g,m);_=h,h=y,y=v,v=b+S>>>0,b=m,m=g,g=l,l=S+I>>>0}r[0]=r[0]+l>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+b>>>0,r[4]=r[4]+v>>>0,r[5]=r[5]+y>>>0,r[6]=r[6]+h>>>0,r[7]=r[7]+_>>>0}var A=new Array(r.length);for(_=0;_>>e|t<<32-e},i.z0=function(e){return i.ROTR(2,e)^i.ROTR(13,e)^i.ROTR(22,e)},i.z1=function(e){return i.ROTR(6,e)^i.ROTR(11,e)^i.ROTR(25,e)},i.q0=function(e){return i.ROTR(7,e)^i.ROTR(18,e)^e>>>3},i.q1=function(e){return i.ROTR(17,e)^i.ROTR(19,e)^e>>>10},i.Ch=function(e,t,r){return e&t^~e&r},i.Maj=function(e,t,r){return e&t^e&r^t&r},i);function i(){}t.Sha256=n}},[375]),pbjsChunk([218],{501:function(e,t,r){e.exports=r(502)},502:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"spec",function(){return A});var n=r(0),i=r(2),o=r(3),a=r(10),s=r.n(a),c=r(503),d=r.n(c),u=r(1);function p(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);rnnnx3c!-- Rubicon Project Ad Tag --x3en

nn

nn")),c=d(m[i.size_id].split("x").map(function(e){return Number(e)}),2),s.width=c[0],s.height=c[1]),s.rubiconTargeting=(Array.isArray(i.targeting)?i.targeting:[]).reduce(function(e,t){return e[t.key]=t.values[0],e},{rpfl_elemid:f.adUnitCode}),t.push(s)):n.logError("Rubicon: bidRequest undefined at index position:".concat(o),r,e),t},[]).sort(function(e,t){return(t.cpm||0)-(e.cpm||0)})},getUserSyncs:function(e,t,r,n){if(!x&&e.iframeEnabled){var i="";return r&&"string"==typeof r.consentString&&("boolean"==typeof r.gdprApplies?i+="?gdpr=".concat(Number(r.gdprApplies),"&gdpr_consent=").concat(r.consentString):i+="?gdpr_consent=".concat(r.consentString)),n&&(i+="".concat(i?"&":"?"https://news.google.com/__i/rss/rd/articles/,"us_privacy=").concat(encodeURIComponent(n))),x=!0,{type:"iframe",url:"https://".concat(g.syncHost||"eus"https://news.google.com/__i/rss/rd/articles/,".rubiconproject.com/usync.html")+i}}},transformBidParams:function(e){return n.convertTypes({accountId:"number",siteId:"number",zoneId:"number"},e)}};function v(e,t){var r=o.b.getConfig("pageUrl");r=e.params.referrer?e.params.referrer:r||t.refererInfo.referer;return e.params.secure?r.replace(/^http:/i,"https:"):r}function y(e,t){var r=e.params;if("video"===t){var i=[];return r.video&&r.video.playerWidth&&r.video.playerHeight?i=[r.video.playerWidth,r.video.playerHeight]:Array.isArray(n.deepAccess(e,"mediaTypes.video.playerSize"))&&1===e.mediaTypes.video.playerSize.length?i=e.mediaTypes.video.playerSize[0]:Array.isArray(e.sizes)&&0e.length)&&(t=e.length);for(var r=0,n=new Array(t);r‘;var i,o}},h=function(e){var t=0=e&&t.innerWidth‘+v.vast_url+”“:v.vast_string&&(y=v.vast_string),g.pre_market_bids.push({id:v.deal_id,seatbid:[{bid:[{impid:Date.now(),dealid:v.deal_id,price:v.price,adm:y}]}],cur:v.currency,ext:{event_log:[{}]}})}}var h=n.getBidIdParameter(“mimes”,e.params)||[“application/javascript”https://news.google.com/__i/rss/rd/articles/,”video/mp4″https://news.google.com/__i/rss/rd/articles/,”video/webm”],_={id:e.bidId,secure:l,video:{w:p,h:f,ext:g,mimes:h}};””!=n.getBidIdParameter(“price_floor”,e.params)&&(_.bidfloor=n.getBidIdParameter(“price_floor”,e.params)),””!=n.getBidIdParameter(“start_delay”,e.params)&&(_.video.startdelay=0+Boolean(n.getBidIdParameter(“start_delay”,e.params))),””!=n.getBidIdParameter(“min_duration”,e.params)&&(_.video.minduration=n.getBidIdParameter(“min_duration”,e.params)),””!=n.getBidIdParameter(“max_duration”,e.params)&&(_.video.maxduration=n.getBidIdParameter(“max_duration”,e.params)),””!=n.getBidIdParameter(“placement_type”,e.params)&&(_.video.ext.placement=n.getBidIdParameter(“placement_type”,e.params)),””!=n.getBidIdParameter(“position”,e.params)&&(_.video.ext.pos=n.getBidIdParameter(“position”,e.params)),e.crumbs&&e.crumbs.pubcid&&(c=e.crumbs.pubcid);var S=navigator.language?”language”:”userLanguage”,I={id:s,imp:_,site:{id:””,page:a,content:”content”},device:{h:screen.height,w:screen.width,dnt:n.getDNT()?1:0,language:navigator[S].split(“-“)[0],make:navigator.vendor?navigator.vendor:””,ua:navigator.userAgent},ext:{wrap_response:1}};n.getBidIdParameter(“number_of_ads”,e.params)&&(I.ext.number_of_ads=n.getBidIdParameter(“number_of_ads”,e.params));var A={};return 1==n.getBidIdParameter(“spotx_all_google_consent”,e.params)&&(A.consented_providers_settings=u),t&&t.gdprConsent&&(A.consent=t.gdprConsent.consentString,void 0!==t.gdprConsent.gdprApplies&&n.deepSetValue(I,”regs.ext.gdpr”,t.gdprConsent.gdprApplies?1:0)),t&&t.uspConsent&&n.deepSetValue(I,”regs.ext.us_privacy”,t.uspConsent),n.deepAccess(e,”userId.id5id.uid”)&&(A.eids=A.eids||[],A.eids.push({source:”id5-sync.com”,uids:[{id:e.userId.id5id.uid}],ext:e.userId.id5id.ext||{}})),c&&(A.fpc=c),e&&e.schain&&(I.source={ext:{schain:e.schain}}),e&&e.userId&&e.userId.tdid&&(A.eids=A.eids||[],A.eids.push({source:”adserver.org”,uids:[{id:e.userId.tdid,ext:{rtiPartner:”TDID”}}]})),n.isEmpty(A)||(I.user={ext:A}),{method:”POST”,url:”https://search.spotxchange.com/openrtb/2.3/dados/”+s,data:I,bidRequest:t}})},interpretResponse:function(e,t){var r=[],i=e.body;return i&&n.isArray(i.seatbid)&&n._each(i.seatbid,function(e){n._each(e.bid,function(e){var a={};for(var c in t.bidRequest.bids)e.impid==t.bidRequest.bids[c].bidId&&(a=t.bidRequest.bids[c]);n._each(a.params.pre_market_bids,function(t){t.deal_id==e.id&&(e.price=t.price,i.cur=t.currency)});var d={requestId:a.bidId,currency:i.cur||”USD”,cpm:e.price,creativeId:e.crid||””,dealId:e.dealid||””,ttl:360,netRevenue:!0,channel_id:i.id,cache_key:e.ext.cache_key,vastUrl:”https://search.spotxchange.com/ad/vast.html?key=”+e.ext.cache_key,videoCacheKey:e.ext.cache_key,mediaType:s.d,width:e.w,height:e.h};d.meta=d.meta||{},e&&e.adomain&&0e.length)&&(t=e.length);for(var r=0,n=new Array(t);rt?e:t}function d(e,t,n){!e.preload&&e.preloadThreshhold&&function(e,t,n,i){return t.top<=i+n&&u(e)}(t.target,t.rect,e.preloadThreshhold,n)&&(e.preload=!0,setTimeout(function(){e.trigger("preload",new r("preload",t))},15))}function c(n){var i=n.el.getBoundingClientRect(),o=t.innerHeight||e.documentElement.clientHeight,h=f(i,o),s=h/(i.height||o),l={target:n.el,rect:i,visiblePx:h,visiblePercent:s};!function(e,t){var n=t.visiblePx,i=t.visiblePercent;n&&i>=e.shownThreshold&&!e.seen?(e.seen=!0,setTimeout(function(){e.trigger(“shown”,new r(“shown”,t))},15)):(!n||i1&&(h+=e(r,Math.floor(n/o),i-1,o)),h},this.getVerticallyVisiblePixels=f,this.getViewportHeight=function(){return t.innerHeight||e.documentElement.clientHeight||e.body.clientHeight},this.getViewportWidth=function(){return t.innerWidth||e.documentElement.clientWidth||e.body.clientWidth},this.isElementNotHidden=u,this.isElementInViewport=function(n){var i=n.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.bottom<=(t.innerHeight||e.documentElement.clientHeight)&&i.right<=(t.innerWidth||e.documentElement.clientWidth)},this.Visible=o}]); }, {}]; require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(“Invalid attempt to iterate non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.”); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === “string”) return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === “Object” && o.constructor) n = o.constructor.name; if (n === “Map” || n === “Set”) return Array.from(o); if (n === “Arguments” || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function mountLegacyServices() { Object.keys(window.modules).filter(function (key) { return typeof key === 'string' && key.match(/.legacy$/); }).forEach(function (key) { return window.require(key); }); } function tryToMount(fn, el, name) { try { fn(el); // init the controller } catch (e) { var elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML)); console.error("Error initializing controller for "".concat(name, "" on "").concat(elementTag, """), e); } } /** * mount client.js component controllers */ function mountComponentModules() { Object.keys(window.modules).filter(function (key) { return typeof key === 'string' && key.match(/.client$/); }).forEach(function (key) { var controllerFn = window.require(key); if (typeof controllerFn === 'function') { var name = key.replace('.client"https://news.google.com/__i/rss/rd/articles/,"'), instancesSelector = "[data-uri*="_components/".concat(name, "/"]"), defaultSelector = "[data-uri$="_components".concat(name, ""]"), instances = document.querySelectorAll(instancesSelector), defaults = document.querySelectorAll(defaultSelector); var _iterator = _createForOfIteratorHelper(instances), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var el = _step.value; tryToMount(controllerFn, el, name); } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } var _iterator2 = _createForOfIteratorHelper(defaults), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var _el = _step2.value; tryToMount(controllerFn, _el, name); } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } } }); } // Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies, // services, or components that could require it // note: the `` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js window.process = window.process || {}; window.process.env = window.process.env || {}; if (!window.process.env.NODE_ENV) { window.process.env.NODE_ENV = ''; } // note: legacy controllers that require legacy services (e.g. dollar-slice) must // wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first mountLegacyServices(); mountComponentModules(); // ]]



Source link