{"version":3,"sources":["webpack:///./src/components/course_tree/CourseTreeNodeCommentSection.vue?65e2","webpack:///./src/components/course_tree/CourseTreeNodeCommentSection.vue","webpack:///./src/components/course_tree/CourseTreeNodeCommentSection.vue?bf64","webpack:///./src/components/course_tree/node_detail/LessonNodeDetail.vue?2e12","webpack:///./src/components/course_tree/node_detail/LessonNodeDetail.vue","webpack:///./src/components/course_tree/node_detail/LessonNodeDetail.vue?4906"],"names":["_hoisted_1","class","_hoisted_2","key","style","_hoisted_3","_hoisted_4","_hoisted_5","render","_ctx","_cache","$props","$setup","$data","$options","_component_Btn","_component_Message","_component_MessageEditor","comments","length","$t","shownComments","expanded","onClick","$event","size","variant","default","_","comment","id","user","canDelete","message","created","onDeleteMessage","onDelete","posting","postingComment","onSendMessage","onAddComment","resolveFn","rejectFn","name","mixins","props","nodeId","type","String","required","loadingComments","Boolean","data","methods","mainStore","createCourseTreeNodeComment","courseId","commentId","confirm","deleteCourseNodeComment","this","hasPrivileges","MANAGE_MATERIAL","computed","getCommentsByNodeId","slice","components","Btn","MessageEditor","Message","__exports__","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_component_SlotSkeleton","_component_router_link","_component_Timestamp","_component_CopyToClipboard","_component_ProcessedTextFragment","_component_CourseTreeNode","_component_CourseTreeNodeCommentSection","firstLoading","to","params","node","state","LessonNodeState","DRAFT","PUBLISHED","lessonTitle","creator","full_name","value","canEdit","onEdit","outline","tooltip","permalink","body","loadingChildren","children","child","onDeleteNode","$emit","Object","Array","emits","fromFirstPage","title","Timestamp","ProcessedTextFragment","SlotSkeleton","CourseTreeNode","CopyToClipboard","CourseTreeNodeCommentSection"],"mappings":"gIAEMA,EAAa,CAAEC,MAAO,+BACtBC,EAAa,CACjBC,IAAK,EACLF,MAAO,qCACPG,MAAO,CAAC,gBAAgB,OAAO,YAAY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aAAc1F,OACjF,KAAM,GAAI,CAAC,cAEf,UAGR,yBAAamE,EAAyC,CACpDzC,gBAAiBzC,EAAKyC,gBACtBjD,MAAO,OACP6C,OAAQrC,EAAKsF,KAAKjE,IACjB,KAAM,EAAG,CAAC,kBAAmB,gB,gKClJ3B,iBAAgB,CAC9Ba,KAAM,mBACNC,OAAQ,CAAC,OAAc,OAAW,QAClCC,MAAO,gBACNkD,KAAM,CACLhD,KAAMoE,OACNlE,UAAU,GAEX8D,SAAU,CACThE,KAAMqE,MACNzF,QAAS,iBAAM,MAEb,QAEJ0F,MAAO,kBACH,QAEJjE,KAjB8B,WAkB7B,MAAO,CACN6C,gBAAA,SAGF/D,QAtB8B,WAuB7B0B,KAAKsD,MAAM,eAAgB,CAAEnB,KAAMnC,KAAKmC,KAAMuB,eAAe,IAC7D1D,KAAKsD,MAAM,eAAgBtD,KAAKmC,OAEjC1C,QAAS,CACRoD,OADQ,WAEP7C,KAAKsD,MAAM,WAAYtD,KAAKmC,QAG9BhC,SAAU,CACTqC,YADS,WAER,OAAOxC,KAAKmC,KAAKwB,OAAS,eAAE,gCAG9BrD,WAAY,CACXsD,YAAA,KACAC,wBAAA,KACAtD,MAAA,KACAuD,eAAA,KACAC,iBAAA,KACAC,kBAAA,KACAC,+BAAA,Q,qBC1DF,MAAMvD,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS9D,KAErD","file":"js/chunk-59f6d71c.594df214.js","sourcesContent":["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__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeClass as _normalizeClass, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, mergeProps as _mergeProps } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"mt-6\"\n}\nconst _hoisted_2 = {\n key: 1,\n class: \"mt-2\"\n}\nconst _hoisted_3 = { class: \"mb-4\" }\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons-outlined\" }, \"chevron_left\", -1)\nconst _hoisted_5 = { class: \"flex items-start md:items-center\" }\nconst _hoisted_6 = { class: \"flex md:flex-row flex-col md:space-x-2 w-full\" }\nconst _hoisted_7 = { class: \"flex flex-col md:mt-0 mt-1\" }\nconst _hoisted_8 = {\n style: {\"line-height\":\"1.1\"},\n class: \"mb-0 hidden md:block\"\n}\nconst _hoisted_9 = {\n style: {\"line-height\":\"1.1\"},\n class: \"mb-0 md:hidden\"\n}\nconst _hoisted_10 = { class: \"flex space-x-2 ml-0.5\" }\nconst _hoisted_11 = {\n key: 0,\n class: \"text-sm\"\n}\nconst _hoisted_12 = {\n key: 1,\n class: \"text-muted text-sm\"\n}\nconst _hoisted_13 = { class: \"ml-auto flex items-center\" }\nconst _hoisted_14 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-xl material-icons\" }, \" edit \", -1)\nconst _hoisted_15 = { class: \"mx-2 md:mx-4\" }\nconst _hoisted_16 = { class: \"mt-8\" }\nconst _hoisted_17 = { class: \"mt-12\" }\nconst _hoisted_18 = { key: 0 }\nconst _hoisted_19 = { 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_SlotSkeleton = _resolveComponent(\"SlotSkeleton\")!\n const _component_Btn = _resolveComponent(\"Btn\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Timestamp = _resolveComponent(\"Timestamp\")!\n const _component_CopyToClipboard = _resolveComponent(\"CopyToClipboard\")!\n const _component_ProcessedTextFragment = _resolveComponent(\"ProcessedTextFragment\")!\n const _component_CourseTreeNode = _resolveComponent(\"CourseTreeNode\")!\n const _component_CourseTreeNodeCommentSection = _resolveComponent(\"CourseTreeNodeCommentSection\")!\n\n return (_ctx.firstLoading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_SlotSkeleton),\n _createVNode(_component_SlotSkeleton, { class: \"mb-4 mt-2\" }),\n _createVNode(_component_SlotSkeleton)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(_component_router_link, {\n to: { name: 'CourseTreeDispatcher', params: { courseId: _ctx.courseId } }\n }, {\n default: _withCtx(() => [\n _createVNode(_component_Btn, {\n size: 'xs',\n variant: 'primary-borderless'\n }, {\n default: _withCtx(() => [\n _hoisted_4,\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t(\"course_tree.back_to_tree\")), 1)\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"to\"])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", {\n style: {\"min-width\":\"3.5rem\",\"max-width\":\"3.5rem\"},\n class: _normalizeClass([\"flex rounded-full w-14 h-14 mr-3\", {\n\t\t\t\t\t'bg-gray-200': _ctx.node.state === _ctx.LessonNodeState.DRAFT,\n\t\t\t\t\t'bg-primary bg-opacity-15': _ctx.node.state === _ctx.LessonNodeState.PUBLISHED,\n\t\t\t\t}])\n }, [\n _createElementVNode(\"span\", {\n style: {\"font-size\":\"40px !important\"},\n class: _normalizeClass([\"m-auto material-icons-outlined\", {\n\t\t\t\t\t\t'text-gray-500': _ctx.node.state === _ctx.LessonNodeState.DRAFT,\n\t\t\t\t\t\t'text-primary': _ctx.node.state === _ctx.LessonNodeState.PUBLISHED,\n\t\t\t\t\t}])\n }, \"book\", 2)\n ], 2),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"h1\", _hoisted_8, _toDisplayString(_ctx.lessonTitle), 1),\n _createElementVNode(\"h3\", _hoisted_9, _toDisplayString(_ctx.lessonTitle), 1),\n _createElementVNode(\"div\", _hoisted_10, [\n (_ctx.node.creator)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_11, _toDisplayString(_ctx.node.creator.full_name), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_Timestamp, {\n \"date-only\": true,\n class: \"text-sm text-muted\",\n value: _ctx.node.created\n }, null, 8, [\"value\"]),\n (_ctx.node.state === _ctx.LessonNodeState.DRAFT)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_12, _toDisplayString(_ctx.$t(\"course_tree.draft\")), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_13, [\n (_ctx.canEdit)\n ? (_openBlock(), _createBlock(_component_Btn, {\n key: 0,\n onClick: _ctx.onEdit,\n variant: 'icon',\n outline: true,\n class: \"icon-btn-primary hover:opacity-100 transition-opacity duration-100 ease opacity-50\",\n tooltip: _ctx.$t('misc.edit')\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n }, 8, [\"onClick\", \"tooltip\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_CopyToClipboard, {\n class: \"hover:opacity-100 transition-opacity duration-100 ease opacity-50\",\n \"icon-only\": true,\n tooltip: _ctx.$t('exercise_solution.share'),\n value: _ctx.permalink\n }, null, 8, [\"tooltip\", \"value\"])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(_component_ProcessedTextFragment, {\n value: _ctx.node.body\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_17, [\n (_ctx.loadingChildren)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n _createVNode(_component_SlotSkeleton),\n _createVNode(_component_SlotSkeleton)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_19, [\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 onDeleteNode: _cache[0] || (_cache[0] = ($event: any) => (_ctx.$emit('deleteNode', $event)))\n }), null, 16, [\"node\"])\n ]))\n }), 128))\n ])\n ]),\n _createVNode(_component_CourseTreeNodeCommentSection, {\n loadingComments: _ctx.loadingComments,\n class: \"mt-8\",\n nodeId: _ctx.node.id\n }, null, 8, [\"loadingComments\", \"nodeId\"])\n ])\n ]))\n}","\nimport Btn from \"@/components/ui/Btn.vue\";\nimport CopyToClipboard from \"@/components/ui/CopyToClipboard.vue\";\nimport Dialog from \"@/components/ui/Dialog.vue\";\nimport ProcessedTextFragment from \"@/components/ui/ProcessedTextFragment.vue\";\nimport SlotSkeleton from \"@/components/ui/skeletons/SlotSkeleton.vue\";\nimport Timestamp from \"@/components/ui/Timestamp.vue\";\nimport { getTranslatedString as _ } from \"@/i18n\";\nimport { courseIdMixin, loadingMixin, nodeMixin } from \"@/mixins\";\nimport {\n\tCourseTreeNode as ICourseTreeNode,\n\tFileNode,\n\tLessonNode,\n\tLessonNodeState,\n} from \"@/models\";\nimport { defineComponent, PropType } from \"@vue/runtime-core\";\nimport CourseTreeNodeCommentSection from \"../CourseTreeNodeCommentSection.vue\";\nimport LessonNodeEditor from \"../editors/LessonNodeEditor.vue\";\nimport CourseTreeNode from \"../node/CourseTreeNode.vue\";\nimport { nodeEmits, nodeProps } from \"../shared\";\nexport default defineComponent({\n\tname: \"LessonNodeDetail\",\n\tmixins: [loadingMixin, nodeMixin, courseIdMixin],\n\tprops: {\n\t\tnode: {\n\t\t\ttype: Object as PropType,\n\t\t\trequired: true,\n\t\t},\n\t\tchildren: {\n\t\t\ttype: Array as PropType,\n\t\t\tdefault: () => [],\n\t\t},\n\t\t...nodeProps,\n\t},\n\temits: {\n\t\t...nodeEmits,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tLessonNodeState,\n\t\t};\n\t},\n\tcreated() {\n\t\tthis.$emit(\"loadChildren\", { node: this.node, fromFirstPage: true });\n\t\tthis.$emit(\"loadComments\", this.node);\n\t},\n\tmethods: {\n\t\tonEdit() {\n\t\t\tthis.$emit(\"editNode\", this.node);\n\t\t},\n\t},\n\tcomputed: {\n\t\tlessonTitle() {\n\t\t\treturn this.node.title || _(\"course_tree.unnamed_lesson\");\n\t\t},\n\t},\n\tcomponents: {\n\t\tTimestamp,\n\t\tProcessedTextFragment,\n\t\tBtn,\n\t\tSlotSkeleton,\n\t\tCourseTreeNode,\n\t\tCopyToClipboard,\n\t\tCourseTreeNodeCommentSection,\n\t},\n});\n","import { render } from \"./LessonNodeDetail.vue?vue&type=template&id=4ae4f86a&ts=true\"\nimport script from \"./LessonNodeDetail.vue?vue&type=script&lang=ts\"\nexport * from \"./LessonNodeDetail.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":""}