PageSourceSearch

https://storyweaver.org.in/assets/index.D4hvogWi.js

js storyweaver.org.in collected 2026-09-24 08:44:03 UTC 10,429 bytes, 2 lines download raw bytes

1import{r as e,j as i}from"./react-vendor.B75MsAI9.js";import{Q as s,aq as t,b5 as a,a4 as l,u as r,t as n,s as o,r as c,p as d,fb as p,fc as m,fU as u,fd as v,fV as h,ff as g,x as f,L as x,b2 as _,a as j,w as y,dj as b,S as T,U as w,aY as $,ar as C,ap as F,O as k,z as S,y as N,a2 as E,aR as L,E as P,F as V,aX as A,aZ as I}from"./AuthModalContainer.CwDh3qj_.js";import{C as R}from"./CsfBanner.B3cPjLl5.js";import{B}from"./Block.DxpdHCJY.js";import{a as D,g as q}from"./main.Bj0Ml4GZ.js";import{C as H}from"./CsfSectionLabel.9JloiHHM.js";import{E as U}from"./EcePostersSection.4MzrgO_1.js";import{E as z}from"./EceThemesSection.uAq5VgCL.js";import M from"./index.DjMAR76c.js";import{E as O}from"./EceFilter.B8mMu-89.js";import{f as Q}from"./flatMap.BtxoME2v.js";import{p as X}from"./pick.Cpaa_ErP.js";import"./RibbonTitle.D_NSK7ui.js";import"./RTLProvider.Dbr8G8Qw.js";import"./LazyFontLoader.pvie9HdJ.js";import"./StoryCard.Soy1i34g.js";const Z=({parentClassName:l,appliedFilters:r,itemTypeLabel:n,isFetchingFilters:o,filters:c,posterComponent:d,shareComponent:p,applyFilter:m,removeFilter:u})=>{const[v,h]=e.useState(!1),[g,f]=e.useState([]),x="pb-ece-mobile-filter",_={[x]:!0,[l]:l},{level:j,levelFilterText:y}=c,b=X(r,["level"]);let T=[];T=j&&j.map(e=>({name:e.name,queryValue:String(e.queryValue)}));const w=T&&T.map(e=>{const t={[`${x}--level`]:!0,[`${x}--highlighted-level`]:b.level.length&&b.level.includes(e.queryValue)||!b.level.length&&"all"===e.queryValue};return i.jsx("span",{className:s(t),onClick:()=>(e=>{if(X(r,["level"]).level.includes(e))u("level",e);else{m("level",e);const i=Q(r.level,e=>e);if(i.includes("5")){const e=i.indexOf("5");-1!==e&&(i[e]=a.emergentReader)}}})(e.queryValue),children:e.name},e.queryValue)}),$=o;return i.jsxs("div",{children:[i.jsxs("div",{className:`${x}__wrapper`,children:[i.jsx(t,{}),i.jsxs("div",{className:s(_),children:[i.jsxs("span",{className:`${x}__level-label`,children:[y,":"]}),w]})]}),i.jsxs("div",{className:`${x}__wrapper-secondary`,children:[i.jsx("div",{className:`${x}`,children:i.jsx("span",{className:`${x}__count`,children:$?"Loading":n})}),i.jsxs("div",{className:`${x}__wrapper-actions`,children:[i.jsx("div",{className:`${x}__actions`,children:d}),i.jsx("div",{className:`${x}__actions`,children:p})]})]})]})};Z.propTypes={parentClassName:l.string,appliedFilters:l.object.isRequired,itemTypeLabel:l.string,isFetchingFilters:l.bool,filters:l.object.isRequired,posterComponent:l.node,shareComponent:l.node,applyFilter:l.func.isRequired,removeFilter:l.func.isRequired};const J=({books:e,onReadClicked:s,isFetchingAssets:t,readSource:a})=>{const l=e.map(e=>i.jsx(q,{id:e.id,book:e,disabled:t,loading:t,onClick:()=>s(e),shouldDisplayMenu:!1,hideQuickViewBtn:!1,isFetchingAssets:t,readSource:a,originalAuthors:e.original_authors},e.id));return i.jsx(E,{variant:"2up-6up",children:l})},W={level:[]},Y=new URLSearchParams(window.location.search),G=Y.get("language")||"en",K=Y.get("identifier"),ee=({parentClassName:a})=>{var l,E,q,Q,X,Y,ee,ie;r();const se=n(),te=o(),[ae]=c(),le=ae.get("language")||G,re=ae.get("identifier")||K,[ne,oe]=e.useState(""),[ce,de]=e.useState(re),[pe,me]=e.useState(0),ue=d(e=>e.viewport),ve=d(e=>e.ece),he=d(e=>e.book),ge=d(e=>e.network),fe=d(e=>e.user),xe=ve.landingStaticText;ve.isFetchingStaticContent;const _e=ve.isFetchingEceFilters,je=ve.filters,ye=ve.isFetchingEceStories,be=ve.stories,Te=null==(l=ve.stories)?void 0:l.stories,we=null==(E=ve.stories)?void 0:E.eceConversationPoster;ve.isFetchingThemes;const $e=ve.themes,Ce=null==(q=ve.themes)?void 0:q.themes;ve.isFetchingEceVideos;const Fe=ve.videos,ke=null==(Q=ve.videos)?void 0:Q.eceVideos,Se=he.isVideoPlayerVisible,Ne=he.isFetchingAssets,Ee=ge.online,Le=null==(X=fe.profile)?void 0:X.email,Pe=null==(Y=fe.profile)?void 0:Y.id,Ve=null==(ee=fe.profile)?void 0:ee.profile_type;e.useEffect(()=>{se(p({locale:le,page:m.themes})),se(u({locale:le})),se(v({locale:le,page:m.themes})).then(e=>{var i,s;const t=(null==e?void 0:e.themes)||(null==(i=null==e?void 0:e.data)?void 0:i.themes)||[];if(t.length>0){const e=t.findIndex(e=>e.identifier===ce);me(e>=0?e:0);const i=e>=0?ce:null==(s=t[0])?void 0:s.identifier;i&&se(h({idr:i,locale:le,filters:Ae()}))}}).catch(e=>{}),se(g({locale:le,page:m.themes}))},[se,le]),e.useEffect(()=>{if(Ce&&Ce.length>0&&ce){const e=Ce.findIndex(e=>e.identifier===ce);e>=0&&e!==pe&&me(e)}},[Ce,ce,pe]);const Ae=()=>{const e=f.parse(window.location.search);return Object.entries(e).forEach(([i,s])=>{Array.isArray(W[i])&&!Array.isArray(s)&&(e[i]=[s])}),{...W,...e}},Ie=(e,i)=>{const s=N(Ae());Array.isArray(s[e])?s[e].push(i):s[e]=i,te(`${location.pathname}?${f.stringify(s)}`.replace(`/${S}`,""),{replace:!0}),se(h({idr:ce,locale:le,filters:s}))},Re=(e,i)=>{const s=N(Ae());if(s[e]){if(Array.isArray(s[e])){const t=s[e].indexOf(i);-1!==t&&s[e].splice(t,1)}else delete s[e];te(`${location.pathname}?${f.stringify(s)}`.replace(`/${S}`,""),{replace:!0}),se(h({idr:ce,locale:le,filters:s}))}},Be="pb-ece-theme-container",De=Ae(),qe={[Be]:!0,[a]:a},He=i.jsx("div",{className:`${Be}__theme-dots-container`,children:Ce&&Ce.map((e,s)=>i.jsx("div",{className:e.identifier===ce?`${Be}__theme-dots--active`:`${Be}__theme-dots`,onClick:()=>((e,i)=>{me(i),de(e),te(k.eceThemes(le,e).replace(`/${S}`,""),{replace:!0}),se(h({idr:e,locale:le,filters:[]}))})(e.identifier,s)},e.identifier))}),Ue=i.jsx(D,{csfTitle:null==xe?void 0:xe.shareButtonText,title:null==be?void 0:be.bannerTitle,viewport:ue,align:"right",theme:"fab",onClick:e=>{window.dataLayer.push({event:`clicked_${e.slice(5).toLowerCase()}`,category:`ELR_${le}`,label:"share_books_page",item_type:null,item_id:null,item_value:null,user_id:Pe||"00000",user_profile:Ve})},shareText:null==xe?void 0:xe.shareButtonText,href:encodeURIComponent(window.location.href),whatsAppDisplayText:null==xe?void 0:xe.whatsappText,twitterDis
1playText:null==xe?void 0:xe.twitterText,facebookDisplayText:null==xe?void 0:xe.facebookText,telegramDisplayText:null==xe?void 0:xe.telegramText}),ze=i.jsx(x,{onClick:()=>{(()=>{const e=document.getElementById("related-posters");e&&window.scrollTo({top:e.offsetTop-150,behavior:"smooth"})})(),window.dataLayer.push({event:j.clickedPoster,category:`ELR_${le}`,label:_.topicPage,item_type:null,item_id:null,item_value:null,user_id:Pe,user_profile:Ve})},theme:"fab",parentClassName:`${Be}__poster-link`,children:null==xe?void 0:xe.viewPosterText}),Me=ue.medium?i.jsx(O,{noTopBorder:!0,pullUp:!0,filters:je,isFetchingFilters:_e||ye,levelSearchValue:ne,updateLevelSearchValue:e=>oe(e.target.value),shareComponent:Ue,posterComponent:ze,applyFilter:Ie,removeFilter:Re,appliedFilters:De,userId:Pe,userEmail:Le,loadingText:null==xe?void 0:xe.eceThemesLoading,itemTypeLabel:null==be?void 0:be.seeBooksText,lang:le,activeTheme:b[ce],gaEventCategoryType:y.eceLevelFilter}):i.jsx(Z,{appliedFilters:De,applyFilter:Ie,removeFilter:Re,clearFilter:()=>{},shareComponent:Ue,posterComponent:ze,isFetchingFilters:_e||ye,filters:je,itemTypeLabel:null==be?void 0:be.seeBooksText,userEmail:Pe,userId:Pe,lang:le,activeTheme:b[ce]});return i.jsxs("div",{className:s(qe),children:[i.jsxs("div",{className:`${Be}__banner-wrapper`,children:[i.jsx("div",{onClick:()=>pe>0?(e=>{if(Ce&&parseInt(e,10)-1>=0){const i=parseInt(e,10)-1,s=Ce[i].identifier;me(i),de(s),te(k.eceThemes(le,s).replace(`/${S}`,""),{replace:!0}),se(h({idr:s,locale:le,filters:[]}))}})(pe):null,className:`${Be}__next-prev-wrapper ${Be}__next-prev-wrapper--prev`,children:i.jsx(T,{size:"m",name:"reading-left",title:"Previous theme",parentClassName:pe>0&&`${Be}__next-prev-icons`})}),i.jsxs("div",{className:`${Be}__banner-carousel`,children:[i.jsx(R,{level:xe.breadcrumbEceText,title:null==be?void 0:be.bannerTitle,description:null==be?void 0:be.bannerDescription,imageUrl:ue.medium?null==be?void 0:be.bannerImageLink:Ce&&Ce[pe]?null==(ie=Ce[pe])?void 0:ie.linkToLandingPageImage:null,brdcrumbHome:xe.breadcrumbHomeText,brdcrumbFlp:xe.breadcrumbEceText,theme:"ece",largeFont:!0,imagePosition:ue.large?"right":"middle"}),He]}),i.jsx("div",{onClick:()=>Ce&&pe<Ce.length-1?(e=>{if(Ce&&parseInt(e,10)+1<Ce.length){const i=parseInt(e,10)+1,s=Ce[i].identifier;me(i),de(s),te(k.eceThemes(le,s).replace(`/${S}`,""),{replace:!0}),se(h({idr:s,locale:le,filters:[]}))}})(pe):null,className:`${Be}__next-prev-wrapper ${Be}__next-prev-wrapper--next`,children:i.jsx(T,{size:"m",name:"reading-right",title:"Next theme",parentClassName:Ce&&pe<Ce.length-1&&`${Be}__next-prev-icons`})})]}),!ue.medium&&Me,i.jsxs(B,{children:[ue.medium&&Me,ye||!Te?i.jsx(w,{}):i.jsx(J,{books:Te,onReadClicked:e=>{L.shouldShowMandatoryLogin()&&Ee?se(P({stage:V.mandatoryLogin})):(se(A({slug:e.slug,isAudio:!1,ignoreCount:!1,isCsf:!1,isFlpHome:!1,isStem:!1})).then(()=>{se(I({book:e,storyId:e.id,showAttributionPage:!1,readSource:$.ece,readingProgramBook:!0}))}),window.dataLayer.push({event:j.startReading,category:`ELR_${le}`,label:_.topicPage,item_type:"book_language_level",item_id:e.id,item_value:`${e.language}_${e.level}`,user_id:Pe,user_profile:Ve}),L.storyRead(e.slug))},isFetchingAssets:Ne,readSource:$.ece})]}),i.jsxs(B,{background:"transparent",children:[i.jsx(t,{variant:"csf"}),i.jsx("div",{id:"related-posters",className:`${Be}__section`,children:ye||!we?i.jsx(w,{}):i.jsx(U,{title:null==be?void 0:be.conversationalPostersHeading,viewButtonText:null==be?void 0:be.viewPosterText,textDescription:null==be?void 0:be.conversationalPostersDescription,cards:we,viewport:ue,lang:le,userEmail:Le,userId:Pe,secClicked:_.themePage})}),i.jsx(t,{variant:"csf"}),i.jsx("div",{className:`${Be}__section`,children:Ce&&i.jsx(z,{title:null==$e?void 0:$e.themeSectionHeader,lang:le,seeBooksButtonText:null==$e?void 0:$e.seeBooksButtonText,textDescription:null==$e?void 0:$e.themeSectionDescription,cards:Ce.filter(e=>e.identifier!==ce),viewport:ue,userEmail:Le,userId:Pe,secClicked:_.themePage})}),i.jsx(t,{variant:"csf"}),i.jsx("div",{className:`${Be}__section`,children:ke&&i.jsx(M,{title:null==Fe?void 0:Fe.videoSectionHeading,textDescription:null==Fe?void 0:Fe.videoSectionDescription,openVideoPlayer:()=>se(F()),closeVideoPlayer:()=>se(C()),isVideoPlayerVisible:Se,videos:ke,userEmail:Le,userId:Pe,userType:Ve,secClicked:_.themePage,variant:ue.medium?"carousel":"default",viewport:ue,lang:le})}),i.jsx(t,{variant:"csf"}),i.jsx(H,{title:xe.contactSectionHeading,textDescription:xe.contactSectionDescription})]})]})};export{ee as default};
2//# sourceMappingURL=index.D4hvogWi.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.