(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{1007:function(e,t,n){"use strict";var r=n(2),a=n(3),o=n.n(a),c=n(11),i=n.n(c),s=Array.from(Array(12),(function(e,t){return Object(r.b)("span",{className:"Spinner-blade-12"},t)}));function l(e){var t=e.className,n=e.white,a=e.large;return Object(r.b)("div",{className:i()("Spinner-blade",t,{"Spinner-blade--large":a,"Spinner-blade--white":n}),children:s})}l.propTypes={className:o.a.string,large:o.a.bool,white:o.a.bool};var u=l;t.a=u},1013:function(e,t,n){e.exports=n(369),e.exports.CJKSpace=n(1273).CJKSpace},1017:function(e,t,n){"use strict";n.d(t,"b",(function(){return N})),n.d(t,"a",(function(){return d}));var r=n(3),a=n.n(r),o=n(1),c=n(11),i=n.n(c),s=n(177),l=n(5),u=function(e){var t=e.title,n=e.subtitle,r=e.attrInfo,a=e.coverUrl,o=e.avatarUrl,c=e.avatarFit;return Object(l.g)("div",null,a&&Object(l.g)("div",{className:"HoverCard-coverContainer"},Object(l.g)("img",{className:"HoverCard-cover",src:a,alt:"cover"})),Object(l.g)("div",{className:i()("HoverCard-titleContainer",{"HoverCard-titleContainer--noAvatar":!a})},o&&Object(l.g)(s.a,{size:68,className:"HoverCard-avatar",url:o,imgFit:c}),Object(l.g)("div",{className:i()("HoverCard-titleText",{"HoverCard-titleText--noAvatar":!o})},Object(l.g)("div",{className:"HoverCard-title"},t),n&&Object(l.g)("div",{className:"HoverCard-subtitle"},n)),r&&Object(l.g)("div",{className:"HoverCard-attrInfo"},r)))};u.propTypes={title:a.a.node,subtitle:a.a.node,attrInfo:a.a.node,coverUrl:a.a.string,avatarUrl:a.a.string,avatarFit:a.a.oneOf(["fill","contain","cover","none","scale-down"])};var d=u,p=n(20),f=n.n(p),h=n(21),b=n.n(h),m=n(22),v=n.n(m),g=n(23),O=n.n(g),j=n(13),y=n.n(j),w=n(33),C=n.n(w),k=n(41),E=n.n(k),R=n(83),M=n.n(R),x=n(375),S=n(138);function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var a=y()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return O()(this,n)}}var I=function(e){v()(n,e);var t=T(n);function n(){var e;f()(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};r.a.dispatch("ui/showToast",{icon:"fail",text:o(e)})}},1103:function(e,t,n){"use strict";var r=n(43),a=n(2),o=n(1),c=n(71),i=n.n(c),s=n(27),l=n(380),u=Object(s.connect)((function(e){return{hasData:e.emoticons.emoticonGroupList.length>0}}));t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alwaysShow,n=void 0!==t&&t;return function(e){return u(i()((function(t){var c=t.hasData,i=Object(o.useState)(!1),u=Object(r.a)(i,2),d=u[0],p=u[1],f=Object(s.useDispatch)();return Object(o.useEffect)((function(){c?p(!0):f(Object(l.d)()).then((function(e){var t=e.payload.data[0].id;f(Object(l.e)(t)),p(!0)})).catch((function(){p(!0)}))}),[f,c]),(!d||!n)&&Object(a.b)(e,Object.assign({},t))}),e))}}},1116:function(e,t,n){"use strict";var r=n(14),a=n(15),o=n(16),c=n(17),i=n(9),s=n(2),l=n(1),u=n(27),d=n(19),p=n(3),f=n.n(p),h=n(11),b=n.n(h),m=n(262),v=n.n(m),g=n(78),O=n(232),j=n(380),y=n(36),w=n(234),C=n(1066),k=n(43),E=n(156);function R(e){var t,n,r,a,o,c,i,u,d,p=e.className,f=e.emoticonGroupList,h=e.curEmoticonGroupId,m=e.onGroupSelected,v=e.vipEnabled,O=Object(l.useRef)(),j=Object(E.a)(v,f),y=(t=O,n=Object(l.useState)({left:null,x:null}),r=Object(k.a)(n,2),a=r[0],o=r[1],c=Object(l.useState)(!1),i=Object(k.a)(c,2),u=i[0],d=i[1],{onMouseDown:Object(g.c)((function(e){var n;d(!0);var r=null===(n=t.current)||void 0===n?void 0:n.scrollLeft,a=e.clientX;o({left:r,x:a}),e.preventDefault()})),onMouseMove:Object(g.c)((function(e){if(u){var n=e.clientX-a.x;t.current&&(t.current.scrollLeft=a.left-n)}})),onMouseUp:Object(g.c)((function(){u&&d(!1)}))});return Object(s.b)("div",{className:b()("EmoticonsFooter",p),children:Object(s.b)("ul",Object.assign({className:"EmoticonsFooter-items",ref:O},y,{children:j.map((function(e){return Object(s.b)("li",{className:b()("EmoticonsFooter-item",{"EmoticonsFooter-item--selected":h===e.id}),onClick:function(){m(e.id)},children:Object(s.b)("img",{src:e.iconUrl,className:"EmoticonsFooter-itemIcon"})},e.id)}))}))})}var M=n(1007);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(i.a)(e);if(t){var a=Object(i.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var S=function(e){Object(o.a)(n,e);var t=x(n);function n(){var e;Object(r.a)(this,n);for(var a=arguments.length,o=new Array(a),c=0;c0&&!$,te=U&&U[0];if(null==Q?void 0:Q.length)t=Object(l.c)(L,{children:[Object(l.b)("a",{href:"".concat(S.E,"/account/verification/intro"),target:"_blank",rel:"noopener noreferrer",css:{marginRight:".3em"},children:Object(l.b)(w.a,{})}),Object(l.b)("div",{children:Q.slice(0,2).map((function(e){return e.description})).join(",")})]});else if(te){var ne=te.company,re=te.job;t=Object(l.c)(L,{children:[(ne||re)&&Object(l.b)(b.Box,{as:"span",mr:".3em",color:"GBL05A",children:Object(l.b)(v.a,{text:!0,center:!0})}),Object(l.c)("div",{children:[ne&&ne.name,ne&&re&&Object(l.b)(b.Box,{display:"inline-block",width:"1px",height:"10px",mx:"8px",bg:"GBK09A"}),re&&re.name]})]})}else t=null;return Object(l.c)(E.b,Object.assign({toggler:o,onOpen:this.handleOpen,isLoading:G,globalClose:!K,stickHover:K,preventCloseOnTarget:!0},f,{onRef:function(e){p&&"function"==typeof p&&p(e),n.hoverCardElement=e},children:[Object(l.b)(E.a,{coverUrl:F,title:Object(l.c)("span",{css:{display:"flex"},children:[Object(l.b)(T.a,{user:c,noHoverCard:!0}),Object(l.b)(B.a,{isFollowed:D,isFollowing:V})]}),subtitle:j&&Object(l.b)(R.a,{inline:!0,html:j}),avatarUrl:C}),(t||Z||ee)&&Object(l.c)("div",{children:[t,Boolean(null==Z||null===(e=Z.topics)||void 0===e?void 0:e.length)&&Object(l.c)(L,{children:[Object(l.b)("span",{css:{marginRight:".3em"},children:Object(l.b)(w.b,{})}),Object(l.c)("div",{children:[Object(l.b)(N.a,{expandable:!1,noHoverCard:!0,topics:Z.topics,user:c}),"的优秀答主"]})]}),ee&&Object(l.c)(L,{color:"GBL05A",children:[Object(l.b)(b.Box,{mr:".3em",children:Object(l.b)(g.a,{text:!0,center:!0})}),Object(l.b)("div",{children:Object(l.c)(y.CJKSpace,{children:[d.map((function(e,t){return Object(l.c)(h.Link,{to:"//www.zhihu.com/".concat(O?"org":"people","/").concat(e.urlToken),target:"_blank",children:[e.name,t0&&void 0!==arguments[0]?arguments[0]:{},t=e.alwaysShow,n=void 0!==t&&t;return function(e){return c()((function(t){var o=Object(f.useState)(!1),c=Object(r.a)(o,2),l=c[0],u=c[1];return Object(f.useEffect)((function(){Object(s.c)()?u(!0):p().then((function(e){Object(s.e)(Object(i.camelizeKeys)(e)),u(!0)})).catch((function(){u(!0)}))}),[]),(l||n)&&Object(a.b)(e,Object.assign({},t))}),e)}}},1170:function(e,t,n){"use strict";var r=n(1),a=n.n(r),o=n(18),c=function(e){return a.a.createElement(o.a,e,a.a.createElement("defs",null,a.a.createElement("linearGradient",{id:"id-3811055512-a",x1:"11.015%",x2:"87.655%",y1:"18.594%",y2:"96.14%"},a.a.createElement("stop",{offset:"0%",stopColor:"#F2D9B6"}),a.a.createElement("stop",{offset:"100%",stopColor:"#BF8B43"}))),a.a.createElement("path",{fill:"url(#id-3811055512-a)",d:"M21.351 4.858A3.115 3.115 0 0 1 22.93 7.56v8.88a3.115 3.115 0 0 1-1.578 2.702l-7.774 4.44a3.185 3.185 0 0 1-3.154 0l-7.774-4.44A3.115 3.115 0 0 1 1.07 16.44V7.56c0-1.115.602-2.145 1.578-2.702l7.774-4.44a3.185 3.185 0 0 1 3.154 0l7.774 4.44zm-2.475 1.904L13.16 3.507a2.347 2.347 0 0 0-2.32 0L5.124 6.762a2.283 2.283 0 0 0-1.16 1.982v6.512c0 .817.442 1.573 1.16 1.982l5.716 3.255a2.347 2.347 0 0 0 2.32 0l5.716-3.255a2.283 2.283 0 0 0 1.16-1.982V8.744c0-.817-.442-1.573-1.16-1.982zm-9.874 4.13L12 5.76l2.998 5.131 2.466-2.12v6.343c0 .49-.4.886-.893.886H7.429a.89.89 0 0 1-.893-.887V8.771l2.466 2.12z"}))};c.defaultProps={name:"VIP"},t.a=c},1171:function(e,t,n){"use strict";var r=n(14),a=n(15),o=n(66),c=n(16),i=n(17),s=n(9),l=n(2),u=n(1),d=n(27),p=n(31),f=n(73),h=n(119),b=n(25);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var a=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var v=function(e){Object(c.a)(n,e);var t=m(n);function n(){var e;return Object(r.a)(this,n),(e=t.call(this)).handleShieldUser=e.handleShieldUser.bind(Object(o.a)(e)),e}return Object(a.a)(n,[{key:"handleShieldUser",value:function(){var e=this.props,t=e.dispatch,n=e.user.urlToken,r=e.onClose;t(Object(h.n)(n,!0)).then((function(){return t(Object(b.h)("屏蔽成功"))})),r()}},{key:"render",value:function(){var e=this.props,t=e.onClose,n=e.shown,r=e.user;return Object(l.b)(f.b,{onClose:t,title:"确定要屏蔽".concat(r.name,"?"),children:n&&Object(l.c)("div",{children:["屏蔽后,对方将不能关注你、向你发私信、评论你的实名回答、使用「@」提及你、邀请你回答问题,但仍然可以查看你的公开信息。",Object(l.c)(f.a,{direction:"horizontal",children:[Object(l.b)(p.c,{onClick:t,color:"grey",children:"取消"}),Object(l.b)(p.c,{preset:"primary",color:"blue",onClick:this.handleShieldUser,children:"确定"})]})]})})}}]),n}(u.Component);t.a=Object(d.connect)()(v)},1172:function(e,t,n){"use strict";var r=n(1),a=n.n(r),o=n(18),c=function(e){return a.a.createElement(o.a,e,a.a.createElement("path",{d:"M18.376 5.624c-3.498-3.499-9.254-3.499-12.752 0-3.499 3.498-3.499 9.254 0 12.752 3.498 3.499 9.254 3.499 12.752 0 3.499-3.498 3.499-9.14 0-12.752zm-1.693 1.693c2.37 2.37 2.596 6.094.678 8.69l-9.367-9.48c2.708-1.919 6.32-1.58 8.69.79zm-9.48 9.48c-2.37-2.37-2.595-6.095-.676-8.69l9.48 9.48c-2.822 1.918-6.433 1.58-8.803-.79z",fillRule:"evenodd"}))};c.defaultProps={name:"Ban"},t.a=c},1178:function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return y}));var r=n(2),a=n(1),o=n(389),c=n(1287),i=n(14),s=n(15),l=n(16),u=n(17),d=n(9),p=n(3),f=n.n(p),h=n(11),b=n.n(h);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(d.a)(e);if(t){var a=Object(d.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var v=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){var e=this.props,t=e.showReport,n=e.className,a=e.onReportClick,o=e.onMessageDelete;return Object(r.c)("ul",{className:b()("ActionMenu",n),children:[Object(r.b)("li",{className:"ActionMenu-item",onClick:o,children:"删除"}),t&&Object(r.b)("li",{className:"ActionMenu-item",onClick:a,children:"举报"})]})}}]),n}(a.Component);v.propsTypes={className:f.a.string,showReport:f.a.bool,onMessageDelete:f.a.func.isRequired,onReportClick:f.a.func.isRequired};var g=function(e,t){var n=e.isOpen,i=e.onToggleMenu,s=e.onDeleteClick,l=e.onReportClick,u=e.showReport;Object(a.useEffect)((function(){if(n)return window.addEventListener("wheel",i),function(){window.removeEventListener("wheel",i)}}),[n,i]);var d=Object(a.useCallback)((function(e){e.stopPropagation(),i()}),[i]);return Object(r.c)(r.a,{children:[Object(r.b)("button",{type:"button",onClick:d,"aria-label":"更多",ref:t,className:"Chat-ActionMenuPopover-Button",children:Object(r.b)(c.a,{className:"Message-status--more"})}),Object(r.b)(o.a,{isOpen:n,fixed:!0,arrowed:!0,target:null==t?void 0:t.current,children:Object(r.b)(v,{onMessageDelete:s,onReportClick:l,showReport:u})})]})},O=Object(a.forwardRef)(g),j=n(43),y=function(e){var t=e.handleDeleteClick,n=e.handleReportClick,o=e.showReport,c=Object(a.useState)(!1),i=Object(j.a)(c,2),s=i[0],l=i[1],u=Object(a.useRef)(),d=Object(a.useCallback)((function(){l((function(e){return!e}))}),[]),p=Object(a.useCallback)((function(){l(!1)}),[]),f=function(e){s&&u.current&&!u.current.contains(e.target)&&(l(!1),e.stopPropagation(),e.preventDefault())};return Object(a.useEffect)((function(){return document.addEventListener("click",f),function(){document.removeEventListener("click",f)}}),[s]),{popover:Object(r.b)(O,{ref:u,isOpen:s,onToggleMenu:d,onDeleteClick:t,onReportClick:n,showReport:o}),handleMouseLeave:p}}},1181:function(e,t,n){"use strict";var r=n(14),a=n(15),o=n(16),c=n(17),i=n(9),s=n(2),l=n(1),u=n(27),d=n(438),p=n(137),f=n(436),h=n(36);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(i.a)(e);if(t){var a=Object(i.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var m=function(e){Object(o.a)(n,e);var t=b(n);function n(){var e;Object(r.a)(this,n);for(var a=arguments.length,o=new Array(a),c=0;cR.d||n>R.d?a>1?{height:"".concat(R.d,"px"),minWidth:"".concat(R.g,"px")}:a<1?{width:"".concat(R.d,"px"),minHeight:"".concat(R.g,"px"),height:R.d*a}:{height:"".concat(R.d,"px"),width:"".concat(R.d,"px")}:{maxWidth:"".concat(R.d,"px"),maxHeight:"".concat(R.d,"px"),width:n,height:r}},e.isTempUrl=function(e){return e.startsWith("blob")},e.handleImageClick=function(t){var n=e.state.imageUrl;e.isTempUrl(n)||e.setState({previewImg:t.target})},e}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(){var e=this,t=this.props.image.url,n=this.state.imageUrl;t!==n&&Object(K.loadImage)(t).then((function(){e.setState({imageUrl:t}),URL.revokeObjectURL(n)}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.imageUrl,r=t.previewImg;return Object(s.c)("div",{children:[Object(s.b)("img",{className:b()("ImageMessage",{"ImageMessage--temp":this.isTempUrl(n)}),src:Object(K.imgUrl)(n,"hd"),onClick:this.handleImageClick,style:this.getImageStyle()}),r&&Object(s.b)(G.a,{className:"ImageMessage-ImageView",img:r,onClose:function(){return e.setState({previewImg:null})}})]})}}]),n}(l.Component);function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(i.a)(e);if(t){var a=Object(i.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}J.propTypes={image:f.a.shape({width:f.a.number,height:f.a.number,url:f.a.string})};var Q=function(e){Object(o.a)(n,e);var t=Z(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props.sticker.url;return Object(s.b)("img",{className:"StickerMessage",src:Object(K.imgUrl)(e,"xl")})}}]),n}(l.Component);Q.propTypes={sticker:f.a.shape({id:f.a.string,url:f.a.string})};var Y=n(7),X=n(942),$=n(232),ee=n(865),te=function(e){var t=e.result,n=e.isInMessage,r=e.onClick,a=t.name,o=t.coverPath,c=void 0===o?"https://i1.wp.com/pic4.zhimg.com/80/v2-231f5c4e7db8b6c08493a220be85705e_hd.png?ssl=1":o,i=t.className,s=void 0===i?"":i,l=t.intro;return u.a.createElement("div",{className:b()("KfeCollection-MessageEventCard",s,{"KfeCollection-MessageEventCard--InMessage":n}),onClick:r},u.a.createElement("img",{src:c,className:"KfeCollection-MessageEventCard-cover"}),u.a.createElement("div",{className:"KfeCollection-MessageEventCard-content"},u.a.createElement("div",{className:"KfeCollection-MessageEventCard-title"},a),u.a.createElement("div",{className:"KfeCollection-MessageEventCard-text"},l)))},ne=function(e){var t=e.result,n=e.onClick,r=e.isInMessage,a=void 0!==r&&r,o=e.hasClickZA,c=void 0===o||o,i=t.token,s=t.id;return u.a.createElement($.b,{block:"EcomMessageEventCard",content:{type:ee.e.event,id:s}},u.a.createElement($.e,{shouldTrackClick:c,zaType:"Card",zaAction:"Unknown",zaText:"留资卡片",zaEventType:"Unknown",onClick:function(e){c&&D.a.trackEvent(e.target,{id:a?9970:10048,action:"Click",name:"留资卡片"}),n(i)}},u.a.createElement(X.a,{options:[{},a?{card:{content:{id:String(s)}}}:{},{id:a?9968:10046,name:"留资卡片"}]},u.a.createElement(te,{result:t,isInMessage:a}))))};ne.propTypes={className:f.a.string,result:f.a.object.isRequired,extra:f.a.shape({ua:f.a.object,theme:f.a.string}).isRequired};var re=ne,ae=n(55),oe=n.n(ae),ce=n(128),ie=n(588);function se(){return(se=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ue,de=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t1024*Xe.R*1024)return n("请上传小于 ".concat(Xe.R,"M 的图片。"),"red"),!1},e.sendImage=function(t){var n=t.file;(0,e.props.handleSendImage)(n)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this,t=this.props.className;return Object(s.b)($e.a,{accept:"image/png,image/jpeg",onRef:function(t){e.uploadInput=t},customUpload:this.sendImage,beforeUpload:this.checkSize,multiple:!0,children:Object(s.b)(et.a,{className:t})})}}]),n}(l.Component);nt.propTypes={senderId:f.a.string,className:f.a.string,handleSendImage:f.a.func};var rt=Object(d.connect)(null,{showNotification:Te.h})(nt),at=n(1381),ot=n(1103),ct=n(1116);function it(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(i.a)(e);if(t){var a=Object(i.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var st=function(e){Object(o.a)(n,e);var t=it(n);function n(){var e;Object(r.a)(this,n);for(var a=arguments.length,o=new Array(a),c=0;c0&&t<=6e4&&(Object(mt.a)(null,{id:9980,action:"StatusReport"}),null==r||r())}));return Object(l.useEffect)((function(){if(n){var e=Date.now();s(e)}}),[s,n]),Object(k.i)(r,6e4),null};Nt.propTypes={endSignal:f.a.bool};var Pt=Nt;function _t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(i.a)(e);if(t){var a=Object(i.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var zt=function(e){Object(o.a)(n,e);var t=_t(n);function n(){var e;Object(r.a)(this,n);for(var a=arguments.length,o=new Array(a),c=0;c1024*Xe.R*1024)||(n("请上传小于 ".concat(Xe.R,"M 的图片。"),"red"),!1)},e.handleKeyDown=function(t){var n=e.props,r=n.inputMessage,a=n.senderId,o=n.inputValue;13===t.keyCode&&(t.ctrlKey||t.metaKey)?r({senderId:a,inputValue:"".concat(o,"\n")}):13!==t.keyCode||t.shiftKey||e.handleSendTextMessage(t)},e.handleSendImage=function(t){var n;if(t&&e.checkSize(t)){var r=e.props,a=r.uploadImage,o=r.sendMessage,c=r.senderId,i=r.addTempImageMessage,s=r.setImageSendFailure,l=Ze()("TempImage_");e.handleSetFirsetInteractive(),Object(Ye.a)(t).then((function(e){var n=URL.createObjectURL(e);Object(K.loadImage)(n).then((function(r){var u=r.height,d=r.width;i(c,n,l,u,d),a(e).then((function(e){return o({contentType:R.a.image,receiverId:c,data:{image:{height:e.payload.dataRawheight,width:e.payload.dataRawwidth,url:e.payload.src}},tempMessageId:l})})).catch((function(){s({tempMessageId:l,receiverId:c,file:t})}))}))})),null===(n=e.inputRef.current)||void 0===n||n.focus()}},e.handleSendEmoticon=function(t){var n,r=t.id,a=t.dynamicImageUrl,o=t.staticImageUrl,c=t.title,i=e.props,s=i.senderId,l=i.sendMessage;e.handleSetFirsetInteractive(),l({contentType:"sticker",receiverId:s,data:{sticker:{sticker_id:r,url:a||o,title:c}}}),D.a.trackEvent(null,{id:3640,action:"Click",name:c}),null===(n=e.inputRef.current)||void 0===n||n.focus()},e.handleSendTextMessage=function(t){var n=e.props,r=n.senderId,a=n.sendMessage,o=n.inputValue,c=n.location.query,i=c.source_type,s=c.source_id;o.length>1e4?P.a.alert("发送文字不得超过 1 万字,请重新编辑后再次发送",{title:"发送失败"}):o.trim()&&(e.handleSetFirsetInteractive(),t.preventDefault(),a({contentType:R.a.text,receiverId:r,data:{text:o},sourceType:i,sourceId:s}),D.a.trackEvent(null,{id:5309,action:"Click"}))},e.insertEmoji=function(t){var n,r=e.props,a=r.inputMessage,o=r.senderId,c=r.inputValue,i=e.state.cursorPosition,s=[c.slice(0,i),t,c.slice(i)].join("");e.setState({cursorPosition:i+t.length}),a({senderId:o,inputValue:s}),D.a.trackEvent(null,{id:3641,action:"Click",name:t.slice(1,t.length-1)}),null===(n=e.inputRef.current)||void 0===n||n.focus()},e.handleBlur=function(t){e.setState({cursorPosition:t.target.selectionStart})},e.handleInputMessage=function(t){var n=e.props;(0,n.inputMessage)({senderId:n.senderId,inputValue:t.target.value})},e.handleInputRef=function(t){e.inputRef.current=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.inputRef.current&&(this.inputRef.current.focus(),this.inputRef.current.addEventListener("keydown",this.handleKeyDown))}},{key:"componentWillUnmount",value:function(){this.inputRef.current&&this.inputRef.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"render",value:function(){var e=this.props,t=e.inputValue,n=e.senderId,r=e.sender;return(null==r?void 0:r.isForbidden)?Object(s.b)("div",{className:"InputBox",css:{justifyContent:"flex-end"},children:Object(s.b)("div",{className:"InputBox-footer",children:Object(s.c)("div",{className:"InputBox-footerDesc",css:{textAlign:"center",paddingRight:0},children:["要反馈",Object(s.b)(We.Link,{to:"/messages/3d198a56310c02c4a83efb9f4a4c027e",css:function(e){return{color:e.colors.GBK06A,fontWeight:"bold",paddingLeft:"4px"}},children:"@知乎小管家"})]})})}):Object(s.c)("div",{className:"InputBox",children:[Object(s.b)(Pt,{endSignal:this.state.firstInteractive}),Object(s.b)(It,{senderId:n,insertEmoji:this.insertEmoji,handleSendImage:this.handleSendImage,handleSendEmoticon:this.handleSendEmoticon,onHandleFirstInterActive:this.handleSetFirsetInteractive}),Object(s.b)(Qe.a,{multiline:!0,spread:!0,value:t,className:"InputBox-input",onRef:this.handleInputRef,onChange:this.handleInputMessage,onBlur:this.handleBlur}),Object(s.c)("div",{className:"InputBox-footer",children:[Object(s.b)("div",{className:"InputBox-footerDesc",children:"按 Enter 键发送"}),Object(s.b)(w.c,{preset:"primary",color:"blue",className:"InputBox-sendBtn",onClick:this.handleSendTextMessage,disabled:!t.trim(),children:"发送"})]})]})}}]),n}(l.Component);var At=Object(m.compose)(We.withRouter,Object(d.connect)((function(e,t){var n=t.senderId,r=(e.chat.chats[n]||{}).inputValue;return{inputValue:void 0===r?"":r}}),{sendMessage:O.p,inputMessage:O.m,uploadImage:_.b,addTempImageMessage:O.b,setImageSendFailure:O.q,showNotification:Te.h}))(zt),Lt=n(783);function Ut(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(i.a)(e);if(t){var a=Object(i.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var Ft=function(e){Object(o.a)(n,e);var t=Ut(n);function n(){var e;Object(r.a)(this,n);for(var a=arguments.length,o=new Array(a),c=0;cu?(d.height=s,p=s/u,d.width=l*p,d.left=o+(i-d.width)/2,d.top=c+(s-d.height)/2):lo.width?o.width:p.width,n=f.width/o.width,f.height=o.height*n,h={x:(p.width-f.width)/2+s,y:f.heightt.width?t.width:p.width,n=f.width/e.width,f.height=e.height*n,h={x:d.x-e.width/2,y:(f.heightr&&(a?Object(l.b)(h.c,{preset:"plain",onClick:this.onExpand,children:s}):s),"话题"]})}}]),n}(p.Component);g.propTypes={topics:d.a.array.isRequired,user:d.a.object,ellipsisLength:d.a.number,expandable:d.a.bool,noHoverCard:d.a.bool,privacyEnabled:d.a.bool,showPrivacyPage:d.a.bool},g.defaultProps={ellipsisLength:3,expandable:!0,noHoverCard:!1},t.a=g},957:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),a=n(1),o=n(399),c=function(e){var t=e.children,n=e.showPrivacyPage,c=e.authWrapperClassName,i=e.authChild,s=a.Children.only(t),l=i?a.Children.only(i):s;return n?Object(r.b)(o.a,{wrapperClassName:c,loginButton:l}):s}},961:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(20),a=n.n(r),o=n(21),c=n.n(o),i=n(22),s=n.n(i),l=n(23),u=n.n(l),d=n(13),p=n.n(d),f=n(1),h=n.n(f),b=n(11),m=n.n(b),v=n(111),g=n.n(v),O=n(5);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var a=p()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return u()(this,n)}}var y=function(e){s()(n,e);var t=j(n);function n(){var e;a()(this,n);for(var r=arguments.length,o=new Array(r),c=0;c