1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5017,8928],{75017:function(a,b,c){c.r(b),c.d(b,{EventHistoryDataModal:function(){return C}});var d=c(52322),e=c(98788),f=c(94776),g=c.n(f),h=c(82066),i=c(69248),j=c(38985),k=1/0,l=1/0,m=function(a){var b=a.locale,c=a.country,d=a.category,f=a.selectedRange,m="/macro-indicators/".concat(c,"/").concat(d,"/summary-history?latest=").concat(f);return(0,h.useQuery)(["eventHistoryData",c,d,f],(0,e.Z)(g().mark(function a(){var c,d;return g().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,i.C)({path:m,locale:b});case 2:if(c=a.sent,!(0,j.q)(c)){a.next=7;break}return a.abrupt("return",c.data);case 7:throw(d=Error(c.message||"Failed to fetch event history data")).status=c.statusCode,d;case 10:case"end":return a.stop()}},a)})),{cacheTime:k,staleTime:l,refetchOnWindowFocus:!1,retry:function(a,b){var c=b.status;return 404!==c&&500!==c&&a<=1}})},n=c(99766),o=c(88928),p=c(28518),q=c(70698),r=c(98861),s=c(5632),t=c(2784),u=c(6377),v=c(80942),w=c(54415),x=["12","24","36","60","120","All"],y=function(a){var b=a.selectedRange,c=a.onSelectRange;return(0,d.jsxs)(p.Z,{display:"flex",alignItems:"center",mb:16,children:[(0,d.jsx)(q.D,{mr:"8px",children:(0,d.jsx)(u._,{id:"EventDescription.LastReadings"})}),x.map(function(a){var e=b===a;return(0,d.jsx)(w.z,{display:"flex",alignItems:"center",justifyContent:"center",height:"32px",borderRadius:"20px",minWidth:"64px",hoverBackground:e?n.O.brightPalette.black:n.O.brightPalette.grey,backgroundColor:e?n.O.brightPalette.black:n.O.brightPalette.white,border:"1px solid ".concat(n.O.brightPalette.grey),marginRight:"8px",padding:"8px 10px",onClick:function(){return c(a)},children:(0,d.jsx)(q.D,{fontSize:"14px",fontWeight:"400",color:e?n.O.brightPalette.grey:n.O.brightPalette.black,whiteSpace:"nowrap",children:a})},a)})]})},z=c(73095),A=c(63431),B=c(70984),C=function(a){var b=a.isShown,c=a.close,e=a.country,f=a.category,g=(0,t.useState)("12"),h=g[0],i=g[1],j=(0,s.useRouter)(),k=j.locale,l=function(a){i(a)},w=function(){i("12"),c&&c()},x=m({locale:void 0===k?"en":k,country:e,category:f,selectedRange:h}),C=x.data,D=x.isLoading,E=null==C?void 0:C.history,F=null==E?void 0:E.map(function(a){var b=Number(a.formattedClose.replace(/,/g,"")),c=a.close<0?n.O.brightPalette.red:n.O.brightPalette.green,d=new Date(1e3*a.timestamp);return{time:{year:d.getUTCFullYear(),month:d.getUTCMonth()+1,day:d.getUTCDate()},value:b,color:c}}),G=(0,v._D)(E),H=null==C?void 0:C.summary.unit;return(0,d.jsxs)(o.u,{isShown:b,close:w,width:"682px",height:"569px",borderRadius:12,padding:0,backDropStyle:{zIndex:r.K.Modal},overflow:"hidden",children:[(0,d.jsxs)(p.Z,{padding:"16px 16px 0",children:[(0,d.jsx)(p.Z,{onClick:w,cursorPointer:!0,display:"flex",justifyContent:"end",children:(0,d.jsx)(z.T,{width:12,height:12,strokeWidth:1.5})}),(0,d.jsx)(p.Z,{fontSize:24,fontWeight:500,mb:"16px",children:(0,d.jsx)(u._,{id:"EventDescription.HistoricalData"})}),(0,d.jsx)(y,{selectedRange:h,onSelectRange:l}),(0,d.jsxs)(p.Z,{mb:"16px",children:[(0,d.jsx)(q.D,{fontSize:12,color:n.O.brightPalette.grey_3,mr:"4px",children:(0,d.jsx)(u._,{id:"EventDescription.DatesRange"})}),(0,d.jsx)(q.D,{fontSize:14,children:G})]}),(0,d.jsxs)(p.Z,{mb:"12px",children:[(0,d.jsx)(q.D,{fontSize:12,color:n.O.brightPalette.grey_3,mr:"4px",children:(0,d.jsx)(u._,{id:"EventDescription.Unit"})}),(0,d.jsx)(q.D,{fontSize:14,children:H})]})]}),D?(0,d.jsx)(p.Z,{height:"50%",children:(0,d.jsx)(B.a,{})}):(0,d.jsx)(A.BaselineHistoryChart,{data:F,unit:H})]})}},88928:function(a,b,c){c.d(b,{u:function(){return m}});var d=c(70865),e=c(96670),f=c(26297),g=c(52322),h=c(2784),i=c(26021),j=c(98043),k=c(46555),l=c(28518),m=function(a){var b=a.isShown,c=a.close,m=a.children,n=a.onTransitionEnd,o=a.backdropTopPadding,p=a.backDropStyle,q=a.disableBlockScroll,r=a.disableScrollToggle,s=void 0!==r&&r,t=(0,f.Z)(a,["isShown","close","children","onTransitionEnd","backdropTopPadding","backDropStyle","disableBlockScroll","disableScrollToggle"]),u=(0,i.Fg)().colors,v=(0,j.b)(),w=function(){null==n||n()};return(0,h.useEffect)(function(){return s||v(b&&!Boolean(q)),function(){s||v(!1)}},[v,b,q,s]),(0,g.jsx)(k.Y,{style:p,isShown:b,close:c,onTransitionEnd:w,pt:o,children:(0,g.jsx)(l.Z,(0,e.Z)((0,d.Z)({display:"block",width:"40%",p:t.p?t.p:"0.5rem",backgroundColor:u.brightPalette.white,borderRadius:4,onClick:function(a){a.stopPropagation()}},t),{children:m}))})}}}])
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.