1/* ANPG DEVTEAM - 29/09/2026, 14:34:20 */ 2import{j as e}from"./data-vendor-BRYI0K8G.js";import{r as n}from"./react-vendor-Bj9LQV-u.js";import{P as O}from"./PageLayout-nUtosKtI.js";import{u as z,V,a8 as r}from"./index-B5fS5HUA.js";import{u as Y}from"./useSeismicSurveys-BCh9xxqT.js";import{b}from"./types-CBNnjFaH.js";import{C}from"./checkbox-DYxG2L1i.js";import{S as D}from"./slider-BjX6YdR8.js";import{L as p}from"./leaflet-B27fbHfC.js";import{u as I}from"./i18n-vendor-BSIZ7LIS.js";import{F as H}from"./filter-zNpgdXs1.js";import"./PageBreadcrumb-D2posgoP.js";import"./motion-vendor-DMc3mo8t.js";import"./house-B0n5Y9eN.js";import"./star-BMTUmwlW.js";import"./circle-check-BAB09i3P.js";import"./charts-vendor-Cs07Jtv5.js";import"./index-D6PzSG9l.js";import"./index-BdQq_4o_.js";import"./index-BatE7gkT.js";function pe({type:s}){var B;const{t:j}=I(),{data:m}=z(`exploration-seismic-${s}`),{byType:P}=Y(),y=(B=m==null?void 0:m.find(t=>t.section_key==="intro"))==null?void 0:B.content,N=n.useRef(null),u=n.useRef(null),w=n.useRef([]),i=P[s]||[],g=n.useMemo(()=>[...new Set(i.map(t=>t.basin))],[i]),h=n.useMemo(()=>{const t=i.map(a=>a.year);return t.length===0?[1968,new Date().getFullYear()]:[Math.min(...t),Math.max(...t)]},[i]),[v,S]=n.useState(new Set(g)),[x,k]=n.useState(h),[f,$]=n.useState(new Set(["proprietary","multiclient"]));n.useEffect(()=>{S(new Set(g)),k(h),$(new Set(["proprietary","multiclient"]))},[s,i.length]);const d=n.useMemo(()=>i.filter(t=>v.has(t.basin)&&t.year>=x[0]&&t.year<=x[1]&&f.has(t.category)),[i,v,x,f]),M=`pages.exploration.seismic${s}`,R=`pages.exploration.seismic${s}Subtitle`,E=`exploration-seismic-${s}`;n.useEffect(()=>{if(!N.current||u.current)return;const t=p.map(N.current).setView([-9,11.5],5);u.current=t,p.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(t);const a=new p.Control({position:"bottomright"});return a.onAdd=()=>{const o=p.DomUtil.create("div","leaflet-legend");o.style.cssText="background:white;padding:10px 14px;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.15);font-size:13px;line-height:1.8;";let l='<strong style="margin-bottom:4px;display:block">Bacias</strong>';return l+=g.map(c=>`<span style="display:flex;align-items:center;gap:6px"><span style="width:14px;height:14px;border-radius:3px;background:${b[c]||"#8e44ad"};display:inline-block"></span>${c}</span>`).join(""),s==="2d"&&(l+='<hr style="margin:6px 0;border-color:#eee"/>',l+='<strong style="margin-bottom:4px;display:block">Categoria</strong>',l+='<span style="display:flex;align-items:center;gap:6px"><span style="width:20px;border-top:3px solid #666;display:inline-block"></span>Proprietária</span>',l+='<span style="display:flex;align-items:center;gap:6px"><span style="width:20px;border-top:3px dashed #666;display:inline-block"></span>Multicliente</span>'),o.innerHTML=l,o},a.addTo(t),()=>{t.remove(),u.current=null}},[s,g.length]),n.useEffect(()=>{const t=u.current;t&&(w.current.forEach(a=>t.removeLayer(a)),w.current=[],d.forEach(a=>{const o=b[a.basin]||"#8e44ad",l=a.coordinates;let c;if(s==="2d"){const K=a.category==="multiclient"?"8 6":void 0;c=p.polyline(l,{color:o,weight:3,opacity:.8,dashArray:K}).addTo(t)}else c=p.polygon(l,{color:o,fillColor:o,fillOpacity:.2,weight:2}).addTo(t);c.bindPopup(U(a)),w.current.push(c)}))},[d,s]);const A=t=>{S(a=>{const o=new Set(a);return o.has(t)?o.delete(t):o.add(t),o})},L=t=>{$(a=>{const o=new Set(a);return o.has(t)?o.delete(t):o.add(t),o})},F=d.reduce((t,a)=>t+a.coverage,0),T=s==="2d"?"km":"km²";return e.jsx(O,{pageKey:E,titleKey:M,subtitleKey:R,icon:e.jsx(V,{className:"w-8 h-8 text-primary"}),breadcrumbs:[{labelKey:"nav.exploration",href:"/exploracao"},{labelKey:M}],children:e.jsxs("div",{className:"space-y-8",children:[y?e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground",children:e.jsx(r,{text:y.title})}),e.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed",children:e.jsx(r,{text:y.body})})]}):e.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed",children:e.jsx(r,{text:j(`pages.exploration.seismic${s}Content`)})}),e.jsxs("div",{className:"p-4 rounded-xl border border-border bg-secondary/30 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-foreground font-semibold",children:[e.jsx(H,{className:"w-4 h-4"}),e.jsx(r,{text:"Filtros"})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e.jsx(r,{text:"Bacias"})}),e.jsx("div",{className:"flex flex-wrap gap-3",children:g.map(t=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(C,{checked:v.has(t),onCheckedChange:()=>A(t)}),e.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-foreground",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block",style:{backgroundColor:b[t]||"#8e44ad"}}),t]})]},t))})]}),s==="2d"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e.jsx(r,{text:"Categoria"})}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(C,{checked:f.has("proprietary"),onCheckedChange:()=>L("proprietary")}),e.jsx("span",{className:"text-sm text-foreground",children:e.jsx(r,{text:"Proprietária"})})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(C,{checked:f.has("multiclient"),onCheckedChange:()=>L("multiclient")}
2),e.jsx("span",{className:"text-sm text-foreground",children:e.jsx(r,{text:"Multicliente"})})]})]})]}),e.jsxs("div",{className:"space-y-2 min-w-[220px] flex-1 max-w-sm",children:[e.jsxs("p",{className:"text-sm font-medium text-muted-foreground",children:[e.jsx(r,{text:"Intervalo de Anos"}),": ",x[0]," â ",x[1]]}),e.jsx(D,{min:h[0],max:h[1],step:1,value:x,onValueChange:t=>k(t),className:"py-2"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:e.jsx(r,{text:`A mostrar ${d.length} de ${i.length} levantamentos`})})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"p-4 rounded-xl bg-secondary/50 border border-border text-center",children:[e.jsx("p",{className:"text-3xl font-bold text-primary",children:d.length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:e.jsx(r,{text:"Levantamentos"})})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-secondary/50 border border-border text-center",children:[e.jsx("p",{className:"text-3xl font-bold text-primary",children:F.toLocaleString()}),e.jsx("p",{className:"text-sm text-muted-foreground",children:e.jsx(r,{text:`Cobertura Total (${T})`})})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-secondary/50 border border-border text-center",children:[e.jsx("p",{className:"text-3xl font-bold text-primary",children:[...new Set(d.map(t=>t.basin))].length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:e.jsx(r,{text:"Bacias Cobertas"})})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-secondary/50 border border-border text-center",children:[e.jsx("p",{className:"text-3xl font-bold text-primary",children:[...new Set(d.map(t=>t.operator))].length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:e.jsx(r,{text:"Operadores"})})]})]}),e.jsx("div",{ref:N,className:"w-full h-[500px] lg:h-[600px] rounded-2xl border border-border overflow-hidden shadow-lg"}),e.jsx("div",{className:"overflow-x-auto rounded-xl border border-border",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-secondary/70",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left p-3 font-semibold text-foreground",children:e.jsx(r,{text:"Levantamento"})}),e.jsx("th",{className:"text-left p-3 font-semibold text-foreground",children:e.jsx(r,{text:"Ano"})}),e.jsx("th",{className:"text-left p-3 font-semibold text-foreground",children:e.jsx(r,{text:"Bacia"})}),e.jsx("th",{className:"text-left p-3 font-semibold text-foreground",children:e.jsx(r,{text:"Operador"})}),s==="2d"&&e.jsx("th",{className:"text-left p-3 font-semibold text-foreground",children:e.jsx(r,{text:"Categoria"})}),e.jsx("th",{className:"text-right p-3 font-semibold text-foreground",children:e.jsx(r,{text:`Cobertura (${T})`})})]})}),e.jsx("tbody",{children:d.map((t,a)=>e.jsxs("tr",{className:a%2===0?"bg-background":"bg-secondary/30",children:[e.jsx("td",{className:"p-3 text-foreground font-medium",children:t.name}),e.jsx("td",{className:"p-3 text-muted-foreground",children:t.year}),e.jsx("td",{className:"p-3",children:e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block",style:{backgroundColor:b[t.basin]||"#8e44ad"}}),e.jsx("span",{className:"text-muted-foreground",children:t.basin})]})}),e.jsx("td",{className:"p-3 text-muted-foreground",children:t.operator}),s==="2d"&&e.jsx("td",{className:"p-3",children:e.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium ${t.category==="proprietary"?"bg-primary/10 text-primary":"bg-accent/50 text-accent-foreground"}`,children:e.jsx(r,{text:t.category==="proprietary"?"Proprietária":"Multicliente"})})}),e.jsx("td",{className:"p-3 text-right text-muted-foreground",children:t.coverage.toLocaleString()})]},t.id))})]})})]})})}function U(s){const j=s.type==="2d"?"km":"km²",m=s.category==="proprietary"?"Proprietária":"Multicliente";return`
3 <div style="min-width:200px"> 4 <strong style="font-size:14px">${s.name}</strong><br/> 5 <span style="color:#666">Ano: ${s.year}</span><br/> 6 <span style="color:#666">Bacia: ${s.basin}</span><br/> 7 <span style="color:#666">Operador: ${s.operator}</span><br/> 8 <span style="color:#666">Categoria: ${m}</span><br/> 9 <span style="color:#666">Cobertura: ${s.coverage.toLocaleString()} ${j}</span> 10 </div> 11 `}export{pe 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.