1(this["webpackJsonppolice-data-website"]=this["webpackJsonppolice-data-website"]||[]).push([[16],{112:function(t,e,n){"use strict";var r=n(1),i=n(84),a=i.a?r.useLayoutEffect:r.useEffect,o={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};e.a=i.a&&"undefined"!==typeof window.ResizeObserver?function(){var t=Object(r.useState)(null),e=t[0],n=t[1],i=Object(r.useState)(o),c=i[0],u=i[1],s=Object(r.useMemo)((function(){return new window.ResizeObserver((function(t){if(t[0]){var e=t[0].contentRect,n=e.x,r=e.y,i=e.width,a=e.height,o=e.top,c=e.left,s=e.bottom,l=e.right;u({x:n,y:r,width:i,height:a,top:o,left:c,bottom:s,right:l})}}))}),[]);return a((function(){if(e)return s.observe(e),function(){s.disconnect()}}),[e]),[n,c]}:function(){return[i.b,o]}},132:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));class r extends Map{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[n,r]of t)this.set(n,r)}get(t){return super.get(i(this,t))}has(t){return super.has(i(this,t))}set(t,e){return super.set(a(this,t),e)}delete(t){return super.delete(o(this,t))}}Set;function i(t,e){let{_intern:n,_key:r}=t;const i=r(e);return n.has(i)?n.get(i):e}function a(t,e){let{_intern:n,_key:r}=t;const i=r(e);return n.has(i)?n.get(i):(n.set(i,e),e)}function o(t,e){let{_intern:n,_key:r}=t;const i=r(e);return n.has(i)&&(e=n.get(i),n.delete(i)),e}function c(t){return null!==t&&"object"===typeof t?t.valueOf():t}var u=n(95);const s=Symbol("implicit");function l(){var t=new r,e=[],n=[],i=s;function a(r){let a=t.get(r);if(void 0===a){if(i!==s)return i;t.set(r,a=e.push(r)-1)}return n[a%n.length]}return a.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new r;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return a},a.range=function(t){return arguments.length?(n=Array.from(t),a):n.slice()},a.unknown=function(t){return arguments.length?(i=t,a):i},a.copy=function(){return l(e,n).unknown(i)},u.b.apply(a,arguments),a}},158:function(t,e,n){"use strict";n.d(e,"b",(function(){return b})),n.d(e,"a",(function(){return g}));var r=function(t){return t},i=1,a=2,o=3,c=4,u=1e-6;function s(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function f(t){return e=>+t(e)}function d(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function h(){return!this.__axis}function p(t,e){var n=[],p=null,b=null,g=6,m=6,y=3,O="undefined"!==typeof window&&window.devicePixelRatio>1?0:.5,j=t===i||t===c?-1:1,v=t===c||t===a?"x":"y",x=t===i||t===o?s:l;function k(s){var l=null==p?e.ticks?e.ticks.apply(e,n):e.domain():p,k=null==b?e.tickFormat?e.tickFormat.apply(e,n):r:b,w=Math.max(g,0)+y,M=e.range(),A=+M[0]+O,_=+M[M.length-1]+O,S=(e.bandwidth?d:f)(e.copy(),O),D=s.selection?s.selection():s,R=D.selectAll(".domain").data([null]),C=D.selectAll(".tick").data(l,e).order(),z=C.exit(),E=C.enter().append("g").attr("class","tick"),F=C.select("line"),V=C.select("text");R=R.merge(R.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(E),F=F.merge(E.append("line").attr("stroke","currentColor").attr(v+"2",j*g)),V=V.merge(E.append("text").attr("fill","currentColor").attr(v,j*w).attr("dy",t===i?"0em":t===o?"0.71em":"0.32em")),s!==D&&(R=R.transition(s),C=C.transition(s),F=F.transition(s),V=V.transition(s),z=z.transition(s).attr("opacity",u).attr("transform",(function(t){return isFinite(t=S(t))?x(t+O):this.getAttribute("transform")})),E.attr("opacity",u).attr("transform",(function(t){var e=this.parentNode.__axis;return x((e&&isFinite(e=e(t))?e:S(t))+O)}))),z.remove(),R.attr("d",t===c||t===a?m?"M"+j*m+","+A+"H"+O+"V"+_+"H"+j*m:"M"+O+","+A+"V"+_:m?"M"+A+","+j*m+"V"+O+"H"+_+"V"+j*m:"M"+A+","+O+"H"+_),C.attr("opacity",1).attr("transform",(function(t){return x(S(t)+O)})),F.attr(v+"2",j*g),V.attr(v,j*w).text(k),D.filter(h).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===a?"start":t===c?"end":"middle"),D.each((function(){this.__axis=S}))}return k.scale=function(t){return arguments.length?(e=t,k):e},k.ticks=function(){return n=Array.from(arguments),k},k.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),k):n.slice()},k.tickValues=function(t){return arguments.length?(p=null==t?null:Array.from(t),k):p&&p.slice()},k.tickFormat=function(t){return arguments.length?(b=t,k):b},k.tickSize=function(t){return arguments.length?(g=m=+t,k):g},k.tickSizeInner=function(t){return arguments.length?(g=+t,k):g},k.tickSizeOuter=function(t){return arguments.length?(m=+t,k):m},k.tickPadding=function(t){return arguments.length?(y=+t,k):y},k.offset=function(t){return arguments.length?(O=+t,k):O},k}function b(t){return p(a,t)}function g(t){return p(o,t)}},189:function(t,e,n){"use strict";n.r(e);var r=n(14),i=n(97),a=n(23),o=n(192),c=n(158),u=n(190),s=n(130),l=n(234),f=(n(107),n(88)),d=n.n(f),h=n(1),p=n(112),b=n(222),g=n(21);const m=50,y=0,O=50,j=0;function v(t){let{timeseries:e,statistic:n,lookback:f,currentDepartment:d}=t;const v=Object(h.useRef)(),[x,{width:w,height:M}]=Object(p.a)(),[A,_]=Object(b.a)("isCompleteData",!1),[S,D]=Object(h.useState)(!1);Object(h.useEffect)((()=>(D(!0),()=>{D(!1)})),[D]),Object(h.useEffect)((()=>(S&&(Object(i.b)("completeDataMap",(t=>_(t.detail))),Object(i.b)("completeDataTable",(t=>_(t.detail)))),()=>{Object(i.c)("completeDataMap"),Object(i.c)("completeDataTable")})),[_,S]);const R=Object(a.f)(e).filter((t=>t<=Object(a.g)())),C=Object(h.useCallback)(((t,n)=>Object(a.i)(null===e||void 0===e?void 0:e[t],"total",n,{isCompleteData:A})),[e,A]),z=R.filter((t=>null!==C(t,n))).slice(-f);return Object(h.useEffect)((()=>
1{if(!w)return;const t=Object(l.a)(v.current),e=w-y,i=M-O,f=Object(u.a)().domain(z).range([j,e]).paddingInner(w/1e3),[d,h]=Object(o.a)(z,(t=>C(t,n))),p=Object(s.a)().domain([Math.min(0,d||0),Math.max(1,h||0)]).range([i,m]),b=Object(c.a)(f).tickSize(0).tickFormat((t=>Object(a.c)(t,"yyyy"))),g=t.transition().duration(r.b),x=r.w[n];t.select(".x-axis").transition(g).style("transform","translate3d(0, ".concat(p(0),"px, 0)")).call(b).on("start",(()=>t.select(".domain").remove())).selectAll("text").attr("y",0).attr("dy",((t,e)=>C(t,n)<0?"-1em":"1.5em")).style("text-anchor","middle").attr("fill",x.color),t.selectAll(".bar").data(z).join((t=>t.append("path").attr("class","bar").attr("d",(t=>k(f(t),p(0),f.bandwidth(),0,5))))).transition(g).attr("d",(t=>k(f(t),p(0),f.bandwidth(),p(0)-p(C(t,n)),5))).attr("fill",((t,e)=>e<z.length-1?x.color+"90":x.color));const A=t.selectAll(".label").data(z).join("text").attr("class","label").attr("x",(t=>f(t)+f.bandwidth()/2)).text((t=>Object(a.e)(C(t,n),null!==x&&void 0!==x&&x.showDelta||null!==x&&void 0!==x&&x.nonLinear?x.format:"short")));A.transition(g).attr("fill",x.color).attr("y",(t=>{const e=C(t,n);return p(e)+(e<0?15:-6)})),A.append("tspan").attr("dy",(t=>"".concat(C(t,n)<0?1.2:-1.2,"em"))).attr("x",(t=>f(t)+f.bandwidth()/2)).text(((t,e)=>{if(0===e)return"";const r=C(z[e-1],n);if(!r)return"";const i=C(t,n)-r;return"".concat(i>0?"+":"").concat(Object(a.e)(100*i/Math.abs(r),"%"))})).transition(g).attr("fill",x.color+"90")}),[z,M,n,w,C]),Object(g.jsx)("div",{className:"DeltaBarGraph",ref:x,children:Object(g.jsxs)("svg",{ref:v,width:w,height:250,viewBox:"0 0 ".concat(w," ").concat(M),preserveAspectRatio:"xMidYMid meet",children:[Object(g.jsx)("g",{className:"x-axis"}),Object(g.jsx)("g",{className:"y-axis"})]})})}const x=(t,e)=>!e.forceRender&&(!(e.timeseries||!t.timeseries)||!(e.timeseries&&!t.timeseries)&&(!!d()(t.stateCode,e.stateCode)&&(!!d()(t.lookback,e.lookback)&&(!!d()(t.statistic,e.statistic)&&!!d()(t.currentDepartment,e.currentDepartment)))));function k(t,e,n,r,i){i=Math.sign(r)*Math.min(Math.abs(r),i);return["M ".concat(t," ").concat(e),"v ".concat(-r+i),"q 0 ".concat(-i," ").concat(Math.abs(i)," ").concat(-i),"h ".concat(n-2*Math.abs(i)),"q ".concat(Math.abs(i)," 0 ").concat(Math.abs(i)," ").concat(i),"v ".concat(r-i),"Z"].join(" ")}e.default=Object(h.memo)(v,x)},190:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(191),i=n(95),a=n(132);function o(){var t,e,n=Object(a.a)().unknown(void 0),c=n.domain,u=n.range,s=0,l=1,f=!1,d=0,h=0,p=.5;function b(){var n=c().length,i=l<s,a=i?l:s,o=i?s:l;t=(o-a)/Math.max(1,n-d+2*h),f&&(t=Math.floor(t)),a+=(o-a-t*(n-d))*p,e=t*(1-d),f&&(a=Math.round(a),e=Math.round(e));var b=Object(r.a)(n).map((function(e){return a+t*e}));return u(i?b.reverse():b)}return delete n.unknown,n.domain=function(t){return arguments.length?(c(t),b()):c()},n.range=function(t){return arguments.length?([s,l]=t,s=+s,l=+l,b()):[s,l]},n.rangeRound=function(t){return[s,l]=t,s=+s,l=+l,f=!0,b()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(f=!!t,b()):f},n.padding=function(t){return arguments.length?(d=Math.min(1,h=+t),b()):d},n.paddingInner=function(t){return arguments.length?(d=Math.min(1,t),b()):d},n.paddingOuter=function(t){return arguments.length?(h=+t,b()):h},n.align=function(t){return arguments.length?(p=Math.max(0,Math.min(1,t)),b()):p},n.copy=function(){return o(c(),[s,l]).round(f).paddingInner(d).paddingOuter(h).align(p)},i.b.apply(b(),arguments)}},191:function(t,e,n){"use strict";function r(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}n.d(e,"a",(function(){return r}))},192:function(t,e,n){"use strict";function r(t,e){let n,r;if(void 0===e)for(const i of t)null!=i&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}n.d(e,"a",(function(){return r}))},88:function(t,e,n){"use strict";
vendor: 751 bytes, lines 1-2
1t.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!==i--;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(a=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!==i--;){var o=a[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}}}]); 2//# sourceMappingURL=16.3ba6242d.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.