PageSourceSearch

https://assets.themorningcontext.com/next2/_next/static/chunks/4344.00d66e49dde55728.js

js themorningcontext.com collected 2026-09-24 09:40:20 UTC 7,799 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4344],{12088:(e,t,r)=>{r.d(t,{c:()=>l,AuthProvider:()=>i});var a=r(95155),n=r(20063),s=r(36489),o=r(12115);let l=(0,o.createContext)(null),i=e=>{let{children:t,isAuthenticatedUser:r,isLoggedIn:i,token:d,user:c,authError:u}=e,{data:m,status:p}=(0,s.useSession)(),h=(0,o.useMemo)(()=>{if("loading"===p)return{isLoggedIn:i,user:c,isAuthenticatedUser:r,token:d,authError:u,sessionStatus:"loading"};if("authenticated"===p&&(null==m?void 0:m.idToken)&&!(null==m?void 0:m.error)){var e,t,a;return{isLoggedIn:!0,isAuthenticatedUser:!0,token:m.idToken,authError:null,sessionStatus:"authenticated",user:(null==(e=m.user)?void 0:e.email)?{fullName:null!=(t=m.user.name)?t:"",email:m.user.email,id:String(null!=(a=m.user.id)?a:"")}:null}}return{isLoggedIn:!1,user:null,isAuthenticatedUser:!1,token:null,authError:null,sessionStatus:"unauthenticated"}},[p,m,i,c,r,d,u]),x=(0,n.usePathname)();return(0,o.useEffect)(()=>((()=>{var e,t;(e=>{let{event:t,data:r}=e;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:t,...r})})({event:"next_page_view",data:{logged_in:!!h.token,email:(null==(e=h.user)?void 0:e.email)||"",full_name:(null==(t=h.user)?void 0:t.fullName)||"",page_referrer:document.referrer,page_path:x}})})(),(()=>{let e=function(){let e=document.getElementsByTagName("body")[0],t=window.getSelection(),r=t?t.toString():"",a="";if(r.length>400){let e=r.substring(0,400);""!==(e=e.substr(0,Math.min(e.length,e.lastIndexOf(" "))))&&(a=e+" ...<br/>")}else a=r+"<br/>";a=a+("Read more at: <a href='"+document.location.href+"'>"+document.location.href)+"</a><br/>Copyright \xa9 The Morning Context";let n=document.createElement("div");n.setAttribute("style","position: fixed; opacity: 0;"),e.appendChild(n),n.innerHTML=a,t&&t.selectAllChildren(n),requestAnimationFrame(()=>{n.parentNode&&e.removeChild(n)})};return document.body.addEventListener("copy",e),()=>{document.body.removeEventListener("copy",e)}})()),[]),(0,a.jsx)(l.Provider,{value:h,children:t})}},19623:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(12115),n=r(12088);let s=()=>{let e=(0,a.useContext)(n.c);if(!e)throw Error("Hook must used inside auth provider children");return e}},20281:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var a=r(95155),n=r(60311),s=r(83296),o=r(52619),l=r.n(o);let i=e=>{let{industry:t}=e;return(0,a.jsx)("div",{className:"bg-yellow50 md:py-14 py-8 my-10 border-t border-b border-[#E7D6C9] px-5",children:(0,a.jsxs)("div",{className:"max-w-[1280px] mx-auto",children:[(0,a.jsx)("p",{className:"md:text-center text-left font-playfair font-bold text-[34px] mb-8",children:"Explore Unicorn Stories by Industry"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-3 md:gap-5 md:justify-center justify-start",children:t.map(e=>(0,a.jsx)(l(),{href:"/state-of-the-unicorns/category?q=".concat(e.name,"&type=industry"),className:"bg-white border border-[#E7D6C9] md:px-5 md:py-2 px-2 py-1",children:(0,a.jsxs)("p",{className:"md:text-[18px] text-[16px] font-bold font-haasGrotesk text-indigo800 uppercase",children:["#",e.name]})},e.name))})]})})};var d=r(12115),c=r(30557),u=r(11742),m=r(46671),p=r.n(m),h=r(59496),x=r(19623);let y=(0,d.memo)(e=>{let{story:t,containerClasses:r,imageClasses:s}=e;return(0,a.jsx)(n.A,{story:t,containerClasses:r,isStateOfUnicorn:!0,imageClasses:s})});y.displayName="StoryCard";let g=e=>{let{allStories:t,industry:r}=e,[n,o]=(0,d.useState)([]),[l,m]=(0,d.useState)(!1),[g,f]=(0,d.useState)(1),{token:v}=(0,x.A)();(0,d.useEffect)(()=>{o((0,c.G)((null==t?void 0:t.story)||[])),m(p().get(t,["page","has_next"],!1)),f(p().get(t,["page","current"],1))},[t]);let b=(0,d.useCallback)(async()=>{let e=g+1;try{let t=new h.p(v||""),r=await t.getSouStories({limit:10,page:e}),a=(0,c.G)(r.data.story);o(e=>[...e,...a]),m(p().get(r.data,["page","has_next"],!1)),f(e)}catch(e){console.error("Error fetching more data",e),m(!1)}},[g,v]),w=n.slice(1,5),j=n.slice(5);return(0,a.jsxs)("div",{className:"mb-20",children:[(0,a.jsxs)("div",{className:"max-w-[1200px] mx-auto py-10",children:[(0,a.jsx)(s.A,{title:"Latest Stories"}),(0,a.jsx)("div",{className:"flex flex-col gap-10 px-5",children:w.map((e,t)=>(0,a.jsx)(y,{story:e,containerClasses:"flex md:flex-row flex-col md:gap-10 gap-3",imageClasses:"md:h-[276px] h-[240px] md:max-w-[490px] w-full"},e.id||t))})]}),(0,a.jsx)(i,{industry:r}),(0,a.jsx)(u.A,{dataLength:n.length,next:b,hasMore:l,loader:(0,a.jsx)("h4",{className:"text-base font-haasGrotesk font-medium text-lightBlack my-10 text-center",children:"Loading more stories..."}),endMessage:(0,a.jsx)("p",{className:"text-center text-gray-500 my-10",children:(0,a.jsx)("b",{children:"You've reached the end of the stories"})}),children:(0,a.jsx)("div",{className:"flex flex-col gap-10 px-5 py-10 max-w-[1200px] mx-auto",children:j.map((e,t)=>(0,a.jsx)(y,{story:e,containerClasses:"flex md:flex-row flex-col md:gap-10 gap-3",imageClasses:"md:h-[276px] h-[240px] md:max-w-[490px] w-full"},e.id||"remaining-".concat(t)))})})]})}},59496:(e,t,r)=>{r.d(t,{p:()=>n});var a=r(59871);
1class n{async getSouCompanies(){return(await (0,a.A)({endpoint:"/companies",method:"POST",body:{sort_on:"name",sort_by:"asc",unicorn:!0},token:this.authToken})).data}async getSouStories(e){let{page:t,limit:r=10}=e;return(await (0,a.A)({endpoint:"/stories",method:"POST",body:{limit:r,page:t,sort_on:"date",sort_by:"desc",search_string:"",exclude:[],filters:[{key:"category",value:["state-of-the-unicorns"]}]}})).data}async getSouStoriesBySearch(e){let{search:t,type:r}=e,n={limit:10,page:1,sort_on:"date",sort_by:"desc",..."company"===r&&{company_search_string:t},exclude:[],filters:[{key:"newsletter",value:["include"]},{key:"type",value:["short","regular","newsletter"]},{key:"type",value:["short","regular","newsletter","yesterday"]},{key:"category",value:["state-of-the-unicorns"]},..."industry"===r?[{key:"industry",value:[t]}]:[]]};return(await (0,a.A)({endpoint:"/stories",method:"POST",body:n})).data}constructor(e=""){this.authToken=e}}},59871:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(90051);async function n(e){let{endpoint:t,method:r,headers:n,body:s,queryParams:o,token:l,clientIp:i,cache:d}=e,c=o?"?".concat(new URLSearchParams(o).toString()):"";try{let e=await fetch("https://api.themorningcontext.com/api/v1"+t+c,{method:r,headers:{"Content-Type":"application/json","api-auth-version":"2.0",Accept:"application/json",...l&&{Authorization:"Bearer ".concat(l)},...i&&{"x-client-real-ip":i},...n},body:s?JSON.stringify(s):void 0}),a=e.headers.get("Content-Type");return{data:(null==a?void 0:a.includes("application/json"))?await e.json():null,status:e.status,error:""}}catch(e){return{data:null,status:500,error:(0,a.J)(e,"message","")||"Unknown error occurred"}}}},83264:(e,t,r)=>{r.d(t,{E:()=>a});function a(e){return null==e?0:"string"==typeof e||Array.isArray(e)?e.length:e instanceof Map||e instanceof Set?e.size:"object"==typeof e?Object.keys(e).length:0}},83296:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(95155);let n=e=>{let{title:t,textPosition:r="center"}=e;return(0,a.jsxs)("div",{className:"flex gap-5 items-center justify-center md:mb-9 mb-7 md:px-5 px-0",children:["left"!==r&&(0,a.jsx)("div",{className:"h-[1px] grow bg-[rgba(0,0,0,0.3)] opacity-80 md:block hidden"}),(0,a.jsx)("h2",{className:"grow-0 text-[34px] font-bold text-[#292929] md:border-b-2 md:border-b-[#292929]/[.8] text-center",style:{fontFamily:"var(--font-playfair), serif"},children:t}),"right"!==r&&(0,a.jsx)("div",{className:"h-[1px] grow bg-[rgba(0,0,0,0.3)] opacity-80 md:block hidden"})]})}},90051:(e,t,r)=>{r.d(t,{J:()=>a});function a(e,t,r){if(null==e)return r;let a=Array.isArray(t)?t:t.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean),n=e;for(let e of a){if(null==n||"object"!=typeof n&&"function"!=typeof n||!(e in n))return r;n=n[e]}return void 0===n?r:n}}}]);

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.