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mC,GAA5BkG,EAAYvE,MAAMnC,OAAckH,EAAiB,WAAWQ,aAAe,SAAWhB,EAAYvE,MAAMnC,OAAS,EAAI,KAAO0G,EAAYvE,MAAMnC,OAAS,IAAM,IACxK,OAAO0G,EAAYvE,MAAMnC,QAAU8G,EAAW9G,OAASkH,EAAiB,WAAWQ,aAAelH,CAAI,IAExG,SAASwG,IACoB,IAAvBf,EAAc9D,OAAoC,IAArBuE,EAAYvE,OAA2C,GAA5BuE,EAAYvE,MAAMnC,QAAe2F,EAAWxD,QAAU,KAA0BwF,MAG5IrH,EAAK,iBAAkB,IACvBA,EAAK,iBAAkB,IACvBA,EAAK,eAAgB,IACrBA,EAAK,cAAe,KAA0BqH,KAC9CrH,EAAK,eACP,CAKA,OAJA,SAAUsH,gBACFT,EAAaU,QAAQC,sBAC3B5B,EAAQ/D,MAAQgF,EAAaC,OAAOW,cAAc,IAE7C,CACLjB,aACAZ,UACAD,gBACAK,gBACAI,cACAG,sBACAG,cACAR,oBACAV,cACAH,aAEJ,G,UCjGF,MAAML,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAAS/F,GAAQ,CAAC,YAAY,qBAEzF,O","sources":["webpack://learning-center/./src/components/modules/search-bar.vue?4202","webpack://learning-center/./src/components/modules/search-bar.vue","webpack://learning-center/./src/components/modules/search-bar.vue?ff7a","webpack://learning-center/./src/components/modules/search-filter.vue?eaef","webpack://learning-center/./src/components/modules/search-filter.vue","webpack://learning-center/./src/components/modules/search-filter.vue?79a2"],"sourcesContent":["import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective } from \"vue\";\nconst _hoisted_1 = {\n class: \"searchbar\"\n};\nconst _hoisted_2 = {\n style: {\n \"position\": \"relative\"\n }\n};\nconst _hoisted_3 = {\n key: 0,\n class: \"search-tag-wrapper custom-scroll-bar-style\"\n};\nconst _hoisted_4 = [\"onClick\"];\nconst _hoisted_5 = [\"placeholder\"];\nconst _hoisted_6 = {\n key: 0,\n class: \"search-result-wrapper custom-scroll-bar-style rl-color-gray2 rl-fontweight-regular\"\n};\nconst _hoisted_7 = [\"onClick\"];\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _directive_clickOutside = _resolveDirective(\"clickOutside\");\n return _openBlock(), _createElementBlock(\"div\", _hoisted_1, [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"div\", {\n class: _normalizeClass([\"search-wrapper\", {\n 'active': $props.allTags.length > 0\n }])\n }, [_cache[5] || (_cache[5] = _createElementVNode(\"div\", {\n class: \"search-icon-container\"\n }, [_createElementVNode(\"svg\", {\n viewBox: \"0 0 34 34\",\n class: \"search-icon\"\n }, [_createElementVNode(\"use\", {\n \"xlink:href\": \"#search\"\n })])], -1)), $props.allTags.length ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.allTags, (tag, index) => {\n return _openBlock(), _createElementBlock(\"span\", {\n class: \"search-tag\",\n key: 'tags-' + index\n }, [_createTextVNode(_toDisplayString(tag) + \" \", 1), _createElementVNode(\"span\", {\n class: \"close-icon\",\n onClick: $event => $setup.emit('removeTag', tag)\n }, null, 8, _hoisted_4)]);\n }), 128))])) : _createCommentVNode(\"\", true), _withDirectives(_createElementVNode(\"input\", {\n class: \"search rl-text-body-2 rl-fontweight-regular\",\n type: \"text\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $setup.text = $event),\n placeholder: $props.placeholderText,\n spellcheck: \"false\",\n onKeyup: _cache[1] || (_cache[1] = _withKeys($event => $setup.enterText($setup.text), [\"enter\"])),\n onKeydown: _cache[2] || (_cache[2] = (...args) => $setup.processCompleteData && $setup.processCompleteData(...args)),\n onCompositionstart: _cache[3] || (_cache[3] = $event => $setup.isComposing = true),\n onCompositionend: _cache[4] || (_cache[4] = $event => $setup.isComposing = false),\n \"aria-label\": \"search bar\"\n }, null, 40, _hoisted_5), [[_vModelText, $setup.text, void 0, {\n trim: true\n }]])], 2), $setup.autoComplete.isShow && $setup.text !== '' ? _withDirectives((_openBlock(), _createElementBlock(\"ul\", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.autoComplete.data, (keyword, index) => {\n return _openBlock(), _createElementBlock(\"li\", {\n class: \"search-result-data\",\n key: 'autoCompleteData-' + index,\n onClick: $event => $setup.enterText(keyword)\n }, _toDisplayString(keyword), 9, _hoisted_7);\n }), 128))])), [[_directive_clickOutside, $setup.hideAutoComplete]]) : _createCommentVNode(\"\", true)])]);\n}","import \"core-js/modules/esnext.iterator.constructor.js\";\nimport \"core-js/modules/esnext.iterator.filter.js\";\nimport \"core-js/modules/esnext.iterator.some.js\";\nimport { ref, toRefs } from \"vue\";\nimport { getAutoCompleteData } from \"../../api/index\";\nexport default {\n name: \"searchBar\",\n props: {\n allTags: {\n type: Object,\n required: true,\n default: ref([])\n },\n searchType: {\n type: String,\n required: true,\n default: \"library\"\n },\n placeholderText: {\n type: String,\n required: true,\n default: \"\"\n }\n },\n setup(props, {\n emit\n }) {\n const {\n allTags,\n searchType,\n placeholderText\n } = toRefs(props);\n const text = ref(\"\");\n const isComposing = ref(false);\n const autoComplete = ref({\n data: [],\n isShow: false\n });\n function processCompleteData(e) {\n if (text.value === \"\" && (e.code === \"Space\" || e.code === \"Backspace\" && !isComposing.value)) {\n e.preventDefault();\n if (e.code === \"Space\") {\n return;\n }\n if (e.code === \"Backspace\" && allTags.value.length) {\n emit(\"removeTag\", allTags.value[allTags.value.length - 1]);\n return;\n }\n }\n if (text.value !== \"\" && (e.code === \"ArrowDown\" || e.code === \"ArrowUp\")) {\n selectCompleteDataByKey(e);\n return;\n }\n autoComplete.value.isShow = false;\n completeData();\n }\n function selectCompleteDataByKey(e) {\n var $listItems = $(\".search-result-wrapper li\");\n var keyCode = e.code,\n $selected = $listItems.filter(\".selected\"),\n $current;\n $listItems.removeClass(\"selected\");\n var menu = $(\".search-result-wrapper\");\n var height = $selected.outerHeight();\n var top = menu.scrollTop();\n var menuHeight = menu[0].scrollHeight;\n if (keyCode == \"ArrowDown\") {\n if (!$selected.length || $selected.is(\":last-child\")) {\n $current = $listItems.eq(0);\n menu.scrollTop(0);\n } else {\n $current = $selected.next();\n menu.scrollTop(top + height);\n }\n $current.addClass(\"selected\");\n text.value = $current[0].innerText;\n }\n if (keyCode == \"ArrowUp\") {\n if (!$selected.length || $selected.is(\":first-child\")) {\n $current = $listItems.last();\n menu.scrollTop(menuHeight + height);\n } else {\n $current = $selected.prev();\n menu.scrollTop(top - height);\n }\n $current.addClass(\"selected\");\n text.value = $current[0].innerText;\n }\n }\n const enterText = function (keyword) {\n if (keyword && searchType == \"home\") {\n emit(\"addTag\", keyword);\n } else if (keyword && !allTags.value.some(tag => tag.toLowerCase() == keyword.toLowerCase())) {\n emit(\"addTag\", keyword);\n text.value = \"\";\n }\n };\n const completeData = _.debounce(() => {\n if (text.value == \"\" || !/\\S/.test(text.value)) {\n return;\n }\n getAutoCompleteData({\n Keyword: text.value.toLowerCase()\n }).then(response => {\n response.unshift(text.value.toLowerCase());\n autoComplete.value.data = [...new Set(response)];\n autoComplete.value.isShow = true;\n }).catch(() => {\n autoComplete.value.isShow = false;\n autoComplete.value.data = [text.value.toLowerCase()];\n });\n }, 200);\n function hideAutoComplete() {\n autoComplete.value.isShow = false;\n }\n return {\n emit,\n text,\n isComposing,\n autoComplete,\n processCompleteData,\n enterText,\n hideAutoComplete\n };\n },\n directives: {\n clickOutside: {\n beforeMount: function (el, binding) {\n el.clickOutsideEvent = function (event) {\n if (!(el == event.target || el.contains(event.target))) {\n binding.value(event);\n }\n };\n document.body.addEventListener(\"click\", el.clickOutsideEvent);\n },\n unmounted: function (el) {\n document.body.removeEventListener(\"click\", el.clickOutsideEvent);\n }\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./search-bar.vue?vue&type=template&id=5e2b8ada&scoped=true\"\nimport script from \"./search-bar.vue?vue&type=script&lang=js\"\nexport * from \"./search-bar.vue?vue&type=script&lang=js\"\n\nimport \"./search-bar.vue?vue&type=style&index=0&id=5e2b8ada&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-5e2b8ada\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, withCtx as _withCtx, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode } from \"vue\";\nconst _hoisted_1 = {\n style: {\n \"display\": \"flex\",\n \"align-items\": \"center\",\n \"flex-wrap\": \"wrap\"\n }\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"rl-space-mobile-left-20 rl-space-mobile-right-20 rl-space-right-10 rl-row-bottom-20 filter-select-type\"\n};\nconst _hoisted_3 = {\n class: \"rl-space-mobile-left-20 rl-space-mobile-right-20 rl-space-right-10 rl-row-bottom-20 filter-select-product\"\n};\nconst _hoisted_4 = {\n key: 1,\n class: \"rl-space-mobile-left-20 rl-space-mobile-right-20 rl-space-right-10 rl-row-bottom-20 filter-select-version\"\n};\nconst _hoisted_5 = {\n key: 2,\n class: \"rl-space-mobile-left-20 rl-space-mobile-right-20 rl-space-right-30 rl-row-bottom-20 filter-select-level\"\n};\nconst _hoisted_6 = {\n key: 3,\n class: \"rl-row-bottom-20 rl-row-mobile-bottom-60\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_option = _resolveComponent(\"el-option\");\n const _component_el_select = _resolveComponent(\"el-select\");\n return _openBlock(), _createElementBlock(\"div\", _hoisted_1, [$props.type !== undefined ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [_createVNode(_component_el_select, {\n modelValue: $setup.filterType,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $setup.filterType = $event),\n style: {\n \"width\": \"100%\"\n }\n }, {\n default: _withCtx(() => [_createVNode(_component_el_option, {\n label: _ctx.$t('SKILL_PATH.FILTER_TYPE'),\n value: 0\n }, null, 8, [\"label\"]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.typeOptions, (item, index) => {\n return _openBlock(), _createBlock(_component_el_option, {\n key: 'type' + index,\n label: _ctx.$t(item.labelKey),\n value: item.value\n }, null, 8, [\"label\", \"value\"]);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])])) : _createCommentVNode(\"\", true), _createElementVNode(\"div\", _hoisted_3, [_createVNode(_component_el_select, {\n modelValue: $setup.filterProduct,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => $setup.filterProduct = $event),\n style: {\n \"width\": \"100%\"\n }\n }, {\n default: _withCtx(() => [_createVNode(_component_el_option, {\n label: _ctx.$t('LIBRARY.FILTER_PRODUCT'),\n value: \"\"\n }, null, 8, [\"label\"]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.options, (option, index) => {\n return _openBlock(), _createBlock(_component_el_option, {\n label: option.product,\n value: option.product,\n key: 'product' + index\n }, null, 8, [\"label\", \"value\"]);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])]), $setup.options && $props.version !== undefined ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [_createVNode(_component_el_select, {\n modelValue: $setup.filterVersion,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $setup.filterVersion = $event),\n disabled: $setup.getProductVersion.length < 1,\n style: {\n \"width\": \"100%\"\n }\n }, {\n default: _withCtx(() => [_createVNode(_component_el_option, {\n label: _ctx.$t('LIBRARY.FILTER_VERSION'),\n value: \"\"\n }, null, 8, [\"label\"]), $setup.getProductVersion.length > 0 ? (_openBlock(true), _createElementBlock(_Fragment, {\n key: 0\n }, _renderList($setup.getProductVersion, (item, index) => {\n return _openBlock(), _createBlock(_component_el_option, {\n key: $setup.filterProduct + 'version' + index,\n label: item.label,\n value: item.version\n }, null, 8, [\"label\", \"value\"]);\n }), 128)) : _createCommentVNode(\"\", true)]),\n _: 1\n }, 8, [\"modelValue\", \"disabled\"])])) : _createCommentVNode(\"\", true), $props.level !== undefined ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [_createVNode(_component_el_select, {\n modelValue: $setup.filterLevel,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => $setup.filterLevel = $event),\n multiple: \"\",\n placeholder: \" \",\n class: \"hide-tags\",\n style: {\n \"width\": \"100%\"\n }\n }, {\n prefix: _withCtx(() => [_createTextVNode(_toDisplayString($setup.getSelectLevelLabel), 1)]),\n default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.levelGroup, (item, index) => {\n return _openBlock(), _createBlock(_component_el_option, {\n key: 'level' + index,\n label: _ctx.$t('COMMON.' + item),\n value: index + 1\n }, null, 8, [\"label\", \"value\"]);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])])) : _createCommentVNode(\"\", true), $props.showCleanFilter ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [_createElementVNode(\"span\", {\n class: \"rl-space-mobile-left-20 rl-space-mobile-right-0 rl-space-right-30 reset-filter rl-fontweight-medium rl-text-body-3\",\n onClick: _cache[4] || (_cache[4] = (...args) => $setup.resetFilter && $setup.resetFilter(...args))\n }, _toDisplayString(_ctx.$t(\"LIBRARY.CLEAN_FILTER\")), 1)])) : _createCommentVNode(\"\", true)]);\n}","import { ref, onMounted, computed, inject } from \"vue\";\nimport { languageService } from '@/utils';\nimport { ApiSkillPathMediaMenuEnum } from \"@/enums/api/index\";\nexport default {\n name: \"searchFilter\",\n props: {\n product: {\n required: false\n },\n version: {\n required: false\n },\n level: {\n required: false\n },\n type: {\n required: false\n },\n showCleanFilter: {\n require: false,\n default: true\n }\n },\n setup(props, {\n emit\n }) {\n const {\n getLocaleMessege\n } = languageService;\n const {\n searchFilter\n } = inject(\"store\");\n const options = ref(null);\n const levelGroup = searchFilter.states.levelGroup;\n const typeOptions = searchFilter.states.typeOptions;\n const filterProduct = computed({\n get: () => props.product,\n set: val => {\n if (val !== props.product) {\n emit(\"update:product\", val);\n emit(\"update:level\", '');\n emit('changeProduct');\n }\n }\n });\n const filterVersion = computed({\n get: () => props.version,\n set: val => {\n if (val !== props.version) {\n emit(\"update:version\", val);\n emit(\"changeVersion\");\n }\n }\n });\n const filterLevel = computed({\n get: () => props.level,\n set: val => {\n const value = val.length > Object.keys(levelGroup).length ? '' : val;\n emit(\"update:level\", value);\n emit('changeLevel');\n }\n });\n const filterType = computed({\n get: () => props.type,\n set: val => {\n if (val !== props.type) {\n emit(\"update:type\", val);\n emit('changeType');\n }\n }\n });\n const getProductVersion = computed(() => {\n return searchFilter.getters.getProductVersion(filterProduct.value);\n });\n const getSelectLevelLabel = computed(() => {\n var text = filterLevel.value.length == 0 ? getLocaleMessege(\"LIBRARY\").FILTER_LEVEL : \"Level\" + (filterLevel.value.length > 0 ? \" (\" + filterLevel.value.length + \")\" : \"\");\n return filterLevel.value.length == levelGroup.length ? getLocaleMessege(\"LIBRARY\").FILTER_LEVEL : text;\n });\n function resetFilter() {\n if (filterProduct.value == \"\" && filterLevel.value == \"\" && filterLevel.value.length == 0 && filterType.value === ApiSkillPathMediaMenuEnum.ALL) {\n return;\n }\n emit(\"update:product\", \"\");\n emit(\"update:version\", \"\");\n emit(\"update:level\", []);\n emit(\"update:type\", ApiSkillPathMediaMenuEnum.ALL);\n emit('resetFilter');\n }\n onMounted(async () => {\n await searchFilter.actions.fetchProductOptions();\n options.value = searchFilter.states.productOptions;\n });\n return {\n levelGroup,\n options,\n filterProduct,\n filterVersion,\n filterLevel,\n getSelectLevelLabel,\n resetFilter,\n getProductVersion,\n typeOptions,\n filterType\n };\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./search-filter.vue?vue&type=template&id=3bc274f4&scoped=true\"\nimport script from \"./search-filter.vue?vue&type=script&lang=js\"\nexport * from \"./search-filter.vue?vue&type=script&lang=js\"\n\nimport \"./search-filter.vue?vue&type=style&index=0&id=3bc274f4&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-3bc274f4\"]])\n\nexport default __exports__"],"names":["_hoisted_1","class","_hoisted_2","style","_hoisted_3","key","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","render","_ctx","_cache","$props","$setup","$data","$options","_directive_clickOutside","allTags","length","viewBox","tag","index","onClick","$event","emit","type","text","placeholder","placeholderText","spellcheck","onKeyup","enterText","onKeydown","args","processCompleteData","onCompositionstart","isComposing","onCompositionend","trim","autoComplete","isShow","data","keyword","hideAutoComplete","name","props","Object","required","default","searchType","String","setup","e","value","code","preventDefault","completeData","selectCompleteDataByKey","$current","$listItems","$","keyCode","$selected","filter","removeClass","menu","height","outerHeight","top","scrollTop","menuHeight","scrollHeight","is","eq","next","addClass","innerText","last","prev","some","toLowerCase","_","debounce","test","Keyword","then","response","unshift","Set","catch","directives","clickOutside","beforeMount","el","binding","clickOutsideEvent","event","target","contains","document","body","addEventListener","unmounted","removeEventListener","__exports__","_component_el_option","_component_el_select","undefined","modelValue","filterType","label","$t","typeOptions","item","labelKey","filterProduct","options","option","product","version","filterVersion","disabled","getProductVersion","level","filterLevel","multiple","prefix","getSelectLevelLabel","levelGroup","showCleanFilter","resetFilter","require","getLocaleMessege","searchFilter","states","get","set","val","keys","getters","FILTER_LEVEL","ALL","async","actions","fetchProductOptions","productOptions"],"sourceRoot":""}