ByTirhakah Love,
a New York senior writer who covers culture.
Photo-Illustration: Vulture; Photos: Prince Williams/WireImage, Ivan Apfel/Getty Images, Jason Koerner/Getty Images
Katt Williams warned us: 2024 is a year of exposing scallywags and succubi for their skeevy ways. In hip-hop, that energy has so far manifested in multiple chains of interlocking beefs — some hinging on the serious allegations against P. Diddy, others a bit sillier — with new links popping up on a biweekly basis. The curious thing about these spats is that while there may have been crumbs laid in the last few years, most are pretty surprising for onlookers. And given how interconnected they are, it’s a little unwieldy to keep track of everything, especially who’s coming out victorious. The Great Beef Barbecue of 2024 kicked off with Megan Thee Stallion hurling fiery bars directly at Nicki Minaj’s pink wig and her Cash Money classmate Drake on “Hiss” and it hasn’t slowed down since. A few top chefs are currently boasting the best brisket in rap … while the losers bum in the back of the kitchen scouring the trash bins for bones to gnaw on.
Kendrick Lamar, Future, Rick Ross vs. J.Cole and Drake
This beef started in earnest a few weeks ago with a response to last fall’s “First Person Shooter,” where Cole and Drizzy placed themselves alongside Dot as this generation’s Big Three of rap. And, yeah, Kendrick didn’t like that at all.
Kendrick Lamar: WINNER
It was a surprise to hear him go after J. Cole on the Future and Metro Boomin collab “Like That” if you weren’t keen to Jermaine’s routinely sneak-dissing K.Dot’s most recent album, Mr. Morale & the Big Steppers. (His acclaimed guest verse on Lil Yachty’s “Secret Recipe” featured a dig at Cornrow Kenny: “Some activists got so rich, they prolly wish we stay oppressed / Studio steppers moving extra on songs, faking rep.”) At the heart of this diss though, is Kendrick calling their bluff: “Say, it’s a lot of goofies with a check / I mean, ah, I hope them sentiments symbolic / Ah, my temperament bipolar, I choose violence / Okay, let’s get it up, it’s time for him to prove that he’s a problem.”
Now, granted Lamar has largely kept it cute when asked about the other two directly, he’s never shied away from the fact that he really doesn’t fuck with Drake. As far back as 2014, on records like “Pay for It” alongside former TDE labelmate Jay Rock, Dot raps “I tell ’em all to hail King Kendrick, resurrecting my vengeance / Been dissecting your motor mouth, ’til I break down the engine / This ain’t no warning shot, this a relevant henchman / See my opponent then, cease your existence / Ending our friendship.” Drake peeped game and responded with his own shots on “My Language,” noting that not only is Dot’s shit “not that inspiring” but also claimed that he is, indeed, “the motor mouth” and “the one you should worry bout.” They would trade barbs for years throughout the ’10s, never mentioning the other’s name directly. Keen ears could hear the cold war between the two titans.
J. Cole: LOSER
Cole tried, and then Cole failed to prove he was a real problem. A week after “7 Minute Drill,” he stepped up on his own Dreamville Festival stage, clutching a crystal, burning sage, before withdrawing his participation from the spiciest rap beef he made for himself. Even before the apology on April 5 — which was, one could argue, only offered because the disses on “Pi” and “7 Minute Drill” were quite weak — it was clear Cole was underwater. But Lamar probably heard the sneaks and been ready to body Cole. And while he hasn’t publicly apologized for his last beef with Noname (though she’s said they’ve talked about the whole “nigga you don’t read” thing privately), nor for the very unnecessary transphobia in “Pi,” Cole believes removing “7 Minute Drill” from streaming services is enough to satiate his spirit. Unless you count mans forgetting his verses onstage. As someone who prides himself in rapping every word of his work live, the diss had that man experiencing nightmares.
Future: WINNER
It’s still not clear if Future actually has an axe to grind with Drake. There have been rumors for over ten years that these two secretly despise each other despite their 2015 joint mixtape, but he certainly wasn’t pressing Lamar to change up his verse or, at the very least, he wasn’t successful at it. Nah, Future’s just geeked to have one of the fiercest diss verses of the year so far on We Don’t Trust You, even if he didn’t contribute it.
Drake: WINNER (so far)
On April 13, an alleged leak of Drake’s response dropped and the comment sections, of course, ran wild despite speculation that it’s AI. On “Push-Ups,” the Canuck basically says Lamar was an indentured servant under Top Dog for not only taking an alleged 50-50 earnings split while he was at the label, but hitting military-style push-ups anytime the label head demanded with “drop and give me 50.” It’s an admittedly clever turn of phrase on top of a dig at Big Steppers: “Your last one bricked, you really not on shit, they make excuses for you ’cause they hate to see me lit.” He also made a bunch of short-king jokes: “Pipsqueak pipe down you ain’t no big three / SZA got you wiped down / Travis got you wiped down / Savage got you wiped down” and “I’m at the top of the mountain so you tight now / Just to have a talk with yo ass I had to hike down.” But he also cast a few strays in the direction of the Weeknd, who has historically denied being a part of Drake’s factory of artists who only make songs for Drake; A$AP Rocky, who emptied the clip on Drake’s obsession with his partner, Rihanna, on We Still Don’t Trust You track “Show of Hands”; and … Rick Ross. The Rozay stray seemed outta nowhere but it also could shine some light on the more understated issue at hand: women. “I might take your latest girl and cuff her like I’m Ricky,” Drake adds. “Can’t believe he jumpin’ in, this nigga turning 50.” I chuckled — can’t lie about that one — but everybody involved in these beefs is much too old for it. If this is just round one, rumored AI Drake came for all the haters in a pretty efficient way.
Rick Ross: WINNER
Rozay responded to the Drake diss within hours of its drop on April 15 by making fun of the Boy’s alleged plastic surgery on “Champagne Moments.” He took up Pusha T’s generational diss method in the outro, saying that Aubrey got a nose job so he wouldn’t look like his dad. We’re not here to body shame, but any beef that goes into a rapper’s personal villain origin story is a little more dangerous, and exponentially more fun.
If anything, “7 Minute Drill” made clear that not only is reading beyond J. Cole, watching television is also not within his grasp. Claiming that Kendrick fell off “like The Simpsons” would mean that Cole hasn’t been keeping up. Now, is he wrong about that show falling off at one point? Absolutely. Is 2024 the year to point that out while it’s on its strongest run in more than a decade? No!
Big Sean: LOSER
I hate calling him a loser because Big Sean really just makes his music, goes home, and loves on Jhené Aiko. But he did drop music in the midst of this beef that, to anyone other than his most ardent fans, just sorta came and went. He can’t duck Dot’s shadow to save his life — getting ate up on his own record, 2013’s “Control,” was only the beginning.
Though JT was named in a lawsuit against Diddy, the beef is technically about possible insults on songs like “No Bars,” where JT fires various shots at Latto and Cardi B, as well as her solo song “Sideways,” where she raps “It’ll never be the same / Fuck the old days.” To which JT replied on Twitter on April 8 that in all of her songs, she’s always repped City Girls. She and Yung Miami went at it online for a little bitand then talked privately. This one kinda feels like a big nothing, but if we’re crowning a winner, it seems like the one who allegedly put their issues on wax and not just tweets gets the default dub.
Backhanded Compliments: WINNER
I love how so much of their argument was the City Girls low-key gassing each other up. This tweet from Yung Miami is truly a highlight: “You weird but always wanna act like I’m a weirdo you always mad it’s always a problem & all I tr to do is push you tell you, you the shit you can rap, you should model etc! You always mad you doing your shit as you should CONGRATULATIONS but somehow you STILL MAD AT!!!!!”
We didn’t know there was much issue between JT and Glo until the latter dropped “Aite” on April 5 wherein she raps, “Me and JT ain’t the best of friends but we ain’t beefing.” The possible crux of their issues is JT’s claim Glo has been allowing a rumor to fester that the Memphis rapper slapped JT after an alleged altercation at the 2023 VMAs. “I been said she didn’t!” JT tweeted that day. “She the one who went radio silent! Playing into, released a song about slapping rap bitches now it’s female unity?? CORNY!!!” Glo took the moment to kinda laugh at the insecurity, saying that her bars about “slapping rap bitches” on the early-year banger “Yeah Glo” could be about a bunch of rap bitches she’s slapped. “What you wanted me to say, I didn’t slap you but I hit you witha purse instead???” she wrote in a since-deleted tweet, “Scary ass ho.” JT went on to deny the purse slap.
GloRilla: WINNER
Regardless of if she did it or not, Glo comes outta this beef lookin strong for (a) dropping a record, “Yeah Glo,” that compels us to actually slap the taste outta somebody mouth, and (b) clarifying that it might not have been a slap but a purse smack. In any case, Glo didn’t lose the altercation behind the scenes and the intrigue over the veracity of the slap makes us only more interested in whatever mean rap-girl anthem she got coming next.
Victoria Monét’s Messy Social-Media Manager: WINNER
Apparently, Victoria Monét’s social-media manager was eating popcorn and cutting up while watching the Twitter brawl between GloRilla and JT like the rest of us. But unlike the rest of us, she happened to be signed into her bosses’ account when she reposted a tweet from JT showing her eight mugshots and forewarning a potential ninth, teasing upcoming fisticuffs with Glo. We still don’t really know if this was a mistake or on purpose, tbh, because self-sabotage, especially for a thankless job like social-media management, might not be the worst thing in the world. Whoever did it, they became the rare anonymous side character of the day, and they might’ve just left their gig for something better on the horizon.
Purse Designers: LOSER
Do you know how much Kate Spade, Chanel, Louis Vuitton, or whatever could play up this squabble? The block would be so hot with dupes. The brand’s gotta be steaming right now, begging Glo to say its name one time.
Meek vs. Wale
Over WrestleMania weekend, Wale posed in an IG picture with Meek Mill’s former best friend, Dean, which led to an April 8 Meek tweet saying that Wale never liked him. This one is a beef among rappers, not necessarily a rap beef.
Wale: WINNER
Wale took a woo-woo-adjacent approach, wishing Meek all the peace in the world while also remarking that if a photo got his shorts riding up the crack then “one has to ask himself some questions.” There will probably be no raps about this, although imagining Rick Ross as a referee between his MMG artists is hilarious.
Meek Mill: LOSER
Where did discretion go? How does a person like Meek, who is always talking about how he’s not good with technology, continue to vomit all over himself on the internet? At this point, he’ll never be good at it. But this isn’t his only problem. Meek’s been spiraling ever since his alleged involvement with Diddy became fodder for internet jokes. Earlier in the month, he focused his energy on denying allegations that he had sexual relations with Diddy while participating in the predatory abuse Rodney Jones claims in a lawsuit. Other than that, Mill was largely silent about the whole connected-to-an-alleged-sex-trafficker thing. It’s a terrible look, especially because we need a damn translator to understand his tweets.
Typos: WINNER
Meek steady facing a losing battle against the keyboard. Just do voice-to-text and call it a day.
Azealia Banks vs. Doechii
This beef has been bubbling for a minute. Last year, after Doechii dropped a preview of her song “Alter Ego” featuring JT, folks on social media accused Doechii of swiping Banks’s style, claiming the track sounds a lot like “New Bottega.” Doechii was quiet after the backlash, but once it dropped March 29, hip-hop heads like D-Nice reiterated that Doechii’s getting a little too close to Banks’s shtick. On April 10, Banks acknowledged it on Instagram, commenting Doechii fans should be called “wannabes.”
Doechii: WINNER
Doechii finally clapped back, saying that it’s not her fault Banks is “selling bussy soap and I’m selling platinum records. Leave me alone PLEASE.” This one is pretty simple. While I think there is real credence to the idea that Doechii is filling a lane that Azealia once occupied, the fact is Doechii actually makes music right now and Azealia rarely does. It ain’t no rap beef if words aren’t coming out on wax. Right now, it’s just two people who aren’t fond of each other talking shit on the internet.
By submitting your email, you agree to our
Terms and Privacy Notice
and to receive email correspondence from us. This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
Already a subscriber?
Already a subscriber?
`;
// integrate Sub(x) scripts and elements
if (hostname !== 'subs.nymag.com') { // do not integrate on this subdomain
document.head.appendChild(trackingScript);
document.body.insertAdjacentHTML('beforeend', subXAnimationElements);
}
There was an error processing the request. Please try again later."}).catch(e=>console.error("Error verifying email: ",e)))(r.querySelector(".content"),o.bannerCTAVerification)})):(l.remove(),s.remove()),o.dismissable||n.remove(),o.useAlertIcon||a.remove(),r.classList.add("show"),n.addEventListener("click",()=>{u(),r.classList.remove("show")})}else r.remove()}});
}, {"1":1,"6":6,"12":12,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(4),auth=require(12),signInButton=dom.find(".user-signin"),signOutButton=dom.find(".user-signout"),globalNav=dom.find('[class^="global-nav"]'),body=dom.find("body"),dropdownItems=dom.findAll(".dropdown-wrap"),gtm=require(1),appendLandingPageParams=require(135),pageUri=require(124).getPageUri(),subscriptionPromoLinks=dom.findAll(".persist-params"),searchString=window.location.search||"";function closeDropdowns(e){let n=globalNav.querySelectorAll(".dropdown.open");dropdownItems.forEach(function(t){let o=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||o.classList.remove("open")})}function gtmSendReport(e,n,t){let o={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(o.eventLabel=n.href),gtm.reportNow(o)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const o=t.split("?"),i=new URLSearchParams(o[1]);for(let e of n.entries())i.set(e[0],e[1]);t=`${o[0]}?${i.toString()}`,e.href=t}else e.href=`${t}?${n.toString()}`}}function init(e){const n=e.querySelectorAll(".to-landing-page");window.addEventListener("auth:init",()=>{signInButton.addEventListener("click",function(e){e.preventDefault(),auth.showEmbeddedLoginFlow("top navigation")}),signOutButton.addEventListener("click",function(e){e.preventDefault(),gtmSendReport("Sign Out",e.target,"user-info-link"),auth.logout()}),auth.isAuthenticated()&&e.classList.add("signed-in"),auth.isSubscriber()&&e.classList.add("subscribed"),e.querySelectorAll(".user-link").forEach(e=>{e.classList.add("active")}),subscriptionPromoLinks.forEach(e=>{updateElementTargetUrlsIfQueryStrings(e)}),appendLandingPageParams(n)})}dropdownItems.forEach(function(e){e.addEventListener("click",function(){e.querySelector(".dropdown").classList.toggle("open")})}),body.addEventListener("click",closeDropdowns),document.addEventListener("keydown",closeDropdowns),globalNav.addEventListener("click",function(e){let n=e.target;n.classList.contains("global-nav-track")&>mSendReport(n.text,n,"global-nav-link")}),module.exports=init;
}, {"1":1,"4":4,"12":12,"124":124,"135":135}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(406),Fingerprint2=require(408),DS=require(407),Eventify=require(246);function registerGlobals(){window.DS=DS,window.Eventify=Eventify,window.Fingerprint2=Fingerprint2,DS.value("Eventify",Eventify),DS.value("Fingerprint2",Fingerprint2),DS.value("$document",window.document),DS.value("$window",window)}function mountDollarSliceComponents(){DS.service("components",["$document","$module",function(e,n){var o=_pickBy(n.definitions,e=>e.providerStrategy===n.providers.controller),r=Object.keys(o);function t(e){return o=>{try{n.get(e,o)}catch(e){logMountError(o,e)}}}_each(r,n=>{var o=e.querySelectorAll('[data-uri*="/_components/'+n+'/"]'),r=e.querySelectorAll('[data-uri$="/_components/'+n+'"]');_each(o,t(n)),_each(r,t(n))}),this.components=r}]),DS.get("components")}function logMountError(e,n){const o=e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML));console.error("Error attaching controller to "+o,n)}registerGlobals(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{mountDollarSliceComponents()}):mountDollarSliceComponents();
}, {"221":221,"246":246,"406":406,"407":407,"408":408}];
window.modules["ads.legacy"] = [function(require,module,exports){"use strict";const _map=require(118),_forEach=require(107),_isString=require(268),_intersectionWith=require(409),_isEqual=require(274),_each=require(406),_debounce=require(182),_sortBy=require(205),page=require(124),visit=require(114);DS.service("adService",["Eventify","$cid","$document","$window",function(e,t,a,i){var o,n,s,r,d,c,u,l,g={},p=this,h=[],f=visit.getQueryParamsObject(["utm_campaign"]),m=document.querySelector('script[data-type="ad-a9"]'),b=[],w=!1,v=[],y=document.querySelector('script[data-name="ad-doubleverify"]');document.querySelector('script[data-name="concert-ads"]')||(i.NYM={},i.NYM.analytics={},i.NYM.analytics.adStartTime=i.performance.now(),i.googletag=i.googletag||{},i.googletag.cmd=i.googletag.cmd||[],u=i.googletag,(m||y)&&(i.googletag.cmd=i.googletag.cmd||[],i.googletag.cmd.push(function(){i.googletag.pubads().disableInitialLoad()})),m&&(l=i.setInterval(function(){void 0!==window.apstag&&void 0!==window.apstag.timeout&&(i.clearInterval(l),window.apstag.cleared=!0,l=null)},10),setTimeout(function(){l&&(i.clearInterval(l),i.googletag.pubads().refresh(),window.apstag||console.log("MESSAGE: Timeout for A9 load exceeded, aborting"))},500)),y&&(b.push(new Promise(function(e){w?e():v.push(e)})),c=i.setTimeout(T,2500)),o=function(e){var t,a,o=e.data,n=[];return o.loaded?e:(o.loaded=!0,t=null,(t=o.sizes?u.defineSlot(o.name,o.sizes,o.id).addService(u.pubads()):u.defineOutOfPageSlot(o.name,o.id).addService(u.pubads())).setTargeting("adid",o.id),f.hasOwnProperty("utm_campaign")&&t.setTargeting("utmcamp",f.utm_campaign),a=p.getAdCount(o.label),t.setTargeting("label",o.label+"_"+o.site+"-"+a),u.display(o.id),u.pubads().addEventListener("slotOnload",function(){i.NYM.analytics.firstAdLoadTime||(i.NYM.analytics.firstAdLoadTime=i.performance.now(),i.NYM.analytics.firstAdLoadLabel=e.data.label)}),n=_(o),Promise.all(b).then(function(){n?window.apstag&&window.apstag.cleared?window.apstag.fetchBids({slots:[n],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([t],{changeCorrelator:!1})})}):y&&u.pubads().refresh([t],{changeCorrelator:!1}):u.pubads().refresh([t],{changeCorrelator:!1})}),e.slot=t,e)},n=function(e){var a,i,o,n=t(),s=e.getAttribute("data-name"),r=e.getAttribute("data-sizes"),d=e.getAttribute("data-label"),c=e.getAttribute("data-site");n=e.id,r&&r.length?(r=r.split(","),a=[],_map(r,function(e){e=e.split("x"),i=parseInt(e[0]),o=parseInt(e[1]),a.push([i,o])})):(e.classList.add("oop"),a=!1),this.data={id:n,name:s,sizes:a,loaded:!1,label:d,site:c},g[n]=this},r=function(e){u.cmd.push(function(){var t=o(e);g[e.data.id]=t})},s=function(e){var t=[];e.slot?(t=_(e))&&window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[t],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([e.slot],{changeCorrelator:!1})})}):e&&r(e)},u.cmd.push(function(){var e,t,o,n=page.getMeta("article:tag"),s=page.getMeta("author"),r=i.location.href,d=(e=a.head.querySelector(".head-gtm"),t=a.body.querySelector(".gtm"),e&&"top"===e.getAttribute("data-gtm")?"gtmtop":t&&"bottom"===t.getAttribute("data-gtm")?"gtmbottom":"");o=[],_forEach([n,s,d],function(e){_forEach(e.split(","),function(e){(e=e.trim().toLowerCase().replace(/\s/g,"-").replace(/\'|\’/g,"")).length&&o.push(e)})}),u.pubads().setTargeting("kw",o),u.pubads().setTargeting("entry_group",o),r=r.slice(r.lastIndexOf("/")+1),u.pubads().setTargeting("pn",r),u.companionAds().setRefreshUnfilledSlots(!0),u.pubads().enableAsyncRendering(),u.enableServices()}),this.load=r,this.create=function(e){return new n(e)},this.refresh=function(e){var t;_isString(e)?(t=this.getById(e),s(t)):s(e)},this.remove=function(e){var t=e.data.id;a.getElementById(t).innerHTML=""},this.getAdCount=function(e){var t,a=0,i=Object.keys(g);return _each(i,function(i){(t=g[i]).data.loaded&&t.data.label===e&&a++}),a},this.getById=function(e){return g[e]},d=_debounce(function(){var e={TopLeaderboard:1,RightColTopMPU:2,outOfPage:99,"homepageTakeover/TopLeaderboard":1},t=_sortBy(h,function(t){return e[t.data.label]||10});_forEach(t,function(e){return e.data.sizes?r(e):i.setTimeout(function(){r(e)},2e3)}),y&&window.PQ.cmd.push(()=>{try{window.PQ.loadSignals(["ids","bsc","vlp"],T)}catch(e){T(),console.error(`There has been an error loading Double Verify signals: ${e}`)}}),h=[]},10),this.addToPageLoadQueue=function(e){h.push(e),d()});function _(e){var t,a=e.sizes;return a=_intersectionWith(a,[[970,250],[970,90],[728,90],[300,600],[300,250],[320,100],[320,50]],_isEqual),e.sizes&&e.sizes.length&&(t={slotID:e.id,sizes:a,slotName:e.label}),t}function T(){i.clearTimeout(c),w=!0,_forEach(v,function(e){e()})}}]);
}, {"107":107,"114":114,"118":118,"124":124,"182":182,"205":205,"268":268,"274":274,"406":406,"409":409}];
window.modules["cid.legacy"] = [function(require,module,exports){"use strict";DS.service("$cid",function(){var r=Math.floor(100*Math.random());return function(){return"cid-"+ ++r}});
}, {}];
window.modules["client.legacy"] = [function(require,module,exports){"use strict";require("cid.legacy"),require("ads.legacy"),require("facebook.legacy"),require("aaa-module-mounting.legacy");
}, {"cid.legacy":"cid.legacy","ads.legacy":"ads.legacy","facebook.legacy":"facebook.legacy","aaa-module-mounting.legacy":"aaa-module-mounting.legacy"}];
window.modules["facebook.legacy"] = [function(require,module,exports){"use strict";DS.service("facebook",[function(){this.fb=function(i){window.FB&&window.FB[i].apply(this,Array.prototype.slice.call(arguments,1))}}]);
}, {}];
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 typeof key === 'string' && key.match(/\.legacy$/)).forEach(key => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for "${name}" on "${elementTag}"`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules).filter(key => typeof key === 'string' && key.match(/\.client$/)).forEach(key => {
let controllerFn = window.require(key);
if (typeof controllerFn === 'function') {
const name = key.replace('.client', ''),
instancesSelector = `[data-uri*="_components/${name}/"]`,
defaultSelector = `[data-uri$="_components${name}"]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
}
// 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();
// ]]