(window.webpackJsonp=window.webpackJsonp||[]).push([[184,50,55,61,63,67,88,147],{626:function(t,e,r){"use strict";r.r(e);var n=r(2).default.extend({name:"TheTitle",props:{titleText:{type:String},showViewAll:{type:Boolean,default:!1},to:{type:String},type:{type:String},description:{type:String},isTruncate:{type:Boolean,default:!0}},methods:{handleTitleClick:function(){"course"!==this.type&&"bookings"!==this.type&&"packages"!==this.type||this.$router.push({path:this.to})}}}),o=r(13),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mb-4"},[r("div",{staticClass:"flex items-center justify-between space-x-4"},[r("div",{class:[t.showViewAll?"group cursor-pointer hover:text-gray-900":"","flex min-w-0 flex-1 items-center text-gray-700"],on:{click:t.handleTitleClick}},[r("a",{staticClass:"text-2xl font-semibold"},[t._v("\n        "+t._s(t.titleText||"")+"\n      ")]),t._v(" "),t.showViewAll?r("svg",{staticClass:"mt-1 h-5 w-5 transform transition-all group-hover:translate-x-1",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[r("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"}})]):t._e()]),t._v(" "),t.showViewAll?r("nuxt-link",{staticClass:"flex-none cursor-pointer rounded-sm text-sm font-medium text-indigo-700 hover:text-indigo-900 hover:underline focus:text-indigo-900 focus:underline focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",attrs:{to:t.to}},[t._v("\n      "+t._s(t.$t("View_all"))+"\n    ")]):t._e(),t._v(" "),r("div",[t._t("icon")],2)],1),t._v(" "),t.description?r("div",{staticClass:"mt-2 text-sm text-gray-500",class:[t.isTruncate?"truncate sm:w-full lg:w-2/3":""]},[t._v("\n    "+t._s(t.description)+"\n  ")]):t._e()])}),[],!1,null,null,null);e.default=component.exports},632:function(t,e,r){"use strict";r.r(e);var n=r(2).default.extend({name:"BackButton",props:{to:{type:String}},methods:{handleClick:function(t){this.to?this.$router.push({path:this.to}):this.$emit("click",t)}}}),o=r(13),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a",{staticClass:"group -ml-0.5 mb-4 flex w-max cursor-pointer items-center space-x-1.5 text-sm font-semibold",on:{click:t.handleClick}},[r("svg",{staticClass:"block h-5 w-5 text-gray-400 group-hover:text-gray-700",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[r("path",{attrs:{"fill-rule":"evenodd",d:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"}})]),t._v(" "),r("span",{staticClass:"block text-gray-500 group-hover:text-gray-700"},[t._v(t._s(t.$t("Back")))])])}),[],!1,null,null,null);e.default=component.exports},637:function(t,e,r){"use strict";r.r(e);var n=r(2).default.extend({name:"IconButton",props:{icon:{type:String,default:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z"},outline:{type:Boolean,default:!0}}}),o=r(13),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("button",{class:{"relative h-9 w-9 cursor-pointer rounded  focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2":!0,"border bg-white shadow-sm":t.outline},on:{click:function(e){return t.$emit("click",e)}}},[r("svg",{staticClass:"absolute top-1/2 left-1/2 h-5 w-5 -translate-x-1/2 -translate-y-1/2 transform text-gray-500",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[r("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:t.icon}})])])}),[],!1,null,null,null);e.default=component.exports},648:function(t,e,r){"use strict";r.r(e);var n=r(2).default.extend({name:"CourseSkeleton"}),o=r(13),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"swiper-slide"},[e("div",{staticClass:"h-56 w-full animate-pulse rounded-lg bg-gray-200 shadow"})])}],!1,null,null,null);e.default=component.exports},685:function(t,e,r){"use strict";r.r(e);r(30),r(27),r(34),r(39),r(29),r(40);var n=r(0),o=r(2),l=r(626),c=r(175),d=r(174),f=r(637),h=r(14);function v(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function m(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?v(Object(source),!0).forEach((function(e){Object(n.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):v(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var y=o.default.extend({name:"CategoryLayout",components:{TheTitle:l.default,PrimaryButton:d.default,TheModal:c.default,IconButton:f.default},props:{title:{type:String},hideTitleOnMobile:{type:Boolean,default:!1},description:{type:String}},methods:m({},Object(h.d)({setShowMobileFilterModal:"SET_SHOW_MOBILE_FILTER_MODAL"})),computed:m({},Object(h.e)({showMobileFilterModal:"showMobileFilterModal"}))}),x=r(13),component=Object(x.a)(y,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex"},[r("div",{staticClass:"sticky top-10 mr-8 -ml-1 hidden h-max max-h-filters w-96 flex-none overflow-y-auto overflow-x-hidden pl-1 lg:block xl:mr-12"},[t._t("sidebar-filters")],2),t._v(" "),t.showMobileFilterModal?r("the-modal",{staticClass:"lg:hidden",on:{close:function(e){return t.setShowMobileFilterModal(!1)}}},[r("button",{staticClass:"absolute top-6 right-6 rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500",attrs:{type:"button"},on:{click:function(e){return t.setShowMobileFilterModal(!1)}}},[r("span",{staticClass:"sr-only"},[t._v(t._s(t.$t("Close_panel")))]),t._v(" "),r("svg",{staticClass:"h-6 w-6",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"}},[r("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}})])]),t._v(" "),r("div",{staticClass:"px-6 pt-6"},[t._t("modal-filters")],2),t._v(" "),r("div",{staticClass:"sticky bottom-0 w-full border-t bg-white px-6 py-5 md:hidden"},[r("primary-button",{staticClass:"w-full",attrs:{size:"medium","button-text":"Apply filters"},on:{click:function(e){return t.setShowMobileFilterModal(!1)}}})],1)]):t._e(),t._v(" "),r("div",{staticClass:"min-w-0 flex-1"},[!t.hideTitleOnMobile&&t.title?r("the-title",{staticClass:"sticky top-0 z-20 -mx-4 border-b bg-gray-50 p-4 md:static lg:-mx-0 lg:border-b-0 lg:bg-transparent lg:p-0",attrs:{"title-text":t.title,description:t.description?t.description:null,isTruncate:!1,"show-view-all":!1},scopedSlots:t._u([{key:"icon",fn:function(){return[r("icon-button",{staticClass:"lg:hidden",attrs:{icon:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z"},on:{click:function(e){return t.setShowMobileFilterModal(!t.showMobileFilterModal)}}})]},proxy:!0}],null,!1,261354012)}):t._e(),t._v(" "),t._t("cards")],2)],1)}),[],!1,null,null,null);e.default=component.exports},686:function(t,e,r){"use strict";r.r(e);r(30),r(27),r(34),r(39),r(29),r(40);var n=r(0),o=(r(77),r(2)),l=r(272);function c(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function d(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(e){Object(n.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var f=o.default.extend({components:{TheCheckbox:l.default},name:"TheFilters",props:{filters:{type:Array,default:function(){return[]},required:!0}},methods:{toggleFilterSection:function(t){var e=this.filters.map((function(filter){return filter.id===t?d(d({},filter),{},{isExpanded:!filter.isExpanded}):filter}));this.$emit("updated-filters",e)},handleMergingUpdatedFilters:function(t,e){var r=this.filters.map((function(filter){return filter.id===t?d(d({},filter),{},{options:e}):filter}));this.$emit("updated-filters",r)},handleCheckboxChange:function(t,e,r){var n=this.filters.map((function(filter){return filter.id===t?d(d({},filter),{},{options:filter.options.map((function(option){return option.id===e?d(d({},option),{},{checked:r}):option}))}):filter}));this.$emit("updated-filters",n)}}}),h=r(13),component=Object(h.a)(f,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("section",t._l(t.filters,(function(filter){return r("div",{key:filter.id,staticClass:"border-b border-gray-200 py-6"},[r("h3",{staticClass:"-my-3 flow-root"},[r("button",{staticClass:"group flex w-full items-center justify-between py-3 text-gray-400 hover:text-gray-500",attrs:{type:"button","aria-controls":"filter-section-mobile-0","aria-expanded":"false"},on:{click:function(e){return t.toggleFilterSection(filter.id)}}},[r("span",{staticClass:"text-left text-sm font-medium text-gray-700 group-hover:text-gray-900"},[t._v("\n          "+t._s(filter.label)+"\n        ")]),t._v(" "),r("span",{staticClass:"ml-6 flex items-center"},[filter.isExpanded?t._e():r("svg",{staticClass:"h-5 w-5",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"}},[r("path",{attrs:{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"}})]),t._v(" "),filter.isExpanded?r("svg",{staticClass:"h-5 w-5",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"}},[r("path",{attrs:{"fill-rule":"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z","clip-rule":"evenodd"}})]):t._e()])])]),t._v(" "),r("transition",{attrs:{"enter-class":"transform opacity-0 scale-95","enter-active-class":"transition ease-out duration-200","enter-to-class":"transform opacity-100 scale-100","leave-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-150","leave-to-class":"transform opacity-0 scale-95"}},[filter.isExpanded&&filter.isComplexFilter?r("div",{staticClass:"pl-3"},[r("the-filters",{attrs:{filters:filter.options},on:{"updated-filters":function(e){return t.handleMergingUpdatedFilters(filter.id,e)}}})],1):t._e()]),t._v(" "),r("transition",{attrs:{"enter-class":"transform opacity-0 scale-95","enter-active-class":"transition ease-out duration-200","enter-to-class":"transform opacity-100 scale-100","leave-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-150","leave-to-class":"transform opacity-0 scale-95"}},[filter.isExpanded&&!filter.isComplexFilter&&filter.options.length>0&&!filter.isCustom?r("div",{staticClass:"pt-6",attrs:{id:"filter-section-mobile-0"}},[r("div",{staticClass:"space-y-6"},t._l(filter.options,(function(option){return r("the-checkbox",{key:option.id,attrs:{label:option.label,checked:option.checked},on:{change:function(e){var r=e.checked;return t.handleCheckboxChange(filter.id,option.id,r)}}})})),1)]):t._e()]),t._v(" "),r("transition",{attrs:{"enter-class":"transform opacity-0 scale-95","enter-active-class":"transition ease-out duration-200","enter-to-class":"transform opacity-100 scale-100","leave-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-150","leave-to-class":"transform opacity-0 scale-95"}},[filter.isExpanded&&filter.isCustom?r("div",{staticClass:"pt-6"},[t._t(filter.customSlot)],2):t._e()])],1)})),0)}),[],!1,null,null,null);e.default=component.exports},690:function(t,e,r){var n=r(9),o=r(32),l=r(125);n({target:"Object",stat:!0},{fromEntries:function(t){var e={};return o(t,(function(t,r){l(e,t,r)}),{AS_ENTRIES:!0}),e}})},733:function(t,e,r){"use strict";r.r(e);r(30),r(27),r(34),r(39),r(29),r(40);var n=r(0),o=(r(392),r(56),r(111),r(65),r(2)),l=r(174),c=r(14);function d(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function f(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?d(Object(source),!0).forEach((function(e){Object(n.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):d(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var h=o.default.extend({name:"SubjectCard",components:{PrimaryButton:l.default},props:{onMainPage:{type:Boolean,default:!1},subject:{type:Object},duration:{type:Object},borderColor:{type:String}},computed:f(f({},Object(c.e)({institution:"institution"})),{},{description:function(){var t=this.subject.subject_description?this.subject.subject_description.replace(/(<([^>]+)>)/gi,"").trim():null;if(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||null}return t}}),methods:{handleMoreInfoClick:function(){var t="/".concat(this.$i18n.locale);this.$router.push({path:"".concat(t,"/book-now/")+this.subject.subject_id+"/"+this.duration.duration_id})},convertToFn:function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},formatNumber:function(t){return parseFloat(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}}}),v=r(13),component=Object(v.a)(h,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:[t.onMainPage?"cursor-pointer hover:shadow-md":"","relative flex h-40 flex-col justify-between overflow-hidden rounded-lg text-sm text-gray-700 shadow"]},[r("div",{class:[t.onMainPage?"p-2":"","absolute top-0 left-0 h-40 w-40"]},[t.subject.image_url?r("img",{class:[t.onMainPage?"rounded":"","h-full w-full object-cover shadow-inner"],attrs:{src:t.subject.image_url,alt:"subject image"}}):r("div",{staticClass:"flex h-full w-full shrink-0 items-center justify-center rounded-md border border-gray-200 bg-gray-100"},[r("c-icon",{staticClass:"h-6 w-6 shrink-0 text-gray-400",attrs:{name:"clipboard-solid-v2",type:"solid",viewBox:"0 0 24 24"}})],1)]),t._v(" "),r("div",{staticClass:"flex-1 bg-white pl-40"},[r("div",{class:[t.onMainPage?"pr-3 pl-1":"px-3","py-2"]},[r("h3",{staticClass:"truncate font-medium",style:"color: "+t.borderColor+";"},[t._v("\n        "+t._s(t.subject.subject_name)+"\n      ")]),t._v(" "),t.description?r("div",{staticClass:"mt-1"},[r("p",{staticClass:"truncate text-gray-500"},[t._v("\n          "+t._s(t.description)+"\n        ")])]):t._e(),t._v(" "),r("div",{staticClass:"mt-2 border-t"}),t._v(" "),r("div",{staticClass:"pt-2"},[r("div",{staticClass:"flex items-start space-x-1"},[r("svg",{staticClass:"mt-0.5 h-4 w-4 text-gray-400",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[r("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}})]),t._v(" "),r("p",[t._v(t._s(t.duration.duration)+" "+t._s(t.$t("minutes")))])])])])]),t._v(" "),r("div",{staticClass:"flex-none pl-40"},[r("div",{class:[t.onMainPage?"pr-3 pl-1":"px-3","flex min-h-14 items-center justify-between space-x-2 bg-gray-100 py-2"]},[r("div",{staticClass:"min-w-0 flex-1"},[r("p",{staticClass:"line-clamp-2"}),t.duration.bookSingleSession?r("div",[parseInt(t.duration.fee.fee)>0?[r("span",{staticClass:"font-semibold"},[t._v(t._s(t.institution.institutionCurrency)+"\n              "+t._s(t.formatNumber(t.duration.fee.fee)))]),t._v("\n            "+t._s(t.$t("per_session"))),r("strong",[t._v(t._s(t.duration.package_fee?" ‧ ":""))])]:t._e(),t._v(" "),0===parseInt(t.duration.fee.fee)?r("span",{staticClass:"truncate font-semibold"},[t._v("\n            "+t._s(t.$t("FREE"))+"\n          ")]):t._e()],2):t._e(),t._v(" "),t.duration.package_fee?[t._v("\n           "+t._s("en"!=t.$i18n.locale?t.$t("Packages_from"):t.convertToFn(t.institution.wordCustomisation.packagePlural)+" from")+"\n            "),r("strong",{staticClass:"font-semibold"},[t._v(t._s(t.institution.institutionCurrency)+"\n              "+t._s(t.duration.package_fee.fee)+"\n            ")])]:t._e(),t._v(" "),r("p")],2),t._v(" "),t.onMainPage?t._e():r("div",{staticClass:"flex-none"},[r("primary-button",{attrs:{size:"medium","button-text":t.$t("More_info")},on:{click:t.handleMoreInfoClick}})],1)])])])}),[],!1,null,null,null);e.default=component.exports},899:function(t,e,r){"use strict";r.r(e);r(30),r(27),r(39),r(29),r(40);var n=r(41),o=r(3),l=r(0),c=r(7),d=(r(50),r(69),r(77),r(56),r(78),r(79),r(89),r(34),r(45),r(124),r(690),r(178),r(2)),f=r(632),h=r(685),v=r(733),m=r(648),y=r(686),x=r(14);function _(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function w(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?_(Object(source),!0).forEach((function(e){Object(l.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):_(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var j=d.default.extend({components:{BackButton:f.default,CategoryLayout:h.default,SubjectCard:v.default,CourseSkeleton:m.default,TheFilters:y.default},asyncData:function(t){return Object(c.a)(regeneratorRuntime.mark((function e(){var r,n,o,l,c,d,f,h,v,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.app,n=t.route,o=t.store,l=t.$axios,c=[],d=[],f=[],e.next=6,l.$get("subjectsByCourse/".concat(n.params.id,"/").concat(o.state.institution.rcInstitutionID));case 6:return h=e.sent,e.next=9,l.$get("staff/getTeachingStaff/".concat(n.params.id,"/").concat(o.state.institution.rcInstitutionID));case 9:return v=e.sent,f=[{id:0,label:r.i18n.t("Filters"),isComplexFilter:!1,isExpanded:!1,isCustom:!1,customSlot:"",options:h.map((function(t){return{id:t.sub_id,label:t.sub_name,value:t.sub_id,checked:!1}}))},{id:1,label:r.i18n.t("Staff"),isComplexFilter:!1,isExpanded:!1,isCustom:!1,customSlot:"",options:v.map((function(t){return{id:t.user_detail_id,label:"".concat(t.firstName," ").concat(t.surname),value:t.user_detail_id,checked:!1}}))}],n.query.subjects&&(c=n.query.subjects.split(",").map((function(t){return parseInt(t)})),f[0].isExpanded=!0,f[0].options=f[0].options.map((function(t){return c.includes(t.id)&&(t.checked=!0),t}))),n.query.staff&&(d=n.query.staff.split(",").map((function(t){return parseInt(t)})),f[1].isExpanded=!0,f[1].options=f[1].options.map((function(t){return d.includes(t.id)&&(t.checked=!0),t}))),e.next=15,l.$get("online/serviceList/".concat(o.state.institution.rcInstitutionID,"/").concat(n.params.id));case 15:return m=e.sent,c.length>0&&(m=w(w({},m),{},{subjects:m.subjects.filter((function(t){return c.includes(parseInt(t.subject_id))}))})),d.length>0&&(m=w(w({},m),{},{subjects:m.subjects.filter((function(t){return t.staff.some((function(t){return d.includes(parseInt(t))}))}))})),!1,e.abrupt("return",{course:m,filters:f,selectedSubjects:c,selectedStaff:d,isLoading:false});case 20:case"end":return e.stop()}}),e)})))()},data:function(){return{course:[],selectedSubjects:[],selectedStaff:[],isLoading:!1,filters:[]}},methods:{handleUpdatedFilters:function(t){this.filters=t,this.selectedSubjects=this.filters[0].options.reduce((function(t,e){return e.checked&&(t=[].concat(Object(o.a)(t),[e.value])),t}),[]),this.selectedStaff=this.filters[1].options.reduce((function(t,e){return e.checked&&(t=[].concat(Object(o.a)(t),[e.value])),t}),[]),this.updateFilteredData()},updateFilteredData:function(){var t={};this.selectedSubjects.length>0&&(t.subjects=this.selectedSubjects.toString()),this.selectedStaff.length>0&&(t.staff=this.selectedStaff.toString()),this.$router.currentRoute.fullPath!==this.$router.resolve({path:this.$route.path,query:w(w({},t),Object.fromEntries(Object.entries(this.getAllTrackers).filter((function(t){var e=Object(n.a)(t,2);e[0];return e[1].length>0}))))}).href&&(this.isLoading=!0,this.course=w(w({},this.course),{},{subjects:[]})),this.$router.push({path:this.$route.path,query:t})}},computed:w({},Object(x.c)("trackers",["getAllTrackers"])),mounted:function(){var t=this;this.$nuxt.$on("selected-language-changed",(function(){t.filters.length&&(t.filters[0].label=t.$t("Filters"),t.filters[1].label=t.$t("Staff"))}))},watchQuery:["subjects","staff"]}),C=r(13),component=Object(C.a)(j,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"w-full bg-gray-50 pb-10 md:py-10"},[r("div",{staticClass:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8"},[r("category-layout",{attrs:{title:t.course.course_name,description:t.course.course_description},scopedSlots:t._u([{key:"sidebar-filters",fn:function(){return[r("the-filters",{staticClass:"-mt-6",attrs:{filters:t.filters},on:{"updated-filters":t.handleUpdatedFilters}})]},proxy:!0},{key:"modal-filters",fn:function(){return[r("the-filters",{staticClass:"mt-10",attrs:{filters:t.filters},on:{"updated-filters":t.handleUpdatedFilters}})]},proxy:!0},{key:"cards",fn:function(){return[r("div",{staticClass:"space-y-6 lg:grid lg:grid-cols-1 lg:gap-y-6 lg:gap-x-4 lg:space-y-0"},[t._l(t.course.subjects,(function(e){return t._l(e.durations,(function(t){return r("subject-card",{key:t.duration_id,attrs:{subject:e,duration:t,"on-main-page":!1}})}))})),t._v(" "),t.isLoading?t._l(6,(function(i){return r("course-skeleton",{key:i})})):t._e()],2),t._v(" "),t.isLoading||t.course.subjects.length?t._e():r("p",{staticClass:"text-center text-sm text-gray-400"},[t._v("\n          "+t._s(t.$t("No_events_found"))+"\n        ")])]},proxy:!0}])})],1)])}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{SubjectCard:function(){return Promise.resolve().then(r.bind(null,733)).then((function(t){return t.default||t}))}})}}]);