1"use strict";(globalThis.webpackChunkhkg_web_mui=globalThis.webpackChunkhkg_web_mui||[]).push([[3165],{33424:(e,t,a)=>{a.d(t,{CO:()=>o,Fz:()=>c,pT:()=>l});var s=a(78239);function i(e){let t=JSON.parse(localStorage.getItem("history"));if(!t)return null;let a=null;return t.forEach(function(t){t.id===e&&(a=t)}),a}function l(e,t){let a=i(e),s=0;return a&&a.totalReplies&&a.totalReplies<t&&(s=t-a.totalReplies),s}function o(e,t){let a=i(e);return a&&a.lastReplyDate?a.lastReplyDate<t?s.lD.NEWREPLY:s.lD.READ:s.lD.DEFAULT}function c(e){let t=i(e),a=1;return t&&t.lastSeenPage&&(a=t.lastSeenPage),a}},43165:(e,t,a)=>{a.r(t),a.d(t,{default:()=>A});var s=a(15917),i=a(62566),l=a(81966),o=a(74447),c=a(92185),n=a(78239),r=a(33424),d=a(17063),m=a.n(d),h=a(46472),u=a(71382),p=a(84863),g=a(43206),E=a(35457);const k=(0,g.TH)(()=>a.e(3901).then(a.bind(a,93901))),I=(0,g.TH)(()=>a.e(3540).then(a.bind(a,83540)));class S extends s.PureComponent{constructor(){super(...arguments),this.state={},this.listRef=s.createRef(),this.onScrollEvent=m()(()=>{window.pageYOffset+window.innerHeight>=document.body.scrollHeight-n._9&&this.state.fetchStatus===n.su.FINISH&&this.loadMoreItems()},n.Ac),this.refresh=async()=>{await this.init()}}async componentDidMount(){await this.init(),window.addEventListener("scroll",this.onScrollEvent)}componentWillUnmount(){window.removeEventListener("scroll",this.onScrollEvent)}componentDidUpdate(e){e.id!==this.props.id&&this.init()}
1async init(){document.body.scrollTop=0,document.documentElement.scrollTop=0,await(0,E.G)(this,{fetchStatus:n.su.INIT});const{page:e,id:t,sensorMode:a}=this.props;try{let s=await o.A.getPostHistory(t,e,true,a);if(s.result){s=s.data;const t=s.maxPage;this.loadedFirstPage=e,this.loadedLastPage=e,await(0,E.G)(this,{maxPage:t,list:s.list.map(e=>new c.A({id:e.id,thumbnailBig:e.thumbnailBig,thumbnailSmall:e.thumbnailSmall,cacheThumbnail:e.cacheThumbnail,forum:e.forum,title:e.title,authorId:e.authorId,authorName:e.authorName,authorGender:e.authorGender,authorClass:e.authorClass,lastReplyDate:e.lastReplyDate,totalReplies:e.totalReplies,limitMember:e.limitMember,marksGood:e.marksGood,marksBad:e.marksBad,rating:e.rating,totalPage:e.totalPage,isBookmarked:e.isBookmarked,isBlocked:e.isBlocked,topicStatus:(0,r.CO)(e.id,e.lastReplyDate)})),fetchStatus:e<t?n.su.FINISH:n.su.REACHEND})}}catch(s){(0,h.Q)("\u932f\u8aa4",s),await(0,E.G)(this,{fetchStatus:n.su.FAILED})}}loadMoreItems(){this.setState({fetchStatus:n.su.APPEND},async()=>{const e=this.loadedLastPage+1;try{let t=await o.A.getPostHistory(this.props.id,e,true,this.props.sensorMode);if(t.result){t=t.data,this.loadedLastPage=e;const a=t.maxPage;let s=t.list.map(e=>new c.A({id:e.id,thumbnailBig:e.thumbnailBig,thumbnailSmall:e.thumbnailSmall,cacheThumbnail:e.cacheThumbnail,forum:e.forum,title:e.title,authorId:e.authorId,authorName:e.authorName,authorGender:e.authorGender,authorClass:e.authorClass,lastReplyDate:e.lastReplyDate,totalReplies:e.totalReplies,limitMember:e.limitMember,marksGood:e.marksGood,marksBad:e.marksBad,rating:e.rating,totalPage:e.totalPage,isBookmarked:e.isBookmarked,isBlocked:e.isBlocked,topicStatus:(0,r.CO)(e.id,e.lastReplyDate)}));s=s.filter(e=>void 0===this.state.list.find(t=>{let{id:a}=t;return e.id===a})),this.setState({maxPage:a,list:this.state.list.concat(s),fetchStatus:e<a?n.su.FINISH:n.su.REACHEND})}}catch(t){(0,h.Q)("\u932f\u8aa4",t),this.setState({fetchStatus:n.su.APPENDFAILED})}})}render(){const{classes:e,id:t}=this.props,{fetchStatus:a,list:i}=this.state;return s.createElement("div",{ref:this.listRef,className:e._listViewContainer},s.createElement("div",{className:e._listView},a===n.su.INIT&&s.createElement(k,null),s.createElement(l.default,{page:1,topics:i,showTag:!0,highlightAuthorId:t,ignoreBlock:!0}),this.renderFooter()))}renderFooter(){const{classes:e}=this.props;switch(this.state.fetchStatus){case n.su.INIT:break;case n.su.FAILED:return s.createElement("div",{className:e._retry,onClick:this.refresh},"\u91cd\u65b0\u8f09\u5165\u5217\u8868");case n.su.APPENDFAILED:return s.createElement("div",{className:e._retry,onClick:this.loadMoreItems},"\u6309\u6b64\u91cd\u8a66\u8f09\u5165\u66f4\u591a");case n.su.APPEND:return s.createElement(I,null);case n.su.REACHEND:return s.createElement("div",{className:e._listViewFooter},"\u7121\u66f4\u591a\u8cbc\u6587\u7d00\u9304");default:return s.createElement(I,null)}}}S.defaultProps={page:1};const A=(0,i.connect)(e=>({sensorMode:e.getIn(["configs","sensorMode"])}))((0,p.A)(e=>({...(0,u.A)(e)}))(S))},71382:(e,t,a)=>{a.d(t,{A:()=>s});const s=e=>({_listViewContainer:{...e.mixins.noHighlight,display:"flex",width:"100%",float:"none"},_listView:{display:"flex",flex:1,flexDirection:"column"},_listViewFooter:{width:"100%",textAlign:"center",margin:`${e.spacing(1)}px 0`},_topicList:{},_textLink:{cursor:"pointer","[data-theme=DF] &":{color:e.palette.custom.text.normal.light,"&:hover":{color:e.palette.custom.text.hover.light}},"[data-theme=DK] &":{color:e.palette.custom.text.normal.dark,"&:hover":{color:e.palette.custom.text.hover.dark}},"[data-theme=DB] &":{color:e.palette.custom.text.normal.darkblue,"&:hover":{color:e.palette.custom.text.hover.darkblue}}},_retry:{padding:e.spacing(1),textAlign:"center",cursor:"pointer",fontWeight:"bold"}})},81966:(e,t,a)=>{a.r(t),a.d(t,{default:()=>M});var s=a(15917),i=a(46430),l=a(72345),o=a(92725),c=a(78239),n=a(76700),r=a(86371),d=a(62566),m=a(97589),h=a(91869),u=a(20464),p=a(69819),g=a(46666),E=a(47780),k=a(25553),I=a.n(k),S=a(84863),A=a(78232);class w extends s.PureComponent{render(){const{classes:e,newReplyNum:t}=this.props;return s.createElement("span",{className:e.newReplyBadge},t)}}const f=(0,S.A)(e=>({newReplyBadge:{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",background:"#faad14",color:"#fff",top:-e.spacing(.75),right:0,minWidth:24,height:24,borderRadius:12,fontSize:12,whiteSpace:"nowrap",zIndex:1,padding:`0 ${e.spacing(1)}px`,"[data-iframe-fullscreen] &":{display:"none !important"}}}))(w);var T=a(70856),N=a(11436),v=a(50423),y=a(56187),b=a(9626),B=a(5378);class L extends s.PureComponent{constructor(){super(...arguments),this.state={checked:!1,topicStatus:this.props.topic.topicStatus,newReplyNum:this.props.topic.newReplyNum,tempShowBlock:!1},this.changeSelected=()=>{this.setState({checked:!this.state.checked},()=>{this.state.checked?this.props.addItemToSelectedList(this.props.topic.id):this.props.removeItemFromSelectedList(this.props.topic.id)})},this.updateTopicStatus=()=>{this.setState({topicStatus:c.lD.READ,newReplyNum:0})},this.changeTempShowBlock=()=>{this.setState({tempShowBlock:!this.state.tempShowBlock})},this.renderNumBadge=()=>this.state.newReplyNum&&parseInt(this.state.newReplyNum)>0?s.createElement(f,{newReplyNum:this.state.newReplyNum}):null,this.renderTopicItemContent=()=>{const{topicStatus:e}=this.state,{classes:t,editMode:a,topic:d,showTag:h,highlightAuthorId:u,compact:p,isModal:g}=this.props,{authorGender:E,authorName:k,authorClass:S,lastReplyDate:w,totalReplies:f,limitMember:L,marksGood:D,marksBad:C,rating:P,forum:R,title:x,totalPage:M,id:F,isBookmarked:_,rated:U,status:H}=d,$=P||D-C,z=$&&$<0,G=R?o.J[R].title:"",O=R?o.J[R].shortTerm:"",V=H===y.Is.LIVE,J=H===y.Is.ENDEDLIVE,W=H===y.Is.DELETED;return s.createElement("div",{className:t.badgeItemWrapper},this.renderNumBadge(),s.createElement("div",{className:I()(`${t._hoverItem} ${t.classicTopicItem}`,{[t.classicTopicItemCompact]:p}),onClick:a?this.changeSelected:void 0},s.createElement(l.A,{className:t.link,to:a?"#":{pathname:`${B.A.THREAD.replace(":id",F)}`,title:x,forumTitle:G,isBookmarked:_,rated:U,modal:g,fromTopicList:!0,highlightAuthorId:u},onClick:a?void 0:this.updateTopicStatus}),a&&s.createElement("div",{className:t._deleteItem},s.createElement(r.Ay,{type:(this.state.checked?"":"un")+"checked"})),s.createElement("div",{className:t.fixedTopic},s.createElement("div",{className:I()(t.topicMeta,{[t.topicMetaCompact]:p})},s.createElement("div",null,s.createElement(T.A,{status:e}),s.createElement("summary",{className:t[(0,n.Hd)(E,S)]},k),V||J||W?s.createElement(v.A,{isLive:V,endLive:J,isDeleted:W}):s.createElement(m.A,{placement:"right",title:w.format(c.DT)},s.createElement("small",null,w.fromNow()))),s.createElement("div",null,s.createElement("small",null,s.createElement(r.Ay,{type:"go-reply"}),f),s.createElement(A.A,{mdUp:!0},z?s.createElement("small",null,s.createElement(r.Ay,{type:"bad-line"}),Math.abs($)):s.createElement("small",null,s.createElement(r.Ay,{type:"good-line"}),$),L===b.uK.PUBLIC&&s.createElement("div",{className:`${t.publicTag} ${t.publicTagMobile}`},s.createElement("div",null,"\u516c\u6d77")),h&&s.createElement("div",{className:`${t.channelTag} ${t.channelTagMobile}`},s.createElement("div",null,O))),s.createElement(A.A,{smDown:!0},s.createElement("small",null,s.createElement(r.Ay,{type:"good-line"}),D),s.createElement("small",null,s.createElement(r.Ay,{type:"bad-line"}),C)))),s.createElement("div",{className:I()(t.classicTopicName,t.topicNameSizeMode,{[t.classicTopicNameCompact]:p})},s.createElement("div",{className:t.topicNameTitle},x,s.createElement(A.A,{smDown:!0},s.createElement(i.A,{clickable:!a,inTitle:!0,totalPage:M,id:F,title:x,highlightAuthorId:u,updateTopicStatus:this.updateTopicStatus}))),s.createElement(A.A,{mdUp:!0},s.createElement(N.A,{totalPage:M,id:F,title:x,updateTopicStatus:this.updateTopicStatus,highlightAuthorId:u})))),s.createElement(A.A,{smDown:!0},L===b.uK.PUBLIC&&s.createElement("div",{className:`${t.publicTag} ${t.publicTagWeb}`},s.createElement("div",null,"\u516c\u6d77")),h&&s.createElement("div",{className:`${t.channelTag} ${t.channelTagWeb}`},s.createElement("div",null,R&&o.J[R].title)))))}}static getDerivedStateFromProps(e,t){return t.checked&&!e.editMode?{checked:!1}
1:null}render(){const{hideBlock:e,classes:t,ignoreBlock:a,topic:i,isInBlockList:l,isInUnBlockList:o,compact:c}=this.props,{tempShowBlock:n}=this.state,{authorName:r,isBlocked:d}=i;return e&&(l||d)?null:s.createElement(s.Fragment,null,(d||l)&&!o&&!a&&s.createElement("div",{className:I()(`${t._clickableItem} ${t._showBlockedUser}`,{[t.showBlockedUserCompact]:c}),onClick:this.changeTempShowBlock},n?"Hide":"Show"," Blocked User - ",r),(a||!d&&!l||o||n)&&this.renderTopicItemContent())}}const D=(0,d.connect)((e,t)=>{const a=e.getIn(["configs","blockList"]),s=e.getIn(["configs","unblockList"]),i=e.getIn(["configs","postView"]);return{hideBlock:e.getIn(["configs","hideBlock"]),isInBlockList:!!a&&a.includes(t.topic.authorId),isInUnBlockList:!!s&&s.includes(t.topic.authorId),isModal:i}})((0,S.A)(e=>({...(0,h.A)(e),...(0,E.A)(e),...(0,p.A)(e),...(0,u.A)(e),...(0,g.A)(e)}))(L));var C=a(74518),P=a(88024),R=a(13042);class x extends s.PureComponent{constructor(){super(...arguments),this.state={currentPage:1,hasMore:!0},this.selectedList=[],this.addItemToSelectedList=e=>{this.selectedList.push(e)},this.removeItemFromSelectedList=e=>{this.selectedList.splice(this.selectedList.indexOf(e),1)}}clearList(){this.selectedList=[]}render(){const{editMode:e,ignoreBlock:t,topics:a,showTag:i,forum:l,highlightAuthorId:n,compact:r,showAd:d}=this.props;let m=-1,h=c.FE||c.Op?y.cX.MOBILE_TOPIC_ITEM:r?y.cX.CLASSIC_COMPACT_TOPIC:y.cX.CLASSIC_TOPIC;return a?a.map((a,u)=>(u+1)%h===0?(m++,s.createElement("div",{key:a.id},s.createElement(D,{topic:a,showTag:i||o.J[l]&&o.J[l].channelTag,editMode:e,addItemToSelectedList:this.addItemToSelectedList,removeItemFromSelectedList:this.removeItemFromSelectedList,highlightAuthorId:n,compact:r,ignoreBlock:t}),d&&s.createElement(C.A,{classic:!0,compact:r,xlargeSizes:[[1,1],[728,90],[728,200],[728,250],[900,250]],largeSizes:[[1,1],[728,90],[728,200],[728,250]],smallSizes:[[1,1],[300,250],[336,280]],largeSizeAdUnit:P.U2.list[m%P.U2.list.length].adUnit,smallSizeAdUnit:P.hc.list[m%P.hc.list.length].adUnit,largeSizeSlotId:`${P.U2.slotId}-${m}`,smallSizeSlotId:`${P.hc.slotId}-${m}`,adSizeBreakpoint:c.FE?R.w.breakpoints.values.md:1264,xlAdSizeBreakpoint:c.FE?R.w.breakpoints.values.lg:1440,largeKiwiAdHeight:P.U2.list[m%P.U2.list.length].kiwiAdHeight,smallKiwiAdHeight:P.hc.list[m%P.U2.list.length].kiwiAdHeight}))):s.createElement(D,{key:a.id,topic:a,showTag:i||o.J[l]&&o.J[l].channelTag,editMode:e,addItemToSelectedList:this.addItemToSelectedList,removeItemFromSelectedList:this.removeItemFromSelectedList,highlightAuthorId:n,compact:r,ignoreBlock:t})):null}}const M=x}}]);
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.