1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67780],{11237:(e,t,a)=>{a.d(t,{PWAInstallPrompt:()=>d});var s=a(95155),l=a(12115),i=a(89239),r=a(6962),n=a(33210);function d(){let[e,t]=(0,l.useState)(null),[a,d]=(0,l.useState)(!1),[c,m]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(window.matchMedia("(display-mode: standalone)").matches)return void m(!0);let e=localStorage.getItem("pwa-install-dismissed"),a=e?new Date(e):null,s=new Date;if(a&&s.getTime()-a.getTime()<6048e5)return;let l=e=>{e.preventDefault(),t(e),setTimeout(()=>{d(!0)},3e3)};return window.addEventListener("beforeinstallprompt",l),window.addEventListener("appinstalled",()=>{m(!0),d(!1),t(null)}),()=>{window.removeEventListener("beforeinstallprompt",l)}},[]);let o=async()=>{if(!e)return;e.prompt();let{outcome:a}=await e.userChoice;"accepted"===a?console.log("â
PWA instalado com sucesso"):console.log("â Instala\xe7\xe3o do PWA recusada"),t(null),d(!1)},u=()=>{d(!1),localStorage.setItem("pwa-install-dismissed",new Date().toISOString())};return!c&&a&&e?(0,s.jsx)("div",{className:"fixed bottom-4 right-4 z-50 w-[min(20rem,calc(100vw-2rem))] animate-in slide-in-from-bottom-5",children:(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-card p-4 shadow-2xl",children:[(0,s.jsxs)("div",{className:"mb-3 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"rounded-lg bg-primary/10 p-2",children:(0,s.jsx)(r.A,{className:"h-5 w-5 text-primary"})}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-card-foreground",children:"Instalar Brasil Mineral"})]}),(0,s.jsx)("button",{onClick:u,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground","aria-label":"Dispensar",children:(0,s.jsx)(n.A,{className:"h-4 w-4"})})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(i.$,{onClick:o,className:"h-9 flex-1 text-sm",children:[(0,s.jsx)(r.A,{className:"mr-2 h-4 w-4"}),"Instalar"]}),(0,s.jsx)(i.$,{onClick:u,variant:"outline",className:"h-9 text-sm",children:"Agora n\xe3o"})]})]})}):null}},63123:(e,t,a)=>{a.d(t,{BlockFeed:()=>o});var s=a(95155),l=a(12115),i=a(66088);let r={manchete:{min:1,max:3,label:"Manchete (lead + 2 apoios)"},"destaque-rail":{min:3,max:6,label:"Destaque + rail de lista"},tres:{min:3,max:3,label:"3 cards iguais"},quatro:{min:4,max:4,label:"4 cards iguais"},"faixa-dupla":{min:2,max:2,label:"2 horizontais lado a lado"},"lista-tema":{min:4,max:8,label:"Lista tem\xe1tica (2 colunas)"},ad:{min:0,max:0,label:"Publicidade"}};Object.keys(r);var n=a(98647);function d({title:e}){return(0,s.jsx)("div",{className:"mb-4 flex items-baseline gap-3 border-b-2 border-[#4f0000]/15 pb-2",children:(0,s.jsx)("h2",{className:"text-lg font-bold uppercase tracking-wide md:text-xl",style:{color:"#4f0000"},children:e})})}function c({size:e}){let t="retangulo"===e;return(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[(0,s.jsx)("span",{className:"mb-1 text-[10px] uppercase tracking-widest text-neutral-400",children:"Publicidade"}),(0,s.jsx)("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-neutral-300 bg-neutral-50 text-[11px] text-neutral-400",style:t?{width:336,height:280,maxWidth:"100%"}:{width:"100%",maxWidth:970,height:90},children:t?"an\xfancio 336\xd7280":"an\xfancio 970\xd790"})]})}function m({articles:e}){let[t,a]=(0,l.useState)(!1);if(!e.length)return null;let r=t?e.slice(0,24):e.slice(0,6),c=e.length>6;return(0,s.jsxs)("section",{children:[(0,s.jsx)(d,{title:"\xdaltimas Not\xedcias"}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-x-8 gap-y-4 sm:grid-cols-2 lg:grid-cols-3",children:r.map(e=>(0,s.jsx)("div",{className:"border-b border-black/5 pb-4",children:(0,s.jsx)(n.CompactItem,{article:e})},e.id))}),c&&(0,s.jsx)("div",{className:"mt-4 flex justify-center",children:(0,s.jsxs)("button",{type:"button",onClick:()=>a(e=>!e),className:"inline-flex items-center gap-1.5 rounded-full border border-[#4f0000]/25 px-4 py-1.5 text-[12px] font-semibold text-[#4f0000] transition-colors hover:bg-[rgba(79,0,0,0.05)]",children:[t?"Ver menos":`Ver mais recentes (${e.length-6})`,(0,s.jsx)(i.A,{className:`h-3.5 w-3.5 transition-transform ${t?"rotate-180":""}`})]})})]})}function o({articles:e,layout:t}){let a=(0,l.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),i=(0,l.useMemo)(()=>{let a,s,l;return t&&t.blocks.length?t:(a=[...e].sort((e,t)=>
1{let a=e.publishedAt instanceof Date?e.publishedAt.getTime():Date.parse(String(e.publishedAt||""))||0;return(t.publishedAt instanceof Date?t.publishedAt.getTime():Date.parse(String(t.publishedAt||""))||0)-a}),s=e=>a.splice(0,e).map(e=>({articleId:e.id})),l=[],a.length&&l.push({kind:"manchete",items:s(3)}),l.push({kind:"ad",items:[],adSize:"leaderboard"}),a.length>=3&&l.push({kind:"tres",title:"Em alta",items:s(3)}),a.length>=3&&l.push({kind:"destaque-rail",title:"Mercado & Mineradoras",items:s(5)}),a.length>=4&&l.push({kind:"lista-tema",title:"Mais not\xedcias",items:s(8)}),{version:2,raciocinio:void 0,blocks:l})},[t,e]),u=(0,l.useMemo)(()=>{let e=new Set;for(let t of i.blocks)for(let a of t.items)e.add(a.articleId);return e},[i]),h=(0,l.useMemo)(()=>[...e].filter(e=>!u.has(e.id)).sort((e,t)=>{let a=e.publishedAt instanceof Date?e.publishedAt.getTime():Date.parse(String(e.publishedAt||""))||0;return(t.publishedAt instanceof Date?t.publishedAt.getTime():Date.parse(String(t.publishedAt||""))||0)-a}),[e,u]);return e.length?(0,s.jsxs)("div",{id:"home-lab-feed",className:"flex flex-col gap-12",children:[i.blocks.map((e,t)=>{if("ad"===e.kind)return(0,s.jsx)(c,{size:e.adSize},`ad-${t}`);let l=e.items.map(e=>({article:a.get(e.articleId),teaser:e.teaser})).filter(e=>!!e.article).map(e=>({article:e.article,teaser:e.teaser}));if(l.length<r[e.kind].min)return null;let i=function(e,t){switch(e){case"manchete":{let[e,...a]=t;if(!e)return null;if(!a.length)return(0,s.jsx)(n.LeadOverlay,{...e});return(0,s.jsxs)("div",{className:"grid grid-cols-1 items-stretch gap-5 md:grid-cols-12",children:[(0,s.jsx)("div",{className:"md:col-span-8",children:(0,s.jsx)(n.LeadOverlay,{...e})}),(0,s.jsx)("div",{className:"flex flex-col gap-5 md:col-span-4",children:a.slice(0,2).map(e=>(0,s.jsx)(n.PostCard,{...e,compact:!0},e.article.id))})]})}case"destaque-rail":{let[e,...a]=t;if(!e)return null;return(0,s.jsxs)("div",{className:"grid grid-cols-1 items-stretch gap-5 md:grid-cols-12",children:[(0,s.jsx)("div",{className:"md:col-span-8",children:(0,s.jsx)(n.LeadHorizontal,{...e})}),(0,s.jsx)("div",{className:"md:col-span-4",children:(0,s.jsx)("div",{className:"flex h-full flex-col justify-between gap-3 divide-y divide-black/5 rounded-xl border border-black/5 bg-white p-4",children:a.slice(0,5).map(e=>(0,s.jsx)("div",{className:"pt-3 first:pt-0",children:(0,s.jsx)(n.CompactItem,{...e})},e.article.id))})})]})}case"tres":return(0,s.jsx)("div",{className:"grid grid-cols-1 items-stretch gap-5 sm:grid-cols-2 md:grid-cols-3",children:t.slice(0,3).map(e=>(0,s.jsx)(n.PostCard,{...e},e.article.id))});case"quatro":return(0,s.jsx)("div",{className:"grid grid-cols-2 items-stretch gap-5 md:grid-cols-4",children:t.slice(0,4).map(e=>(0,s.jsx)(n.PostCard,{...e,compact:!0},e.article.id))});case"faixa-dupla":return(0,s.jsx)("div",{className:"grid grid-cols-1 items-stretch gap-5 md:grid-cols-2",children:t.slice(0,2).map(e=>(0,s.jsx)(n.LeadHorizontal,{...e},e.article.id))});case"lista-tema":return(0,s.jsx)("div",{className:"grid grid-cols-1 gap-x-8 gap-y-4 sm:grid-cols-2",children:t.slice(0,8).map(e=>(0,s.jsx)("div",{className:"border-b border-black/5 pb-4",children:(0,s.jsx)(n.CompactItem,{...e})},e.article.id))});default:return null}}(e.kind,l);return i?(0,s.jsxs)("section",{children:[e.title?(0,s.jsx)(d,{title:e.title}):null,i]},`b-${t}`):null}),(0,s.jsx)(m,{articles:h})]}):(0,s.jsx)("p",{className:"py-10 text-center text-neutral-500",children:"Sem not\xedcias no momento."})}},78622:(e,t,a)=>{function s(e){let t=Math.max(0,Math.floor(e)),a=Math.floor(t/3600),s=Math.floor(t%3600/60),l=String(t%60).padStart(2,"0");return a>0?`${a}:${String(s).padStart(2,"0")}:${l}`:`${s}:${l}`}function l(e,t){let a=-1;for(let s=0;s<e.length;s++)if(e[s].timestamp<=t+.5)a=s;else break;return a}function i(e){let t=new Set;return(e??[]).filter(e=>e&&"number"==typeof e.timestamp&&Number.isFinite(e.timestamp)&&e.timestamp>=0&&"string"==typeof e.title&&e.title.trim()).map(e=>({...e,title:e.title.trim(),timestamp:Math.floor(e.timestamp),timeFormatted:s(e.timestamp)})).sort((e,t)=>e.timestamp-t.timestamp).filter(e=>!t.has(e.timestamp)&&(t.add(e.timestamp),!0))}a.d(t,{LJ:()=>l,W_:()=>s,Y$:()=>i,oe:()=>d,yT:()=>n});let r=/^[A-Za-z0-9_-]{11}$/;function n(e){let t;if(!e)return null;let a=e.trim();if(r.test(a))return a;try{t=new URL(a.startsWith("http")?a:`https://${a}`)}catch{return null}let s=t.hostname.replace(/^www\.|^m\./,""),l=null;return"youtu.be"===s?l=t.pathname.split("/")[1]??null:("youtube.com"===s||"youtube-nocookie.com"===s||"music.youtube.com"===s)&&(l=t.searchParams.get("v")??t.pathname.match(/^\/(?:embed|shorts|live|v)\/([^/?#]+)/)?.[1]??null),l&&r.test(l)?l:null}function d(e){if(e)try{let t=new URL(e.startsWith("http")?e:`https://${e}`),a=t.searchParams.get("t")??t.searchParams.get("start")??t.hash.match(/t=([^&]+)/)?.[1]??null,s=a?function(e){let t=e.trim();if(/^\d+(\.\d+)?$/.test(t))return Math.floor(Number(t));let a=t.match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/i);if(a&&(a[1]||a[2]||a[3]))return 3600*Number(a[1]??0)+60*Number(a[2]??0)+Number(a[3]??0);let s=t.match(/^(?:(\d+):)?(\d{1,2}):(\d{2})$/);return s?3600*Number(s[1]??0)+60*Number(s[2])+Number(s[3]):null}(a):null;return s&&s>0?s:void 0}catch{return}}}}]);
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.