1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[240],{17233:function(e,t,r){"use strict";r.d(t,{kN:function(){return g},vh:function(){return h},dw:function(){return c},Jf:function(){return p}});var n=r(10894),a=r(33344),o=r(44592),s=(r(1358),r(67294));function i(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var l=["className","children"],c=(0,a.Gp)((function(e,t){var r=(0,a.yK)();return s.createElement(a.m$.dt,u({ref:t},e,{className:(0,o.cx)("chakra-stat__label",e.className),__css:r.label}))}));o.Ts&&(c.displayName="StatLabel");var h=(0,a.Gp)((function(e,t){var r=(0,a.yK)();return s.createElement(a.m$.dd,u({ref:t},e,{className:(0,o.cx)("chakra-stat__help-text",e.className),__css:r.helpText}))}));o.Ts&&(h.displayName="StatHelpText");var p=(0,a.Gp)((function(e,t){var r=(0,a.yK)();return s.createElement(a.m$.dd,u({ref:t},e,{className:(0,o.cx)("chakra-stat__number",e.className),__css:u({},r.number,{fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums"})}))}));o.Ts&&(p.displayName="StatNumber");var f=function(e){return s.createElement(n.JO,u({color:"red.400"},e),s.createElement("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"}))};o.Ts&&(f.displayName="StatDownArrow");var d=function(e){return s.createElement(n.JO,u({color:"green.400"},e),s.createElement("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"}))};o.Ts&&(d.displayName="StatUpArrow");o.Ts;var g=(0,a.Gp)((function(e,t){var r=(0,a.jC)("Stat",e),n=u({position:"relative",flex:"1 1 0%"},r.container),c=(0,a.Lr)(e),h=c.className,p=c.children,f=i(c,l);return s.createElement(a.Fo,{value:r},s.createElement(a.m$.div,u({ref:t},f,{className:(0,o.cx)("chakra-stat",h),__css:n}),s.createElement("dl",null,p)))}));o.Ts&&(g.displayName="Stat");var y=(0,a.Gp)((function(e,t){return s.createElement(a.m$.div,u({},e,{ref:t,role:"group",className:(0,o.cx)("chakra-stat__group",e.className),__css:{display:"flex",flexWrap:"wrap",justifyContent:"space-around",alignItems:"flex-start"}}))}));o.Ts&&(y.displayName="StatGroup")},37162:function(e,t,r){"use strict";var n=r(85893),a=r(68527),o=r(49609);t.Z=function(){return(0,n.jsx)(a.xu,{pt:"8",w:"full",children:(0,n.jsx)(a.M5,{children:(0,n.jsx)(o.$,{color:"blue.400"})})})}},70837:function(e,t,r){"use strict";r.d(t,{n:function(){return n}});var n=function(e){var t=Math.floor(e/864e5),r=Math.floor(e%864e5/36e5),n=Math.floor(e%36e5/6e4),a=(e%6e4/1e3).toFixed(2);return"".concat(t?t+"d ":""," ").concat(r||t?r+"h ":""," ").concat(n||r?n+"m ":""," ").concat(a||n?a+"s":"0s")}},95613:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return _}});var n=r(85893),a=r(809),o=r.n(a),s=r(30266),i=r(67294),u=r(92684),l=r(68527),c=r(20949),h=r(90456),p=r(17233),f=r(87913),d=r(57277),g=r.n(d),y=r(88767),m=r(11163),x=r(9669),v=r.n(x),b=r(58747),k=r(70837);function D(e,t,r,n){r=r||{past:[{ceiling:60,text:"$seconds seconds ago"},{ceiling:3600,text:"$minutes minutes ago"},{ceiling:86400,text:"$hours hours ago"},{ceiling:2629744,text:"$days days ago"},{ceiling:31556926,text:"$months months ago"},{ceiling:null,text:"$years years ago"}],future:[{ceiling:60,text:"in $seconds seconds"},{ceiling:3600,text:"in $minutes minutes"},{ceiling:86400,text:"in $hours hours"},{ceiling:2629744,text:"in $days days"},{ceiling:31556926,text:"in $months months"},{ceiling:null,text:"in $years years"}]},n=n||[[31556926,"years"],[2629744,"months"],[86400,"days"],[3600,"hours"],[60,"minutes"],[1,"seconds"]],e=new Date(e);var a=((t=t?new Date(t):new Date)-e)/1e3,o="past";return a<0&&(o="future",a=0-a),function(e){var t=function(){for(var e=a,t={},r=0;r<n.length;r++){var o=Math.floor(e/n[r][0]);e-=n[r][0]*o,t[n[r][1]]=o}return t}();return function(e,t){for(var r in t)if(1==t[r]){var n=new RegExp("\\b"+r+"\\b");e=e.replace(n,(function(){return arguments[0].replace(/s\b/g,"")}))}return e}(e.text.replace(/\$(\w+)/g,(function(){return t[arguments[1]]})),t)}(function(){for(var e=0;e<r[o].length;e++)if(null==r[o][e].ceiling||a<=r[o][e].ceiling)return r[o][e];return null}())}var w=r(14428),S=r(37162),j=function(){var e=(0,s.Z)(o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v().get("".concat(b.M,"/api/user/profile/").concat(t,"/"));case 2:return r=e.sent,n=r.data,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=(0,m.useRouter)(),t=(0,y.useQuery)(["profile",e.query.username],(function(){return j(e.query.username)}),{retry:3,retryDelay:0}),r=t.data,a=t.isLoading,o=t.isError,s=(0,u.Sx)({md:!1,base:!0}),d=(0,u.Sx)({sm:!1,base:!0});return i.useEffect((function(){f.Z.rebuild()})),(0,w.Z)("KeyKorea - ".concat(a?"Loading...":"".concat(r&&r.user&&r.user.username?r.user.username+"s Profile":"Profile Not Found")," ")),(0,n.jsx)(l.W2,{pt:"8",maxW:"container.xl",children:(0,n.jsx)(l.Kq,{spacing:4,width:"100%",align:"stretch",children:o?(0,n.jsxs)(l.gC,{children:[(0,n.jsx)(l.X6,{children:"Sorry, something went wrong!"}),(0,n.jsxs)(l.xv,{children:["Could not find a user with the username ",e.query.username]})]}):a?(0,n.jsx)(S.Z,{}):(0,n.jsxs)(l.rj,{templateColumns:"repeat(18, 1fr)",gap:"4",children:[(0,n.jsxs)(l.P4,{colSpan:[18,18,18,6],overflowX:"auto",children:[(0,n.jsx)(l.xu,{border:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),rounded:"lg",px:{base:2,md:4},py:"2",pt:"5",pb:"4",mb:"4",children:(0,n.jsxs)(l.Ug,{children:[(0,n.jsx)(h.Ee,{minWidth:"75px",maxWidth:"75px",minHeight:"75px",maxHeight:"75px",borderRadius:"500px",src:r.user.avatar}),(0,n.jsxs)(l.xu,{children:[(0,n.jsx)(l.X6,{size:"md",children:r.user.username}),(0,n.jsxs)(l.xv,{fontSize:"sm",color:(0,c.ff)("gray.700","gray.200"),children:["Account Created:"," ",new Date(r.user.created_at).toDateString()]})]})]})}),(0,n.jsxs)(l.xu,{border:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),rounded:"lg",children:[(0,n.jsx)(l.xu,{px:{base:2,md:4},py:"2",borderBottom:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),children:(0,n.jsx)(l.X6,{size:"sm",children:"About"})}),(0,n.jsx)(l.xu,{px:{base:2,md:4},py:"2",pt:"2",children:(0,n.jsx)(l.xv,{color:(0,c.ff)("gray.700","gray.200"),children:0===r.user.bio.length?"This user has not made a bio yet.":r.user.bio})})]})]}),(0,n.jsxs)(l.P4,{experimental_spaceY:"4",colSpan:[18,18,18,12],children:[(0,n.jsxs)(l.rj,{templateColumns:"repeat(3, 1fr)",gap:"4",children:[(0,n.jsxs)(l.P4,{colSpan:[3,1,1,1],children:[(0,n.jsx)(l.xu,{border:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),rounded:"lg",children:(0,n.jsxs)(p.kN,{px:{base:2,md:4},py:"2",pt:"4",children:[(0,n.jsx)(p.dw,{isTruncated:!0,children:"Average WPM"}),(0,n.jsx)(p.Jf,{children:r.stats.wpm__avg?r.stats.wpm__avg.toFixed(2):"N/A"}),(0,n.jsx)(p.vh,{children:"Last 30 Days"})]})})," "]})," ",(0,n.jsx)(l.P4,{colSpan:[3,1,1,1],children:(0,n.jsx)(l.xu,{border:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),rounded:"lg",children:(0,n.jsx)(p.kN,{px:{base:2,md:4},py:"2",pt:"4",children:(0,n.jsxs)(l.xu,{children:[(0,n.jsx)(p.dw,{isTruncated:!0,children:"Average Score"}),(0,n.jsx)(p.Jf,{children:r.stats.score__avg?r.stats.score__avg.toFixed(2):"N/A"}),(0,n.jsx)(p.vh,{children:"Last 30 Days"})]})})})}),(0,n.jsx)(l.P4,{colSpan:[3,1,1,1],children:(0,n.jsx)(l.xu,{border:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),rounded:"lg",children:(0,n.jsx)(p.kN,{px:{base:2,md:4},py:"2",pt:"4",children:(0,n.jsxs)(l.xu,{children:[(0,n.jsx)(p.dw,{isTruncated:!0,children:"Average Time Taken"}),(0,n.jsx)(p.Jf,{children:r.stats.time_elapsed__avg?(0,k.n)(1e3*r.stats.time_elapsed__avg):"N/A"}),(0,n.jsx)(p.vh,{children:"Last 30 Days"})]})})})})]}),(0,n.jsxs)(l.P4,{border:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),rounded:"lg",w:"100%",colSpan:[6,6,6,4],children:[(0,n.jsx)(l.xu,{px:{base:2,md:4},py:"2",borderBottom:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),children:(0,n.jsxs)(l.X6,{size:"sm",children:[r.heatmap_data.reduce((function(e,t){return e+t.count}),0)," ","attempts in the last year"]})}),(0,n.jsx)(l.xu,{px:{base:2,md:4},py:"2",pt:"2",children:(0,n.jsx)(g(),{startDate:d?new Date((new Date).setMonth((new Date).getMonth()-6)):s?new Date((new Date).setMonth((new Date).getMonth()-9)):new Date((new Date).setFullYear((new Date).getFullYear()-1)),endDate:new Date,values:r.heatmap_data,classForV
1alue:function(e){return e?"color-scale-".concat(Math.min(e.count,9)):"color-empty"},tooltipDataAttrs:function(e){if(!e||!e.date)return null;var t=new Date(e.date);return{"data-tip":"".concat(e.count," attempt").concat(e.count>=1&&"s"," on ").concat(t.toDateString()," ")}}})})]}),(0,n.jsxs)(l.P4,{border:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),rounded:"lg",w:"100%",colSpan:[6,6,6,4],colStart:[0,0,0,3],children:[(0,n.jsx)(l.xu,{px:{base:2,md:4},py:"2",borderBottom:"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),children:(0,n.jsx)(l.X6,{size:"sm",children:"Most Recent Attempts"})}),(0,n.jsxs)(l.xu,{px:{base:2,md:4},py:"2",pt:"2",children:[0===r.recent_attempts.length&&(0,n.jsx)(l.M5,{children:(0,n.jsx)(l.xv,{children:"This user has made no attempts yet."})}),r.recent_attempts.map((function(e,t){return(0,n.jsx)(l.xu,{py:"2",borderTop:0===t?"":"1px solid",borderColor:(0,c.ff)("gray.200","gray.700"),children:(0,n.jsxs)(l.Ug,{children:[(0,n.jsx)(l.X6,{size:"xs",color:(0,c.ff)("gray.700","gray.200"),children:e.subexercise_slug.subexercise_name}),(0,n.jsx)(l.xv,{fontSize:"xs",color:(0,c.ff)("gray.600","gray.400"),children:D(e.created_at)}),(0,n.jsx)(l.LZ,{}),(0,n.jsx)(l.xu,{px:"10px",py:"2px",bg:"blue.400",borderRadius:"20",children:(0,n.jsx)(l.xv,{fontWeight:"bold",color:"white",fontSize:"xs",children:e.subexercise_slug.exercise_slug.exercise_name})})]})})}))]})]})]})]})})})}},56702:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/[username]",function(){return r(95613)}])},57277:function(e,t,r){e.exports=function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?l(e):t}function h(e,t){return p(e)||f(e,t)||d()}function p(e){if(Array.isArray(e))return e}function f(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,a=!1,o=void 0;try{for(var s,i=e[Symbol.iterator]();!(n=(s=i.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){a=!0,o=u}finally{try{n||null==i.return||i.return()}finally{if(a)throw o}}return r}}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function g(e,t){return e(t={exports:{}},t.exports),t.exports}e=e&&e.hasOwnProperty("default")?e.default:e;var y="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function m(){}function x(){}x.resetWarningCache=m;var v=function(){function e(e,t,r,n,a,o){if(o!==y){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:x,resetWarningCache:m};return r.PropTypes=r,r},b=g((function(e){e.exports=v()}));function k(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function D(e,t){var r;void 0===t&&(t=k);var n,a=[],o=!1;function s(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];return o&&r===this&&t(s,a)||(n=e.apply(this,s),o=!0,r=this,a=s),n}return s}var w=864e5,S=7,j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],_=["","Mon","","Wed","","Fri",""];function C(e,t){var r=new Date(e);return r.setDate(r.getDate()+t),r}function O(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function W(e){return e instanceof Date?e:new Date(e)}function E(e){return C(new Date,-e)}function L(e){for(var t=[],r=0;r<e;r+=1)t.push(r);return t}var N=10,M=4,T="react-calendar-heatmap-",z=function(r){function u(){var e,r;t(this,u);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return a(l(r=c(this,(e=i(u)).call.apply(e,[this].concat(o)))),"getValueCache",D((function(e){return e.values.reduce((function(e,t){var n=W(t.date);return e[Math.floor((n-r.getStartDateWithEmptyDays())/w)]={value:t,className:r.props.classForV
1alue(t),title:r.props.titleForValue?r.props.titleForValue(t):null,tooltipDataAttrs:r.getTooltipDataAttrsForValue(t)},e}),{})}))),r}return s(u,r),n(u,[{key:"getDateDifferenceInDays",value:function(){var e=this.props,t=e.startDate,r=e.numDays;if(r)return console.warn("numDays is a deprecated prop. It will be removed in the next release. Consider using the startDate prop instead."),r;var n=this.getEndDate()-W(t);return Math.ceil(n/w)}},{key:"getSquareSizeWithGutter",value:function(){return N+this.props.gutterSize}},{key:"getMonthLabelSize",value:function(){return this.props.showMonthLabels?this.props.horizontal?N+M:2*(N+M):0}},{key:"getWeekdayLabelSize",value:function(){return this.props.showWeekdayLabels?this.props.horizontal?30:1.5*N:0}},{key:"getStartDate",value:function(){return C(this.getEndDate(),1-this.getDateDifferenceInDays())}},{key:"getEndDate",value:function(){return O(W(this.props.endDate))}},{key:"getStartDateWithEmptyDays",value:function(){return C(this.getStartDate(),-this.getNumEmptyDaysAtStart())}},{key:"getNumEmptyDaysAtStart",value:function(){return this.getStartDate().getDay()}},{key:"getNumEmptyDaysAtEnd",value:function(){return S-1-this.getEndDate().getDay()}},{key:"getWeekCount",value:function(){var e=this.getDateDifferenceInDays()+this.getNumEmptyDaysAtStart()+this.getNumEmptyDaysAtEnd();return Math.ceil(e/S)}},{key:"getWeekWidth",value:function(){return S*this.getSquareSizeWithGutter()}},{key:"getWidth",value:function(){return this.getWeekCount()*this.getSquareSizeWithGutter()-(this.props.gutterSize-this.getWeekdayLabelSize())}},{key:"getHeight",value:function(){return this.getWeekWidth()+(this.getMonthLabelSize()-this.props.gutterSize)+this.getWeekdayLabelSize()}},{key:"getValueForIndex",value:function(e){return this.valueCache[e]?this.valueCache[e].value:null}},{key:"getClassNameForIndex",value:function(e){return this.valueCache[e]?this.valueCache[e].className:this.props.classForValue(null)}},{key:"getTitleForIndex",value:function(e){return this.valueCache[e]?this.valueCache[e].title:this.props.titleForValue?this.props.titleForValue(null):null}},{key:"getTooltipDataAttrsForIndex",value:function(e){return this.valueCache[e]?this.valueCache[e].tooltipDataAttrs:this.getTooltipDataAttrsForValue({date:null,count:null})}},{key:"getTooltipDataAttrsForValue",value:function(e){var t=this.props.tooltipDataAttrs;return"function"===typeof t?t(e):t}},{key:"getTransformForWeek",value:function(e){return this.props.horizontal?"translate(".concat(e*this.getSquareSizeWithGutter(),", 0)"):"translate(0, ".concat(e*this.getSquareSizeWithGutter(),")")}},{key:"getTransformForWeekdayLabels",value:function(){return this.props.horizontal?"translate(".concat(N,", ").concat(this.getMonthLabelSize(),")"):null}},{key:"getTransformForMonthLabels",value:function(){return this.props.horizontal?"translate(".concat(this.getWeekdayLabelSize(),", 0)"):"translate(".concat(this.getWeekWidth()+M,", ").concat(this.getWeekdayLabelSize(),")")}},{key:"getTransformForAllWeeks",value:function(){return this.props.horizontal?"translate(".concat(this.getWeekdayLabelSize(),", ").concat(this.getMonthLabelSize(),")"):"translate(0, ".concat(this.getWeekdayLabelSize(),")")}},{key:"getViewBox",value:function(){return this.props.horizontal?"0 0 ".concat(this.getWidth()," ").concat(this.getHeight()):"0 0 ".concat(this.getHeight()," ").concat(this.getWidth())}},{key:"getSquareCoordinates",value:function(e){return this.props.horizontal?[0,e*this.getSquareSizeWithGutter()]:[e*this.getSquareSizeWithGutter(),0]}},{key:"getWeekdayLabelCoordinates",value:function(e){return this.props.horizontal?[0,(e+1)*N+e*this.props.gutterSize]:[e*N+e*this.props.gutterSize,N]}},{key:"getMonthLabelCoordinates",value:function(e){if(this.props.horizontal)return[e*this.getSquareSizeWithGutter(),this.getMonthLabelSize()-M];var t=-2;return[0,(e+1)*this.getSquareSizeWithGutter()+t]}},{key:"handleClick",value:function(e){this.props.onClick&&this.props.onClick(e)}},{key:"handleMouseOver",value:function(e,t){this.props.onMouseOver&&this.props.onMouseOver(e,t)}},{key:"handleMouseLeave",value:function(e,t){this.props.onMouseLeave&&this.props.onMouseLeave(e,t)}},{key:"renderSquare",value:function(t,r){var n=this;if((r<this.getNumEmptyDaysAtStart()||r>=this.getNumEmptyDaysAtStart()+this.getDateDifferenceInDays())&&!this.props.showOutOfRangeDays)return null;var a=h(this.getSquareCoordinates(t),2),s=a[0],i=a[1],u=this.getValueForIndex(r),l=e.createElement("rect",o({key:r,width:N,height:N,x:s,y:i,className:this.getClassNameForIndex(r),onClick:function(){return n.handleClick(u)},onMouseOver:function(e){return n.handleMouseOver(e,u)},onMouseLeave:function(e){return n.handleMouseLeave(e,u)}},this.getTooltipDataAttrsForIndex(r)),e.createElement("title",null,this.getTitleForIndex(r))),c=this.props.transformDayElement;return c?c(l,u,r):l}},{key:"renderWeek",value:function(t){var r=this;return e.createElement("g",{key:t,transform:this.getTransformForWeek(t),className:"".concat(T,"week")},L(S).map((function(e){return r.renderSquare(e,t*S+e)})))}},{key:"renderAllWeeks",value:function(){var e=this;return L(this.getWeekCount()).map((function(t){return e.renderWeek(t)}))}},{key:"renderMonthLabels",value:function(){var t=this;return this.props.showMonthLabels?L(this.getWeekCount()-1).map((function(r){var n=C(t.getStartDateWithEmptyDays(),(r+1)*S),a=h(t.getMonthLabelCoordinates(r),2),o=a[0],s=a[1];return n.getDate()>=1&&n.getDate()<=S?e.createElement("text",{key:r,x:o,y:s,className:"".concat(T,"month-label")},t.props.monthLabels[n.getMonth()]):null})):null}},{key:"renderWeekdayLabels",value:function(){var t=this;return this.props.showWeekdayLabels?this.props.weekdayLabels.map((function(r,n){var a=h(t.getWeekdayLabelCoordinates(n),2),o=a[0],s=a[1],i="".concat(t.props.horizontal?"":"".concat(T,"small-text")," ").concat(T,"weekday-label");return 1&n?e.createElement("text",{key:"".concat(o).concat(s),x:o,y:s,className:i},r):null})):null}},{key:"render",value:function(){return this.valueCache=this.getValueCache(this.props),e.createElement("svg",{className:"react-calendar-heatmap",viewBox:this.getViewBox()},e.createElement("g",{transform:this.getTransformForMonthLabels(),className:"".concat(T,"month-labels")},this.renderMonthLabels()),e.createElement("g",{transform:this.getTransformForAllWeeks(),className:"".concat(T,"all-weeks")},this.renderAllWeeks()),e.createElement("g",{transform:this.getTransformForWeekdayLabels(),className:"".concat(T,"weekday-labels")},this.renderWeekdayLabels()))}}]),u}(e.Component);return z.propTypes={values:b.arrayOf(b.shape({date:b.oneOfType([b.string,b.number,b.instanceOf(Date)]).isRequired}).isRequired).isRequired,numDays:b.number,startDate:b.oneOfType([b.string,b.number,b.instanceOf(Date)]),endDate:b.oneOfType([b.string,b.number,b.instanceOf(Date)]),gutterSize:b.number,horizontal:b.bool,showMonthLabels:b.bool,showWeekdayLabels:b.bool,showOutOfRangeDays:b.bool,tooltipDataAttrs:b.oneOfType([b.object,b.func]),titleForValue:b.func,classForV
1alue:b.func,monthLabels:b.arrayOf(b.string),weekdayLabels:b.arrayOf(b.string),onClick:b.func,onMouseOver:b.func,onMouseLeave:b.func,transformDayElement:b.func},z.defaultProps={numDays:null,startDate:E(200),endDate:new Date,gutterSize:1,horizontal:!0,showMonthLabels:!0,showWeekdayLabels:!1,showOutOfRangeDays:!1,tooltipDataAttrs:null,titleForValue:null,classForValue:function(e){return e?"color-filled":"color-empty"},monthLabels:j,weekdayLabels:_,onClick:null,onMouseOver:null,onMouseLeave:null,transformDayElement:null},z}(r(67294))},14428:function(e,t,r){"use strict";var n=r(67294),a={restoreOnUnmount:!1};t.Z="undefined"!==typeof document?function(e,t){void 0===t&&(t=a);var r=(0,n.useRef)(document.title);document.title!==e&&(document.title=e),(0,n.useEffect)((function(){return t&&t.restoreOnUnmount?function(){document.title=r.current}:void 0}),[])}:function(e){}}},function(e){e.O(0,[774,888,179],(function(){return t=56702,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.