PageSourceSearch

https://www.hbs.edu/_next/static/chunks/587.405ad8581acc994c.js

js hbs.edu collected 2026-10-01 08:04:32 UTC 1,619 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[587],{20587:(e,r,t)=>{t.d(r,{X:()=>c,v:()=>s});var o=t(6029),n=t(55729),a=t(42744);let i=(0,n.createContext)([[],e=>e]);function s(e){let{children:r,programs:t}=e,[s,c]=(0,n.useState)([]),{pushDataLayer:l}=(0,a.v)();(0,n.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("programs");e&&c(e.split(",").map(e=>t.find(r=>r.id===e.replace("coursePage-",""))).filter(e=>!!e).map(e=>({...e,activeSessionIndex:0})))},[t]);let p=(0,n.useRef)(""),d=(0,n.useRef)();return(0,n.useEffect)(()=>{let e=new URLSearchParams(window.location.search),r=e.get("programs");if(!r||!s.length)return;let t=s.map(e=>e.id).join(",");e.delete("programs"),e.set("programs",t);let o=s.map(e=>e.title).join(",");if(p.current.split(",").sort().join()===t.split(",").sort().join())return;l({event:"program_finder_comparison",event_data:{compared_programs:o}}),p.current=t;let n=e.toString(),a=new URL("".concat(window.location.origin).concat(window.location.pathname,"?").concat(n));d.current&&d.current!==a.href&&window.history.pushState({},"",a.href),d.current=a.href},[s,l]),(0,n.useEffect)(()=>{window.onpopstate=e=>{e.state&&history.go(0)}}),(0,o.jsx)(i.Provider,{value:[s,c],children:r})}function c(){let[e,r]=(0,n.useContext)(i);return{programsToCompare:e,setProgramsToCompare:r,addProgramToCompare:e=>{r(r=>[...r,e])},removeProgramToCompare:e=>{r(r=>r.filter(r=>r.id!==e.id))},reorderProgramToCompare:(e,t)=>{r(r=>{let o=r.findIndex(r=>
1r.id===e.id);return r.splice(o,1),r.splice(o+t,0,e),[...r]})}}}}}]);
2//# sourceMappingURL=587.405ad8581acc994c.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.