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CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;QAED,gBAAgB;YACZ,mCAAmC;YACnC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QACnC,CAAC;KAgCJ,CAAA;IArfG;QADC,QAAQ,CAAC,EAAE,CAAC,UAAU,CAAC;wDAC4B;IAEpD;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;2DAC2B;IAE/C;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;2DAC2B;IAE/C;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;uDACuB;IAI3C;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;yDACuB;IAEzC;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;6DACkB;IAEpC;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;yDACc;IAEhC;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;wDACa;IAE/B;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;yDACc;IAvBvB,gBAAgB;QAF5B,OAAO;QACP,gCAAO,CAAC,+BAAgB,EAAE,gCAAgC,CAAC;OAC/C,gBAAgB,CA0f5B;IAAD,uBAAC;KAAA;AA1fY,4CAAgB","file":"","sourceRoot":"/","sourcesContent":["import { debounce, shallowEqual } from \"simba-utils\";\nimport { richNodesToCocosString, SentenceType } from \"../../../../avg/AVG\";\nimport { DummyLayout, DummyNode, DummyPrefab, DummyScrollView } from \"../../../../common/CCDummyObjects\";\nimport { CCPureView, CCView } from \"../../../../common/classbase/CCViewBase\";\nimport { NodePoolFactory } from \"../../../../common/utils/NodePoolFactory\";\nimport { GameConfig } from \"../../../../GameConfig\";\nimport { DirectionType } from \"../../../Enums\";\nimport { GuideViewParamModel } from \"../../presenter/GuideViewPresenter\";\nimport { RegView } from \"../../PresenterCCViewFactory\";\nimport { ChatListAutoNextPlot, ChatListItemProps, ChatListView, ChatListViewProps, ChatListViewType } from \"../type/ChatListView\";\nimport ChatBubbleView from \"./message/ChatBubbleView\";\n\nconst { ccclass, property } = cc._decorator;\n\nconst OtherBubblePrefab = \"prefab/ui/message/ChatBubble\";\nconst SelfBubblePrefab = \"prefab/ui/message/SelfChatBubble\";\n\n@ccclass\n@RegView(ChatListViewType, \"prefab/ui/message/ChatListView\")\nexport class ChatListViewImpl extends CCPureView<ChatListViewProps> implements ChatListView {\n //#region editor bindings\n // @property(cc.Label)\n // private titleLabel: cc.Label = DummyLabel;\n @property(cc.ScrollView)\n private scrollView: cc.ScrollView = DummyScrollView;\n @property(cc.Layout)\n private contentLayout: cc.Layout = DummyLayout;\n @property(cc.Prefab)\n private historyPrefab: cc.Prefab = DummyPrefab;\n @property(cc.Prefab)\n private endPrefab: cc.Prefab = DummyPrefab;\n // @property(cc.Node)\n // private noPlotPanel: cc.Node = DummyNode;\n @property(cc.Node)\n private nextPlotBtn: cc.Node = DummyNode;\n @property(cc.Node)\n private addLikeTemplate = DummyNode;\n @property(cc.Node)\n private bottomPanel = DummyNode;\n @property(cc.Node)\n private backRedDot = DummyNode;\n @property(cc.Node)\n private backBtnNode = DummyNode;\n\n private _timeoutTickerId: number = NaN;\n\n\n onCloseBtnClick() {\n GameConfig.isVerb = false;\n this.closeAction();\n }\n\n private closeAction = debounce(() => {\n this._props.onCloseBtnClick();\n }, 500, true);\n\n private _canProcessNextPlot = true;\n\n onNextPlotBtnClick() {\n if (!this._canProcessNextPlot) {\n // console.warn(\"click so frequently!\");\n return;\n }\n this.doNextPlot();\n let sTime: number = 0.6;//seconds\n this.setNextBtnUnClickAble();\n this._timeoutTickerId = setTimeout(() => {\n this._canProcessNextPlot = true;\n }, sTime * 1000) as unknown as number;\n }\n\n clearTimeoutTicker() {\n if (this._timeoutTickerId !== NaN) {\n clearTimeout(this._timeoutTickerId);\n this._timeoutTickerId = NaN;\n }\n }\n\n resumeNextBtnClickAble() {\n this.clearTimeoutTicker();\n this._canProcessNextPlot = true;\n }\n\n setNextBtnUnClickAble() {\n this.clearTimeoutTicker();\n this._canProcessNextPlot = false;\n }\n\n doNextPlot() {\n if (!ChatListAutoNextPlot) {\n let lastItem = this._props.items[this._props.items.length - 1];\n if (lastItem && lastItem.type === \"plot\" && (!this._props.isSentenceSelectVisible())) {\n this._props.onCompletePlot(this._lastSelect);\n this._lastSelect = undefined;\n } else { // 没有体力的情况下,可能为空列表\n this._props.onCompletePlot();\n }\n }\n }\n\n private _triggerLoading = true;\n onScrollEvent() {\n if (this.scrollView.getScrollOffset().y < -20 && this._triggerLoading) {\n this._triggerLoading = false;\n this._loading = true;\n }\n if (this.scrollView.getScrollOffset().y > 0) {\n this._triggerLoading = true;\n }\n }\n\n private _initing = true;\n private _itemNodes: (cc.Node | undefined)[] = [];\n\n private _loadingItems: ChatListItemProps[] = [];\n private _loading = false;\n private _firstLoad = false;\n private _newItems: ChatListItemProps[] = [];\n\n\n private _lastSelect?: number;\n private _firstReciveProps = true;\n\n onLoad() {\n this.createNodePools();\n // this.bindProp(\"title\", this.titleLabel, \"string\");\n this.bindProp(\"backRedDot\", this.backRedDot, \"active\");\n }\n\n open(parent: CCView) {\n super.open(parent);\n this._firstReciveProps = true;\n let widget = this.node.getComponent(cc.Widget);\n widget.enabled = true;\n widget.updateAlignment();\n widget.enabled = false;\n this.node.x = 720;\n this.node.runAction(cc.moveTo(0.2, 0, 0));\n this.bottomPanel.children[0].active = !ChatListAutoNextPlot;\n this.addLikeTemplate.active = false;\n this.resumeNextBtnClickAble();\n }\n\n closeAnimation() {\n return new Promise<void>((resolve) => {\n this.node.runAction(cc.sequence(cc.moveTo(0.2, 720, 0), cc.callFunc(resolve)));\n });\n }\n\n onPropsReceive() {\n (this._props as any).items = [...this._props.items];\n if (this._prevProps) {\n if (this._props.msgSceneId !== this._prevProps.msgSceneId || !this._prevProps.items.length) { // reload list\n this._props.onSetContent(undefined);\n\n // this.noPlotPanel.active = false;\n // this.nextPlotBtn.active = true;\n this.clearChatList();\n this._newItems = [];\n this._loadingItems = this._props.items.slice();\n this._loading = true;\n this._firstLoad = true;\n this._itemNodes.length = this._loadingItems.length;\n (this._props as any).items = [...this._props.items];\n }\n else if (!shallowEqual(this._props.items, this._prevProps.items)) { // update or add new items\n this._props.onSetContent(undefined);\n this._newItems = [];\n let lastItem: number = -1;\n let findIndex = this._props.items.length - 1;\n // 更新历史消息(新消息只在最后,前面的只有变更和删除)\n for (let i = this._prevProps.items.length - 1; i >= 0; i--) {\n let foundIndex = -1\n for (let j = findIndex; j >= 0; j--) {\n if (this._props.items[j].key === this._prevProps.items[i].key) {\n foundIndex = j\n }\n }\n if (foundIndex >= 0) {\n if (lastItem < 0) lastItem = foundIndex;\n if (this._prevProps.items[i] !== this._props.items[foundIndex]) {\n this.updateItem(i, this._prevProps.items[i], this._props.items[foundIndex]);\n }\n findIndex = foundIndex - 1;\n } else { // remove child\n let child = this._itemNodes[i];\n if (child) {\n this.removeChild(child);\n }\n this._itemNodes.splice(i, 1);\n }\n }\n // 新消息放到数组中异步加载\n for (let i = lastItem + 1; i < this._props.items.length; i++) {\n this._newItems.push(this._props.items[i]);\n }\n // if (this._newItems.length && this._newItems[this._newItems.length - 1].type === \"plot\") {// || this._newItems[this._newItems.length - 1].type === \"history\"\n // // this.noPlotPanel.active = false;\n // this.nextPlotBtn.active = true;\n // }\n } else {\n let item = this._props.items[this._props.items.length - 1];\n if (item && item.type === \"plot\" && item.content.type === SentenceType.SELECT) {\n if (item.select === undefined) {\n // this.nextPlotBtn.active = false;\n this._props.onSetContent(item.content);\n } else {\n // this.nextPlotBtn.active = true;\n }\n }\n }\n if (this._firstReciveProps && !this._newItems.length && this._props.items.length) {//&& !this._loading \n // this.noPlotPanel.active = false;\n // this.nextPlotBtn.active = true;\n let item = this._props.items[this._props.items.length - 1];\n if (item.type === \"plot\") {\n if (ChatListAutoNextPlot && !(this._props.isSentenceSelectVisible())) {\n if (item.content.type === SentenceType.SELECT) {\n console.error(\"Invalid select sentence.\");\n this._props.onCompletePlot(0);\n } else {\n this._props.onCompletePlot();\n }\n }\n }\n else {\n // this.noPlotPanel.active = true;\n // this.nextPlotBtn.active = false;\n }\n }\n this._firstReciveProps = false;\n } else {\n if (this._props.items.length) {\n this._firstReciveProps = false;\n this._loadingItems = this._props.items.slice();\n }\n }\n let isShowNextPlot: boolean = false;\n if (this._props.items && this._props.items.length !== 0) {\n let judgeItem = this._props.items[this._props.items.length - 1];\n isShowNextPlot = judgeItem && judgeItem.type === \"plot\" && !(judgeItem.content.type === SentenceType.SELECT && judgeItem.select === undefined);\n }\n this.nextPlotBtn.active = isShowNextPlot;\n }\n\n private removeChild(child: cc.Node) {\n if ((child as any)._path) {\n NodePoolFactory.putNode(child);\n } else {\n child.destroy();\n }\n }\n\n private updateItem = (index: number, prevProp: ChatListItemProps, prop: ChatListItemProps) => {\n let child = this._itemNodes[index];\n if (!child) {\n if (index < this._loadingItems.length) {\n this._loadingItems.splice(index, 1, prop);\n } else {\n // console.log(\"some error happens.\")\n }\n return;\n }\n if (prevProp.type !== prop.type) {\n this.removeChild(child);\n let node = this.addItem(prop);\n node.setSiblingIndex(index);\n this._itemNodes[index] = node;\n } else {\n if (prop.type === \"plot\") {\n child.getComponent(ChatBubbleView).setContent(prop.id, prop.content, prop.select);\n }\n }\n if (index === this._itemNodes.length - 1) {\n this.contentLayout.updateLayout();\n this.scrollToBottom();\n }\n }\n\n update() {\n if (this._initing || !this.node.parent) return;\n if (this._loading && this._loadingItems.length) {\n for (let i = 0; i < 10; i++) {\n let item = this._loadingItems.pop();\n if (!item) { break; }\n this._itemNodes[this._loadingItems.length] = this.addItem(item, false, true);\n }\n this._loading = false;\n let height = this.contentLayout.node.height;\n this.contentLayout.updateLayout();\n if (this._firstLoad) {\n this._firstLoad = false;\n this.scrollToBottom(false);\n\n let lastItem = this._props.items[this._props.items.length - 1];\n if (lastItem.type === \"plot\") {\n if (ChatListAutoNextPlot && !(this._props.isSentenceSelectVisible())) {\n this._props.onCompletePlot();\n }\n }\n } else {\n this.scrollView.stopAutoScroll();\n let pos = this.scrollView.getContentPosition();\n pos.y += this.contentLayout.node.height - height;\n this.scrollView.setContentPosition(pos);\n }\n }\n if (this._newItems.length) {\n for (let i = 0; i < this._newItems.length - 1; i++) { // 正常情况只有一个新剧情\n this._itemNodes.push(this.addItem(this._newItems[i], false));\n }\n this._itemNodes.push(this.addItem(this._newItems[this._newItems.length - 1], true, false, this._itemNodes.length >= this._props.historyMsgCount));\n this.scheduleOnce(() => {\n this.scrollToBottom();\n });\n let lastItem = this._props.items[this._props.items.length - 1];\n if (lastItem.type !== \"plot\") {\n // this.noPlotPanel.active = true;\n // this.nextPlotBtn.active = false;\n } else {\n // this.noPlotPanel.active = false;\n // this.nextPlotBtn.active = true;\n }\n this._newItems = [];\n }\n }\n\n\n\n private addItem = (item: ChatListItemProps, newItem = true, unshift = false, delay?: boolean) => {\n let node: cc.Node;\n let promise: Promise<void> | undefined;\n if (!ChatListAutoNextPlot) delay = false;\n if (delay === undefined) delay = newItem;\n if (item.type === \"history\") {\n node = cc.instantiate(this.historyPrefab);\n node.parent = this.contentLayout.node;\n } else if (item.type === \"end\") {\n node = cc.instantiate(this.endPrefab);\n node.parent = this.contentLayout.node;\n } else if (item.type === \"plot\") { // 正常剧情\n if (item.isSelf) { // 自己\n node = NodePoolFactory.getNode(SelfBubblePrefab)!;\n node.parent = this.contentLayout.node;\n let comp = node.getComponent(ChatBubbleView);\n comp.setName(item.name!);\n comp.setIcon(item.icon!);\n comp.setNameIcon(item.nameSpr!);\n promise = comp.setContent(item.id, item.content, item.select, delay);\n node.x = 720 / 2 - 20;\n if (item.content.type === SentenceType.SELECT && item.select === undefined) {\n // this._sentenceSelector.node.active = true;\n // this._sentenceSelector.setContent(item.content);\n this._props.onSetContent(item.content);\n }\n else if (!item.addLike) {\n let preLike = node.getChildByName(\"Container\").getChildByName(\"LikeTip\");\n if (preLike) {\n preLike.active = false;\n }\n }\n } else if (item.name) { // 别人\n node = NodePoolFactory.getNode(OtherBubblePrefab)!;\n node.parent = this.contentLayout.node;\n let comp = node.getComponent(ChatBubbleView);\n comp.setName(item.name);\n comp.setIcon(item.icon!);\n comp.setNameIcon(item.nameSpr!);\n promise = comp.setContent(item.id, item.content, 0, delay);\n node.x = -720 / 2 + 20;\n if (item.addLike) {\n let likeNode = cc.instantiate(this.addLikeTemplate);\n // likeNode.active = true;\n likeNode.children[1].getComponent(cc.Label).string = \"+\" + item.addLike.toString();\n comp.setExtraContent(likeNode);\n }\n else {\n let preLike = node.getChildByName(\"Container\").getChildByName(\"LikeTip\");\n if (preLike) {\n preLike.active = false;\n }\n }\n } else { // 旁白\n node = new cc.Node();\n node.parent = this.contentLayout.node;\n node.x = 0;\n let label = node.addComponent(cc.RichText);\n label.horizontalAlign = cc.macro.TextAlignment.CENTER;\n label.fontSize = 18;\n label.lineHeight = 20;\n label.maxWidth = 650;\n if (item.content.type === SentenceType.TEXT) {\n label.string = richNodesToCocosString(item.content.value);\n }\n }\n } else if (item.type === \"customplot\") { // 送礼相关剧情\n if (item.content && !item.isSelf) {\n node = NodePoolFactory.getNode(OtherBubblePrefab)!;\n node.parent = this.contentLayout.node;\n let comp = node.getComponent(ChatBubbleView);\n comp.setName(item.name!);\n comp.setIcon(item.icon!);\n promise = comp.setContent(item.id, item.content, 0, false);\n node.x = -720 / 2 + 20;\n\n if (item.addLike) {\n let likeNode = cc.instantiate(this.addLikeTemplate);\n // likeNode.active = true;\n let lbl = likeNode.children[1].getComponent(cc.Label);\n lbl.string = \"+\" + item.addLike.toString();\n comp.setExtraContent(likeNode);\n }\n else {\n let preLike = node.getChildByName(\"Container\").getChildByName(\"LikeTip\");\n if (preLike) {\n preLike.active = false;\n }\n }\n } else {\n throw new Error(\"This should never happen.\");\n }\n } else {\n throw new Error(\"This should never happen.\");\n }\n\n if ((newItem || this._firstLoad) && promise) {\n promise.then(() => {\n this.scrollToBottom();\n if (ChatListAutoNextPlot && this.enabledInHierarchy && !(this._props.isSentenceSelectVisible())) {\n if (item.type === \"plot\") {\n if (item.content.type === SentenceType.SELECT) {\n console.error(\"Invalid select sentence.\");\n this._props.onCompletePlot(0);\n } else {\n this._props.onCompletePlot();\n }\n }\n }\n });\n }\n\n if (unshift) {\n node.setSiblingIndex(0);\n }\n return node;\n }\n\n createNodePools() {\n Promise.all([\n NodePoolFactory.createPool(OtherBubblePrefab, 10, \"ChatBubbleView\"),\n NodePoolFactory.createPool(SelfBubblePrefab, 5, \"ChatBubbleView\"),\n ]).then(() => {\n this._initing = false;\n });\n }\n\n scrollToBottom(animate = true) {\n if (this.contentLayout.node.height > this.scrollView.node.height && !this.scrollView.isScrolling()) {\n this.scrollView.stopAutoScroll();\n this.scrollView.scrollToBottom(animate ? 0.5 : undefined);\n }\n }\n\n scrollToTop() {\n this.scrollView.scrollToTop();\n }\n\n private clearChatList = () => {\n let children = this.contentLayout!.node.children;\n for (let child of children) {\n if ((child as any)._path) {\n NodePoolFactory.putNode(child);\n }\n }\n this._itemNodes = [];\n this.contentLayout.node.removeAllChildren();\n this.contentLayout.node.height = 0;\n this.contentLayout.node.y = 0;\n }\n\n close(destroy?: boolean) {\n if (!destroy) {\n let node = this._itemNodes[this._itemNodes.length - 1];\n if (node) {\n node.getComponent(ChatBubbleView)?.clearInputting();\n }\n }\n super.close(destroy);\n }\n\n onNameTitleClick() {\n // console.log(\"onNameTitleClick\");\n this._props.onNameTitleClick();\n }\n\n\n getGuideBackParam = (): GuideViewParamModel | undefined => {\n let node = this.backBtnNode;\n let wp = node.convertToWorldSpaceAR(cc.v2(0, 0));\n let m: GuideViewParamModel = {\n x: wp.x,\n y: wp.y,\n w: node.width - 20,\n h: node.height - 20,\n d: DirectionType.RIGHT,\n }\n return m;\n }\n\n resumeAll = () => {\n this.scheduleOnce(() => {\n this._initing = false;\n\n this._loadingItems = [];\n this._loading = false;\n this._firstLoad = false;\n this._newItems = [];\n\n\n this._lastSelect = undefined;\n this._firstReciveProps = true;\n this.clearChatList();\n });\n\n }\n}"]}