PageSourceSearch

https://policedata.org/static/js/40.df8a805b.chunk.js

js policedata.org collected 2026-09-28 11:17:01 UTC 14,296 bytes, 2 lines download raw bytes

1(this["webpackJsonppolice-data-website"]=this["webpackJsonppolice-data-website"]||[]).push([[40,44],{254:function(e,t,i){"use strict";i.r(t);var a=i(14),n=i(23),l=i(87),o=i.n(l),s=i(88),c=i.n(s),d=i(1),r=i(98),p=i(21);const u=e=>{var t,i;let{statistic:l,data:s,getTableStatistic:c,noDepartmentData:d,percentPopulation:u,isCompleteData:m}=e,h=c(s,l,"total");const v=c(s,l,"d"),b=m?null===s||void 0===s||null===(t=s.m)||void 0===t?void 0:t.pc:null===s||void 0===s||null===(i=s.m)||void 0===i?void 0:i.pa;"percent_population"===l&&u&&b?h=b/u*100:"percent_population"===l&&(h=b/a.v.US*100);const f=null===h||"undefined"===typeof h,j=null===v||"undefined"===typeof v,g=Object(r.d)({total:f?0:h,delta:j?0:v,config:a.r}),O=a.w[l];return Object(p.jsxs)("div",{className:"cell statistic",children:[(null===O||void 0===O?void 0:O.showDelta)&&Object(p.jsx)(r.b.div,{className:o()("d","is-".concat(l)),title:v,children:j?"":g.delta.to((e=>d&&O.hasPrimary?"":e>0?"\u2191"+Object(n.e)(e,O.format):e<0?"\u2193"+Object(n.e)(Math.abs(e),O.format):""))}),Object(p.jsx)(r.b.div,{className:"total",title:h,children:f?"-":g.total.to((e=>d&&O.hasPrimary?"-":Object(n.e)(e,O.format,l)))})]})},m=(e,t)=>{var i,a,n,l,o,s;return!!c()(null===(i=e.data)||void 0===i?void 0:i.total,null===(a=t.data)||void 0===a?void 0:a.total)&&(!!c()(null===(n=e.data)||void 0===n?void 0:n.delta,null===(l=t.data)||void 0===l?void 0:l.delta)&&(!!c()(null===(o=e.data)||void 0===o?void 0:o.noDepartmentData,null===(s=t.data)||void 0===s?void 0:s.noDepartmentData)&&!!c()(e.getTableStatistic,t.getTableStatistic)))};var h=Object(d.memo)(u,m),v=i(100),b=i(93),f=i(94),j=i(257);function g(e){var t;let{stateCode:i,departmentName:a,data:n,tableStatistics:l,regionHighlighted:s,setRegionHighlighted:c,expandTable:r,getTableStatistic:u,noDepartmentData:m,percentPopulation:g}=e;const{t:O}=Object(j.a)(),P=Object(d.useCallback)((()=>{s.departmentName!==a&&c(Object(f.a)(s,(e=>{e.stateCode=i,e.departmentName=a})))}),[s,a,c,i]);return Object(p.jsxs)("div",{className:o()("row","department",{"is-highlighted":(null===s||void 0===s?void 0:s.departmentName)===a}),onMouseEnter:P,children:[Object(p.jsxs)("div",{className:"cell",children:[Object(p.jsx)("div",{className:"state-name",children:O(a)}),(null===n||void 0===n||null===(t=n.m)||void 0===t?void 0:t.notes)&&Object(p.jsx)(v.a,{message:n.m.notes,children:Object(p.jsx)(b.i,{size:16})})]}),l.map((e=>Object(p.jsx)(h,{statistic:e,data:n,getTableStatistic:u,noDepartmentData:m,percentPopulation:g},e)))]})}const O=(e,t)=>{var i,a,n,l,o,s;return!!c()(null===(i=e.data)||void 0===i?void 0:i.total,null===(a=t.data)||void 0===a?void 0:a.total)&&(!!c()(null===(n=e.data)||void 0===n?void 0:n.delta,null===(l=t.data)||void 0===l?void 0:l.delta)&&(!!c()(null===(o=e.data)||void 0===o?void 0:o.la,null===(s=t.data)||void 0===s?void 0:s.la)&&(!(!c()(e.regionHighlighted.departmentName,t.regionHighlighted.departmentName)&&(c()(e.regionHighlighted.departmentName,e.departmentName)||c()(t.regionHighlighted.departmentName,t.departmentName)))&&(!!c()(e.expandTable,t.expandTable)&&(!!c()(e.noDepartmentData,t.noDepartmentData)&&(!!c()(e.getTableStatistic,t.getTableStatistic)&&!!c()(e.tableStatistics,t.tableStatistics)))))))};var P=Object(d.memo)(g,O),D=i(151),S=i(89),C=i(4),N=i(96),x=i(222);function y(e){var t,i;let{data:l,percentPopulation:s,tableStatistics:c,stateCode:r,departmentName:u,regionHighlighted:m,setRegionHighlighted:g,expandTable:O,getTableStatistic:y,tableWidth:W,noDepartmentData:$,isCompleteData:w}=e;const[T,k]=Object(d.useState)(!1),[H,M]=Object(x.a)("departmentSortData",{sortColumn:"uof",isAscending:!1,delta:!1,isCompleteData:!1}),A=Object(C.g)(),{t:_}=Object(j.a)(),B=Object(d.useRef)(),U=Object(d.useCallback)((e=>{H.sortColumn!==e?M(Object(f.a)(H,(t=>{"departmentName"!==H.sortColumn&&"departmentName"!==e||(t.isAscending=!H.isAscending),t.sortColumn=e}))):M(Object(f.a)(H,(e=>{e.isAscending=!H.isAscending})))}),[H,M]),z=Object(d.useCallback)(((e,t)=>{if("departmentName"!==H.sortColumn){const i=a.w[H.sortColumn],n=H.delta&&null!==i&&void 0!==i&&i.showDelta?"d":"total",o=y(l.departments[e],H.sortColumn,n),s=y(l.departments[t],H.sortColumn,n);return null===o&&null===s?0:null===o?1:null===s?-1:H.isAscending?o-s:s-o}return H.isAscending?e.localeCompare(t):t.localeCompare(e)}),[H,l,y]),E=Object(d.useCallback)((()=>{r?m.stateCode!==r&&g(Object(f.a)(m,(e=>{e.stateCode=r,e.departmentName=null}))):u&&(m.departmentName===u&&m.stateCode===l.stateCode||g(Object(f.a)(m,(e=>{e.stateCode=l.stateCode,e.departmentName=u}))))}),[l.stateCode,u,m,g,r]);let L=_(u);u===a.C&&(L="".concat(_(a.C)," [").concat(_(Object(n.h)(l.stateCode)),"]"));const R=Object(n.h)(r,l),F=Object(d.useCallback)(((e,t)=>{if("US"!==e)if(t){var i;const a=(null===(i=l.departments)||void 0===i?void 0:i[t])||(l.departmentName===t?l:null),n=(null===a||void 0===a?void 0:a.slug)&&Object(S.e)(e,a.slug,"uof");if(!n)return;N.b.dismiss(),A.push(n)}else N.b.dismiss(),A.push(Object(S.e)(e))}),[l,A]),I=Object(d.useCallback)((()=>{k(!1),B.current.scrollIntoView({block:"start"})}),[]);return Object(p.jsxs)(p.Fragment,{children:[Object(p.jsxs)("div",{className:o()("row",{"is-total":"US"===r},{"is-highlighted":r&&(null===m||void 0===m?void 0:m.stateCode)===r||u&&(null===m||void 0===m?void 0:m.departmentName)===u&&(null===m||void 0===m?void 0:m.stateCode)===l.stateCode}),onMouseEnter:E,onClick:F.bind(this,null===m||void 0===m?void 0:m.stateCode,null===m||void 0===m?void 0:m.departmentName),ref:B,children:[Object(p.jsxs)("div",{className:"cell",children:[Object(p.jsx)("div",{className:"state-name fadeInUp",children:r?_(R):L}),(null===l||void 0===l||null===(t=l.m)||void 0===t?void 0:t.notes)&&Object(p.jsx)(v.a,{message:l.m.notes,children:Object(p.jsx)(b.i,{size:16})})]}),c.map((e=>Object(p.jsx)(h,{noDepartmentData:!r&&u!==a.C&&$,data:l,statistic:e,getTableStatistic:y,percentPopulation:s,isCompleteData:w},e)))]}),T&&Object(p.jsxs)(p.Fragment,{children:[Object(p.jsxs)("div",{className:"state-meta",style:{width:W},children:[Object(p.jsxs)("div",{className:"state-meta-top",children:[Object(p.jsxs)("div",{className:"state-page",onClick:F.bind(this,r),children:[Object(p.jsx)(b.h,{}
1),Object(p.jsx)("span",{children:_("See more details")})]}),(null===l||void 0===l||null===(i=l.m)||void 0===i?void 0:i.la)&&Object(p.jsxs)("p",{className:"last-updated",children:[Object(p.jsx)(b.c,{}),Object(n.a)("".concat(Object(n.d)(l.m.la)," ").concat(_("ago")))]})]}),l.departments&&a.C in l.departments&&Object(p.jsx)("div",{className:"state-meta-bottom",children:Object(p.jsxs)("div",{className:o()("disclaimer"),children:[Object(p.jsx)(b.a,{}),Object(p.jsx)("span",{children:_("Department-wise data not available in state bulletin")})]})})]}),Object(p.jsxs)("div",{className:o()("row","heading"),children:[Object(p.jsxs)("div",{className:"cell heading",onClick:U.bind(this,"departmentName"),children:[Object(p.jsx)("div",{className:"department-name",children:_("Department")}),"departmentName"===H.sortColumn&&Object(p.jsx)("div",{className:"sort-icon",children:H.isAscending?Object(p.jsx)(b.q,{size:12}):Object(p.jsx)(b.r,{size:12})})]}),c.map((e=>Object(p.jsx)(D.a,{statistic:e,sortData:H,setSortData:M,handleSort:U.bind(this,e)},e)))]})]}),T&&Object.keys(l.departments||{}).sort(((e,t)=>z(e,t))).map((e=>Object(p.jsx)(P,{data:l.departments[e],percentPopulation:s,noDepartmentData:e!==a.C&&$,tableStatistics:c,departmentName:e,regionHighlighted:m,setRegionHighlighted:g,stateCode:r,expandTable:O,getTableStatistic:y},e))),T&&Object(p.jsx)("div",{className:"spacer-row",style:{width:W},children:Object(p.jsxs)("div",{className:"spacer",children:[Object(p.jsx)("p",{children:"End of ".concat(_(R),"'s departments")}),Object(p.jsx)("div",{className:"fold",onClick:I,children:Object(p.jsx)(b.g,{})})]})})]})}const W=(e,t)=>{var i,a,n,l;return!!c()(null===(i=e.data)||void 0===i?void 0:i.total,null===(a=t.data)||void 0===a?void 0:a.total)&&(!!c()(null===(n=e.data)||void 0===n?void 0:n.delta,null===(l=t.data)||void 0===l?void 0:l.delta)&&(!(!c()(e.regionHighlighted.stateCode,t.regionHighlighted.stateCode)&&c()(e.regionHighlighted.stateCode,e.stateCode)||c()(t.regionHighlighted.stateCode,t.stateCode))&&(!(!c()(e.regionHighlighted.departmentName,t.regionHighlighted.departmentName)&&c()(e.regionHighlighted.departmentName,e.departmentName)||c()(t.regionHighlighted.departmentName,t.departmentName))&&(!!c()(e.expandTable,t.expandTable)&&(!!c()(e.isCompleteData,t.isCompleteData)&&(!!c()(e.noDepartmentData,t.noDepartmentData)&&(!!c()(e.tableWidth,t.tableWidth)&&(!!c()(e.getTableStatistic,t.getTableStatistic)&&!!c()(e.tableStatistics,t.tableStatistics)))))))))};t.default=Object(d.memo)(y,W)},89:function(e,t,i){"use strict";i.d(t,"a",(function(){return l})),i.d(t,"e",(function(){return o})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return c})),i.d(t,"d",(function(){return h}));const a=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},n=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},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"NB"===e.toUpperCase()?"NE":e.toUpperCase()},o=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const i=l(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"");if(!i)return null;let a="/report/".concat(i.toLowerCase());return e&&(a+="/".concat(e)),t&&(a+="/".concat(t)),a},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},c=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),a=d(i,(e=>{let[,i]=e;return(null===i||void 0===i?void 0:i.slug)===t}));return a.hasMatches?a.key:r(i,(e=>{var i;let[a,l]=e;const o=(null===l||void 0===l||null===(i=l.m)||void 0===i?void 0:i.name)||a;return function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase().replace(/[^A-Za-z ]+/g,"").replace(/ /g,"-")}(n(o))===t}))},d=(e,t)=>{const i=e.filter(t);return{hasMatches:i.length>0,key:1===i.length?i[0][0]:null}},r=(e,t)=>d(e,t).key,p=e=>{if(null===e||"undefined"===typeof e)return null;const t=String(e).trim();return t&&/^\d+$/.test(t)?t.replace(/^0+(?=\d)/,""):null},u=(e,t)=>
1{const i=p(e),a=p(t);return null!==i&&null!==a&&i===a},m=(e,t,i)=>d(e,(e=>{var a;let[n,l]=e;const o=(null===l||void 0===l||null===(a=l.m)||void 0===a?void 0:a.name)||n,s=new Set([n,o].map(i));return t.some((e=>s.has(i(e))))})),h=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),l=t.ori,o=t.city_fp,s=t.county_fp,c=t.type;if(l){const e=d(i,(e=>{var t;let[,i]=e;const a=(null===i||void 0===i||null===(t=i.m)||void 0===t?void 0:t.ori)||(null===i||void 0===i?void 0:i.roi);return a&&String(a).trim()===String(l).trim()}));if(e.hasMatches)return e.key}if(null!==o&&"undefined"!==typeof o){const e=d(i,(e=>{var t;let[,i]=e;return u(null===i||void 0===i?void 0:i.id,o)||u(null===i||void 0===i||null===(t=i.m)||void 0===t?void 0:t.fips_place_code,o)}));if(e.hasMatches)return e.key}if(null!==s&&"undefined"!==typeof s&&c){const e=d(i,(e=>{var t,i,a;let[,n]=e;return u(null===n||void 0===n||null===(t=n.m)||void 0===t?void 0:t.fips_county_code,s)&&(null===n||void 0===n||null===(i=n.ta)||void 0===i||null===(a=i.t)||void 0===a?void 0:a.toLowerCase())===String(c).toLowerCase()}));if(e.hasMatches)return e.key}const r=[t.department,t.name].filter(Boolean),p=d(i,(e=>{let[t]=e;return r.includes(t)}));if(p.hasMatches)return p.key;const h=m(i,r,a);return h.hasMatches?h.key:m(i,r,n).key}}}]);
2//# sourceMappingURL=40.df8a805b.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.