{"version":3,"sources":["webpack:///./src/components/course_tree/node/AnnouncementNode.vue?9f10","webpack:///./src/components/course_tree/node/AnnouncementNode.vue","webpack:///./src/components/course_tree/node/AnnouncementNode.vue?c233","webpack:///./src/components/course_tree/CourseTreeNodeCommentSection.vue?65e2","webpack:///./src/components/course_tree/CourseTreeNodeCommentSection.vue","webpack:///./src/components/course_tree/CourseTreeNodeCommentSection.vue?bf64"],"names":["_hoisted_1","key","class","_hoisted_2","_hoisted_3","_hoisted_4","style","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","xmlns","viewBox","_hoisted_18","d","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","render","_ctx","_cache","$props","$setup","$data","$options","_component_router_link","_component_Timestamp","_component_ProcessedTextFragment","_component_Btn","_component_CopyToClipboard","_component_CourseTreeNode","_component_CourseTreeNodeCommentSection","node","state","AnnouncementNodeState","DRAFT","isDraggable","PUBLISHED","to","name","params","nodeId","id","default","$t","_","creator","full_name","updatedOnDifferentDay","value","modified","bodyPreview","isTruncated","size","variant","onClick","$event","onShowMore","schedule_publish_at","canEdit","onEdit","outline","tooltip","onDelete","permalink","children","length","child","onDeleteNode","$emit","props","type","Object","required","mixins","created","this","fromFirstPage","data","emits","methods","computed","mainStore","paginatedChildrenByNodeId","body","Date","components","ProcessedTextFragment","Timestamp","Btn","CopyToClipboard","CourseTreeNode","CourseTreeNodeCommentSection","Avatar","__exports__","_component_Message","_component_MessageEditor","comments","shownComments","expanded","comment","user","canDelete","message","onDeleteMessage","posting","postingComment","onSendMessage","onAddComment","resolveFn","rejectFn","String","loadingComments","Boolean","createCourseTreeNodeComment","courseId","commentId","confirm","deleteCourseNodeComment","hasPrivileges","MANAGE_MATERIAL","getCommentsByNodeId","slice","MessageEditor","Message"],"mappings":"uIAEMA,EAAa,CACjBC,IA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U,GAEXuC,gBAAiB,CAChBzC,KAAM0C,QACNtE,SAAS,IAGXmC,KAb8B,WAc7B,MAAO,CACN4B,gBAAgB,EAChBP,UAAU,IAGZnB,QAAS,CACF4B,aADE,SACWL,EAAiBM,EAAuBC,GAAoB,+JAC9E,EAAKJ,gBAAiB,EADwD,kBAGvE,EAAKxB,UAAUgC,4BAA4B,CAChDC,SAAU,EAAKA,SACf1E,OAAQ,EAAKA,OACb2D,QAAS,eAA8BG,KANqC,OAQ7EM,IAR6E,mDAU7E,kCAAqB,EAAD,IACpBC,IAX6E,yBAa7E,EAAKJ,gBAAiB,EAbuD,+EAgBzE3C,SAjBE,SAiBOqD,GAAiB,2JAC1BC,QAAQ,eAAE,uCADkB,CAAF,yEAKxB,EAAKnC,UAAUoC,wBAAwB,CAC5CH,SAAU,EAAKA,SACf1E,OAAQ,EAAKA,OACb2E,cAR6B,0DAW9B,kCAAqB,EAAD,IAXU,4DAchCd,UA/BQ,SA+BEF,GACT,OACCxB,KAAK2C,cAAc,CAAC,OAAgBC,mBACpCpB,EAAQC,KAAK3D,IAAM,kCAItBuC,SAAU,iCACN,eAAU,kBAAc,oBADpB,IAEPgB,SAFS,WAGR,OAAOrB,KAAKM,UAAUuC,oBAAoB7C,KAAKnC,SAEhDyD,cALS,WAMR,OAAOtB,KAAKqB,SAAS/B,QAAU,GAAKU,KAAKuB,SACtCvB,KAAKqB,SACLrB,KAAKqB,SAASyB,OAAO,MAG1BpC,WAAY,CAAEG,MAAA,KAAKkC,gBAAA,KAAeC,UAAA,Q,qBC3EnC,MAAM9B,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS5E,KAErD","file":"js/chunk-5a25bc14.54abce37.js","sourcesContent":["import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, mergeProps as _mergeProps } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"opacity-0 group-hover:opacity-50 transition-opacity duration-100 ease absolute top-1/2 transform -translate-y-1/2 left-0 text-lg cursor-move drag-handle material-icons-outlined\"\n}\nconst _hoisted_2 = { class: \"flex flex-col items-start\" }\nconst _hoisted_3 = { class: \"flex items-start\" }\nconst _hoisted_4 = {\n style: {\"line-height\":\"0.95\"},\n class: \"mb-2 hover:text-primary hover:underline\"\n}\nconst _hoisted_5 = { class: \"-mt-2 flex flex-wrap ml-0.5\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"text-sm mr-2\"\n}\nconst _hoisted_7 = {\n key: 1,\n class: \"text-sm text-muted\",\n style: {\"margin-right\":\"3px\"}\n}\nconst _hoisted_8 = { class: \"md:mx-12 md:px-1 flex flex-col\" }\nconst _hoisted_9 = { class: \"mt-2 flex flex-col space-y-1\" }\nconst _hoisted_10 = { class: \"flex flex-wrap items-end\" }\nconst _hoisted_11 = { class: \"text-base\" }\nconst _hoisted_12 = { class: \"group-hover:opacity-100 transition-opacity duration-100 ease opacity-50 ml-auto flex items-center\" }\nconst _hoisted_13 = {\n key: 0,\n class: \"text-muted mr-4\"\n}\nconst _hoisted_14 = {\n key: 0,\n class: \"flex items-center space-x-1 text-sm\"\n}\nconst _hoisted_15 = { class: \"md:block hidden\" }\nconst _hoisted_16 = { class: \"block md:hidden\" }\nconst _hoisted_17 = {\n style: {\"width\":\"20px\",\"fill\":\"currentColor\"},\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}\nconst _hoisted_18 = /*#__PURE__*/_createElementVNode(\"path\", { d: \"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\" }, null, -1)\nconst _hoisted_19 = [\n _hoisted_18\n]\nconst _hoisted_20 = {\n key: 1,\n class: \"md:block hidden\"\n}\nconst _hoisted_21 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-xl material-icons\" }, \" edit \", -1)\nconst _hoisted_22 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-xl material-icons\" }, \" delete \", -1)\nconst _hoisted_23 = {\n key: 1,\n class: \"mt-4 hidden-in-dragging-element md:mx-12 md:px-0.5\"\n}\nconst _hoisted_24 = { class: \"grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-6\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Timestamp = _resolveComponent(\"Timestamp\")!\n const _component_ProcessedTextFragment = _resolveComponent(\"ProcessedTextFragment\")!\n const _component_Btn = _resolveComponent(\"Btn\")!\n const _component_Avatar = _resolveComponent(\"Avatar\")!\n const _component_CopyToClipboard = _resolveComponent(\"CopyToClipboard\")!\n const _component_CourseTreeNode = _resolveComponent(\"CourseTreeNode\")!\n const _component_CourseTreeNodeCommentSection = _resolveComponent(\"CourseTreeNodeCommentSection\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([{ 'bg-light': _ctx.node.state === _ctx.AnnouncementNodeState.DRAFT }, \"group card card-border card-hoverable hover-shadow-elevation hover:border-transparent relative\"])\n }, [\n (_ctx.isDraggable)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \" drag_indicator \"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"flex rounded-full mr-3\", {\n\t\t\t\t\t\t'bg-gray-200': _ctx.node.state === _ctx.AnnouncementNodeState.DRAFT,\n\t\t\t\t\t\t'bg-primary bg-opacity-15': _ctx.node.state === _ctx.AnnouncementNodeState.PUBLISHED,\n\t\t\t\t\t}]),\n style: {\"min-width\":\"2.5rem\",\"max-width\":\"2.5rem\",\"min-height\":\"2.5rem\",\"max-height\":\"2.5rem\"}\n }, [\n _createElementVNode(\"span\", {\n style: {\"font-size\":\"28px !important\"},\n class: _normalizeClass([{\n\t\t\t\t\t\t\t'text-gray-500': _ctx.node.state === _ctx.AnnouncementNodeState.DRAFT,\n\t\t\t\t\t\t\t'text-primary': _ctx.node.state === _ctx.AnnouncementNodeState.PUBLISHED,\n\t\t\t\t\t\t}, \"m-auto material-icons-outlined\"])\n }, \"campaign\", 2)\n ], 2),\n _createElementVNode(\"div\", null, [\n _createVNode(_component_router_link, {\n to: { name: 'CourseTreeNodeDetailDispatcher', params: { nodeId: _ctx.node.id } }\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"h2\", _hoisted_4, _toDisplayString(_ctx.$t(\"course_tree.announcement_title\")), 1)\n ]),\n _: 1\n }, 8, [\"to\"]),\n _createElementVNode(\"div\", _hoisted_5, [\n (_ctx.node.creator)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, _toDisplayString(_ctx.node.creator.full_name), 1))\n : _createCommentVNode(\"\", true),\n (_ctx.updatedOnDifferentDay)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_7, _toDisplayString(_ctx.$t(\"misc.updated_on\")), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_Timestamp, {\n \"date-only\": true,\n class: \"text-sm text-muted\",\n value: _ctx.node.modified\n }, null, 8, [\"value\"])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(_component_ProcessedTextFragment, {\n class: \"truncated-in-dragging-element text-muted\",\n value: _ctx.bodyPreview\n }, null, 8, [\"value\"]),\n (_ctx.isTruncated)\n ? (_openBlock(), _createBlock(_component_Btn, {\n key: 0,\n size: 'xs',\n class: \"-ml-1\",\n variant: 'primary-borderless',\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.onShowMore()))\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(_ctx.$t(\"misc.show_more\")), 1)\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]),\n false\n ? (_openBlock(), _createBlock(_component_Avatar, {\n key: 0,\n user: _ctx.node.creator,\n class: \"ml-auto\"\n }, null, 8, [\"user\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_12, [\n (_ctx.node.state === _ctx.AnnouncementNodeState.DRAFT)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n (_ctx.node.schedule_publish_at)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n _createElementVNode(\"p\", _hoisted_15, _toDisplayString(_ctx.$t(\"course_tree.scheduled_for\")), 1),\n _createElementVNode(\"p\", _hoisted_16, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_17, _hoisted_19))\n ]),\n _createVNode(_component_Timestamp, {\n value: _ctx.node.schedule_publish_at\n }, null, 8, [\"value\"])\n ]))\n : (_openBlock(), _createElementBlock(\"p\", _hoisted_20, _toDisplayString(_ctx.$t(\"course_tree.draft\")), 1))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.canEdit)\n ? (_openBlock(), _createBlock(_component_Btn, {\n key: 1,\n onClick: _ctx.onEdit,\n variant: 'icon',\n outline: true,\n class: \"icon-btn-primary\",\n tooltip: _ctx.$t('misc.edit')\n }, {\n default: _withCtx(() => [\n _hoisted_21\n ]),\n _: 1\n }, 8, [\"onClick\", \"tooltip\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.canEdit)\n ? (_openBlock(), _createBlock(_component_Btn, {\n key: 2,\n class: \"mr-4\",\n onClick: _ctx.onDelete,\n variant: 'icon',\n outline: true,\n tooltip: _ctx.$t('misc.delete')\n }, {\n default: _withCtx(() => [\n _hoisted_22\n ]),\n _: 1\n }, 8, [\"onClick\", \"tooltip\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_CopyToClipboard, {\n \"icon-only\": true,\n tooltip: _ctx.$t('exercise_solution.share'),\n value: _ctx.permalink\n }, null, 8, [\"tooltip\", \"value\"])\n ])\n ]),\n (_ctx.children.length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_23, [\n _createElementVNode(\"div\", _hoisted_24, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.children, (child) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"\",\n key: child.id\n }, [\n _createVNode(_component_CourseTreeNode, _mergeProps(_ctx.$props, {\n node: child,\n isDraggable: false,\n onDeleteNode: _cache[1] || (_cache[1] = ($event: any) => (_ctx.$emit('deleteNode', $event)))\n }), null, 16, [\"node\"])\n ]))\n }), 128))\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_CourseTreeNodeCommentSection, {\n class: \"w-full md:ml- mt-6 hidden-in-dragging-element\",\n nodeId: _ctx.node.id\n }, null, 8, [\"nodeId\"])\n ], 2))\n}","\nimport Avatar from \"@/components/ui/Avatar.vue\";\nimport Btn from \"@/components/ui/Btn.vue\";\nimport CopyToClipboard from \"@/components/ui/CopyToClipboard.vue\";\nimport ProcessedTextFragment from \"@/components/ui/ProcessedTextFragment.vue\";\nimport Timestamp from \"@/components/ui/Timestamp.vue\";\nimport { getTranslatedString as _ } from \"@/i18n\";\nimport { courseIdMixin, nodeMixin } from \"@/mixins\";\nimport { AnnouncementNode, AnnouncementNodeState } from \"@/models\";\nimport { useMainStore } from \"@/stores/mainStore\";\nimport { sameDay } from \"@/utils\";\nimport { defineComponent, PropType } from \"@vue/runtime-core\";\nimport { mapStores } from \"pinia\";\nimport CourseTreeNodeCommentSection from \"../CourseTreeNodeCommentSection.vue\";\nimport { nodeEmits, nodeProps } from \"../shared\";\nimport CourseTreeNode from \"./CourseTreeNode.vue\";\nexport default defineComponent({\n\tname: \"AnnouncementNode\",\n\tprops: {\n\t\tnode: {\n\t\t\ttype: Object as PropType,\n\t\t\trequired: true,\n\t\t},\n\t\t...nodeProps,\n\t},\n\tmixins: [courseIdMixin, nodeMixin],\n\tcreated() {\n\t\tthis.$emit(\"loadChildren\", { node: this.node, fromFirstPage: true });\n\t\tthis.$emit(\"loadComments\", this.node);\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tAnnouncementNodeState,\n\t\t};\n\t},\n\temits: {\n\t\t...nodeEmits,\n\t},\n\tmethods: {\n\t\tonShowMore() {\n\t\t\t// TODO implement\n\t\t},\n\t\tonEdit() {\n\t\t\tthis.$emit(\"editNode\", this.node);\n\t\t},\n\t\tonDelete() {\n\t\t\tthis.$emit(\"deleteNode\", this.node);\n\t\t},\n\t},\n\tcomputed: {\n\t\t...mapStores(useMainStore),\n\t\tchildren() {\n\t\t\treturn this.mainStore.paginatedChildrenByNodeId[this.node.id]?.data ?? [];\n\t\t},\n\t\tbodyPreview() {\n\t\t\treturn this.node.body;\n\t\t},\n\t\tisTruncated() {\n\t\t\t// TODO implement\n\t\t\treturn false;\n\t\t},\n\t\tupdatedOnDifferentDay() {\n\t\t\t// TODO use moment\n\t\t\treturn !sameDay(new Date(this.node.created), new Date(this.node.modified));\n\t\t},\n\t},\n\t// eslint-disable-next-line vue/no-unused-components\n\tcomponents: {\n\t\tProcessedTextFragment,\n\t\tTimestamp,\n\t\tBtn,\n\t\tCopyToClipboard,\n\t\tCourseTreeNode,\n\t\tCourseTreeNodeCommentSection,\n\t\tAvatar,\n\t},\n});\n","import { render } from \"./AnnouncementNode.vue?vue&type=template&id=3a20c1ba&ts=true\"\nimport script from \"./AnnouncementNode.vue?vue&type=script&lang=ts\"\nexport * from \"./AnnouncementNode.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/tmp/build/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"flex items-center space-x-2\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"material-icons-outlined text-muted\",\n style: {\"margin-bottom\":\"-1px\",\"font-size\":\"22px !important\"}\n}\nconst _hoisted_3 = { key: 1 }\nconst _hoisted_4 = { class: \"text-base\" }\nconst _hoisted_5 = { class: \"w-full\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Btn = _resolveComponent(\"Btn\")!\n const _component_Message = _resolveComponent(\"Message\")!\n const _component_MessageEditor = _resolveComponent(\"MessageEditor\")!\n\n return (_openBlock(), _createElementBlock(\"div\", null, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_ctx.comments.length > 0)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, \"question_answer\"))\n : _createCommentVNode(\"\", true),\n (_ctx.comments.length > 0)\n ? (_openBlock(), _createElementBlock(\"h4\", _hoisted_3, _toDisplayString(_ctx.comments.length) + \" \" + _toDisplayString(_ctx.comments.length === 1\n\t\t\t\t\t\t? _ctx.$t(\"course_tree.node_comment_title\")\n\t\t\t\t\t\t: _ctx.$t(\"course_tree.node_comments_title\")), 1))\n : _createCommentVNode(\"\", true),\n (_ctx.shownComments.length < _ctx.comments.length || _ctx.expanded)\n ? (_openBlock(), _createBlock(_component_Btn, {\n key: 2,\n style: {\"margin-bottom\":\"-1px\"},\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.expanded = !_ctx.expanded)),\n size: 'xs',\n variant: 'primary-borderless'\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", _hoisted_4, _toDisplayString(_ctx.expanded ? _ctx.$t(\"misc.show_recent\") : _ctx.$t(\"misc.show_all\")), 1)\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.shownComments, (comment) => {\n return (_openBlock(), _createBlock(_component_Message, {\n key: comment.id,\n user: comment.user,\n canDelete: _ctx.canDelete(comment),\n message: comment.comment,\n class: _normalizeClass(comment.created),\n onDeleteMessage: ($event: any) => (_ctx.onDelete(comment.id))\n }, null, 8, [\"user\", \"canDelete\", \"message\", \"class\", \"onDeleteMessage\"]))\n }), 128))\n ]),\n _createVNode(_component_MessageEditor, {\n posting: _ctx.postingComment,\n onSendMessage: _cache[1] || (_cache[1] = ($event: any) => (_ctx.onAddComment($event.message, $event.resolveFn, $event.rejectFn)))\n }, null, 8, [\"posting\"])\n ]))\n}","\nimport { getTranslatedString as _ } from \"@/i18n\";\nimport { courseIdMixin, coursePrivilegeMixin, loadingMixin } from \"@/mixins\";\nimport { CoursePrivilege, getBlankCourseTreeNodeComment, NodeComment } from \"@/models\";\nimport { useMainStore } from \"@/stores/mainStore\";\nimport { useMetaStore } from \"@/stores/metaStore\";\nimport { getCurrentUserId, setErrorNotification } from \"@/utils\";\nimport { defineComponent } from \"@vue/runtime-core\";\nimport { mapStores } from \"pinia\";\nimport Message from \"../messaging/Message.vue\";\nimport MessageEditor from \"../messaging/MessageEditor.vue\";\nimport Btn from \"../ui/Btn.vue\";\nexport default defineComponent({\n\tname: \"CourseTreeNodeCommentSection\",\n\tmixins: [courseIdMixin, loadingMixin, coursePrivilegeMixin],\n\tprops: {\n\t\tnodeId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tloadingComments: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpostingComment: false,\n\t\t\texpanded: false,\n\t\t};\n\t},\n\tmethods: {\n\t\tasync onAddComment(message: string, resolveFn: () => void, rejectFn: () => void) {\n\t\t\tthis.postingComment = true;\n\t\t\ttry {\n\t\t\t\tawait this.mainStore.createCourseTreeNodeComment({\n\t\t\t\t\tcourseId: this.courseId,\n\t\t\t\t\tnodeId: this.nodeId,\n\t\t\t\t\tcomment: getBlankCourseTreeNodeComment(message),\n\t\t\t\t});\n\t\t\t\tresolveFn();\n\t\t\t} catch (e) {\n\t\t\t\tsetErrorNotification(e);\n\t\t\t\trejectFn();\n\t\t\t} finally {\n\t\t\t\tthis.postingComment = false;\n\t\t\t}\n\t\t},\n\t\tasync onDelete(commentId: string) {\n\t\t\tif (!confirm(_(\"course_tree.confirm_delete_comment\"))) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.mainStore.deleteCourseNodeComment({\n\t\t\t\t\tcourseId: this.courseId,\n\t\t\t\t\tnodeId: this.nodeId,\n\t\t\t\t\tcommentId,\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\tsetErrorNotification(e);\n\t\t\t}\n\t\t},\n\t\tcanDelete(comment: NodeComment) {\n\t\t\treturn (\n\t\t\t\tthis.hasPrivileges([CoursePrivilege.MANAGE_MATERIAL]) ||\n\t\t\t\tcomment.user.id == getCurrentUserId()\n\t\t\t);\n\t\t},\n\t},\n\tcomputed: {\n\t\t...mapStores(useMainStore, useMetaStore),\n\t\tcomments() {\n\t\t\treturn this.mainStore.getCommentsByNodeId(this.nodeId);\n\t\t},\n\t\tshownComments() {\n\t\t\treturn this.comments.length <= 2 || this.expanded\n\t\t\t\t? this.comments\n\t\t\t\t: this.comments.slice(-2);\n\t\t},\n\t},\n\tcomponents: { Btn, MessageEditor, Message },\n});\n","import { render } from \"./CourseTreeNodeCommentSection.vue?vue&type=template&id=65f97c64&ts=true\"\nimport script from \"./CourseTreeNodeCommentSection.vue?vue&type=script&lang=ts\"\nexport * from \"./CourseTreeNodeCommentSection.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/tmp/build/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}