Week 2 (Those Who Walk Away / Pass Through Fire / Into Rimecleft)
Season 2
Episode 2
Editor’s Rating
3 stars
***
Photo: Vulture; Photo: Prime Video
To anybody who has played Dungeons & Dragons — or even watched, like, any genre fiction ever — it’s not a shock that Vex’ahlia doesn’t stay dead. Resurrection is a common trope in stories like this and is built into the rules of the game Critical Role runs on. But, in this second batch of episodes, The Legend of Vox Machina does the work in making sure that, even if Vex’s return from the dead seems like no big deal to knowing audiences (and, amusingly, to her, as she’s pretty nonchalant about it), we’re still seeing the ripple effects that show how this resurrection matters and will continue to matter down the line. It’s a trio of episodes that more explicitly lay the groundwork for momentous things to come, even if they don’t quite have the mastery of the tone that the first three episodes of season two did.
Before Vex breathes again, though, we’re treated to another flashback of Vex and Vax when they were younger and on their own after fleeing their dad’s abusive home. Vax rescues his sister when she gets herself captured, and while fleeing, they stumble upon a tremendous bear that the captors have tormented and injured. Vax humanely euthanizes the bear, freeing it from its pain. But the bear had a cub, little Trinket, which Vex adopts. This cold open could have been an unnecessary Trinket origin story, but there’s added meaning. Vax acted as a merciful angel of death. Now, it seems he’s about to take on that role in a much more literal way, whether he wants to or not.
In the present, Zahra and Kash come back from their dead-end exploration just in time to realize that they’ve been beaten to the Vestige and that Vex is dead. Kash, a cleric like Pike, tries to work with her to revive Vex, but it’s not working. The Matron of Ravens, the goddess of death herself, won’t allow such a thing to happen in her place of power. Vax, however, can see her — and the thread tethering his spirit to his twin sister’s. “Take me instead,” he shouts, and the Matron of Ravens cuts the golden string without a word. Suddenly, Vex is alive again. Vax is still alive, too, but he’s now wearing the Deathwalker’s Ward. Apparently, the Matron of Ravens agreed to take him instead of his sister, but it wasn’t as simple as trading one death for another. No, the goddess of death has taken Vax into her service, and what that entails loomed over the rest of the first Critical Role campaign as it will over the rest of this show.
Putting the impact of Vex’s death and revival on her brother is an interesting narrative twist, but the rest of the episode isn’t quite so clever with its storytelling. Zahra still wants the Vestige, so she betrays Vox Machina, releasing some eldritch monster from a little fantasy Pokéball that turns them to stone. Kash wants no part of this and rushes to aid the group as they’re petrified one by one. It doesn’t take too long before Zahra changes her mind and attempts to trap the monster back in her amulet, but she’s quickly turned to stone, too. It’s a motivational flip-flopping that, especially combined with how fast everybody just makes up and says “no hard feelings” at the end of the episode, feels a little cheap. Zahra’s betrayal and Ctrl-Zing of said betrayal are just a means to a cool fight.
At least it is a cool fight, with the monster’s tentacles flying all over the place. And it gives Vax a chance to show off just how powerful the Vestiges are. While his friends are getting their butts petrified, he has a vision where an undead figure — the Matron of Ravens’ previous champion — beats the shit out of him. It’s only when he decides to stop fighting and let his opponent hit him willingly that this act of acceptance unlocks the Vestige’s true power (and it means he’s officially the Matron of Ravens’ new champion). In one of the more anime-esque fight sequences we’ve seen in the show so far (meant as a compliment, mostly!), Vax defeats the monster with newfound ease.
Zahra says that the Slayer’s Take only meant to protect Osysa’s secrets and keep the Vestige from falling into unworthy hands, but Vex is clearly worthy. Everybody is friends despite the attempted murder via tentacle monster. Zahra even gives Vex her Pokéball, which will hereafter serve as a convenient way to get Trinket out of the picture when it’s not narratively convenient. Vax, though, can’t get rid of the Matron of Ravens as easily. They’re the ones tethered together, not, and the sequence ends with a jump scare that I was not expecting. Ya got me.
If the fourth episode was a Vax-focused installment, the fifth is a Keyleth showcase. In this second season, having introduced TV audiences to Vox Machina as a whole and letting viewers know what each of their whole deals is, the show now has the room to give each character a spotlight episode. It’s a pretty standard TV storytelling technique, but one that lends itself especially well to Dungeons & Dragons because sometimes your character is the big damn hero, and other times they’re playing a support role in another player’s quest.
“Pass Through Fire” begins with a flashback to Keyleth’s youth when her mother, Vilya, says what is supposed to be a temporary farewell as she heads off on a ritual journey. Keyleth and her family are members of the Air Ashari, and together with the Fire, Water, and Earth Ashari tribes, her people guard the portals where the elemental planes open up into the Material Plane where they all live. Vilya, we learn, never made it home, and Keyleth joined up with Vox Machina because she was setting out on a similar mission to master the other three elements in addition to air. Before she leaves, Vilya gives her daughter some tips on dealing with fire, explaining that it only hurts if she lets it.
In the present, while Vex smugly brags about having returned from the dead, Keyleth gets her wind on and realizes that they’re near Pyrah, the home of the Fire Ashari — and one of the last places her mother was seen alive. Grog, meanwhile, has wandered off and is talking to his sword, the Craven Edge. The blade explains that its bloodlust will never be sated, and it’s ominous that even sweet, stupid Grog seems perturbed by this. Or it would be ominous if this conversation didn’t happen while Grog was pretending to shit and having Sanland unwittingly sing a poop-accompaniment song to mask the sound of his conversation. It’s an amusing scene (and the full song, heard during the end credits, doesn’t not slap), but this is an example of Critical Role’s humor sometimes working better in the original actual-play format. When it’s clear that the players are the ones riffing and making goofs, it’s less jarring than in the animated show’s seemingly self-contained world when such silliness occurs. Like, sure, I believe that Grog might fart while talking to a cursed blade. It’s just a lot dumber than everything else in this world.
When the group realizes that the volcano Pyrah sits on is erupting — something that shouldn’t be happening unless the rift to the fire dominion is open — Keyleth naturally rushes to help. Vex, still haunted by his encounter with the Matron of Ravens (and haunted by visions of a ruined Emon), doesn’t want to. The rest of the party eventually convinces Vex, but Keyleth rushes ahead, where she runs into her father, Korrin, who is trying to seal the rift. He’s not alone. Allura and Kima, who, it turns out, did not die when the Chroma Conclave devastated Emon in the premiere, are there too. Allura explains that she and Kima are here because they know that Thordak’s presence means he has escaped from the Fire Dominion. She would know because she helped bind him to a soul anchor and trap him in the elemental plane years ago.
While the rest of Vox Machina fights off the nasty little fiery beasts that are spewing from the portal, Keyleth tries and fails to seal the rift. She tearfully admits to Korrin that she hasn’t mastered fire yet, only to hear something in the wind. Remembering her mother’s words, Keyleth willingly enters the rift and does not let the fire hurt her. Instead, she becomes something of a fire elemental herself, and she’s able to seal the rift, officially finish this aspect of her trials, get the blessing of Pyrah, and save the day. Allura sows a little unease by warning that Thordak could’ve only escaped with the help of somebody posing as an ally — and how much does Keyleth really trust her friends? — but on the whole, it was a pretty tidy little adventure. Too tidy, almost, which makes the black dragon-shaped wrench that Ripley throws into the next episode exciting.
“Into Rimecleft” opens not with a flashback but a potential flash-forward, as a battle-crazed Grog has unwittingly used the Craven Edge to slaughter his friends. Grog wakes from his nightmare before the party arrives at Rimecleft, the home of Osysa’s mate, the sphinx Kamaljiouri. Vex is able to spy the hidden entrance to the temple, which Vax somehow innately knows was built before the Calamity — another perk (?) of wearing a Vestige and becoming the Goddess of Deaths’ champion.
Kamaljiouri, who looks rad, is ready to attack them before Vox Machina stays his paw by shouting out that Osysa sent them. Even with his long-lost love’s endorsement, Kamaljiouri isn’t going just to give the group the answers they seek. They must prove their worth by inflicting a wound on him in a one-on-one challenge. Vax can’t land a scratch, even with his swanky new Vestige. Nor can Grog, who is once again told he “knows not where his strength comes from.” Vox Machina cannot touch this physically wound this ultra-powerful creature, but Scanlan inflicts an emotional wound by singing a power ballad about Osysa. Amazingly, it works, and when the downed members of the party regain consciousness, Scanlan and the Sphinx are bros. Scanlan gets another Vestige, the sword Mythcarver. He sees visions of a bow in the Feywild and a glowing gauntlet in Westrunn, where Grog’s people are invading.
It’s all … too easy. Scanlan inflicting an emotional wound rather than a physical one is not exactly a surprising twist. Even though it’s a legitimate hoot to see Scanlan and Kamaljiouri shooting the shit, it would be a bit deflating if this is how things ended for this trio of episodes. Zahra’s betrayal is easily forgotten water under the bridge, Keyleth has a stirring but somewhat rushed personal breakthrough, and Scanlan gets a Vestige with a song. Are all these episodes going to end with just a clean little resolution? This season started with a dragon apocalypse! Where’s that energy?
Oh.
Umbrasyl’s sudden appearance disrupts a trio of episodes that were verging on feeling a little safe. The hulking black dragon, who is here for Mycarver following a tip from Ripley, is still way out of Vox Machina’s league — and Kamaljiouri’s league, too. In a brutal, visceral way, the sphinx and the dragon battle, kaiju-style, while Vox Machina attempts to get some licks in on the margins. Umbrasyl nearly gets away with Scanlan and Mythcarver, but Kamaljiouri manages to save Scanlan before dying. Keyleth attempts to cast Plane Shift, a spell that will get them to safety, but Grog isn’t listening. Fueled by the Craven Edge’s power and madness, Grog seems to be the only member of Vox Machina who can do any semblance of damage to Umbrasyl, the gnarliest attack being when the blade catches a puncture in the dragon’s otherwise tough scales and then just slices his way through. It will not be enough to win, though, but Grog won’t listen to reason. When Pike tries to get her friend into the radius of Keyleth’s spell, he impales her on the Craven Edge — just like in his vision. This snaps him out of his madness, but Umbrasyl attacks Keyleth just as the spell is reaching completion. Keyleth, the twins, and Percy are in the strange and beautiful Feywild. Pike, Grog, and Scanlan are MIA. The party has been spit, the stakes are high, and if there was a worry that The Legend of Vox Machina was easing itself into complacency, that’s no longer a concern. Pike’s ongoing health might be, though.
How Do You Want to Do This?
• The Legend of Vox Machina must be doing pretty well for Amazon — Prime Video just announced a multiyear exclusive overall TV and a first-look deal with Critical Role. It also green-lit a new series adapting the Second Campaign, which will follow the exploits of the Mighty Nein. There’s no word on when the Mighty Nein series will premiere yet. Canonically, the events of the Second Campaign take place after the events of The Legend of Vox Machina. While they’re mostly stand-alone, a few characters from the First Campaign appear in the second and, therefore, there could be possible spoilers if the two shows are airing concurrently. (One of those spoiler characters may or may not have been in this batch of LOVM episodes …)
• It’s pretty funny that Keyleyth got a magical outfit change.
• In Critical Role, Scanlan’s inspiring bardic songs were typically Weird Al–esque parodies of real songs that his player, Sam Riegel, would come up with off the dome in the moment. Thank goodness the show doesn’t do this, whether it was a deliberate artistic choice or just a consequence of not wanting to get the rights to the songs. If Scanlan’s original songs sometimes push against the edges of The Legend of Vox Machina’s reality, a gnome busting out a Taylor Swift spoof in the middle of a battle would’ve been way too much to take seriously.
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();
// ]]