PageSourceSearch

https://policedata.org/static/js/25.cea0700f.chunk.js

js policedata.org collected 2026-09-28 11:16:46 UTC 14,481 bytes, 2 lines download raw bytes

1(this["webpackJsonppolice-data-website"]=this["webpackJsonppolice-data-website"]||[]).push([[25,44],{110:function(e,t,i){"use strict";var n=i(1);const a={root:null,rootMargin:"0px 0px 0px 0px",threshold:0};t.a=e=>{const[t,i]=Object(n.useState)(!1);return Object(n.useEffect)((()=>{if(e.current){new IntersectionObserver(((t,n)=>{t.forEach((t=>{t.isIntersecting&&(i(!0),n.unobserve(e.current))}))}),a).observe(e.current)}}),[e]),t}},230:function(e,t,i){"use strict";i.r(t);var n=i(14),a=i(97),c=i(110),l=i(89),s=i(23),o=i(87),r=i.n(o),d=i(61),u=i(223),p=i(1),b=i(99),j=i(257),m=i(4),h=i(222),f=i(128),O=i(21);const v=Object(p.lazy)((()=>Object(s.m)((()=>Promise.all([i.e(2),i.e(16)]).then(i.bind(null,189)))))),P=Object(p.lazy)((()=>Object(s.m)((()=>i.e(8).then(i.bind(null,91)))))),S=Object(p.lazy)((()=>Object(s.m)((()=>Promise.all([i.e(1),i.e(9)]).then(i.bind(null,179)))))),g=Object(p.lazy)((()=>Object(s.m)((()=>Promise.all([i.e(3),i.e(7)]).then(i.bind(null,186)))))),D=Object(p.lazy)((()=>Object(s.m)((()=>Promise.all([i.e(1),i.e(3),i.e(5),i.e(31)]).then(i.bind(null,200)))))),y=Object(p.lazy)((()=>Object(s.m)((()=>i.e(39).then(i.bind(null,139)))))),x=Object(p.lazy)((()=>Object(s.m)((()=>Promise.all([i.e(2),i.e(4),i.e(23)]).then(i.bind(null,140)))))),N=Object(p.lazy)((()=>Object(s.m)((()=>i.e(10).then(i.bind(null,201)))))),W=Object(p.lazy)((()=>Object(s.m)((()=>i.e(43).then(i.bind(null,193)))))),w=Object(p.lazy)((()=>Object(s.m)((()=>i.e(24).then(i.bind(null,129)))))),C=Object(p.lazy)((()=>Object(s.m)((()=>Promise.all([i.e(1),i.e(26)]).then(i.bind(null,157))))));function $(){var e,t,i,o,$,M,k;const{t:T}=Object(j.a)(),z=Object(m.g)(),E=Object(m.i)(),R=E.stateCode.toUpperCase()||"US",U=Object(l.a)(R),H=E.locationName||"statewide",B=(null===(e=E.statisticName)||void 0===e?void 0:e.replace(/-/g,"_"))||"uof";Object(p.useEffect)((()=>{R!==U&&z.replace(Object(l.e)(U,E.locationName,E.statisticName))}),[z,R,E.locationName,E.statisticName,U]);const[L,_]=Object(h.a)("mapStatistic",B);B&&B!==L&&_(B);const[I,A]=Object(p.useState)(!1),[F,J]=Object(p.useState)({stateCode:U,departmentName:null}),[V,Y]=Object(p.useState)(!1),{data:q,error:Z}=Object(f.a)("".concat(n.a,"/timeseries-").concat(U,".min.json"),s.b,{revalidateOnMount:!0});Object(p.useEffect)((()=>{var e;if(F.stateCode!==U&&(J({stateCode:U,departmentName:null}),A(!1)),"statewide"===H&&F.departmentName)J({stateCode:U,departmentName:null});else if("statewide"!==H&&U&&q&&null!==(e=q[U])&&void 0!==e&&e.departments){const e=Object(l.c)(q[U].departments,H);e?(J({stateCode:U,departmentName:e}),A(!1)):F.departmentName&&J({stateCode:U,departmentName:null})}}),[F.departmentName,F.stateCode,U,H,q]);const{data:G}=Object(f.a)("".concat(n.a,"/data.min.json"),s.b,{revalidateOnMount:!0}),K=null===G||void 0===G?void 0:G[U],Q=Object(p.useMemo)((()=>{if(!K)return;const e=window.innerWidth>=540?3:2,t=null!==K&&void 0!==K&&K.departments?Object.keys(K.departments).filter((e=>"Unknown"!==e)).length:0;return Math.ceil(t/e)}),[K]),X=Object(p.useRef)(),ee=Object(c.a)(X),te=Object(p.useMemo)((()=>{const e=[];return[0,0,0,0].map(((t,i)=>(e.push({animationDelay:"".concat(250*i,"ms")}),null))),e}),[]),ie=I?window.innerWidth>=540?10:8:6,ne=Object(p.useMemo)((()=>{var e;const t=[null===K||void 0===K||null===(e=K.m)||void 0===e?void 0:e.date].filter((e=>e));return t.length>0?Object(d.a)(Object(u.a)(t.map((e=>Object(s.l)(e)))),{representation:"date"}):null}),[K]),ae=n.A.includes(L)?L:"uof",ce=Object(p.useMemo)((()=>{var e;return!!(null!==K&&void 0!==K&&K.departments&&null!==(e=K.departments)&&void 0!==e&&e[n.C]&&n.q.every((e=>Object(s.i)(K,"total",e)===Object(s.i)(K.departments[n.C],"total",e))))}),[K]),le=n.w[ae],se=(null===F||void 0===F?void 0:F.departmentName)&&F.departmentName!==n.C&&ce,oe=Object(s.j)({...K,dates:null===q||void 0===q||null===(t=q[U])||void 0===t?void 0:t.dates}),re=Object.keys((!ce||!le.hasPrimary)&&(null===K||void 0===K?void 0:K.departments)||{}),de=Object(p.useMemo)((()=>q&&q[U]?Object(l.c)(q[U].departments,H):null),[q,H,U]);Object(p.useEffect)((()=>{var e,t,i;const n=de&&(null===q||void 0===q||null===(e=q[U])||void 0===e||null===(t=e.departments)||void 0===t||null===(i=t[de])||void 0===i?void 0:i.slug);n&&n!==H&&z.replace(Object(l.e)(U,n,E.statisticName))}),[de,z,H,E.statisticName,U,q]);const[ue,pe]=Object(h.a)("isCompleteData",!1),[be,je]=Object(p.useState)(!1);return Object(p.useEffect)((()=>(je(!0),()=>{je(!1)})),[je]),Object(p.useEffect)((()=>(be&&(Object(a.b)("completeDataMap",(e=>pe(e.detail))),Object(a.b)("completeDataTable",(e=>pe(e.detail)))),()=>{Object(a.c)("completeDataMap"),Object(a.c)("completeDataTable")})),[pe,be]),Object(O.jsxs)(O.Fragment,{children:[Object(O.jsxs)(b.a,{children:[Object(O.jsxs)("title",{children:["Police Data | ",n.u[U]," - policedata.org"]}),Object(O.jsx)("meta",{name:"title",content:"Police Data in ".concat(n.u[U],": L
1atest Details")})]}),Object(O.jsxs)("div",{className:"State",children:[Object(O.jsxs)("div",{className:"state-left",children:[Object(O.jsx)(N,{data:K,stateCode:U,mapStatistic:L}),Object(O.jsxs)("div",{style:{position:"relative"},children:[Object(O.jsx)(y,{mapStatistic:L,setMapStatistic:_}),Object(O.jsx)(S,{data:K}),Object(O.jsx)(x,{timeseries:null===q||void 0===q||null===(i=q[U])||void 0===i?void 0:i.dates,stateCode:U,isCompleteData:ue,forceRender:!!Z})]}),Object(O.jsx)(g,{data:K,stateCode:U,isCompleteData:ue}),Object(O.jsxs)("div",{className:"header",children:[Object(O.jsx)("div",{style:{minHeight:"30px"}}),Object(O.jsx)(p.Suspense,{fallback:Object(O.jsx)("div",{}),children:Object(O.jsx)(w,{container:"page"})}),Object(O.jsx)("div",{style:{minHeight:"61px"}})]}),G&&Object(O.jsx)(p.Suspense,{fallback:Object(O.jsx)("div",{style:{minHeight:"50rem"}}),children:Object(O.jsx)(D,{stateCode:U,data:G,regionHighlighted:F,setRegionHighlighted:J,mapStatistic:L,setMapStatistic:_,lastDataDate:ne,delta7Mode:V,setDelta7Mode:Y,noRegionHighlightedDepartmentData:se,noDepartmentData:ce})}),Object(O.jsx)("span",{ref:X}),ee&&G&&Object(O.jsx)(p.Suspense,{fallback:Object(O.jsx)("div",{}),children:Object(O.jsx)(W,{stateCode:U,data:G,mapStatistic:L,isCompleteData:ue,forceRender:!!L,department:H,currentDepartment:de,mapStatistic:L,timeseries:null===q||void 0===q||null===(o=q[U])||void 0===o?void 0:o.dates})})]}),Object(O.jsx)("div",{className:"state-right",children:Object(O.jsxs)(O.Fragment,{children:[Object(O.jsxs)("div",{className:"department-bar",children:[Object(O.jsxs)("div",{className:r()("department-bar-top",{expanded:I}),children:[Object(O.jsxs)("div",{className:"department-bar-left",children:[Object(O.jsx)("h2",{className:r()(ae,"fadeInUp"),style:te[0],children:T("Data by Police Agency")}),Object(O.jsxs)("h3",{children:[n.w[B].displayName,Object(O.jsx)("br",{}),"Totals from ",oe.startYear,"-",oe.endYear]}),Object(O.jsx)("div",{className:"departments fadeInUp ".concat(I?"is-grid":""),style:I?{gridTemplateRows:"repeat(".concat(Q,", 2rem)"),...te[1]}:te[1],children:re.filter((e=>"Unknown"!==e)).sort(((e,t)=>((e,t)=>{const i=K.departments[e],n=K.departments[t];return Object(s.i)(n,"total",L)-Object(s.i)(i,"total",L)})(e,t))).slice(0,I?void 0:5).map((e=>{const t=K.departments[e],i=Object(s.i)(t,"total",ae),n=Object(s.i)(t,"d",ae);return Object(O.jsxs)("div",{className:"department",children:[Object(O.jsx)("h2",{children:Object(s.e)(i)}),Object(O.jsx)("h5",{children:Object(O.jsx)("a",{className:ae,href:Object(l.e)(U,t.slug,ae),children:T(e)})}),"ps"!==ae&&Object(O.jsx)("div",{className:"delta",children:Object(O.jsx)("h6",{className:ae,children:n>0?"\u2191"+Object(s.e)(n):""})})]},e)}))})]}),Object(O.jsx)("div",{className:"department-bar-right fadeInUp",style:te[2],children:Object(O.jsx)(v,{timeseries:de?null===q||void 0===q||null===($=q[U])||void 0===$||null===(M=$.departments[de])||void 0===M?void 0:M.dates:null===q||void 0===q||null===(k=q[U])||void 0===k?void 0:k.dates,statistic:ae,currentDepartment:de,stateCode:U,lookback:ie,forceRender:!!Z})})]}),Object(O.jsx)("div",{className:"department-bar-bottom",children:re.length>5?Object(O.jsx)("button",{className:"button fadeInUp ".concat(ae),onClick:()=>{A(!I)},style:te[3],children:Object(O.jsx)("span",{children:T(I?"View less":"View all Departments")})}):Object(O.jsx)("div",{style:{height:"3.75rem",flexBasis:"15%"}})})]}),Object(O.jsx)(p.Suspense,{fallback:Object(O.jsx)("div",{}),children:Object(O.jsx)(C,{stateCode:U,timeseries:q,regionHighlighted:F,setRegionHighlighted:J,noRegionHighlightedDepartmentData:se,forceRender:!!Z})})]})})]}),Object(O.jsx)(P,{})]})}t.default=Object(p.memo)($)},89:function(e,t,i){"use strict";i.d(t,"a",(function(){return c})),i.d(t,"e",(function(){return l})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return o})),i.d(t,"d",(function(){return j}));const n=function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith(" Metropolitan Police Department")?e.replace(/ Metropolitan Police Department$/," Police"):e.endsWith(" Department of Public Safety")?e.replace(/ Department of Public Safety$/," Police"):e.endsWith(" Township Police Department")?e.replace(/ Police Department$/," Police"):e.endsWith(" Sheriff's Department")?e.replace(/ Sheriff's Department$/," Sheriff"):e.endsWith(" Metropolitan Police")?e.replace(/ Metropolitan Police$/," Police"):e.endsWith(" Division of Police")?e.replace(/ Division of Police$/," Police"):e.endsWith(" Police Department")?e.replace(/ Police Department$/," Police"):e.endsWith(" Sheriff's Office")?e.replace(/ Sheriff's Office$/," Sheriff"):e.endsWith(" Dept Pub Safety")?e.replace(/ Dept Pub Safety$/," Police"):e.endsWith(" Police Division")?e.replace(/ Police Division$/," Police"):e.endsWith(" Township Police")?e:e.endsWith(" Police Bureau")?e.replace(/ Police Bureau$/," Police"):e.endsWith(" Public Safety")?e.replace(/ Public Safety$/," Police"):e.endsWith(" Township")?"".concat(e," Police"):e.endsWith(" DPS")?e.replace(/ DPS$/," Police"):e.endsWith(" Sheriff's Ofice")?e.replace(/ Sheriff's Ofice$/," Sheriff"):e},a=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/ County/,"");return e.endsWith(" Metropolitan Police Department")?e.replace(/ Metropolitan Police Department$/," Police"):e.endsWith(" Department of Public Safety")?e.replace(/ Department of Public Safety$/," Police"):e.endsWith(" Township Police Department")?e.replace(/ Township Police Department$/," Police"):e.endsWith(" Sheriff's Department")?e.replace(/ Sheriff's Department$/," Sheriff"):e.endsWith(" Metropolitan Police")?e.replace(/ Metropolitan Police$/," Police"):e.endsWith(" Division of Police")?e.replace(/ Division of Police$/," Police"):e.endsWith(" Police Department")?e.replace(/ Police Department$/," Police"):e.endsWith(" Sheriff's Office")?e.replace(/ Sheriff's Office$/," Sheriff"):e.endsWith(" Dept Pub Safety")?e.replace(/ Dept Pub Safety$/," Police"):e.endsWith(" Police Division")?e.replace(/ Police Division$/," Police"):e.endsWith(" Township Police")?e.replace(/ Township Police$/," Police"):e.endsWith(" Police Bureau")?e.replace(/ Police Bureau$/," Police"):e.endsWith(" Public Safety")?e.replace(/ Public Safety$/," Police"):e.endsWith(" Township")?e.replace(/ Township$/," Police"):e.endsWith(" DPS")?e.replace(/ DPS$/," Police"):e.endsWith(" Sheriff's Ofice")?e.replace(/ Sheriff's Ofice$/," Sheriff"):e},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"NB"===e.toUpperCase()?"NE":e.toUpperCase()},l=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const i=c(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"");if(!i)return null;let n="/report/".concat(i.toLowerCase());return e&&(n+="/".concat(e)),t&&(n+="/".concat(t)),n},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith(" Sheriff")&&!e.endsWith(" County Sheriff")?e.replace(/ Sheriff$/," County Sheriff"):e},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=Object.entries(e),n=r(i,(e=>{let[,i]=e;return(null===i||void 0===i?void 0:i.slug)===t}));return n.hasMatches?n.key:d(i,(e=>{var i;let[n,c]=e;const l=(null===c||void 0===c||null===(i=c.m)||void 0===i?void 0:i.name)||n;return function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase().replace(/[^A-Za-z ]+/g,"").replace(/ /g,"-")}(a(l))===t}))},r=(e,t)=>{const i=e.filter(t);return{hasMatches:i.length>0,key:1===i.length?i[0][0]:null}},d=(e,t)=>r(e,t).key,u=e=>{if(null===e||"undefined"===typeof e)return null;const t=String(e).trim();return t&&/^\d+$/.test(t)?t.replace(/^0+(?=\d)/,""):null},p=(e,t)=>{const i=u(e),n=u(t);return null!==i&&null!==n&&i===n},b=(e,t,i)=>r(e,(e=>{var n;let[a,c]=e;const l=(null===c||void 0===c||null===(n=c.m)||void 0===n?void 0:n.name)||a,s=new Set([a,l].map(i));return t.some((e=>s.has(i(e))))})),j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Object.entries(e),c=t.ori,l=t.city_fp,s=t.county_fp,o=t.type;if(c){const e=r(i,(e=>{var t;let[,i]=e;const n=(null===i||void 0===i||null===(t=i.m)||void 0===t?void 0:t.ori)||
1(null===i||void 0===i?void 0:i.roi);return n&&String(n).trim()===String(c).trim()}));if(e.hasMatches)return e.key}if(null!==l&&"undefined"!==typeof l){const e=r(i,(e=>{var t;let[,i]=e;return p(null===i||void 0===i?void 0:i.id,l)||p(null===i||void 0===i||null===(t=i.m)||void 0===t?void 0:t.fips_place_code,l)}));if(e.hasMatches)return e.key}if(null!==s&&"undefined"!==typeof s&&o){const e=r(i,(e=>{var t,i,n;let[,a]=e;return p(null===a||void 0===a||null===(t=a.m)||void 0===t?void 0:t.fips_county_code,s)&&(null===a||void 0===a||null===(i=a.ta)||void 0===i||null===(n=i.t)||void 0===n?void 0:n.toLowerCase())===String(o).toLowerCase()}));if(e.hasMatches)return e.key}const d=[t.department,t.name].filter(Boolean),u=r(i,(e=>{let[t]=e;return d.includes(t)}));if(u.hasMatches)return u.key;const j=b(i,d,n);return j.hasMatches?j.key:b(i,d,a).key}},97:function(e,t,i){"use strict";function n(e,t){document.addEventListener(e,t)}function a(e,t){document.removeEventListener(e,t)}function c(e,t){const i=new CustomEvent(e,{detail:t});document.dispatchEvent(i)}i.d(t,"a",(function(){return c})),i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a}))}}]);
2//# sourceMappingURL=25.cea0700f.chunk.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.