(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[95405],{15273:function(e,n,t){"use strict";var a,r=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Ee().streakTitleWarning),children:[i("x-days-streak",{days:l}),(0,r.jsx)(qe,{})]})},ze=t(71612),De=function(e){var n=e.currentActivityDay,t=e.goal,a=e.percent,i=e.isQuranReader,o=(0,d.Z)("reading-goal").t;return t?t.isCompleted?o("progress.goal-complete"):a<100?(0,r.jsx)(ze.Z,{currentActivityDay:n,goal:t,context:i?ze.H.QuranReader:ze.H.HomePage}):o("progress.complete"):null},Ke=t(52087),Ge=t.n(Ke),Ve=t(95932),Be=function(){var e=(0,d.Z)("reading-goal").t,n=(0,Ne.Z)({disableIfNoGoalExists:!1}),t=n.isLoading,a=n.error,i=n.streak,o=n.goal,s=n.weekData,l=n.currentActivityDay,c=(0,Ve.xT)((null===l||void 0===l?void 0:l.progress)||0);return a||!t&&0===i&&!o?(0,r.jsx)("p",{children:e("home:qgj.quran-reading-goals.desc.logged-out")}):(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:Ge().container,children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:Ge().streakSubtitle,children:e("reading-goal-label")}),t?(0,r.jsx)(k.Z,{children:(0,r.jsx)(Ie,{currentActivityDay:l,streak:i})}):(0,r.jsx)(Ie,{currentActivityDay:l,streak:i})]}),(0,r.jsx)(we.Z,{goal:o,weekData:s})]})}),o&&(0,r.jsx)("div",{className:Ge().goalContainer,children:(0,r.jsx)(De,{isQuranReader:!1,goal:o,currentActivityDay:l,percent:c})})]})},Je=t(23266),We=t(75183),He=t(21938);function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var n=1;n{const{__scopeCollapsible:t,open:i,defaultOpen:o,disabled:l,onOpenChange:c,...u}=e,[p=!1,m]=(0,s.T)({prop:i,defaultProp:o,onChange:c});return(0,r.createElement)(g,{scope:t,disabled:l,contentId:(0,h.M)(),open:p,onOpenToggle:(0,r.useCallback)((()=>m((e=>!e))),[m])},(0,r.createElement)(d.WV.div,(0,a.Z)({"data-state":b(p),"data-disabled":l?"":void 0},u,{ref:n})))})),x="CollapsibleTrigger",j=(0,r.forwardRef)(((e,n)=>{const{__scopeCollapsible:t,...o}=e,s=_(x,t);return(0,r.createElement)(d.WV.button,(0,a.Z)({type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":b(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled},o,{ref:n,onClick:(0,i.M)(e.onClick,s.onOpenToggle)}))})),C="CollapsibleContent",k=(0,r.forwardRef)(((e,n)=>{const{forceMount:t,...i}=e,o=_(C,e.__scopeCollapsible);return(0,r.createElement)(u.z,{present:t||o.open},(({present:e})=>(0,r.createElement)(y,(0,a.Z)({},i,{ref:n,present:e}))))})),y=(0,r.forwardRef)(((e,n)=>{const{__scopeCollapsible:t,present:i,children:o,...s}=e,u=_(C,t),[h,p]=(0,r.useState)(i),m=(0,r.useRef)(null),f=(0,c.e)(n,m),g=(0,r.useRef)(0),v=g.current,x=(0,r.useRef)(0),j=x.current,k=u.open||h,y=(0,r.useRef)(k),Z=(0,r.useRef)();return(0,r.useEffect)((()=>{const e=requestAnimationFrame((()=>y.current=!1));return()=>cancelAnimationFrame(e)}),[]),(0,l.b)((()=>{const e=m.current;if(e){Z.current=Z.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const n=e.getBoundingClientRect();g.current=n.height,x.current=n.width,y.current||(e.style.transitionDuration=Z.current.transitionDuration,e.style.animationName=Z.current.animationName),p(i)}}),[u.open,i]),(0,r.createElement)(d.WV.div,(0,a.Z)({"data-state":b(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!k},s,{ref:f,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...e.style}}),k&&o)}));function b(e){return e?"open":"closed"}const Z=v,N=j}},function(e){e.O(0,[15240,87373,47995,81301,3732,49774,92888,40179],(function(){return n=48312,e(e.s=n);var n}));var n=e.O();_N_E=n}]); //# sourceMappingURL=index-49e4a9603604cfd0.js.map