There’s an equation that can be applied to television cops and detectives. The more indignant they act, the more fueled they are by self-righteousness, the more they criticize and dismiss the theories of their peers … the less competent they actually are. One hell of an example of this is The Walking Dead, where you can predict whenever Rick is going to make a bad decision by the tight clenching of his jaw. Sorry, though, Rick: There’s a new sheriff in town. And I’m not talking about your son, which is confusing since he walks around with your sheriff hat on every minute of every day. No, I’m talking about ex-FBI agent Ryan Hardy.
There’s a lot of hemming and hawing in this episode about Kevin Bacon’s character, Hardy, being stable enough to work this case. “I’d just get rid of him before he cracks,” warns one man in a vague position of authority whose main character trait thus far is to disapprove. No one gives Hardy any credit for having been shot on the job and sentenced to a lifelong threat of heart failure, but they do give him an awful lot of credence when it comes to his detective abilities. He was originally brought on because no one knows Carroll like he does, which I’m sure sounded great when it was scribbled on an index card in the writer’s room but really falls apart when we keep seeing him piecing together clues at the same rate, with the same amount of insight, as everyone else in the unit. It wasn’t until he saw a photo of Carroll’s ex-wife, Claire, with the word nevermore written under it that it occurred to Hardy that Carroll might just have a bone to pick with this lady (and this was after Carroll had placed his hands around her neck earlier in the episode and tried to strangle the life out of her until the world’s slowest moving non-corrupt guards finally burst in and restrained him). And even then, Claire still almost gets killed because the cops fail to search her house thoroughly enough. While combing through hand-drawn “blueprints” found in Carroll’s followers’ clubhouse, Hardy sees a drawing of Claire’s house. The word basement is written inside a giant space, and with just that one tiny clue, Hardy is able to once again demonstrate that trademark sense of instinct that makes him so invaluable and deduct that, yeah, there’s probably a bad guy hiding in the basement.
This week’s episode intercuts between three separate story lines: the followers, the ex-wife, and the hunt. They’re all intertwined, of course, by the through line of Carroll. We start where we left off last week, with Jordy the security guard entering a sorority house under the guise of making sure everything is secure. Once upstairs in a bedroom, he lays out a set of tools and tells the poor girl that let him in that he’s been waiting a long time for this moment. We’re spared having to actually watch her murder, but we see the aftermath later.
Jordy is a schlubby guy who, out of all of Carroll’s followers, is the most believable to me in terms of who might be swayed. He was a prison security guard, which means he probably has some power issues going on, and the way the actor plays it, you can detect a faint backstory of the character being rejected by girls a lot as a teenager. Something that happens a lot in TV and movies when it comes to the portrayal of evil is that it’s just assumed that there are loads of people who believe in it as a cause worth fighting for. Like when you see an action movie with a villain whose main agenda is to just inflict pain and agony, there will always be loads of faceless thugs willing to help him out even at the risk of their own demise. It doesn’t make any sense. One of the things that makes the film Die Hard so great is that the terrorists are wreaking havoc for a tangible reason: money. This doesn’t justify what they’re doing, but it’s definitely not vague. Earlier in the movie, Alan Rickman’s character even jokes about how funny he finds demands for freed imprisoned brothers and statements made in the name of religion or politics. He and his accomplices just want to get filthy rich.
While I don’t feel it personally, I do believe there is something contagious about certain horrific acts. Just look at school shootings and how when one happens, others follow. I don’t want to get all pseudo-psychological here, but it does seem that serial killers are a different story, at least the ones that Carroll is obviously based on. While we hear about a new shooting every day, for every Ted Bundy, there was … only Ted Bundy. He is sickly fascinating to us because of how very abnormal he was. In The Following, a great number of people (we’ve already seen dozens, counting those women in the police waiting room who no one from the FBI seems to have any interest in questioning, but also, I’m assuming the number will grow with each episode as more are revealed) are becoming serial killers for no other reason than a college professor quoting to them the most overused line from “The Raven.”
Or put another way, by Hardy’s new partner, FBI specialist Debra Parker, Carroll was able to recruit followers by “using Poe’s work as a religion, speaking to people through Gothic Romanticism, as a pathology to today’s Internet techno-bred minds. Make them feel their lives for the first time; they’ll see the only way to truly live is to kill.” I know I’m jumping around the plot here, but the introduction of Agent Parker as a regular new character is just bizarre. She replaced Agent Mason, who was Hardy’s partner in the pilot. It feels like there was some sort of focus testing done that said the actress playing Mason wasn’t likable enough or something, but is that even how television works? Why did they bother introducing Mason at all, especially since Agent Parker is basically the same character except with a degree in alternative religion?
Being as this is network television, you can expect at least 20 percent filler per episode. Even factoring that in, I didn’t have to expect to have to slog through a plotline involving Hardy calling Carroll a cult leader and Agent Parker being all, “We don’t like that word.” Which, in turn, made Hardy keep listing throughout the episode all the very many ways that Carroll exhibited cult-leader-like behavior until finally — I think it was after they found the house with all the beds and scribbly nonsense on the wall — Agent Parker was all, “Okay, okay, it’s a cult. And also, I am a cult specialist! Exceptionally boring plot twist!”
Okay, let’s talk about the nanny and the two not-gay guys. As a nanny, her name was Denise, but we soon learn, by the FBI’s tech guy typing into a computer really quickly, that her real name is Emma. The not-gay guys are Jacob and Paul. We first see Paul chasing Claire’s son, Joey, outside a big house in the country. Joey is screaming, so you think he’s trying to run away, which he is but not because he’s scared. He’s playing a game with Paul, and he’s having a lot of fun doing it. I know TV kids don’t have it easy when it comes to character development, but Joey is especially unformed. He asks if he can call his mom and Emma tells him it’s not safe because of his dad and then distracts him by showing him his new room, which is decorated exactly like his old room, which might seem unnecessarily elaborate in terms of this crew pulling off their diabolical plans until you remember that two guys also spent three years pretending to be of a sexual orientation that they were not for a reason that’s not all that rock solid. Would a yuppie heterosexual couple really not have worn down Sarah after a while? And what was the point of their befriending her, anyway, if they were only going to sneak into her room when it came time to kill her? Oh man, it’s going to be hard to keep on track with this one.
Joey is thrilled with his new room. It is, after all, “super cool!” Considering how many surprises this show has promised to have in store for us, I’m looking forward to the greatest reveal of all, which is that Joey is actually the mastermind behind it all. How else to explain the discrepancy between how we’ve seen him act and how his mother describes him being? According to what she tells Carroll, Joel has already torn through the works of Melville and Twain and Defoe. Or maybe he’s even more like his dad then she realizes and he just told her he read all those books when really he just watched a few relevant Simpsons episodes and got the general gist.
Emma, we learn in a flashback, met Carroll at one of his book readings. She tells him that she thinks his protagonist found hope in death, and he, in turn, signs her book, “Hopefully yours, Joe,” and it’s all so adorable except for the fact that they both share an obsession with stabbing people. The problem with Emma as a character is that nothing about her indicates that she’s a sadist except for the fact that the show tells us she is. It doesn’t even feel like the show cast the right actress. Emma’s mom keeps saying how she can’t understand why any boy would be interested in Emma, but why not? She’s a cute, young, flirty girl whose hair is the kind of texture that looks equally good long or straight. What guy wouldn’t want to not kill for that?
In another flashback, we see Emma go visit Carroll in prison, where he tells her that he wants to set her up with someone, who turns out to be Paul. Flashback Paul is played by all five of Mitt Romney’s sons. He’s just one big Romney hairstyle. He falls for Emma right away, which I think is supposed to register as more special than it actually plays since, again, she seems like a perfectly attractive, appealing girl. Later on, we see him at her house for dinner, with her mom wearing one of her signature wrap dresses. The mom makes another comment about Emma being a homely monster, and then Emma turns into a literal, literary monster and stabs her mom in the back. Paul and Emma smile cheekily at each other and get all breathy with excitement about what she’s just done, as though he had just asked her to move in with him and she’d said yes.
And then, I guess, three years passed where Paul went and moved in with Jacob and lived the life of a gay man while Emma worked her hardest to not give into temptation and grow out her bangs. Now that Carroll’s plan, whatever it is, is finally being put into motion, Paul and Emma can be together again. They get one room in the big country house, and Jacob gets another, which he seems very unhappy about. Paul apparently isn’t gay even though it sure seems like he is, and I don’t know, this whole plot, like, is just so immediately exhausting. In its attempt to surprise us with Sarah’s neighbors working for Carroll — the whole “Who would we least suspect?” angle — the show has already painted itself into a corner that feels like a nightmare to have to get out of. And I don’t mean one of those nightmares that are terrifying but also heart-pounding. I’m thinking more of an anxiety dream where the gas company just keeps telling you over and over again that you can’t get back on your payment plan.
About midway through the episode, Hardy finds Emma’s mom’s corpse behind a wall of the follower’s clubhouse. There is also one genuinely scary moment where he’s wandering through the rooms and sees a row of Edgar Allan Poe masks on a shelf. He turns around and stares at a drawing of a girl with gouged-out eyes on the wall (we get it!), and through a mirror, you can see the masks behind him. And you’re staring at them and something seems off, and then you look at the last one and realize that there’s a body attached, that someone is standing there wearing one of the masks, but that happens in the same instant that the mask lunges forward, and I definitely jumped. And then everyone started quoting Poe, and I got sleepy again.
The ex-wife story line is so far the dullest of them all. There’s a lot of flashbacks of her and Hardy acting way too un-traumatized by the discovery that her husband was a serial killer. There’s one scene where she’s drinking wine and making jokes about how hellish it’s going to feel to be single again that I swear must have been cut and pasted from some spec script for Cougar Town, written by someone who had never actually watched it, just loved the concept.
Jordy resurfaces at the end of the episode in Claire’s house. He was the follower in the basement. He holds her hostage long enough for Hardy to yell at some cops on a coffee break about being terrible at their jobs and then see the picture of the basement (probably the work of that cunning little Joey, purposely made to look like it was drawn by a child’s hand even though he moved onto abstraction long ago) and piece it all together. Hardy runs into the house, most likely taking the stairs two at a time because that’s how dedicated he is to this case, and gets to Claire’s bedroom just in time. Except it actually turns out that there wasn’t all that much of a hurry because Jordy has been waiting for him. He offers Hardy a deal, either Hardy kills him or he kills Claire. I’ve seen a lot of deals offered on television before, and this one is pretty weak. Even the ones on The Price Is Right where the prize is a box of ramen and an easy chair seem more challenging. Because here we have at known psychopathic killer listing, as one of the two available options, his being shot down by a man who has every right to do so. Somehow, though, Hardy even bumbles this and tries to do a counteroffer involving his pretending to have Carroll’s number in his cell, and while Jordy looks confused about why Carroll would have a phone on death row, Claire ducks (or something) and Hardy takes his shot. Which means he did exactly what Jordy demanded that he do.
The only rub is that Jordy doesn’t die but is just wounded. Hardy goes and visits Carroll in jail, and after some blather about how the story isn’t over and that the next chapter is just a turn of a page away, Hardy tells Carroll that Jordy is still alive. Carroll looks a little irritated, but he’s back on his game by later that night when Agent Parker delivers the Collected Works of Poe to him and he eye-smolders her from the other side of the glass.
The last scene is a man on a cell phone ordering a hot dog from a street vendor. We hear him say some very realistic line like “You’ll be hearing from my editor!” and then a man in one of the rubber Poe masks from the clubhouse douses the guy with gasoline and sets him on fire. It appears another follower is about to be unveiled. Because of the mask, he’s identity-less so far. I’m not sure what the other characters excuses are.
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()}});
}, {"3":3,"6":6,"17":17,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(4),auth=require(17),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(3),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 i=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||i.classList.remove("open")})}function gtmSendReport(e,n,t){let i={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(i.eventLabel=n.href),gtm.reportNow(i)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const i=t.split("?"),o=new URLSearchParams(i[1]);for(let e of n.entries())o.set(e[0],e[1]);t=`${i[0]}?${o.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()||auth.isMobileAppRequest())&&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;
}, {"3":3,"4":4,"17":17,"124":124,"135":135}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(408),Fingerprint2=require(407),DS=require(406),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(106),_isString=require(268),_intersectionWith=require(409),_isEqual=require(274),_each=require(408),_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()})}}]);
}, {"106":106,"114":114,"118":118,"124":124,"182":182,"205":205,"268":268,"274":274,"408":408,"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();
// ]]