(self["webpackJsonp@lyrio/ui"]=self["webpackJsonp@lyrio/ui"]||[]).push([[23],{733:function(e,t,r){"use strict";var a=r(29),c=r(19),n=r(1),i=r(0),s=r.n(i),o=r(246),u=r(932),b=r.n(u),f=r.p+"4e86f36b9f5e22d0f6a9b02f5e4b4180.svg",l=r(9);var v=function(e){var t=Object(i.useState)(!1),r=Object(c.a)(t,2),s=r[0],u=r[1],b=e.imageSize||{mini:35,tiny:80,small:150,medium:300,large:450,big:600,huge:800,massive:960}[e.size]||80,v=function(e,t){switch(e.type){case"gravatar":return"".concat((a=l.a.serverPreference.misc.gravatarCdn,a.endsWith("/")?a:"".concat(a,"/")),"avatar/").concat(e.key,"?size=").concat(t,"&default=404");case"qq":var r;return r=t<=40?1:t<=100?3:t<=140?4:5,"https://q1.qlogo.cn/g?b=qq&nk=".concat(e.key,"&s=").concat(r);case"github":return"https://github.com/".concat(e.key,".png?size=").concat(t)}var a}(e.userAvatar,Math.ceil(window.devicePixelRatio*b)),j=Object(i.useRef)();Object(i.useEffect)((function(){j.current=v})),j.current!==v&&s&&u(!1);var g=Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(c.a)(e,1)[0];return!["userAvatar","placeholder","imageSize","errorRef"].includes(t)})));return s||e.placeholder?Object(n.jsx)(o.a,Object(a.a)({src:f},g)):Object(n.jsx)(o.a,Object(a.a)(Object(a.a)({src:v},g),{},{onError:function(){u(!0),e.onError&&e.onError()}}))};t.a=s.a.memo(v,b.a)}}]);
//# sourceMappingURL=23.3f096676.chunk.js.map