PageSourceSearch

https://damsdelhi.com/assets/Dailycaseview-BgLO20-R.js

js damsdelhi.com collected 2026-09-25 18:34:04 UTC 7,277 bytes, 1 lines download raw bytes

1import{i as I,j as L,P as T,s as b,a as $}from"./vendor-antd-CjcCcqh_.js";import{a as r,j as e}from"./vendor-react-CIe7BBPp.js";import{a as z,A as G}from"./index-B3dWxf7F.js";import{H as R}from"./vendor-html-react-parser-Dcl9rRqP.js";import{p as D}from"./vendor-dompurify-D6gMnemd.js";import{b as O,L as H}from"./vendor-router-MF_ECADz.js";import{I as l}from"./images-DsoEKV9h.js";import{f as M,g as U}from"./vendor-react-icons-BjOknaQJ.js";import{e as F}from"./encryptUrl-CWQFhC03.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-helpers-Bu0hh0lh.js";import"./vendor-react-dom-t5F7FhZR.js";import"./vendor-resize-observer-polyfill-pFR5zza0.js";import"./vendor-stylis-BmaM3nay.js";import"./vendor-scroll-into-view-if-needed-D5b_oRbX.js";import"./vendor-compute-scroll-into-view-Bl8rNFhg.js";import"./vendor-throttle-debounce-CUWDS_la.js";import"./vendor-json2mq-CN42t7xi.js";import"./vendor-string-convert-Bhuo--sE.js";import"./vendor-copy-to-clipboard-DxQUb0mb.js";import"./vendor-toggle-selection-DGa8lynz.js";import"./vendor-prop-types-DNxwfY3H.js";import"./vendor-react-toastify-DyH3b-7G.js";import"./vendor-axios-D2K41pGA.js";import"./vendor-js-cookie-Cz0CWeBA.js";import"./vendor-redux-LH1zpDpA.js";import"./vendor-use-sync-external-store-f1cvjnMh.js";import"./vendor-immer-Bp5DpiZ6.js";import"./vendor-redux-thunk-ClJT1hhx.js";import"./vendor-react-helmet-async-CO3viEpT.js";import"./vendor-react-fast-compare-Dxl0Zvcn.js";import"./vendor-invariant-CCbxWKZF.js";import"./vendor-shallowequal-Ck_j7EqP.js";import"./vendor-remix-run-router-D1FRce34.js";import"./vendor-html-dom-parser-DdHdr2aO.js";import"./vendor-domhandler-BE4pIkau.js";import"./vendor-domelementtype-CqltyNbl.js";import"./vendor-react-property-DkBHvQjb.js";import"./vendor-crypto-js-B5jrpidJ.js";import"./cryptoConfig-DuU3nrp7.js";const p=10,Ie=()=>{const j=O(),_=sessionStorage.getItem("id")||"4",[x,c]=r.useState([]),[m,v]=r.useState(1),[N,g]=r.useState(!1),[y,d]=r.useState(0),f=t=>t.toLowerCase().replaceAll(/[^a-z0-9\s-]/g,"").trim().replaceAll(/\s+/g,"-"),w=async t=>{const a=F(t.id),s=`${globalThis.location.origin}/daily_case/${a}`;try{await navigator.clipboard.writeText(s),b.open({message:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(U,{}),"Link copied to clipboard!"]}),duration:2,placement:"bottom"})}catch(n){globalThis.__APP_LOGGER__.log("Clipboard API failed:",n),b.open({message:"Copy failed",description:e.jsxs("span",{children:["Copy manually:"," ",e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:s})]}),duration:4,placement:"bottom"})}},C=async t=>{var a,s,n,h,u;g(!0);try{const i=await z.post(G.COURSEACESS_HOMEPAGE.DAILY_CASES_ALL,{user_id:_,page:t-1,page_size:p}),k=((s=(a=i.data)==null?void 0:a.data)==null?void 0:s.data)||[],A=(((h=(n=i.data)==null?void 0:n.data)==null?void 0:h.total_page)||0)*p;((u=i.data)==null?void 0:u.status)===!0?(c(k),d(A)):(c([]),d(0))}catch(i){globalThis.__APP_LOGGER__.log("Failed to load daily cases",i),c([]),d(0)}finally{g(!1)}};r.useEffect(()=>{C(m)},[m]);const S=t=>{v(t)},P=t=>{const a=f(t.title||"case");j(`/dailycaseread/${a}`,{state:{id:t.id}})},E=(t,a=100)=>{const s=D.sanitize(t,{ALLOWED_TAGS:[]});return s.length<=a?t:s.slice(0,a)+"..."};r.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]);let o;return N?o=e.jsx("div",{className:"text-center! mt-5!",children:e.jsx($,{})}):x.length===0?o=e.jsx("div",{className:"text-center! mt-5!",children:e.jsx("p",{children:"No daily cases available."})}):o=e.jsxs("div",{children:[e.jsx(I,{gutter:[16,16],children:x.map(t=>e.jsx(L,{xs:24,sm:12,md:12,lg:12,xl:8,children:e.jsxs("div",{className:"grid! grid-cols-[repeat(auto-fill,minmax(300px,1fr))]! gap-7.5! justify-center! relative!",children:[e.jsx(H,{to:`/dailycaseread/${f(t.title||"case")}`,state:{id:t.id},className:"absolute! inset-0! z-2! rounded-[inherit]! no-underline! font-normal! cursor-pointer!","aria-label":`Open ${t.title||"daily case"}`}),e.jsxs("div",{className:"bg-white! p-3.75! rounded-[20px]! flex! flex-col! shadow-[0_4px_12px_rgba(0,0,0,0.05)]!",children:[e.jsxs("div",{className:"flex! gap-5!",children:[e.jsx("div",{children:e.jsx("img",{className:"max-w-22.5! min-h-22.5! h-22.5! rounded-xl!",src:t.image_video||`${l}/dams-icon/logo.webp`,alt:t.title||"case",onError:a=>{a.target.src=`${l}/dams-icon/logo.webp`}})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base! text-[#212121]! font-medium! mb-2! mt-0! max-[767px]:mb-1!",children:t.title||"Untitled"}),e.jsx("div",{className:" text-[#424242]! text-sm! leading-5.25! max-[767px]:text-xs!",children:R(E(t.description||""))})]})]}),e.jsxs("div",{className:"flex! items-center! justify-between! mt-3!",children:[e.jsxs("div",{className:"flex! gap-2.5! items-center!",children:[e.jsxs("p",{className:"flex! items-center! gap-1! m-0! text-xs! text-[#757575]! leading-normal! font-normal!",children:[e.jsx("img",{src:`${l}/emdpublic/dailycases/likes.svg`,alt:"likes",className:"w-3! max-w-full! filter-[brightness(0)_saturate(100%)_invert(39%)_sepia(97%)_saturate(4256%)_hue-rotate(200deg)_brightness(101%)_contrast(108%)]"})," ",t.likes||0]}),e.jsxs("p",{className:"flex! items-center! gap-1! m-0! text-xs! text-[#757575]! leading-normal! font-normal!",children:[e.jsx("img",{className:"w-3 max-w-full block filter-[brightness(0)_saturate(100%)_invert(9%)_sepia(10%)_saturate(11%)_hue-rotate(346deg)_brightness(95%)_contrast(89%)]",src:`${l}/emdpublic/dailycases/view.svg`,alt:"views"})," ",t.views||0]}),e.jsx("img",{className:"w-3! max-w-full! block!",src:`${l}/emdpublic/dailycases/comment.svg`,alt:"comments"})," ",e.jsxs("p",{className:"flex! items-center! gap-1! m-0! text-xs! text-[#757575]! leading-normal! font-normal!",children:[t.total_comment||0," comments"]}),e.jsxs("button",{type:"button",className:"relative! z-3! flex! items-center! gap-0.75! bg-transparent! border-0! cursor-pointer! text-[#007aff]! text-[13px]! font-medium! p-0!",onClick:a=>{a.stopPropagation(),w(t)},"aria-label":"Share this case",children:[e.jsx(M,{size:16,className:"inline-block! text-[13px]!"}),e.jsx("span",{children:"Share"})]})]}),e.jsx("button",{className:"relative! z-3! cursor-pointer! appearance-button!",type:"button",onClick:a=>{a.stopPropagation(),P(t)},children:e.jsx("span",{className:"text-[13px]! cursor-pointer!",children:"Read More "})})]})]})]})},t.id))}),e.jsx("div",{className:"text-center py-10!",children:e.jsx(T,{current:m,pageSize:p,total:y,onChange:S,showSizeChanger:!1,showQuickJumper:!0,responsive:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"page-content position-relative mt-18!",children:e.jsx("div",{className:"breadcrumb-row bg-[#fafafa] border-0! p-0 m-0 border-b! border-[#fafafa]!",children:e.jsx("div",{className:"tw-container",children:e.jsxs("ul",{className:"mb-0! flex items-center",children:[e.jsx("li",{className:"mr-1.25! py-1 text-black inline-block text-sm font-normal",children:e.jsx("a",{href:"/",className:"text-[#212121] no-u
1nderline! font-normal",children:"Home"})}),e.jsx("li",{className:"mr-1.25 py-1 text-black inline-block text-sm font-normal",children:"View Daily Cases"})]})})})}),e.jsx("section",{className:"bg-[#fafafa] pt-10! pb-0!",children:e.jsx("div",{className:"tw-container",children:o})})]})};export{Ie as default};

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.