"use strict";(self.webpackChunk_cocalc_static=self.webpackChunk_cocalc_static||[]).push([[6470],{62208:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(60804),c=n(92497),a=n(89526),o=n(46800),i=n.n(o),u=n(43809);const l=function(e){var t=e.actions,n=e.author,o=e.avatar,l=e.children,s=e.className,d=e.content,f=e.prefixCls,h=e.datetime,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(r=Object.getOwnPropertySymbols(e);c<r.length;c++)t.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(e,r[c])&&(n[r[c]]=e[r[c]])}return n}(e,["actions","author","avatar","children","className","content","prefixCls","datetime"]),v=a.useContext(u.E_),b=v.getPrefixCls,x=v.direction,p=b("comment",f),E=o?a.createElement("div",{className:"".concat(p,"-avatar")},"string"==typeof o?a.createElement("img",{src:o,alt:"comment-avatar"}):o):null,g=t&&t.length?a.createElement("ul",{className:"".concat(p,"-actions")},t.map((function(e,t){return a.createElement("li",{key:"action-".concat(t)},e)}))):null,w=(n||h)&&a.createElement("div",{className:"".concat(p,"-content-author")},n&&a.createElement("span",{className:"".concat(p,"-content-author-name")},n),h&&a.createElement("span",{className:"".concat(p,"-content-author-time")},h)),N=a.createElement("div",{className:"".concat(p,"-content")},w,a.createElement("div",{className:"".concat(p,"-content-detail")},d),g),y=i()(p,(0,c.Z)({},"".concat(p,"-rtl"),"rtl"===x),s);return a.createElement("div",(0,r.Z)({},m,{className:y}),a.createElement("div",{className:"".concat(p,"-inner")},E,N),l?function(e,t){return a.createElement("div",{className:i()("".concat(e,"-nested"))},t)}(p,l):null)}},43682:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(89526),c=function(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0};function a(e){void 0===e&&(e={});var t=e.onResize,n=(0,r.useRef)(void 0);n.current=t;var a=e.round||Math.round,o=(0,r.useRef)(),i=(0,r.useState)({width:void 0,height:void 0}),u=i[0],l=i[1],s=(0,r.useRef)(!1);(0,r.useEffect)((function(){return function(){s.current=!0}}),[]);var d,f,h,m,v,b,x=(0,r.useRef)({width:void 0,height:void 0}),p=(d=(0,r.useCallback)((function(t){return o.current&&o.current.box===e.box&&o.current.round===a||(o.current={box:e.box,round:a,instance:new ResizeObserver((function(t){var r=t[0],o="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",i=c(r,o,"inlineSize"),u=c(r,o,"blockSize"),d=i?a(i):void 0,f=u?a(u):void 0;if(x.current.width!==d||x.current.height!==f){var h={width:d,height:f};x.current.width=d,x.current.height=f,n.current?n.current(h):s.current||l(h)}}))}),o.current.instance.observe(t,{box:e.box}),function(){o.current&&o.current.instance.unobserve(t)}}),[e.box,a]),f=e.ref,h=(0,r.useRef)(null),m=(0,r.useRef)(null),v=(0,r.useRef)(),b=(0,r.useCallback)((function(){var e=null;h.current?e=h.current:f&&(e=f instanceof HTMLElement?f:f.current),m.current&&m.current.element===e&&m.current.reporter===b||(v.current&&(v.current(),v.current=null),m.current={reporter:b,element:e},e&&(v.current=d(e)))}),[f,d]),(0,r.useEffect)((function(){b()}),[b]),(0,r.useCallback)((function(e){h.current=e,b()}),[b]));return(0,r.useMemo)((function(){return{ref:p,width:u.width,height:u.height}}),[p,u?u.width:null,u?u.height:null])}}}]);