PageSourceSearch

https://www.aula.dk/static/js/10.602468c12c96a7068fc8.js

js aula.dk collected 2026-09-24 09:31:40 UTC 2,220,084 bytes, 2 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{109:function(e,t,n){"use strict";var i=n(87),s=n.n(i),a=n(17),r=n.n(a),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=n(7),h=n.n(d),m=n(6),p=n(0),v=n(4),f=n(9),g=n(10),_=n(8),E=n(14),A=n(24),T=n(57),b=n(101),C=n(25),k=n(40),y=n(5),I=n.n(y),S=n(27);class D{constructor(e){this.institutionProfileId=e.institutionProfileId,this.name=e.name,this.shortName=e.shortName,this.displayName=e.displayName,this.role=e.role,this.calendarFeedEnabled=e.calendarFeedEnabled,this.profilePicture=e.profilePicture,this.calendarFeedConfiguration=e.calendarFeedConfiguration}getOneWeekFeed(){var e;return(null===(e=this.calendarFeedConfiguration)||void 0===e?void 0:e.oneWeekFeed)||""}getOneYearFeed(){var e;return(null===(e=this.calendarFeedConfiguration)||void 0===e?void 0:e.oneYearFeed)||""}}var w=n(43),N=n(13),R=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},O={directives:{Button:w.a},inject:{getEventTypeFilters:S.a.eventTypeFilters,updateEventTypeFilters:S.a.onUpdateEventTypeFilters,getExistingSharedCalendars:S.a.existingSharedCalendars,updateExistingSharedCalendars:S.a.onUpdateExistingSharedCalendars,getInstitutionCalendars:S.a.institutionCalendars,updateInstitutionCalendars:S.a.onUpdateInstitutionCalendars,updateDelegatedContext:S.a.onUpdateDelegatedContext,getDelegatedContext:S.a.delegatedContext,getDefaultCalendars:S.a.defaultCalendars},props:{parent:{type:String,default:"profile"},group:{type:Object,default:null},isMobile:{type:Boolean,default:!1},calendar:{type:Object,default:null}},data:function(){return{profileStorageFilters:{},calendarFeedEnabledForMunicipality:!0,buttonCreateText:"create",isUpdateFeed:!1,consentSelected:!1,showNoConsentWarning:!1,showNoFiltersChosenWarning:!1,selectedFilters:[],selectedCalendarFeedProfile:new D({institutionProfileId:-1,name:"",shortName:"",displayName:"",role:_.a.EMPLOYEE,calendarFeedEnabled:!1,profilePicture:null,calendarFeedConfiguration:null}),isLoading:!1,portalRoles:_.a,parentTypes:E.a,groupTypes:k.a,institutionTypes:C.a,routerPath:{},permissionEnum:g.a,assignedDelegatedAccessList:[],assignedDelegatedAccessListByInstProfileId:{},searchedEmployees:[],showMobileMenu:!1,showMobileCalendarSyncMenu:!1,setOtherUserFocus:!1,showOnlyOneGroupWarning:!1,hideInOwnCalendar:!1,responseDeadline:null,resetSearch:!1,availableDeadlineDate:{},pickerOptions:{disabledDate:e=>e.getTime()+864e5<I()().add(1,"days").toDate().getTime(),firstDayOfWeek:1},calendarFeeds:[],lastSearchQuery:null,printFullCalendarSetting:!1,mobileExistingSharedCalendars:[],mobileSelectedInstitutionCalendarIds:[]}},computed:Object.assign(Object.assign({},Object(m.c)({getConsentSelected:p.a.GET_CALENDAR_SYNC_CONSENT,isPreviewMode:p.a.GET_IS_PREVIEW_MODE,institutions:p.a.GET_INSTITUTIONS,eventTypesForFilter:p.a.CALENDAR_GET_EVENT_TYPES_FOR_FILTER,events:p.a.GET_EVENTS,assignedDelegatedAccesses:p.a.GET_ASSIGNED_DELEGATED_ACCESSES,myDelegatedAccesses:p.a.GET_MY_DELEGATED_ACCESSES,hasPermission:p.a.HAS_PERMISSION,hasPermissionGroup:p.a.HAS_PERMISSION_ON_GROUP,hasPermissionInstitution:p.a.HAS_PERMISSION_ON_INSTITUTION,activeChildren:p.a.GET_ACTIVE_CHILDREN,activeInstitutions:p.a.GET_ACTIVE_INSTITUTIONS,defaultDateFormat:p.a.GET_DEFAULT_DATE_FORMAT,defaultDateValueFormat:p.a.GET_DEFAULT_DATE_VALUE_FORMAT,children:p.a.GET_CHILDREN,getCalendarFeeds:p.a.GET_CALENDAR_FEEDS,activeEvent:p.a.GET_CURRENT_EVENT,vacationRequestResponses:p.a.GET_VACATION_REQUEST_RESPONSES,calendarFeedEnabled:p.a.GET_MUNICIPAL_CALENDER_FEED,selectedInstitution:p.a.GET_SELECTED_INSTITUTION,calendarFeedEvents:p.a.GET_CALENDAR_FEED_EVENTS,hasNonBlockingProfiles:p.a.GET_HAS_NON_BLOCKING_PROFILES})),{userProfileStore:()=>Object(N.a)(),profile(){return this.userProfileStore.institutionProfile},calendarLinkSynchronizeDescription(){switch(this.profile.role){case this.portalRoles.EMPLOYEE:return this.$t("calendar.link_synchronize_employee_description");case this.portalRoles.GUARDIAN:return this.$t("calendar.link_synchronize_guardian_description");default:return""}},calendarLinkSynchronizeWarning(){switch(this.profile.role){case this.portalRoles.EMPLOYEE:return this.$t("calendar.link_synchronize_employee_warning");case this.portalRoles.GUARDIAN:return this.$t("calendar.link_synchronize_guardian_warning");default:return""}},calendarFeedEventOptions(){return this.calendarFeedEvents.eventTypes},calendarYearFeedOverviewDeleteText(){return 0===this.calendarFeedProfiles.length?"":this.profile.role===_.a.EMPLOYEE?this.$getText("CALENDARFEED_OVERVIEW_EMPLOYEE_FEED_DELET
1E_TEXT"):this.$getText("CALENDARFEED_OVERVIEW_GUARDIAN_FEED_DELETE_TEXT")},calendarYearFeedOverviewEditText(){return 0===this.calendarFeedProfiles.length?"":this.profile.role===_.a.EMPLOYEE?this.$getText("CALENDARFEED_OVERVIEW_EMPLOYEE_FEED_EDIT_TEXT"):this.$getText("CALENDARFEED_OVERVIEW_GUARDIAN_FEED_EDIT_TEXT")},calendarFeedOverviewCreateLinkText(){return 0===this.calendarFeedProfiles.length?"":this.profile.role===_.a.EMPLOYEE?this.$getText("CALENDARFEED_OVERVIEW_CREATE_LINKS"):this.$getText("CALENDARFEED_OVERVIEW_CREATE_LINK")},calendarFeedProfiles(){let e=[];if(this.profile.role===_.a.EMPLOYEE)e=this.institutions.map((e=>{const t=this.calendarFeeds.find((t=>t.regardingId===e.institutionProfileId));return new D({institutionProfileId:e.institutionProfileId,name:e.name,shortName:e.shortName,displayName:e.name,role:_.a.EMPLOYEE,calendarFeedEnabled:e.calendarFeedEnabled,profilePicture:null,calendarFeedConfiguration:t||null})}));else if(this.profile.role===_.a.GUARDIAN){e=[...this.institutions.map((e=>{const t=this.calendarFeeds.find((t=>t.regardingId===e.institutionProfileId));return new D({institutionProfileId:e.institutionProfileId,name:this.profile.fullName,shortName:this.profile.shortName,displayName:`${this.profile.fullName} (${e.name})`,role:_.a.GUARDIAN,calendarFeedEnabled:e.calendarFeedEnabled,profilePicture:this.profile.profilePicture,calendarFeedConfiguration:t||null})})),...this.children.map((e=>{const t=this.calendarFeeds.find((t=>t.regardingId===e.id));return new D({institutionProfileId:e.id,name:e.name,shortName:e.shortName,displayName:e.name,role:_.a.CHILD,calendarFeedEnabled:e.calendarFeedEnabled,profilePicture:e.profilePicture,calendarFeedConfiguration:t||null})}))]}return e},delegatedContext(){return this.getDelegatedContext()},selectedInstitutionCalendarIds(){return this.institutionCalendars.map((({id:e})=>e))},institutionCalendars(){return this.getInstitutionCalendars()},existingSharedCalendars(){return this.getExistingSharedCalendars()},defaultCalendars(){return this.getDefaultCalendars()},eventTypeFilters(){return this.getEventTypeFilters()},canCreateEvent(){return this.hasPermission(this.permissionEnum.HANDLE_EVENTS)&&this.parent==E.a.PROFILE},canCreateEventInGroupPage(){if(this.group){const e=this.group,t=this.hasPermissionGroup(this.permissionEnum.INVITE_TO_EVENT,e.id),n=this.hasPermissionInstitution(g.a.USE_GROUPS_AS_DISTRIBUTION_LISTS,e.institutionCode),i=this.institutions.find((e=>e.institutionCode===this.group.institutionCode));return!(null==i?void 0:i.communicationBlock)&&(!(!t&&!n)&&this.parent===E.a.GROUP)}return!1},canCreateMeetingEvent(){return this.hasNonBlockingProfiles&&this.profile.role==this.portalRoles.EMPLOYEE&&this.parent==E.a.PROFILE&&(this.hasPermission(this.permissionEnum.HANDLE_PERFORMANCE_MEETING)||this.hasPermission(this.permissionEnum.HANDLE_PARENTAL_MEETING_SCHOOL)||this.hasPermission(this.permissionEnum.HANDLE_PARENTAL_MEETING_DAYCARE))},canCreateMeetingEventInGroupPage(){return null!=this.group&&this.parent==E.a.GROUP&&(this.canCreateEventInGroupPage&&this.profile.role==this.portalRoles.EMPLOYEE&&(this.hasPermissionInstitution(this.permissionEnum.HANDLE_PERFORMANCE_MEETING,this.group.institutionCode)||this.hasPermissionInstitution(this.permissionEnum.HANDLE_PARENTAL_MEETING_SCHOOL,this.group.institutionCode)||this.hasPermissionInstitution(this.permissionEnum.HANDLE_PARENTAL_MEETING_DAYCARE,this.group.institutionCode)))}}),methods:Object.assign(Object.assign({},Object(m.b)({loadEventTypes:p.a.LOAD_EVENT_TYPES,loadAssignedDelegatedAccesses:p.a.LOAD_ASSIGNED_DELEGATED_ACCESSES,updateDelegatedAccess:p.a.UPDATE_DELEGATED_ACCESS,loadConsentSelected:p.a.LOAD_CALENDAR_SYNC_CONSENT,updateConsentSelected:p.a.UPDATE_CALENDAR_SYNC_CONSENT,loadCalendarFeeds:p.a.LOAD_CALENDAR_FEEDS,updateCalendarFeeds:p.a.UPDATE_CALENDAR_FEED,createCalendarFeeds:p.a.CREATE_CALENDAR_FEED,deleteCalendarFeeds:p.a.DELETE_CALENDAR_FEED,loadVacationRequestResponses:p.a.LOAD_VACATION_REQUEST_RESPONSES,loadCalendarFeedEnabled:p.a.LOAD_MUNICIPAL_CALENDER_FEED,loadCalendarFeedEvents:p.a.LOAD_CALENDAR_FEED_EVENTS,modifyDateTimeSelectedByClickedTimeslot:p.a.MODIFY_DATETIME_SELECTED_BY_CLICKED_TIMESLOT})),{getCalendarFeedEventOptions(e){return R(this,void 0,void 0,(function*(){yield this.loadCalendarFeedEvents({PortalRole:e})}))},openedFromGroup(){return 0!==Object.keys(this.group).length},okText(){this.isMobile?this.buttonCreateText=this.isUpdateFeed?"CALENDAR_BUTTON_SAVE":"CALENDAR_BUTTON_CREATE":this.buttonCreateText=this.isUpdateFeed?"CALENDARFEED_OVERVIEW_SAVE_LINK":"CALENDARFEED_OVERVIEW_CREATE_LINK"},validateAddOrHideInOwnCalendar(e=!0){v.default.nextTick((()=>{e&&this.requestVacationIsAddedToInstitution?this.hideInOwnCalendar=!1:!e&&this.hideInOwnCalendar&&(this.requestVacationIsAddedToInstitution=!1),this.$forceUpdate()}))},openCalendarSyncModal(){1==this.getConsentSelected.data.policyAccepted?this.$refs.calendarSyncOverviewModal.show():this.$refs.changeSyncOptionModal.show()},openOverview(){return R(this,void 0,void 0,(function*(){if(this.isLoading=!0,0==this.consentSelected&&0==this.getConsentSelected.data.policyAccepted)this.showNoConsentWarning=!0,this.isLoading=!1;else{if(0==this.consentSelected&&1==this.getConsentSelected.data.policyAccepted)return this.$refs.consentRemoveWarning.show(),void(this.isLoading=!1);yield this.changeStatus(),this.$refs.calendarSyncOverviewModal.show()}}))},changeStatus(){return R(this,void 0,void 0,(function*(){this.isLoading=!0;const e={policyAccepted:this.consentSelected};yield this.updateConsentSelected(e),yield this.loadCalendarFeeds(),this.calendarFeeds=this.getCalendarFeeds.data,this.showNoConsentWarning=!1,this.isLoading=!1,this.$refs.changeSyncOptionModal.hide()}))},resetCalendarSyncModal(){this.consentSelected=this.getConsentSelected.data.policyAccepted,this.showNoConsentWarning=!1},onDeleteButtonClicked(e){this.selectedCalendarFeedProfile=e,this.$refs.feedDeleteWarning.show()},getCalendarYearFeedOverviewDescription(e){if(0===this.calendarFeedProfiles.length)return"";let t=this.$t("calendar.feed_overview_employee_year_feed_description");return e.role===_.a.GUARDIAN?t=this.$t("calendar.feed_overview_guardian_year_feed_description_for_guardian"):e.role===_.a.CHILD&&(t=this.$t("calendar.feed_overview_guardian_year_feed_description_for_child")),t},copyWeekFeed(e){navigator.clipboard.writeText(e.getOneWeekFeed()),this.$refs.copyLinkToastr.show()},copyYearFeed(e){navigator.clipboard.writeText(e.getOneYearFeed()),this.$refs.copyLinkToastr.show()},openFeed(e){var t;this.getCalendarFeedEventOptions(e.role),this.selectedCalendarFeedProfile=e,this.selectedFilters=(null===(t=this.selectedCalendarFeedProfile.calendarFeedConfiguration)||void 0===t?void 0:t.filters)||[],this.okText(),this.$refs.calendarSyncOverviewModal.hide(),this.$refs.calendarSyncCreateModal.show()},closeFeed(){this.$refs.calendarSyncCreateModal.hide(),this.$refs.calendarSyncOverviewModal.show()},createFeed(){if(this.isLoading=!0,!(this.selectedFilters.length>0))return this.isLoading=!1,void(this.showNoFiltersChosenWarning=!0);this.showNoFiltersChosenWarning=!1;const e={institutionProfileId:this.selectedCalendarFeedProfile.institutionProfileId,filters:this.selectedFilters};this.createCalendarFeeds(e).then((()=>{this.loadCalendarFeeds().then((()=>{this.calendarFeeds=this.getCalendarFeeds.data,this.isLoading=!1,this.closeFeed()}))}))},checkIfHaveFeed(e){if(0===this.calendarFeedProfiles.length)return!1;return this.calendarFeeds.map((e=>e.regardingId)).includes(e.institutionProfileId)},updateFeed(){var e;if(this.isLoading=!0,!(this.selectedFilters.length>0))return this.isLoading=!1,void(this.showNoFiltersChosenWarning=!0);this.showNoFiltersChosenWarning=!1;const t={calendarfeedconfigurationid:null===(e=this.selectedCalendarFeedProfile.calendarFeedConfiguration)||void 0===e?void 0:e.id,filters:this.selectedFilters};this.updateCalendarFeeds(t).then((()=>{this.loadCalendarFeeds().then((()=>{this.calendarFeeds=this.getCalendarFeeds.data,this.isLoading=!1,this.closeFeed()}))}))},deleteFeed(){var e;return R(this,void 0,void 0,(function*(){this.isLoading=!0;const t={calendarFeedConfigurationId:null===(e=this.selectedCalendarFeedProfile.calendarFeedConfiguration)||void 0===e?void 0:e.id};
1yield this.deleteCalendarFeeds(t),yield this.loadCalendarFeeds(),this.calendarFeeds=this.getCalendarFeeds.data,this.isLoading=!1,this.$refs.feedDeleteWarning.hide(),this.$refs.deleteLinkToastr.show()}))},createEvent(e,t){this.isPreviewMode||(this.modifyDateTimeSelectedByClickedTimeslot(null),this.$router.push({name:e,params:{groupId:this.group.id},query:{parent:t}}))},focusOtherUserSearch(){this.setOtherUserFocus=!0,this.$nextTick((()=>this.setOtherUserFocus=!1))},getDelegatedProfileByInstProfileId(e){const t=[];return this.institutions.forEach((function(n){const i=e.filter((e=>e.ownerInstProfileId==n.institutionProfileId));null!=i[0]&&null!=i[0].delegatedInstProfiles?t[n.institutionProfileId]=i[0].delegatedInstProfiles:t[n.institutionProfileId]=[]})),t},emitSelectedCalendars(e){const t=e.filter((e=>e.type===A.a.GROUP.toLowerCase()));this.profile.role!==_.a.EMPLOYEE&&t.length>1?(e.pop(),this.showOnlyOneGroupWarning=!0):(this.showOnlyOneGroupWarning=!1,this.resetSearch=!this.resetSearch,this.isMobile?(this.mobileExistingSharedCalendars=e,this.checkForDefaultCalendars()):this.updateExistingSharedCalendars(e))},emitSelectedInstitutionCalendars(e){if(this.isMobile)this.mobileSelectedInstitutionCalendarIds=e,this.checkForDefaultCalendars();else{const t=new Set(e),n=this.institutions.filter((({id:e})=>t.has(e)));this.updateInstitutionCalendars(n),this.$emit("changeCalendars")}},checkForDefaultCalendars(){0===this.mobileExistingSharedCalendars.length&&0===this.mobileSelectedInstitutionCalendarIds.length&&this.$nextTick((()=>this.mobileExistingSharedCalendars=this.defaultCalendars))},onMobileAddSharedUserModalOkClicked(){this.updateExistingSharedCalendars(this.mobileExistingSharedCalendars);const e=new Set(this.mobileSelectedInstitutionCalendarIds),t=this.institutions.filter((({id:t})=>e.has(t)));this.updateInstitutionCalendars(t),this.$emit("changeCalendars"),this.$refs.mobileAddSharedUserModal.hide()},showMobileAddShareUserModal(){this.mobileExistingSharedCalendars=this.existingSharedCalendars,this.mobileSelectedInstitutionCalendarIds=this.selectedInstitutionCalendarIds,this.$refs.mobileAddSharedUserModal.show()},emitFilters(e){null!=e&&this.updateEventTypeFilters(e)},selectDelegatedInstProfile(e=null){return R(this,void 0,void 0,(function*(){if(this.isLoading)return;this.isLoading=!0;let t=e,n=!1;this.delegatedContext.id===e.id&&(t={},n=!0),yield this.updateDelegatedContext(t,n),this.showMobileMenu=!1,this.isLoading=!1}))},loadSearchRecipients(e){return R(this,void 0,void 0,(function*(){this.lastSearchQuery=e;const t=(yield f.b.get("?method=search.findProfilesAndGroups",{params:{text:e,instCodes:this.activeInstitutions,typeahead:!0,limit:100,portalRoles:[_.a.EMPLOYEE,_.a.CHILD]}})).data.data.results;let n=[];if(this.profile.role==_.a.EMPLOYEE){n=(yield f.b.get("?method=resources.listResources",{params:{query:e,institutionCodes:this.activeInstitutions}})).data.data}if(this.lastSearchQuery==e){const e=[],i=[],s=[],a=this.existingSharedCalendars;for(const n of t)switch(n.docType.toLowerCase()){case"profile":if(0==a.filter((e=>e.singleId==n.id&&"profile"==e.type)).length)switch(n.singleId=n.id,n.id=n.docType.toLowerCase()+"-"+n.id,n.label=this.$getProfileDisplayName(n),n.value=n.docType.toLowerCase()+n.id+n.institutionCode,n.type=n.docType.toLowerCase(),n.portalRole){case _.a.EMPLOYEE:e.push(n);break;case _.a.CHILD:i.push(n)}break;case"group":if(0==a.filter((e=>e.singleId==n.id&&"group"==e.type)).length){n.value=n.docType.toLowerCase()+n.id+n.institutionCode,n.label=n.name+(n.institutionName?" ("+n.institutionName+")":""),n.type=n.docType.toLowerCase(),n.singleId=n.id,n.id=n.docType.toLowerCase()+"-"+n.id,s.push(n);break}}const r=[{label:this.$getText("GROUP"),options:s},{label:this.$getText("EMPLOYEES"),options:e},{label:this.$getText("PUPILS"),options:i}],o=[];for(const e in n){const t=n[e];if(0==a.filter((e=>e.singleId==t.id&&"resource"==e.type)).length){const e={label:`${t.displayName} (${t.institutionName})`,value:"resource"+t.id+t.institutionCode,name:t.name,shortName:t.shortName,resourceType:t.resourceCategory.resourceType,singleId:t.id,id:"resource-"+t.id,type:"resource",institutionCode:t.institutionCode};null!=o[t.resourceCategory.id]?o[t.resourceCategory.id].options.push(e):o[t.resourceCategory.id]={label:t.resourceCategory.name,options:[e]}}}for(const e in o)r.push(o[e]);this.searchedEmployees=r}}))},showAddManagementUserModal(){this.loadAssignedDelegatedAccesses().then((()=>{this.isPreviewMode||(this.assignedDelegatedAccessListByInstProfileId=this.getDelegatedProfileByInstProfileId(this.assignedDelegatedAccesses),this.isLoading=!1,this.$refs.addManagementUserModal.show())}))},print(){this.setPrintTimeRangeEventListeners();navigator.userAgent.toLowerCase().indexOf("safari")>-1?document.execCommand("print",!1,null):window.print()}
1,printFullCalendar(){this.printFullCalendarSetting=!0,this.print()},setPrintTimeRangeEventListeners(){window.addEventListener("beforeprint",this.setPrintTimeRange,{once:!0}),window.addEventListener("afterprint",this.unsetPrintTimeRange,{once:!0})},setPrintTimeRange(){!1===this.printFullCalendarSetting&&(this.calendar.setOption("slotMinTime","06:00:00"),this.calendar.setOption("slotMaxTime","18:00:00"))},unsetPrintTimeRange(){this.calendar.setOption("slotMinTime","00:00:00"),this.calendar.setOption("slotMaxTime","24:00:00"),this.calendar.render(),this.printFullCalendarSetting=!1},hideAddManagementUserModal(){this.$refs.addManagementUserModal.hide()},addManagementUser(){this.isLoading=!0;const e=[];for(const t in this.assignedDelegatedAccessListByInstProfileId)e.push({ownerInstProfileId:t,delegatedInstProfileIds:this.assignedDelegatedAccessListByInstProfileId[t].map((function(e){return e.id}))});if(e.length>0){const t=this;this.updateDelegatedAccess({delegatedAccess:e}).then((()=>{t.loadAssignedDelegatedAccesses().then((()=>{this.hideAddManagementUserModal(),this.isLoading=!1,this.assignedDelegatedAccessListByInstProfileId=this.getDelegatedProfileByInstProfileId(t.assignedDelegatedAccesses)}))}))}},updateUserList(e){for(const t of e){const e=this.institutions.filter((e=>e.institutionCode==t.institutionCode))[0].institutionProfileId;null!=this.assignedDelegatedAccessListByInstProfileId[e]?0==this.assignedDelegatedAccessListByInstProfileId[e].filter((e=>e.id==t.id)).length&&this.assignedDelegatedAccessListByInstProfileId[e].push(t):this.assignedDelegatedAccessListByInstProfileId[e].push(t)}},removeDelegatedAccess(e,t){this.assignedDelegatedAccessListByInstProfileId[e].splice(t,1)}}),watch:{activeInstitutions(){this.loadEventTypes({filterInstitutionCodes:this.activeInstitutions,use:"filter"})}},mounted(){this.loadConsentSelected().then((()=>{this.consentSelected=this.getConsentSelected.data.policyAccepted})),this.loadCalendarFeeds().then((()=>{this.calendarFeeds=this.getCalendarFeeds.data})),this.loadCalendarFeedEnabled({municipalityCodes:this.institutions.map((e=>parseInt(e.municipalityCode)))}).then((()=>{this.calendarFeedEnabled&&this.calendarFeedEnabled.length>0&&(this.calendarFeedEnabledForMunicipality=this.calendarFeedEnabled.filter((e=>!0===e.calendarFeedEnabled)).length>0,this.institutions.forEach(((e,t)=>{const n=this.calendarFeedEnabled.find((t=>t.municipalityCode===e.municipalityCode)),i=Object.assign(Object.assign({},e),{calendarFeedEnabled:!!n&&n.calendarFeedEnabled});this.institutions.splice(t,1,i)})),this.children.forEach(((e,t)=>{const n=this.calendarFeedEnabled.find((t=>t.municipalityCode===e.municipalityCode)),i=Object.assign(Object.assign({},e),{calendarFeedEnabled:!!n&&n.calendarFeedEnabled});this.children.splice(t,1,i)})))})),this.loadEventTypes({filterInstitutionCodes:this.activeInstitutions,use:"filter"}),"group"==this.parent?this.routerPath={createBasicEvent:"group-calendar-create-event",createMeetingEvent:"group-calendar-create-meeting-event"}:this.routerPath={createBasicEvent:"createEvent",createMeetingEvent:"createMeetingEvent"}},components:{AulaSearchRecipients:T.a,MobileTopbar:b.a}},L=n(3),x=Object(L.a)(O,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{staticClass:"calendar-toolbar navbar navbar-expand-lg"},[e.isMobile?e._e():n("ul",{staticClass:"navbar-nav mr-auto align-items-center"},[e.canCreateEvent||e.canCreateEventInGroupPage?n("li",{staticClass:"nav-item"},[e.canCreateEvent?n("b-btn",{staticClass:"tool-link",attrs:{variant:"link","data-testid":"create-event-button"},on:{click:function(t){return e.createEvent("createEvent",e.parent)}}},[n("i",{staticClass:"icon icon-Aula_plus in-circle"}),e._v("\n        "+e._s(e.$getText("CALENDAR_TOOLBAR_NEW_EVENT"))+"\n      ")]):e._e(),e._v(" "),e.canCreateEventInGroupPage?n("b-btn",{staticClass:"tool-link",attrs:{variant:"link","data-testid":"create-event-button"},on:{click:function(t){return e.createEvent("group-calendar-create-event",e.parent)}}},[n("i",{staticClass:"icon icon-Aula_plus in-circle"}),e._v("\n        "+e._s(e.$getText("CALENDAR_TOOLBAR_NEW_EVENT"))+"\n      ")]):e._e(
1)],1):e._e(),e._v(" "),e.canCreateMeetingEvent||e.canCreateMeetingEventInGroupPage?n("li",{staticClass:"nav-item"},[e.canCreateMeetingEvent?n("b-btn",{staticClass:"tool-link",attrs:{variant:"link","data-testid":"create-meeting-button"},on:{click:function(t){return e.createEvent("createMeetingEvent",e.parent)}}},[n("i",{staticClass:"icon icon-Aula_plus in-circle"}),e._v("\n        "+e._s(e.$getText("CALENDAR_TOOLBAR_NEW_MEETING_EVENT"))+"\n      ")]):e._e(),e._v(" "),e.canCreateMeetingEventInGroupPage?n("b-btn",{staticClass:"tool-link",attrs:{variant:"link","data-testid":"create-meeting-button"},on:{click:function(t){return e.createEvent("group-calendar-create-meeting-event",e.parent)}}},[n("i",{staticClass:"icon icon-Aula_plus in-circle"}),e._v("\n        "+e._s(e.$getText("CALENDAR_TOOLBAR_NEW_MEETING_EVENT"))+"\n      ")]):e._e()],1):e._e(),e._v(" "),n("li",{staticClass:"nav-item dropdown"},[n("b-dropdown",{ref:"typeEvent",staticClass:"dropdown-select foldermenu"},[n("template",{slot:"button-content"},[e._v("\n          "+e._s(e.$getText("CALENDAR_TOOLBAR_FILTER"))+"\n          "),n("i",{staticClass:"icon icon-Aula_down-arrow"})]),e._v(" "),e.isPreviewMode?e._e():n("b-form-group",{staticClass:"mx-1 mb-1",attrs:{label:e.$getText("CALENDAR_TOOLBAR_EVENT_FILTER_TYPES")}},[n("b-form-checkbox-group",{attrs:{checked:e.eventTypeFilters,stacked:"","aria-label":e.$getText("CALENDAR_TOOLBAR_EVENT_FILTER_TYPES"),name:"filterEventTypes"},on:{input:e.emitFilters}},[e._l(e.eventTypesForFilter,(function(t){return[e.events.filter((function(e){return e.type==t})).length>0?n("b-form-checkbox",{key:t,attrs:{label:e.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_"+t),value:t}},[e._v("\n                "+e._s(e.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_"+t))+"\n              ")]):e._e()]})),e._v(" "),e.profile.role==e.portalRoles.GUARDIAN?n("b-form-checkbox",{staticClass:"toolbar-item",attrs:{value:"directlyRelated",label:e.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_DIRECTLY_RELATED")}},[e._v("\n              "+e._s(e.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_DIRECTLY_RELATED"))+"\n            ")]):e._e()],2)],1)],2)],1),e._v(" "),e.profile.role==e.portalRoles.EMPLOYEE&&"profile"==e.parent?n("li",{staticClass:"nav-item dropdown"},[n("b-dropdown",{ref:"sharedCalendar",staticClass:"dropdown-select foldermenu",on:{shown:e.focusOtherUserSearch}},[n("template",{slot:"button-content"},[e._v("\n          "+e._s(e.$getText("CALENDAR_TOOLBAR_SHARED_CALENDAR_OPEN"))+"\n          "),n("i",{staticClass:"icon icon-Aula_down-arrow"})]),e._v(" "),n("div",{staticClass:"open-calendar-section"},[n("label",{staticClass:"toolbar-label"},[e._v(e._s(e.$getText("CALENDAR_TOOLBAR_SHARED_CALENDAR_SEARCH")))]),e._v(" "),e.isPreviewMode?e._e():n("aula-search",{attrs:{"search-result-loader":e.loadSearchRecipients,"split-groups-participants":!1,"set-focus":e.setOtherUserFocus,"include-self":!1,results:e.searchedEmployees,"existing-participants":e.existingSharedCalendars,"reset-search-input":e.resetSearch,"select-all":!1,"close-dropdown-after-select":!1,"append-to-body":!1},on:{emitSelected:e.emitSelectedCalendars}}),e._v(" "),n("b-alert",{staticClass:"ml-2 mb-3",attrs:{variant:"danger",show:e.showOnlyOneGroupWarning}},[e._v("\n            "+e._s(e.$getText("CALENDAR_ALERT_ONLY_ONE_GROUP"))+"\n          ")]),e._v(" "),n("b-form-group",{staticClass:"mt-2 p-0",attrs:{label:e.$getText("CALENDAR_TOOLBAR_SEE_SCHOOL_CALENDAR")}},[n("b-form-checkbox-group",{attrs:{checked:e.selectedInstitutionCalendarIds,stacked:"",name:"schoolCalendar","aria-label":e.$getText("CALENDAR_TOOLBAR_SEE_SCHOOL_CALENDAR")},on:{change:e.emitSelectedInstitutionCalendars}},e._l(e.institutions,(function(t,i){return n("b-form-checkbox",{key:i,attrs:{value:t.id}},[e._v("\n                "+e._s(e.$getText("CALENDAR_TOOLBAR_SCHOOL_CALENDAR"))+"\n                "+e._s(t.name)+"\n              ")])})),1)],1)],1)],2)],1):e._e(),e._v(" "),e.profile.role==e.portalRoles.EMPLOYEE&&"profile"==e.parent&&null!=e.myDelegatedAccesses&&e.myDelegatedAccesses.length>0?n("li",{staticClass:"nav-item dropdown collaps-medium"},[n("b-dropdown",{ref:"controllableCalendars",staticClass:"dropdown-select foldermenu"},[n("template",{slot:"button-content"},[e._v("\n          "+e._s(e.$getText("CALENDAR_TOOLBAR_CONTROLLABLE_CALENDARS"))+"\n          "),n("i",{staticClass:"icon icon-Aula_down-arrow"})]),e._v(" "),e._l(e.myDelegatedAccesses,(function(t){return n("b-dropdown-item",{key:t.id,attrs:{active:e.delegatedContext.id===t.id},on:{click:function(n){return e.selectDelegatedInstProfile(t)}}},[e._v("\n          "+e._s(e.$getProfileDisplayName(t))+"\n        ")])}
1))],2)],1):e._e(),e._v(" "),e.profile.role===e.portalRoles.CHILD||e.profile.role===e.portalRoles.OTP||1!=e.calendarFeedEnabledForMunicipality||e.openedFromGroup()?e._e():n("li",{staticClass:"nav-item hide-tablet-down"},[n("b-btn",{staticClass:"tool-link",attrs:{variant:"link"},on:{click:function(t){return e.openCalendarSyncModal()}}},[e._v("\n        "+e._s(e.$getText("CALENDARFEED_ITEM_TITLE"))+"\n        "),n("i",{staticClass:"icon-Aula_forward-arrow"})])],1),e._v(" "),e.profile.role===e.portalRoles.EMPLOYEE&&"profile"==e.parent?n("li",{staticClass:"nav-item nav-item-right"},[n("b-dropdown",{staticClass:"dropdown-select more-actions variable",attrs:{size:"sm",right:"","aria-label":e.$getText("ARIA_LABEL_OTHER_FUNCTIONS")}},[n("template",{slot:"button-content"},[n("span",{staticClass:"icon-Aula_elipses",attrs:{"aria-hidden":"true"}}),e._v(" "),n("span",{staticClass:"sr-only"},[e._v(e._s(e.$getText("CALENDAR_TOOLBAR_OTHER_FUNCTIONS")))])]),e._v(" "),e.delegatedContext.institutionProfileId?e._e():n("b-dropdown-item-btn",{on:{click:function(t){return e.showAddManagementUserModal()}}},[n("span",[e._v(e._s(e.$getText("CALENDAR_TITLE_RIGHT_OF_DISPOSAL")))])]),e._v(" "),n("b-dropdown-item-btn",{on:{click:function(t){return e.print()}}},[n("span",[e._v(e._s(e.$getText("CALENDAR_TOOLBAR_PRINT_MAIN_DAY")))])]),e._v(" "),n("b-dropdown-item-btn",{on:{click:function(t){return e.printFullCalendar()}}},[n("span",[e._v(e._s(e.$getText("CALENDAR_TOOLBAR_PRINT_FULL_DAY")))])]),e._v(" "),1!=e.calendarFeedEnabledForMunicipality||e.openedFromGroup()?e._e():n("div",{staticClass:"expand-large hide-tablet-down"},[n("b-dropdown-item",{on:{click:function(t){return e.openCalendarSyncModal()}}},[e._v("\n            "+e._s(e.$getText("CALENDARFEED_ITEM_TITLE"))+"\n          ")])],1),e._v(" "),n("div",{staticClass:"expand-medium"},[e.profile.role==e.portalRoles.EMPLOYEE&&"profile"==e.parent&&null!=e.myDelegatedAccesses&&e.myDelegatedAccesses.length>0?[n("b-dropdown-divider"),e._v(" "),n("b-dropdown-header",{attrs:{id:"dropdown-header-delegated"}},[e._v("\n              "+e._s(e.$getText("CALENDAR_TOOLBAR_CONTROLLABLE_CALENDARS"))+"\n            ")]),e._v(" "),e._l(e.myDelegatedAccesses,(function(t){return n("b-dropdown-item",{key:t.id,attrs:{"aria-describedby":"dropdown-header-delegated",active:e.delegatedContext.id===t.id},on:{click:function(n){return e.selectDelegatedInstProfile(t)}}},[e._v("\n              "+e._s(e.$getProfileDisplayName(t))+"\n            ")])}))]:e._e()],2)],2)],1):e._e(),e._v(" "),e.profile.role===e.portalRoles.GUARDIAN?n("li",{staticClass:"nav-item nav-item-right mr-2"},[n("b-btn",{staticClass:"py-1 px-2",attrs:{variant:"link","aria-label":e.$getText("CALENDAR_TITLE_PRINT")},on:{click:function(t){return e.print()}}},[n("i",{staticClass:"icon-printer"})])],1):e._e()]),e._v(" "),e.isMobile?n("ul",{staticClass:"navbar-nav mr-auto"},[n("li",{directives:[{name:"button",rawName:"v-button"}],staticClass:"nav-item dropdown mr-4",on:{click:function(t){e.showMobileMenu=!0}}},[e._v("\n      "+e._s(e.$getText("CALENDAR_MENU_MOBILE_HEADER"))+"\n      "),n("i",{staticClass:"icon icon-Aula_down-arrow ml-2"})])]):e._e(),e._v(" "),e.isMobile?n("transition",{attrs:{name:"slide-only"}},[e.showMobileMenu?n("div",{staticClass:"mobile-calendar-toolbar"},[n("mobile-topbar",{attrs:{"show-ok":!1,"text-key":"CALENDAR_MENU_MOBILE_HEADER"},on:{leftIconClicked:function(t){e.showMobileMenu=!1}}}),e._v(" "),e.isLoading?n("aula-spinner",{staticClass:"aula-spinner"}):n("div",{staticClass:"menu-body"},[0!==e.events.length?n("b-row",[n("b-col",[n("div",{staticClass:"toolbar-title"},[e._v("\n              "+e._s(e.$getText("CALENDAR_TOOLBAR_FILTER"))+"\n            ")]),e._v(" "),n("b-form-checkbox-group",{attrs:{checked:e.eventTypeFilters,stacked:""},on:{input:e.emitFilters}},[e._l(e.eventTypesForFilter,(function(t){return[e.events.filter((function(e){return e.type==t})).length>0?n("b-form-checkbox",{key:t,staticClass:"toolbar-item",attrs:{value:t}},[e._v("\n                  "+e._s(e.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_"+t))+"\n                ")]):e._e(
1)]})),e._v(" "),e.profile.role==e.portalRoles.GUARDIAN?n("b-form-checkbox",{staticClass:"toolbar-item",attrs:{value:"directlyRelated"}},[e._v("\n                "+e._s(e.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_DIRECTLY_RELATED"))+"\n              ")]):e._e()],2)],1)],1):e._e(),e._v(" "),e.profile.role==e.portalRoles.EMPLOYEE&&"profile"==e.parent&&null!=e.myDelegatedAccesses&&e.myDelegatedAccesses.length>0?n("b-row",[n("b-col",[n("div",{staticClass:"toolbar-title"},[e._v("\n              "+e._s(e.$getText("CALENDAR_TOOLBAR_CONTROLLABLE_CALENDARS_MOBILE"))+"\n            ")]),e._v(" "),n("b-form-radio-group",{attrs:{checked:e.delegatedContext.id}},e._l(e.myDelegatedAccesses,(function(t){return n("b-form-radio",{key:t.id,staticClass:"toolbar-item",attrs:{value:t.id},on:{change:function(n){return e.selectDelegatedInstProfile(t)}}},[e._v("\n                "+e._s(e.$getProfileDisplayName(t))+"\n              ")])})),1)],1)],1):e._e(),e._v(" "),e.profile.role!==e.portalRoles.EMPLOYEE||"profile"!=e.parent||e.delegatedContext.institutionProfileId?e._e():n("b-row",{directives:[{name:"button",rawName:"v-button"}],staticClass:"row-no-margin",on:{click:e.showAddManagementUserModal}},[n("b-col",{staticClass:"toolbar-title"},[e._v("\n            "+e._s(e.$getText("CALENDAR_TITLE_RIGHT_OF_DISPOSAL"))+"\n            "),n("i",{staticClass:"pull-right icon icon-Aula_forward-arrow"})])],1),e._v(" "),e.profile.role===e.portalRoles.EMPLOYEE&&"profile"==e.parent?n("b-row",{directives:[{name:"button",rawName:"v-button"}],staticClass:"row-no-margin",on:{click:function(t){return e.showMobileAddShareUserModal()}}},[n("b-col",{staticClass:"toolbar-title"},[e._v("\n            "+e._s(e.$getText("CALENDAR_TOOLBAR_SHARED_CALENDAR"))),n("i",{staticClass:"pull-right icon icon-Aula_forward-arrow"})])],1):e._e(),e._v(" "),e.profile.role!=e.portalRoles.EMPLOYEE&&e.profile.role!=e.portalRoles.GUARDIAN||1!=e.calendarFeedEnabledForMunicipality||e.openedFromGroup()?e._e():n("b-row",{directives:[{name:"button",rawName:"v-button"}],staticClass:"row-no-margin",on:{click:function(t){return e.openCalendarSyncModal()}}},[n("b-col",{staticClass:"toolbar-title"},[e._v("\n            "+e._s(e.$getText("CALENDARFEED_ITEM_TITLE"))+"\n            "),n("i",{staticClass:"pull-right icon icon-Aula_forward-arrow"})])],1)],1)],1):e._e()]):e._e(),e._v(" "),n("aula-modal",{ref:"addManagementUserModal",attrs:{"header-text":"CALENDAR_HEADER_CALENDAR_MANAGEMENT","is-loading":e.isLoading,"show-left-icon":!1,"ok-text":e.isMobile?"OK":"SUBMIT","show-header":!e.isMobile,"left-text":e.isMobile?"CALENDAR_TITLE_RIGHT_OF_DISPOSAL":null,"css-class":"modal-right-of-disposal"},on:{cancelClicked:e.hideAddManagementUserModal,okClicked:e.addManagementUser}},[n("div",{staticClass:"modal-right-of-disposal",class:e.isMobile?"add-user-modal-sm":""},[n("div",{class:e.isMobile?"menu-body":""},[n("b-row",{staticClass:"mb-3"},[n("b-col",[n("b",[e._v(e._s(e.$getText("CALENDAR_HANDLE_CALENDAR")))]),e._v(" "),n("br"),e._v(" "),n("b-row",e._l(e.institutions,(function(t){return n("b-col",{key:t.code,staticClass:"delegated",attrs:{cols:"6"}},[n("div",{staticClass:"margin-bottom"},[e._v("\n                  "+e._s(t.name)+"\n                ")]),e._v(" "),e._l(e.assignedDelegatedAccessListByInstProfileId[t.institutionProfileId],(function(i,s){return n("span",{key:i.id,staticClass:"el-tag el-tag--info el-tag--small"},[e._v("\n                  "+e._s(i.name)+" ("+e._s(i.metadata)+")\n                  "),n("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(n){return e.removeDelegatedAccess(t.institutionProfileId,s)}}})])}))],2)})),1)],1)],1),e._v(" "),n("b-row",[n("b-col",[n("label",{},[e._v(e._s(e.$getText("CALENDAR_ADD_USER")))]),e._v(" "),n("aula-search-recipients",{staticClass:"pb-1",attrs:{"portal-roles":[e.portalRoles.EMPLOYEE],"existing-participants":[],url:"findProfiles","select-all":!1},on:{emitSelected:e.updateUserList}})],1)],1)],1)])]),e._v(" "),n("aula-modal",{ref:"mobileAddSharedUserModal",attrs:{"show-left-icon":!1,"header-text":"CALENDAR_TOOLBAR_SHARED_CALENDAR","ok-text":"SUBMIT"},on:{okClicked:e.onMobileAddSharedUserModalOkClicked}},[n("div",{staticClass:"add-user-modal-sm"},[n("div",{staticClass:"menu-body"},[n("br"),e._v(" "),n("b-row",{attrs:{"align-h":"center"}},[n("b-col",[n("aula-search",{staticClass:"mb-2",attrs:{"search-result-loader":e.loadSearchRecipients,"split-groups-participants":!1,results:e.searchedEmployees,"existing-participants":e.mobileExistingSharedCalendars,"reset-search-input":e.resetSearch,"select-all":!1,"close-dropdown-after-select":!1},on:{emitSelected:e.emitSelectedCalendars}}),e._v(" "),n("b-form-group",{attrs:{label:e.$getText("CALENDAR_TOOLBAR_SEE_SCHOOL_CALENDAR")}},[n("b-form-checkbox-group",{attrs:{checked:e.mobileSelectedInstitutionCalendarIds,stacked:"","aria-label":e.$getText("CALENDAR_TOOLBAR_SEE_SCHOOL_CALENDAR"),name:"schoolCalendar"},on:{change:e.emitSelectedInstitutionCalendars}},e._l(e.institutions,(function(t,i){return n("b-form-checkbox",{key:i,attrs:{value:t.id}},[e._v("\n                  "+e._s(e.$getText("CALENDAR_TOOLBAR_SCHOOL_CALENDAR"))+"\n                  "+e._s(t.name)+"\n                ")])})),1)],1)],1)],1)],1)])]),e._v(" "),n("aula-modal",{ref:"changeSyncOptionModal",attrs:{"header-text":"CALENDARFEED_TITLE","css-class":"modal-calendarfeed","is-loading":e.isLoading},on:{cancelClicked:function(t){e.$refs.changeSyncOptionModal.hide(),e.resetCalendarSyncModal()},okClicked:function(t){return e.openOverview()},closeClicked:function(t){e.$refs.changeSyncOptionModal.hide(),e.resetCalendarSyncModal()}}},[n("h2",[e._v("\n      "+e._s(e.$getText("CALENDARFEED_INTRODUCTION_HEADER"))+"\n    ")]),e._v(" "),n("pre",{staticClass:"reset-pre"},[e._v(e._s(e.$getText("CALENDARFEED_INTRODUCTION_BODY")))]),e._v(" "),n("div",{staticClass:"consent-area"},[n("strong",[e._v("\n        "+e._s(e.$getText("CALENDARFEED_CONSENT_TITLE"))+"\n      ")]),e._v(" "),n("p",[e._v("\n        "+e._s(e.$getText("CALENDARFEED_CONSENT_DESCRIPTION"))+"\n      ")]),e._v(" "),n("b-form-checkbox",{model:{value:e.consentSelected,callback:function(t){e.consentSelected=t},expression:"consentSelected"}},[n("strong",[e._v("\n          "+e._s(e.$getText("CALENDARFEED_CONSENT_ACCEPT"))+"\n        ")])]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showNoConsentWarning}},[e._v("\n        "+e._s(e.$getText("CALENDARFEED_CONSENT_MISSING"))+"\n      ")])],1)]),e._v(" "),n("aula-modal",{ref:"calendarSyncOverviewModal",attrs:{"header-text":"CALENDARFEED_TITLE","css-class":"modal-calendarfeed","is-loading":e.isLoading,"hide-footer":!0},on:{cancelClicked:function(t){return e.$refs.calendarSyncOverviewModal.hide()},okClicked:function(t){return e.$refs.calendarSyncOverviewModal.hide()},closeClicked:function(t){return e.$refs.calendarSyncOverviewModal.hide()}}},[[n("h2",[e._v("\n        "+e._s(e.$t("calendar.create_link_title"))+"\n      ")]),e._v(" "),n("span",[e._v("\n        "+e._s(e.calendarLinkSynchronizeDescription)),n("br"),e._v("\n        "+e._s(e.$t("user.edit_consent_description"))),n("br"),e._v(" "),n("a",{staticClass:"edit-consent",attrs:{variant:"link"},on:{click:function(t){e.$refs.calendarSyncOverviewModal.hide(),e.$refs.changeSyncOptionModal.show()}}},[n("span",{staticClass:"edit-consent-text"},[e._v(e._s(e.$t("user.edit_consent")))]),e._v(" "),n("i",{staticClass:"icon icon-Aula_edit_pen"})])]),e._v(" "),n("p",{staticClass:"text-danger mt-4"},[e._v("\n        "+e._s(e.calendarLinkSynchronizeWarning)+"\n      ")])],e._v(" "),e.isLoading?n("aula-spinner",{staticClass:"aula-spinner"}):e._e(),e._v(" "),n("div",{staticClass:"mt-4"},[e._l(e.calendarFeedProfiles,(function(t){return[t.calendarFeedEnabled?n("div",{key:t.institutionProfileId,staticClass:"item"},[n("b-row",{staticClass:"pr-0 pl-0 mr-0 ml-0 mb-2",attrs:{"align-v":"center"}},[n("user-icon",{attrs:{name:t.name,"picture-object":t.profilePicture,"short-name":t.shortName,"show-inline":!0,"user-icon-class":e.isMobile?"small":""}}),e._v(" "),n("strong",{staticClass:"ml-3"},[e._v(e._s(t.displayName))])],1),e._v(" "),n("hr",{staticClass:"mb-4"}),e._v(" "),e.checkIfHaveFeed(t)?[n("strong",[e._v("\n              "+e._s(e.$getText("CALENDARFEED_OVERVIEW_YEAR_FEED_TITLE"))+"\n            ")]),e._v(" "),n("p",[e._v("\n              "+e._s(e.getCalendarYearFeedOverviewDescription(t))+"\n            ")]),e._v(" "),n("b-row",{staticClass:"copy-area mb-3"},[n("b-btn",{staticClass:"copy-btn",attrs:{variant:"link"},on:{click:function(n){return e.copyYearFeed(t)}}},[e._v("\n                "+e._s(e.$getText("CALENDARFEED_OVERVIEW_FEED_COPY_LINK_TEXT"))+"\n              ")]),e._v(" "),n("p",{staticClass:"mb-0 ml-3 truncate"},[e._v("\n                "+e._s(t.getOneYearFeed())+"\n              ")])],1),e._v(" "),e.profile.role===e.portalRoles.EMPLOYEE?[n("strong",[e._v("\n                "+e._s(e.$getText("CALENDARFEED_OVERVIEW_EMPLOYEE_WEEK_FEED_TITLE"))+"\n              ")]),e._v(" "),n("p",[e._v("\n                "+e._s(e.$getText("CALENDARFEED_OVERVIEW_EMPLOYEE_WEEK_FEED_DESCRIPTION"))+"\n              ")]),e._v(" "),n("b-row",{staticClass:"copy-area mb-3"},[n("b-btn",{staticClass:"copy-btn",attrs:{variant:"link"},on:{click:function(n){return e.copyWeekFeed(t)}}},[e._v("\n                  "+e._s(e.$getText("CALENDARFEED_OVERVIEW_FEED_COPY_LINK_TEXT"))+"\n                ")]),e._v(" "),n("p",{staticClass:"mb-0 ml-3 truncate"},[e._v("\n                  "+e._s(t.getOneWeekFeed())+"\n                ")])],1)]:e._e(),e._v(" "),n("b-row",{staticClass:"m-0",attrs:{"align-v":"center"}},[n("b-btn",{staticClass:"mr-2",attrs:{variant:"link"},on:{click:function(n){return e.onDeleteButtonClicked(t)}}},[n("i",{staticClass:"icon icon-Aula_bin"}),e._v("\n                "+e._s(e.calendarYearFeedOverviewDeleteText)+"\n              ")]),e._v(" "),n("b-btn",{attrs:{variant:"link"},on:{click:function(n){e.isUpdateFeed=!0,e.openFeed(t)}}},[n("i",{staticClass:"icon icon-Aula_edit_pen"}),e._v("\n                "+e._s(e.calendarYearFeedOverviewEditText)+"\n              ")])],1)]:[n("p",[e._v("\n              "+e._s(e.$getText("CALENDARFEED_OVERVIEW_NO_FEED"))+"\n            ")]),e._v(" "),n("b-btn",{staticClass:"send-btn",attrs:{variant:"primary"},on:{click:function(n){e.isUpdateFeed=!1,e.openFeed(t)}}},[e._v("\n              "+e._s(e.calendarFeedOverviewCreateLinkText)+"\n            ")])]],2):e._e()]}))],2)],2),e._v(" "),n("toastr",{ref:"copyLinkToastr",attrs:{variant:"success","show-icon":!0,icon:"icon-Aula_check"}},[e._v("\n    "+e._s(e.$getText("CALENDARFEED_OVERVIEW_LINK_COPIED"))+"\n  ")]),e._v(" "),n("toastr",{ref:"deleteLinkToastr",attrs:{variant:"success","show-icon":!0,icon:"icon-Aula_check"}}
1,[e._v("\n    "+e._s(e.$getText("CALENDARFEED_DELETED_TOASTR_TEXT"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"calendarSyncCreateModal",attrs:{"header-text":"CALENDARFEED_TITLE","css-class":"modal-calendarfeed","is-loading":e.isLoading,"ok-text":e.buttonCreateText},on:{closeClicked:function(t){e.$refs.calendarSyncCreateModal.hide(),e.isMobile&&e.$refs.calendarSyncOverviewModal.show()},okClicked:function(t){e.isUpdateFeed?e.updateFeed():e.createFeed()},cancelClicked:function(t){return e.closeFeed()}}},[n("b-row",{staticClass:"pr-0 pl-0 mr-0 ml-0 mb-2",attrs:{"align-v":"center"}},[n("user-icon",{attrs:{name:e.selectedCalendarFeedProfile.name,"picture-object":e.selectedCalendarFeedProfile.profilePicture,"short-name":e.selectedCalendarFeedProfile.shortName,"show-inline":!0,"user-icon-class":e.isMobile?"small":""}}),e._v(" "),n("strong",{staticClass:"ml-3"},[e._v(" "+e._s(e.selectedCalendarFeedProfile.displayName))])],1),e._v(" "),n("hr"),e._v(" "),n("strong",[e._v("\n      "+e._s(e.$getText("CALENDARFEED_OVERVIEW_GUARDIAN_CREATE_FILTER_TITLE"))+"\n    ")]),e._v(" "),n("p",[e._v("\n      "+e._s(e.$getText("CALENDARFEED_OVERVIEW_GUARDIAN_CREATE_FILTER_DESCRIPTION"))+"\n    ")]),e._v(" "),e._l(e.calendarFeedEventOptions,(function(t,i){return[n("b-form-checkbox",{key:i,attrs:{label:e.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_"+t),value:t},model:{value:e.selectedFilters,callback:function(t){e.selectedFilters=t},expression:"selectedFilters"}},[e._v("\n        "+e._s(e.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_"+t))+"\n      ")])]})),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showNoFiltersChosenWarning}},[e._v("\n      "+e._s(e.$getText("CALENDARFEED_OVERVIEW_NO_FILTERS_ERROR"))+"\n    ")])],2),e._v(" "),n("aula-modal",{ref:"consentRemoveWarning",attrs:{"ok-text":"CALENDARFEED_CONSENT_YES"},on:{cancelClicked:function(t){return e.$refs.consentRemoveWarning.hide()},okClicked:function(t){e.changeStatus(),e.$refs.consentRemoveWarning.hide()},closeClicked:function(t){return e.$refs.consentRemoveWarning.hide()}}},[n("pre",{staticClass:"reset-pre"},[e._v(e._s(e.$getText("CALENDARFEED_REMOVE_CONSENT_WARNING")))])]),e._v(" "),n("aula-modal",{ref:"feedDeleteWarning",attrs:{"ok-text":"CALENDARFEED_DELET
1E_FEED_YES","css-class":"modal-submodal"},on:{cancelClicked:function(t){return e.$refs.feedDeleteWarning.hide()},okClicked:function(t){return e.deleteFeed()},closeClicked:function(t){return e.$refs.feedDeleteWarning.hide()}}},[n("p",[e._v(e._s(e.$getText("CALENDARFEED_DELETE_FEED_WARNING")))])])],1)}),[],!1,null,"215e8522",null).exports,P=n(790),M=n.n(P),F=n(16),U=n.n(F),B=n(37),V=n(146),W=n(30),G=n(60),H=n(115),j=n(66),Y=n(39),$=n.n(Y),z=n(297),q=n.n(z),K=n(48),Q=n.n(K),J=n(223),Z=n.n(J),X=Object.freeze({LOCATION:"location",LOKALER:"Lokaler",RESOURCES:"resources",INVITEES:"invitees"}),ee=n(23),te=n(34),ne=n(321),ie=n(916),se=n(20),ae=n(15),re=n(21),oe={components:{Icon:se.a,FullCalendar:ne.a},props:{startDate:{type:String,required:!0},endDate:{type:String,required:!0},eventSources:{type:Array,required:!0},resources:{type:Array,default:null}},emits:["addResource","removeResource","removeInvitee","openDatePicker","eventClick"],computed:{iconClassEnum:()=>ae.a,options(){return{schedulerLicenseKey:"0076219922-fcs-1735791579",locale:"da",plugins:[ie.a],initialView:"resourceTimeline",initialDate:this.startDate,headerToolbar:{left:"title openCalendar prev,next",right:"today"},customButtons:{openCalendar:{icon:" icon-Aula_down-arrow",click:this.emitOpenDatePicker}},buttonText:{today:this.$t("calendar.today")},weekends:!0,weekNumbers:!1,weekNumberFormat:{week:"long"},titleFormat:{month:"long",day:"2-digit",year:"numeric"},slotLabelFormat:{hour:"2-digit",minute:"2-digit"},dayHeaderFormat:{month:"long",day:"2-digit",year:"numeric"},contentHeight:500,scrollTime:"08:00",slotEventOverlap:!1,slotMinWidth:100,eventSources:this.eventSources,resources:this.resources,resourceGroupField:"category",resourcesInitiallyExpanded:!0,resourceAreaWidth:300,resourceAreaHeaderContent:this.$t("calendar.resources"),resourceGroupLabelContent:this.getResourceLabelContent,eventClick:this.emitEventClick}}},methods:{getApi(){return this.$refs.calendar.getApi()},getResourceLabelContent(e){switch(e.groupValue){case X.INVITEES:return this.$t("user.participants");case X.LOCATION:return this.$t("calendar.selected_locations");case X.RESOURCES:return this.$t("calendar.selected_resources");default:return e.groupValue}},getCanAddResource(e){const t=e.extendedProps.category;if(e.getEvents().some((e=>re.a.isBetween(e.start,this.startDate,this.endDate,"[]")||re.a.isBetween(e.end,this.startDate,this.endDate,"[]"))))return!1;switch(t){case X.RESOURCES:case X.LOCATION:case X.INVITEES:return!1;default:return!0}},getCanRemoveResource(e){switch(e.extendedProps.category){case X.RESOURCES:case X.LOCATION:return!0;default:return!1}},getCanRemoveInvitee:e=>"invitee"===e.extendedProps.inviteeType,emitOpenDatePicker(){this.$emit("openDatePicker")},emitAddResource(e){this.$emit("addResource",Object.assign(Object.assign({},e.extendedProps),{title:e.title}))},emitRemoveResource(e){this.$emit("removeResource",Object.assign(Object.assign({},e.extendedProps),{title:e.title}))},emitRemoveInvitee(e){this.$emit("removeInvitee",Object.assign(Object.assign({},e.extendedProps),{title:e.title}))},emitEventClick(e){this.$emit("eventClick",e)}}},le=Object(L.a)(oe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("FullCalendar",{ref:"calendar",attrs:{options:e.options},scopedSlots:e._u([{key:"resource-label-content",fn:function(t){var i=t.resource;return[n("div",{staticClass:"resource-label-content"},[n("div",{staticClass:"title"},[e._v("\n        "+e._s(i.title)+"\n      ")]),e._v(" "),e.getCanAddResource(i)?n("b-button",{staticClass:"resource-button",attrs:{variant:"link"},on:{click:function(t){return e.emitAddResource(i)}}},[n("Icon",{attrs:{name:e.iconClassEnum.PLUS}})],1):e._e(),e._v(" "),e.getCanRemoveResource(i)?n("b-button",{staticClass:"resource-button",attrs:{variant:"link"},on:{click:function(t){return e.emitRemoveResource(i)}}},[n("Icon",{attrs:{name:e.iconClassEnum.MINUS}})],1):e._e(),e._v(" "),e.getCanRemoveInvitee(i)?n("b-button",{staticClass:"resource-button",attrs:{variant:"link"},on:{click:function(t){return e.emitRemoveInvitee(i)}}},[n("Icon",{attrs:{name:e.iconClassEnum.MINUS}}
1)],1):e._e()],1)]}}])})}),[],!1,null,"1e446ce7",null).exports;function ce(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var me=200,pe={components:{PlanningAssistantCalendarView:le,AulaSearchRecipients:T.a,AulaTimepicker:j.a},props:{parent:{type:String,default:E.a.PROFILE},eventForm:{type:Object,default:null},locations:{type:Array,default:function(){return[]}},canEditTime:{type:Boolean,default:!1},showInvitees:{type:Boolean,default:!0},canInviteInvitees:{type:Boolean,default:!0}},data:function(){return{calendar:null,eventFormBackup:{},observer:null,allResources:[],resizableHtml:"",startTime:I()().format("HH:mm"),endTime:I()().format("HH:mm"),startDate:I()().format("YYYY-MM-DD"),datePickerDate:I()().format("YYYY-MM-DD"),minuteInterval:15,fifteenMinuteWidth:0,startLeft:0,startRight:0,draggedDistance:0,resetInput:!1,moment:I.a,portalRoles:_.a,moduleTypes:W.a,timepickerSettings:G.a,parentTypes:E.a,isLoading:!0}},computed:he(he({},Object(m.c)({resources:p.a.GET_RESOURCES,events:p.a.GET_EVENTS,calendarActiveInstProfileId:p.a.GET_CALENDAR_ACTIVE_INST_PROFILE_ID})),{},{userProfileStore:function(){return Object(N.a)()},profile:function(){return this.userProfileStore.institutionProfile},customButtons:function(){var e=this;return{openCalendar:{icon:" icon-Aula_down-arrow",click:function(){e.openDatePicker()}}}},eventSources:function(){var e=this,t=[{events:function(t,n){var i={instProfileIds:e.allResources.filter((function(e){return e.type==A.a.PROFILE.toLowerCase()})).map((function(e){return e.singleId})),resourceIds:e.allResources.filter((function(e){return e.type==A.a.RESOURCE.toLowerCase()})).map((function(e){return e.singleId})),start:I()(t.start),end:I()(t.end),calendarActiveInstProfileId:e.calendarActiveInstProfileId,showVacationRegistrationEvents:!1};e.clearEvents(),e.loadEventsByProfileIdsAndResourceIds(i).then((function(){n(e.calculateEvents())}))}}];return t},startMinute:function(){return this.startTime.split(":")[1]},endMinute:function(){return this.endTime.split(":")[1]},startHour:function(){return this.startTime.split(":")[0]},endHour:function(){return this.endTime.split(":")[0]},startMoment:function(){return I()(this.startDate).hour(this.startHour).minute(this.startMinute)},endMoment:function(){return I()(this.startDate).hour(this.endHour).minute(this.endMinute)}}),methods:he(he({},Object(m.b)({listResources:p.a.LIST_RESOURCES,loadEventsByProfileIdsAndResourceIds:p.a.LOAD_EVENTS_BY_PROFILEID,clearEvents:p.a.CLEAR_EVENTS})),{},{cancel:function(){this.$emit("resetEventForm",this.eventFormBackup),this.$refs.planningAssistantModal.hide()},getInviteeResources:function(){var e=[],t=1;e=this.pushResource(e,this.profile.id,this.$getProfileDisplayName(this.profile),A.a.PROFILE.toLowerCase(),X.INVITEES),this.eventForm.creator&&(e=this.pushResource(e,this.eventForm.creator.id,this.$getProfileDisplayName(this.eventForm.creator),A.a.PROFILE.toLowerCase(),X.INVITEES,"creator"));var n,i=ce(this.eventForm.invitees);try{for(i.s();!(n=i.n()).done;){var s=n.value;if(s.portalRole!==_.a.GUARDIAN&&s.role!==_.a.GUARDIAN&&s.institutionCode===this.eventForm.institutionCode&&t<40){var a=this.$getProfileDisplayName(s);e=this.pushResource(e,s.id,a,A.a.PROFILE.toLowerCase(),X.INVITEES,"invitee"),t++}else t>=40&&this.$refs.tooManyInviteesModal.show()}}catch(e){i.e(e)}finally{i.f()}if(Array.isArray(this.eventForm.coOrganizers)){var r,o=ce(this.eventForm.coOrganizers);try{for(o.s();!(r=o.n()).done;){var l=r.value;if(l.institutionCode===this.eventForm.institutionCode&&t<40){var c=this.$getProfileDisplayName(l);e=this.pushResource(e,l.id,c,A.a.PROFILE.toLowerCase(),X.INVITEES,"coOrganizer"),t++}else t>=40&&this.$refs.tooManyInviteesModal.show()}}catch(e){o.e(e)}finally{o.f()}}return e},setAllResources:function(){var e,t=[];this.showInvitees&&(e=t).push.apply(e,r()(this.getInviteeResources()));var n,i=ce(this.locations);try{for(i.s();!(n=i.n()).done;){var s=n.value;s.id&&(t=this.pushResource(t,s.id,s.label,A.a.RESOURCE.toLowerCase(),X.LOCATION))}}catch(e){i.e(e)}finally{i.f()}var a,o=ce(this.eventForm.resources);try{for(o.s();!(a=o.n()).done;){var l=a.value;t=this.pushResource(t,l.id,l.label,A.a.RESOURCE.toLowerCase(),X.RESOURCES)}}catch(e){o.e(e)}finally{o.f()}var c,u=ce(this.resources);try{for(u.s();!(c=u.n()).done;){var d=c.value;t=this.pushResource(t,d.id,"".concat(d.displayName," (").concat(d.institutionName,")"),A.a.RESOURCE.toLowerCase(),d.resourceCategory.name)}}catch(e){u.e(e)}finally{u.f()}this.allResources=t},eventItemClick:function(e){e.disableEventRouting=!0,this.$eventHub.$emit("planningAssistantEventClicked",e)},changeCalendarDate:function(){null!=this.calendar&&this.calendar.gotoDate(I()(this.startDate).toDate()),this.$emit("updateStartDate",this.startDate)},openDatePicker:function(){this.canEditTime&&(U()(".planning-assistant-datepicker").is(":visible")?this.$refs.calendarDatepicker.blur():this.$refs.calendarDatepicker.handleFocus())},pushResource:function(e,t,n,i,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",r=e;return null==r.find((function(e){return e.id==i+"-"+t}))&&r.push({id:i+"-"+t,singleId:t,type:i,title:n,category:s,inviteeType:a}),r},calculateEvents:function(){return this.$refs.fullCalendar.getApi().refetchResources(),this.events.filter((function(e){return!e.type.includes("sum-")}
1))},removeInvitee:function(e){var t=this.eventForm.invitees.filter((function(t){return t.id!=e.singleId}));this.$emit("updateInvitees",t),this.calendar.refetchEvents(),this.setAllResources()},removeResource:function(e){var t=this;if(e.category===X.LOCATION||e.category===X.LOKALER){var n=this.locations;n=n.filter((function(t){return t.id!=e.singleId})),this.$emit("updateLocations",n)}else if(e.category===X.RESOURCES){var i=this.eventForm.resources;i=i.filter((function(t){return t.id!=e.singleId})),this.$emit("updateResources",i)}this.$nextTick((function(){t.setAllResources()}))},addResource:function(e){var t={id:e.singleId,name:e.title,label:e.title,value:e.singleId,title:e.title};if(e.category===X.LOCATION||e.category===X.LOKALER){var n=this.locations;n.push(t),this.$emit("updateLocations",n)}else{var i=this.eventForm.resources;i.push(t),this.$emit("updateResources",i)}this.setAllResources()},addInvitee:function(e){var t=this.eventForm.invitees;t=t.concat(e),this.$emit("updateInvitees",t),this.resetInput=!this.resetInput,this.calendar.refetchEvents(),this.setAllResources()},updateStartTime:function(){this.startMoment.isSameOrAfter(this.endMoment)&&(this.endTime=this.startMoment.add(30,"minutes").format("HH:mm")),this.emitStartAndEndTime()},updateEndTime:function(){this.endMoment.isSameOrBefore(this.startMoment)&&(this.startTime=this.endMoment.subtract(30,"minutes").format("HH:mm")),this.emitStartAndEndTime()},emitStartAndEndTime:function(){this.$emit("updateStartTime",this.startTime),this.$emit("updateEndTime",this.endTime),this.modifyResizable(),this.calendar.scrollToTime(this.startTime)},show:function(){this.$refs.planningAssistantModal&&this.$refs.planningAssistantModal.show(),this.init(),this.eventFormBackup=$()(this.eventForm)},updateStartAndEndToNearestHalfHour:function(){if(this.startTime=this.eventForm.allDay?ee.e(ee.v(this.eventForm.startDateTime,"day"),te.a.SHORT_TIME):ee.e(this.eventForm.startDateTime,te.a.SHORT_TIME),this.endTime=this.eventForm.allDay?ee.e(ee.c(this.eventForm.endDateTime,"day"),te.a.SHORT_TIME):ee.e(this.eventForm.endDateTime,te.a.SHORT_TIME),this.startMinute%this.minuteInterval!=0&&!this.eventForm.allDay){var e=this.minuteInterval-this.startMinute%this.minuteInterval;this.startTime=I()().hour(this.startHour).minute(this.startMinute).add(e,"minutes").format("HH:mm"),this.$emit("updateStartTime",this.startTime)}if(this.endMinute%this.minuteInterval!=0&&!this.eventForm.allDay){var t=this.minuteInterval-this.endMinute%this.minuteInterval;this.endTime=I()().hour(this.endHour).minute(this.endMinute).add(t,"minutes").format("HH:mm"),this.$emit("updateEndTime",this.endTime)}},windowResized:function(){this.fifteenMinuteWidth=3.3333333333333335*this.minuteInterval},modifyResizable:function(){var e=this;U()("#planning-assistant .fc-timeline-header .fc-timeline-slot[data-date]").each((function(t){var n=U()(this).data("date");if(I()(n).hour()==e.startHour){e.fifteenMinuteWidth=Math.round(3.3333333333333335*e.minuteInterval);var i=t*me+e.startMinute/e.minuteInterval*e.fifteenMinuteWidth;U()(".resizable").css("left",i+"px");var s=I()().hour(e.endHour).minute(e.endMinute).diff(I()().hour(e.startHour).minute(e.startMinute),"minutes")/e.minuteInterval;U()(".resizable").css("width",s*e.fifteenMinuteWidth+"px"),U()(".resizable").css("transform",""),U()(".resizable").attr("data-x","0")}}))},saveResizableHtml:function(){this.resizableHtml=document.getElementsByClassName("resizable-container")[0].outerHTML,U()(".resizable-container").remove()},positionResizableInCalendar:function(){U()("#planning-assistant .fc-scroller-liquid-absolute .fc-timeline-body").append(this.resizableHtml)},initInteraction:function(){var e=this;if(this.calendar=this.$refs.fullCalendar.getApi(),this.canEditTime){var t=this;Z()(".resizable").draggable({startAxis:"x",lockAxis:"start",modifiers:[Z.a.modifiers.snap({targets:[Z.a.createSnapGrid({x:this.fifteenMinuteWidth,y:100})],range:1/0}),Z.a.modifiers.restrict({restriction:"parent"})],listeners:{start:function(){t.draggedDistance=0},end:function(){var e=Math.abs(t.draggedDistance)/t.fifteenMinuteWidth*t.minuteInterval;t.draggedDistance>0?(t.startTime=I()().hour(t.startHour).minute(t.startMinute).add(e,"minutes").format("HH:mm"),t.endTime=I()().hour(t.endHour).minute(t.endMinute).add(e,"minutes").format("HH:mm")):t.draggedDistance<0&&(t.startTime=I()().hour(t.startHour).minute(t.startMinute).subtract(e,"minutes").format("HH:mm"),t.endTime=I()().hour(t.endHour).minute(t.endMinute).subtract(e,"minutes").format("HH:mm")),t.$emit("updateStartTime",t.startTime),t.$emit("updateEndTime",t.endTime),t.modifyResizable()},move:function(e){e.delta.x<0?t.draggedDistance+=-50:e.delta.x>0&&(t.draggedDistance+=50),e.target.style.webkitTransform=e.target.style.transform="translate("+t.draggedDistance+"px)"}},inertia:!0}).resizable({edges:{left:!0,right:!0,bottom:!1,top:!1},modifiers:[Z.a.modifiers.snapSize({targets:[{width:this.fifteenMinuteWidth},Z.a.createSnapGrid({width:this.fifteenMinuteWidth,height:100})]}),Z.a.modifiers.restrictEdges({outer:"parent"}),Z.a.modifiers.restrictSize({min:{width:this.fifteenMinuteWidth,height:50}})]}).on("resizemove",(function(e){var t=e.target,n=parseFloat(t.getAttribute("data-x"))||0;t.style.width=e.rect.width+"px",n+=e.deltaRect.left,t.style.webkitTransform=t.style.transform="translate("+n+"px)",t.setAttribute("data-x",n)})).on("resizestart",(function(t){e.startLeft=t.rect.left,e.startRight=t.rect.right})).on("resizeend",(function(t){var n=0;
1if(e.startLeft!=t.rect.left){n=Math.abs(e.startLeft-t.rect.left);var i=e.minuteInterval*(n/e.fifteenMinuteWidth);i=Math.round(i/e.minuteInterval)*e.minuteInterval%600,e.startLeft>t.rect.left?e.startTime=I()().hour(e.startHour).minute(e.startMinute).subtract(i,"minutes").format("HH:mm"):e.startLeft<t.rect.left&&(e.startTime=I()().hour(e.startHour).minute(e.startMinute).add(i,"minutes").format("HH:mm"))}else if(e.startRight!=t.rect.right){n=Math.abs(e.startRight-t.rect.right);var s=e.minuteInterval*(n/e.fifteenMinuteWidth);s=Math.round(s/e.minuteInterval)*e.minuteInterval%600,e.startRight>t.rect.right?e.endTime=I()().hour(e.endHour).minute(e.endMinute).subtract(s,"minutes").format("HH:mm"):e.startRight<t.rect.right&&(e.endTime=I()().hour(e.endHour).minute(e.endMinute).add(s,"minutes").format("HH:mm"))}e.$emit("updateStartTime",e.startTime),e.$emit("updateEndTime",e.endTime)}))}},init:function(){var e=this;this.isLoading=!0,this.listResources({query:"*",institutionCodes:[this.eventForm.institutionCode]}).then((function(){e.isLoading=!1,v.default.nextTick((function(){e.setAllResources(),e.updateStartAndEndToNearestHalfHour(),window.addEventListener("resize",e.windowResized),e.fifteenMinuteWidth=50,e.saveResizableHtml(),setTimeout((function(){e.listenToMutation(),e.initInteraction(),e.calendar.scrollToTime(e.startTime)}),50)}))}))},listenToMutation:function(){var e=this,t=document.getElementById("planning-assistant");this.observer=new MutationObserver((function(){0==U()("#planning-assistant .fc-scroller-liquid-absolute .fc-timeline-body").find(".resizable-container").length&&(e.positionResizableInCalendar(),v.default.nextTick(e.modifyResizable()))})),this.observer.observe(t,{attributes:!0,childList:!0,subtree:!0})},destroyInteract:function(){window.removeEventListener("resize",this.windowResized),Z()(".resizable").unset(),this.observer.disconnect()}})},ve=pe,fe=Object(L.a)(ve,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("aula-modal",{ref:"planningAssistantModal",attrs:{"header-text":"PLANNING_ASSISTANT_HEADER","disable-close":!0,"css-class":"aula-calendar planning-assistant-modal"},on:{okClicked:function(t){return e.$refs.planningAssistantModal.hide()},cancelClicked:function(t){return e.cancel()},hidden:function(t){return e.destroyInteract()}}},[n("div",{staticClass:"planning-assistant-timepickers"},[n("AulaTimepicker",{attrs:{format:"HH:mm","hour-label":"Time","minute-label":"Minut",placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_TIME"),"aria-label":e.$getText("ARIA_LABEL_CALENDAR_START_TIME"),disabled:!e.canEditTime,"hide-clear-button":"","minute-interval":e.minuteInterval,"advanced-keyboard":""},on:{change:e.updateStartTime},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),e._v(" "),n("AulaTimepicker",{staticClass:"margin-left",attrs:{format:"HH:mm","hour-label":"Time","minute-label":"Minut",placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_TIME"),"aria-label":e.$getText("ARIA_LABEL_CALENDAR_END_TIME"),disabled:!e.canEditTime,"hide-clear-button":"","minute-interval":e.minuteInterval,"advanced-keyboard":""},on:{change:e.updateEndTime},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}})],1),e._v(" "),n("div",{staticClass:"resizable-container"},[n("div",{staticClass:"resizable"})]),e._v(" "),n("div",{staticClass:"planning-assistant-calendar"},[n("el-date-picker",{ref:"calendarDatepicker",staticClass:"datetime-input",attrs:{"append-to-body":!1,clearable:!1,"popper-class":"planning-assistant-datepicker",disabled:!e.canEditTime,type:"date","value-format":"yyyy-MM-dd",format:"dd/MM/yyyy","aria-hidden":"true","prefix-icon":"icon-Aula_down-arrow","picker-options":{firstDayOfWeek:1}},on:{focus:function(t){return e.datePickerModifier()},input:e.changeCalendarDate},model:{value:e.startDate,callback:function(t){e.startDate=t},expression:"startDate"}}),e._v(" "),e.isLoading?e._e():n("PlanningAssistantCalendarView",{ref:"fullCalendar",attrs:{id:"planning-assistant","start-date":e.eventForm.startDateTime,"end-date":e.eventForm.endDateTime,"event-sources":e.eventSources,resources:e.allResources},on:{addResource:e.addResource,removeResource:e.removeResource,removeInvitee:e.removeInvitee,openDatePicker:e.openDatePicker,eventClick:e.eventItemClick}})],1),e._v(" "),e.parent!==e.parentTypes.GROUP?n("b-input-group",{staticClass:"search-module mt-2 mb-2",staticStyle:{"max-width":"300
1px"}},[n("aula-search-recipients",{attrs:{"existing-participants":e.eventForm.invitees,"from-module":e.moduleTypes.EVENT,"portal-roles":[e.portalRoles.CHILD,e.portalRoles.EMPLOYEE],"hide-portal-roles-when-expanding-group":[e.portalRoles.GUARDIAN],"show-checkbox":!0,"add-existing-participants":!1,"select-all":!1,"reset-input":e.resetInput,"invite-members-when-selecting-group":!0,"close-dropdown-after-select":!1,"invite-members-when-selecting-group-portal-role":!0,"invite-group-when-adding-members":!0,"institution-code":e.eventForm.institutionCode,disabled:!e.canInviteInvitees,"placeholder-textkey":"PLANNING_ASSISTANT_ADD_RECIPIENT"},on:{emitSelected:e.addInvitee}}),e._v(" "),n("b-input-group-addon",[n("i",{staticClass:"icon-Aula_search",staticStyle:{"font-size":"1.5em"}})])],1):e._e(),e._v(" "),n("aula-modal",{ref:"tooManyInviteesModal",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.tooManyInviteesModal.hide()}}},[e._v("\n    "+e._s(e.$getText("PLANNING_ASSISTANT_TOO_MANY_INVITEES"))+"\n  ")])],1)}),[],!1,null,"3c438e5b",null).exports,ge=function(e){switch(e){case _.a.EMPLOYEE:return v.default.prototype.$getText("SEARCH_RECIPIENT_EMPLOYEE");case _.a.CHILD:return v.default.prototype.$getText("SEARCH_RECIPIENT_CHILDREN");case _.a.GUARDIAN:return v.default.prototype.$getText("SEARCH_RECIPIENT_GUARDIAN");default:return""}},_e=n(92),Ee=n(107),Ae=n(215),Te=n(149),be=n(77),Ce=n(84);class ke extends Ce.a{constructor(e){super(),this._isValidMaximumParticipants=!0,this._isMaximumParticipantsHigherThanActualParticipants=!0,this.validateMaximumParticipants=()=>{const{maximumNumberOfParticipants:e,maxParticipantsEnabled:t}=this._simpleEventModel;let n=!0;return t&&(n=e>=1&&e<=2e3),this._simpleEventModel.validator.isValidMaximumParticipants=n,n},this.validateMaximumParticipantsBelowActualNumberOfParticipants=()=>{const{maxParticipantsEnabled:e}=this._simpleEventModel;let t=!0;return e&&(t=this.getIsMaximumParticipantsHigherOrEqualToActualParticipants()),this._simpleEventModel.validator.isMaximumParticipantsHigherThanActualParticipants=t,t},this._simpleEventModel=e}get isValidMaximumParticipants(){return this._isValidMaximumParticipants}set isValidMaximumParticipants(e){this._isValidMaximumParticipants=e}get isMaximumParticipantsHigherThanActualParticipants(){return this._isMaximumParticipantsHigherThanActualParticipants}set isMaximumParticipantsHigherThanActualParticipants(e){this._isMaximumParticipantsHigherThanActualParticipants=e}validate(){return this.validateRules([this.validateMaximumParticipants,this.validateMaximumParticipantsBelowActualNumberOfParticipants])}getIsMaximumParticipantsHigherOrEqualToActualParticipants(){const{maximumNumberOfParticipants:e,actualNumberOfParticipants:t}=this._simpleEventModel;let n=!1;return null==t||0===t?n=!0:null!=e&&(n=e>=t),n}}class ye{constructor(e){this.doRequestNumberOfParticipants=!1,this.maximumNumberOfParticipants=null,this.actualNumberOfParticipants=null,this._maxParticipantsEnabled=!1,this._validator=new ke(this),this._maxParticipantsEnabled=e.maxParticipantsEnabled,this.doRequestNumberOfParticipants=e.doRequestNumberOfParticipants,this.setMaximumNumberOfParticipants(e.maximumNumberOfParticipants)}get validator(){return this._validator}get maxParticipantsEnabled(){return this._maxParticipantsEnabled}isValid(){return this._validator.validate()}setMaxParticipantsEnabled(e){this._maxParticipantsEnabled=e}setMaximumNumberOfParticipants(e){let t=e;"string"==typeof e&&(t=parseInt(e)||null),this.maximumNumberOfParticipants=t,this._validator.isValidMaximumParticipants=!0,this._validator.isMaximumParticipantsHigherThanActualParticipants=!0}setActualNumberOfParticipants(e){this.actualNumberOfParticipants=e}setDoRequestNumberOfParticipants(e){this.doRequestNumberOfParticipants=e}getMaximumNumberOfParticipants(){let e=null;return this._maxParticipantsEnabled&&this.maximumNumberOfParticipants&&(e=this.maximumNumberOfParticipants),e}getDoRequestNumberOfParticipants(){return this.doRequestNumberOfParticipants}}var Ie=n(56),Se=new Map,De={bind:function(e){e.addEventListener("input",(function(t){var n=t.target,i=n.value,s=parseInt(n.value);""===i||s==i?Se.set(e,i):Promise.resolve().then((function(){return n.value=Se.get(e)||""}))}))}
1,unbind:function(e){Se.delete(e)}},we=n(131),Ne=n(143),Re=n(112),Oe=n(122),Le=n(461),xe=n(252),Pe=n(142),Me=n.n(Pe),Fe=n(295),Ue=n(118),Be=n(98),Ve=n(97),We=n(128);function Ge(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return He(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return He(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $e={directives:{Numeric:De},components:{AulaInfoTrigger:We.a,PluginTextEditor:xe.a,AulaSwitch:Le.a,AulaAlert:we.a,AttachmentList:Te.a,AttachmentThumbnails:Ae.a,PlanningAssistant:fe,upload:H.a,AulaSearchRecipients:T.a,AulaTimepicker:j.a},inject:{getIsCreator:S.a.isCurrentEventCreator,getIsCoOrganizer:S.a.isCurrentEventCoOrganizer,getIsCurrentEventInvitee:S.a.isCurrentEventInvitee,getIsCurrentEventInviteeAsOtp:S.a.isCurrentEventInviteeAsOtp,getCanHandleOthersEvents:{from:S.a.canHandleOthersEvents,default:function(){return function(){return!1}}},loadEventLocations:S.a.loadEventLocations},props:{parent:{type:String,default:E.a.PROFILE},canEditCoOrganizers:{type:Boolean,default:!1}},data:function(){return{simpleEventModel:new ye({maximumNumberOfParticipants:null,doRequestNumberOfParticipants:!1,maxParticipantsEnabled:!1,actualNumberOfParticipants:null}),docTypes:A.a,invitedGroups:[],Vue:v.default,emptyEventForm:{},resetRecipientsInput:!1,availableEndDate:{},recurringDatePickerOptions:{},hiddenOrganizers:[],eventForm:{id:"",maximumNumberOfParticipants:null,doRequestNumberOfParticipants:!1,coOrganizerIds:[],institutionCode:"",creatorInstProfileId:"",title:"",type:"",startDateTime:"",endDateTime:"",allDay:!1,private:!1,primaryResource:{},additionalLocations:[],additionalResourceText:"",invitees:[],invitedGroups:[],invitedGroupIds:[],invitedOtpInboxIds:[],responseRequired:!0,responseDeadline:null,resources:[],description:"",attachments:[],oldStartDateTime:"",oldEndDateTime:"",isEditEvent:!1,addToInstitutionCalendar:!1,hideInOwnCalendar:!1,lesson:{lessonId:"",lessonStatus:"",noteToClass:"",noteToSubstitute:"",participants:[]},repeating:{pattern:be.a.NEVER,interval:0,weekdayMask:null,occurenceLimit:0,maxDate:null,lastOccurrenceDate:null,dayInMonth:null}},resourceResults:[],locationSearchResults:[],additionalLocationResults:[],existingLocations:[],blockedCommunicationChannelResponse:null,existingResources:[],existingInvitees:[],existingOrganizers:[],tmpOrganizers:[],selectedOrganizers:[],existingAttachments:[],portalRoles:_.a,groupTypes:k.a,eventTypes:B.a,parentTypes:E.a,moduleTypes:W.a,timepickerSettings:G.a,isStartDateClicked:!1,isEndDateClicked:!1,isMaxDateClicked:!1,isLoading:!1,isLoadingDescription:!0,permissionEnum:g.a,repeatingEventPatternEnum:be.a,startDate:I()().minute()>30?I()().add(1,"hours").minute(0).format("YYYY-MM-DD"):I()().minute(30).format("YYYY-MM-DD"),startTime:I()().minute()>30?I()().add(1,"hours").minute(0).format("HH:mm:ss"):I()().minute(30).format("HH:mm:ss"),endDate:I()().minute()>30?I()().add(2,"hours").minute(0).format("YYYY-MM-DD"):I()().add(1,"hours").minute(30).format("YYYY-MM-DD"),endTime:I()().minute()>30?I()().add(2,"hours").minute(0).format("HH:mm:ss"):I()().add(1,"hours").minute(30).format("HH:mm:ss"),seriesEndDateTime:"",seriesEventFormWidth:"",basicEventTypes:null,eventRepeatPatterns:[{id:be.a.NEVER,label:this.$getText("CALENDAR_TITLE_NEVER_REPEAT")},{id:be.a.DAILY,label:this.$getText("CALENDAR_TITLE_DAILY_EVENT")},{id:be.a.WEEKLY,label:this.$getText("CALENDAR_TITLE_WEEKLY_EVENT")},{id:be.a.MONTHLY,label:this.$getText("CALENDAR_TITLE_MONTHLY_EVENT")}],seriesEventTitle:"",selectedMaxDate:!1,eventNeverEnd:!1,resetSeriesForm:{},resetRepeatingObject:{},resetEventNeverEnd:!1,resetMaxDate:null,daily:{interval:"",occurenceLimit:""},weekly:{occurenceLimit:"",weekdayMask:[]},monthly:{occurenceLimit:"",months:["1","2","3","4","5","6","7","8","9","10","11","12"],days:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"]},isClickedOK:!1,showSeriesEventForm:!1,showMissingTitleAlert:!1,showMissingStartDateAlert:!1,messageAlertStartDate:"",showMissingStartTimeAlert:!1,showMissingEndTimeAlert:!1,showMissingEndDateAlert:!1,showInvalidDeadlineAlert:!1,showMissingSeriesEventAlert:!1,disableResponseRequire:!1,resetResources:!1,resetPrimaryResources:!1,maxAmountOfInviteesWhenGettingConflictingEvents:100,hasExternalRecipient:!1,unavailableResources:[],selectedLocations:[],weekdayEnum:Oe.a,isBeforeFirstOccurrence:!1,isAfterLastOccurrence:!1,repeatingEventEndDateTimeLabel:"",titleMaxLength:255,showTitleTooLongAlert:!1,eventFormKey:0}},computed:Ye(Ye({},Object(m.c)({getDateTimeSelectedByClickedTimeslot:p.a.GET_DATETIME_SELECTED_BY_CLICKED_TIMESLOT,hasPermission:p.a.HAS_PERMISSION,hasPermissionOnInstitution:p.a.HAS_PERMISSION_ON_INSTITUTION,conflictEventByAttendees:p.a.GET_WARNING_CONFLICT_EVENT_BY_ATTENDEES,group:p.a.GET_ACTIVE_GROUP,groupMemberships:p.a.GET_GROUP_MEMBERSHIPS_LIGHT,activeEvent:p.a.GET_CURRENT_EVENT,institutions:p.a.GET_INSTITUTIONS,activeInstitutionCodes:p.a.GET_ACTIVE_INSTITUTIONS,conflictingAttendees:p.a.GET_WARNING_CONFLICT_EVENT_BY_ATTENDEES,delegatedContext:p.a.GET_DELEGATED_CONTEXT,sameAuthorityInstitutions:p.a.GET_SAME_AUTHORITY_INSTITUTIONS,isMobile:p.a.GET_IS_MOBILE,unavailableResourceIds:p.a.GET_UNAVAILABLE_RESOURCES,hasPermissionOnInstitutionGroup:p.a.HAS_PERMISSION_ON_INSTITUTION_GROUP})),{},{userProfileStore:function(){return Object(N.a)()},profile:function(){return this.userProfileStore.institutionProfile},blockedRecipientsString:function(){return this.blockedCommunicationChannelResponse?this.blockedCommunicationChannelResponse.getBlockedRecipientsString():""},showTitleAlert:function(){return this.showMissingTitleAlert||this.showTitleTooLongAlert},isVisibleRepeatingPattern:function(){return this.canEditRepeatingPattern&&this.hasRepeatingPattern},repeatingPattern:function(){return Fe.a.getPattern(this.eventForm.repeating.pattern,this.repeatingEventEndDateTimeLabel,this.eventForm.repeating.weekdayMask,this.eventForm.repeating.dayInMonth,this.eventForm.repeating.interval,this.eventForm.repeating.occurenceLimit)},canShowRequestNumberOfParticipant:function(){return!this.isRepeatingOccurrence&&(this.profile.role===_.a.EMPLOYEE||this.profile.role===_.a.GUARDIAN)},isDisabledInviteesSearch:function(){return!this.canInviteToEvent||this.hasLimitedEditRight},isDisabledCoOrganizersSearch:function(){return this.isCommunicationBlock||this.hasLimitedEditRight},isCommunicationBlock:function(){var e,t=this,n=this.institutions.find((function(e){return e.institutionCode===t.eventForm.institutionCode}));return null!==(e=null==n?void 0:n.communicationBlock)&&void 0!==e&&e},canInviteToEvent:function(){return!this.isCommunicationBlock&&this.hasPermissionOnInstitution(g.a.INVITE_TO_EVENT,this.eventForm.institutionCode)&&this.parent!==E.a.GROUP},canCreateAttachments:function(){return!this.isCommunicationBlock},partiallyAvailableLocations:function(){return this.selectedLocations.filter((function(e){return(null==e?void 0:e.numberOfAvailableOccurrences)<(null==e?void 0:e.numberOfOccurrences)}))},partiallyAvailableResources:function(){return this.existingResources.filter((function(e){return e.numberOfAvailableOccurrences<e.numberOfOccurrences}))},isSettingSectionVisible:function(){return this.eventForm.type!==B.a.LESSON&&(this.canRequestForAnswer||this.canRequireParticipantNumber||this.canSetPrivate||this.canAddEventOnlyToInstitutionCalendar||this.canAddEventToInstitutionCalendar||!this.isRepeatingEvent)},canRequestForAnswer:function(){return this.profile.role===_.a.EMPLOYEE&&this.hasPermission(g.a.INVITE_TO_EVENT)&&!this.isCoOrganizer},canRequireParticipantNumber:function(){return!this.isRepeatingOccurrence&&this.profile.role===_.a.EMPLOYEE},canSetPrivate:function(){return this.eventForm.type!==B.a.LESSON&&!this.isRepeatingOccurrence},canRequestNumberOfParticipant:function(){return!this.isRepeatingEvent&&!this.hasRepeatingPattern&&!this.isEditMode},primaryResourceText:function(){return this.eventForm.primaryResource?"".concat(this.eventForm.primaryResource.name," (").concat(this.eventForm.primaryResource.institutionName,")"):this.eventForm.primaryResourceText||""},repeatingEventAlert:function(){var e=this.$getText("CALENDAR_ALERT_EDIT_REPEATING_SERIES");return this.isRepeatingOccurrence&&(e=this.$getText("CALENDAR_ALERT_EDIT_SINGLE_OCCURRENCE")),e},isVisibleEndDate:function(){return!this.isRepeatingEvent||this.isRepeatingOccurrence},isDisabledEndDate:function(){return this.hasLimitedEditRight||this.isRepeatingOccurrence||this.hasRepeatingPattern},isVisibleRepeatingEventAlert:function(){return this.isEditMode&&this.activeEvent.repeating},isVisibleEventInThePastAlert:function(){return this.isEndDateInThePast&&this.isClickedOK&&!this.validateRepeatingEvent},canEditRepeatingPattern:function(){return this.eventForm.type!==B.a.LESSON&&null!=this.eventForm.repeating&&!this.isRepeatingOccurrence},canAddEventToInstitutionCalendar:function(){return this.profile.role===_.a.EMPLOYEE&&this.hasPermissionOnInstitution(g.a.CREATE_EVENTS_IN_INSTITUTION_CALENDAR,this.eventForm.institutionCode)&&!this.isCoOrganizer&&!this.isRepeatingOccurrence},canAddEventOnlyToInstitutionCalendar:function(){return this.profile.role===_.a.EMPLOYEE&&this.hasPermissionOnInstitution(g.a.CREATE_EVENTS_ONLY_IN_INSTITUTION_CALENDAR,this.eventForm.institutionCode)&&!this.isCoOrganizer&&!this.isRepeatingOccurrence},canEditDeadline:function(){return this.eventForm.responseRequired&&this.profile.role===_.a.EMPLOYEE&&!this.isRepeatingOccurrence},isCreator:function(){return this.getIsCreator()},isCoOrganizer:function(){return this.getIsCoOrganizer()},isInvitee:function(){return this.getIsCurrentEventInvitee()},isInviteeAsOtp:function(){return this.getIsCurrentEventInviteeAsOtp()},isParticipant:function(){return this.isInvitee||this.isInviteeAsOtp},hasLimitedEditRight:function(){return this.eventForm.type===B.a.LESSON||this.isHandlingOthersEvent},isResponseDeadlineDisabled:function(){return Object(ee.m)(new Date,this.eventForm.startDateTime)},canHandleOthersEvents:function(){return this.getCanHandleOthersEvents()},canHandlePrivateEvent:function(){var e=this,t=this.institutions.filter((function(t){var n,i;return t.institutionProfileId==(null===(n=e.activeEvent)||void 0===n||null===(i=n.creator)||void 0===i?void 0:i.id)})).length>0,n=this.institutions.map((function(e){return e.institutionProfileId})),i=this.activeEvent.coOrganizers.some((function(e){return n.includes(e.instProfile.id)}));return t||i},isHandlingOthersEvent:function(){return this.canHandleOthersEvents&&!this.isCreator&&!this.isCoOrganizer},isHandlingOthersPrivateEvent:function(){return this.eventForm.private&&this.canHandleOthersEvents&&!this.isParticipant&&!this.canHandlePrivateEvent},deadlinePickerOptions:function(){var e=this.startDate;return{disabledDate:function(t){return I()(t).isBefore(I()().subtract(1,"days"))||I()(t).isAfter(I()(e))},firstDayOfWeek:Ee.a.MONDAY}},isTransversalGroup:function(){return this.group.type===k.a.CROSS_INSTITUTIONAL||this.group.type===this.groupTypes.MUNICIPAL},institutionsThatCanBeSeen:function(){var e=this,t=this.institutions,n=this.group;return null!=this.delegatedContext.institutionCode?t=t.filter((function(t){return t.institutionCode===e.delegatedContext.institutionCode})):this.parent===E.a.GROUP&&(t=Object(_e.a)(t,n).filter((function(t){return e.hasPermissionOnInstitutionGroup({permissionId:g.a.INVITE_TO_EVENT,institution:t,group:n})||e.hasPermissionOnInstitution(g.a.USE_GROUPS_AS_DISTRIBUTION_LISTS,t.institutionCode)}))),t},additionalLocationSearchResults:function(){var e,t=this.additionalLocationResults;return Number.isInteger(null===(e=this.eventForm.primaryResource)||void 0===e?void 0:e.id)&&(t=this.filterResourcesFromSearchResult(t,[this.eventForm.primaryResource])),t},canSelectInstitutionInGroup:function(){var e;return this.parent===E.a.GROUP&&(null===(e=this.group.membershipInstitutions)||void 0===e?void 0:e.length)>1},canUsePlanningAssistant:function(){return!this.isMobile&&this.profile.role===_.a.EMPLOYEE&&this.eventForm.type!==B.a.LESSON&&(this.isRepeatingOccurrence||!this.isRepeatingEvent&&!this.hasRepeatingPattern)},isPlanningAssistantDisabled:function(){return 0!==I()(this.startDate).diff(this.endDate)},invitedGroupsName:function(){return this.eventForm.invitedGroups.filter((function(e){return e.type===k.a.UNI})).map((function(e){return e.name})).join(", ")},canAttachFromSecureFiles:function(){return this.profile.role==_.a.EMPLOYEE&&(this.hasPermission(g.a.HANDLE_SECURE_FILES)||this.hasPermission(g.a.HANDLE_SECURE_FILES_LIMITED))},canEditRequestForAnswer:function(){if(!0===this.isEditMode){var e=this.isCreator;return!1===e&&null!=this.delegatedContext&&null!=this.delegatedContext.institutionProfileId&&(e=this.eventForm.creator.id===this.delegatedContext.institutionProfileId),e&&!1===this.eventForm.private}return!0},listBlockedCommunication:function(){var e=[];for(var t in this.getblockedCommunicationProfiles)this.getblockedCommunicationProfiles[t]&&e.push(t);return e},primaryTeachers:function(){var e;return this.eventForm.type===B.a.LESSON&&null!==(e=this.eventForm.lesson)&&void 0!==e&&e.participants?this.eventForm.lesson.participants.filter((function(e){return e.participantRole===V.a.PRIMARY})).map((function(e){return e.participantProfile})):[]},editorId:function(){return this.parent==E.a.GROUP?"editorInGroupPage":"editorInCalendar"},isEditMode:function(){return this.$route.path.includes("redigerbegivenhed")},enterOccurenceLimit:function(){switch(this.eventForm.repeating.pattern){case be.a.NEVER:return!1;case be.a.DAILY:return!!this.daily.occurenceLimit;case be.a.WEEKLY:return!!this.weekly.occurenceLimit;case be.a.MONTHLY:return!!this.monthly.occurenceLimit}return!1},sendDisabled:function(){return!this.startDate||this.isCommunicationBlock&&this.canInviteToEvent},validateRepeatingEvent:function(){switch(this.eventForm.repeating.pattern){case be.a.NEVER:return!1;case be.a.DAILY:return this.invalidDailyInterval||this.invalidDailyoccurenceLimit;case be.a.WEEKLY:return this.invalidWeeklyWeekdayMask||this.invalidWeeklyOccurenceLimit;case be.a.MONTHLY:return this.invalidMonthlyOccurenceLimit}return!0},invalidDailyInterval:function(){return!this.daily.interval||isNaN(this.daily.interval)||this.daily.interval<=0},invalidDailyoccurenceLimit:function(){return(!this.daily.occurenceLimit||isNaN(this.daily.occurenceLimit)||this.daily.occurenceLimit<=0||this.daily.occurenceLimit>2e3)&&!this.selectedMaxDate&&!this.eventNeverEnd},showAlertOutOfMonthlyDate:function(){if(I()(this.startDate).date()>28&&this.eventForm.repeating.pattern!==be.a.NEVER){if(this.eventNeverEnd)return!0;var e=0;null!=this.eventForm.repeating.maxDate&&""!=this.eventForm.repeating.maxDate?e=I()(this.eventForm.repeating.maxDate).diff(I()(this.startDate),"months"):null!=this.monthly.occurenceLimit&&this.monthly.occurenceLimit>0&&(e=this.monthly.occurenceLimit);for(var t=0;t<e;t++)if(I()(this.s
1tartDate).add(t,"months").daysInMonth()<I()(this.startDate).date())return!0}return!1},invalidWeeklyWeekdayMask:function(){return 0==this.weekly.weekdayMask.length},invalidWeeklyOccurenceLimit:function(){return(!this.weekly.occurenceLimit||isNaN(this.weekly.occurenceLimit)||this.weekly.occurenceLimit<=0||this.weekly.occurenceLimit>2e3)&&!this.selectedMaxDate&&!this.eventNeverEnd},invalidMonthlyOccurenceLimit:function(){return(!this.monthly.occurenceLimit||isNaN(this.monthly.occurenceLimit)||this.monthly.occurenceLimit<=0||this.monthly.occurenceLimit>2e3)&&!this.selectedMaxDate&&!this.eventNeverEnd},invitedGroupNames:function(){var e,t,n=this,i={},s={},a=[k.a.UNI,k.a.INSTITUTIONAL,"group"];this.isEditMode&&(null===(e=this.activeEvent.invitedGroups)||void 0===e||e.forEach((function(e){s[e.id]=!0,i[e.id]={name:e.name}})),null===(t=this.activeEvent.inviteeGroups)||void 0===t||t.forEach((function(e){i[e.group.id]={name:e.group.name,portalRoles:new Set(e.invitedPortalRoles)}})));var r,o=this.eventForm.invitedGroups.filter((function(e){return!0!==s[e.id]&&!0===a.includes(e.type)})),l=Ge(o);try{for(l.s();!(r=l.n()).done;){var c=r.value,u=(i[c.id]||{}).portalRoles||new Set;null!=c.portalRole&&u.add(c.portalRole),i[c.id]={name:c.name,portalRoles:u}}}catch(e){l.e(e)}finally{l.f()}var d=Object.values(i).map((function(e){var t=e.portalRoles;return!(t instanceof Set)||0===t.size||t.size>=3?e.name:n.getGroupNameWithPortalRoleNames(e.name,t)}));return d.join(", ")},endDateInThePastAlertText:function(){return this.isEditMode?this.$getText("CALENDAR_ALERT_EDIT_END_TIME_IN_THE_PAST"):this.$getText("CALENDAR_ALERT_CREATE_END_TIME_IN_THE_PAST")},repeatingInThePastAlertText:function(){return this.isEditMode?this.$getText("CALENDAR_ALERT_EDIT_REPEATING_IN_THE_PAST"):this.$getText("CALENDAR_ALERT_CREATE_REPEATING_IN_THE_PAST")},eventInThePastAlertText:function(){return this.isRepeatingEvent?this.repeatingInThePastAlertText:this.endDateInThePastAlertText},isRepeatingEvent:function(){return null!=this.activeEvent.repeating},hasRepeatingPattern:function(){return this.eventForm.repeating&&this.eventForm.repeating.pattern!==be.a.NEVER},isRepeatingOccurrence:function(){return null!=this.$route.query.occurrence},isEndDateInThePast:function(){var e=Object(ee.u)(),t=I()(this.endDate+" "+this.endTime);return Object(ee.n)(t,e)},hasSameRepeatingPattern:function(){var e=Object(ee.p)(this.eventForm.startDateTime,this.activeEvent.startDateTime,"minute"),t=Object(ee.p)(this.eventForm.repeating.maxDate,this.activeEvent.repeating.maxDate,"minute")||this.activeEvent.repeating.maxDate===this.eventForm.repeating.maxDate,n=Q()(this.eventForm.repeating.weekdayMask,this.activeEvent.repeating.weekdayMask),i=this.eventForm.repeating.dayInMonth===this.activeEvent.repeating.dayInMonth,s=this.eventForm.repeating.interval===this.activeEvent.repeating.interval,a=this.eventForm.repeating.occurenceLimit===this.activeEvent.repeating.occurenceLimit,r=Object(ee.p)(this.eventForm.endDateTime,this.activeEvent.endDateTime,"minute");return i&&t&&s&&a&&e&&n&&r},institutionProfileSelectedOnEventForm:function(){var e=this;return this.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))},eventCreatorInstitutionProfileId:function(){return this.delegatedContext.institutionProfileId?this.delegatedContext.institutionProfileId:this.institutionProfileSelectedOnEventForm.institutionProfileId},eventUpdaterInstitutionProfileId:function(){var e,t=this;return this.isEditMode?this.delegatedContext.institutionProfileId?this.delegatedContext.institutionProfileId:this.activeEvent.institutionCode&&this.institutions&&(null===(e=this.institutions.find((function(e){return e.institutionCode===t.activeEvent.institutionCode})))||void 0===e?void 0:e.institutionProfileId)||null:null},eventCreatorOrUpdaterInstitutionProfileId:function(){return this.isEditMode?this.eventUpdaterInstitutionProfileId:this.eventCreatorInstitutionProfileId}}),watch:{eventNeverEnd:function(e){e&&(this.eventForm.repeating.maxDate=null,this.selectedMaxDate=!1,this.resetOccurrenceLimit())},unavailableResourceIds:function(){Array.isArray(this.unavailableResourceIds)&&this.unavailableResourceIds.length>0&&this.showUnavailableResources()}},created:function(){this.populateEventTypes()},mounted:function(){var e=this;if(this.resetForm(),this.setAtrributesForTimepicker(),this.resetRepeatingObject=Object.assign({},this.eventForm.repeating),this.basicEventTypes.length>0&&(this.eventForm.type=this.basicEventTypes[0].type),this.isEditMode)this.loadEditedEvent();else{if(this.resetActiveEvent(),this.bindingStartAndEndDateTime(this.getDateTimeSelectedByClickedTimeslot),this.eventForm.startDateTime=I()(this.startDate+" "+this.startTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),this.eventForm.endDateTime=I()(this.endDate+" "+this.endTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),this.parent===E.a.GROUP){var t=[];null!=this.group.id&&this.loadGroupMemberships({groupId:this.group.id,portalRoles:[_.a.CHILD,_.a.OTP,_.a.EMPLOYEE,_.a.GUARDIAN]}).then((function(){var n,i=Ge(e.groupMemberships);try{for(i.s();!(n=i.n()).done;){var s,a=n.value,r=Ge(a.institutionProfiles);try{var o=function(){var n=s.value,i=e.institutions.some((function(e){return e.institutionProfileId===n.institutionProfileId}));!e.isTransversalGroup&&i||e.addExistingAttendee(t,n,a.portalRole)};for(r.s();!(s=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}}catch(e){i.e(e)}finally{i.f()}t.length>2e3&&(e.$refs.tooManyRecipientsModal.show(),t=t.slice(0,2e3)),e.existingInvitees=t,e.eventForm.invitees=t}));var n={label:this.group.name,name:this.group.name,value:E.a.GROUP+this.group.id+this.group.institutionCode,id:this.group.id,portalRole:null,type:E.a.GROUP};this.eventForm.invitedGroups=[n],this.eventForm.invitedGroupIds=[n.id]}this.isLoadingDescription=!1}var i=this.startDate;this.availableEndDate={disabledDate:function(e){return!Object(ee.o)(e,i,Object(ee.a)(i,1,"month"))},firstDayOfWeek:1},this.recurringDatePickerOptions={disabledDate:function(e){return Object(ee.n)(e,i,"days")},firstDayOfWeek:1},this.emptyEventForm=$()(this.eventForm)},methods:Ye(Ye(Ye({getGroupHomeInviteeWithMetadata:function(e){if(null==e)return null;var t="",n=e.regardingChildDisplayName.split(" ");return n.length>
10&&(t=n[0]),"".concat(e.groupHomeName," (").concat(t," ").concat(e.regardingChildMetaData,")")},getIsResourceFullyAvailable:function(e){var t=e.numberOfOccurrences||1;return(e.numberOfAvailableOccurrences||1)===t},handleStartDateChanged:function(){this.checkForExistingResourcesWhenChangingDateTime(),this.adjustEndDate(),this.showInvalidDeadlineAlert=null!=this.eventForm.responseDeadline&&""!=this.eventForm.responseDeadline&&I()(this.eventForm.responseDeadline).isAfter(I()(this.eventForm.startDateTime))},adjustEndDate:function(){if(this.hasRepeatingPattern)this.endDate=this.startDate;else{var e=Object(ee.a)(this.startDate,1,"month");Object(ee.n)(e,this.endDate)&&(this.endDate=e)}},onRepeatingPatternChange:function(){this.eventForm.repeating.pattern!==be.a.NEVER&&(this.emitRepeatEventSelected(!1,!0),this.simpleEventModel.setDoRequestNumberOfParticipants(!1),this.simpleEventModel.setMaxParticipantsEnabled(!1),this.eventForm.doRequestNumberOfParticipants=this.simpleEventModel.getDoRequestNumberOfParticipants(),0===this.weekly.weekdayMask.length&&this.weekly.weekdayMask.push(I()(this.startDate).isoWeekday()%7))},getFirstWeeklyOccurrence:function(e,t){for(var n=Object(ee.g)(t),i=0;i<e.length;i++){if(!0===e[Object(ee.i)(n)%7])break;n=Object(ee.a)(n,1,"days")}return n},updateLocations:function(e){if(this.eventForm.type!==B.a.LESSON){var t=M()(e),n=t[0],i=t.slice(1);this.selectedLocations=e,this.eventForm.primaryResource=n,this.eventForm.additionalLocations=i}else this.eventForm.additionalLocations=e},searchLocations:function(e){var t=this;this.loadEventLocations(e).then((function(e){t.locationSearchResults=e}))},onChangeDefineParticipantSeats:function(e){this.simpleEventModel.setMaxParticipantsEnabled(e),this.eventForm.maximumNumberOfParticipants=this.simpleEventModel.getMaximumNumberOfParticipants()},onChangeRequestNumberOfParticipants:function(){this.eventForm.doRequestNumberOfParticipants=this.simpleEventModel.getDoRequestNumberOfParticipants()},onInputMaximumNumberOfParticipants:function(e){this.simpleEventModel.setMaximumNumberOfParticipants(e),this.eventForm.maximumNumberOfParticipants=this.simpleEventModel.getMaximumNumberOfParticipants()},addExistingAttendee:function(e,t,n){var i={label:this.$getProfileDisplayName(t),name:this.$getProfileDisplayName(t),value:E.a.PROFILE+t.institutionProfileId,id:t.institutionProfileId,institutionProfileId:t.institutionProfileId,profileId:t.profileId,portalRole:n,institutionCode:t.institutionCode,type:E.a.PROFILE};null!=t.otpInboxId&&(i={label:this.$getProfileDisplayName(t),name:this.$getProfileDisplayName(t),value:E.a.PROFILE+"_OTP_"+t.otpInboxId,id:t.otpInboxId,otpInboxId:t.otpInboxId,portalRole:_.a.OTP,institutionCode:t.institutionCode,type:_.a.OTP}),e.push(i)},filterResourcesFromSearchResult:function(e,t){var n=new Set(t.map((function(e){return e.id})));return e.map((function(e){return Ye(Ye({},e),{},{options:e.options.filter((function(e){var t=e.id;return!n.has(t)}))})}))},getGroupNameWithPortalRoleNames:function(e,t){var n,i=[],s=Ge(t);try{for(s.s();!(n=s.n()).done;){var a=n.value;i.push(ge(a))}}catch(e){s.e(e)}finally{s.f()}return"".concat(e," (").concat(i.join(", "),")")},clearAttachments:function(){this.existingAttachments=[]},handleResetRecipientsInput:function(){this.parent!==E.a.GROUP&&(this.resetRecipientsInput=!this.resetRecipientsInput),this.resetPrimaryResources=!this.resetPrimaryResources,this.resetResources=!this.resetResources,this.invitedGroups=[],this.existingInvitees=[],this.eventForm.resources=[],this.eventForm.additionalLocations=[],this.eventForm.primaryResource={},this.eventForm.invitees=[],this.eventForm.invitedGroups=[],this.eventForm.invitedOtpInboxIds=[],this.resetCoOrganizers(),this.clearAttachments()},resetCoOrganizers:function(){this.selectedOrganizers=[],this.setOrganizers([])},mapPlanningAssistantRecipients:function(){var e=[];null!=this.eventForm.invitees&&this.eventForm.invitees.length>
10&&this.eventForm.invitees.forEach((function(t){t.label=this.$getProfileDisplayName(t),t.value="profile"+t.id,e.push({label:this.$getProfileDisplayName(t),name:this.$getProfileDisplayName(t),institutionCode:t.institutionCode,value:"profile"+t.id,id:t.id,institutionProfileId:t.id,portalRole:t.role,type:"profile"})})),this.existingInvitees=e},updateLocationsFromPlanningAssistant:function(e){this.existingLocations=e,this.updateLocations(e)},attachSecureDocuments:function(e){this.$refs.uploaderFiles.addNewMedia(e)},resetEventFormFromPlanningAssistant:function(e){var t;(this.eventForm=e,this.resetPrimaryResources=!this.resetPrimaryResources,this.selectedLocations=[],e.primaryResource)&&(t=this.selectedLocations).push.apply(t,[e.primaryResource].concat(r()(e.additionalLocations)));this.existingLocations=this.selectedLocations,this.resetResources=!this.resetResources,this.existingResources=e.resources,this.resetRecipientsInput=!this.resetRecipientsInput,this.updateInvitees(e.invitees),this.mapPlanningAssistantRecipients(),this.startTime=I()(e.startDateTime).format("HH:mm"),this.endTime=I()(e.endDateTime).format("HH:mm"),this.startDate=I()(e.startDateTime).format("YYYY-MM-DD"),this.endDate=I()(e.endDateTime).format("YYYY-MM-DD"),this.eventFormKey++},updateResourcesFromPlanningAssistant:function(e){this.resetResources=!this.resetResources,this.addResourceToList(e)},updateInviteesFromPlanningAssistant:function(e){this.resetRecipientsInput=!this.resetRecipientsInput,this.updateInvitees(e),this.mapPlanningAssistantRecipients()},updateStartTimeFromPlanningAssistant:function(e){this.removeResources(),this.startTime=e},updateStartDateFromPlanningAssistant:function(e){e!=this.startDate&&this.removeResources(),this.startDate=e,this.endDate=e},updateEndTimeFromPlanningAssistant:function(e){this.removeResources(),this.eventForm.endDateTime=I()("".concat(this.endDate," ").concat(e)).format(),this.endTime=e},validateAddToInstitutionCalendar:function(){var e=this;v.default.nextTick((function(){e.eventForm.addToInstitutionCalendar&&(e.eventForm.hideInOwnCalendar=!1),e.$forceUpdate()}))},validateHideInOwnCalendar:function(){var e=this;v.default.nextTick((function(){e.eventForm.hideInOwnCalendar&&(e.eventForm.addToInstitutionCalendar=!1),e.$forceUpdate()}))},validatePrivateAndAddToInstCalendar:function(){var e=this;v.default.nextTick((function(){e.eventForm.private&&(e.eventForm.addToInstitutionCalendar||e.eventForm.hideInOwnCalendar)&&(e.$refs.bothPrivateAndAddedToInstCalendarModal.show(),e.eventForm.private=!1,e.eventForm.addToInstitutionCalendar=!1,e.eventForm.hideInOwnCalendar=!1)}))},validateTitleInput:function(){var e=this;v.default.nextTick((function(){e.showMissingTitleAlert=!1,e.showTitleTooLongAlert=e.eventForm.title.length>e.titleMaxLength}))},cancelForm:function(){this.resetForm(),this.$refs.cancelModal.hide(),this.parent===E.a.PROFILE?this.$router.push({path:"/kalender"}):this.$router.push({name:"group-calendar"})},isTheSameAuthorityInstitutions:function(e){return this.eventForm.institutionCode==e.institutionCode||!(0==this.sameAuthorityInstitutions.length||this.sameAuthorityInstitutions.length>0&&0==this.sameAuthorityInstitutions.filter((function(t){return t.institutionCode==e.institutionCode})).length)},updateInvitees:function(e){this.hasExternalRecipient=!1;var t,n=[],i=[],s=[],a=Ge(e);try{var o=function(){var e=t.value;"group"===e.type?i.push(e):"groupHome"===e.type||e.otpInboxId?(s.push(e),n.push(e)):!1===n.some((function(t){return t.id===e.id&&t.type===e.type}))&&(e.institutionProfileId=e.id,n.push(e))};for(a.s();!(t=a.n()).done;)o()}catch(e){a.e(e)}finally{a.f()}this.eventForm.invitees.length<e.length&&(this.hasExternalRecipient=!this.isTheSameAuthorityInstitutions(e[e.length-1])),this.hasExternalRecipient&&this.$refs.externalRecipientsToastr.show(),n.length>2e3&&this.$refs.tooManyRecipientsModal.show(),this.eventForm.invitees=n,this.eventForm.invitedGroups=i;var l=s.map((function(e){return e.otpInboxId||e.id}));this.eventForm.invitedOtpInboxIds=r()(new Set(r()(l)))},onSelectOrganizers:function(e){this.tmpOrganizers=e,this.setOrganizers(e)},removeExistingOrganizer:function(e){if(1===this.existingOrganizers.filter((function(t){return t.id===e.id})).length)return this.selectedOrganizers=[].concat(r()(this.tmpOrganizers),[e]),void this.$refs.removingCoOrganizerWarning.show();this.selectedOrganizers=this.tmpOrganizers,this.setOrganizers(this.tmpOrganizers)},acceptRemovalOfExistingOrganizer:function(){var e,t=new Set,n=Ge(this.tmpOrganizers);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.add("".concat(i.profileId,",").concat(i.id))}}catch(e){n.e(e)}finally{n.f()}this.existingOrganizers=this.existingOrganizers.filter((function(e){return!0===t.has("".concat(e.profileId,",").concat(e.id))})),this.selectedOrganizers=this.tmpOrganizers,this.setOrganizers(this.tmpOrganizers),this.$refs.removingCoOrganizerWarning.hide()},cancelRemovalOfExistingOrganizer:function(){this.setOrganizers(this.selectedOrganizers),this.$refs.removingCoOrganizerWarning.hide()},setOrganizers:function(e){this.eventForm.coOrganizerIds=e.map((function(e){return e.id})),this.eventForm.coOrganizers=e},filesChanged:function(e){this.eventForm.attachments=e,this.existingAttachments=e},closeEventForm:function(){q()(this.emptyEventForm,this.eventForm)?(this.resetForm(),this.parent===E.a.PROFILE?this.$router.push({path:"/kalender"}):this.$router.push({name:"group-calendar"})):this.$refs.cancelModal.show()},checkUserWithBlockedCommunication:function(){this.isCommunicationBlock&&this.$refs.blockedCommunicationModal.show()},handleOkDialogConflict:function(){this.clearConflictingAttendees(),this.checkForAttachments()},selectMaxDate:function(){null==this.eventForm.repeating.maxDate?this.selectedMaxDate=!1:(I()(this.eventForm.repeating.maxDate).isSameOrBefore(I()(this.startDate))&&(this.eventForm.repeating.maxDate=I()(this.startDate).add(1,"days").format("YYYY-MM-DDTHH:mm:ss.SSSSZ")),this.selectedMaxDate=!0,this.resetOccurrenceLimit())},resetOccurrenceLimit:function(){this.daily.occurenceLimit="",this.weekly.occurenceLimit="",this.monthly.occurenceLimit=""},removeResources:function(){this.softRemoveResources()},softRemoveResources:function(){this.eventForm.primaryResource={},this.eventForm.additionalLocations=[],this.eventForm.resources=[],this.existingResources=[],this.existingLocations=[],this.selectedLocations=[],this.resetResources=!this.resetResources,this.resetPrimaryResources=!this.resetPrimaryResources,this.populateDateTimePicker()},resetAllDay:function(){this.eventForm.allDay=!this.eventForm.allDay},resetDateTime:function(){this.isEditMode&&null!=this.eventForm.repeating?(this.startDate=I()(this.eventForm.repeating.originalStartDateTime).format("YYYY-MM-DD"),this.endDate=I()(this.eventForm.repeating.originalEndDateTime).format("YYYY-MM-DD"),this.startTime=I()(this.eventForm.repeating.originalStartDateTime).format("HH:mm"),this.endTime=I()(this.eventForm.repeating.originalEndDateTime).format("HH:mm"),this.mapRepeatingEvent()):(this.startDate=I()(this.eventForm.startDateTime).format("YYYY-MM-DD"),this.endDate=I()(this.eventForm.endDateTime).format("YYYY-MM-DD"),this.startTime=I()(this.eventForm.startDateTime).format("HH:mm"),this.endTime=I()(this.eventForm.endDateTime).format("HH:mm"))},checkValidDateTime:function(e){switch(e){case"startDate":this.isStartDateClicked=!1,this.startDate&&I()(this.startDate,"YYYY-MM-DD").isValid()||(this.startDate=I()().add(30,"minutes").format("YYYY-MM-DD"));break;case"endDate":this.isEndDateClicked=!1,this.endDate&&I()(this.endDate,"YYYY-MM-DD").isValid()||(this.endDate=I()().add(60,"minutes").format("YYYY-MM-DD"))}},allDayChange:function(){var e=this;v.default.nextTick((function(){null!=e.eventForm.primaryResource&&Object.keys(e.eventForm.primaryResource).length>0||null!=e.eventForm.additionalLocations&&e.eventForm.additionalLocations.length>0||null!=e.eventForm.resources&&e.eventForm.resources.length>0?e.$refs.removeResourcesWhenChangingAllDayModal.show():e.showMissingStartDateAlert=!1}))},checkForExistingResourcesWhenChangingDateTime:function(){null!=this.eventForm.primaryResource&&Object.keys(this.eventForm.primaryResource).length>0||null!=this.eventForm.additionalLocations&&this.eventForm.additionalLocations.length>0||null!=this.eventForm.resources&&this.eventForm.resources.length>0?this.$refs.removeResourcesWhenChangingDateTimeModal.show():this.softRemoveResources(),this.setLayer(!1)},setLayer:function(e){this.$refs.clickLayer.style.display=e?"block":"none"},populateDateTimePicker:function(){this.isRepeatingEvent&&(this.endDate=this.startDate,this.selectedMaxDate&&I()(this.eventForm.repeating.maxDate).isSameOrBefore(I()(this.startDate))&&(this.eventForm.repeating.maxDate=I()(this.startDate).add(1,"days").format("YYYY-MM-DDTHH:mm:ss.SSSSZ")));var e=this.startDate+" "+this.startTime,t=this.endDate+" "+this.endTime;I()(e).isSameOrAfter(I()(t))&&(t=I()(e).date()!=I()(e).add(30,"minutes").date()?I()(e).hour("23").minute("59").second("59"):I()(e).add(30,"minutes"),this.endDate=t.format("YYYY-MM-DD"),this.endTime=t.format("HH:mm:ss"));var n=Object(ee.e)(this.startDate,te.a.COMPLETE_DATE),i=Object(ee.e)(this.endDate,te.a.COMPLETE_DATE);this.eventForm.startDateTime=I()(n+" "+this.startTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),this.eventForm.endDateTime=I()(i+" "+this.endTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),this.availableEndDate={disabledDate:function(t){return!Object(ee.o)(t,Object(ee.a)(e,-1,"days"),Object(ee.a)(e,1,"month"))},firstDayOfWeek:1},this.recurringDatePickerOptions={disabledDate:function(t){return Object(ee.n)(t,e,"days")},firstDayOfWeek:1},null!=this.eventForm.responseDeadline&&""!=this.eventForm.responseDeadline&&I()(this.eventForm.responseDeadline).isAfter(I()(e))&&(this.showInvalidDeadlineAlert=!0)},bindingStartAndEndDateTime:function(e){e&&(this.eventForm.startDateTime=e.startDateTime,this.startDate=I()(e.startDateTime).format("YYYY-MM-DD"),this.startTime=I()(e.startDateTime).format("HH:mm:ss"),this.eventForm.endDateTime=e.endDateTime,this.endDate=I()(e.endDateTime).format("YYYY-MM-DD"),this.endTime=I()(e.endDateTime).format("HH:mm:ss"),"institution"==e.resourceType&&(this.eventForm.addToInstitutionCalendar=!0)),this.modifyDateTimeSelectedByClickedTimeslot(null)},addResourceToList:function(e){this.eventForm.resources=e,this.existingResources=e},removeResource:function(e){var t=this.eventForm.resources.findIndex((function(t){return t.id===e}));t>-1&&this.eventForm.resources.splice(t,1)},onSaveClicked:function(){var e=!1;(this.partiallyAvailableLocations.length>0||this.partiallyAvailableResources.length>0)&&(this.$refs.partiallyAvailableResourcesWarning.show(),e=!0),!this.isRepeatingEvent||this.isRepeatingOccurrence||this.hasSameRepeatingPattern||(this.$refs.editRepeatingSeriesWarningModal.show(),e=!0),this.isHandlingOthersEvent&&this.eventForm.type!==B.a.LESSON&&(this.$refs.editOthersEventWarningModal.show(),e=!0),this.showTitleTooLongAlert&&(e=!0),e||this.validateEvent()},onConfirmEditOthersEvent:function(){this.$refs.editOthersEventWarningModal.hide(),this.validateEvent()},onConfirmEditRepeatingSeries:function(){this.$refs.editRepeatingSeriesWarningModal.hide(),0===this.partiallyAvailableLocations.length&&0===this.partiallyAvailableResources.length&&this.validateEvent()},onConfirmPartiallyAvailableResources:function(){this.$refs.partiallyAvailableResourcesWarning.hide(),this.validateEvent()},validateEvent:function(){this.isLoading=!0;var e=!0;this.eventForm.invitees.length>2e3&&(this.$refs.tooManyRecipientsModal.show(),document.getElementById("eventInvitees").scrollIntoView(!0),e=!1),this.eventForm.title.trim()?this.showMissingTitleAlert=!1:(this.showMissingTitleAlert=!0,document.getElementById("eventTitle").scrollIntoView(!0),e=!1),""==this.endDate||null==this.endDate?(this.messageAlertStartDate=this.$getText("CALENDAR_ALERT_START_DATE"),this.showMissingEndDateAlert=!0,document.getElementById("endDate").scrollIntoView(!0),e=!1):this.showMissingEndDateAlert=!1,""==this.endTime||null==this.endTime?(this.showMissingEndTimeAlert=!0,document.getElementById("endTime").scrollIntoView(!0),e=!1):this.showMissingEndTimeAlert=!1,""==this.startDate||null==this.startDate?(this.messageAlertStartDate=this.$getText("CALENDAR_ALERT_START_DATE"),this.showMissingStartDateAlert=!0,document.getElementById("startDate").scrollIntoView(!0),e=!1):this.showMissingStartDateAlert=!1;var t=Object(ee.e)(this.startDate,te.a.COMPLETE_DATE),n=Object(ee.e)(this.endDate,te.a.COMPLETE_DATE);this.eventForm.allDay?(this.eventForm.startDateTime=I()(t+" "+this.startTime).format("YYYY-MM-DD"),this.eventForm.endDateTime=I()(n+" "+this.endTime).format("YYYY-MM-DD")):(this.eventForm.startDateTime=I()(t+" "+this.startTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),this.eventForm.endDateTime=I()(n+" "+this.endTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ")),this.isRepeatingEvent&&!this.isRepeatingOccurrence&&(this.validateRepeatingEvent?(this.showMissingSeriesEventAlert=!0,document.getElementById("repeatEvent").scrollIntoView(!0),e=!1):this.showMissingSeriesEventAlert=!1,null!=this.eventForm.repeating.maxDate&&(this.eventForm.repeating.maxDate=I()(this.eventForm.repeating.maxDate).format("YYYY-MM-DD"))),!this.isRepeatingEvent&&I()(this.eventForm.endDateTime).isBefore(I()(this.eventForm.startDateTime))&&(this.showMissingEndDateAlert=!0,document.getElementById("endDate").scrollIntoView(!0),e=!1),null!=this.eventForm.responseDeadline&&""!=this.eventForm.responseDeadline&&I()(this.eventForm.responseDeadline).isAfter(I()(this.eventForm.startDateTime))&&(this.showInvalidDeadlineAlert=!0,document.getElementById("deadline-date").scrollIntoView(!0),e=!1),null==this.startTime&&!1===this.eventForm.allDay&&(this.messageAlertStartDate=this.$getText("CALENDAR_ALERT_START_DATE"),this.showMissingStartTimeAlert=!0,document.getElementById("startTime").scrollIntoView(!0),e=!1),this.simpleEventModel.isValid()||(e=!1),e?this.checkForBlockedComChannels():this.isLoading=!1},removeBlocked:function(){var e=this;this.eventForm.inviteeGroups=this.blockedCommunicationChannelResponse.getUnblockedGroups();var t=this.blockedCommunicationChannelResponse.getUnblockedInstitutionProfiles(),n=this.blockedCommunicationChannelResponse.getUnblockedOtpInboxes();this.eventForm.invitees=[].concat(r()(t),r()(n)),this.eventForm.inviteeIds=t.map((function(e){return e.id})),this.eventForm.invitedOtpInboxIds=n.map((function(e){return e.otpInboxId})),this.$nextTick((function(){e.resetRecipientsInput=!e.resetRecipientsInput,e.existingInvitees=e.eventForm.invitees,e.checkForConflictingEvents()}))},checkForBlockedComChannels:function(){var e=this;return l()(h.a.mark((function t(){var n;return h.a.wrap((function(t){for(;;
1)switch(t.prev=t.next){case 0:if(e.prepareEventForm(),!(e.eventForm.inviteeGroups.length>0||e.eventForm.invitees.length>0)){t.next=5;break}return t.next=4,Ue.a.checkBlockedCommunicationChannel(Ue.a.toBCCRequestModel(e.eventCreatorOrUpdaterInstitutionProfileId,null,e.eventForm.inviteeGroups,e.eventForm.invitees.filter((function(e){return null==e.otpInboxId})),e.eventForm.invitees.filter((function(e){return e.otpInboxId}))));case 4:e.blockedCommunicationChannelResponse=t.sent;case 5:null!==(n=e.blockedCommunicationChannelResponse)&&void 0!==n&&n.hasBlockedRecipients()&&!e.hasLimitedEditRight?(e.$refs.theCommunicationChannelIsBlocked.show(),e.isLoading=!1):e.checkForConflictingEvents();case 6:case"end":return t.stop()}}),t)})))()},checkForConflictingEvents:function(){var e=this;if(this.eventForm.invitees.length>0&&this.eventForm.invitees.length<this.maxAmountOfInviteesWhenGettingConflictingEvents&&this.eventForm.responseRequired&&this.hasPermission(g.a.INVITE_TO_EVENT)&&this.profile.role==_.a.EMPLOYEE){var t=null;null!=this.eventForm.id&&""!=this.eventForm.id&&(t=this.eventForm.id);var n=this.eventForm.invitees.filter((function(t){return null!=t.id&&!e.isInviteeOtp(t)})).map((function(e){return e.id})),i={start:this.eventForm.startDateTime,end:this.eventForm.endDateTime,allDay:this.eventForm.allDay,institutionProfileIds:n,excludeEventId:t};null!=this.eventForm.repeating&&this.eventForm.repeating.pattern!==be.a.NEVER&&(i.occurenceLimit=this.eventForm.repeating.occurenceLimit,i.weekdayMask=this.eventForm.repeating.weekdayMask,i.pattern=this.eventForm.repeating.pattern,i.interval=this.eventForm.repeating.interval,i.maxDate=this.eventForm.repeating.maxDate),this.warningConflictEventByAttendees(i).then((function(t){0===t.length?e.checkForAttachments():(e.isLoading=!1,e.$refs.conflictingEventsModal.show())}))}else this.checkForAttachments()},isInviteeOtp:function(e){return void 0!==e.otpInboxId&&null!==e.otpInboxId||e.portalRole===_.a.OTP||e.role===_.a.OTP},checkForAttachments:function(){var e=this;return l()(h.a.mark((function t(){var n,i,s,a,r,o,l;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((n=Ve.a.prepareAttachments(e.eventForm.attachments)).existingMedia.length>0)){t.next=13;break}if(!((i=n.existingMedia.filter((function(e){return null!=e.media&&e.media.updated}))).length>0)){t.next=13;break}return t.prev=4,t.next=7,e.updateAttachments({media:Be.a.prepareMedia(i)});case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(4),e.isLoading=!1,t.abrupt("return");case 13:if(null==n.media&&null==n.files&&null==n.links){t.next=39;break}if(n.ownerInstitutionProfileId=e.institutionProfileSelectedOnEventForm.institutionProfileId,n.institutionCode=e.institutionProfileSelectedOnEventForm.institutionCode,t.prev=16,s=[],!(n.attachedSecureDocumentIds&&n.attachedSecureDocumentIds.length>0)){t.next=24;break}return a={documentIds:n.attachedSecureDocumentIds,ownerInstitutionProfileId:n.ownerInstitutionProfileId},t.next=22,e.createDocumentLinks(a);case 22:r=t.sent,s=s.concat(r.map((function(e){return e.id})));case 24:return n.attachedSecureDocumentIds=[],t.next=27,e.createAttachments(n);case 27:o=t.sent,l=o.files.concat(o.links).concat(o.media).concat(n.existingMedia),s=s.concat(l.map((function(e){return e.id}))),e.eventForm.attachmentIds=s,e.determineEventTypeToSave(),t.next=37;break;case 34:t.prev=34,t.t1=t.catch(16),e.isLoading=!1;case 37:t.next=41;break;case 39:e.eventForm.attachmentIds=n.existingMedia.map((function(e){return e.id})),e.determineEventTypeToSave();case 41:case"end":return t.stop()}}),t,null,[[4,9],[16,34]])})))()},determineEventTypeToSave:function(){this.hasRepeatingPattern?this.saveRepeatingEvent():this.eventForm.type==B.a.LESSON?this.saveLessonEvent():this.saveSimpleEvent()},prepareEventForm:function(){if(null!=this.eventForm.repeating&&(this.eventForm.pattern=this.eventForm.repeating.pattern,this.eventForm.occurenceLimit=this.eventForm.repeating.occurenceLimit,this.eventForm.weekdayMask=this.eventForm.repeating.weekdayMask,this.eventForm.maxDate=this.eventForm.repeating.maxDate,this.eventForm.interval=this.eventForm.repeating.interval),null!=this.eventForm.lesson&&(this.eventForm.lessonId=this.eventForm.id,this.eventForm.noteToClass=this.eventForm.lesson.noteToClass,this.eventForm.noteToSubstitute=this.eventForm.lesson.noteToSubstitute,this.eventForm.noteToTeacher=this.eventForm.lesson.noteToTeacher),this.eventForm.responseRequired||(this.eventForm.responseDeadline=null),this.isEditMode||(this.eventForm.creatorInstProfileId=this.eventCreatorInstitutionProfileId),this.eventForm.eventId=this.eventForm.id,this.eventForm.isPrivate=this.eventForm.private,this.eventForm.inviteeIds=null!=this.eventForm.invitees?this.eventForm.invitees.filter((function(e){return null==e.otpInboxId&&e.portalRole!=_.a.OTP})).map((function(e){return e.id})):[],this.inviteEntireGroups(),this.eventForm.resourceIds=null!=this.eventForm.resources?this.eventForm.resources.map((function(e){return e.id})):[],this.eventForm.additionalLocationIds=[],null!=this.eventForm.additionalLocations){var e,t=Ge(this.eventForm.additionalLocations);try{for(t.s();!(e=t.n()).done;){var n=e.value;null!=n.id&&this.eventForm.additionalLocationIds.push(n.id)}}catch(e){t.e(e)}finally{t.f()}}this.eventForm.additionalResourceIds=this.eventForm.resourceIds.concat(this.eventForm.additionalLocationIds),null!=this.eventForm.primaryResource&&(this.eventForm.primaryResourceId=this.eventForm.primaryResource.id),this.parent===E.a.GROUP&&(this.eventForm.invitedOtpInboxIds=this.eventForm.invitees.filter((function(e){return e.portalRole===_.a.OTP})).map((function(e){return e.id})))},inviteEntireGroups:function(){var e=this,t={},n=new Set;if(!0===Array.isArray(this.eventForm.invitedGroups)){var i,s=Ge(this.eventForm.invitedGroups);try{for(s.s();!(i=s.n()).done;){var a=i.value,o=(t[a.id]||{}).portalRoles||[],l=a.portalRole,c=+a.id;null==l?n.add(c):(-1===o.indexOf(l)&&o.push(l),t[c]={groupId:c,portalRoles:r()(o)})}}catch(e){s.e(e)}finally{s.f()}}this.eventForm.inviteeGroups=Object.values(t);var u=$()(this.activeEvent.inviteeGroups);if(u&&u.length>0){var d=u.map((function(e){return{groupId:e.group.id,portalRoles:e.invitedPortalRoles}}));d.forEach((function(t){var n,i=e.eventForm.inviteeGroups.find((function(e){return e.groupId===t.groupId}));i?(n=i.portalRoles).push.apply(n,r()(t.portalRoles)):e.eventForm.inviteeGroups.push(t)}))}this.eventForm.invitedGroupIds=r()(n)},saveSimpleEvent:function(){var e=this;delete this.eventForm.repeating,delete this.eventForm.lesson;var t=this.eventForm.invitees;delete this.eventForm.invitees,this.isEditMode?(this.eventForm.isEditEvent=!0,this.updateSimpleEvent(this.eventForm).then((function(){e.resetForm(),e.$parent.updatedEvent()})).catch((function(n){var i,s,a,r=null===(i=n.response)||void 0===i?void 0:i.data,o=null===(s=r.status)||void 0===s?void 0:s.errorInformation;(null===(a=r.status)||void 0===a?void 0:a.subCode)===Ie.a.exceedingMaximumParticipants&&(e.simpleEventModel.setActualNumberOfParticipants(o.actualNumberOfRecipients),e.simpleEventModel.isValid()),e.isLoading=!1,e.eventForm.invitees=t}))):this.createSimpleEvent(this.eventForm).then((function(){e.resetForm(),e.$parent.updatedEvent()})).catch((function(){e.isLoading=!1}))},saveRepeatingEvent:function(){var e=this;if(delete this.eventForm.lesson,this.isEditMode){var t=this.$route.query.occurrence;this.eventForm.isEditEvent=!0,this.updateRepeatingEvent(Ye(Ye({},this.eventForm),{},{occurrenceDateTime:t})).then((function(){e.resetForm(),e.$parent.updatedEvent()})).catch((function(t){var n,i,s=null===(n=t.response)||void 0===n||null===(i=n.data.status)||void 0===i?void 0:i.subCode;s===Ie.a.conflictingRepeatingEventInSameSeries&&e.$refs.cannotMoveRepeatingEventToExistingRepetitionWarningModal.show(),e.isBeforeFirstOccurrence=s===Ie.a.firstRepeatingEventExceptionOutOfRange,e.isAfterLastOccurrence=s===Ie.a.lastRepeatingEventExceptionOutOfRange,e.isLoading=!1}))}else this.createRepeatingEvent(this.eventForm).then((function(){e.resetForm(),e.$parent.updatedEvent()})).catch((function(){e.isLoading=!1}))},saveLessonEvent:function(){var e=this;delete this.eventForm.repeating,this.eventForm.isEditEvent=!0,this.updateLessonEvent(this.eventForm).then((function(){e.resetForm(),e.$parent.updatedEvent()}))},parseRepeatingEventData:function(){switch(this.isClickedOK=!0,this.resetMaxDate=this.eventForm.repeating.maxDate,this.resetEventNeverEnd=this.eventNeverEnd,this.endDate=this.startDate,this.eventForm.repeating.pattern){case be.a.DAILY:this.resetSeriesForm=Object.assign({},this.daily),this.daily.occurenceLimit=this.daily.occurenceLimit.toString().split(".").join(""),this.invalidDailyInterval||this.invalidDailyoccurenceLimit||(this.eventForm.repeating.interval=parseInt(this.daily.interval)||0,this.eventForm.repeating.occurenceLimit=parseInt(this.daily.occurenceLimit)||0,this.showMissingSeriesEventAlert=!1,this.showSeriesEventForm=!1,this.isClickedOK=!1);break;case be.a.WEEKLY:if(this.resetSeriesForm=Object.assign({},this.weekly),this.weekly.occurenceLimit=this.weekly.occurenceLimit.toString().split(".").join(""),!this.invalidWeeklyOccurenceLimit&&!this.invalidWeeklyWeekdayMask){this.eventForm.repeating.occurenceLimit=parseInt(this.weekly.occurenceLimit)||0,this.eventForm.repeating.weekdayMask=[];for(var e=0;e<7;e++)0==e&&this.weekly.weekdayMask.includes(Oe.a.SUNDAY)||1==e&&this.weekly.weekdayMask.includes(Oe.a.MONDAY)||2==e&&this.weekly.weekdayMask.includes(Oe.a.TUESDAY)||3==e&&this.weekly.weekdayMask.includes(Oe.a.WEDNESDAY)||4==e&&this.weekly.weekdayMask.includes(Oe.a.THURSDAY)||5==e&&this.weekly.weekdayMask.includes(Oe.a.FRIDAY)||6==e&&this.weekly.weekdayMask.includes(Oe.a.SATURDAY)?this.eventForm.repeating.weekdayMask.push(!0):this.eventForm.repeating.weekdayMask.push(!1);var t=Object(ee.g)(this.startDate);this.startDate=Object(ee.e)(this.getFirstWeeklyOccurrence(this.eventForm.repeating.weekdayMask,t),te.a.COMPLETE_DATE),this.endDate=this.startDate,this.showMissingSeriesEventAlert=!1,this.showSeriesEventForm=!1,this.isClickedOK=!1}break;case be.a.MONTHLY:this.resetSeriesForm=Object.assign({},this.monthly),this.monthly.occurenceLimit=this.monthly.occurenceLimit.toString().split(".").join(""),this.invalidMonthlyOccurenceLimit||(this.eventForm.repeating.occurenceLimit=parseInt(this.monthly.occurenceLimit)||0,this.eventForm.repeating.dayInMonth=parseInt(re.a.formatDate(this.startDate,te.a.DATE_ONLY)),this.showMissingSeriesEventAlert=!1,this.showSeriesEventForm=!1,this.isClickedOK=!1)}this.isClickedOK||(this.resetRepeatingObject=Object.assign({},this.eventForm.repeating)),this.updateRepeatingEventEndDateLabel()},updateRepeatingEventEndDateLabel:function(){null!==this.eventForm.repeating.maxDate?this.repeatingEventEndDateTimeLabel=this.$t("calendar.end_at",{endDate:re.a.formatDate(this.eventForm.repeating.maxDate,te.a.SHORT_DATE)}):this.repeatingEventEndDateTimeLabel=""},closeRepeatingDialog:function(){switch(this.eventForm.repeating.maxDate=this.resetMaxDate,this.eventNeverEnd=this.resetEventNeverEnd,this.weekly.weekdayMask.length=0,this.resetDateTime(),null==this.eventForm.repeating.maxDate?this.selectedMaxDate=!1:this.selectedMaxDate=!0,this.eventForm.repeating.pattern){case be.a.DAILY:this.daily=Object.assign({},this.resetSeriesForm);break;case be.a.WEEKLY:this.weekly=Object.assign({},this.resetSeriesForm);break;case be.a.MONTHLY:this.monthly=Object.assign({},this.resetSeriesForm)}this.isEditMode||(this.eventForm.repeating=Object.assign({},this.resetRepeatingObject)),this.isClickedOK=!1,this.showSeriesEventForm=!1},emitRepeatEventSelected:function(e,t){var n=this;setTimeout((function(){if(!e&&t)switch(n.resetMaxDate=n.eventForm.repeating.maxDate,n.resetEventNeverEnd=n.eventNeverEnd,n.eventForm.repeating.pattern){case be.a.NEVER:n.resetRepeatingObject=Object.assign({},n.eventForm.repeating),n.showSeriesEventForm=!1;break;case be.a.DAILY:n.resetSeriesForm=Object.assign({},n.daily),n.seriesEventFormWidth="100%",n.seriesEventTitle=n.$getText("CALENDAR_TITLE_DAILY_EVENT"),n.showSeriesEventForm=!0;break;case be.a.WEEKLY:n.resetSeriesForm=Object.assign({},n.weekly),n.seriesEventFormWidth="310px",n.seriesEventTitle=n.$getText("CALENDAR_TITLE_WEEKLY_EVENT"),n.showSeriesEventForm=!0;break;case be.a.MONTHLY:n.resetSeriesForm=Object.assign({},n.monthly),n.seriesEventFormWidth="100%",n.seriesEventTitle=n.$getText("CALENDAR_TITLE_MONTHLY_EVENT"),n.showSeriesEventForm=!0}else n.resetRepeatingObject=Object.assign({},n.eventForm.repeating)}))},mapRepeatingEvent:function(){if(this.isRepeatingEvent&&!this.isRepeatingOccurrence){this.startDate=I()(this.activeEvent.repeating.originalStartDateTime).format("YYYY-MM-DD"),this.startTime=I()(this.activeEvent.repeating.originalStartDateTime).format("HH:mm:ss"),this.endDate=I()(this.activeEvent.repeating.originalEndDateTime).format("YYYY-MM-DD"),this.endTime=I()(this.activeEvent.repeating.originalEndDateTime).format("HH:mm:ss"),null!=this.activeEvent.repeating.maxDate&&(this.eventForm.repeating.maxDate=I()(this.activeEvent.repeating.maxDate).format("YYYY-MM-DD"));var e=0;switch(this.activeEvent.repeating.pattern){case be.a.DAILY:this.daily.interval=parseInt(this.activeEvent.repeating.interval)||0,this.daily.occurenceLimit=parseInt(this.activeEvent.repeating.occurenceLimit)||0,0==this.daily.occurenceLimit&&(this.daily.occurenceLimit="",null===this.activeEvent.repeating.maxDate?this.eventNeverEnd=!0:this.selectedMaxDate=!0);break;case be.a.WEEKLY:this.weekly.occurenceLimit=this.activeEvent.repeating.occurenceLimit?parseInt(this.activeEvent.repeating.occurenceLimit):0,this.weekly.weekdayMask=[];var t,n=Ge(this.activeEvent.repeating.weekdayMask);try{for(n.s();!(t=n.n()).done;){var i=t.value;0==e&&i&&this.weekly.weekdayMask.push(Oe.a.SUNDAY),1==e&&i&&this.weekly.weekdayMask.push(Oe.a.MONDAY),2==e&&i&&this.weekly.weekdayMask.push(Oe.a.TUESDAY),3==e&&i&&this.weekly.weekdayMask.push(Oe.a.WEDNESDAY),4==e&&i&&this.weekly.weekdayMask.push(Oe.a.THURSDAY),5==e&&i&&this.weekly.weekdayMask.push(Oe.a.FRIDAY),6==e&&i&&this.weekly.weekdayMask.push(Oe.a.SATURDAY),e++}}catch(e){n.e(e)}finally{n.f()}0==this.weekly.occurenceLimit&&(this.weekly.occurenceLimit="",null===this.eventForm.repeating.maxDate?this.eventNeverEnd=!0:this.selectedMaxDate=!0);break;case be.a.MONTHLY:this.monthly.occurenceLimit=this.activeEvent.repeating.occurenceLimit?parseInt(this.activeEvent.repeating.occurenceLimit):0,0==this.monthly.occurenceLimit&&(this.monthly.occurenceLimit="",null===this.activeEvent.repeating.maxDate?this.eventNeverEnd=!0:this.selectedMaxDate=!0)}this.repeatingEventEndDateTimeLabel=this.getPopulatedRepeatingPatternEndDate()}else this.showSeriesEventForm=!1},getPopulatedRepeatingPatternEndDate:function(){var e,t;return null==this.eventForm.repeating.maxDate&&null==this.eventForm.repeating.occurenceLimit?"":this.$t("calendar.end_at",{endDate:this.eventForm.allDay?re.a.formatUtcDate(null===(e=this.eventForm.repeating)||void 0===e?void 0:e.lastOccurrenceDate,te.a.SHORT_DATE):re.a.formatDate(null===(t=this.eventForm.repeating)||void 0===t?void 0:t.lastOccurrenceDate,te.a.SHORT_DATE)})},resetForm:function(){this.eventForm.id="",this.eventForm.title="",this.eventForm.type="",this.eventForm.invitees=[],this.eventForm.inviteeIds=[],this.eventForm.invitedGroups=[],this.eventForm.invitedGroupIds=[],this.eventForm.invitedOtpInboxIds=[],Me()(this.activeEvent)?this.eventForm.institutionCode=Object(_e.c)(this.institutionsThatCanBeSeen,this.activeInstitutionCodes,this.institutionsThatCanBeSeen[0].institutionCode):this.eventForm.institutionCode=this.activeEvent.institutionCode,this.eventForm.startDate=I()().add(1,"hours").minute(0).format("YYYY-MM-DD"),this.eventForm.endDate=I()().add(1,"hours").minute(30).format("YYYY-MM-DD"),this.eventForm.startTime=I()().add(1,"hours").minute(0).format("HH:mm:ss"),this.eventForm.endTime=I()().add(1,"hours").minute(30).format("HH:mm:ss"),this.eventForm.resources=[],this.eventForm.allDay=!1,this.eventForm.attachments=[],this.eventForm.primaryResource={},this.eventForm.additionalLocations=[],this.eventForm.additionalResources=[],this.eventForm.coOrganizerIds=[],this.existingLocations=[],this.existingInvitees=[],this.existingOrganizers=[],this.existingResources=[],null!=this.eventForm.repeating&&(this.eventForm.repeating.pattern=be.a.NEVER),this.eventForm.responseRequired=!0,this.eventForm.description="",this.existingAttach
1ments=[],this.emptyEventForm={}}},Object(m.b)({modifyDateTimeSelectedByClickedTimeslot:p.a.MODIFY_DATETIME_SELECTED_BY_CLICKED_TIMESLOT,warningConflictEventByAttendees:p.a.WARNING_CONFLICT_EVENT_BY_ATTENDEES,loadGroupMemberships:p.a.LOAD_GROUP_MEMBERSHIPS_LIGHT,clearConflictingAttendees:p.a.CLEAN_WARNING_CONFLICT_EVENT_BY_ATTENDEES,createSimpleEvent:p.a.CREATE_SIMPLE_EVENT,updateSimpleEvent:p.a.UPDATE_SIMPLE_EVENT,createRepeatingEvent:p.a.CREATE_REPEATING_EVENT,updateRepeatingEvent:p.a.UPDATE_REPEATING_EVENT,updateLessonEvent:p.a.UPDATE_LESSON_EVENT,createAttachments:p.a.CREATE_ATTACHMENTS,updateAttachments:p.a.UPDATE_ATTACHMENTS,updateEventResources:p.a.UPDATE_EVENT_RESOURCES,createDocumentLinks:p.a.CREATE_DOCUMENT_LINKS,resetActiveEvent:p.a.RESET_ACTIVE_EVENT,getEventById:p.a.GET_EVENT_BY_ID})),Object(m.d)({updateUnavailableResources:p.a.MUTATE_UNAVAILABLE_RESOURCES})),{},{loadEditedEvent:function(){var e=this;return l()(h.a.mark((function t(){var n,i,s,a,o,l,c,u;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={eventId:e.$route.params.eventId,occurrenceDateTime:e.$route.query.occurrence},t.next=3,e.getEventById(n);case 3:if(e.$route.params.eventId==e.activeEvent.id){e.simpleEventModel.setMaximumNumberOfParticipants(e.activeEvent.maximumNumberOfParticipants),e.simpleEventModel.setMaxParticipantsEnabled(null!=e.activeEvent.maximumNumberOfParticipants),e.simpleEventModel.setActualNumberOfParticipants(e.activeEvent.actualNumberOfParticipants),e.eventForm=$()(e.activeEvent),e.eventForm.inviteeGroups=[],e.hiddenOrganizers=[e.eventForm.creator],e.eventForm.oldStartDateTime=e.activeEvent.startDateTime,e.eventForm.oldEndDateTime=e.activeEvent.endDateTime,e.existingOrganizers=e.eventForm.coOrganizers=e.activeEvent.coOrganizers?e.activeEvent.coOrganizers.map((function(e){return e.instProfile})):[],e.selectedOrganizers=r()(e.existingOrganizers),e.eventForm.invitees=e.calculateCurrentInvitees(),e.eventForm.coOrganizerIds=e.existingOrganizers.map((function(e){return e.id})),Array.isArray(e.activeEvent.invitedGroupHomeChildren)&&(e.eventForm.invitedOtpInboxIds=r()(new Set(e.activeEvent.invitedGroupHomeChildren.map((function(e){return e.otpInboxId}))))),e.simpleEventModel.setDoRequestNumberOfParticipants(e.eventForm.doRequestNumberOfParticipants),e.eventForm.addToInstitutionCalendar=e.activeEvent.addedToInstitutionCalendar,e.institutions.filter((function(t){return null!=e.eventForm.creator&&t.institutionProfileId==e.eventForm.creator.id})).length>0?e.eventForm.institutionCode=e.institutions.find((function(t){return t.institutionProfileId==e.eventForm.creator.id})).institutionCode:e.eventForm.institutionCode=e.activeEvent.institutionCode,e.eventForm.allDay?(e.startDate=I()(e.activeEvent.startDateTime).utc().format("YYYY-MM-DD"),e.endDate=I()(e.activeEvent.endDateTime).utc().format("YYYY-MM-DD")):(e.startDate=I()(e.activeEvent.startDateTime).format("YYYY-MM-DD"),e.startTime=I()(e.activeEvent.startDateTime).format("HH:mm:ss"),e.endDate=I()(e.activeEvent.endDateTime).format("YYYY-MM-DD"),e.endTime=I()(e.activeEvent.endDateTime).format("HH:mm:ss")),e.existingAttachments=e.activeEvent.attachments,null!=e.eventForm.description&&null!=e.eventForm.description.html&&(e.eventForm.description=e.eventForm.description.html),e.activeEvent.lesson&&(e.eventForm.lesson.noteToClass=e.activeEvent.lesson.noteToClass.html,e.eventForm.lesson.noteToSubstitute=e.activeEvent.lesson.noteToSubstitute.html,e.eventForm.lesson.noteToTeacher=e.activeEvent.lesson.noteToTeacher.html),e.isHandlingOthersPrivateEvent&&(e.eventForm.description=e.$getText("CALENDAR_LABEL_EVENT_PRIVATE")),null!=e.activeEvent.primaryResource&&e.eventForm.type!==B.a.LESSON&&e.existingLocations.unshift(Ne.a.mapResource(e.activeEvent.primaryResource)),null!=e.activeEvent.additionalResources&&(s=e.activeEvent.additionalResources.filter((function(e){return e.resourceCategory.resourceType===Re.a.LOCATION})),(i=e.existingLocations).push.apply(i,r()(s.map((function(e){return Ne.a.mapResource(e)}))))),e.selectedLocations=e.existingLocations,e.existingResources=[],e.eventForm.additionalLocations=[],e.eventForm.resources=[],a=Ge(e.activeEvent.additionalResources);try{for(a.s();!(o=a.n()).done;)l=o.value,c=Ne.a.mapResource(l),"location"==l.resourceCategory.resourceType.toLowerCase()&&e.eventForm.additionalLocations.push(c),"location"!=l.resourceCategory.resourceType.toLowerCase()&&(e.existingResources.push(c),e.eventForm.resources.push(c))}catch(e){a.e(e)}finally{a.f()}e.eventForm.additionalResources=[],e.eventForm.responseRequired&&(e.disableResponseRequire=!0),e.mapRepeatingEvent(),u=[],null!=e.eventForm.invitees&&e.eventForm.invitees.length>
10&&e.eventForm.invitees.forEach((function(t){"groupHome"===t.type?(t.label=e.getGroupHomeInviteeWithMetadata(t),u.push({label:t.label,name:t.label,regardingChild:t.regardingChildId,institutionCode:t.institutionCode,value:t.value.value,id:t.id,otpInboxId:t.id,portalRole:_.a.OTP,type:t.type})):(t.label=e.$getProfileDisplayName(t),t.value="profile"+t.id,u.push({label:e.$getProfileDisplayName(t),name:e.$getProfileDisplayName(t),institutionCode:t.institutionCode,value:"profile"+t.id+t.institutionCode,id:t.id,institutionProfileId:t.id,portalRole:t.role,type:"profile"}))})),e.existingInvitees=u,e.eventForm.hideInOwnCalendar&&(e.eventForm.addToInstitutionCalendar=!1),e.isLoadingDescription=!1,e.eventFormKey++}case 4:case"end":return t.stop()}}),t)})))()},calculateCurrentInvitees:function(){var e=[],t=this.activeEvent;return null!=t.invitees&&t.invitees.length>0&&t.invitees.forEach((function(t){return e.push(t.instProfile)})),null!=t.invitedGroupHomeChildren&&t.invitedGroupHomeChildren.length>0&&t.invitedGroupHomeChildren.forEac
1h((function(t){e.push({id:t.otpInboxId,otpInboxId:t.otpInboxId,groupHomeId:t.groupHomeId,groupHomeName:t.groupHomeName,fullName:t.groupHomeName,regardingChildId:t.regardingChildId,regardingChildDisplayName:t.regardingChildDisplayName,regardingChildMetaData:t.regardingChildMetaData,type:"groupHome",value:"groupHome-"+t.groupHomeId+"-"+t.regardingChildId,portalRole:_.a.OTP})})),e},populateEventTypes:function(){if(null==this.basicEventTypes){var e=[];e.push({type:this.eventTypes.EVENT,label:this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_event")}),e.push({type:this.eventTypes.EXCURSION,label:this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_excursion")}),e.push({type:this.eventTypes.HOLIDAY,label:this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_holiday")}),e.push({type:this.eventTypes.OTHER,label:this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_other")}),e.push({type:this.eventTypes.LESSON,label:this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_lesson")}),this.basicEventTypes=e}},removeUnavailableResources:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.resetResources=!this.resetResources,this.existingResources=[],this.existingResources=this.eventForm.resources=this.eventForm.resources.filter((function(t){return null==e.unavailableResourceIds.find((function(e){return e===t.id}))})),this.eventForm.resources=this.eventForm.resources.filter((function(t){return!e.unavailableResourceIds.includes(t.id)})),this.eventForm.resourceIds=this.eventForm.resources.map((function(e){return e.id})),this.eventForm.additionalResourceIds=this.eventForm.resourceIds.concat(this.eventForm.additionalLocationIds),this.eventForm.primaryResource&&this.unavailableResourceIds.find((function(t){return t===e.eventForm.primaryResource.id}))&&(this.eventForm.primaryResource={},this.eventForm.primaryResourceId=null,this.resetPrimaryResources=!this.resetPrimaryResources),this.updateUnavailableResources([]),t&&this.determineEventTypeToSave()},showUnavailableResources:function(){var e=this;this.unavailableResources=[];var t,n=Ge(this.unavailableResourceIds);try{var i=function(){var n,i=t.value;null!=e.eventForm.resources.find((function(e){return e.id===i}))&&e.unavailableResources.push(e.eventForm.resources.find((function(e){return e.id===i}))),null!=e.eventForm.additionalLocations.find((function(e){return e.id===i}))&&e.unavailableResources.push(e.eventForm.additionalLocations.find((function(e){return e.id===i}))),(null===(n=e.eventForm.primaryResource)||void 0===n?void 0:n.id)===i&&e.unavailableResources.push(e.eventForm.primaryResource)};for(n.s();!(t=n.n()).done;)i()}catch(e){n.e(e)}finally{n.f()}this.$refs.unavailableResourcesModal.show()},setAtrributesForTimepicker:function(){U()(".vue__time-picker").attr("tabindex",0),U()(".display-time").attr("tabindex",-1),U()(".vue__time-picker").off("keypress"),U()(".vue__time-picker").on("keypress",(function(e){13===e.which&&U()(".display-time",this)[0].focus()}))}})},ze=$e,qe=Object(L.a)(ze,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-form",{staticClass:"drawer-container"},[e.isVisibleRepeatingEventAlert?n("b-row",[n("b-col",[n("AulaAlert",[e._v("\n        "+e._s(e.repeatingEventAlert)+"\n      ")])],1)],1):e._e(),e._v(" "),n("b-row",[n("b-col",[e.institutionsThatCanBeSeen.length>1&&null==e.delegatedContext.institutionProfileId&&!e.isCoOrganizer?[n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_TITLE_CHOOSE_INSTITUTION")))]),e._v(" "),n("aula-select",{attrs:{placeholder:"Select",disabled:e.eventForm.type==e.eventTypes.LESSON||e.isEditMode},on:{change:e.handleResetRecipientsInput},model:{value:e.eventForm.institutionCode,callback:function(t){e.$set(e.eventForm,"institutionCode",t)},expression:"eventForm.institutionCode"}},e._l(e.institutionsThatCanBeSeen,(function(e){return n("aula-option",{key:e.institutionCode,attrs:{id:e.institutionCode,label:e.name,value:e.institutionCode}})})),1)],1)],1)]:e._e(),e._v(" "),n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_TITLE"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("b-form-input",{key:e.eventFormKey,class:e.showTitleAlert?"red-border":"",attrs:{id:"eventTitle",placeholder:e.$getText("CALENDAR_LABEL_EVENT_PLACEHOLDER_TITLE"),type:"text",autocomplete:"off",disabled:e.hasLimitedEditRight||e.isHandlingOthersPrivateEvent},on:{input:function(t){return e.validateTitleInput()}},model:{value:e.eventForm.title,callback:function(t){e.$set(e.eventForm,"title",t)},expression:"eventForm.title"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showTitleTooLongAlert}},[e._v("\n            "+e._s(e.$getText("CALENDAR_ALERT_TITLE_TOO_LONG"))+"\n          ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingEndTimeAlert}},[e._v("\n            "+e._s(e.$getText("CALENDAR_ALERT_END_DATETIME"))+"\n          ")])],1),e._v(" "),e.profile.role===e.portalRoles.EMPLOYEE?n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_TYPE")))]),e._v(" "),e.isHandlingOthersPrivateEvent?n("b-form-input",{attrs:{type:"text",disabled:"",value:e.$getText("CALENDAR_LABEL_EVENT_PRIVATE")}}):n("aula-select",{attrs:{disabled:e.hasLimitedEditRight},model:{value:e.eventForm.type,callback:function(t){e.$set(e.eventForm,"type",t)},expression:"eventForm.type"}},[e._l(e.basicEventTypes,(function(t){return[t.type!==e.eventTypes.LESSON||e.eventForm.type===e.eventTypes.LESSON?n("aula-option",{key:t.type,attrs:{label:t.label,value:t.type}}
1):e._e()]}))],2)],1):e._e(),e._v(" "),e.eventForm.type===e.eventTypes.LESSON&&null!=e.eventForm.invitedGroups?n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_CLASS")))]),e._v(" "),null!=e.eventForm.invitedGroups.find((function(t){return t.type===e.groupTypes.UNI}))?n("b-form-input",{attrs:{disabled:"",value:e.invitedGroupsName}}):e._e()],1):e._e(),e._v(" "),e.eventForm.type===e.eventTypes.LESSON?n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_TEACHER")))]),e._v(" "),n("AulaSearchRecipients",{attrs:{"existing-participants":e.primaryTeachers,disabled:""}})],1):e._e()],1),e._v(" "),e.eventForm.type!==e.eventTypes.LESSON?n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v("\n            "+e._s(e.$getText("CALENDAR_LABEL_EVENT_PERSONS"))+"\n          ")]),e._v(" "),e.isHandlingOthersPrivateEvent?n("b-form-input",{attrs:{type:"text",disabled:"",value:e.$getText("CALENDAR_LABEL_EVENT_PRIVATE")}}):n("b-input-group",{staticClass:"search-module",on:{click:function(t){return e.checkUserWithBlockedCommunication()}}},[n("aula-search-recipients",{attrs:{id:"eventInvitees","data-testid":"event-invitee-search","include-otp-from-guardian-in-sub-group":!0,"reset-input":e.resetRecipientsInput,disabled:e.isDisabledInviteesSearch,"existing-participants":e.existingInvitees,"invite-members-when-selecting-group":!0,clearable:!0,"invite-members-when-selecting-group-portal-role":!0,"invite-group-when-adding-members":!0,"close-dropdown-after-select":!1,"enable-relatives-for-students":!0,"institution-code":e.eventForm.institutionCode,"scope-employees-to-institution":!1,"placeholder-textkey":"ARIA_LABEL_CALENDAR_SEARCH","hover-text":"ARIA_LABEL_CALENDAR_SEARCH_FOR_INVITEES","include-self":!0,"from-module":e.moduleTypes.EVENT,"portal-roles":[e.portalRoles.CHILD,e.portalRoles.GUARDIAN,e.portalRoles.EMPLOYEE,e.portalRoles.OTP],"select-all":!1},on:{emitSelected:e.updateInvitees}}),e._v(" "),n("b-input-group-addon",{class:{disabledAddon:!e.hasPermission(e.permissionEnum.INVITE_TO_EVENT),disabledAddon:e.parent==e.parentTypes.GROUP}},[n("i",{staticClass:"icon-Aula_search input-group-search-addon"})])],1),e._v(" "),""!==e.invitedGroupNames?n("div",{staticClass:"mt-2"},[e._v("\n            "+e._s(e.$getText("CALENDAR_INVITED_GROUPS"))+"\n            "),n("span",{staticClass:"invited-group-names"},[e._v(e._s(e.invitedGroupNames))])]):e._e()],1),e._v(" "),!e.canEditCoOrganizers&&!e.isHandlingOthersPrivateEvent||e.isRepeatingOccurrence?e._e():n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",{attrs:{for:"eventOrganizers"}},[e._v(e._s(e.$getText("CALENDAR_LABEL_ORGANIZERS")))]),e._v(" "),e.isHandlingOthersPrivateEvent?n("b-form-input",{attrs:{type:"text",disabled:"",value:e.$getText("CALENDAR_LABEL_EVENT_PRIVATE")}}):n("b-input-group",{staticClass:"search-module"},[n("aula-search-recipients",{attrs:{id:"eventOrganizers","doc-types-api":[e.docTypes.PROFILE],"portal-roles":[e.portalRoles.EMPLOYEE],"existing-participants":e.selectedOrganizers,"reset-input":e.resetRecipientsInput,clearable:!0,"is-multiple-institution-profile-allowed":!1,disabled:e.isDisabledCoOrganizersSearch,"hidden-participants":e.hiddenOrganizers,"close-dropdown-after-select":!1,"institution-code":e.eventForm.institutionCode,"scope-employees-to-institution":!0,"placeholder-textkey":"ARIA_LABEL_CALENDAR_SEARCH","hover-text":"ARIA_LABEL_CALENDAR_SEARCH_FOR_ORGANIZERS","include-self":!1,"from-module":e.moduleTypes.EVENT,"select-all":!1},on:{emitSelected:e.onSelectOrganizers,emitRemoveTag:e.removeExistingOrganizer},scopedSlots:e._u([e.isEditMode?{key:"reset-warning",fn:function(){return[e._v("\n                "+e._s(e.$t("warning.remove_all_organizers_from_simple_event"))+"\n                "),n("br"),e._v("\n                "+e._s(e.$t("warning.are_you_sure_you_want_to_continue"))+"\n              ")]},proxy:!0}:null],null,!0)}),e._v(" "),n("b-input-group-addon",[n("i",{staticClass:"icon-Aula_search input-group-search-addon"}
1)])],1)],1)],1):e._e(),e._v(" "),n("hr",{staticClass:"line",class:e.eventForm.type===e.eventTypes.LESSON?"mb-0":""}),e._v(" "),e.eventForm.type!==e.eventTypes.LESSON?n("b-row",[n("b-col",{staticClass:"col-12"},[e.isMobile?n("div",{staticClass:"mobile-switch"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_ALL_DAY")))]),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_LABEL_EVENT_ALL_DAY"),width:e.width=48,disabled:e.hasLimitedEditRight},on:{change:e.allDayChange},model:{value:e.eventForm.allDay,callback:function(t){e.$set(e.eventForm,"allDay",t)},expression:"eventForm.allDay"}})],1):n("b-form-checkbox",{attrs:{id:"allDay",disabled:e.hasLimitedEditRight},on:{change:e.allDayChange},model:{value:e.eventForm.allDay,callback:function(t){e.$set(e.eventForm,"allDay",t)},expression:"eventForm.allDay"}},[e._v("\n            "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ALL_DAY"))+"\n          ")])],1)],1):e._e(),e._v(" "),n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_START")))]),e._v(" "),n("b-row",[n("b-col",{attrs:{cols:"6"}},[n("el-date-picker",{class:{"red-border":e.showMissingStartDateAlert||e.isBeforeFirstOccurrence||e.isAfterLastOccurrence,elPickerActive:e.isStartDateClicked},attrs:{id:"startDate",format:e.$parent.defaultDateFormat,"value-format":e.$parent.defaultDateValueFormat,type:"date","aria-label":e.$getText("ARIA_LABEL_CALENDAR_START_DATE"),placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE"),"picker-options":{firstDayOfWeek:1},clearable:!1,disabled:e.hasLimitedEditRight},on:{input:function(t){e.showMissingStartDateAlert=!1},change:e.handleStartDateChanged,focus:function(t){e.datePickerModifier(),e.isStartDateClicked=!0},blur:function(t){return e.checkValidDateTime("startDate")}},model:{value:e.startDate,callback:function(t){e.startDate=t},expression:"startDate"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingStartDateAlert}},[e._v("\n                "+e._s(e.messageAlertStartDate)+"\n              ")])],1),e._v(" "),n("b-col",{attrs:{cols:"6"}},[n("label",{staticClass:"sr-only",attrs:{for:"startTime"}},[e._v("\n                "+e._s(e.$getText("ARIA_LABEL_CALENDAR_START_TIME"))+"\n              ")]),e._v(" "),n("AulaTimepicker",{class:{"red-border":e.showMissingStartTimeAlert||e.showMissingStartDateAlert},attrs:{id:"startTime",format:"HH:mm","hour-label":"Time","minute-label":"Minut",placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_TIME"),"aria-label":e.$getText("ARIA_LABEL_CALENDAR_START_TIME"),disabled:e.eventForm.allDay||e.hasLimitedEditRight,"hide-clear-button":"","minute-interval":e.timepickerSettings.DEFAULT_INTERVAL,"advanced-keyboard":""},on:{input:function(t){e.showMissingStartTimeAlert=!1,e.showMissingStartDateAlert=!1},change:e.checkForExistingResourcesWhenChangingDateTime,open:function(t){return e.setLayer(!0)},close:function(t){return e.setLayer(!1)}},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingStartTimeAlert}},[e._v("\n                "+e._s(e.$getText("CALENDAR_ALERT_START_TIME"))+"\n              ")])],1),e._v(" "),e.isVisibleRepeatingPattern?n("b-col",{attrs:{cols:"12","aria-hidden":"true"}},[n("div",{staticClass:"repeating-pattern"},[n("p",{staticClass:"repeating-pattern-spacer"},[e._v(e._s(e.repeatingPattern))])])]):e._e()],1),e._v(" "),n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_END")))]),e._v(" "),n("b-row",[e.isVisibleEndDate?n("b-col",{attrs:{cols:"6"}},[n("el-date-picker",{class:{"red-border":e.showMissingEndDateAlert,elPickerActive:e.isEndDateClicked},attrs:{id:"endDate",format:e.$parent.defaultDateFormat,"value-format":e.$parent.defaultDateValueFormat,type:"date","picker-options":e.availableEndDate,clearable:!1,placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE"),"aria-label":e.$getText("ARIA_LABEL_CALENDAR_END_DATE"),disabled:e.isDisabledEndDate},on:{change:e.checkForExistingResourcesWhenChangingDateTime,focus:function(t){e.datePickerModifier(),e.isEndDateClicked=!0},blur:function(t){return e.checkValidDateTime("endDate")}},model:{value:e.endDate,callback:function(t){e.endDate=t},expression:"endDate"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingEndDateAlert}},[e._v("\n                "+e._s(e.$getText("CALENDAR_ALERT_END_DATETIME"))+"\n              ")])],1):e._e(
1),e._v(" "),n("b-col",{attrs:{cols:"6"}},[n("label",{staticClass:"sr-only",attrs:{for:"endTime"}},[e._v("\n                "+e._s(e.$getText("ARIA_LABEL_CALENDAR_END_TIME"))+"\n              ")]),e._v(" "),n("AulaTimepicker",{class:{"red-border":e.showMissingEndTimeAlert},attrs:{id:"endTime",format:"HH:mm","hour-label":"Time","minute-label":"Minut",placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_TIME"),"aria-label":e.$getText("ARIA_LABEL_CALENDAR_END_TIME"),disabled:e.eventForm.allDay||e.hasLimitedEditRight,"hide-clear-button":"","minute-interval":e.timepickerSettings.DEFAULT_INTERVAL,"advanced-keyboard":""},on:{input:function(t){e.showMissingEndTimeAlert=!1},change:e.checkForExistingResourcesWhenChangingDateTime,open:function(t){return e.setLayer(!0)},close:function(t){return e.setLayer(!1)}},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingEndTimeAlert}},[e._v("\n                "+e._s(e.$getText("CALENDAR_ALERT_END_DATETIME"))+"\n              ")])],1)],1),e._v(" "),e.isVisibleEventInThePastAlert?n("b-row",{staticClass:"mt-2"},[n("b-col",[n("b-alert",{staticClass:"m-0",attrs:{variant:"info",show:""}},[e._v("\n                "+e._s(e.eventInThePastAlertText)+"\n              ")])],1)],1):e._e(),e._v(" "),e.isBeforeFirstOccurrence||e.isAfterLastOccurrence?n("b-row",[n("b-col",[n("b-alert",{staticClass:"m-0",attrs:{variant:"danger",show:""}},[e.isBeforeFirstOccurrence?[e._v(e._s(e.$getText("CALENDAR_ALERT_OCCURENCE_DATE_BEFORE_FIRST_OCCURRENCE")))]:e._e(),e._v(" "),e.isAfterLastOccurrence?[e._v(e._s(e.$getText("CALENDAR_ALERT_OCCURENCE_DATE_AFTER_LAST_OCCURRENCE")))]:e._e()],2)],1)],1):e._e()],1),e._v(" "),n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("b-row",[e.canEditRepeatingPattern?n("b-col",{attrs:{cols:"12"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_REPEAT")))]),e._v(" "),e.eventForm.repeating?n("aula-select",{class:e.showMissingSeriesEventAlert?"red-border":"",attrs:{id:"repeatEvent",disabled:e.isEditMode&&null==e.eventForm.repeating||e.hasLimitedEditRight},on:{change:e.onRepeatingPatternChange},model:{value:e.eventForm.repeating.pattern,callback:function(t){e.$set(e.eventForm.repeating,"pattern",t)},expression:"eventForm.repeating.pattern"}},[e._l(e.eventRepeatPatterns,(function(t){return[t.id?n("aula-option",{key:t.id,attrs:{disabled:e.isEditMode&&t.id===e.repeatingEventPatternEnum.NEVER,label:t.label,value:t.id}},[n("div",[e._v(e._s(t.label))])]):e._e()]}))],2):e._e(),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingSeriesEventAlert}},[e._v("\n                "+e._s(e.$getText("CALENDAR_ALERT_EVENT_REPEAT"))+"\n              ")]),e._v(" "),n("div",{staticClass:"el-dialog-container"},[e.showSeriesEventForm?n("el-dialog",{attrs:{title:e.seriesEventTitle,visible:e.showSeriesEventForm,modal:e.showModal=!1,width:e.seriesEventFormWidth,"show-close":e.showClose=!1,"lock-scroll":!0,"close-on-click-modal":!1,top:"0vh"},on:{"update:visible":function(t){e.showSeriesEventForm=t}}},[n("div",{staticClass:"series_form"},[n("div",{staticClass:"form-inline"},[e._v("\n                      "+e._s(e.$getText("CALENDAR_LABEL_EVENT_START_LOWER"))+"\n                      "),n("el-date-picker",{staticClass:"maxDatePicker",class:{"red-border":e.showMissingStartDateAlert,elPickerActive:e.isStartDateClicked},attrs:{id:"startDate",format:e.$parent.defaultDateFormat,"value-format":e.$parent.defaultDateValueFormat,type:"date","aria-label":e.$getText("ARIA_LABEL_CALENDAR_START_DATE"),placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE"),clearable:!1,"picker-options":{firstDayOfWeek:1}},on:{input:function(t){e.showMissingStartDateAlert=!1},change:e.checkForExistingResourcesWhenChangingDateTime,focus:function(t){return e.datePickerModifier()}},model:{value:e.startDate,callback:function(t){e.startDate=t},expression:"startDate"}})],1),e._v(" "),e.eventForm.repeating.pattern===e.repeatingEventPatternEnum.DAILY?[n("div",{staticClass:"form-inline"},[e._v("\n                        "+e._s(e.$getText("CALENDAR_LABEL_EVENT_REPEAT_EACH"))+"\n                        "),n("b-form-input",{directives:[{name:"numeric",rawName:"v-numeric"}
1],staticClass:"text_inline",class:e.isClickedOK&&e.invalidDailyInterval?"red-border":"",attrs:{id:"daily.interval","aria-describedby":"daily.intervalFeedback"},on:{change:e.checkForExistingResourcesWhenChangingDateTime},model:{value:e.daily.interval,callback:function(t){e.$set(e.daily,"interval",t)},expression:"daily.interval"}}),e._v("\n                        "+e._s(e.$getText("DATETIME_DAY"))+"\n                      ")],1),e._v(" "),n("div",{staticClass:"form-inline"},[e._v("\n                        "+e._s(e.$getText("CALENDAR_LABEL_EVENT_REPEAT_END_AFTER"))+"\n                        "),n("b-form-input",{directives:[{name:"numeric",rawName:"v-numeric"}],staticClass:"text_inline",class:e.isClickedOK&&e.invalidDailyoccurenceLimit?"red-border":"",attrs:{id:"daily.occurenceLimit",disabled:e.selectedMaxDate||e.eventNeverEnd,"aria-describedby":"daily.occurenceLimitFeedback"},on:{change:e.checkForExistingResourcesWhenChangingDateTime},model:{value:e.daily.occurenceLimit,callback:function(t){e.$set(e.daily,"occurenceLimit",t)},expression:"daily.occurenceLimit"}}),e._v("\n                        "+e._s(e.$getText("CALENDAR_LABEL_EVENT_REPEAT_REPETITION"))+"\n                        "+e._s(e.$getText("OR"))+"\n                      ")],1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.isClickedOK&&(e.invalidDailyInterval||e.invalidDailyoccurenceLimit)}},[e._v("\n                        "+e._s(e.daily.occurenceLimit>2e3?e.$getText("CALENDAR_ALERT_EVENT_REPEAT_OCCURENCE_MAX"):e.$getText("CALENDAR_ALERT_EVENT_REPEAT"))+"\n                      ")])]:e._e(),e._v(" "),e.eventForm.repeating.pattern===e.repeatingEventPatternEnum.WEEKLY?[n("b-form-checkbox-group",{staticClass:"margin-bottom",class:e.isClickedOK&&e.invalidWeeklyWeekdayMask?"red-border":"",attrs:{id:"checkboxes2",name:"flavour2"},on:{change:e.checkForExistingResourcesWhenChangingDateTime},model:{value:e.weekly.weekdayMask,callback:function(t){e.$set(e.weekly,"weekdayMask",t)},expression:"weekly.weekdayMask"}},[n("b-row",[n("b-col",{attrs:{cols:"6"}},[n("b-form-checkbox",{attrs:{value:e.weekdayEnum.MONDAY}},[e._v("\n                              "+e._s(e.$getText("DATETIME_MONDAY"))+"\n                            ")]),e._v(" "),n("b-form-checkbox",{attrs:{value:e.weekdayEnum.TUESDAY}},[e._v("\n                              "+e._s(e.$getText("DATETIME_TUESDAY"))+"\n                            ")]),e._v(" "),n("b-form-checkbox",{attrs:{value:e.weekdayEnum.WEDNESDAY}},[e._v("\n                              "+e._s(e.$getText("DATETIME_WEDNESDAY"))+"\n                            ")]),e._v(" "),n("b-form-checkbox",{attrs:{value:e.weekdayEnum.THURSDAY}},[e._v("\n                              "+e._s(e.$getText("DATETIME_THURSDAY"))+"\n                            ")])],1),e._v(" "),n("b-col",{attrs:{cols:"6"}},[n("b-form-checkbox",{attrs:{value:e.weekdayEnum.FRIDAY}},[e._v("\n                              "+e._s(e.$getText("DATETIME_FRIDAY"))+"\n                            ")]),e._v(" "),n("b-form-checkbox",{attrs:{value:e.weekdayEnum.SATURDAY}},[e._v("\n                              "+e._s(e.$getText("DATETIME_SATURDAY"))+"\n                            ")]),e._v(" "),n("b-form-checkbox",{attrs:{value:e.weekdayEnum.SUNDAY}},[e._v("\n                              "+e._s(e.$getText("DATETIME_SUNDAY"))+"\n                            ")])],1)],1)],1),e._v(" "),n("div",{staticClass:"form-inline"},[e._v("\n                        "+e._s(e.$getText("CALENDAR_LABEL_EVENT_REPEAT_END_AFTER"))+"\n                        "),n("b-form-input",{staticClass:"text_inline",class:e.isClickedOK&&e.invalidWeeklyOccurenceLimit?"red-border":"",attrs:{id:"weekly.occurenceLimit",disabled:e.selectedMaxDate||e.eventNeverEnd},on:{change:e.checkForExistingResourcesWhenChangingDateTime},model:{value:e.weekly.occurenceLimit,callback:function(t){e.$set(e.weekly,"occurenceLimit",t)},expression:"weekly.occurenceLimit"}}),e._v("\n                        "+e._s(e.$getText("DATETIME_WEEK"))+"\n                        "+e._s(e.$getText("OR"))+"\n                      ")],1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.isClickedOK&&e.invali
1dWeeklyOccurenceLimit}},[e._v("\n                        "+e._s(e.weekly.occurenceLimit>2e3?e.$getText("CALENDAR_ALERT_EVENT_REPEAT_OCCURENCE_MAX"):e.$getText("CALENDAR_ALERT_EVENT_REPEAT"))+"\n                      ")])]:e._e(),e._v(" "),e.eventForm.repeating.pattern===e.repeatingEventPatternEnum.MONTHLY?[n("div",{staticClass:"form-inline"},[e._v("\n                        "+e._s(e.$getText("CALENDAR_LABEL_EVENT_REPEAT_END_AFTER"))+"\n                        "),n("b-form-input",{staticClass:"text_inline",class:e.isClickedOK&&e.invalidMonthlyOccurenceLimit?"red-border":"",attrs:{id:"monthly.occurenceLimit",disabled:e.selectedMaxDate||e.eventNeverEnd},on:{change:e.checkForExistingResourcesWhenChangingDateTime},model:{value:e.monthly.occurenceLimit,callback:function(t){e.$set(e.monthly,"occurenceLimit",t)},expression:"monthly.occurenceLimit"}}),e._v("\n                        "+e._s(e.$getText("CALENDAR_LABEL_EVENT_REPEAT_REPETITION"))+"\n                        "+e._s(e.$getText("OR"))+"\n                      ")],1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.isClickedOK&&e.invalidMonthlyOccurenceLimit}},[e._v("\n                        "+e._s(e.monthly.occurenceLimit>2e3?e.$getText("CALENDAR_ALERT_EVENT_REPEAT_OCCURENCE_MAX"):e.$getText("CALENDAR_ALERT_EVENT_REPEAT"))+"\n                      ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showAlertOutOfMonthlyDate}},[e._v("\n                        "+e._s(e.$getText("CALENDAR_ALERT_SERIES_MONTHLY_END_DATE_OF_MONTH"))+"\n                      ")])]:e._e(),e._v(" "),n("div",{staticClass:"form-inline"},[e._v("\n                      "+e._s(e.$getText("CALENDAR_LABEL_EVENT_REPEAT_END_ON_DATE"))+"\n                      "),n("el-date-picker",{staticClass:"maxDatePicker",class:{elPickerActive:e.isMaxDateClicked},attrs:{id:"maxDate","prefix-icon":"false",disabled:e.enterOccurenceLimit||e.eventNeverEnd,format:e.$parent.defaultDateFormat,"value-format":e.$parent.defaultDateValueFormat,type:"date",placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE"),"picker-options":e.recurringDatePickerOptions},on:{change:function(t){e.selectMaxDate(),e.checkForExistingResourcesWhenChangingDateTime()},focus:function(t){e.datePickerModifier(),e.isMaxDateClicked=!0},blur:function(t){e.isMaxDateClicked=!1}},model:{value:e.eventForm.repeating.maxDate,callback:function(t){e.$set(e.eventForm.repeating,"maxDate",t)},expression:"eventForm.repeating.maxDate"}})],1),e._v(" "),n("div",{staticClass:"margin-top"},[n("b-form-checkbox",{attrs:{id:"eventNeverEnd"},on:{change:e.checkForExistingResourcesWhenChangingDateTime},model:{value:e.eventNeverEnd,callback:function(t){e.eventNeverEnd=t},expression:"eventNeverEnd"}},[e._v("\n                        "+e._s(e.$getText("CALENDAR_LABEL_SERIES_EVENT_NEVER_END"))+"\n                      ")])],1)],2),e._v(" "),n("hr",{staticClass:"line"}),e._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("b-button",{staticClass:"mr-4",attrs:{variant:"link"},on:{click:function(t){return e.closeRepeatingDialog()}}},[e._v("\n                      "+e._s(e.$getText("CANCEL"))+"\n                    ")]),e._v(" "),n("b-button",{staticClass:"send-btn",attrs:{variant:"primary"},on:{click:function(t){return e.parseRepeatingEventData()}}},[e._v("\n                      "+e._s(e.$getText("OK"))+"\n                    ")])],1)]):e._e()],1)],1):e._e(),e._v(" "),e.isVisibleRepeatingPattern?n("b-col",{attrs:{cols:"12"}},[n("div",{staticClass:"repeating-pattern"},[n("p",{staticClass:"m-0"},[e._v(e._s(e.repeatingPattern))])])]):e._e()],1),e._v(" "),e.canEditDeadline?n("b-row",[n("b-col",{attrs:{cols:"12"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_REQUEST_DEADLINE")))]),e._v(" "),n("el-date-picker",{attrs:{id:"deadline-date",format:e.$parent.defaultDateFormat,"value-format":e.$parent.defaultDateValueFormat,type:"date","aria-label":e.$getText("ARIA_LABEL_CALENDAR_START_DATE"),placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE"),"picker-options":e.deadlinePickerOptions,disabled:e.hasLimitedEditRight||e.isResponseDeadlineDisabled},on:{change:function(t){e.showInvalidDeadlineAlert=!1},focus:function(t){return e.datePickerModifier()}},model:{value:e.eventForm.responseDeadline,callback:function(t){e.$set(e.eventForm,"responseDeadline",t)},expression:"eventForm.responseDeadline"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showInvalidDeadlineAlert}},[e._v("\n                "+e._s(e.$getText("CALENDAR_LABEL_EVENT_INVALID_DEADLINE"))+"\n              ")])],1)],1):e._e(
1)],1)],1),e._v(" "),n("hr",{staticClass:"line mb-0"}),e._v(" "),e.eventForm.type===e.eventTypes.LESSON?n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_PRIMARY_LOCATION")))]),e._v(" "),n("b-input",{attrs:{value:e.primaryResourceText,disabled:""}})],1)],1):e._e(),e._v(" "),n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_LOCATIONS")))]),e._v(" "),n("AulaInfoTrigger",{staticClass:"ml-2",attrs:{area:"ROOM"}}),e._v(" "),n("b-input-group",{staticClass:"search-module"},[n("aula-search",{staticStyle:{width:"100%"},attrs:{"search-result-loader":e.searchLocations,results:e.locationSearchResults,"existing-participants":e.existingLocations,"close-dropdown-after-select":!1,"select-all":!1,multiple:!0,"placeholder-textkey":"CALENDAR_LABEL_EVENT_PLACEHOLDER_PLACE",disabled:e.showSeriesEventForm,"css-class":"wraptext","reset-search-input":e.resetPrimaryResources,"popper-class":"resource-search"},on:{emitFocus:function(t){return e.searchLocations("")},emitSelected:e.updateLocations},scopedSlots:e._u([{key:"optionContent",fn:function(t){return[n("div",{staticClass:"resource-container"},[n("div",{staticClass:"resource-label",domProps:{innerHTML:e._s(t.label)}}),e._v(" "),e.getIsResourceFullyAvailable(t)?n("div",{staticClass:"resource-availability text-grey"},[e._v("\n                    "+e._s(e.$getText("CALENDAR_AVAILABLE"))+"\n                  ")]):n("div",{staticClass:"resource-availability text-alert"},[e._v("\n                    "+e._s(e.$getText("CALENDAR_AVAILABLE_PARTIALLY",{available:t.numberOfAvailableOccurrences,occurrences:t.numberOfOccurrences}))+"\n                  ")])])]}}])}),e._v(" "),n("b-input-group-addon",[n("i",{staticClass:"icon-Aula_search input-group-search-addon"})])],1),e._v(" "),n("ul",{staticClass:"partially-available-resource-list"},e._l(e.partiallyAvailableLocations,(function(t){return n("li",{key:t.id},[e._v("\n              "+e._s(e.$getText("CALENDAR_AVAILABLE_PARTIALLY_DESCRIPTION_1",{resource:t.label}))+"\n              "),n("strong",[e._v("\n                "+e._s(e.$getText("CALENDAR_AVAILABLE_PARTIALLY_DESCRIPTION_2",{available:t.numberOfAvailableOccurrences,occurrences:t.numberOfOccurrences}))+"\n              ")])])})),0)],1),e._v(" "),n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_MEETING_PLACE")))]),e._v(" "),n("b-input",{attrs:{maxlength:"255",placeholder:e.$getText("CALENDAR_LABEL_EVENT_MEETING_PLACE_PLACEHOLDER")},model:{value:e.eventForm.additionalResourceText,callback:function(t){e.$set(e.eventForm,"additionalResourceText",t)},expression:"eventForm.additionalResourceText"}})],1)],1),e._v(" "),n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_RESOURCES")))]),e._v(" "),e.canUsePlanningAssistant?n("AulaInfoTrigger",{staticClass:"ml-2",attrs:{area:"RESOURCE"}}):e._e(),e._v(" "),n("b-input-group",{staticClass:"search-module",staticStyle:{width:"100%"}},[n("aula-search",{staticStyle:{width:"100%"},attrs:{"search-result-loader":e.$parent.loadResourceSearchResults,results:e.resourceResults,"close-dropdown-after-select":!1,"existing-participants":e.existingResources,"enable-relatives-for-students":!1,"placeholder-textkey":"CALENDAR_LABEL_EVENT_RESOURCES_PLACEHOLDER",disabled:e.showSeriesEventForm,"reset-search-input":e.resetResources,"popper-class":"resource-search"},on:{emitFocus:function(t){return e.$parent.loadResourceSearchResults("")},emitSelected:e.addResourceToList},scopedSlots:e._u([{key:"optionContent",fn:function(t){return[n("div",{staticClass:"resource-container"},[n("div",{staticClass:"resource-label",domProps:{innerHTML:e._s(t.label)}}),e._v(" "),e.getIsResourceFullyAvailable(t)?n("div",{staticClass:"resource-availability text-grey"},[e._v("\n                    "+e._s(e.$getText("CALENDAR_AVAILABLE"))+"\n                  ")]):n("div",{staticClass:"resource-availability text-alert"},[e._v("\n                    "+e._s(e.$getText("CALENDAR_AVAILABLE_PARTIALLY",{available:t.numberOfAvailableOccurrences,occurrences:t.numberOfOccurrences}))+"\n                  ")])])]}}])}),e._v(" "),n("b-input-group-addon",[n("i",{staticClass:"icon-Aula_search input-group-search-addon"})])],1),e._v(" "),n("ul",{staticClass:"partially-available-resource-list"},e._l(e.partiallyAvailableResources,(function(t){return n("li",{key:t.id},[e._v("\n              "+e._s(e.$getText("CALENDAR_AVAILABLE_PARTIALLY_DESCRIPTION_1",{resource:t.label}))+"\n              "),n("strong",[e._v("\n                "+e._s(e.$getText("CALENDAR_AVAILABLE_PARTIALLY_DESCRIPTION_2",{available:t.numberOfAvailableOccurrences,occurrences:t.numberOfOccurrences}))+"\n              ")])])})),0)],1)],1),e._v(" "),e.canUsePlanningAssistant?n("b-btn",{staticClass:"planning-assistant-button d-flex py-1",attrs:{variant:"link",size:"sm",disabled:e.isPlanningAssistantDisabled,"data-color":"base"},on:{click:function(t){return e.$refs.planningAssistantModal.show()}}},[n("i",{staticClass:"icon icon-Aula_export",attrs:{"aria-hidden":"true"}}),e._v(" "),n("span",[e._v(e._s(e.$getText("PLANNING_ASSISTANT_BUTTON"))+" ")])]):e._e(
1)],2)],1),e._v(" "),e.eventForm.type===e.eventTypes.LESSON?[n("b-row",{staticClass:"form-margin-bottom"},[n("b-col",{attrs:{cols:"12"}},[n("hr",{staticClass:"line"}),e._v(" "),n("span",{staticClass:"note-label"},[e._v("\n          "+e._s(e.$getText("CALENDAR_LABEL_EVENT_MESSAGE_CLASS"))+"\n          "),n("AulaInfoTrigger",{staticClass:"ml-2",attrs:{area:"LESSON_NOTE_TO_CLASS"}})],1),e._v(" "),n("PluginTextEditor",{attrs:{id:"noteToClass","max-length":65535,draggable:!0,"placeholder-textkey":"MESSAGE_TYPING_PLACEHOLDER","institution-code":e.eventForm.institutionCode},model:{value:e.eventForm.lesson.noteToClass,callback:function(t){e.$set(e.eventForm.lesson,"noteToClass",t)},expression:"eventForm.lesson.noteToClass"}}),e._v(" "),n("upload",{ref:"uploaderFiles",staticClass:"upload",attrs:{"limit-file-upload":200,parent:e.parentTypes.CALENDAR,"selected-institution-code-for-filter":e.eventForm.institutionCode,"upload-from-filesharing":e.canAttachFromSecureFiles,"upload-from-my-computer":e.canCreateAttachments,"upload-from-one-drive":e.canCreateAttachments,"upload-from-google-drive":e.canCreateAttachments,"existing-media":e.existingAttachments,"institution-code-for-tagging":e.eventForm.institutionCode,"institution-code":e.eventForm.institutionCode},on:{mediaUpdated:e.filesChanged,attachSecureDocuments:e.attachSecureDocuments}})],1),e._v(" "),n("b-col",{attrs:{cols:"12"}},[n("hr",{staticClass:"line"}),e._v(" "),n("span",{staticClass:"note-label pt-1"},[e._v("\n          "+e._s(e.$getText("CALENDAR_LABEL_EVENT_MESSAGE_TEACHER"))+"\n        ")]),e._v(" "),n("PluginTextEditor",{attrs:{id:"noteToTeacher","max-length":65535,draggable:!0,"placeholder-textkey":"MESSAGE_TYPING_PLACEHOLDER","institution-code":e.eventForm.institutionCode},model:{value:e.eventForm.lesson.noteToTeacher,callback:function(t){e.$set(e.eventForm.lesson,"noteToTeacher",t)},expression:"eventForm.lesson.noteToTeacher"}})],1),e._v(" "),n("b-col",{attrs:{cols:"12"}},[n("hr",{staticClass:"line"}),e._v(" "),n("span",{staticClass:"note-label"},[e._v("\n          "+e._s(e.$getText("CALENDAR_LABEL_EVENT_MESSAGE_SUBSTITUTE"))+"\n          "),n("AulaInfoTrigger",{staticClass:"ml-2",attrs:{area:"LESSON_NOTE_TO_TEACHER"}})],1),e._v(" "),n("PluginTextEditor",{attrs:{id:"noteToSubstitute","max-length":65535,draggable:!0,"placeholder-textkey":"MESSAGE_TYPING_PLACEHOLDER","institution-code":e.eventForm.institutionCode},model:{value:e.eventForm.lesson.noteToSubstitute,callback:function(t){e.$set(e.eventForm.lesson,"noteToSubstitute",t)},expression:"eventForm.lesson.noteToSubstitute"}})],1)],1)]:e._e(),e._v(" "),n("b-row",{staticClass:"mb-2"},[e.eventForm.type!==e.eventTypes.LESSON?n("b-col",[n("hr",{staticClass:"line mb-0"}),e._v(" "),n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_DESCRIPTION")))]),e._v(" "),e.isLoadingDescription?e._e():n("PluginTextEditor",{ref:"eventContent",attrs:{id:e.editorId,"max-length":65535,"placeholder-textkey":"MESSAGE_TYPING_PLACEHOLDER","aria-label":"ARIA_LABEL_WRITE_EVENT_CONTENT",disabled:e.hasLimitedEditRight,"institution-code":e.eventForm.institutionCode},model:{value:e.eventForm.description,callback:function(t){e.$set(e.eventForm,"description",t)},expression:"eventForm.description"}})],1):e._e()],1),e._v(" "),e.eventForm.type!==e.eventTypes.LESSON?[e.isHandlingOthersEvent?n("div",[n("attachment-thumbnails",{attrs:{attachments:e.existingAttachments,parent:e.parentTypes.CALENDAR}}),e._v(" "),n("attachment-list",{attrs:{attachments:e.existingAttachments,"show-media":!0}})],1):n("upload",{ref:"uploaderFiles",staticClass:"upload",attrs:{"limit-file-upload":200,parent:e.parentTypes.CALENDAR,"selected-institution-code-for-filter":e.eventForm.institutionCode,"upload-from-filesharing":e.canAttachFromSecureFiles,"upload-from-my-computer":e.canCreateAttachments,"upload-from-one-drive":e.canCreateAttachments,"upload-from-google-drive":e.canCreateAttachments,"existing-media":e.existingAttachments,"institution-code-for-tagging":e.eventForm.institutionCode,"institution-code":e.eventForm.institutionCode},on:{mediaUpdated:e.filesChanged,attachSecureDocuments:e.attachSecureDocuments}})]:e._e(),e._v(" "),e.isSettingSectionVisible?[n("hr",{staticClass:"line mb-0"}),e._v(" "),n("label",{staticClass:"font-weight-bold"},[e._v(" "+e._s(e.$getText("CALENDAR_LABEL_EVENT_SETTINGS_FOR_SIMPLE_EVENT")))]),e._v(" "),e.isMobile?[n("div",{staticClass:"mobile-settings-section"},[e.profile.role===e.portalRoles.EMPLOYEE&&e.hasPermission(e.permissionEnum.INVITE_TO_EVENT)?n("div",{staticClass:"mobile-switch mb-4"},[n("div",[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_REQUEST_FOR_ANSWER")))]),e._v(" "),n("AulaInfoTrigger",{staticClass:"ml-2",attrs:{area:"SEND_NOTIFICATION"}})],1),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_LABEL_EVENT_REQUEST_FOR_ANSWER"),width:e.width=48,disabled:e.disableResponseRequire},model:{value:e.eventForm.responseRequired,callback:function(t){e.$set(e.eventForm,"responseRequired",t)},expression:"eventForm.responseRequired"}}
1)],1):e._e(),e._v(" "),e.eventForm.type===e.eventTypes.LESSON||e.isRepeatingOccurrence?e._e():n("div",{staticClass:"mobile-switch"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_PRIVATE")))]),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_LABEL_EVENT_PRIVATE"),width:e.width=48,disabled:e.hasLimitedEditRight},on:{input:function(t){return e.validatePrivateAndAddToInstCalendar()}},model:{value:e.eventForm.private,callback:function(t){e.$set(e.eventForm,"private",t)},expression:"eventForm.private"}})],1)]),e._v(" "),n("div",{staticClass:"mobile-settings-section"},[e.isRepeatingOccurrence?e._e():n("div",{staticClass:"d-flex flex-column mb-4"},[n("div",{staticClass:"mobile-switch"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_DEFINE_PARTICIPANT_SEATS")))]),e._v(" "),n("AulaSwitch",{staticClass:"pull-right",attrs:{value:e.simpleEventModel.maxParticipantsEnabled,"aria-label":e.$getText("CALENDAR_LABEL_EVENT_DEFINE_PARTICIPANT_SEATS"),disabled:e.hasLimitedEditRight||e.hasRepeatingPattern},on:{input:e.onChangeDefineParticipantSeats}})],1),e._v(" "),n("div",{staticClass:"d-flex flex-column"},[e.simpleEventModel.maxParticipantsEnabled&&!e.hasRepeatingPattern?n("b-form-input",{directives:[{name:"numeric",rawName:"v-numeric"}],staticClass:"mt-3",attrs:{placeholder:e.$getText("CALENDAR_LABEL_EVENT_WRITE_PARTICIPANT_SEATS"),value:e.simpleEventModel.maximumNumberOfParticipants,disabled:e.hasLimitedEditRight},on:{input:e.onInputMaximumNumberOfParticipants}}):e._e(),e._v(" "),n("b-alert",{staticClass:"mt-1 mb-0",attrs:{variant:"danger",show:!e.simpleEventModel.validator.isValidMaximumParticipants}},[e._v("\n              "+e._s(e.$getText("CALENDAR_ALERT_INVALID_MAXIMUM_PARTICIPANTS"))+"\n            ")]),e._v(" "),n("b-alert",{staticClass:"mt-1 mb-0",attrs:{variant:"danger",show:!e.simpleEventModel.validator.isMaximumParticipantsHigherThanActualParticipants}},[e._v("\n              "+e._s(e.$getText("CALENDAR_ALERT_TOO_FEW_MAXIMUM_PARTICIPANTS",{participants:e.simpleEventModel.actualNumberOfParticipants||""}))+"\n            ")])],1)]),e._v(" "),e.canShowRequestNumberOfParticipant?n("div",{staticClass:"mobile-switch"},[n("label",[e._v(" "+e._s(e.$getText("CALENDAR_LABEL_EVENT_PARTICIPANT_NUMBER_REQUIRED")))]),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_LABEL_EVENT_PARTICIPANT_NUMBER_REQUIRED"),width:e.width=48,disabled:!e.canRequestNumberOfParticipant},on:{input:e.onChangeRequestNumberOfParticipants},model:{value:e.simpleEventModel.doRequestNumberOfParticipants,callback:function(t){e.$set(e.simpleEventModel,"doRequestNumberOfParticipants",t)},expression:"simpleEventModel.doRequestNumberOfParticipants"}})],1):e._e()]),e._v(" "),n("div",{staticClass:"mobile-settings-section"},[e.canAddEventOnlyToInstitutionCalendar?n("div",{staticClass:"mobile-switch mb-3 mb-sm-4"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_ADD_ONLY_TO_INSTITUTION_CALENDAR"))+"\n            "),null!=e.delegatedContext.institutionCode&&null!=e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode}))?[e._v(e._s(e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode})).name)+"\n            ")]:null!=e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))?[e._v(e._s(e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode})).name)+"\n            ")]:e._e()],2),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_LABEL_EVENT_ADD_ONLY_TO_INSTITUTION_CALENDAR"),width:e.width=48,disabled:!e.canEditRequestForAnswer},on:{change:function(t){e.validatePrivateAndAddToInstCalendar(),e.validateHideInOwnCalendar()}},model:{value:e.eventForm.hideInOwnCalendar,callback:function(t){e.$set(e.eventForm,"hideInOwnCalendar",t)},expression:"eventForm.hideInOwnCalendar"}})],1):e._e(),e._v(" "),e.canAddEventToInstitutionCalendar?n("div",{staticClass:"mobile-switch"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_ADD_TO_INSTITUTION_CALENDAR"))+"\n            "),null!=e.delegatedContext.institutionCode&&null!=e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode}))?[e._v(e._s(e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode})).name)+"\n            ")]:null!=e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))?[e._v(e._s(e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}
1)).name)+"\n            ")]:e._e()],2),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_LABEL_EVENT_ADD_TO_INSTITUTION_CALENDAR"),width:e.width=48,disabled:!e.canEditRequestForAnswer},on:{change:function(t){e.validatePrivateAndAddToInstCalendar(),e.validateAddToInstitutionCalendar()}},model:{value:e.eventForm.addToInstitutionCalendar,callback:function(t){e.$set(e.eventForm,"addToInstitutionCalendar",t)},expression:"eventForm.addToInstitutionCalendar"}})],1):e._e()])]:n("div",[n("b-row",[e.profile.role===e.portalRoles.EMPLOYEE&&e.hasPermission(e.permissionEnum.INVITE_TO_EVENT)&&!e.isCoOrganizer?n("b-col",{attrs:{cols:"6"}},[n("div",{staticClass:"event-settings"},[n("b-form-checkbox",{attrs:{id:"responseRequired",disabled:e.disableResponseRequire},model:{value:e.eventForm.responseRequired,callback:function(t){e.$set(e.eventForm,"responseRequired",t)},expression:"eventForm.responseRequired"}},[e._v("\n              "+e._s(e.$getText("CALENDAR_LABEL_EVENT_REQUEST_FOR_ANSWER"))+"\n            ")]),e._v(" "),n("AulaInfoTrigger",{staticClass:"ml-2",attrs:{area:"SEND_NOTIFICATION"}})],1)]):e._e(),e._v(" "),e.canShowRequestNumberOfParticipant?n("b-col",{staticClass:"event-settings",attrs:{cols:"6"}},[n("b-form-checkbox",{attrs:{disabled:!e.canRequestNumberOfParticipant},on:{change:e.onChangeRequestNumberOfParticipants},model:{value:e.simpleEventModel.doRequestNumberOfParticipants,callback:function(t){e.$set(e.simpleEventModel,"doRequestNumberOfParticipants",t)},expression:"simpleEventModel.doRequestNumberOfParticipants"}},[e._v("\n            "+e._s(e.$getText("CALENDAR_LABEL_EVENT_PARTICIPANT_NUMBER_REQUIRED"))+"\n          ")])],1):e._e(),e._v(" "),e.eventForm.type===e.eventTypes.LESSON||e.isRepeatingOccurrence?e._e():n("b-col",{attrs:{cols:"6"}},[n("div",{staticClass:"event-settings"},[n("b-form-checkbox",{attrs:{id:"isPrivate",disabled:e.hasLimitedEditRight},on:{input:function(t){return e.validatePrivateAndAddToInstCalendar()}},model:{value:e.eventForm.private,callback:function(t){e.$set(e.eventForm,"private",t)},expression:"eventForm.private"}},[e._v("\n              "+e._s(e.$getText("CALENDAR_LABEL_EVENT_PRIVATE"))+"\n            ")])],1),e._v(" "),e.canAddEventOnlyToInstitutionCalendar?n("div",{staticClass:"event-settings"},[n("b-form-checkbox",{attrs:{disabled:!e.canEditRequestForAnswer},on:{change:function(t){e.validatePrivateAndAddToInstCalendar(),e.validateHideInOwnCalendar()}},model:{value:e.eventForm.hideInOwnCalendar,callback:function(t){e.$set(e.eventForm,"hideInOwnCalendar",t)},expression:"eventForm.hideInOwnCalendar"}},[e._v("\n              "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ADD_ONLY_TO_INSTITUTION_CALENDAR"))+"\n              "),null!=e.delegatedContext.institutionCode&&null!=e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode}))?[e._v("\n                "+e._s(e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode})).name)+"\n              ")]:null!=e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))?[e._v("\n                "+e._s(e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode})).name)+"\n              ")]:e._e()],2)],1):e._e(),e._v(" "),e.canAddEventToInstitutionCalendar?n("div",{staticClass:"event-settings"},[n("b-form-checkbox",{attrs:{disabled:!e.canEditRequestForAnswer},on:{change:function(t){e.validatePrivateAndAddToInstCalendar(),e.validateAddToInstitutionCalendar()}},model:{value:e.eventForm.addToInstitutionCalendar,callback:function(t){e.$set(e.eventForm,"addToInstitutionCalendar",t)},expression:"eventForm.addToInstitutionCalendar"}},[e._v("\n              "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ADD_TO_INSTITUTION_CALENDAR"))+"\n              "),null!=e.delegatedContext.institutionCode&&null!=e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode}))?[e._v("\n                "+e._s(e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode})).name)+"\n              ")]:null!=e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))?[e._v("\n                "+e._s(e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}
1)).name)+"\n              ")]:e._e()],2)],1):e._e()]),e._v(" "),e.isRepeatingOccurrence?e._e():n("b-col",{attrs:{cols:"6"}},[n("div",[n("b-form-checkbox",{staticClass:"event-settings",attrs:{checked:e.simpleEventModel.maxParticipantsEnabled,disabled:e.hasLimitedEditRight||e.hasRepeatingPattern},on:{change:e.onChangeDefineParticipantSeats}},[e._v("\n              "+e._s(e.$getText("CALENDAR_LABEL_EVENT_DEFINE_PARTICIPANT_SEATS"))+"\n            ")]),e._v(" "),e.simpleEventModel.maxParticipantsEnabled&&!e.hasRepeatingPattern?n("div",{staticClass:"mt-2"},[n("b-form-input",{directives:[{name:"numeric",rawName:"v-numeric"}],attrs:{placeholder:e.$getText("CALENDAR_LABEL_EVENT_WRITE_PARTICIPANT_SEATS"),value:e.simpleEventModel.maximumNumberOfParticipants,disabled:e.hasLimitedEditRight},on:{input:e.onInputMaximumNumberOfParticipants}}),e._v(" "),n("b-alert",{staticClass:"mt-1",attrs:{variant:"danger",show:!e.simpleEventModel.validator.isValidMaximumParticipants}},[e._v("\n                "+e._s(e.$getText("CALENDAR_ALERT_INVALID_MAXIMUM_PARTICIPANTS"))+"\n              ")]),e._v(" "),n("b-alert",{staticClass:"mt-1",attrs:{variant:"danger",show:!e.simpleEventModel.validator.isMaximumParticipantsHigherThanActualParticipants}},[e._v("\n                "+e._s(e.$getText("CALENDAR_ALERT_TOO_FEW_MAXIMUM_PARTICIPANTS",{participants:e.simpleEventModel.actualNumberOfParticipants||""}))+"\n              ")])],1):e._e()],1)])],1)],1)]:e._e(),e._v(" "),n("aula-form-footer",{attrs:{"is-loading":e.isLoading,"show-delete":e.isEditMode&&e.eventForm.type!==e.eventTypes.LESSON&&e.eventForm.type!==e.eventTypes.PRESENCE_HOLIDAY,"show-line":!1,"submit-text":e.isEditMode?"BUTTON_SAVE":"BUTTON_CREATE","submit-disabled":e.sendDisabled||e.showSeriesEventForm},on:{deleteClicked:function(t){return e.$refs.deleteModal.show()},cancelClicked:function(t){return e.closeEventForm()},submitClicked:e.onSaveClicked}}),e._v(" "),n("aula-modal",{ref:"cancelModal",attrs:{"ok-text":"BUTTON_YES"},on:{cancelClicked:function(t){return e.$refs.cancelModal.hide()},okClicked:function(t){return e.cancelForm()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_CANCEL_INFO"))+" "),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_CANCEL_INFO_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"conflictingEventsModal",attrs:{"ok-text":"BUTTON_YES"},on:{cancelClicked:function(t){return e.$refs.conflictingEventsModal.hide()},okClicked:function(t){e.handleOkDialogConflict(),e.$refs.conflictingEventsModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_CONFLICTINT_INVITEES"))),n("br"),n("br"),e._v(" "),e._l(e.conflictingAttendees,(function(t,i){return[e._v("\n      "+e._s(e.$getProfileDisplayName(t))),n("br",{key:i})]})),e._v(" "),n("br"),e._v(e._s(e.$getText("CALENDAR_ALERT_CONFLICTINT_CONFIRM"))),n("br")],2),e._v(" "),n("aula-modal",{ref:"deleteModal",attrs:{"is-loading":e.isLoading},on:{cancelClicked:function(t){return e.$refs.deleteModal.hide()},okClicked:function(t){return e.$parent.removeEvent(e.activeEvent,e.$route.query.occurrence)}}},[e.isHandlingOthersEvent?[e._v("\n      "+e._s(e.$getText("CALENDAR_DELETE_OTHERS_EVENT_WARNING_1"))),n("br"),e._v("\n      "+e._s(e.$getText("CALENDAR_DELETE_OTHERS_EVENT_WARNING_2"))+"\n    ")]:[e._v("\n      "+e._s(e.$getText("CALENDAR_DELETE_EVENT_TEXT"))+"\n    ")]],2),e._v(" "),n("aula-modal",{ref:"editOthersEventWarningModal",on:{cancelClicked:function(t){return e.$refs.editOthersEventWarningModal.hide()},okClicked:e.onConfirmEditOthersEvent}},[e._v("\n    "+e._s(e.$getText("CALENDAR_EDIT_OTHERS_EVENT_WARNING_1"))),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_EDIT_OTHERS_EVENT_WARNING_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"editRepeatingSeriesWarningModal",on:{cancelClicked:function(t){return e.$refs.editRepeatingSeriesWarningModal.hide()},okClicked:e.onConfirmEditRepeatingSeries}},[e._v("\n    "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_SERIES_WARNING_1"))),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_SAVE_EVENT_CONFIRMATION"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"blockedCommunicationModal",attrs:{"header-text":"CALENDAR_BLOCK_COMMUNICATION_TITLE","show-cancel":!1},on:{okClicked:function(t){return e.$refs.blockedCommunicationModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_BLOCK_COMMUNICATION_BODY"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"removeResourcesWhenChangingAllDayModal",attrs:{"ok-text":"BUTTON_YES","disable-close":!0},on:{okClicked:function(t){e.$refs.removeResourcesWhenChangingAllDayModal.hide(),e.removeResources()},cancelClicked:function(t){e.$refs.removeResourcesWhenChangingAllDayModal.hide(),e.resetAllDay()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_REMOVE_RESOURCES_WHEN_CHANGING_DATE_TIME"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"removeResourcesWhenChangingDateTimeModal",attrs:{"ok-text":"BUTTON_YES","disable-close":!0},on:{okClicked:function(t){e.$refs.removeResourcesWhenChangingDateTimeModal.hide(),e.removeResources()},cancelClicked:function(t){e.$refs.removeResourcesWhenChangingDateTimeModal.hide(),e.resetDateTime()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_REMOVE_RESOURCES_WHEN_CHANGING_DATE_TIME"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"bothPrivateAndAddedToInstCalendarModal",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.bothPrivateAndAddedToInstCalendarModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_BOTH_PRIVATE_AND_ADDED_TO_INST_CALENDAR"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"tooManyRecipientsModal",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.tooManyRecipientsModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_TOO_MANY_RECIPIENTS"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"theCommunicationChannelIsBlocked",attrs:{"header-text":"MESSAGE_WARNING_HEADER","ok-text":"BUTTON_YES","cancel-text":"NO"},on:{cancelClicked:function(t){return e.$refs.theCommunicationChannelIsBlocked.hide()},okClicked:function(t){e.$refs.theCommunicationChannelIsBlocked.hide(),e.removeBlocked()}}},[e._v("\n    "+e._s(e.$getText("WARNING_THE_COMMUNICATION_CHANNEL_IS_BLOCKED_USERS"))+"\n    "),n("div",{staticClass:"mt-2"}
1,[e._v("\n      "+e._s(e.blockedRecipientsString)+"\n    ")])]),e._v(" "),n("aula-modal",{ref:"removingCoOrganizerWarning",attrs:{"header-text":"MESSAGE_WARNING_HEADER","ok-text":"BUTTON_YES","cancel-text":"CANCEL"},on:{cancelClicked:e.cancelRemovalOfExistingOrganizer,okClicked:e.acceptRemovalOfExistingOrganizer}},[e._v("\n    "+e._s(e.$getText("CALENDAR_WARNING_REMOVE_ORGANIZER_FROM_SIMPLE_EVENT"))),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_WARNING_REMOVE_ORGANIZER_FROM_EVENT_CONFIRM"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"unavailableResourcesModal",attrs:{"disable-close":!0,"ok-text":"BUTTON_YES"},on:{cancelClicked:function(t){e.$refs.unavailableResourcesModal.hide(),e.removeUnavailableResources()},okClicked:function(t){e.$refs.unavailableResourcesModal.hide(),e.removeUnavailableResources(!0)}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_UNAVAILABLE_RESOURCES_1"))+" ("+e._s(e.unavailableResources.map((function(e){return e.name})).join(", "))+")\n    "+e._s(e.$getText("CALENDAR_ALERT_UNAVAILABLE_RESOURCES_2"))),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_UNAVAILABLE_RESOURCES_3"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"cannotMoveRepeatingEventToExistingRepetitionWarningModal",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.cannotMoveRepeatingEventToExistingRepetitionWarningModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_REPEATING_EVENT_CANNOT_MOVE_TO_EXISTING_REPETITION"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"partiallyAvailableResourcesWarning",on:{cancelClicked:function(t){return e.$refs.partiallyAvailableResourcesWarning.hide()},okClicked:e.onConfirmPartiallyAvailableResources}},[e._v("\n    "+e._s(e.$getText("CALENDAR_PARTIALLY_AVAILABLE_RESOURCES_WARNING"))),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_SAVE_EVENT_CONFIRMATION"))+"\n  ")]),e._v(" "),n("planning-assistant",{ref:"planningAssistantModal",attrs:{"event-form":e.eventForm,parent:e.parent,"show-invitees":!e.isHandlingOthersEvent,"can-invite-invitees":!e.isHandlingOthersEvent&&!e.isCommunicationBlock,"can-edit-time":!(e.eventForm.allDay||e.hasLimitedEditRight),locations:e.selectedLocations},on:{resetEventForm:e.resetEventFormFromPlanningAssistant,updateLocations:e.updateLocationsFromPlanningAssistant,updateResources:e.updateResourcesFromPlanningAssistant,updateInvitees:e.updateInviteesFromPlanningAssistant,updateStartTime:e.updateStartTimeFromPlanningAssistant,updateEndTime:e.updateEndTimeFromPlanningAssistant,updateStartDate:e.updateStartDateFromPlanningAssistant}}),e._v(" "),n("toastr",{ref:"externalRecipientsToastr",attrs:{variant:"warning","icon-font-size":"1em","circle-background":"white"}},[e._v("\n    "+e._s(e.$getText("MESSAGE_ADD_RECIPIENTS_EXTERNAL"))+"\n  ")]),e._v(" "),n("div",{ref:"clickLayer",staticClass:"clickLayer",on:{click:function(t){return e.setLayer(!1)}}})],2)}),[],!1,null,"dbfe4678",null).exports,Ke=n(127),Qe=n(516),Je=n.n(Qe),Ze=n(75),Xe=n.n(Ze);function et(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?nt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var st={components:{AulaInfoTrigger:We.a,AulaAlert:we.a,AttachmentList:Te.a,AttachmentThumbnails:Ae.a,editor:Ke.a,upload:H.a,AulaSearchRecipients:T.a,AulaTimepicker:j.a},inject:{getIsCreator:S.a.isCurrentEventCreator,getIsCoOrganizer:S.a.isCurrentEventCoOrganizer,getCanHandleOthersEvents:{from:S.a.canHandleOthersEvents,default:function(){return function(){return!1}}},loadEventLocations:S.a.loadEventLocations},props:{parent:{type:String,default:E.a.PROFILE},canEditCoOrganizers:{type:Boolean,default:!1}},data:function(){return{docTypes:A.a,emptyEventForm:{},resetRecipientsInput:!1,availableDeadlineDate:{},hiddenOrganizers:[],eventForm:{id:"",institutionCode:null,creatorInstProfileId:null,title:"",type:"",startDateTime:"",endDateTime:"",invitees:[],invitedGroups:[],invitedGroupIds:[],meetingDuration:null,meetingsBetweenBreaks:0,timeSlots:[],breakLength:0,childRequired:!1,addToInstitutionCalendar:!1,responseDeadline:null,hideInOwnCalendar:!1,description:"",attachments:[],oldStartDateTime:"",oldEndDateTime:"",numberOfParticipantsPerTimeSlot:null},addOnlyToInstitutionCalendar:!1,addToMineAndInstitutionCalendar:!1,eventType:"",isUploaded:!1,primaryResourceResults:[],existingOrganizers:[],tmpOrganizers:[],selectedOrganizers:[],existingPrimaryResources:[],existingInvitees:[],existingAttachments:[],institutionCode:null,isMeetingDateClicked:!1,timepickerSettings:G.a,permissionEnum:g.a,portalRoles:_.a,eventTypes:B.a,parentTypes:E.a,moduleTypes:W.a,groupTypes:k.a,meetingEventTypes:[],durations:[5,10,15,20,25,30,35,40,45,50,55,60],meetingTimes:[0,5,10,15,20,25,30,35,40,45,50,55,60],showMissingMembersAlert:!1,showMissingTitleAlert:!1,showTitleTooLongAlert:!1,showMissingMeetingDuration:!1,showInvalidDeadlineAlert:!1,isInviteeCoOrganizer:!1,isLoading:!1,isLoadingEdge:!0,resetResources:!1,instanceToReset:null,changedTimeSlot:null,clonedTimeSlots:[],hasExternalRecipient:!1,unavailableResources:[],isMissingTimeslots:!1,isAllowedMultipleParticipants:!1,isValidNumberOfParticipants:!0}},computed:it(it({},Object(m.c)({isMobile:p.a.GET_IS_MOBILE,institutions:p.a.GET_INSTITUTIONS,activeInstitutionCodes:p.a.GET_ACTIVE_INSTITUTIONS,hasPermission:p.a.HAS_PERMISSION,hasPermissionOnInstitution:p.a.HAS_PERMISSION_ON_INSTITUTION,group:p.a.GET_ACTIVE_GROUP,activeEvent:p.a.GET_CURRENT_EVENT,delegatedContext:p.a.GET_DELEGATED_CONTEXT,groupMemberships:p.a.GET_GROUP_MEMBERSHIPS_LIGHT,sameAuthorityInstitutions:p.a.GET_SAME_AUTHORITY_INSTITUTIONS,unavailableResourceIds:p.a.GET_UNAVAILABLE_RESOURCES,hasPermissionOnInstitutionGroup:p.a.HAS_PERMISSION_ON_INSTITUTION_GROUP})),{},{showTitleAlert:function(){return this.showMissingTitleAlert||this.showTitleTooLongAlert},userProfileStore:function(){return Object(N.a)()},profile:function(){return this.userProfileStore.institutionProfile},isProfileLoaded:function(){return!1===this.userProfileStore.isLoading},isDisabledInviteesSearch:function(){return!this.hasPermission(g.a.INVITE_TO_EVENT)||this.parent===E.a.GROUP||this.isHandlingOthersEvent},numberOfMeetingsPerPause:function(){return this.eventForm.meetingsBetweenBreaks||1/0},missingTimeslotAlert:function(){var e=this.eventForm.timeSlots.length>1,t=this.$getText("CALENDAR_MEETING");return 1!==this.numberOfSlotsMissing&&(t=this.$getText("CALENDAR_MEETINGS")),this.$getText("CALENDAR_WARNING_MISSING_TIMESLOT",{missingSlots:"".concat(this.numberOfSlotsMissing," ").concat(t),missingTime:this.formatSlotTime(this.missingTime,e)})},excessTimeslotAlert:function(){var e=this.$getText("CALENDAR_MEETING");return 1!==this.numberOfSlotsMissing&&(e=this.$getText("CALENDAR_MEETINGS")),this.$getText("CALENDAR_WARNING_EXCESS_TIMESLOT",{excessSlots:"".concat(this.numberOfSlotsExcess," ").concat(e),excessTime:this.formatSlotTime(this.excessTime,!0)})},isParentalMeeting:function(){return Ne.a.getIsParentalMeeting(this.eventForm.type)},invitedPartcipants:function(){var e=Je()(this.eventForm.invitees,this.existingInvitees,"id"),t=_.a.CHILD;return this.eventForm.type===B.a.PERFORMANCE_MEETING&&(t=_.a.EMPLOYEE),e.filter((function(e){return e.portalRole===t}))},meetingSections:function(){return this.eventForm.timeSlots.filter((function(e){return e.startTime&&e.endTime}))},numberOfSlotsSuggested:function(){var e=1;return this.isAllowedMultipleParticipants&&this.eventForm.numberOfParticipantsPerTimeSlot&&(e=this.eventForm.numberOfParticipantsPerTimeSlot),Math.ceil(this.invitedPartcipants.length/e)},numberOfSlotsAdded:function(){if(!this.eventForm.meetingDuration)return 0;var e,t=0,n=et(this.meetingSections);try{for(n.s();!(e=n.n()).done;){var i=e.value,s=Math.max(ee.k(i.startTime,i.endTime),0),a=0,r=this.numberOfMeetingsPerPause;do{r--,(a+=this.eventForm.meetingDuration)<=s&&t++,0===r&&(a+=this.eventForm.breakLength,r=this.numberOfMeetingsPerPause)}while(a<s)}}catch(e){n.e(e)}finally{n.f()}return t},suggestedTime:function(){return this.getDurationForSlots(this.numberOfSlotsSuggested)},missingTime:function(){if(!this.eventForm.meetingDuration)return 0;if(1===this.meetingSections.length&&1===this.eventForm.timeSlots.length){var e=this.meetingSections[0],t=Math.max(ee.k(e.startTime,e.endTime),0);return this.suggestedTime-t}return this.getDurationForSlots(this.numberOfSlotsMissing)},excessTime:function(){return this.getDurationForSlots(this.numberOfSlotsExcess)},numberOfSlotsMissing:function(){return Math.max(this.numberOfSlotsSuggested-this.numberOfSlotsAdded,0)},numberOfSlotsExcess:function(){return Math.max(this.numberOfSlotsAdded-this.numberOfSlotsSuggested,0)},canAddEventToInstitutionCalendar:function(){return this.profile.role===_.a.EMPLOYEE&&this.hasPermissionOnInstitution(g.a.CREATE_EVENTS_IN_INSTITUTION_CALENDAR,this.eventForm.institutionCode)&&!this.isCoOrganizer},canAddEventOnlyToInstitutionCalendar:function(){return this.profile.role===_.a.EMPLOYEE&&this.hasPermissionOnInstitution(g.a.CREATE_EVENTS_ONLY_IN_INSTITUTION_CALENDAR,this.eventForm.institutionCode)&&!this.isCoOrganizer},isSettingSectionVisible:function(){return this.canSetChildrenCalendar||this.canAddEventToInstitutionCalendar||this.canAddEventOnlyToInstitutionCalendar},canSetChildrenCalendar:function(){return this.eventForm.type!==B.a.PERFORMANCE_MEETING&&!this.isCoOrganizer},isCreator:function(){return this.getIsCreator()},isCoOrganizer:function(){return this.getIsCoOrganizer()},canHandleOthersEvents:function(){return this.getCanHandleOthersEvents()},isHandlingOthersEvent:function(){return this.canHandleOthersEvents&&this.isEditMode&&!this.isCreator&&!this.isCoOrganizer},isResponseDeadlineDisabled:function(){if(0===this.eventForm.timeSlots.length)return!1;var e=this.eventForm.timeSlots,t=e[e.length-1].startDate;return Object(ee.m)(new Date,t)},institutionsThatCanBeSeen:function(){var e=this,t=this.institutions;t=t.filter((function(e){return!e.communicationBlock}));var n=this.group;return null!=this.delegatedContext.institutionCode?t=t.filter((function(t){return t.institutionCode===e.delegatedContext.institutionCode})):this.parent===E.a.GROUP&&(t=Object(_e.a)(t,n).filter((function(t){var i=e.hasPermissionOnInstitutionGroup({permissionId:g.a.INVITE_TO_EVENT,institution:t,group:n}),s=e.hasPermissionOnInstitution(g.a.USE_GROUPS_AS_DISTRIBUTION_LISTS,t.institutionCode);return!(!i&&!s)&&(e.hasPermissionOnInstitution(g.a.HANDLE_PARENTAL_MEETING_DAYCARE,t.institutionCode)||e.hasPermissionOnInstitution(g.a.HANDLE_PARENTAL_MEETING_SCHOOL,t.institutionCode)||e.hasPermissionOnInstitution(g.a.HANDLE_PERFORMANCE_MEETING,t.institutionCode))}))),t},primaryResourceSearchResults:function(){for(var e=this,t=[],n=this.primaryResourceResults.length,i=function(n){var i,s,a=e.eventForm.timeSlots[n].primaryResource,r=null!==(i=e.primaryResourceResults[n])&&void 0!==i?i:[];if(a){var o,l=[],c=et(r);try{for(c.s();!(o=c.n()).done;){var u=o.value;l.push(it(it({},u),{},{options:u.options.filter((function(e){var t=e.id;return a.id!==t}))}))}}catch(e){c.e(e)}finally{c.f()}r=l}t.push(null!==(s=r)&&void 0!==s?s:[])},s=0;s<n;s++)i(s);return t},canSelectInstitutionInGroup:function(){var e;return this.parent===E.a.GROUP&&(null===(e=this.group.membershipInstitutions)||void 0===e?void 0:e.length)>1},apiPortalRoles:function(){return this.eventForm.type==B.a.SCHOOL_HOME_MEETING||this.eventForm.type==B.a.PARENTAL_MEETING?[_.a.CHILD]:this.eventForm.type==B.a.PERFORMANCE_MEETING?[_.a.EMPLOYEE]:[]},disabledPortalRolesWhenInviting:function(){return this.eventForm.type==B.a.SCHOOL_HOME_MEETING||this.eventForm.type==B.a.PARENTAL_MEETING?[_.a.EMPLOYEE,_.a.GUARDIAN,_.a.OTP]:this.eventForm.type==B.a.PERFORMANCE_MEETING?[_.a.CHILD,_.a.GUARDIAN,_.a.OTP]:[]},isEditMode:function(){return this.$route.path.includes("redigersamtale")},showTimeSlotHeader:function(){return this.eventForm.timeSlots.length>0},isEdited:function(){return this.eventForm.childRequired||this.eventForm.invitees.length>0||""!==this.eventForm.description||this.eventForm.attachments.length>0||this.isUploaded},shouldIncludeSelf:function(){return null!=this.delegatedContext.institutionProfileId}}),watch:{unavailableResourceIds:function(){Array.isArray(this.unavailableResourceIds)&&this.unavailableResourceIds.length>0&&this.showUnavailableResources()},numberOfSlotsAdded:function(e){e>0&&(this.isMissingTimeslots=!1)}},created:function(){var e=this;if(!this.isEditMode)var t=setInterval((function(){e.isProfileLoaded&&(e.setInstitutionCodeAndEventType(),clearInterval(t))}),100)},mounted:function(){if(this.resetForm(),this.isEditMode&&this.loadEditedEvent(),this.eventForm.timeSlots.length>0){var e=this.eventForm.timeSlots[0].date;this.availableDeadlineDate={disabledDate:function(t){return I()(t).isBefore(I()().subtract(1,"days"))||I()(t).isAfter(I()(e))},firstDayOfWeek:1}}this.emptyEventForm=$()(this.eventForm),this.isLoadingEdge=!1},methods:it(it(it({},Object(m.b)({createTimeSlotEvent:p.a.CREATE_TIMESLOT_EVENT,updateTimeSlotEvent:p.a.UPDATE_TIMESLOT_EVENT,createAttachments:p.a.CREATE_ATTACHMENTS,updateAttachments:p.a.UPDATE_ATTACHMENTS,loadGroupMemberships:p.a.LOAD_GROUP_MEMBERSHIPS_LIGHT,getEventById:p.a.GET_EVENT_BY_ID})),Object(m.d)({updateUnavailableResources:p.a.MUTATE_UNAVAILABLE_RESOURCES})),{},{getDurationForSlots:function(e){return e*this.eventForm.meetingDuration+Math.max(Math.ceil(e/this.numberOfMeetingsPerPause-1),0)*this.eventForm.breakLength},formatSlotTime:function(e,t){var n=Math.floor(e/60),i=e%60,s=this.$getText("CALENDAR_APPROXIMATE_TEXT"),a=this.$getText("CALENDAR_HOUR_UNIT"),r=this.$getText("CALENDAR_MINUTE_UNIT"),o=this.$getText("AND"),l="";return t&&(l+="".concat(s," ")),n>0&&(l+="".concat(n," ").concat(a," ").concat(o," ")),l+="".concat(i," ").concat(r)},searchLocations:function(e,t){var n=this;this.loadEventLocations(e,t).then((function(e){v.default.set(n.primaryResourceResults,t,e)}
1))},resetValidations:function(){this.showMissingMeetingDuration=!1,this.showMissingMembersAlert=!1},onUpdateChildRequired:function(){this.$forceUpdate()},changedAddToMineAndInstitutionCalendar:function(e){e&&this.addOnlyToInstitutionCalendar&&(this.addOnlyToInstitutionCalendar=!1)},changedAddToOnlyInstitutionCalendar:function(e){e&&this.addToMineAndInstitutionCalendar&&(this.addToMineAndInstitutionCalendar=!1)},closeEventForm:function(){q()(this.emptyEventForm,this.eventForm)?(this.resetForm(),this.parent===E.a.PROFILE?this.$router.push({path:"/kalender"}):this.$router.push({name:"group-calendar"})):this.$refs.cancelModal.show()},filesChanged:function(e){this.eventForm.attachments=e,this.existingAttachments=e},cancelForm:function(){this.resetForm(),this.$refs.cancelModal.hide(),this.parent===E.a.PROFILE?this.$router.push({path:"/kalender"}):this.$router.push({name:"group-calendar"})},checkForExistingResourcesWhenChangingDateTime:function(e){this.changedTimeSlot=e,null!=this.eventForm.timeSlots[e].primaryResource&&""!=this.eventForm.timeSlots[e].primaryResource&&Object.keys(this.eventForm.timeSlots[e].primaryResource).length>0?this.$refs.removeResourcesWhenChangingDateTimeModal.show():this.validateTimeSlot(e)},removeResources:function(){this.eventForm.timeSlots[this.changedTimeSlot].primaryResource="",this.$emit("savePrimaryLocation",{primaryLocation:null,index:this.changedTimeSlot}),this.instanceToReset=this.changedTimeSlot,this.resetResources=!this.resetResources,this.validateTimeSlot(this.changedTimeSlot),this.timeSlotDurationValidation(!1)},resetDateTime:function(){this.eventForm.timeSlots[this.changedTimeSlot].date=this.clonedTimeSlots[this.changedTimeSlot].date,this.eventForm.timeSlots[this.changedTimeSlot].startTime=this.clonedTimeSlots[this.changedTimeSlot].startTime,this.eventForm.timeSlots[this.changedTimeSlot].endTime=this.clonedTimeSlots[this.changedTimeSlot].endTime},isTheSameAuthorityInstitutions:function(e){return this.eventForm.institutionCode==e.institutionCode||!(0==this.sameAuthorityInstitutions.length||this.sameAuthorityInstitutions.length>0&&0==this.sameAuthorityInstitutions.filter((function(t){return t.institutionCode==e.institutionCode})).length)},addInvitees:function(e){var t=this;this.hasExternalRecipient=!1,e.length>0&&(this.showMissingMembersAlert=!1),e.length>2e3&&this.$refs.tooManyRecipientsModal.show();var n,i=[],s=[],a=et(e);try{var r=function(){var e=n.value;if("group"==e.type)s.push(e);else{if(!(t.eventForm.type!=B.a.SCHOOL_HOME_MEETING&&t.eventForm.type!=B.a.PARENTAL_MEETING||e.portalRole!=_.a.CHILD||null==e.relatedProfiles&&null==e.relations)){var a,r=et(null!=e.relatedProfiles?e.relatedProfiles:e.relations);try{var o=function(){var e=a.value;null==e.id||e.relationType!=_.a.GUARDIAN&&e.role!=_.a.GUARDIAN||0==i.filter((function(t){return t.id==e.id})).length&&i.push({label:t.$getProfileDisplayName(e),value:E.a.PROFILE+e.id,id:e.id,type:E.a.PROFILE})};for(r.s();!(a=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}0==i.filter((function(t){return t.id==e.id})).length&&i.push(e)}null!=e.institutionCode&&!1===t.hasExternalRecipient&&t.eventForm.institutionCode!==e.institutionCode&&(t.hasExternalRecipient=!t.isTheSameAuthorityInstitutions(e))};for(a.s();!(n=a.n()).done;)r()}catch(e){a.e(e)}finally{a.f()}this.hasExternalRecipient&&this.$refs.externalRecipientsToastr.show(),this.eventForm.invitees=i,this.eventForm.invitedGroups=s,this.checkInviteesNotCoOrganizers()},checkInviteesNotCoOrganizers:function(){if(this.eventForm.type===B.a.PERFORMANCE_MEETING){var e=this.eventForm.invitees.map((function(e){return e.id})),t=this.existingInvitees.map((function(e){return e.id})),n=e.concat(t),i=this.eventForm.coOrganizerIds||[],s=n.filter((function(e){return i.includes(e)}));this.isInviteeCoOrganizer=s.length>0}},onSelectOrganizers:function(e){this.tmpOrganizers=e,this.setOrganizers(e),this.checkInviteesNotCoOrganizers()},removeExistingOrganizer:function(e){if(1===this.existingOrganizers.filter((function(t){return t.id===e.id})).length)return this.selectedOrganizers=[].concat(r()(this.tmpOrganizers),[e]),void this.$refs.removingCoOrganizerWarning.show();this.selectedOrganizers=this.tmpOrganizers,this.setOrganizers(this.tmpOrganizers)},acceptRemovalOfExistingCoOrganizer:function(){var e,t=new Set,n=et(this.tmpOrganizers);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.add("".concat(i.profileId,",").concat(i.id))}}catch(e){n.e(e)}finally{n.f()}this.existingOrganizers=this.existingOrganizers.filter((function(e){return!0===t.has("".concat(e.profileId,",").concat(e.id))})),this.selectedOrganizers=this.tmpOrganizers,this.setOrganizers(this.tmpOrganizers),this.$refs.removingCoOrganizerWarning.hide()},cancelRemovalOfExistingOrganizer:function(){this.setOrganizers(this.selectedOrganizers),this.$refs.removingCoOrganizerWarning.hide()},setOrganizers:function(e){this.eventForm.coOrganizerIds=e.map((function(e){return e.id}))},resetForm:function(){this.eventForm.id="",this.eventForm.title="",this.eventForm.type="",this.eventForm.invitees=[],this.eventForm.invitedGroups=[],this.eventForm.invitedGroupIds=[],this.eventForm.resources=[],this.eventForm.attachments=[],this.existingPrimaryResources=[],this.existingInvitees=[],this.eventForm.responseRequired=!0,this.eventForm.description="",this.existingAttachments=[],this.existingOrganizers=[],this.emptyEventForm={},this.resetRecipientsInput=!this.resetRecipientsInput,this.$emit("savePrimaryLocation",{resetAll:!0}),this.resetTimeslots(),this.resetCoOrganizers()},resetCoOrganizers:function(){this.selectedOrganizers=[],this.setOrganizers([])},updateMeetingEventType:function(){var e=[],t=this.institutionCode,n=this.isEditMode;null!=t&&((this.hasPermissionOnInstitution(g.a.HANDLE_PARENTAL_MEETING_SCHOOL,t)||n)&&e.push({type:B.a.SCHOOL_HOME_MEETING,label:this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_sc
1hool_home_meeting")}),(this.hasPermissionOnInstitution(g.a.HANDLE_PARENTAL_MEETING_DAYCARE,t)||n)&&e.push({type:B.a.PARENTAL_MEETING,label:this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_parental_meeting")}),(this.hasPermissionOnInstitution(g.a.HANDLE_PERFORMANCE_MEETING,t)||n)&&e.push({type:B.a.PERFORMANCE_MEETING,label:this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_performance_meeting")}),this.meetingEventTypes=e)},buttonCancelSwitchInstitution:function(){this.eventForm.institutionCode=this.institutionCode,this.$refs.confirmSwitchInstitution.hide()},buttonConfirmSwitchInstitution:function(){this.institutionCode=this.eventForm.institutionCode,this.resetForm(),this.updateMeetingEventType(),this.meetingEventTypes.length>0&&this.changeEventType(this.meetingEventTypes[0].type),this.$refs.mediaUpload.removeUploadedMedia(),this.resetRecipientsInput=!this.resetRecipientsInput,this.$refs.confirmSwitchInstitution.hide()},changeMeetingDuration:function(){null!==this.eventForm.meetingDuration&&(this.showMissingMeetingDuration=!1)},existingLocation:function(e){return this.existingPrimaryResources[e]},changeEventType:function(e,t){e&&(this.eventForm.type=e,t&&(this.emptyEventForm.type=e)),this.eventType=this.eventForm.type,this.isAllowedMultipleParticipants=!1,this.eventForm.numberOfParticipantsPerTimeSlot=null,this.eventForm.title=this.$getText("CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_"+this.eventForm.type),t&&(this.emptyEventForm.title=this.eventForm.title),this.parent==E.a.GROUP&&this.inviteMembersFromGroup(),this.resetRecipientsInput=!this.resetRecipientsInput,this.resetValidations()},resetTimeslots:function(){this.eventForm.timeSlots=[{timeSlotIndex:Xe()(),date:"",startTime:"",endTime:"",primaryResource:"",showDateAlert:!1,showStartTimeAlert:!1,showEndTimeAlert:!1,showOverlapAlert:!1,showLocationAlert:!1,isEdit:!1}]},buttonConfirmChangeEventType:function(){this.eventForm.invitees=[],this.eventForm.childRequired=!1,this.eventForm.attachments=[],this.isInviteeCoOrganizer=!1,this.eventForm.description="",this.existingAttachments=[],this.primaryResourceResults=[],this.$refs.mediaUpload.reset(),this.$refs.confirmChangeEventTypeModal.hide(),this.changeEventType()},buttonCancelChangeEventType:function(){this.eventForm.type=this.eventType,this.$refs.confirmChangeEventTypeModal.hide()},checkOverlapTimeSlot:function(e,t,n){var i,s=!1,a=0,r=et(this.eventForm.timeSlots);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(a!=e&&""!=o.date&&""!=o.startTime&&""!=o.endTime){var l=I()(o.date+" "+o.startTime+":00"),c=I()(o.date+" "+o.endTime+":00");if(t.isSameOrAfter(l)&&t.isBefore(c)||n.isAfter(l)&&n.isSameOrBefore(c)||t.isSameOrBefore(l)&&n.isSameOrAfter(c)){s=!0;break}}a++}}catch(e){r.e(e)}finally{r.f()}return s},validateTimeSlot:function(e){var t=I()(),n=this.eventForm.timeSlots[e];if(n.startTime&&n.endTime){var i=I()(n.date+" "+n.startTime+":00"),s=I()(n.date+" "+n.endTime+":00");n.showStartTimeAlert=t.isSameOrAfter(i),this.eventForm.meetingDuration&&(n.showEndTimeAlert=s.diff(i,"minutes")<this.eventForm.meetingDuration),n.showStartTimeAlert||n.showEndTimeAlert||(n.showOverlapAlert=this.checkOverlapTimeSlot(e,i,s))}this.clonedTimeSlots=$()(this.eventForm.timeSlots);var a,r=this.eventForm.timeSlots[e].date,o=et(this.eventForm.timeSlots);try{for(o.s();!(a=o.n()).done;){var l=a.value;I()(l.date).isAfter(I()(r),"day")&&(r=l.date)}}catch(e){o.e(e)}finally{o.f()}this.availableDeadlineDate={disabledDate:function(e){return I()(e).isBefore(I()().subtract(1,"days"))||I()(e).isAfter(I()(r))},firstDayOfWeek:1},null!=this.eventForm.responseDeadline&&""!=this.eventForm.responseDeadline&&I()(this.eventForm.responseDeadline).isAfter(r,"day")&&(this.showInvalidDeadlineAlert=!0)},addTimeSlot:function(){if(this.primaryResourceResults.push([]),this.eventForm.timeSlots.push({timeSlotIndex:Xe()(),date:null,startTime:null,endTime:null,primaryResource:"",showDateAlert:!1,showStartTimeAlert:!1,showEndTimeAlert:!1,showOverlapAlert:!1,showLocationAlert:!1,isEdit:!1}),this.clonedTimeSlots=$()(this.eventForm.timeSlots),this.eventForm.timeSlots.length>0){var e=this.eventForm.timeSlots[0].date;this.availableDeadlineDate={disabledDate:function(t){return I()(t).isBefore(I()().subtract(1,"days"))||I()(t).isAfter(I()(e))},firstDayOfWeek:1}}},removeTimeSlot:function(e){var t=this.eventForm.timeSlots.map((function(e){return null!=e.primaryResource?e.primaryResource:e.primaryResourceText}));if(this.primaryResourceResults.splice(e,1),!this.eventForm.timeSlots[e].isEdit){this.eventForm.timeSlots.splice(e,1),this.existingPrimaryResources.splice(e,1),t.splice(e,1);for(var n=0;n<t.length;n++)null!=t[n]&&(null!=t[n].id?(t[n].label=t[n].name,t[n].value="resource"+t[n].id+t[n].institutionCode):(t[n].label=t[n],t[n].value=t[n]))}this.timeSlotDurationValidation()},addPrimaryResourceToList:function(e){var t=this;this.$nextTick((function(){var n=e.instance,i=e.selectedItems;i.length>0?(null!=i[0].id?t.eventForm.timeSlots[n].primaryResource=i[0]:t.eventForm.timeSlots[n].primaryResourceText=i[0],t.eventForm.timeSlots[n].showLocationAlert=!1):(t.eventForm.timeSlots[n].primaryResource=null,t.eventForm.timeSlots[n].primaryResourceText="")}))},validateSlot:function(e){var t=this.eventForm.meetingDuration||0,n=ee.n(e.startDate,ee.u());return e.showDateAlert=!ee.t(e.date),e.showStartTimeAlert=!ee.t(e.startTime,te.a.SHORT_TIME)||n&&!e.isEdit,e.showEndTimeAlert=!ee.t(e.endTime,te.a.SHORT_TIME)||ee.k(e.startTime,e.endTime)<t,!e.showDateAlert&&!e.showStartTimeAlert&&!e.showEndTimeAlert},validateTimeslotDate:function(e){var t=this.eventForm.timeSlots[e];t.showDateAlert=!ee.t(t.date),this.checkForExistingResourcesWhenChangingDateTime(e)},validateTimeslotStartTime:function(e){var t=this.eventForm.timeSlots[e];t.showStartTimeAlert=!ee.t(t.startTime,te.a.SHORT_TIME),this.checkForExistingResourcesWhenChangingDateTime(e)},validateTimeslotEndTime:function(e){var t=this.eventForm.timeSlots[e],n=this.eventForm.meetingDuration||0;t.showEndTimeAlert=!ee.t(t.endTime,te.a.SHORT_TIME)||ee.k(t.startTime,t.endTime)<n,this.checkForExistingResourcesWhenChangingDateTime(e)},timeSlotDurationValidation:function(e,t){var n,i="YYYY-MM-DDTHH:mm:ss.SSSSZ",s=!0,a=this.eventForm.timeSlots,r=et(a);try{for(r.s();!(n=r.n()).done;){var o=n.value,l=I()(o.date+" "+o.startTime+":00").format(i),c=I()(o.date+" "+o.endTime+":00").format(i);o.startDate=l,o.endDate=c;var u=this.validateSlot(o);o.isEdit||u||(s=!1),o.primaryResource||o.primaryResourceText||((o!==a[a.length-1]||t)&&(o.showLocationAlert=!0,document.getElementById("event-timeslots").scrollIntoView(!0)),s=!1)}}catch(e){r.e(e)}finally{r.f()}return a.length>0&&null!=a[a.length-1]&&(this.eventForm.endDateTime=I()(a[a.length-1].date+" "+a[a.length-1].endTime+":00").format("YYYY-MM-DDTHH:mm:ss.SSSSZ")),s},validateTitleInput:function(){this.showMissingTitleAlert=!1,this.showTitleTooLongAlert=this.eventForm.title.length>255},onSaveClicked:function(){!1!==this.validateEvent()&&(this.isHandlingOthersEvent?this.$refs.editOthersEventWarningModal.show():this.numberOfSlotsAdded===this.numberOfSlotsSuggested?this.saveEvent():this.$refs.suggestedTimeslotsWarning.show())},onConfirmEditOthersEvent:function(){this.$refs.editOthersEventWarningModal.hide(),this.saveEvent()},onConfirmCreateTimeslots:function(){this.$refs.suggestedTimeslotsWarning.hide(),this.saveEvent()},validateEvent:function(){var e=this,t=!0;if(this.isEditMode){var n,i=et(this.existingInvitees);try{var s=function(){var t=n.value;0==e.eventForm.invitees.filter((function(e){return e.id==t.id})).length&&e.eventForm.invitees.push(t)};for(i.s();!(n=i.n()).done;)s()}catch(e){i.e(e)}finally{i.f()}}this.isValidNumberOfParticipants=!this.isAllowedMultipleParticipants||Number.isInteger(this.eventForm.numberOfParticipantsPerTimeSlot)&&this.eventForm.numberOfParticipantsPerTimeSlot>1&&this.eventForm.numberOfParticipantsPerTimeSlot<11,this.isValidNumberOfParticipants||(t=!1),this.showMissingTitleAlert=!this.eventForm.title.trim(),this.showTitleTooLongAlert=this.eventForm.title.length>255,(this.showMissingTitleAlert||this.showTitleTooLongAlert)&&(this.$el.querySelector("#eventTitle").scrollIntoView(!0),t=!1),0===this.eventForm.invitees.length?(this.showMissingMembersAlert=!0,document.getElementById("search-invitees").scrollIntoView(!0),t=!1):this.eventForm.invitees.length>2e3?(this.$refs.tooManyRecipientsModal.show(),document.getElementById("eventInvitees").scrollIntoView(!0),t=!1):this.showMissingMembersAlert=!1;var a,r=0,o=et(this.eventForm.timeSlots);try{for(o.s();!(a=o.n()).done;){var l=a.value;if(l.startTime&&l.endTime){var c=I()(l.date+" "+l.startTime+":00"),u=I()(l.date+" "+l.endTime+":00");if(!l.isEdit&&this.checkOverlapTimeSlot(r,c,u)){l.showOverlapAlert=!0,t=!1;break}}r++}}catch(e){o.e(e)}finally{o.f()}if(null==this.eventForm.meetingDuration?(this.showMissingMeetingDuration=!0,document.getElementById("event-timeslots").scrollIntoView(!0),t=!1):this.showMissingMeetingDuration=!1,this.timeSlotDurationValidation(null,!0)||(t=!1),this.isInviteeCoOrganizer&&(t=!1),null!=this.eventForm.responseDeadline&&""!=this.eventForm.responseDeadline&&this.eventForm.timeSlots.length>0){var d,h=this.eventForm.timeSlots[0].date,m=et(this.eventForm.timeSlots);try{for(m.s();!(d=m.n()).done;){var p=d.value;I()(p.date).isAfter(I()(h),"day")&&(h=p.date)}}catch(e){m.e(e)}finally{m.f()}null!=this.eventForm.responseDeadline&&""!=this.eventForm.responseDeadline&&I()(this.eventForm.responseDeadline).isAfter(h,"day")&&(this.showInvalidDeadlineAlert=!0,document.getElementById("deadline-date").scrollIntoView(!0),t=!1)}return this.isMissingTimeslots=0===this.numberOfSlotsAdded,this.isMissingTimeslots&&(t=!1),t}
1,saveEvent:function(){this.prepareEventForm(),this.checkForAttachments()},checkForAttachments:function(){var e=this;this.isLoading=!0;var t=Ve.a.prepareAttachments(this.eventForm.attachments);if(t.existingMedia.length>0){var n=t.existingMedia.filter((function(e){return null!=e.media&&e.media.updated}));n.length>0&&this.updateAttachments({media:Be.a.prepareMedia(n)})}null!=t.media||null!=t.files||null!=t.links?(t.ownerInstitutionProfileId=this.institutions.find((function(t){return t.institutionCode==e.institutionCode})).institutionProfileId,t.institutionCode=this.institutions.find((function(t){return t.institutionCode==e.institutionCode})).institutionCode,this.createAttachments(t).then((function(n){var i=n.files.concat(n.links).concat(n.media).concat(t.existingMedia);e.eventForm.attachmentIds=i.map((function(e){return e.id})),e.isEditMode?e.updateTimeSlotEvent(e.eventForm).then((function(){e.resetForm(),e.$parent.updatedEvent()})).catch((function(){e.isLoading=!1})):e.createTimeSlotEvent(e.eventForm).then((function(){e.resetForm(),e.$parent.updatedEvent()})).catch((function(){e.isLoading=!1}))})).catch((function(){e.isLoading=!1}))):(this.eventForm.attachmentIds=t.existingMedia.map((function(e){return e.id})),this.isEditMode?this.updateTimeSlotEvent(this.eventForm).then((function(){e.resetForm(),e.$parent.updatedEvent()})).catch((function(){e.isLoading=!1})):this.createTimeSlotEvent(this.eventForm).then((function(){e.resetForm(),e.$parent.updatedEvent()})).catch((function(){e.isLoading=!1})))},prepareEventForm:function(){var e=this;if(this.isAllowedMultipleParticipants||(this.eventForm.numberOfParticipantsPerTimeSlot=null),this.isEditMode||(this.eventForm.creatorInstProfileId=this.delegatedContext.institutionProfileId?this.delegatedContext.institutionProfileId:this.institutions.find((function(t){return t.institutionCode==e.eventForm.institutionCode})).institutionProfileId),this.eventForm.inviteeIds=this.eventForm.invitees.map((function(e){return e.id})),null!=this.eventForm.invitedGroups){var t,n={},i=et(this.eventForm.invitedGroups);try{for(i.s();!(t=i.n()).done;){var s=t.value,a=(n[s.id]||{}).portalRoles||new Set,o=s.portalRole,l=+s.id;null!=o&&(a.add(o),n[l]={groupId:l,portalRoles:r()(a)})}}catch(e){i.e(e)}finally{i.f()}this.eventForm.inviteeGroups=Object.values(n)}this.eventForm.eventId=this.eventForm.id;var c,u=et(this.eventForm.timeSlots);try{for(u.s();!(c=u.n()).done;){var d=c.value;d.startDateTime=d.startDate,d.endDateTime=d.endDate,null!=d.primaryResource&&null!=d.primaryResource.id&&""!=d.primaryResource.id&&(d.primaryResourceId=d.primaryResource.id)}}catch(e){u.e(e)}finally{u.f()}this.eventForm.addToInstitutionCalendar=this.addOnlyToInstitutionCalendar||this.addToMineAndInstitutionCalendar,this.eventForm.hideInOwnCalendar=this.addOnlyToInstitutionCalendar},inviteMembersFromGroup:function(){var e=this,t=[];""!=this.eventForm.type&&(this.loadGroupMemberships({groupId:this.group.id}).then((function(){var n,i=e.eventForm.type===B.a.PERFORMANCE_MEETING,s=e.eventForm.type===B.a.SCHOOL_HOME_MEETING||e.eventForm.type===B.a.PARENTAL_MEETING,a=et(e.groupMemberships);try{for(a.s();!(n=a.n()).done;){var r,o=n.value,l=et(o.institutionProfiles);try{var c=function(){var n=r.value;if(e.institutions.some((function(e){return e.institutionProfileId===n.institutionProfileId})))return"continue";var a=!1;(i&&o.portalRole===_.a.EMPLOYEE||s&&o.portalRole===_.a.CHILD)&&(a=!0),a&&t.push({label:e.$getProfileDisplayName(n),name:e.$getProfileDisplayName(n),value:"profile"+n.institutionProfileId,id:n.institutionProfileId,portalRole:o.portalRole,type:"profile"})};for(l.s();!(r=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}}}catch(e){a.e(e)}finally{a.f()}})),this.existingInvitees=t,this.eventForm.invitees=t,this.eventForm.invitedGroups=[this.group],this.eventForm.invitedGroupIds=[this.group.id])},loadEditedEvent:function(){var e=this;return l()(h.a.mark((function t(){var n,i,s,a;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getEventById(e.$route.params);case 2:if(e.$route.params.eventId==e.activeEvent.id){e.eventForm=$()(e.activeEvent),e.eventForm.invitees=[],e.eventForm.inviteeGroups=[],e.hiddenOrganizers=[e.eventForm.creator],e.$set(e.eventForm,"timeSlots",e.eventForm.timeSlot.timeSlots),e.eventForm.breakLength=e.eventForm.timeSlot.breakLength,e.eventForm.childRequired=e.eventForm.timeSlot.childRequired,e.eventForm.meetingDuration=e.eventForm.timeSlot.meetingDuration,e.eventForm.meetingsBetweenBreaks=e.eventForm.timeSlot.meetingsBetweenBreaks,e.eventForm.addToInstitutionCalendar=e.activeEvent.addedToInstitutionCalendar,e.eventForm.numberOfParticipantsPerTimeSlot=e.activeEvent.timeSlot.numberOfParticipantsPerTimeSlot,e.eventForm.description=e.eventForm.description.html,e.isAllowedMultipleParticipants=null!=e.activeEvent.timeSlot.numberOfParticipantsPerTimeSlot,e.existingOrganizers=e.activeEvent.coOrganizers.map((function(e){return e.instProfile})),e.selectedOrganizers=r()(e.existingOrganizers),e.eventForm.coOrganizerIds=e.existingOrganizers.map((function(e){return e.id})),null==e.eventForm.description&&(e.eventForm.description=""),e.existingAttachments=e.activeEvent.attachments,e.eventForm.institutionCode=e.emptyEventForm.institutionCode=e.institutionCode=e.eventForm.creator.institutionCode,e.updateMeetingEventType(),e.meetingEventTypes.length>0&&""==e.eventForm.type&&e.changeEventType(e.meetingEventTypes[0].type,!0),n=0,i=et(e.eventForm.timeSlots);try{for(i.s();!(s=i.n()).done;)(a=s.value).date=I()(a.startDate).format(e.$parent.defaultDateValueFormat.toUpperCase()),a.startTime=I()(a.startDate).format("HH:mm"),a.endTime=I()(a.endDate).format("HH:mm"),a.isEdit=!0,a.showDateAlert=!1,a.showStartTimeAlert=!1,a.showEndTimeAlert=!1,a.showOverlapAlert=!1,null!=e.eventForm.timeSlots[n].primaryResource?e.existingPrimaryResources[n]=[{label:"".concat(a.primaryResource.name," (").concat(a.primaryResource.institutionName,")"),value:a.primaryResource.id,name:a.primaryResource.name}]:null!=a.primaryResourceText?e.existingPrimaryResources[n]=[{label:a.primaryResourceText,value:a.primaryResourceText,name:a.primaryResourceText}]:e.existingPrimaryResources[n]=[],e.$emit("savePrimaryLocation",{primaryLocation:e.eventForm.timeSlots[n].primaryResource,index:n}),n++}catch(e){i.e(e)}finally{i.f()}e.existingInvitees=e.activeEvent.invitees.map((function(t){return{label:e.$getProfileDisplayName(t.instProfile),name:e.$getProfileDisplayName(t.instProfile),value:"profile"+t.instProfile.id,institutionCode:t.instProfile.institutionCode,id:t.instProfile.id,portalRole:t.instProfile.role,type:"profile"}})),e.addToMineAndInstitutionCalendar=e.activeEvent.addedToInstitutionCalendar&&!e.activeEvent.hideInOwnCalendar,e.addOnlyToInstitutionCalendar=e.activeEvent.addedToInstitutionCalendar&&e.activeEvent.hideInOwnCalendar}case 3:case"end":return t.stop()}}),t)})))()},setInstitutionCodeAndEventType:function(){var e,t=Object(_e.b)(this.institutionsThatCanBeSeen,this.activeInstitutionCodes,this.institutionsThatCanBeSeen[0]),n=et(this.institutions);try{for(n.s();!(e=n.n()).done;){var i=e.value,s=this.hasPermissionOnInstitution(this.permissionEnum.HANDLE_PARENTAL_MEETING_SCHOOL,i.institutionCode)||this.hasPermissionOnInstitution(this.permissionEnum.HANDLE_PARENTAL_MEETING_DAYCARE,i.institutionCode)||this.hasPermissionOnInstitution(this.permissionEnum.HANDLE_PERFORMANCE_MEETING,i.institutionCode);i.hasCreatingMeetingPermission=s,i.isPrimary&&s&&i.institutionCode===t.institutionCode&&(this.updateMeetingEventType(),this.meetingEventTypes.length>0&&""==this.eventForm.type&&this.changeEventType(this.meetingEventTypes[0].type,!0))}}catch(e){n.e(e)}finally{n.f()}var a=this.institutions.filter((function(e){return e.hasCreatingMeetingPermission}));if(a.length>0){if(!this.isEditMode){var r=a.indexOf(t),o=-1===r?0:r;this.institutionCode=a[o].institutionCode,this.eventForm.institutionCode=a[o].institutionCode,this.emptyEventForm.institutionCode=a[o].institutionCode}this.updateMeetingEventType(),this.meetingEventTypes.length>0&&""==this.eventForm.type&&this.changeEventType(this.meetingEventTypes[0].type,!0)}this.parent==E.a.GROUP&&this.inviteMembersFromGroup()},removeUnavailableResources:function(){var e,t=this,n=et(this.unavailableResourceIds);try{var i=function(){var n=e.value;t.instanceToReset=t.eventForm.timeSlots.findIndex((function(e){return e.primaryResource&&e.primaryResource.id===n})),t.resetResources=!t.resetResources};for(n.s();!(e=n.n()).done;)i()}catch(e){n.e(e)}finally{n.f()}this.updateUnavailableResources([])},showUnavailableResources:function(){var e=this;this.unavailableResources=[];var t,n=et(this.unavailableResourceIds);try{var i=function(){var n=t.value,i=e.eventForm.timeSlots.find((function(e){return e.primaryResource&&e.primaryResource.id===n}));i&&e.unavailableResources.push(i.primaryResource)};for(n.s();!(t=n.n()).done;)i()}catch(e){n.e(e)}finally{n.f()}this.$refs.unavailableResourcesModal.show()}})},at=Object(L.a)(st,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"calendar-meeting-event-drawer"},[n("b-form",[n("b-row",[e.institutionsThatCanBeSeen.length>1&&null==e.delegatedContext.institutionProfileId&&!e.isCoOrganizer?n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_TITLE_CHOOSE_INSTITUTION")))]),e._v(" "),n("aula-select",{attrs:{placeholder:"Select",disabled:e.isEditMode},on:{change:function(t){e.isEdited?e.$refs.confirmSwitchInstitution.show():e.buttonConfirmSwitchInstitution()}},model:{value:e.eventForm.institutionCode,callback:function(t){e.$set(e.eventForm,"institutionCode",t)},expression:"eventForm.institutionCode"}},e._l(e.institutionsThatCanBeSeen,(function(e){return n("aula-option",{key:e.institutionCode,attrs:{id:e.institutionCode,label:e.name,value:e.institutionCode,disabled:!e.hasCreatingMeetingPermission}})}
1)),1)],1):e._e()],1),e._v(" "),n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_TYPE")))]),e._v(" "),n("aula-select",{attrs:{disabled:e.isEditMode},on:{change:function(t){e.isEdited?e.$refs.confirmChangeEventTypeModal.show():e.changeEventType()}},model:{value:e.eventForm.type,callback:function(t){e.$set(e.eventForm,"type",t)},expression:"eventForm.type"}},e._l(e.meetingEventTypes,(function(e){return n("aula-option",{key:e.type,attrs:{label:e.label,value:e.type}})})),1)],1),e._v(" "),n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6",attrs:{md:"5"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_TITLE"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("b-form-input",{ref:"eventTitle",class:e.showTitleAlert?"red-border":"",attrs:{id:"eventTitle",placeholder:e.$getText("CALENDAR_LABEL_EVENT_PLACEHOLDER_TITLE"),type:"text",autocomplete:"off",disabled:e.isHandlingOthersEvent},on:{input:function(t){return e.validateTitleInput()}},model:{value:e.eventForm.title,callback:function(t){e.$set(e.eventForm,"title",t)},expression:"eventForm.title"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingTitleAlert}},[e._v("\n          "+e._s(e.$getText("CALENDAR_ALERT_TITLE"))+"\n        ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showTitleTooLongAlert}},[e._v("\n          "+e._s(e.$getText("CALENDAR_ALERT_TITLE_TOO_LONG"))+"\n        ")])],1)],1),e._v(" "),n("b-row",[n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_PERSONS"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("b-input-group",{staticClass:"search-module",attrs:{id:"search-invitees"}},[n("aula-search-recipients",{ref:"calendarInviteeSearch",attrs:{id:"eventInvitees","data-testid":"event-invitee-search","css-class":e.showMissingMembersAlert?"red-border":"",disabled:e.isDisabledInviteesSearch,"from-module":e.moduleTypes.EVENT,"scope-employees-to-institution":!0,"reset-input":e.resetRecipientsInput,clearable:!0,"invite-members-when-selecting-group":!0,"invite-members-when-selecting-group-portal-role":!0,"invite-group-when-adding-members":!0,"include-self":e.shouldIncludeSelf,"close-dropdown-after-select":!1,"filter-portal-roles-when-adding-members":e.apiPortalRoles,"hide-portal-roles-when-expanding-group":e.disabledPortalRolesWhenInviting,"disable-portal-roles-members-when-expanding-group":e.disabledPortalRolesWhenInviting,"existing-participants":e.existingInvitees,"extra-a-p-i-params":{groupSearchScope:e.groupTypes.INSTITUTIONAL},"add-existing-participants":!1,"portal-roles":e.apiPortalRoles,"institution-code":e.eventForm.institutionCode,"select-all":!1,url:"findRecipients"},on:{emitSelected:e.addInvitees}}),e._v(" "),n("b-input-group-addon",[n("i",{staticClass:"icon-Aula_search input-group-search-addon"})])],1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingMembersAlert}},[e._v("\n          "+e._s(e.$getText("CALENDAR_ALERT_ATTENDEES"))+"\n        ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.isInviteeCoOrganizer}},[e._v("\n          "+e._s(e.$getText("CALENDAR_ALERT_INVITEES_ARE_CORGANIZERS"))+"\n        ")])],1),e._v(" "),e.isMobile&&(e.isEditMode||e.parent===e.parentTypes.GROUP)?n("b-col",{staticClass:"form-margin-bottom",attrs:{cols:"12"}},[n("div",{staticClass:"event_resources"},e._l(e.existingInvitees,(function(t,i){return n("span",{key:i,staticClass:"el-tag el-tag--resource"},[e._v(e._s(t.name))])})),0)]):e._e(),e._v(" "),e.canEditCoOrganizers?n("b-col",{staticClass:"form-margin-bottom col-12 col-md-6"},[n("label",{attrs:{for:"eventOrganizers"}},[e._v(e._s(e.$getText("CALENDAR_LABEL_ORGANIZERS")))]),e._v(" "),n("b-input-group",{staticClass:"search-module"},[n("aula-search-recipients",{attrs:{id:"eventOrganizers","doc-types-api":[e.docTypes.PROFILE],"portal-roles":[e.portalRoles.EMPLOYEE],"existing-participants":e.selectedOrganizers,"hidden-participants":e.hiddenOrganizers,"reset-input":e.resetRecipientsInput,"close-dropdown-after-select":!1,clearable:!0,"institution-code":e.eventForm.institutionCode,"scope-employees-to-institution":!0,"placeholder-textkey":"ARIA_LABEL_CALENDAR_SEARCH","hover-text":"ARIA_LABEL_CALENDAR_SEARCH_FOR_ORGANIZERS","include-self":!1,"from-module":e.moduleTypes.EVENT,"select-all":!1},on:{emitSelected:e.onSelectOrganizers,emitRemoveTag:e.removeExistingOrganizer},scopedSlots:e._u([e.isEditMode?{key:"reset-warning",fn:function(){return[e._v("\n              "+e._s(e.$t("warning.remove_all_organizers_from_meeting_event"))+"\n              "),n("br"),e._v("\n              "+e._s(e.$t("warning.are_you_sure_you_want_to_continue"))+"\n            ")]},proxy:!0}:null],null,!0)}),e._v(" "),n("b-input-group-addon",[n("i",{staticClass:"icon-Aula_search input-group-search-addon"}
1)])],1)],1):e._e()],1),e._v(" "),e.isMobile||!e.isEditMode&&e.parent!==e.parentTypes.GROUP?e._e():n("b-row",[n("b-col",{staticClass:"form-margin-bottom",attrs:{cols:"12"}},[n("div",{staticClass:"event_resources"},e._l(e.existingInvitees,(function(t,i){return n("span",{key:i,staticClass:"el-tag el-tag--resource"},[e._v(e._s(t.name))])})),0)])],1),e._v(" "),n("hr",{staticClass:"line mb-0"}),e._v(" "),e.isParentalMeeting?n("b-row",{staticClass:"mt-4"},[n("b-col",{attrs:{cols:"12",md:"7",lg:"6"}},[n("div",{staticClass:"d-flex align-items-center"},[n("b-checkbox",{attrs:{disabled:e.isEditMode},model:{value:e.isAllowedMultipleParticipants,callback:function(t){e.isAllowedMultipleParticipants=t},expression:"isAllowedMultipleParticipants"}},[e._v("\n            "+e._s(e.$getText("CALENDAR_ALLOW_MULTIPLE_PARTICIPANTS"))+"\n          ")]),e._v(" "),n("AulaInfoTrigger",{staticClass:"ml-2",attrs:{area:"MULTIPLE_PEOPLE_SAME_SLOT"}})],1),e._v(" "),e.isAllowedMultipleParticipants?[n("b-input",{staticClass:"mt-2",class:{"red-border":!e.isValidNumberOfParticipants},attrs:{type:"number",disabled:e.isEditMode,placeholder:e.$getText("CALENDAR_LABEL_EVENT_WRITE_NUMBER_OF_PARTICIPANTS")},model:{value:e.eventForm.numberOfParticipantsPerTimeSlot,callback:function(t){e.$set(e.eventForm,"numberOfParticipantsPerTimeSlot",e._n(t))},expression:"eventForm.numberOfParticipantsPerTimeSlot"}}),e._v(" "),n("b-alert",{staticClass:"mt-1",attrs:{variant:"danger",show:!e.isValidNumberOfParticipants}},[e._v("\n            "+e._s(e.$getText("CALENDAR_ALERT_NUMBER_OF_TIMESLOT_PARTICIPANTS"))+"\n          ")])]:e._e()],2)],1):e._e(),e._v(" "),n("b-row",[n("b-col",{staticClass:"form-margin-bottom",attrs:{lg:"4",md:"7",sm:"12"}},[n("label",{staticClass:"thin",attrs:{id:"event-timeslots"}},[e._v(e._s(e.$getText("CALENDAR_TITLE_MEETING_DURATION"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("aula-select",{class:e.showMissingMeetingDuration?"red-border":"",attrs:{disabled:e.isEditMode},on:{change:e.changeMeetingDuration},model:{value:e.eventForm.meetingDuration,callback:function(t){e.$set(e.eventForm,"meetingDuration",t)},expression:"eventForm.meetingDuration"}},e._l(e.durations,(function(e){return n("aula-option",{key:e,attrs:{label:e+" min",value:e}})})),1)],1),e._v(" "),n("b-col",{staticClass:"form-margin-bottom",attrs:{lg:"4",md:"7",sm:"12"}},[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_TITLE_PAUSE_AFTER"))+" ")]),e._v(" "),n("aula-select",{attrs:{disabled:e.isEditMode},model:{value:e.eventForm.meetingsBetweenBreaks,callback:function(t){e.$set(e.eventForm,"meetingsBetweenBreaks",t)},expression:"eventForm.meetingsBetweenBreaks"}},[n("aula-option",{key:"0",attrs:{label:"0",value:0}}),e._v(" "),e._l(99,(function(e){return n("aula-option",{key:e,attrs:{label:e,value:e}})}))],2)],1),e._v(" "),n("b-col",{staticClass:"form-margin-bottom",attrs:{lg:"4",md:"7",sm:"12"}},[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_TITLE_PAUSE_DURATION")))]),e._v(" "),n("aula-select",{attrs:{disabled:e.isEditMode||0===e.eventForm.meetingsBetweenBreaks},model:{value:e.eventForm.breakLength,callback:function(t){e.$set(e.eventForm,"breakLength",t)},expression:"eventForm.breakLength"}},e._l(e.meetingTimes,(function(e){return n("aula-option",{key:e,attrs:{label:e+" min",value:e}})})),1)],1)],1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showMissingMeetingDuration}},[e._v("\n      "+e._s(e.$getText("CALENDAR_ALERT_INVALID_MEETING_DURATION"))+"\n    ")]),e._v(" "),n("hr",{staticClass:"line mb-0"}),e._v(" "),e.isParentalMeeting?n("b-row",[n("b-col",[n("label",[e._v(e._s(e.$getText("CALENDAR_MEETING_SUGGESTION_LABEL")))]),e._v(" "),e.invitedPartcipants.length>0?n("div",[e._v("\n          "+e._s(e.$getText("CALENDAR_MEETING_SUGGESTED_TIMESLOTS"))+"\n          "),n("strong",[e._v(e._s(e.numberOfSlotsSuggested)+"\n            "+e._s(1===e.numberOfSlotsSuggested?e.$getText("CALENDAR_MEETING"):e.$getText("CALENDAR_MEETINGS")))]),e._v(".\n        ")]):e._e(),e._v(" "),n("div",[e._v("\n          "+e._s(e.$getText("CALENDAR_MEETING_ADDED_TIMESLOTS"))+"\n          "),n("strong",[e._v(e._s(e.numberOfSlotsAdded)+"\n            "+e._s(1===e.numberOfSlotsAdded?e.$getText("CALENDAR_MEETING"):e.$getText("CALENDAR_MEETINGS")))]),e._v(".\n        ")])])],1):e._e(
1),e._v(" "),e.showTimeSlotHeader?n("b-row",{staticClass:"hide-tablet-down"},[n("b-col",{attrs:{md:"3",cols:"4"}},[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_LABEL_MEETING_DATE"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])])]),e._v(" "),n("b-col",{attrs:{md:"2",cols:"4"}},[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_LABEL_MEETING_FROM_TIME"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])])]),e._v(" "),n("b-col",{attrs:{md:"2",cols:"4"}},[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_LABEL_MEETING_TO_TIME"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])])]),e._v(" "),n("b-col",{attrs:{md:"4",cols:"11"}},[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_LABEL_MEETING_LOCATION"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])])]),e._v(" "),n("b-col",{staticClass:"remove_timeslot",attrs:{md:"1",cols:"1"}})],1):e._e(),e._v(" "),e._l(e.eventForm.timeSlots,(function(t,i){return n("b-row",{key:t.timeSlotIndex,staticClass:"form-margin-bottom"},[n("b-col",{staticClass:"margin-bottom",attrs:{lg:"3",cols:"9"}},[n("label",{staticClass:"hide-tablet-up"},[e._v("\n          "+e._s(e.$getText("CALENDAR_LABEL_MEETING_DATE"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("el-date-picker",{class:{"red-border":t.showDateAlert,elPickerActive:e.isMeetingDateClicked},attrs:{"data-test":"timeslot-picker"+(i+1),disabled:t.isEdit,format:e.$parent.defaultDateFormat,"value-format":e.$parent.defaultDateValueFormat,type:"date","picker-options":e.$parent.availableDate,placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE")},on:{change:function(t){return e.validateTimeslotDate(i)},focus:function(t){e.isMeetingDateClicked=!0},blur:function(t){e.isMeetingDateClicked=!1}},model:{value:t.date,callback:function(n){e.$set(t,"date",n)},expression:"allocationTime.date"}})],1),e._v(" "),t.isEdit?e._e():n("b-col",{staticClass:"remove_timeslot hide-mobile-up",attrs:{cols:"1"}},[n("i",{staticClass:"icon-Aula_close",attrs:{"aria-label":e.$getText("ARIA_LABEL_DELETE")},on:{click:function(t){return e.removeTimeSlot(i)}}})]),e._v(" "),n("b-col",{staticClass:"margin-bottom",attrs:{lg:"4",cols:"12"}},[n("b-row",[n("b-col",[n("label",{staticClass:"hide-tablet-up"},[e._v(e._s(e.$getText("CALENDAR_LABEL_MEETING_FROM_TIME"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("AulaTimepicker",{class:{"red-border":t.showStartTimeAlert||t.showOverlapAlert},attrs:{id:"startTime",format:"HH:mm","hour-label":e.$getText("HOUR"),"minute-label":e.$getText("MINUTE"),placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_TIME"),"aria-label":e.$getText("ARIA_LABEL_CALENDAR_START_TIME"),disabled:t.isEdit,"hide-clear-button":"","minute-interval":e.timepickerSettings.DEFAULT_INTERVAL,"scroll-to-hour":12,"advanced-keyboard":""},on:{change:function(t){return e.validateTimeslotStartTime(i)}},model:{value:t.startTime,callback:function(n){e.$set(t,"startTime",n)},expression:"allocationTime.startTime"}})],1),e._v(" "),n("b-col",[n("label",{staticClass:"hide-tablet-up"},[e._v(e._s(e.$getText("CALENDAR_LABEL_MEETING_TO_TIME"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("AulaTimepicker",{class:{"red-border":t.showEndTimeAlert||t.showOverlapAlert},attrs:{id:"endTime",format:"HH:mm","hour-label":e.$getText("HOUR"),"minute-label":e.$getText("MINUTE"),placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_TIME"),"aria-label":e.$getText("ARIA_LABEL_CALENDAR_END_TIME"),disabled:t.isEdit,"hide-clear-button":"","minute-interval":e.timepickerSettings.DEFAULT_INTERVAL,"scroll-to-hour":12,"advanced-keyboard":""},on:{change:function(t){return e.validateTimeslotEndTime(i)}},model:{value:t.endTime,callback:function(n){e.$set(t,"endTime",n)},expression:"allocationTime.endTime"}})],1)],1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:t.showOverlapAlert}},[e._v("\n          "+e._s(e.$getText("CALENDAR_ALERT_CONFLICT_TIMESLOT"))+"\n        ")])],1),e._v(" "),n("b-col",{staticClass:"margin-bottom",attrs:{lg:"4",cols:"12"}},[n("label",{staticClass:"hide-tablet-up"},[e._v(e._s(e.$getText("CALENDAR_LABEL_MEETING_LOCATION"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("b-input-group",{staticClass:"search-module",staticStyle:{width:"100%"}},[n("aula-search",{ref:"timeSlotLocation",refInFor:!0,class:t.showLocationAlert?"red-border":"",staticStyle:{width:"100%"},attrs:{"data-test":"timeslot-location"+(i+1),"search-result-loader":e.searchLocations,results:e.primaryResourceSearchResults[i],"existing-participants":e.existingLocation(i),"allow-create":!0,multiple:!0,"multiple-limit":1,instance:i,"reset-search-input":e.resetResources,"instance-to-reset":e.instanceToReset,"select-all":!1,disabled:!t.date||!t.startTime||!t.endTime,"css-class":"wraptext"},on:{emitFocus:function(t){return e.searchLocations("",i)},emitSelected:e.addPrimaryResourceToList},scopedSlots:e._u([{key:"optionContent",fn:function(t){return[n("span",{domProps:{innerHTML:e._s(t.label)}}),e._v(" "),n("span",{staticClass:"text-grey"},[e._v("("+e._s(e.$getText("CALENDAR_AVAILABLE"))+")")])]}}],null,!0)}),e._v(" "),n("b-input-group-addon",[n("i",{staticClass:"icon-Aula_search input-group-search-addon"})])],1)],1),e._v(" "),t.isEdit?e._e():n("b-col",{staticClass:"remove_timeslot hide-mobile-down",attrs:{cols:"1"}},[n("i",{staticClass:"icon-Aula_close",attrs:{"aria-label":e.$getText("ARIA_LABEL_DELETE")},on:{click:function(t){return e.removeTimeSlot(i)}}})]),e._v(" "),n("b-col",{attrs:{lg:"7",cols:"12"}},[n("b-alert",{attrs:{variant:"danger",show:t.showDateAlert||t.showStartTimeAlert||t.showEndTimeAlert}},[e._v("\n          "+e._s(e.$getText("CALENDAR_ALERT_INVALID_TIMESLOT"))+"\n        ")])],1),e._v(" "),n("b-col",{attrs:{lg:"5",cols:"12"}},[n("b-alert",{attrs:{variant:"danger",show:t.showLocationAlert}},[n("span",[e._v(e._s(e.$getText("CALENDAR_ALERT_INVALID_MEETING_LOCATION")))])])],1
1)],1)})),e._v(" "),e.isHandlingOthersEvent?e._e():n("b-row",{staticClass:"margin-top"},[n("b-col",{staticClass:"form-margin-bottom",attrs:{md:"3",cols:"12"}},[n("b-button",{staticClass:"send-btn",attrs:{variant:"primary"},on:{click:function(t){return e.addTimeSlot()}}},[e._v("\n          "+e._s(e.$getText("CALENDAR_LABEL_MEETING_EVENT_ADD_TIME"))+"\n        ")])],1),e._v(" "),n("b-col",{attrs:{cols:"12",md:"9"}},[n("b-alert",{attrs:{variant:"danger",show:e.isMissingTimeslots}},[e._v("\n          "+e._s(e.$getText("CALENDAR_ALERT_MISSING_TIMESLOT"))+"\n        ")])],1)],1),e._v(" "),e.isParentalMeeting?[e.missingTime>0?n("b-row",{staticClass:"mt-2"},[n("b-col",[n("AulaAlert",[e._v("\n            "+e._s(e.missingTimeslotAlert)+"\n          ")])],1)],1):e._e(),e._v(" "),e.excessTime>0?n("b-row",{staticClass:"mt-2"},[n("b-col",[n("AulaAlert",[e._v("\n            "+e._s(e.excessTimeslotAlert)+"\n          ")])],1)],1):e._e()]:e._e(),e._v(" "),n("b-row",[n("b-col",{staticClass:"form-margin-bottom",attrs:{lg:"4",md:"7",sm:"12"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_REQUEST_DEADLINE")))]),e._v(" "),n("el-date-picker",{attrs:{id:"deadline-date",format:e.$parent.defaultDateFormat,"value-format":e.$parent.defaultDateValueFormat,type:"date","aria-label":e.$getText("ARIA_LABEL_CALENDAR_START_DATE"),placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE"),"picker-options":e.availableDeadlineDate,disabled:e.isHandlingOthersEvent||e.isResponseDeadlineDisabled},on:{change:function(t){e.showInvalidDeadlineAlert=!1}},model:{value:e.eventForm.responseDeadline,callback:function(t){e.$set(e.eventForm,"responseDeadline",t)},expression:"eventForm.responseDeadline"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showInvalidDeadlineAlert}},[e._v("\n          "+e._s(e.$getText("CALENDAR_LABEL_EVENT_INVALID_DEADLINE"))+"\n        ")])],1)],1),e._v(" "),n("hr",{staticClass:"line mb-0"}),e._v(" "),n("b-row",{staticClass:"mb-2"},[n("b-col",[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_DESCRIPTION")))]),e._v(" "),e.isLoadingEdge?e._e():n("editor",{key:e.institutionCode,ref:"message-textarea",attrs:{id:"message-textarea","toolbar-type":"basic","max-length":1e4,value:e.eventForm.description,clean:""===e.eventForm.description,"aria-label":"ARIA_LABEL_WRITE_EVENT_CONTENT","placeholder-textkey":"MESSAGE_TYPING_PLACEHOLDER",disabled:e.isHandlingOthersEvent},model:{value:e.eventForm.description,callback:function(t){e.$set(e.eventForm,"description",t)},expression:"eventForm.description"}})],1)],1),e._v(" "),n("b-row",[n("b-col",[e.isHandlingOthersEvent?n("div",[n("attachment-thumbnails",{attrs:{attachments:e.existingAttachments,parent:e.parentTypes.CALENDAR}}),e._v(" "),n("attachment-list",{attrs:{attachments:e.existingAttachments,"show-media":!0}})],1):n("upload",{ref:"mediaUpload",staticClass:"upload",attrs:{"info-area":"CALENDAR_ATTACH_FILE","selected-institution-code-for-filter":e.eventForm.institutionCode,"limit-file-upload":200,"existing-media":e.existingAttachments,"institution-code-for-tagging":e.eventForm.institutionCode,"institution-code":e.eventForm.institutionCode},on:{mediaUpdated:e.filesChanged}})],1)],1),e._v(" "),e.isSettingSectionVisible?[n("hr",{staticClass:"line mb-0"}),e._v(" "),n("label",{staticClass:"font-weight-bold"},[e._v(" "+e._s(e.$getText("CALENDAR_LABEL_EVENT_SETTINGS_FOR_TIME_SLOT_EVENT")))]),e._v(" "),e.eventForm.type===e.eventTypes.PERFORMANCE_MEETING||e.isCoOrganizer?e._e():n("b-row",{staticClass:"form-margin-bottom mb-4 mb-lg-2"},[n("b-col",{staticClass:"event-settings col-12 col-lg-6"},[e.isMobile?n("div",{staticClass:"mobile-switch"},[n("div",{staticClass:"custom-label"},[n("label",[e._v(" "+e._s(e.$getText("CALENDAR_TITLE_WITH_CHILDREN"))+" ")])]),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_TITLE_WITH_CHILDREN"),width:e.width=48,disabled:e.isHandlingOthersEvent},on:{change:e.onUpdateChildRequired},model:{value:e.eventForm.childRequired,callback:function(t){e.$set(e.eventForm,"childRequired",t)},expression:"eventForm.childRequired"}})],1):n("div",{staticClass:"d-flex align-items-center"},[n("b-form-checkbox",{staticClass:"mr-0",attrs:{id:"childRequired",disabled:e.isHandlingOthersEvent},on:{input:e.onUpdateChildRequired},model:{value:e.eventForm.childRequired,callback:function(t){e.$set(e.eventForm,"childRequired",t)},expression:"eventForm.childRequired"}},[e._v("\n              "+e._s(e.$getText("CALENDAR_TITLE_WITH_CHILDREN"))+"\n            ")])],1)])],1),e._v(" "),e.canAddEventToInstitutionCalendar?n("b-row",{staticClass:"form-margin-bottom mb-4 mb-lg-2"},[n("b-col",{staticClass:"event-settings col-12 col-lg-6"},[e.isMobile?n("div",{staticClass:"mobile-switch"},[n("label",[e._v("\n              "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ADD_TO_INSTITUTION_CALENDAR"))+"\n              "),null!=e.delegatedContext.institutionCode&&null!=e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode}))?[e._v("\n                "+e._s(e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode})).name)+"\n              ")]:null!=e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))?[e._v("\n                "+e._s(e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}
1)).name)+"\n              ")]:e._e()],2),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_LABEL_EVENT_ADD_TO_INSTITUTION_CALENDAR"),width:e.width=48,disabled:e.isEditMode&&!e.isCreator},on:{change:e.changedAddToMineAndInstitutionCalendar},model:{value:e.addToMineAndInstitutionCalendar,callback:function(t){e.addToMineAndInstitutionCalendar=t},expression:"addToMineAndInstitutionCalendar"}})],1):n("b-form-checkbox",{attrs:{disabled:e.isEditMode&&!e.isCreator},on:{input:e.changedAddToMineAndInstitutionCalendar},model:{value:e.addToMineAndInstitutionCalendar,callback:function(t){e.addToMineAndInstitutionCalendar=t},expression:"addToMineAndInstitutionCalendar"}},[e._v("\n            "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ADD_TO_INSTITUTION_CALENDAR"))+"\n            "),null!=e.delegatedContext.institutionCode&&null!=e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode}))?[e._v("\n              "+e._s(e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode})).name)+"\n            ")]:null!=e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))?[e._v("\n              "+e._s(e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode})).name)+"\n            ")]:e._e()],2)],1)],1):e._e(),e._v(" "),e.canAddEventOnlyToInstitutionCalendar?n("b-row",{staticClass:"form-margin-bottom mb-4 mb-lg-2"},[n("b-col",{staticClass:"event-settings col-12 col-lg-6"},[e.isMobile?n("div",{staticClass:"mobile-switch"},[n("label",[e._v("\n              "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ADD_ONLY_TO_INSTITUTION_CALENDAR"))+"\n              "),null!=e.delegatedContext.institutionCode&&null!=e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode}))?[e._v("\n                "+e._s(e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode})).name)+"\n              ")]:null!=e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))?[e._v("\n                "+e._s(e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode})).name)+"\n              ")]:e._e()],2),e._v(" "),n("el-switch",{staticClass:"pull-right",attrs:{"aria-label":e.$getText("CALENDAR_LABEL_EVENT_ADD_ONLY_TO_INSTITUTION_CALENDAR"),width:e.width=48,disabled:e.isEditMode&&!e.isCreator},on:{change:e.changedAddToOnlyInstitutionCalendar},model:{value:e.addOnlyToInstitutionCalendar,callback:function(t){e.addOnlyToInstitutionCalendar=t},expression:"addOnlyToInstitutionCalendar"}})],1):n("b-form-checkbox",{attrs:{disabled:e.isEditMode&&!e.isCreator},on:{input:e.changedAddToOnlyInstitutionCalendar},model:{value:e.addOnlyToInstitutionCalendar,callback:function(t){e.addOnlyToInstitutionCalendar=t},expression:"addOnlyToInstitutionCalendar"}},[e._v("\n            "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ADD_ONLY_TO_INSTITUTION_CALENDAR"))+"\n            "),null!=e.delegatedContext.institutionCode&&null!=e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode}))?[e._v("\n              "+e._s(e.institutions.find((function(t){return t.institutionCode===e.delegatedContext.institutionCode})).name)+"\n            ")]:null!=e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode}))?[e._v("\n              "+e._s(e.institutions.find((function(t){return t.institutionCode===e.eventForm.institutionCode})).name)+"\n            ")]:e._e()],2)],1)],1):e._e()]:e._e(),e._v(" "),n("hr",{staticClass:"line"}),e._v(" "),n("aula-form-footer",{attrs:{"show-line":!1,"is-loading":e.isLoading,"submit-text":e.isEditMode?"BUTTON_SAVE":"BUTTON_CREATE"},on:{cancelClicked:function(t){return e.closeEventForm()},submitClicked:e.onSaveClicked}})],2),e._v(" "),n("aula-modal",{ref:"confirmChangeEventTypeModal",on:{cancelClicked:e.buttonCancelChangeEventType,closeClicked:e.buttonCancelChangeEventType,okClicked:e.buttonConfirmChangeEventType}},[e._v("\n    "+e._s(e.$getText("CALENDAR_NOTIFY_MESSAGE_CHANGE_EVENT_TYPE"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"confirmSwitchInstitution",on:{cancelClicked:e.buttonCancelSwitchInstitution,okClicked:e.buttonConfirmSwitchInstitution}},[e._v("\n    "+e._s(e.$getText("CALENDAR_CONFIRM_SWITCH_INSTITUTION_1"))+" "),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_CONFIRM_SWITCH_INSTITUTION_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"cancelModal",attrs:{"ok-text":"BUTTON_YES"},on:{cancelClicked:function(t){return e.$refs.cancelModal.hide()}
1,okClicked:function(t){return e.cancelForm()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_CANCEL_INFO"))+" "),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_CANCEL_INFO_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"removeResourcesWhenChangingDateTimeModal",attrs:{"ok-text":"BUTTON_YES","disable-close":!0},on:{okClicked:function(t){e.$refs.removeResourcesWhenChangingDateTimeModal.hide(),e.removeResources()},cancelClicked:function(t){e.$refs.removeResourcesWhenChangingDateTimeModal.hide(),e.resetDateTime()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_REMOVE_RESOURCES_WHEN_CHANGING_DATE_TIME"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"tooManyRecipientsModal",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.tooManyRecipientsModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_TOO_MANY_RECIPIENTS"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"removingCoOrganizerWarning",attrs:{"header-text":"MESSAGE_WARNING_HEADER","ok-text":"BUTTON_YES","cancel-text":"CANCEL"},on:{cancelClicked:e.cancelRemovalOfExistingOrganizer,okClicked:function(t){return e.acceptRemovalOfExistingCoOrganizer()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_WARNING_REMOVE_ORGANIZER_FROM_MEETING_EVENT"))),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_WARNING_REMOVE_ORGANIZER_FROM_EVENT_CONFIRM"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"unavailableResourcesModal",attrs:{"show-cancel":!1,"disable-close":!0},on:{okClicked:function(t){e.$refs.unavailableResourcesModal.hide(),e.removeUnavailableResources()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_UNAVAILABLE_RESOURCES_1"))+" ("+e._s(e.unavailableResources.map((function(e){return e.name})).join(", "))+")\n    "+e._s(e.$getText("CALENDAR_ALERT_UNAVAILABLE_RESOURCES_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"editOthersEventWarningModal",on:{cancelClicked:function(t){return e.$refs.editOthersEventWarningModal.hide()},okClicked:e.onConfirmEditOthersEvent}},[e._v("\n    "+e._s(e.$getText("CALENDAR_EDIT_OTHERS_EVENT_WARNING_1"))),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_EDIT_OTHERS_EVENT_WARNING_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"suggestedTimeslotsWarning",attrs:{"ok-text":"YES"},on:{cancelClicked:function(t){return e.$refs.suggestedTimeslotsWarning.hide()},okClicked:e.onConfirmCreateTimeslots}},[e.numberOfSlotsAdded<e.numberOfSlotsSuggested?[e._v(e._s(e.$getText("CALENDAR_MISSING_TIMESLOTS_WARNING")))]:e._e(),e._v(" "),e.numberOfSlotsAdded>e.numberOfSlotsSuggested?[e._v(e._s(e.$getText("CALENDAR_EXCESS_TIMESLOTS_WARNING")))]:e._e(),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_SAVE_EVENT_CONFIRMATION"))+"\n  ")],2),e._v(" "),n("toastr",{ref:"externalRecipientsToastr",attrs:{variant:"warning","icon-font-size":"1em","circle-background":"white"}},[e._v("\n    "+e._s(e.$getText("MESSAGE_ADD_RECIPIENTS_EXTERNAL"))+"\n  ")])],1)}),[],!1,null,"4a8e8814",null).exports,rt=n(462),ot=n(446);function lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ut,dt=f.a.CancelToken,ht=null,mt={provide:function(){return u()({},S.a.loadEventLocations,this.loadLocations)},inject:{getIsCreator:S.a.isCurrentEventCreator,getIsCoOrganizer:S.a.isCurrentEventCoOrganizer},props:{parent:{type:String,default:"profile"}},data:function(){return{permissionEnum:g.a,portalRoles:_.a,availableDate:{disabledDate:function(e){return e.getTime()+864e5<I()().toDate().getTime()},firstDayOfWeek:1},savedPrimaryLocation:[]}},computed:ct(ct({},Object(m.c)({institutions:p.a.GET_INSTITUTIONS,defaultDateFormat:p.a.GET_DEFAULT_DATE_FORMAT,defaultDateValueFormat:p.a.GET_DEFAULT_DATE_VALUE_FORMAT,defaultTimeFormat:p.a.GET_DEFAULT_TIME_FORMAT,defaultTimeValuesFormat:p.a.GET_DEFAULT_TIME_VALUE_FORMAT,getDateTimeSelectedByClickedTimeslot:p.a.GET_DATETIME_SELECTED_BY_CLICKED_TIMESLOT,hasPermission:p.a.HAS_PERMISSION,hasPermissionGroup:p.a.HAS_PERMISSION_ON_GROUP,hasPermissionOnInstitution:p.a.HAS_PERMISSION_ON_INSTITUTION,group:p.a.GET_ACTIVE_GROUP,delegatedContext:p.a.GET_DELEGATED_CONTEXT,activeEvent:p.a.GET_CURRENT_EVENT})),{},{userProfileStore:function(){return Object(N.a)()},profile:function(){return this.userProfileStore.institutionProfile},isCreator:function(){return this.getIsCreator()},isCoOrganizer:function(){return this.getIsCoOrganizer()},isEditingVacationRequest:function(){return-1!==this.$route.path.indexOf("redigerfer
1ieanmodning")&&null!=this.$route.params.id},isViewingVacationRequest:function(){return"viewVacationRequest"===this.$route.name},isCreatingMeetingEvent:function(){return(this.$route.path.includes("opretsamtale")||this.$route.path.includes("redigersamtale"))&&this.profile.role==this.portalRoles.EMPLOYEE&&(this.hasPermission(this.permissionEnum.HANDLE_PERFORMANCE_MEETING)||this.hasPermission(this.permissionEnum.HANDLE_PARENTAL_MEETING_SCHOOL)||this.hasPermission(this.permissionEnum.HANDLE_PARENTAL_MEETING_DAYCARE))},isCreatingBasicEvent:function(){if(this.$route.path.includes("opretbegivenhed")||this.$route.path.includes("redigerbegivenhed")){if("profile"==this.parent)return this.hasPermission(this.permissionEnum.HANDLE_EVENTS);if("group"==this.parent)return this.hasPermission(this.permissionEnum.HANDLE_EVENTS)||this.hasPermissionGroup(this.permissionEnum.INVITE_TO_EVENT,this.group.id)||this.hasPermissionOnInstitution(g.a.USE_GROUPS_AS_DISTRIBUTION_LISTS,this.group.institutionCode)}return!1},canHandleCoOrganizers:function(){return this.hasPermission(g.a.HANDLE_EVENT_CO_ORGANIZER)},hasRightsOfDisposalOfEvent:function(){var e=this,t=!1;if(this.isEditMode&&null!=this.delegatedContext){var n=this.activeEvent,i=n.coOrganizers,s=n.creator;null!=s&&(t=s.id==this.delegatedContext.institutionProfileId),!t&&Array.isArray(i)&&(t=i.some((function(t){return t.instProfile.id==e.delegatedContext.institutionProfileId})))}return t},canEditCoOrganizers:function(){var e=!1===this.isEditMode,t=this.canHandleCoOrganizers;return e?t:t&&(this.isCreator||this.hasRightsOfDisposalOfEvent||this.isCoOrganizer)},isEditMode:function(){return this.$route.path.includes("redigerbegivenhed")||this.$route.path.includes("redigersamtale")}}),methods:ct(ct({},Object(m.b)({deleteEvent:p.a.DELETE_EVENT,getSameAuthorityInstitutions:p.a.ACTION_GET_SAME_ADMINISTRATIVE_AUTHORITY_INSTITUTIONS})),{},{removeEvent:function(e,t){var n=this;this.deleteEvent({eventForm:e,occurrenceDateTime:t}).then((function(){n.$emit("removeEventFromCalendar",[e.id]),n.$router.push({path:"/kalender"})}))},reloadVacationRequest:function(){this.$emit("reloadVacationRequest")},reloadCalendar:function(){this.$emit("reloadCalendar")},updatedEvent:function(){this.$emit("afterUpdated")},loadLocations:function(e,t){var n=this;return l()(h.a.mark((function i(){var s,a,r,o,l,c,u,d,m,p,v,g,_,E;return h.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return l="",c="",u="",d=!1,null!=t?(u=n.$refs.timeSlotEvent.eventForm.institutionCode,null!=(m=n.$refs.timeSlotEvent.eventForm.timeSlots[t])&&(l=I()(m.date+" "+m.startTime+":00").format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),c=I()(m.date+" "+m.endTime+":00").format("YYYY-MM-DDTHH:mm:ss.SSSSZ"))):(u=n.$refs.simpleEvent.eventForm.institutionCode,l=I()(n.$refs.simpleEvent.eventForm.startDateTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),c=I()(n.$refs.simpleEvent.eventForm.endDateTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),d=n.$refs.simpleEvent.eventForm.allDay),p=n.institutions.find((function(e){return e.institutionCode==u})).institutionProfileId,v=""!==(v=(null===(s=n.$refs.simpleEvent)||void 0===s||null===(a=s.eventForm)||void 0===a?void 0:a.id)||(null===(r=n.$refs.timeSlotEvent)||void 0===r||null===(o=r.eventForm)||void 0===o?void 0:o.id)||null)?v:null,g={query:e,resourceTypes:[Re.a.LOCATION,Re.a.EXTRA_LOCATION],institutionCode:u,institutionProfileId:p,start:l,end:c,allDay:d,eventId:v},null==n.$route.query.occurrence&&null==t&&null!=n.$refs.simpleEvent.eventForm.repeating&&"never"!=n.$refs.simpleEvent.eventForm.repeating.pattern&&(g.occurenceLimit=n.$refs.simpleEvent.eventForm.repeating.occurenceLimit,g.weekdayMask=n.$refs.simpleEvent.eventForm.repeating.weekdayMask,g.pattern=n.$refs.simpleEvent.eventForm.repeating.pattern,g.interval=n.$refs.simpleEvent.eventForm.repeating.interval,g.maxDate=n.$refs.simpleEvent.eventForm.repeating.maxDate),i.prev=10,ht&&ht(),i.next=14,f.b.get("?method=resources.listAvailableResources",{params:g,cancelToken:new dt((function(e){ht=e}))});case 14:return _=i.sent,ht=null,E=_.data.data.map((function(e){return Ne.a.mapResource(e)})),i.abrupt("return",[{label:n.$getText("CALENDAR_LABEL_EVENT_LOCATIONS"),options:E}]);case 20:return i.prev=20,i.t0=i.catch(10),f.a.isCancel(i.t0)||(ht=null),i.abrupt("return",[]);case 24:case"end":return i.stop()}}),i,null,[[10,20]])})))()},loadResourceSearchResults:function(e){var t=this;return l()(h.a.mark((function n(){var i,s,a,r,o,l,c,u,d,m,p;return h.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=t.institutions.find((function(e){return e.institutionCode==t.$refs.simpleEvent.eventForm.institutionCode})).institutionProfileId,a=null,r=null,!0===t.$refs.simpleEvent.eventForm.allDay?(a=I()(t.$refs.simpleEvent.eventForm.startDateTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),r=I()(t.$refs.simpleEvent.eventForm.endDateTime).format("YYYY-MM-DDTHH:mm:ss.SSSSZ")):(a=I()(t.$refs.simpleEvent.eventForm.startDateTime).utc().format("YYYY-MM-DDTHH:mm:ss.SSSSZ"),r=I()(t.$refs.simpleEvent.eventForm.endDateTime).utc().format("YYYY-MM-DDTHH:mm:ss.SSSSZ")),o=""!==(o=null!==(i=t.$refs.simpleEvent.eventForm.id)&&void 0!==i?i:null)?o:null,l={query:e,excludeResourceTypes:[Re.a.LOCATION,Re.a.EXTRA_LOCATION],institutionCode:t.$refs.simpleEvent.eventForm.institutionCode,institutionProfileId:s,start:a,end:r,allDay:t.$refs.simpleEvent.eventForm.allDay,eventId:o},null==t.$route.query.occurrence&&null!=t.$refs.simpleEvent.eventForm.repeating&&"never"!=t.$refs.simpleEvent.eventForm.repeating.pattern&&(l.occurenceLimit=t.$refs.simpleEvent.eventForm.repeating.occurenceLimit,l.weekdayMask=t.$refs.simpleEvent.eventForm.repeating.weekdayMask,l.pattern=t.$refs.simpleEvent.eventForm.repeating.pattern,l.interval=t.$refs.simpleEvent.eventForm.repeating.interval,l.maxDate=t.$refs.simpleEvent.eventForm.repeating.maxDate),n.prev=8,ht&&ht(),n.next=12,f.b.get("?method=resources.listAvailableResources",{params:l,cancelToken:new dt((function(e){ht=e}))});case 12:for(p in c=n.sent,ht=null,u=null!=c&&null!=c.data?c.data.data:[],d=[],m=u.reduce((function(e,n){return t.addResource(e,n),e}),[]))d.push(m[p]);t.$refs.simpleEvent.resourceResults=d,n.next=24;break;case 21:n.prev=21,n.t0=n.catch(8),f.a.isCancel(n.t0)||(ht=null);case 24:case"end":return n.stop()}}),n,null,[[8,21]])})))()},addResource:function(e,t){var n=Ne.a.mapResource(t);if(e[t.resourceCategory.id]){var i=e[t.resourceCategory.id].options.find((function(e){return e.id===t.id}));i||e[t.resourceCategory.id].options.push(n)}else e[t.resourceCategory.id]={label:t.resourceCategory.name,options:[n]};return e}}),watch:{institutions:function(){this.institutions.length>
10&&this.getSameAuthorityInstitutions(this.institutions)}},components:{VacationRequestDetails:ot.a,TimeSlotEvent:at,SimpleEvent:qe,VacationRequest:rt.a}},pt=Object(L.a)(mt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"calendar-event-form"},[e.isCreatingMeetingEvent?n("time-slot-event",{ref:"timeSlotEvent",attrs:{"is-co-organizer":e.isCoOrganizer,"can-edit-co-organizers":e.canEditCoOrganizers,parent:e.parent}}):e._e(),e._v(" "),e.isCreatingBasicEvent?n("simple-event",{ref:"simpleEvent",attrs:{"is-co-organizer":e.isCoOrganizer,"can-edit-co-organizers":e.canEditCoOrganizers,parent:e.parent}}):e._e(),e._v(" "),e.isEditingVacationRequest?n("vacation-request",{ref:"vacationRequestForm",attrs:{parent:e.parent,"is-edit-mode":e.isEditingVacationRequest},on:{reloadCalendar:e.reloadCalendar,reloadVacationRequest:e.reloadVacationRequest}}):e._e(),e._v(" "),e.isViewingVacationRequest?n("vacation-request-details",{ref:"vacationRequestDetails",on:{showChildVacationRequest:function(t){return e.$emit("openChildVacationRequest",t)},reloadCalendar:e.reloadCalendar}}):e._e()],1)}),[],!1,null,"85e952ba",null).exports,vt=n(177),ft=n(62),gt=n(53),_t=n(54),Et=n(26),At=n(163),Tt=n(253),bt=n(63),Ct=n(517),kt=n.n(Ct),yt=n(125),It=n.n(yt),St=n(51),Dt=n(129),wt=n(299),Nt=n(247),Rt=n(243),Ot=n(426);!function(e){e.DAY_GRID_MONTH="dayGridMonth",e.FIVE_DAYS_GRID="resourceTimeGridFiveDay",e.WEEK_GRID="resourceTimeGridWeek",e.EVENTS_LIST="listEvents",e.DAY_GRID="resourceTimeGridDay",e.NOTICE_BOARD="noticeBoard"}(ut||(ut={}));var Lt=n(144),xt=n(218),Pt=n(474),Mt=n(917),Ft=n(791),Ut=n(792),Bt=n(793),Vt=n(138),Wt=n(102),Gt=n(328),Ht={props:{eventModel:{type:Object,required:!0}},computed:{creatorName(){return this.eventModel.extendedProps.creatorName},location(){return Ne.a.getPrimaryLocation(this.eventModel.extendedProps)}}},jt=Object(L.a)(Ht,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"notice-board-event"},[n("div",{staticClass:"heading"},[n("div",{staticClass:"title"},[e._v("\n      "+e._s(e.eventModel.title)+"\n    ")]),e._v(" "),e.location?n("span",{staticClass:"location"},[e._v("\n      "+e._s(e.location)+"\n    ")]):e._e()]),e._v(" "),e.creatorName?n("div",{staticClass:"creator-name"},[e._v("("+e._s(e.creatorName)+")")]):e._e()])}),[],!1,null,"f345407c",null).exports,Yt={props:{eventModel:{type:Object,required:!0}},computed:{title(){switch(this.eventModel.extendedProps.type){case"sum-presence_holiday":case"sum-holiday":return this.$t("calendar.holiday");case"sum-vacation_registration":return this.$t("calendar.vacation_registration");case"sum-event":return this.$t("calendar.events");case"sum-birthday":return this.$t("calendar.birthday");case"sum-lesson":return this.$t("calendar.lesson");case"sum-parental_meeting":return this.$t("calendar.parental_meeting");case"sum-performance_meeting":return this.$t("calendar.performance_meeting");case"sum-school_home_meeting":return this.$t("calendar.school_home_meeting");case"sum-excursion":return this.$t("calendar.excursion");case"sum-other":return this.$t("calendar.other_events");default:return this.eventModel.title}},count(){return this.eventModel.extendedProps.count}}},$t=Object(L.a)(Yt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"month-event"},[n("div",{staticClass:"title"},[e._v("\n    "+e._s(e.title)+"\n  ")]),e._v(" "),n("div",{staticClass:"count"},[e._v("\n    "+e._s(e.count)+"\n  ")])])}),[],!1,null,"722f531d",null).exports,zt=n(216),qt=n(286),Kt={props:{lesson:{type:Object,required:!0},invitedGroups:{type:Array,default:null},location:{type:String,default:null}},computed:{hasSubstituteStatus(){return this.lesson.lessonStatus==qt.a.SUBSTITUTE},lessonExtendedInfo(){const e=this.getMainGroupInfo,t=this.getTeacherInfo,n=[];return this.location&&n.push(this.location),e&&n.push(e),t&&n.push(t),n.join(", ")},getMainGroupInfo(){var e,t;return null!==(t=null===(e=this.invitedGroups)||void 0===e?void 0:e.map((e=>e.name)).join(", "))&&void 0!==t?t:""},getTeacherInfo(){if(!this.lesson.participants||0===this.lesson.participants.length)return"";const e=this.lesson.participants.filter((e=>
1e.participantRole===V.a.SUBSTITUTE)).map((e=>e.teacherInitials));if(e.length>0)return e.join(", ");return this.lesson.participants.filter((e=>e.participantRole===V.a.PRIMARY||e.participantRole===V.a.HELP||e.participantRole===V.a.PEDAGOGUE)).map((e=>e.teacherInitials)).join(", ")}}},Qt={components:{LessonExtendedInfo:Object(L.a)(Kt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lesson-extended-info"},[e.hasSubstituteStatus?n("span",{staticClass:"substitute-teacher-tag"},[e._v(e._s(e.$t("calendar.substitute_teacher")))]):e._e(),e._v(" "),n("span",[e._v(e._s(e.lessonExtendedInfo))])])}),[],!1,null,"69972f2e",null).exports,AvatarGroup:zt.a,Icon:se.a},props:{eventModel:{type:Object,required:!0}},computed:Object.assign(Object.assign({},Object(m.c)({notifications:p.a.GET_NOTIFICATIONS})),{resourceProfiles(){return(this.eventModel.getResources().filter((e=>null!=e))||[]).map((e=>Object.assign(Object.assign({},e.extendedProps),{id:e.extendedProps.singleId})))},iconClassEnum:()=>ae.a,status(){return this.eventModel.extendedProps.responseStatus},isPrivate(){return this.eventModel.extendedProps.private},hasNote(){var e;return Boolean(null===(e=this.eventModel.extendedProps.lesson)||void 0===e?void 0:e.hasRelevantNote)},indicator(){if(this.eventModel.extendedProps.private)return"none";switch(this.status){case ft.a.ACCEPTED:return"accepted";case ft.a.TENTATIVE:return"tentative";case ft.a.WAITING:return"waiting";default:return"none"}},location(){return Ne.a.getPrimaryLocation(this.eventModel.extendedProps)},hasNotification(){return this.notifications.some((e=>this.eventModel.extendedProps.eventId&&e.eventId==this.eventModel.extendedProps.eventId&&e.notificationType===gt.a.BADGE))},title(){return this.eventModel.title},metadata(){return this.eventModel.extendedProps.metadata?`(${this.eventModel.extendedProps.metadata})`:""},isLesson(){var e,t;return(null===(e=this.eventModel.extendedProps)||void 0===e?void 0:e.type)===B.a.LESSON&&(null===(t=this.eventModel.extendedProps)||void 0===t?void 0:t.lesson)},lesson(){var e;return null===(e=this.eventModel.extendedProps)||void 0===e?void 0:e.lesson},invitedGroups(){var e;return null===(e=this.eventModel.extendedProps)||void 0===e?void 0:e.invitedGroups}})},Jt=Object(L.a)(Qt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"list-view-event",attrs:{title:e.eventModel.title,"data-indicator":e.indicator,"data-private":e.isPrivate}},[n("div",{staticClass:"content"},[n("div",{staticClass:"heading"},[e.hasNotification?n("div",{staticClass:"notification"}):e._e(),e._v(" "),n("div",{staticClass:"title"},[e._v("\n        "+e._s(e.title)+"\n        "),e.metadata?n("span",{staticClass:"metadata"},[e._v(e._s(e.metadata))]):e._e()]),e._v(" "),e.isPrivate?n("Icon",{staticClass:"event-icon",attrs:{name:e.iconClassEnum.LOCK}}):e._e(),e._v(" "),e.hasNote?n("Icon",{staticClass:"event-icon",attrs:{name:e.iconClassEnum.PAPER}}):e._e()],1),e._v(" "),e.location&&!e.isLesson?n("div",{staticClass:"location"},[e._v("\n      "+e._s(e.location)+"\n    ")]):e._e(),e._v(" "),e.isLesson?n("LessonExtendedInfo",{attrs:{lesson:e.lesson,"invited-groups":e.invitedGroups}}):e._e()],1),e._v(" "),n("AvatarGroup",{staticClass:"related-avatars",attrs:{profiles:e.resourceProfiles}})],1)}),[],!1,null,"7372a8bf",null).exports;var Zt={components:{CalendarViewListViewEvent:Jt,CalendarViewMonthViewEvent:$t,CalendarViewNoticeBoardEvent:jt,ContactAvatar:Wt.a,CalendarViewTimelineViewEvent:Gt.a,FullCalendar:ne.a},props:{eventSources:{type:Array,required:!0},resources:{type:Function,default:null},initialView:{type:String,default:ut.FIVE_DAYS_GRID},initialDate:{type:[Date,String,Number,Array],default:()=>re.a.getStartOf(new Date,"week")}},emits:["eventClick","dateSelect","loading","eventDrop","datesSet"],computed:{options(){return{schedulerLicenseKey:"0076219922-fcs-1735791579",locale:"da",plugins:[Pt.a,Mt.a,Ft.a,Ut.a,Bt.a],dayHeaderFormat:{weekday:"long",day:"numeric",month:"long"},titleFormat:{month:"long",day:"2-digit",year:"numeric"}
1,customButtons:{today:{text:this.$t("calendar.today"),click:this.gotoTodayView}},buttonText:{[ut.DAY_GRID]:this.$t("calendar.day"),[ut.WEEK_GRID]:this.$t("calendar.week"),month:this.$t("calendar.month"),[ut.FIVE_DAYS_GRID]:this.$t("calendar.five_days")},headerToolbar:{start:"prev,next title",end:`${ut.DAY_GRID} ${ut.FIVE_DAYS_GRID} ${ut.WEEK_GRID} ${ut.DAY_GRID_MONTH} today`},views:{[ut.DAY_GRID_MONTH]:{dayHeaderFormat:{weekday:"long",week:"long"},titleFormat:{year:"numeric"},weekNumbers:!0,weekNumberContent:this.getWeekNumberContent},[ut.FIVE_DAYS_GRID]:{type:"resourceTimeGridWeek",weekends:!1,weekNumbers:!1,dayMaxEvents:2,allDayText:"",slotLabelFormat:{hour:"2-digit",minute:"2-digit"},eventTimeFormat:""},[ut.EVENTS_LIST]:{type:"listDay",dayMaxEvents:3,duration:{days:30},dayHeaderContent:this.getListViewHeaderContent,allDayText:this.$t("calendar.all_day_short")},[ut.DAY_GRID]:{slotLabelFormat:{hour:"2-digit",minute:"2-digit"},titleFormat:{month:"long",day:"2-digit",year:"numeric",weekday:"long"},weekNumbers:!1,dayMaxEvents:3,allDayText:""},[ut.WEEK_GRID]:{type:"resourceTimeGridWeek",weekNumbers:!1,dayMaxEvents:2,allDayText:"",slotLabelFormat:{hour:"2-digit",minute:"2-digit"},eventTimeFormat:""},[ut.NOTICE_BOARD]:{type:"listDay",dayMaxEvents:3,duration:{days:30},allDayText:this.$t("calendar.all_day_short"),dayHeaderContent:this.getListViewHeaderContent}},contentHeight:700,initialView:this.initialView,initialDate:this.initialDate,firstDay:Oe.a.MONDAY,scrollTime:{hour:8,minutes:0},nowIndicator:!0,nowIndicatorContent:"",moreLinkText:this.$t("button.more"),dayPopoverFormat:{weekday:"long",day:"numeric",month:"long"},datesAboveResources:!0,lazyFetching:!1,slotEventOverlap:!1,selectable:!0,noEventsText:this.$t("calendar.no_events"),eventAllow:this.eventAllow,resources:this.resources,eventSources:this.eventSources,eventClick:this.emitEventClick,select:this.emitDateSelect,loading:this.emitLoading,eventDrop:this.emitEventDrop,datesSet:this.emitDatesSet,viewDidMount:this.handleViewMount}}},mounted(){this.addPrintEvents()},beforeDestroy(){this.removePrintEvents()},methods:{getEventViewComponent(e){switch(e.type){case ut.DAY_GRID_MONTH:return $t;case ut.NOTICE_BOARD:return jt;case ut.EVENTS_LIST:return Jt;default:return Gt.a}},getEventViewProps(e,t,n){return this.getEventViewComponent(e)===Gt.a?{isStart:t,isEnd:n}:{}},emitEventClick(e){e.view.type!==ut.NOTICE_BOARD&&this.$emit("eventClick",e)},emitDateSelect(e){this.$emit("dateSelect",e)},emitLoading(e){this.$emit("loading",e)},emitEventDrop(e){this.$emit("eventDrop",e)},emitDatesSet(e){this.$emit("datesSet",e)},getApi(){return this.$refs.calendar.getApi()},getListViewHeaderContent:e=>re.a.formatDate(e.date,"dddd [den] DD. MMM YYYY"),getWeekNumberContent:e=>`Uge ${re.a.formatDate(e.date,"WW")}`,getAvatarProfileFromResource:e=>Object.assign(Object.assign({},e.extendedProps),{id:parseInt(e.extendedProps.singleId)}),getIsResourceProfileDisabled:e=>e.extendedProps.type!==Vt.a.PROFILE,gotoTodayView(){const e=this.getApi();switch(e.view.type){case ut.WEEK_GRID:case ut.FIVE_DAYS_GRID:e.gotoDate(re.a.getStartOf(new Date,"week"));break;default:e.gotoDate(new Date)}},handleViewMount(){this.getApi().setOption("contentHeight",this.getDefaultContentHeight())},getDefaultContentHeight(){switch(this.getApi().view.type){case ut.NOTICE_BOARD:case ut.EVENTS_LIST:return"auto";default:return 800}},getDefaultDayMaxEvents(){switch(this.getApi().view.type){case ut.WEEK_GRID:case ut.FIVE_DAYS_GRID:return 2;case ut.NOTICE_BOARD:case ut.DAY_GRID:case ut.EVENTS_LIST:return 3;default:return!1}},addPrintEvents(){window.addEventListener("beforeprint",this.expandCalendar),window.addEventListener("afterprint",this.collapseCalendar)},removePrintEvents(){window.removeEventListener("beforeprint",this.expandCalendar),window.removeEventListener("afterprint",this.collapseCalendar)},expandCalendar(){this.getApi().setOption("contentHeight","auto"),this.getApi().setOption("dayMaxEvents",!1)}
1,collapseCalendar(){this.getApi().setOption("dayMaxEvents",this.getDefaultDayMaxEvents()),this.getApi().setOption("contentHeight",this.getDefaultContentHeight())},eventAllow(e,t){const n=null==t?void 0:t.extendedProps.responseDeadline;return!n||!re.a.isAfter(n,e.start)}}},Xt=Object(L.a)(Zt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("FullCalendar",{ref:"calendar",attrs:{options:e.options},scopedSlots:e._u([{key:"eventContent",fn:function(t){var i=t.event,s=t.view,a=t.isStart,r=t.isEnd;return[n(e.getEventViewComponent(s),e._b({tag:"component",attrs:{"event-model":i}},"component",e.getEventViewProps(s,a,r),!1))]}},{key:"resourceLabelContent",fn:function(t){var i=t.resource;return[n("ContactAvatar",{staticClass:"calendar-resource",attrs:{profile:e.getAvatarProfileFromResource(i),disabled:e.getIsResourceProfileDisabled(i)}})]}}])})}),[],!1,null,"4aa27380",null).exports,en=n(304),tn=n(36);function nn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function an(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var on={provide:function(){var e,t=this;return e={},u()(e,S.a.onUpdateEventTypeFilters,(function(e){t.setFilterEvenTypes(e),t.activateFilters()})),u()(e,S.a.eventTypeFilters,(function(){return t.filterEventTypes})),u()(e,S.a.onUpdateExistingSharedCalendars,(function(e){t.setExistingCalendars(e),t.addResourceToCalendar()})),u()(e,S.a.existingSharedCalendars,(function(){return t.existingCalendars})),u()(e,S.a.onUpdateInstitutionCalendars,(function(e){t.setInstitutionCalendars(e),t.addResourceToCalendar()})),u()(e,S.a.institutionCalendars,(function(){return t.institutionCalendars})),u()(e,S.a.onUpdateDelegatedContext,this.onUpdateDelegatedContext),u()(e,S.a.delegatedContext,(function(){return t.delegatedContext})),u()(e,S.a.canHandleOthersEvents,(function(){return t.canHandleOthersEvents})),u()(e,S.a.onDeleteEventClicked,this.handleDeleteEventClick),u()(e,S.a.isCurrentEventCreator,(function(){return t.isCurrentEventCreator})),u()(e,S.a.isCurrentEventCoOrganizer,(function(){return t.isCurrentEventCoOrganizer})),u()(e,S.a.isHandlingOthersEvent,(function(){return t.isHandlingOthersEvent})),u()(e,S.a.isCurrentEventInvitee,(function(){return t.isCurrentEventInvitee})),u()(e,S.a.isCurrentEventInviteeAsOtp,(function(){return t.isCurrentEventInviteeAsOtp})),u()(e,S.a.occurrenceDateTime,(function(){return t.occurrenceDateTime}
1)),u()(e,S.a.defaultCalendars,(function(){return t.defaultCalendars})),e},beforeRouteLeave:function(e,t,n){var i=this;return l()(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==i.delegatedContext.id||e.path.includes("kalender")){t.next=5;break}return t.next=3,i.setDelegatedContext();case 3:i.setCalendarActiveInstProfileId(i.profile.id),i.loadNotificationsForOwnCalendar();case 5:n();case 6:case"end":return t.stop()}}),t)})))()},props:{parent:{type:String,default:"profile"},noticeBoardId:{type:Number,default:null},noticeBoardName:{type:String,default:null},showToolbar:{type:Boolean,default:!0}},data:function(){return{orientationMediaService:new wt.a("(orientation: portrait)"),defaultView:null,bootstrappingData:!1,delegatedContextId:null,filterEventTypes:[],institutionCalendars:[],calendarResourcesLimit:4,titleFormat:{month:"long",day:"2-digit",year:"numeric"},slotLabelFormat:{hour:"2-digit",minute:"2-digit"},columnHeaderFormat:{weekday:"long",day:"numeric",month:"long"},isSwitchingViewPort:!1,parentTypes:E.a,permissionEnum:g.a,drawerShow:!1,datepickerDate:I()().toDate(),moment:I.a,calendar:null,popoverEvent:{},popoverEvents:[],existingCalendars:[],earliestEventStart:null,eventToDelete:null,isDeletingOccurrence:!1,isDeletingOthersEvent:!1,isLoading:!1,isLoadingDeletedEvent:!1,confirmEditEventOK:function(){},confirmEditEventCancel:function(){},dateLabel:null,mobilePageComponent:"calendar",responseEventType:"",eventTypes:B.a,clickedEventDate:I()(),drawerRoutes:["createEvent","editEvent","createMeetingEvent","editMeetingEvent","group-calendar-create-event","group-calendar-create-meeting-event","group-calendar-edit-event","group-calendar-edit-meeting-event","editVacationRequest","viewVacationRequest"],meetingEventRouters:["createMeetingEvent","editMeetingEvent","group-calendar-create-meeting-event","group-calendar-edit-meeting-event"],originProfile:null,originalProfilePortalRole:null,isDocumentFormShown:!1,selectedDocumentId:null,selectedDocumentType:null,editDrawer:!1,documentTypes:_t.a,portalRoles:_.a,selectedTimeSlotId:null,calendarSelectedDate:null,initialDate:re.a.getStartOf(new Date,"week")}},computed:rn(rn({iconClassEnum:function(){return ae.a}},Object(m.c)({isPreviewMode:p.a.GET_IS_PREVIEW_MODE,isMobile:p.a.GET_IS_MOBILE,menuItems:p.a.GET_MENU_ITEMS,events:p.a.GET_EVENTS,currentEvent:p.a.GET_CURRENT_EVENT,children:p.a.GET_CHILDREN,activeChildren:p.a.GET_ACTIVE_CHILDREN,activeInstitutions:p.a.GET_ACTIVE_INSTITUTIONS,activeInstitutionsProfilesIds:p.a.GET_ACTIVE_INSTITUTIONS_PROFILES,activeGroupHome:p.a.GET_ACTIVE_GROUP_HOME,institutions:p.a.GET_INSTITUTIONS,isDropdownShown:p.a.GET_SHOW_GROUPS_DROPDOWN,getEventSelectedFromSearch:p.a.GET_EVENT_SELECTED_FROM_SEARCH,hasPermission:p.a.HAS_PERMISSION,hasPermissionGroup:p.a.HAS_PERMISSION_ON_GROUP,hasPermissionOnInstitution:p.a.HAS_PERMISSION_ON_INSTITUTION,notifications:p.a.GET_NOTIFICATIONS,conflictingAttendees:p.a.GET_WARNING_CONFLICT_EVENT_BY_ATTENDEES,group:p.a.GET_ACTIVE_GROUP,contentWrapperHeight:p.a.GET_CONTENT_WRAPPER_HEIGHT,myDelegatedAccesses:p.a.GET_MY_DELEGATED_ACCESSES,calendarActiveInstProfileId:p.a.GET_CALENDAR_ACTIVE_INST_PROFILE_ID,eventTypesForFilter:p.a.CALENDAR_GET_EVENT_TYPES_FOR_FILTER,document:p.a.GET_DOCUMENTS_LIVE,selectedProfile:p.a.GET_SELECTED_PROFILE,activeEvent:p.a.GET_CURRENT_EVENT,hasNonBlockingProfiles:p.a.GET_HAS_NON_BLOCKING_PROFILES})),{},{userProfileStore:function(){return Object(N.a)()},profile:function(){return this.userProfileStore.institutionProfile},isProfileLoaded:function(){return!1===this.userProfileStore.isLoading},monthlyEventPopoverEventType:function(){var e;switch(null===(e=this.popoverEvents[0])||void 0===e?void 0:e.type){case B.a.HOLIDAY:case B.a.PRESENCE_HOLIDAY:return this.$t("calendar.holiday");case B.a.VACATION_REGISTRATION:return this.$t("calendar.vacation_registration");case B.a.EVENT:return this.$t("calendar.events");case B.a.BIRTHDAY:return this.$t("calendar.birthday");case B.a.LESSON:return this.$t("calendar.lesson");case B.a.PARENTAL_MEETING:return this.$t("calendar.parental_meeting");case B.a.PERFORMANCE_MEETING:return this.$t("calendar.performance_meeting");case B.a.SCHOOL_HOME_MEETING:return this.$t("calendar.school_home_meeting");case B.a.EXCURSION:return this.$t("calendar.excursion");case B.a.OTHER:return this.$t("calendar.other_events");default:return""}},monthlyEventPopoverTitle:function(){return"".concat(this.monthlyEventPopoverEventType," - ").concat(re.a.formatDate(this.clickedEventDate,"DD. MMMM"))},datePickerType:function(){var e;switch(null===(e=this.calendar)||void 0===e?void 0:e.view.type){case ut.FIVE_DAYS_GRID:case ut.WEEK_GRID:return"week";case ut.DAY_GRID_MONTH:return"month";default:return"date"}},canChangeCalendarDate:function(){return!this.isMobile&&this.parent!==E.a.NOTICE_BOARDS},defaultCalendars:function(){return null!=this.delegatedContext.id?[this.delegatedContext]:[this.defaultProfile]},isShownLoadingOverlay:function(){return this.parent!==E.a.NOTICE_BOARDS&&(this.bootstrappingData||this.isLoading)},masterDataProfiles:function(){var e,t=(null===(e=this.selectedProfile)||void 0===e?void 0:e.institutionProfiles)||[];return t.flatMap((function(e){return e.role===_.a.GUARDIAN?[e].concat(r()(e.relations)):e}))},occurrenceDateTime:function(){var e=this.$route.query.occurrence;return this.calendarSelectedDate&&(e=this.calendarSelectedDate),e},isOpenDelegatedContext:function(){var e;return null!=(null===(e=this.delegatedContext)||void 0===e?void 0:e.id)},isHandlingOthersEvent:function(){return!this.isCurrentEventCreator&&!this.isCurrentEventCoOrganizer},isCurrentEventCreator:function(){var e,t,n=this;return this.isOpenDelegatedContext?this.calendarActiveInstProfileId==(null===(e=this.currentEvent)||void 0===e||null===(t=e.creator)||void 0===t?void 0:t.id):this.institutions.filter((function(e){var t,i;return e.institutionProfileId==(null===(t=n.currentEvent)||void 0===t||null===(i=t.creator)||void 0===i?void 0:i.id)})).length>0},isCurrentEventCoOrganizer:function(){var e,t=this;if(!Array.isArray(null===(e=this.currentEvent)||void 0===e?void 0:e.coOrganizers))return!1;if(this.isOpenDelegatedContext)return this.currentEvent.coOrganizers.some((function(e){return t.calendarActiveInstProfileId==e.instProfile.id}));var n=this.institutions.map((function(e){return e.institutionProfileId}));return this.currentEvent.coOrganizers.some((function(e){return n.includes(e.instProfile.id)}))},isCurrentEventInvitee:function(){var e,t=this;return!!Array.isArray(null===(e=this.currentEvent)||void 0===e?void 0:e.invitees)&&this.currentEvent.invitees.some((function(e){return t.institutions.some((function(t){return t.institutionProfileId==e.instProfile.id}))}))},isCurrentEventInviteeAsOtp:function(){var e,t,n=this;return!!Array.isArray(null===(e=this.currentEvent)||void 0===e?void 0:e.invitedGroupHomeChildren)&&(null===(t=this.currentEvent.invitedGroupHomeChildren)||void 0===t?void 0:t.some((function(e){return n.activeGroupHome&&n.activeGroupHome.id===e.groupHomeId})))},canHandleOthersEvents:function(){var e=this.popoverEvent.extendedProps||this.currentEvent;return!(!e.institutionCode||e.type===B.a.BIRTHDAY)&&this.hasPermissionOnInstitution(g.a.HANDLE_OTHERS_EVENTS,this.currentEvent.institutionCode)},activeProfileResources:function(){var e=this.delegatedContext;
1return null==e.id&&(e=this.profile),this.resources.filter((function(t){return t.singleId==e.id||t.type===E.a.GROUP}))},delegatedContext:function(){var e=this;return this.myDelegatedAccesses.find((function(t){return t.id===e.delegatedContextId}))||{}},fullNameOfDelegatedContext:function(){return[this.delegatedContext.firstName,this.delegatedContext.lastName].join(" ")},canEditCurrentVacationRequest:function(){if(this.currentEvent&&(this.hasPermissionOnInstitution(g.a.HANDLE_VACATION_REQUESTS,this.currentEvent.institutionCode)&&I()().isBefore(this.currentEvent.startDateTime,"days")&&"viewVacationRequest"===this.$route.name))return!0;return!1},numberOfCalendarNotifications:function(){return this.notifications.filter((function(e){return e.notificationType===gt.a.ALERT&&e.notificationArea===St.a.CALENDAR})).length},isMultiButtonVisible:function(){var e=this.multiButtonItems.length>0;return this.group&&this.group.id&&"group-calendar"!==this.$route.name&&(e=!1),e},getResources:function(){var e=this;return function(){var t=l()(h.a.mark((function t(n,i){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getProfileMasterDataForSelectedProfiles();case 2:i(e.resources);case 3:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},isProfileSwitched:function(){return this.originalProfilePortalRole!=this.profile.role},resources:function(){var e=this,t=[];if([_.a.GUARDIAN,_.a.OTP].indexOf(this.profile.role)>-1&&this.parent===E.a.PROFILE){var n,i=nn(this.children);try{var s=function(){var i=n.value;if(e.activeChildren.includes(i.id)&&0==t.filter((function(e){return e.profileId==i.profileId})).length){var s={id:A.a.PROFILE.toLowerCase()+"-"+i.id,singleId:i.id,profileId:i.profileId,type:A.a.PROFILE.toLowerCase(),name:i.name,eventClassName:i.profileId,shortName:i.shortName,profilePicture:i.profilePicture};t.push(s)}};for(i.s();!(n=i.n()).done;)s()}catch(e){i.e(e)}finally{i.f()}}else if(this.profile.role===_.a.EMPLOYEE&&this.parent===E.a.PROFILE){var a,r=nn(this.existingCalendars);try{for(r.s();!(a=r.n()).done;){var o,l=a.value,c=l.type||A.a.PROFILE.toLowerCase(),u=l.singleId||l.id,d=l.name||[l.firstName,l.lastName].join(" ").trim();c===A.a.RESOURCE.toLowerCase()&&(d=l.label);var h=(null===(o=this.delegatedContext)||void 0===o?void 0:o.id)||this.profile.profileId,m=null;c===A.a.PROFILE.toLowerCase()&&(m=this.getInstitutionProfilePictureForCalendar(l)),t.push({id:c+"-"+u,singleId:u,name:d,type:c,eventClassName:c+"-"+u,shortName:l.shortName,profilePicture:m,profileId:h,activeInstProfileIds:this.activeInstitutionsProfilesIds})}}catch(e){r.e(e)}finally{r.f()}var p,v=nn(this.institutionCalendars);try{for(v.s();!(p=v.n()).done;){var f=p.value;t.push({id:f.institutionCode,singleId:f.institutionCode,name:f.name,type:"institution",shortName:f.shortName,eventClassName:f.institutionCode})}}catch(e){v.e(e)}finally{v.f()}}else if(this.profile.role===_.a.CHILD&&this.parent===E.a.PROFILE){var g={id:A.a.PROFILE.toLowerCase()+"-"+this.profile.id,singleId:this.profile.id,type:A.a.PROFILE.toLowerCase(),name:this.$getProfileDisplayName(this.profile),eventClassName:this.profile.id,shortName:this.profile.shortName,profilePicture:this.profile.profilePicture,profileId:this.profile.profileId};t.push(g)}else if(this.parent===E.a.NOTICE_BOARDS){var T={id:E.a.NOTICE_BOARDS+"-"+this.noticeBoardId,singleId:this.noticeBoardId,type:E.a.NOTICE_BOARDS,name:this.noticeBoardName,eventClassName:this.noticeBoardId};t.push(T)}if("group"===this.parent&&null!=this.group){var b={id:A.a.GROUP.toLowerCase()+"-"+this.group.id,singleId:this.group.id,type:A.a.GROUP.toLowerCase(),name:this.group.name,eventClassName:this.group.id,profilePicture:""};t.push(b)}return t},eventSources:function(){var e=this,t=[{events:function(t,n){var i=Object(ee.v)(t.start,"day"),s=Object(ee.c)(t.end,"day");if(e.defaultView===ut.EVENTS_LIST.toString()){i=Object(ee.v)(e.datepickerDate,"day");var a=e.parent===E.a.NOTICE_BOARDS?12:1;s=Object(ee.c)(Object(ee.a)(e.datepickerDate,a,"month"),"day")}
1if(e.parent===E.a.PROFILE){var o=e.calculateEventParams(i,s);if(e.resetEvent(),!e.isProfileSwitched){var l=e.existingCalendars.filter((function(e){return"group"==e.type}));l.length>0?e.fetchBirthdayEvents(i,s).then((function(){var t=l.map((function(t){return e.fetchGroupEvents(t.singleId,i,s)})),a=e.institutionCalendars.map((function(e){return e.institutionCode})),c=a.length>0?[].concat(r()(t),[e.fetchInstitutionEvents(a,i,s)]):t;Promise.all(c).then((function(){e.fetchProfileAndResourceEvents(o).then((function(){n(e.calculateResourcesAndEvents())}))}))})):e.fetchBirthdayEvents(i,s).then((function(){e.fetchProfileAndResourceEvents(o).then((function(){var t=e.institutionCalendars.map((function(e){return e.institutionCode}));t.length>0?e.fetchInstitutionEvents(t,i,s).then((function(){n(e.calculateResourcesAndEvents())})):n(e.calculateResourcesAndEvents())}))}))}}else if(e.parent===E.a.NOTICE_BOARDS)e.fetchNoticeBoardEvents(i,s).then((function(){n(e.calculateResourcesAndEvents())}));else{var c=e.group.id||e.$route.params.groupId;null!=c&&e.fetchBirthdayEvents(i,s).then((function(){e.fetchGroupEvents(c,i,s).then((function(){n(e.calculateResourcesAndEvents())}))}))}}}];return t},sortedPopoverEvents:function(){return this.popoverEvents.sort((function(e,t){return new Date(e.start)-new Date(t.start)}))},getListWidgets:function(){return null!=this.menuItems?this.menuItems[bt.a.BELOW_OF_CALENDAR]:[]},getListWidgetsNarrow:function(){return null!=this.menuItems?this.menuItems[bt.a.RIGHT_OF_CALENDAR]:[]},canCreateEvent:function(){return!(this.profile.communicationBlock&&!this.hasNonBlockingProfiles)&&this.hasPermission(g.a.HANDLE_EVENTS)&&this.parent==E.a.PROFILE},canCreateEventInGroupPage:function(){var e=this;if(this.group){var t=this.institutions.find((function(t){return t.institutionCode===e.group.institutionCode}));return!(null!=t&&t.communicationBlock)&&this.hasPermissionGroup(this.permissionEnum.INVITE_TO_EVENT,this.group.id)&&this.parent==E.a.GROUP}return!1},canCreateMeetingEvent:function(){return this.parent==E.a.PROFILE&&(this.profile.role==_.a.EMPLOYEE&&(this.hasPermission(g.a.HANDLE_PERFORMANCE_MEETING)||this.hasPermission(g.a.HANDLE_PARENTAL_MEETING_SCHOOL)||this.hasPermission(g.a.HANDLE_PARENTAL_MEETING_DAYCARE)))},canCreateMeetingEventInGroupPage:function(){return null!=this.group&&this.parent==E.a.GROUP&&(this.canCreateEventInGroupPage&&this.profile.role==this.portalRoles.EMPLOYEE&&(this.hasPermissionOnInstitution(this.permissionEnum.HANDLE_PERFORMANCE_MEETING,this.group.institutionCode)||this.hasPermissionOnInstitution(this.permissionEnum.HANDLE_PARENTAL_MEETING_SCHOOL,this.group.institutionCode)||this.hasPermissionOnInstitution(this.permissionEnum.HANDLE_PARENTAL_MEETING_DAYCARE,this.group.institutionCode)))},multiButtonItems:function(){var e=[];return(this.canCreateEvent||this.canCreateEventInGroupPage)&&e.push({icon:"icon-Aula_calendar",text:"CALENDAR_TOOLBAR_NEW_EVENT_MOBILE",action:"newEvent"}),(this.canCreateMeetingEvent||this.canCreateMeetingEventInGroupPage)&&e.push({icon:"icon-Aula_conversation",text:"CALENDAR_TOOLBAR_NEW_MEETING_EVENT_MOBILE",action:"newMeetingEvent"}),e},getDrawerTitle:function(){var e={createEvent:"CALENDAR_TITLE_CREATE_EVENT",editEvent:"CALENDAR_TITLE_EDIT_EVENT",createMeetingEvent:"CALENDAR_TITLE_CREATE_MEETING_EVENT",editMeetingEvent:"CALENDAR_TITLE_EDIT_MEETING_EVENT","group-calendar-create-event":"CALENDAR_TITLE_CREATE_EVENT","group-calendar-edit-event":"CALENDAR_TITLE_EDIT_EVENT","group-calendar-create-meeting":"CALENDAR_TITLE_CREATE_MEETING_EVENT","group-calendar-edit-meeting-event":"CALENDAR_TITLE_EDIT_MEETING_EVENT","group-calendar-edit-meeting":"CALENDAR_TITLE_EDIT_MEETING_EVENT",editVacationRequest:"CALENDAR_TOOLBAR_REQUEST_VACATION_HEADER","group-calendar-create-meeting-event":"CALENDAR_TITLE_CREATE_MEETING_EVENT"},t=this.$getText("CALENDAR_TITLE_CREATE_EVENT");return this.currentEvent.type===B.a.LESSON&&"editEvent"==this.$route.name?t=this.$getText("CALENDAR_TITLE_EDIT_LESSON"):null!=e[this.$route.name]?t=this.$getText(e[this.$route.name]):"viewVacationRequest"===this.$route.name&&(t=this.currentEvent.title),t},defaultProfile:function(){return{label:this.$getProfileDisplayName(this.profile),value:A.a.PROFILE.toLowerCase()+this.profile.id+this.profile.institutionCode,name:this.$getProfileDisplayName(this.profile),role:this.profile.role,
1id:A.a.PROFILE.toLowerCase()+"-"+this.profile.id,singleId:this.profile.id,shortName:this.profile.shortName,type:A.a.PROFILE.toLowerCase(),institutionCode:this.profile.institutionCode,profilePicture:this.profile.profilePicture}},popperClass:function(){return this.parent===E.a.PROFILE?"calendar-datepicker":"group-calendar-datepicker"},isShowMoreDetails:function(){var e=this;if((this.popoverEvent.type==B.a.EVENT||this.popoverEvent.type==B.a.EXCURSION)&&null!=this.popoverEvent.creator&&this.popoverEvent.creator.id!==this.profile.id&&this.popoverEvent.responseRequired){var t,n=nn(this.popoverEvent.invitees);try{var i=function(){var n=t.value;if((null!=e.institutions.find((function(e){return e.institutionProfileId==n.instProfile.id}))||n.instProfile.id==e.calendarActiveInstProfileId)&&n.responseType!==ft.a.WAITING)return{v:!0}};for(n.s();!(t=n.n()).done;){var a=i();if("object"===s()(a))return a.v}}catch(e){n.e(e)}finally{n.f()}var r,o=nn(this.popoverEvent.invitedGroupHomeChildren);try{for(o.s();!(r=o.n()).done;){var l=r.value;if(this.activeGroupHome&&this.activeGroupHome.id===l.groupHomeId&&l.responseType!==ft.a.WAITING)return!0}}catch(e){o.e(e)}finally{o.f()}}return!1},isInGroupDashboard:function(){return Boolean(this.group&&(this.$route.params.groupId||this.parent===E.a.GROUP))}}),methods:rn(rn(rn({},Object(m.b)({loadMyDelegatedAccesses:p.a.LOAD_MY_DELEGATED_ACCESSES,loadEventsByProfileIdsAndResourceIds:p.a.LOAD_EVENTS_BY_PROFILEID,loadEventByGroupHome:p.a.LOAD_EVENTS_BY_GROUPHOME,loadBirthdayEvents:p.a.LOAD_BIRTHDAY_EVENTS,loadEventsByInstitutions:p.a.LOAD_EVENTS_BY_INSTITUTIONS,getEventById:p.a.GET_EVENT_BY_ID,getNoticeBoardEvent:p.a.LOAD_NOTICE_BOARD_EVENT,loadEventsByGroupId:p.a.LOAD_EVENTS_BY_GROUPID,loadNoticeBoardEvents:p.a.LOAD_NOTICE_BOARD_EVENTS,editTimeByDraggingEvent:p.a.EDIT_TIME_BY_DRAGGING_EVENT,deleteEvent:p.a.DELETE_EVENT,setEventSelectedFromSearch:p.a.SET_EVENT_SELECTED_FROM_SEARCH,modifyDateTimeSelectedByClickedTimeslot:p.a.MODIFY_DATETIME_SELECTED_BY_CLICKED_TIMESLOT,clearEvents:p.a.CLEAR_EVENTS,warningConflictEventByAttendees:p.a.WARNING_CONFLICT_EVENT_BY_ATTENDEES,getAvailableResources:p.a.LIST_AVAILABLE_RESOURCES,loadNotifications:p.a.LOAD_NOTIFICATIONS,deleteNotifications:p.a.DELETE_NOTIFICATIONS,setDelegatedContext:p.a.SET_DELEGATED_CONTEXT,getMasterDataForProfiles:p.a.SELECT_PROFILE,getSameAuthorityInstitutions:p.a.ACTION_GET_SAME_ADMINISTRATIVE_AUTHORITY_INSTITUTIONS})),Object(m.d)({resetEvent:p.a.MUTATE_CLEAR_EVENTS,setCalendarActiveInstProfileId:p.a.MUTATE_CALENDAR_ACTIVE_INST_PROFILE_ID,resetActiveEvent:p.a.MUTATE_RESET_ACTIVE_EVENT})),{},{formattedEventDate:function(e){return re.a.shortDate(e)},formattedEventTime:function(e){return re.a.formatDate(e,"HH:mm")},handleDatePickerFocus:function(){var e;(null===(e=this.calendar)||void 0===e?void 0:e.view.type)!==ut.DAY_GRID_MONTH&&this.datePickerModifier()},handleDeleteEventClick:function(e){var t=e.eventData,n=e.isCurrentEvent,i=void 0===n||n,s=e.isDeletingOthersEvent,a=void 0!==s&&s;this.eventToDelete=t,this.isDeletingOccurrence=i,this.isDeletingOthersEvent=a,this.$refs.deleteModal.show()},getProfileMasterDataForSelectedProfiles:function(){var e=this,t=r()(this.activeInstitutionsProfilesIds);if(this.delegatedContextId&&t.push(this.delegatedContextId),0!==t.length)return this.getMasterDataForProfiles({instProfileIds:t,fromAdministration:!1}).catch((function(){e.defaultCalendars}))},getInstitutionProfilePictureForCalendar:function(e){var t=this.masterDataProfiles.find((function(t){return t.id==e.id||t.id==e.singleId}));return(null==t?void 0:t.profilePicture)||null},openDrawer:function(){this.drawerShow=!0},onOpenChildVacationRequest:function(e){var t=e.child,n=e.hasAnswered,i=e.registrationResponseId,s=new Rt.a({endDate:this.activeEvent.end,isEditable:!0,isMissingAnswer:!n,isPresenceTimesRequired:this.activeEvent.vacationRegistration.isPresenceTimesRequired,noteToGuardian:this.activeEvent.vacationRegistration.noteToGuardians,responseDeadline:this.activeEvent.responseDeadline,responseId:i,startDate:this.activeEvent.start,title:this.activeEvent.title,vacationRegistrationId:i}),a=new Ot.a(rn(rn({},t),{},{institutionCode:this.activeEvent.institutionCode}));this.$refs.registerVacationRequestDrawer.show(s,a,!1),this.drawerShow=!1},onUpdateDelegatedContext:function(e,t){var n=this;return l()(h.a.mark((function i(){return h.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,n.updateDelegatedContext({institutionProfileId:e.id});case 2:n.showCalendarPickerForMobileView(),n.reloadCalendarWithNewActiveProfileId(n.delegatedContext,t);case 4:case"end":return i.stop()}}),i)})))()},updateDelegatedContext:function(e){var t=this;return l()(h.a.mark((function n(){var i;return h.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.institutionProfileId,t.delegatedContextId=i,n.prev=2,n.next=5,t.setDelegatedContext({delegatedInstProfileId:i});case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),t.delegatedContextId=null;case 10:t.resetSearchFilters(),t.updateFilterStorage();case 12:case"end":return n.stop()}}),n,null,[[2,7]])})))()},setFilterEvenTypes:function(e){this.filterEventTypes=e},setExistingCalendars:function(e){var t=e;0===t.length&&0===this.institutionCalendars.length&&(t=this.defaultCalendars),this.existingCalendars=r()(t)},setInstitutionCalendars:function(e){this.institutionCalendars=e},setCalendarFiltersFromStorage:function(){var e=this;return l()(h.a.mark((function t(){var n,i;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(![E.a.GROUP,E.a.NOTICE_BOARDS].includes(e.parent)){t.next=2;break}return t.abrupt("return");case 2:if(n=e.profile.profileId,i=e.AulaStorage.getItem(n+Dt.a.calendarFilters,{encryption:e.profile.encryptionKey},{institutionCalendars:e.institutionCalendars,calendars:e.existingCalendars,delegatedContextId:e.delegatedContextId}),e.delegatedContextId=i.delegatedContextId,e.setExistingCalendars(i.calendars),e.setInstitutionCalendars(i.institutionCalendars),null==i.delegatedContextId){t.next=10;break}return t.next=10,e.updateDelegatedContext({institutionProfileId:i.delegatedContextId});case 10:if(!e.delegatedContextId){t.next=13;break}return t.next=13,e.reloadCalendarWithNewActiveProfileId(e.delegatedContext,!1);case 13:case"end":return t.stop()}}),t)})))()},updateFilterStorage:function(){if(![E.a.GROUP,E.a.NOTICE_BOARDS].includes(this.parent)){var e=this.profile.profileId;this.AulaStorage.setItem(e+Dt.a.calendarFilters,{encryption:this.profile.encryptionKey},{calendars:this.existingCalendars,institutionCalendars:this.institutionCalendars,delegatedContextId:this.delegatedContextId})}},resetSearchFilters:function(){[E.a.GROUP,E.a.NOTICE_BOARDS].includes(this.parent)||(this.setExistingCalendars([]),this.setInstitutionCalendars([]))},openVacationRequestDetail:function(e){this.$router.push({name:"viewVacationRequest",params:{id:e}}),this.drawerShow=!0},openDocumentDrawer:function(e){this.selectedDocumentId=e.documentId,this.selectedDocumentType=e.documentType,this.editDrawer=!1,this.$refs.calendarEventModal.hide(),this.isDocumentFormShown=!0},closeDocumentDrawer:function(){this.isDocumentFormShown=!1},closeDeletionWarning:function(){this.resetActiveEvent(),this.$refs.deleteModal.hide()}
1,calculateEventParams:function(e,t){var n=this,i=this.existingCalendars.filter((function(e){return e.type===E.a.PROFILE||n.delegatedContext.id==e.id})).map((function(e){return Number(e.singleId||e.id)}));if([_.a.OTP,_.a.GUARDIAN].indexOf(this.defaultProfile.role)>-1&&(i=i.concat(this.activeChildren)),null==this.delegatedContext.id){var s=this.institutions.filter((function(e){return n.activeInstitutions.includes(e.institutionCode)}));i=i.filter((function(e){return e!=n.profile.id}));var a,r=nn(s);try{var o=function(){var e=a.value;0===i.filter((function(t){return t==e.institutionProfileId})).length&&i.push(e.institutionProfileId)};for(r.s();!(a=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}var l=this.existingCalendars.filter((function(e){return"resource"==e.type})).map((function(e){return e.singleId}));return{instProfileIds:i,resourceIds:l,start:e,end:t,calendarActiveInstProfileId:this.calendarActiveInstProfileId}},fetchInstitutionEvents:function(e,t,n){return this.loadEventsByInstitutions({instCodes:e,start:t,end:n})},fetchProfileAndResourceEvents:function(e){var t=this;return this.profile.role===_.a.OTP?null==this.activeGroupHome?Promise.resolve([]):(e.groupHomeChildPairs=this.activeChildren.map((function(e){return{regardingChildId:e,groupHomeId:t.activeGroupHome.id}})),this.loadEventByGroupHome(e)):this.loadEventsByProfileIdsAndResourceIds(e).catch((function(e){t.resetSearchFilters(),t.updateFilterStorage(),403!==e.response.status&&429!==e.response.status&&t.reloadCalendar()}))},fetchGroupEvents:function(e,t,n){return this.loadEventsByGroupId({groupId:e,start:t,end:n,calendarActiveInstProfileId:this.calendarActiveInstProfileId,includeOnlyInvitedEvents:this.isInGroupDashboard})},fetchNoticeBoardEvents:function(e,t){return this.loadNoticeBoardEvents({start:I()(),end:t,noticeBoardId:this.noticeBoardId,limit:50})},fetchBirthdayEvents:function(e,t){var n=this.group.id,i=this.activeInstitutions;return this.calendarActiveInstProfileId!==this.profile.id&&this.existingCalendars.length>0&&null!=this.existingCalendars[0].institution&&(i=[this.existingCalendars[0].institution.institutionCode]),this.loadBirthdayEvents({instCodes:i,calendarInstProfileId:this.calendarActiveInstProfileId,groupId:n,start:e,end:t,source:"calendar"})},addResourceToCalendar:function(){var e=this;return l()(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.updateFilterStorage(),e.reloadCalendar();case 2:case"end":return t.stop()}}),t)})))()},calculateResourcesAndEvents:function(){return this.prepareAllEvents()},prepareAllEvents:function(){var e=this,t=[],n="";null!=this.calendar&&null!=this.calendar.view&&(n=this.calendar.view.type);var i,s=nn(this.events);try{var a=function(){var s=i.value;!e.hasRightOfDisposal(s)||s.type.includes("sum-")||s.type.includes("birthday")?s.startEditable=!1:s.startEditable=!0;var a=n===ut.DAY_GRID_MONTH.toString(),o=function(e){var t=It()(e.belongsTo)?e.belongsTo:[],n=It()(e.resourceIds)?e.resourceIds:[];return kt()([].concat(r()(t),r()(n)),Q.a)}(s),l=e.resources.some((function(e){return o.includes(e.id)}
1)),c=s.type.includes("sum-");if(a===c&&l)if(e.isMobile){var u,d=e.activeProfileResources;if(e.isEventDeclinedByUser(s,null===(u=d[0])||void 0===u?void 0:u.id))return"continue";var h=d.find((function(e){return o.includes(e.id)}));t.push(rn(rn({},s),{},{resourceIds:s.resourceIds,parentId:(null==h?void 0:h.id)||o[0],eventResourceIds:o}))}else if(c)t.push(rn(rn({},s),{},{resourceIds:s.resourceIds,parentId:void 0,eventResourceIds:[]}));else{var m,p=nn(o);try{var v=function(){var n=m.value;if(!e.resources.some((function(e){return e.id===n}))||e.isEventDeclinedByUser(s,n))return"continue";t.push(rn(rn({},s),{},{resourceIds:[n],parentId:n}))};for(p.s();!(m=p.n()).done;)v()}catch(e){p.e(e)}finally{p.f()}}};for(s.s();!(i=s.n()).done;)a()}catch(e){s.e(e)}finally{s.f()}return t},isCalLoading:function(e){var t=this;this.isLoading=e,e||(this.showCalendarPickerForMobileView(),this.setTabindexForMoreButtons(),this.parent!==E.a.NOTICE_BOARDS&&this.$refs.calendarToolbar.emitFilters(),this.getEventSelectedFromSearch&&this.getEventSelectedFromSearch.notificationType&&(this.editEvent(this.getEventSelectedFromSearch.eventId),this.setEventSelectedFromSearch(null)),this.isSwitchingViewPort||this.$route.path.includes("begivenhed")?this.isSwitchingViewPort=!1:(this.$refs.calendarEventModal.hide(),this.$refs.calendarPopoverMultipleEvent.hide()),this.setEarliestEventStart(),this.$nextTick((function(){t.activateFilters()})))},setTabindexForMoreButtons:function(){var e=this;this.$nextTick((function(){e.$refs.calendarView.$el.querySelectorAll(".fc-more-cell a.fc-more").forEach((function(e){e.tabIndex=0,e.addEventListener("keyup",(function(t){t.preventDefault(),"Enter"===t.key&&e.click()}))}))}))},setEarliestEventStart:function(){null==this.earliestEventStart&&(this.earliestEventStart=I()().hour(8).minute(0));var e,t=this.earliestEventStart.hour(),n=this.earliestEventStart.minute(),i=nn(this.events);try{for(i.s();!(e=i.n()).done;){var s=e.value,a=I()(s.start).hour(),r=I()(s.start).minute();if(!s.allDay)(a<t||a===t&&r<n)&&(t=a,n=r,this.earliestEventStart=I()(s.start))}}catch(e){i.e(e)}finally{i.f()}this.calendar.scrollToTime(this.earliestEventStart.format("HH:mm"))},eventDrop:function(e){var t=this,n=e.event,i=n.extendedProps;if(i.repeating&&!n.allDay&&!e.oldEvent.allDay&&!re.a.isSame(n.start,n.end,"day"))return void e.revert();var s=null!=i.timeSlot||[B.a.VACATION_REGISTRATION,B.a.PRESENCE_HOLIDAY].includes(i.type),a=null!=i.responseDeadline&&I()(i.responseDeadline,"day").isAfter(I()(n.start));if(i.repeating&&(this.calendarSelectedDate=Object(ee.e)(e.oldEvent.start,"YYYY-MM-DD")),this.popoverEvent=Object.assign(n,i),s||a)return this.$refs.modalWarningEditEvent.show(),void e.revert();this.showConfirmEditEventModal(function(){var i=l()(h.a.mark((function i(){var s,a;return h.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t.hideConfirmEditEventModal(),i.next=3,t.getEventById({eventId:n.id,occurrenceDateTime:t.occurrenceDateTime});case 3:(s=$()(t.currentEvent)).eventId=s.id,s.description=s.description.html,s.addToInstitutionCalendar=s.addedToInstitutionCalendar,s.isPrivate=s.private,s.inviteeIds=s.invitees.map((function(e){return e.instProfile.id})),s.invitedGroupIds=s.invitedGroups.map((function(e){return e.id})),s.coOrganizerIds=s.coOrganizers.map((function(e){return e.instProfile.id})),s.resourceIds=null!=s.resources?s.resources.map((function(e){return e.id})):[],s.additionalLocationIds=null!=s.additionalLocations?s.additionalLocations.map((function(e){return e.id})):[],s.additionalResourceIds=s.resourceIds.concat(s.additionalLocationIds),s.attachments.length>0&&(s.attachmentIds=[],s.attachments.forEach((function(e){s.attachmentIds.push(e.id)}))),null!=s.primaryResource&&null!=s.primaryResource.id&&""!=s.primaryResource.id&&(s.primaryResourceId=s.primaryResource.id),n.allDay?(s.allDay=n.allDay,s.start=re.a.formatDate(n.start,"YYYY-MM-DD"),s.end=s.start):(s.allDay=n.allDay,s.start=I()(n.start).format(),null!=n.end?s.end=I()(n.end).format():s.end=I()(n.start).add(30,"minutes").format()),s.invitees=t.currentEvent.invitees.map((function(e){return e.instProfile.id})),a=s.additionalLocationIds,s.primaryResourceId&&a.push(s.primaryResourceId),a.length>0||s.additionalResources.length>
10?t.showUpdateEventWithResourcesModal((function(){t.onDropOffEvent(e,s),t.$refs.removeResourcesWhenChangingDateTimeModal.hide()}),(function(){e.revert(),t.$refs.removeResourcesWhenChangingDateTimeModal.hide()})):t.onDropOffEvent(e,s);case 21:case"end":return i.stop()}}),i)})));return function(){return i.apply(this,arguments)}}(),(function(){e.revert(),t.hideConfirmEditEventModal()}))},onDropOffEvent:function(e,t){var n=this,i=Object.assign({},t);i.inviteeGroups&&(i.inviteeGroups=i.inviteeGroups.map((function(e){return{groupId:e.group.id,portalRoles:e.invitedPortalRoles}}))),i.repeating&&(i=rn(rn(rn({},i),i.repeating),{},{occurrenceDateTime:this.occurrenceDateTime})),i.invitedOtpInboxIds=i.invitedGroupHomeChildren.map((function(e){return e.otpInboxId}));var s=function(){return n.editTimeByDraggingEvent(i).then((function(){n.reloadCalendar()})).catch((function(t){var i,s=null===(i=t.response)||void 0===i?void 0:i.data.status.subCode;s===Ie.a.firstRepeatingEventExceptionOutOfRange&&n.$refs.occurrenceDateBeforeFirstOccurrence.show(),s===Ie.a.lastRepeatingEventExceptionOutOfRange&&n.$refs.occurrenceDateAfterLastOccurrence.show(),s===Ie.a.conflictingRepeatingEventInSameSeries&&n.$refs.cannotMoveRepeatingEventToExistingRepetitionWarningModal.show(),e.revert()}))};if(this.profile.role==_.a.EMPLOYEE){var a=this.currentEvent.invitees.filter((function(e){return null!=e.instProfile.id&&!n.isInviteeOtp(e.instProfile)})).map((function(e){return e.instProfile.id})),r={start:t.start,end:t.end,institutionProfileIds:a,excludeEventId:t.id,allDay:t.allDay};this.warningConflictEventByAttendees(r).then((function(t){0===t.length?s():n.showConflictEventsModal((function(){s(),n.$refs.conflictingEventsModal.hide()}),(function(){e.revert(),n.$refs.conflictingEventsModal.hide()}))}))}else s()},isInviteeOtp:function(e){return void 0!==e.otpInboxId&&null!==e.otpInboxId||e.portalRole===_.a.OTP||e.role===_.a.OTP},canDeleteEvent:function(e){return(e.isCreator||this.isChildHoliday(e))&&!(this.profile.role==_.a.CHILD&&(e.type==B.a.HOLIDAY||e.type==B.a.PRESENCE_HOLIDAY))},isChildHoliday:function(e){return null!=this.children.find((function(t){return t.id==e.creatorInstProfileId}))&&(e.type==this.eventTypes.HOLIDAY||e.type==this.eventTypes.PRESENCE_HOLIDAY)},openVacationRequestFromToolbar:function(){this.$refs.calendarToolbar.openRequestVacationForm()},activeCalendarView:function(){var e=this;this.mobilePageComponent="calendar",this.$nextTick((function(){e.initFullCalendar()}))},showCalendarPickerForMobileView:function(){this.isMobile&&this.parent!==E.a.NOTICE_BOARDS&&null!=this.$refs.calendarDatepicker&&this.$refs.calendarDatepicker.handleFocus()},openDatePicker:function(){U()(".calendar-datepicker").is(":visible")?this.$refs.calendarDatepicker.blur():this.$refs.calendarDatepicker.handleFocus()},handleDatesSet:function(e){if("dayGridMonth"===e.view.type){var t=re.a.subtractTime(e.end,1,"month");this.dateLabel=re.a.formatDate(t,"MMMM")}else{var n=re.a.formatDate(e.start,"W");this.dateLabel=this.$t("label.week_number",{number:n})}},handleOrientationChange:function(){var e=this;setTimeout((function(){e.isSwitchingViewPort=!0,e.isMobile?e.portraitMode():e.landscapeMode()}),600)},landscapeMode:function(){var e,t=this;null!=this.calendar&&(this.calendar.changeView(ut.FIVE_DAYS_GRID.toString()),null===(e=this.calendar)||void 0===e||e.
1windowResize({target:window}),this.$nextTick((function(){return t.calendar.scrollToTime("08:00")})));this.$refs.calendarDatepicker.hidePicker()},portraitMode:function(){null!=this.calendar&&this.calendar.changeView(ut.EVENTS_LIST.toString()),this.showCalendarPickerForMobileView()},changeDrawerShow:function(e){e||(this.$route.path.includes("opretbegivenhed")||this.$route.path.includes("redigerbegivenhed")?this.$refs.eventForm.$refs.simpleEvent.closeEventForm():this.$route.path.includes("opretsamtale")||this.$route.path.includes("redigersamtale")?this.$refs.eventForm.$refs.timeSlotEvent.closeEventForm():"viewVacationRequest"==this.$route.name?this.$refs.eventForm.$refs.vacationRequestDetails.closeVacationRequestDetail():this.$refs.eventForm.$refs.vacationRequestForm.closeVacationRequestForm())},goToDay:function(){null!=this.calendar&&(this.calendar.changeView("resourceTimeGridDay"),this.calendar.gotoDate(Object(ee.e)(this.clickedEventDate))),this.$refs.calendarPopoverMultipleEvent.hide()},changeCalendarDate:function(){null!=this.calendar&&this.calendar.gotoDate(I()(this.datepickerDate).toDate())},activateFilters:function(){var e=this;null!=this.calendar&&this.calendar.batchRendering((function(){var t,n=e.calendar.getEvents(),i=e.prepareAllEvents(),s=nn(n);try{for(s.s();!(t=s.n()).done;){var a=t.value;a.remove(a)}}catch(e){s.e(e)}finally{s.f()}var r,o=nn(i);try{for(o.s();!(r=o.n()).done;){var l=r.value,c=e.calendar.view.type===ut.DAY_GRID_MONTH.toString(),u=l.type.includes("sum-"),d=!0;0===e.filterEventTypes.length?d=!0===c||!1===u:!0===c&&!0===u?d=e.filterEventTypes.includes(l.type.substr(4,l.type.length))||e.filterEventTypes.includes("directlyRelated")&&!0===l.directlyRelated:!1===c&&!1===u&&(d=e.filterEventTypes.includes(l.type)||e.filterEventTypes.includes("directlyRelated")&&!0===l.directlyRelated),d&&e.calendar.addEvent(l)}}catch(e){o.e(e)}finally{o.f()}}))},loadNotificationsForOwnCalendar:function(){this.parent!==E.a.NOTICE_BOARDS&&this.loadNotifications({activeChildrenIds:this.activeChildren,activeInstitutionCodes:this.activeInstitutions})},reloadCalendarWithNewActiveProfileId:function(e,t){var n=this;return l()(h.a.mark((function i(){var s,a;return h.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(s=n.defaultProfile,a=n.profile,!t){i.next=9;break}if(null==n.delegatedContext.id){i.next=7;break}return n.delegatedContextId=null,i.next=7,n.setDelegatedContext();case 7:i.next=11;break;case 9:s=e,a=e;case 11:n.setCalendarActiveInstProfileId(a.id),n.loadNotificationsForOwnCalendar(),n.existingCalendars=[s],n.showCalendarPickerForMobileView(),n.reloadCalendar();case 16:case"end":return i.stop()}}),i)})))()},hasRightOfDisposal:function(e){var t=e.creatorInstProfileId===this.delegatedContext.id||this.institutions.some((function(t){return t.institutionProfileId==e.creatorInstProfileId})),n=e.private&&this.myDelegatedAccesses.some((function(t){return t.profileId===e.creatorProfileId}));return t&&!n},deletedEvent:function(e){var t,n=this,i=this.events.filter((function(t){return t.id==e.id}));if(this.isDeletingOccurrence&&(t=re.a.formatDate(e.startDateTime,"YYYY-MM-DD"),i=i.filter((function(e){return Object(ee.p)(e.startDateTime,t,"days")}))),this.isLoadingDeletedEvent=!0,i.length>0){var s={eventForm:i[0],occurrenceDateTime:t};this.deleteEvent(s).then((function(){n.removeEventFromCalendar(e.id,i),n.isLoadingDeletedEvent=!1,n.loadNotificationsForOwnCalendar(),n.$refs.deleteModal.hide(),n.$refs.calendarEventModal.hide()}))}this.closeDeletionWarning()},removeEventFromCalendar:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null==t&&(t=this.events.filter((function(t){return t.id==e})));var n,i=nn(t);try{for(i.s();!(n=i.n()).done;){var s,a=n.value,r=nn(this.calendar.getEvents());try{for(r.s();!(s=r.n()).done;){var o=s.value;o.extendedProps.uniqueId==a.uniqueId&&o.remove()}}catch(e){r.e(e)}finally{r.f()}}}catch(e){i.e(e)}finally{i.f()}this.reloadCalendar(),this.$refs.calendarPopoverMultipleEvent.hide(),this.$refs.calendarEventModal.hide()},reloadVacationRequest:function(){this.$refs.calendarToolbar.reloadCalendar(
1)},reloadCalendar:function(){null!=this.calendar&&(this.clearEvents(),this.calendar.refetchEvents(),this.calendar.refetchResources())},reload:function(){this.reloadCalendar(),this.loadNotificationsForOwnCalendar()},updatedEvent:function(){this.showCalendarPickerForMobileView(),this.reloadCalendar(),"group"===this.parent?this.$router.push({path:"/gruppe/"+this.$route.params.groupId+"/kalender",query:{parent:this.parent}}):this.parent===E.a.PROFILE&&this.$router.push({path:"/kalender"})},editEvent:function(e){var t=this,n=this.institutions.find((function(e){return e.institutionCode===t.activeEvent.institutionCode}));if(n&&n.communicationBlock)this.$refs.blockedCommunicationModal.show();else{var i=this.$route.query.occurrence;this.getEventById({eventId:e,occurrenceDateTime:i})}},toggleEditVacationRequest:function(){this.$router.push({name:"editVacationRequest",params:{id:this.currentEvent.id},query:{parent:E.a.PROFILE}})},showConfirmEditEventModal:function(e,t){this.confirmEditEventOK=e,this.confirmEditEventCancel=t,this.$refs.modalConfirmEditEvent.show()},hideConfirmEditEventModal:function(){this.$refs.modalConfirmEditEvent.hide()},showConflictEventsModal:function(e,t){this.confirmEditEventOK=e,this.confirmEditEventCancel=t,this.$refs.conflictingEventsModal.show()},showUpdateEventWithResourcesModal:function(e,t){this.confirmEditEventOK=e,this.confirmEditEventCancel=t,this.$refs.removeResourcesWhenChangingDateTimeModal.show()},isInDelegatedCalendar:function(e){if(void 0!==this.myDelegatedAccesses)for(var t in this.myDelegatedAccesses)if(this.myDelegatedAccesses[t].id==e)return!0;return!1},dateSelect:function(e){this.parent!==E.a.NOTICE_BOARDS&&(this.$refs.calendarEventModal.hide(),this.$refs.calendarPopoverMultipleEvent.hide(),this.isPreviewMode||(null==e.resource||null!=e.resource&&(e.resource.id==this.profile.id||this.isInDelegatedCalendar(e.resource.id))||this.canCreateEvent||this.canCreateEventInGroupPage)&&(e.start?this.modifyDateTimeSelectedByClickedTimeslot({startDateTime:I()(e.start).format(),endDateTime:I()(e.end).format(),resourceType:null!=e.resource?e.resource.type:null}):this.modifyDateTimeSelectedByClickedTimeslot({startDateTime:I()(e.date).format(),endDateTime:I()(e.date).add(30,"minutes").format(),resourceType:null!=e.resource?e.resource.type:null}),this.parent===E.a.PROFILE?this.$router.push({name:"createEvent",query:{parent:this.parent}}):this.$router.push({name:"group-calendar-create-event",query:{parent:this.parent}})))},handleEventSummaryClick:function(e){this.$refs.calendarPopoverMultipleEvent.hide(),this.$refs.calendarEventModal.show(e,null,e.regardingInstitutionProfileIds)},eventItemClick:function(e){var t,n,i=e.event;if((null===(t=i.extendedProps)||void 0===t?void 0:t.type)!==B.a.VACATION_REGISTRATION)if((null===(n=e.view)||void 0===n?void 0:n.type)===ut.DAY_GRID_MONTH)this.openEventSummary(i);else this.openEventDetails(i);else this.openVacationRequestDetail(i.id)},openEventDetails:function(e){var t,n,i,s,a,r=null!==(t=null===(n=e.getResources()[0])||void 0===n||null===(i=n.extendedProps)||void 0===i?void 0:i.activeInstProfileIds)&&void 0!==t?t:[parseInt(null===(s=e.getResources()[0])||void 0===s||null===(a=s.extendedProps)||void 0===a?void 0:a.singleId)];this.$refs.calendarEventModal.show(e,e.start,r)},openEventSummary:function(e){var t=this,n=e.extendedProps;this.clickedEventDate=e.start,this.popoverEvents=this.events.filter((function(i){if(I()(i.end).diff(I()(i.start),"days")>=1&&null!=i.parentId&&!i.allDay)for(var s=I()(i.end).diff(I()(i.start),"days")+1,a=0;a<s;a++){var r=Object(ee.a)(i.start,a,"days"),o=n.type.includes(i.type);if(Object(ee.p)(r,t.clickedEventDate)&&o)return!0}return i.parentId===e.id})),this.popoverEvents=this.filterEventsByChosenResources(this.popoverEvents).map((function(e){return e.isCreator=t.institutions.some((function(t){return t.institutionProfileId==e.creatorInstProfileId})),e})),this.$refs.calendarPopoverMultipleEvent.show()},filterEventsByChosenResources:function(e){var t=this.resources.map((function(e){return e.id}));return[_.a.EMPLOYEE,_.a.CHILD].includes(this.profile.role)?e.filter((function(e){return e.belongsTo.some((function(e){return t.includes(e)}))})):e.filter((function(e){return e.resourceIds.some((function(e){return t.includes(e)}))}))},getCalendarView:function(){var e=ut.FIVE_DAYS_GRID;return null!=this.institutions.find((function(e){return e.institutionRole==Et.a.EARLY_STUDENT}))&&(e=ut.DAY_GRID),this.parent===E.a.NOTICE_BOARDS?e=ut.NOTICE_BOARD:this.isMobile&&(e=ut.EVENTS_LIST),e.toString()},initFullCalendar:function(){this.calendar=this.$refs.calendarView.getApi(),this.isProfileLoaded&&(this.originProfile=$()(this.profile),this.clearEvents()),-1!=this.drawerRoutes.indexOf(this.$route.name)&&(this.drawerShow=!0),this.isMobile&&this.parent!==E.a.NOTICE_BOARDS&&null!=this.$refs.calendarDatepicker&&this.openDatePicker(),this.updateCalendarView()},updateCalendarView:function(){this.calendar&&([].concat(r()(this.existingCalendars),r()(this.institutionCalendars)).length>this.calendarResourcesLimit&&!this.isMobile&&this.calendar.changeView("resourceTimeGridDay"))},isEventDeclinedByUser:function(e,t){var n;return Ne.a.isEventDeclinedByUser(e,this.profile.id,null===(n=this.delegatedContext)||void 0===n?void 0:n.id,this.resources,t)},canEditGroupEvent:function(){return this.hasPermission(this.permissionEnum.HANDLE_EVENTS)||this.hasPermissionGroup(this.permissionEnum.INVITE_TO_EVENT,this.group.id)||this.hasPermissionOnInstitution(this.permissionEnum.USE_GROUPS_AS_DISTRIBUTION_LISTS,this.group.institutionCode)},canEditMeeting:function(){return this.profile.role===this.portalRoles.EMPLOYEE&&this.hasPermission(this.permissionEnum.HANDLE_PERFORMANCE_MEETING)||this.hasPermission(this.permissionEnum.HANDLE_PARENTAL_MEETING_SCHOOL)||this.hasPermission(this.permissionEnum.HANDLE_PARENTAL_MEETING_DAYCARE)},getDrawerShowRoute:function(e){if(this.meetingEventRouters.includes(e.name))return this.canEditMeeting()?null:"group"===this.parent?"group-calendar":"calendar";switch(e.query.parent){case E.a.PROFILE:case E.a.CALENDAR:return this.hasPermission(this.permissionEnum.HANDLE_EVENTS)?null:"calendar";case E.a.GROUP:return this.canEditGroupEvent()?null:"group-calendar";default:return"invalid"}}}),watch:{$route:function(e){if(this.drawerRoutes.includes(e.name)&&void 0!==e.query.parent){var t=this.getDrawerShowRoute(e);
1"invalid"!==t&&(null===t?this.drawerShow=!0:this.$router.push({name:t}))}else"viewVacationRequest"!==e.name&&(this.drawerShow=!1)},existingCalendars:function(){this.updateCalendarView()},institutionCalendars:function(){this.updateCalendarView()},isProfileLoaded:function(){this.initFullCalendar()},activeChildren:function(){this.isProfileSwitched||(this.calendar.refetchResources(),this.calendar.refetchEvents())},activeInstitutions:function(){Q()(this.profile,this.originProfile)&&!this.isProfileSwitched&&(this.calendar.refetchResources(),this.calendar.refetchEvents())},activeGroupHome:function(){this.clearEvents()},isMobile:function(){var e=this.getCalendarView();this.calendar.changeView(e)}},mounted:function(){var e=this;return l()(h.a.mark((function t(){var n,i;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[e.getSameAuthorityInstitutions(e.institutions)],(i=tn.a.Read("calendarDate"))&&(e.initialDate=i,tn.a.Erase("calendarDate")),e.profile.role===_.a.EMPLOYEE&&n.push(e.loadMyDelegatedAccesses()),t.next=6,Promise.all(n);case 6:return t.next=8,e.setCalendarFiltersFromStorage();case 8:e.bootstrappingData=!1,e.$nextTick((function(){e.initFullCalendar(),e.parent!==E.a.NOTICE_BOARDS&&(e.$eventHub.$on("planningAssistantEventClicked",e.eventItemClick),e.orientationMediaService.addEventListener(e.handleOrientationChange))}));case 10:case"end":return t.stop()}}),t)})))()},created:function(){this.bootstrappingData=!0,this.originalProfilePortalRole=this.profile.role},components:{CalendarEventModal:en.a,Icon:se.a,CalendarView:Xt,Overlay:xt.a,DocumentDrawer:Lt.a,RegisterVacationRequestDrawer:Nt.a,CalendarToolbar:x,CalendarEventForm:pt,Alerts:vt.a,WidgetPlaceholder:Tt.a,MultiButtonMobile:At.a},beforeDestroy:function(){this.orientationMediaService.removeEventListener(this.handleOrientationChange),document.documentElement.style.removeProperty("--fcTimeWidth"),document.documentElement.style.removeProperty("--fcHeaderMarginRight"),document.documentElement.style.removeProperty("--fcHeaderBorderWidth"),document.documentElement.style.removeProperty("--fcDayColumnWidth"),document.documentElement.style.removeProperty("--fcPopoverOffsetTop")}},ln=on,cn=Object(L.a)(ln,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"calendar-drawer"},[e.hasPermission(e.permissionEnum.HANDLE_EVENTS)?n("div",{staticClass:"hide-tablet-up"},[e.isMultiButtonVisible?n("multi-button-mobile",{attrs:{items:e.multiButtonItems},on:{newEvent:function(t){return e.$router.push({name:e.parent==e.parentTypes.PROFILE?"createEvent":"group-calendar-create-event",query:{parent:e.parent}})},newMeetingEvent:function(t){return e.$router.push({name:e.parent==e.parentTypes.PROFILE?"createMeetingEvent":"group-calendar-create-meeting-event",query:{parent:e.parent}})},newVacationEvent:function(t){return e.openVacationRequestFromToolbar()}}}):e._e()],1):e._e(),e._v(" "),n("div",{staticClass:"calendar-container"},[n("transition",{attrs:{name:"slide-only",appear:""}},[e.parent==e.parentTypes.PROFILE?n("b-navbar",{staticClass:"mobile-page-navbar",attrs:{toggleable:!1}},[n("b-navbar-nav",[n("b-nav-item",{class:"calendar"==e.mobilePageComponent?"active":"",on:{click:e.activeCalendarView}},[e._v("\n            "+e._s(e.$getText("CALENDAR_NAVBAR_TAB_CALENDAR"))+"\n          ")]),e._v(" "),n("b-nav-item",{class:"notifications"==e.mobilePageComponent?"active":"",on:{click:function(t){e.mobilePageComponent="notifications"}}},[e._v("\n            "+e._s(e.$getText("CALENDAR_NAVBAR_TAB_NOTIFICATIONS"))+"\n            "),e.numberOfCalendarNotifications>0?n("span",{staticClass:"alert-badge"},[e._v(e._s(e.numberOfCalendarNotifications))]):e._e()])],1)],1):e._e()],1),e._v(" "),"calendar"==e.mobilePageComponent||"notifications"==e.mobilePageComponent?[e.showToolbar&&!e.bootstrappingData?n("calendar-toolbar",{ref:"calendarToolbar",attrs:{parent:e.parent,group:e.group,calendar:e.calendar,"is-mobile":e.isMobile},on:{changeCalendars:function(t){return e.setExistingCalendars(e.existingCalendars)},openVacationRequestDetail:e.openVacationRequestDetail}}
1):e._e(),e._v(" "),null!=e.delegatedContext.id?n("div",{staticClass:"delegated-access-text",on:{click:function(t){return e.onUpdateDelegatedContext({},!0)}}},[e._m(0),e._v("\n        "+e._s(e.$getText("CALENDAR_ACTIVE_DELEGATED_ACCESS_START"))+"\n        "+e._s(e.fullNameOfDelegatedContext)+".\n        "+e._s(e.$getText("CALENDAR_ACTIVE_DELEGATED_ACCESS_END"))+"\n      ")]):e._e(),e._v(" "),(!e.isMobile||e.isMobile&&"notifications"==e.mobilePageComponent)&&e.parent!==e.parentTypes.NOTICE_BOARDS&&e.parent!==e.parentTypes.GROUP?n("alerts",{attrs:{parent:e.parentTypes.CALENDAR,"filter-by-active-group":e.parent==e.parentTypes.GROUP},on:{updated:e.reload}}):e._e(),e._v(" "),e.isMobile&&"notifications"==e.mobilePageComponent&&e.parent!==e.parentTypes.NOTICE_BOARDS&&0===e.numberOfCalendarNotifications?n("div",{staticClass:"no-notification"},[e._v("\n        "+e._s(e.$getText("CALENDAR_NOTIFY_MESSAGE_NO_NOTIFICATIONS"))+"\n      ")]):e._e(),e._v(" "),"calendar"!=e.mobilePageComponent&&e.isMobile?e._e():n("div",{staticClass:"aula-calendar",class:{"disable-mouse-clicks":e.isLoading}},[n("el-date-picker",{ref:"calendarDatepicker",staticClass:"datetime-input",attrs:{"popper-class":e.popperClass,"append-to-body":!1,clearable:!1,type:e.datePickerType,"value-format":"yyyy-MM-dd",format:"dd/MM/yyyy","aria-hidden":"true","prefix-icon":"icon-Aula_down-arrow","picker-options":{firstDayOfWeek:1},editable:!1},on:{blur:e.showCalendarPickerForMobileView,focus:e.handleDatePickerFocus,change:e.changeCalendarDate},model:{value:e.datepickerDate,callback:function(t){e.datepickerDate=t},expression:"datepickerDate"}}),e._v(" "),e.parent!=e.parentTypes.NOTICE_BOARDS?n("h1",{staticClass:"mx-2 mx-lg-0 my-2 mt-lg-0"},[e._v("\n          "+e._s(e.$getText("CALENDAR_PAGE_TITLE"))+"\n        ")]):e._e(),e._v(" "),e.canChangeCalendarDate?n("b-button",{staticClass:"date-picker-button",attrs:{variant:"link"},on:{click:e.openDatePicker}},[e._v("\n          "+e._s(e.dateLabel)+"\n          "),n("Icon",{attrs:{name:e.iconClassEnum.DOWN_ARROW}})],1):e._e(),e._v(" "),n("Overlay",{staticClass:"calendar-overlay",attrs:{show:e.isShownLoadingOverlay},scopedSlots:e._u([{key:"overlay",fn:function(){return[n("b-spinner",{staticClass:"calendar-spinner",attrs:{"data-testid":"calendar-spinner"}})]},proxy:!0}],null,!1,224814314)},[e._v(" "),e.bootstrappingData?e._e():n("CalendarView",{ref:"calendarView",attrs:{"event-sources":e.eventSources,resources:e.getResources,"initial-view":e.getCalendarView(),"initial-date":e.initialDate},on:{eventClick:e.eventItemClick,dateSelect:e.dateSelect,loading:e.isCalLoading,eventDrop:e.eventDrop,openDatePicker:e.openDatePicker,datesSet:e.handleDatesSet}})],1)],1),e._v(" "),n("div",{staticClass:"widgets-below"},[e.isMobile?n("widget-placeholder",{attrs:{"list-of-widgets":e.getListWidgetsNarrow,placement:"narrow"}}):e._e()],1),e._v(" "),e.parent!==e.parentTypes.NOTICE_BOARDS?n("widget-placeholder",{staticClass:"p-2 p-lg-4",attrs:{"list-of-widgets":e.getListWidgets,placement:"medium"}}):e._e()]:e._e()],2),e._v(" "),n("aula-modal",{ref:"cannotMoveRepeatingEventToExistingRepetitionWarningModal",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.cannotMoveRepeatingEventToExistingRepetitionWarningModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_REPEATING_EVENT_CANNOT_MOVE_TO_EXISTING_REPETITION"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"modalConfirmEditEvent",attrs:{"ok-text":"CALENDAR_BUTTON_CONFIRM","cancel-text":"CALENDAR_BUTTON_UNDO"},on:{closeClicked:e.confirmEditEventCancel,cancelClicked:e.confirmEditEventCancel,okClicked:e.confirmEditEventOK}},[n("p",[e._v("\n      "+e._s(e.$getText("CALENDAR_NOTIFY_MESSAGE_1"))+"\n      "+e._s(e.popoverEvent.title)+"\n      "+e._s(e.$getText("CALENDAR_NOTIFY_MESSAGE_2"))+"\n      "+e._s(e.moment(e.popoverEvent.start).format("dddd"))+"\n      "+e._s(e.$getText("CALENDAR_NOTIFY_MESSAGE_3"))+"\n      "+e._s(e.moment(e.popoverEvent.start).format("HH:mm"))+"?\n    ")])]),e._v(" "),n("aula-modal",{ref:"occurrenceDateBeforeFirstOccurrence",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.occurrenceDateBeforeFirstOccurrence.hide()}}},[n("p",[e._v(e._s(e.$getText("CALENDAR_ALERT_OCCURENCE_DATE_BEFORE_FIRST_OCCURRENCE")))])]),e._v(" "),n("aula-modal",{ref:"occurrenceDateAfterLastOccurrence",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.occurrenceDateAfterLastOccurrence.hide()}}},[n("p",[e._v(e._s(e.$getText("CALENDAR_ALERT_OCCURENCE_DATE_AFTER_LAST_OCCURRENCE")))])]),e._v(" "),n("aula-modal",{ref:"modalWarningEditEvent",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.modalWarningEditEvent.hide()}}},[null!=e.popoverEvent.timeSlot?n("p",[e._v("\n      "+e._s(e.$getText("CALENDAR_WARNING_EDIT_TIMESLOT"))+"\n    ")]):e.popoverEvent.type==e.eventTypes.HOLIDAY||e.popoverEvent.type==e.eventTypes.PRESENCE_HOLIDAY?n("p",[e._v("\n      "+e._s(e.$getText("CALENDAR_WARNING_EDIT_HOLIDAY"))+"\n    ")]):e.popoverEvent.type==e.eventTypes.VACATION_REGISTRATION?n("p",[e._v("\n      "+e._s(e.$getText("CALENDAR_WARNING_EDIT_PRESENCE_REGISTRATION"))+"\n    ")]):null!=e.popoverEvent.responseDeadline&&e.moment(e.popoverEvent.responseDeadline).isAfter(e.moment(e.popoverEvent.
1start))?n("p",[e._v("\n      "+e._s(e.$getText("CALENDAR_WARNING_DRAG_DROP_DEADLINE"))+"\n    ")]):e._e()]),e._v(" "),n("aula-modal",{ref:"conflictingEventsModal",attrs:{"ok-text":"BUTTON_YES"},on:{closeClicked:e.confirmEditEventCancel,cancelClicked:e.confirmEditEventCancel,okClicked:e.confirmEditEventOK}},[e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_CONFLICTINT_INVITEES"))),n("br"),n("br"),e._v(" "),e._l(e.conflictingAttendees,(function(t,i){return[e._v("\n      "+e._s(e.$getProfileDisplayName(t))),n("br",{key:i})]})),e._v("\n    "+e._s(e.$getText("CALENDAR_ALERT_CONFLICTINT_CONFIRM"))),n("br")],2),e._v(" "),n("aula-modal",{ref:"blockedCommunicationModal",attrs:{"header-text":"CALENDAR_BLOCK_COMMUNICATION_TITLE","show-cancel":!1},on:{okClicked:function(t){return e.$refs.blockedCommunicationModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_BLOCK_COMMUNICATION_BODY"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"deleteModal",attrs:{"ok-text":"YES","is-loading":e.isLoadingDeletedEvent},on:{cancelClicked:function(t){return e.$refs.deleteModal.hide()},okClicked:function(t){return e.deletedEvent(e.eventToDelete)}}},[e.isDeletingOthersEvent?[e._v("\n      "+e._s(e.$getText("CALENDAR_DELETE_OTHERS_EVENT_WARNING_1"))),n("br"),e._v("\n      "+e._s(e.$getText("CALENDAR_DELETE_OTHERS_EVENT_WARNING_2"))+"\n    ")]:!e.eventToDelete||e.eventToDelete.type!=e.eventTypes.HOLIDAY&&e.eventToDelete.type!=e.eventTypes.PRESENCE_HOLIDAY?null!=e.eventToDelete&&null!=e.eventToDelete.repeating?[e.isDeletingOccurrence?[e._v("\n        "+e._s(e.$getText("CALENDAR_DELETE_OCCURRENCE_EVENT_TEXT"))),n("br"),e._v(e._s(e.$getText("CALENDAR_DELETE_OCCURRENCE_EVENT_TEXT_2"))+"\n      ")]:[e._v("\n        "+e._s(e.$getText("CALENDAR_DELETE_SERIES_EVENT_TEXT"))),n("br"),e._v(e._s(e.$getText("CALENDAR_DELETE_SERIES_EVENT_TEXT_2"))+"\n      ")]]:[e._v("\n      "+e._s(e.$getText("CALENDAR_DELETE_EVENT_TEXT"))+"\n    ")]:[e._v("\n      "+e._s(e.$getText("CALENDAR_DELETE_HOLIDAY_TEXT"))),n("br"),e._v(e._s(e.$getText("CALENDAR_DELETE_HOLIDAY_TEXT_2"))+"\n    ")]],2),e._v(" "),n("aula-modal",{ref:"removeResourcesWhenChangingDateTimeModal",attrs:{"ok-text":"BUTTON_YES"},on:{closeClicked:e.confirmEditEventCancel,cancelClicked:e.confirmEditEventCancel,okClicked:e.confirmEditEventOK}},[e._v("\n    "+e._s(e.$getText("CALENDAR_REMOVE_RESOURCES_WHEN_CHANGING_DATE_TIME"))+"\n  ")]),e._v(" "),n("BModal",{ref:"calendarPopoverMultipleEvent",attrs:{"hide-footer":"","hide-backdrop":"",title:e.monthlyEventPopoverTitle,"body-class":"calendar-popover multiple-events"}},[n("div",{staticClass:"popover-content scrollbar"},e._l(e.sortedPopoverEvents,(function(t,i){return n("BButton",{key:i,staticClass:"popover-row",class:t.type==e.eventTypes.LESSON&&i%2==0?"":"divider",attrs:{variant:"link"},on:{click:function(n){return n.preventDefault(),e.handleEventSummaryClick(t)}}},[n("div",{staticClass:"popover-left-column"},[e.moment(t.end).diff(e.moment(t.start),"days")>=1&&t.allDay?[e._v("\n            "+e._s(e.formattedEventDate(t.start))+" -\n            "+e._s(e.formattedEventDate(e.moment(t.end).subtract(1,"minutes")))+"\n          ")]:e.moment(t.end).diff(e.moment(t.start),"days")>=1&&!t.allDay?[e._v("\n            "+e._s(e.formattedEventDate(t.start))+" - "+e._s(e.formattedEventDate(t.end))+"\n          ")]:t.allDay?[e._v("\n            "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ALL_DAY"))+"\n          ")]:[e._v("\n            "+e._s(e.formattedEventTime(t.start))+" - "+e._s(e.formattedEventTime(t.end))+"\n          ")]],2),e._v(" "),n("div",{staticClass:"popover-right-column"},[e._v("\n          "+e._s(t.title)+"\n        ")]),e._v(" "),e.canDeleteEvent(t)?n("BButton",{attrs:{variant:"link","aria-label":e.$getText("ARIA_LABEL_DELETE")},on:{click:function(n){n.stopPropagation(),e.eventToDelete=t,e.$refs.deleteModal.show()}}},[n("i",{staticClass:"icon-Aula_bin pull-right popover-icon-column"})]):e._e()],1)})),1),e._v(" "),n("div",{staticClass:"clearfix"}),e._v(" "),n("div",{staticClass:"popover-footer",class:e.popoverEvent.type!==e.eventTypes.LESSON?"popover-footer--for-non-schedule":""},[n("b-btn",{attrs:{variant:"link"},on:{click:e.goToDay}},[e._v("\n        "+e._s(e.$getText("CALENDAR_GO_TO_DAY"))+"\n        "),n("i",{staticClass:"icon-Aula_forward-arrow"})])],1)]),e._v(" "),n("CalendarEventModal",{ref:"calendarEventModal",attrs:{parent:e.parent,children:e.children},on:{deleted:e.reload,responded:e.reload,openAttachment:e.openDocumentDrawer}}),e._v(" "),n("register-vacation-request-drawer",{ref:"registerVacationRequestDrawer",on:{onClosed:e.openDrawer}}),e._v(" "),e.parent!==e.parentTypes.NOTICE_BOARDS?n("drawer",{attrs:{show:e.drawerShow},on:{"change-show":e.changeDrawerShow}},[n("template",{slot:"drawer-title"},[n("div",{staticClass:"title"},[n("i",{staticClass:"icon-Aula_export hide-tablet-down mr-3",staticStyle:{"font-size":"1.3em"},attrs:{"aria-hidden":"true"}}),e._v("\n        "+e._s(e.getDrawerTitle)+"\n        "),e.canEditCurrentVacationRequest?n("b-btn",{staticClass:"drawer
1-edit-button read-only-mode mt-0",attrs:{variant:"link","aria-label":e.$getText("ARIA_LABEL_EDIT")},on:{click:e.toggleEditVacationRequest}},[n("i",{staticClass:"icon icon-Aula_edit_pen"}),e._v(" "),e.isMobile?e._e():n("span",[e._v(" "+e._s(e.$getText("BUTTON_EDIT")))])]):e._e()],1)]),e._v(" "),n("template",{slot:"drawer-content"},[e.drawerShow?n("calendar-event-form",{ref:"eventForm",attrs:{parent:e.parent},on:{openChildVacationRequest:e.onOpenChildVacationRequest,removeEventFromCalendar:e.removeEventFromCalendar,afterUpdated:e.updatedEvent,reloadCalendar:e.reloadCalendar,reloadVacationRequest:e.reloadVacationRequest}}):e._e()],1)],2):e._e(),e._v(" "),e.isDocumentFormShown?n("DocumentDrawer",{attrs:{id:e.selectedDocumentId,type:e.selectedDocumentType,"is-edit-mode":e.editDrawer},on:{toggleEdit:function(t){e.editDrawer=!0},hidden:e.closeDocumentDrawer}}):e._e(),e._v(" "),n("aula-modal",{ref:"calendarParticipationWarning",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.calendarParticipationWarning.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_PARTICIPATION_NO_LONGER_POSSIBLE"))+"\n  ")])],1)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"circle"},[t("i",{staticClass:"icon-Aula_exclamation_sign"})])}],!1,null,"cb3ca230",null);t.a=cn.exports},1187:function(e,t,n){},1188:function(e,t,n){},1189:function(e,t,n){},1190:function(e,t,n){},1191:function(e,t,n){},1192:function(e,t,n){},1193:function(e,t,n){},1194:function(e,t,n){},1195:function(e,t,n){},120:function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return i})),function(e){e.NORMAL="normal",e.SECURE="secure",e.SSO="sso",e.NOTICEBOARD="noticeboard",e.IFRAME="iframe"}(i||(i={}))},126:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=new class{highlightKeyword(e,t){if(""===t||null==t)return e;const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return null!=e&&(e=(new DOMParser).parseFromString(e,"text/html").body.textContent||""),-1===["*","+","\\"].findIndex((e=>e===t))&&null!=e&&""!==e?e.replace(new RegExp("("+n+")","ig"),'<mark class="text__highlight">$1</mark>'):e}decodeEntity(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&frasl;/g,"/")}encodeEntity(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&frasl;")}stripHTML(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}}},143:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(37),s=n(112),a=n(62);const r=new class{getPrimaryLocation(e){var t;let n="";const i=(null===(t=e.additionalResources)||void 0===t?void 0:t.filter((e=>e.resourceCategory.resourceType===s.a.LOCATION)))||[];return null!=e.primaryResource?n=e.primaryResource.name:null!=e.primaryResourceText?n=e.primaryResourceText:i.length>0?n=i[0].name:null!=e.additionalResourceText&&(n=e.additionalResourceText),n}mapResource({id:e,name:t,institutionCode:n,institutionName:i,resourceCategory:s,numberOfOccurrences:a,numberOfAvailableOccurrences:r}){return{label:`${t} (${i})`,value:e,name:t,resourceType:s.resourceType,resourceCategory:s.name,id:e,institutionCode:n,numberOfOccurrences:a,numberOfAvailableOccurrences:r}}isEventDeclinedByUser(e,t,n,i,s){const r=n||t,o=i.find((e=>e.id===s)),l=r==(null==o?void 0:o.singleId),c=e.responseStatus===a.a.DECLINED;return l&&c}getIsParentalMeeting(e){return[i.a.SCHOOL_HOME_MEETING,i.a.PARENTAL_MEETING].includes(e)}}},146:function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return i})),function(e){e.PEDAGOGUE="pedagogue",e.HELP="helpTeacher",e.PRIMARY="primaryTeacher",e.SUBSTITUTE="substituteTeacher"}(i||(i={}))},177:function(e,t,n){"use strict";var i,s=n(47),a=n.n(s),r=n(1),o=n.n(r),l=n(0),c=n(6),u=n(5),d=n.n(u),h=n(18),m=n(53),p=n(51),v=n(247),f=n(14),g=Object.freeze({WEEKLY:"weekly",DAILY:"daily",MONTHLY:"monthly"}),_=n(62),E=n(54),A=n(243),T=n(43),b=n(67),C=n(8),k=n(4),y=n(131),I=n(20),S=n(15);!function(e){e.INFORMATION="information",e.ALERT="alert",e.WARNING="warning"}(i||(i={}));var D=n(34),w=n(156),N=n.n(w),R=n(295),O=n(21),L=n(35);function x(e){const t=Object(k.getCurrentInstance)();if(!t)throw new Error("useNotificationContent must be called within setup()");const n=(e,n)=>t.proxy.$getText(e,n),i=Object(k.computed)((()=>{switch(e.notificationEventType){case h.a.EVENT_CANCELLED_NO_REASON:case h.a.SINGLE_OCCURRENCE_EVENT_CANCELLED_NO_REASON:case h.a.EVENT_CANCELLED_BY_SOMEONE_ELSE:return`${n("ALERT_CANCELLED")}:`;case h.a.ADDED_TO_COMMON_INBOX:return n("ALERT_COMMON_INBOX_SHARED");case h.a.REMOVED_FROM_COMMON_INBOX:return n("ALERT_REMOVED_FROM_COMMON_INBOX");case h.a.REMOVED_RIGHTS_FOR_OTHERS_CALENDAR:return n("ALERT_RIGHTS_LOST_1");case h.a.GRANTED_RIGHTS_FOR_OTHER_CALENDAR:return n("ALERT_RIGHTS_GRANTED_1");case h.a.VACATION_REQUEST_CANCELLED_NO_REASON:return n("ALERT_VACATION_REQUEST");
1case h.a.POST_WAS_DELETED:case h.a.POST_WAS_REMOVED_FROM_GROUP_BY_ADMIN:return n("ALERT_TYPE_POST_WAS_DELETED");default:return""}})),s=Object(k.computed)((()=>{switch(e.notificationEventType){case h.a.EVENT_CHANGED_RESPONSE_REQUIRED:case h.a.INVITED_TO_EVENT_RESPONSE_REQUIRED:case h.a.INVITED_TO_REPEATING_EVENT:case h.a.INVITED_TO_PERFORMANCE_MEETING:case h.a.INVITED_TO_PARENTAL_MEETING:case h.a.INVITED_TO_SCHOOL_HOME_MEETING:case h.a.VACATION_RESPONSE_REQUIRED:case h.a.INVITED_TO_EXCEPTION_EVENT:case h.a.INVITED_TO_SINGLE_OCCURRENCE_OF_EVENT:case h.a.INVITED_TO_SURVEY:return" -";case h.a.GENERAL_INFORMATION_SENT:return"";default:return":"}})),a=Object(k.computed)((()=>{if(!e.title)return"";switch(e.notificationEventType){case h.a.EVENT_CHANGED_BY_SOMEONE_ELSE:case h.a.RESOURCE_RESERVATION_DECLINED:return"";case h.a.GENERAL_INFORMATION_SENT:return`${N()(e.title,{length:80})} ${s.value}`;default:return`${N()(e.title)} ${s.value}`}})),r=()=>R.a.getPattern(e.repeatingType,o(),e.weekdayMask,e.dayInMonth,e.dailyInterval),o=()=>e.endTime?l():"",l=()=>{const{isAllDayEvent:n,endTime:i}=e;return s="calendar.end_at",a={endDate:n?O.a.formatUtcDate(i,D.a.SHORT_DATE_WITHOUT_LEADING_ZERO):O.a.formatDate(i,D.a.SHORT_DATE_WITHOUT_LEADING_ZERO)},t.proxy.$t(s,a);var s,a};return{type:i,title:a,content:Object(k.computed)((()=>{switch(e.notificationEventType){case h.a.ADDED_TO_COMMON_INBOX:return e.commonInboxName||"";case h.a.INVITED_TO_SURVEY:return`${n("ALERT_EXPIRES")} ${O.a.formatDate(e.expires,D.a.SHORT_DATE)}`;case h.a.EVENT_CANCELLED_NO_REASON:case h.a.SINGLE_OCCURRENCE_EVENT_CANCELLED_NO_REASON:case h.a.EVENT_CANCELLED_BY_SOMEONE_ELSE:return(()=>{const t=O.a.formatDate(e.triggered,D.a.LONG_DATE_TIME),i=n("ALERT_IS_CANCELLED");let s="",a="";return O.a.isValidDate(e.startTime)&&(s=O.a.formatDate(e.startTime,D.a.LONG_DATE_TIME_WITH_DATE_PREFIX)),e.cancelledBy&&(a=`${n("ALERT_BY")} ${e.cancelledBy}`),`${s} ${i} ${a} (${t})`.trim()})();case h.a.DELETION_RULES_INFO:return e.message||"";case h.a.VACATION_REQUEST_CANCELLED_NO_REASON:return n("ALERT_DELETED");case h.a.REMOVED_FROM_COMMON_INBOX:return e.commonInboxName||"";case h.a.REMOVED_RIGHTS_FOR_OTHERS_CALENDAR:return`${e.otherCalendarPersonName||""}${n("ALERT_RIGHTS_LOST_2")}`;case h.a.GRANTED_RIGHTS_FOR_OTHER_CALENDAR:return`${e.otherCalendarPersonName||""}${n("ALERT_RIGHTS_GRANTED_2")}`;case h.a.POST_WAS_DELETED:return`\n      "${N()(e.postTitle||"")}"\n      ${n("ALERT_POST_WAS_DELETED")}\n      `;case h.a.POST_WAS_REMOVED_FROM_GROUP_BY_ADMIN:return`\n      "${N()(e.postTitle||"")}"\n      ${n("ALERT_POST_WAS_REMOVED_FROM_GROUP_BY_ADMIN")}\n      ${e.groupName||""}\n      `;case h.a.EVENT_CHANGED_BY_SOMEONE_ELSE:return(()=>{const t=O.a.formatDate(e.triggered,D.a.SHORT_DATE);return n("ALERT_EVENT_IS_EDITED",{title:e.title||"",triggered:t,updatedBy:e.updatedBy||""})})();case h.a.EVENT_CHANGED_RESPONSE_REQUIRED:case h.a.INVITED_TO_EVENT_RESPONSE_REQUIRED:return(()=>{const{isAllDayEvent:t,startTime:i,originalEventEndTime:s,endTime:a}=e;let r,o;if(t?(r=O.a.formatUtcDate(i,D.a.LONG_DATE_TIME),o=n("CALENDAR_LABEL_ALL_DAY_END_TIME")):(r=O.a.formatDate(i,D.a.LONG_DATE_TIME),o=s?O.a.formatDate(s,D.a.SHORT_TIME):O.a.formatDate(a,D.a.SHORT_TIME)),!a)return n("ALERT_DEFAULT_NOTIFICATION_CONTENT_WITHOUT_END_DATE",{startDate:r});const l=O.a.formatDate(a,D.a.SHORT_DATE);return n("ALERT_DEFAULT_NOTIFICATION_CONTENT_WITH_END_TIME",{startDate:r,endDate:l,endTime:o})})();case h.a.INVITED_TO_REPEATING_EVENT:return(()=>{const{isAllDayEvent:t,startTime:i,originalEventEndTime:s,endTime:a}=e,o=t?O.a.formatUtcDate(i,D.a.LONG_DATE_TIME):O.a.formatDate(i,D.a.LONG_DATE_TIME),l=t?n("CALENDAR_LABEL_ALL_DAY_END_TIME"):O.a.formatDate(null!=s?s:a,D.a.SHORT_TIME);return n("ALERT_REPEATED_EVENT_NOTIFICATION_CONTENT",{startDateTime:o,endTime:l,repeatingPattern:r()})})();case h.a.RESOURCE_RESERVATION_DECLINED:return(()=>{const t=n("ALERT_RESOURCE_RESERVATION_DECLINED"),i=O.a.formatDate(e.startTime,"dddd [d.] D. MMM[.] YYYY [kl.] LT");return`${t}: ${e.resourceName}. <b>'${e.title}'</b> ${i}`})();case h.a.FILE_SCAN_FAILED_POST:case h.a.FILE_SCAN_FAILED_EVENT:case h.a.FILE_SCAN_FAILED_EVENT_OCCURRENCE_EXCEPTION:case h.a.FILE_SCAN_FAILED_COMMON_FILE:case h.a.FILE_SCAN_FAILED_COMMON_INBOX_MESSAGE:case h.a.FILE_SCAN_FAILED_ALBUM:case h.a.FILE_SCAN_FAILED_EXTERNAL_SECURE_FILE:case h.a.FILE_SCAN_FAILED_INTERNAL_SECURE_DOCUMENT:case h.a.FILE_SCAN_FAILED_PRIVATE_INBOX_MESSAGE:case h.a.FILE_SCAN_FAILED_OTP_INBOX_MESSAGE:case h.a.FILE_SCAN_FAILED_PROFILE_PICTURE:return L.a.t("file.file_was_rejected").toString();default:return""}})),link:Object(k.computed)((()=>{switch(e.notificationEventType){case h.a.FILE_SCAN_FAILED_POST:case h.a.FILE_SCAN_FAILED_EVENT:case h.a.FILE_SCAN_FAILED_EVENT_OCCURRENCE_EXCEPTION:case h.a.FILE_SCAN_FAILED_COMMON_FILE:case h.a.FILE_SCAN_FAILED_COMMON_INBOX_MESSAGE:case h.a.FILE_SCAN_FAILED_ALBUM:case h.a.FILE_SCAN_FAILED_EXTERNAL_SECURE_FILE:case h.a.FILE_SCAN_FAILED_INTERNAL_SECURE_DOCUMENT:case h.a.FILE_SCAN_FAILED_PRIVATE_INBOX_MESSAGE:case h.a.FILE_SCAN_FAILED_OTP_INBOX_MESSAGE:case h.a.FILE_SCAN_FAILED_PROFILE_PICTURE:return L.a.t("file.go_to_file").toString();default:return""}})),moreInformation:Object(k.computed)((()=>e.notificationEventType===h.a.INVITED_TO_SURVEY||e.notificationEventType===h.a.GENERAL_INFORMATION_SENT?n("ALERT_SEE_MORE"):e.notificationEventType===h.a.DELETION_RULES_INFO?n("ALERT_READ_MORE"):e.notificationEventType===h.a.RESOURCE_RESERVATION_DECLINED?n("ALERT_GO_TO_EVENT"):"")),separator:s}}var P=Object(k.defineComponent)({name:"Notification",components:{Icon:I.a,AulaAlert:y.a},directives:{button:T.a},props:{notification:{type:Object,required:!0}},emits:["open","delete"],setup(e,{emit:t}){const n=Object(k.getCurrentInstance)();if(!n)throw new Error("Notification component must be used within Vue instance");const s=function(e){const t=Object(k.getCurrentInstance)();if(!t)throw new Error("useNotificationTypes must be called within setup()");const n=t.proxy.$store,s=Object(k.computed)((()=>e.notificationEventType===h.a.VACATION_RESPONSE_REQUIRED?!n.getters[l.a.GET_HAS_CUSTODY_OR_EXT
1ENDED_ACCESS](e.relatedChildInstitutionProfileId):[h.a.SOMEONE_ELSE_RESPONDED_TO_EVENT,h.a.SOMEONE_ELSE_REMOVED_YOUR_RESPONSE_TO_EVENT,h.a.INVITED_TO_EVENT_NO_RESPONSE_REQUIRED,h.a.EVENT_CHANGED_NO_RESPONSE_REQUIRED,h.a.EVENT_CANCELLED_NO_REASON,h.a.VACATION_REQUEST_CANCELLED_NO_REASON,h.a.GRANTED_RIGHTS_FOR_OTHER_CALENDAR,h.a.REMOVED_RIGHTS_FOR_OTHERS_CALENDAR,h.a.POST_WAS_DELETED,h.a.POST_WAS_REMOVED_FROM_GROUP_BY_ADMIN,h.a.LOST_ROOM_BECAUSE_OF_EXTERNAL_SCHEDULING,h.a.ADDED_TO_COMMON_INBOX,h.a.REMOVED_FROM_COMMON_INBOX,h.a.EVENT_SUBSTITUTE_ADDED,h.a.EVENT_LESSON_NOTE_CHANGED,h.a.EVENT_CHANGED_BY_SOMEONE_ELSE,h.a.EVENT_CANCELLED_BY_SOMEONE_ELSE,h.a.SINGLE_OCCURRENCE_EVENT_CANCELLED_NO_REASON,h.a.DELETION_RULES_INFO,h.a.RESOURCE_RESERVATION_DECLINED,h.a.FILE_SCAN_FAILED_POST].includes(e.notificationEventType))),a=Object(k.computed)((()=>[h.a.FILE_SCAN_FAILED_POST,h.a.FILE_SCAN_FAILED_EVENT,h.a.FILE_SCAN_FAILED_EVENT_OCCURRENCE_EXCEPTION,h.a.FILE_SCAN_FAILED_COMMON_FILE,h.a.FILE_SCAN_FAILED_COMMON_INBOX_MESSAGE,h.a.FILE_SCAN_FAILED_ALBUM,h.a.FILE_SCAN_FAILED_EXTERNAL_SECURE_FILE,h.a.FILE_SCAN_FAILED_INTERNAL_SECURE_DOCUMENT,h.a.FILE_SCAN_FAILED_PRIVATE_INBOX_MESSAGE,h.a.FILE_SCAN_FAILED_OTP_INBOX_MESSAGE,h.a.FILE_SCAN_FAILED_PROFILE_PICTURE].includes(e.notificationEventType)?i.WARNING:s.value?i.INFORMATION:i.ALERT)),r=Object(k.computed)((()=>e.notificationEventType===h.a.INVITED_TO_SURVEY||e.notificationEventType===h.a.GENERAL_INFORMATION_SENT)),o=Object(k.computed)((()=>e.notificationEventType===h.a.INVITED_TO_SURVEY||e.notificationEventType===h.a.GENERAL_INFORMATION_SENT)),c=Object(k.computed)((()=>e.notificationEventType===h.a.DELETION_RULES_INFO)),u=Object(k.computed)((()=>e.notificationEventType===h.a.RESOURCE_RESERVATION_DECLINED)),d=Object(k.computed)((()=>[h.a.EVENT_CHANGED_RESPONSE_REQUIRED,h.a.INVITED_TO_EVENT_RESPONSE_REQUIRED,h.a.INVITED_TO_REPEATING_EVENT,h.a.INVITED_TO_PERFORMANCE_MEETING,h.a.INVITED_TO_PARENTAL_MEETING,h.a.INVITED_TO_SCHOOL_HOME_MEETING,h.a.VACATION_RESPONSE_REQUIRED,h.a.INVITED_TO_EXCEPTION_EVENT,h.a.INVITED_TO_SINGLE_OCCURRENCE_OF_EVENT].includes(e.notificationEventType)));return{isDismissable:s,alertType:a,hasDefaultIcon:r,canSeeMoreInformation:o,canReadMoreInformation:c,canGoToEvent:u,isResponseRequired:d}}(e.notification),a=x(e.notification),r=Object(k.computed)((()=>({interactable:s.canSeeMoreInformation.value})));return{alertType:s.alertType,hasDefaultIcon:s.hasDefaultIcon,isResponseRequired:s.isResponseRequired,type:a.type,title:a.title,content:a.content,link:a.link,moreInformation:a.moreInformation,iconClassEnum:S.a,notificationClass:r,emitOpen:()=>{t("open")},emitDelete:()=>{t("delete")},getText:(e,t)=>n.proxy.$getText(e,t)}}}),M=n(3),F=Object(M.a)(P,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("AulaAlert",{staticClass:"notification",class:e.notificationClass,attrs:{type:e.alertType,"show-delete":!e.isResponseRequired},on:{delete:e.emitDelete,open:e.emitOpen},scopedSlots:e._u([e.hasDefaultIcon?{key:"icon",fn:function(){return[n("Icon",{staticClass:"aula-icon",attrs:{name:e.iconClassEnum.LOGO}})]},proxy:!0}:null],null,!0)},[e._v(" "),[n("div",{staticClass:"notification-wrapper"},[n("div",{staticClass:"notification-content"},[n("span",{staticClass:"sr-only"},[e._v(e._s(e.getText("ARIA_LABEL_NOTIFICATION")))]),e._v(" "),n("span",{staticClass:"type"},[e._v(e._s(e.type))]),e._v(" "),n("span",{staticClass:"title"},[e._v(e._s(e.title))]),e._v(" "),n("span",{staticClass:"content",domProps:{innerHTML:e._s(e.content)}}),e._v(" "),n("span",{staticClass:"link"},[e._v(e._s(e.link))]),e._v(" "),e.moreInformation?n("span",{staticClass:"see-more-button"},[e._v("- "+e._s(e.moreInformation))]):e._e()]),e._v(" "),e.isResponseRequired?n("div",{staticClass:"reply-button"},[e._v("\n        "+e._s(e.getText("ALERT_REPLY"))+"\n        "),n("Icon",{attrs:{name:e.iconClassEnum.EXPORT}})],1):e._e()])]],2)}),[],!1,null,"c9f62600",null).exports,U=n(23),B=n(144),V=n(304),W=n(13),G=n(22);function H(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Y(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z={directives:{Button:T.a},components:{CalendarEventModal:V.a,DocumentDrawer:B.a,Notification:F,RegisterVacationRequestDrawer:v.a},props:{parent:{type:String,default:"post"},showNoData:{type:Boolean,default:!1},filterByActiveGroup:{type:Boolean,default:!1},filteredAreas:{type:Array,default:function(){return[]}},relatedEventId:{type:Number,default:null}},emits:["updated"],data:function(){return{portalRoles:C.a,requiresReply:[h.a.INVITED_TO_EVENT_RESPONSE_REQUIRED,h.a.INVITED_TO_REPEATING_EVENT,h.a.EVENT_CHANGED_RESPONSE_REQUIRED,h.a.INVITED_TO_PERFORMANCE_MEETING,h.a.INVITED_TO_PARENTAL_MEETING,h.a.INVITED_TO_SCHOOL_HOME_MEETING,h.a.VACATION_RESPONSE_REQUIRED,h.a.INVITED_TO_EXCEPTION_EVENT,h.a.INVITED_TO_SINGLE_OCCURRENCE_OF_EVENT,h.a.INVITED_TO_SURVEY],dismissOnClick:[h.a.SOMEONE_ELSE_RESPONDED_TO_EVENT,h.a.SOMEONE_ELSE_REMOVED_YOUR_RESPONSE_TO_EVENT,h.a.INVITED_TO_EVENT_NO_RESPONSE_REQUIRED,h.a.EVENT_CHANGED_NO_RESPONSE_REQUIRED,h.a.EVENT_CANCELLED_NO_REASON,h.a.VACATION_REQUEST_CANCELLED_NO_REASON,h.a.GRANTED_RIGHTS_FOR_OTHER_CALENDAR,h.a.REMOVED_RIGHTS_FOR_OTHERS_CALENDAR,h.a.POST_WAS_DELETED,h.a.POST_WAS_REMOVED_FROM_GROUP_BY_ADMIN,h.a.LOST_ROOM_BECAUSE_OF_EXTERNAL_SCHEDULING,h.a.ADDED_TO_COMMON_INBOX,h.a.REMOVED_FROM_COMMON_INBOX,h.a.EVENT_SUBSTITUTE_ADDED,h.a.EVENT_LESSON_NOTE_CHANGED,h.a.EVENT_CANCELLED_BY_SOMEONE_ELSE,h.a.SINGLE_OCCURRENCE_EVENT_CANCELLED_NO_REASON,h.a.DELETION_RULES_INFO],popoverEvent:{},eventRepeatPatterns:g,notificationEventTypes:h.a,notificationTypes:m.a,notificationAreas:p.a,eventResponseStatus:_.a,parentTypes:f.a,relatedNotification:null,alertAmount:2,selectedDocumentId:null,selectedDocumentType:null,editDrawer:!1,isDocumentFormShown:!1,documentTypes:E.a,currentEventTimeSlotId:null,selectedNotification:null}},computed:$($({iconClassEnum:function(){return S.a}},Object(c.c)({children:l.a.GET_CHILDREN,notifications:l.a.GET_NOTIFICATIONS,currentEvent:l.a.GET_CURRENT_EVENT,institutions:l.a.GET_INSTITUTIONS,activeInstitutions:l.a.GET_ACTIVE_INSTITUTIONS,events:l.a.GET_EVENTS,document:l.a.GET_DOCUMENTS_LIVE,hasCustodyOrExtendedAccess:l.a.GET_HAS_CUSTODY_OR_EXTENDED_ACCESS,activeGroupHome:l.a.GET_ACTIVE_GROUP_HOME,isMobile:l.a.GET_IS_MOBILE,guardianVacationResponse:l.a.GET_VACATION_REQUEST_RESPONSE,group:l.a.GET_ACTIVE_GROUP,isSteppedUp:l.a.GET_GLOBAL_STEPPED_UP})),{},{userProfileStore:function(){return Object(W.a)()},profile:function(){return this.userProfileStore.institutionProfile},canRespondToSeries:function(){var e;return[h.a.EVENT_CHANGED_RESPONSE_REQUIRED,h.a.INVITED_TO_REPEATING_EVENT].includes(null===(e=this.relatedNotification)||void 0===e?void 0:e.notificationEventType)},canRespondToOccurrence:function(){var e;return[h.a.INVITED_TO_SINGLE_OCCURRENCE_OF_EVENT,h.a.INVITED_TO_EXCEPTION_EVENT].includes(null===(e=this.relatedNotification)||void 0===e?void 0:e.notificationEventType)},shownNotifications:function(){return this.parent===f.a.GROUP?[]:this.filteredAlerts.slice(0,this.alertAmount)},alerts:function(){return this.notifications.filter((function(e){return e.notificationType===m.a.ALERT}))},filteredAreaAlerts:function(){var e=this.$route.path.includes("kalender")?[p.a.CALENDAR]:this.filteredAreas;return this.alerts.filter((function(t){return 0===e.length||e.includes(t.notificationArea)}))},filteredAlerts:function(){var e=this;return this.filteredAreaAlerts.filter((function(t){var n;if(e.filterByActiveGroup)return e.events.some((function(e){return e.id===t.eventId}));if(e.relatedEventId)return t.eventId===e.relatedEventId;if(e.profile.role===e.portalRoles.OTP&&null!==(n=e.activeGroupHome)&&void 0!==n&&n.children){var i=e.activeGroupHome.children.map((function(e){return e.id})).includes(t.relatedChildInstitutionProfileId);return null==t.relatedChildInstitutionProfileId||i}var s=e.institutions.find((function(e){return e.institutionCode===t.institutionCode})),a=e.activeInstitutions.includes(null==s?void 0:s.institutionCode);return null==t.institutionCode||a}))}}),watch:{notifications:function(e){var t=this;if(this.$route.query.openvacationrequestmodal&&e.length>0){var n=e.find((function(e){return-1!==e.notificationId.indexOf(t.$route.query.openvacationrequestmodal)}));n&&this.$nextTick((function(){t.openInfoModal(n)})),this.$route.query.openvacationrequestmodal=void 0}}},methods:$($({},Object(c.b)({deleteNotifications:l.a.DELETE_NOTIFICATIONS,getEventById:l.a.GET_EVENT_BY_ID,setEventSelectedFromSearch:l.a.SET_EVENT_SELECTED_FROM_SEARCH,getVacationRegistrationResponse:l.a.LOAD_VACATION_REQUEST_RESPONSE,loadPresenceConfiguration:l.a.LOAD_PRESENCE_CONFIGURATION})),{},{getTruncatedTitle:function(e){return e?N()(e,{length:30}):""},formattedStartTime:function(e){return O.a.shortDate(e.startTime,!0,!0)},formattedEndTime:function(e){return O.a.shortDate(e.endTime,!0,!0)},formattedEventStartTime:function(e){return O.a.shortDate(e.startTime,!0,!0,e.isAllDayEvent)},formattedVacationStartDate:function(e){return O.a.shortDate(d()(e.startDate).utc(),!0)},formattedVacationEndDate:function(e){return O.a.shortDate(d()(e.endDate).utc(),!0)},emitUpdated:function(){this.$emit("updated")},getEventEndTime:function(e){var t=U.e(e.originalEventEndTime||e.endTime,D.a.SHORT_TIME),n=O.a.shortDate(e.endTime,!0,!1,e.isAllDayEvent),i=this.$getText("AT");return"".concat(n," ").concat(i," ").concat(t)},onSurveyDeclined:function(){this.$refs.surveyModal.hide(),this.isMobile||this.deleteSelectedNotifications(this.selectedNotification)},onSurveyAccepted:function(){this.$refs.surveyModal.hide(),window.open(this.selectedNotification.url,"_blank")},onGeneralInformationClosed:function(){this.$refs.generalInformationModal.hide()},deleteSelectedNotifications:function(e){var t=e.notificationId.split(":"),n=a()(t,2),i=[n[0],n[1]].join(":"),s=this.notifications.filter((function(e){return e.notificationId.includes(i)}));this.deleteNotifications({notifications:s})},onOpenNotification:function(e){switch(e.notificationEventType){case h.a.INVITED_TO_SURVEY:this.selectedNotification=e,this.$refs.surveyModal.show();break;case h.a.GENERAL_INFORMATION_SENT:this.selectedNotification=e,this.$refs.generalInformationModal.show();break;case h.a.DELETION_RULES_INFO:this.$router.push({name:"privacypolicy"});break;case h.a.RESOURCE_RESERVATION_DECLINED:this.$router.push({name:"editEvent",params:{eventId:e.eventId},query:{parent:f.a.PROFILE,occurrence:e.occurrenceDate}});break;case h.a.EVENT_CHANGED_RESPONSE_REQUIRED:case h.a.INVITED_TO_EVENT_RESPONSE_REQUIRED:case h.a.INVITED_TO_REPEATING_EVENT:case h.a.INVITED_TO_PERFORMANCE_MEETING:case h.a.INVITED_TO_PARENTAL_MEETING:case h.a.INVITED_TO_SCHOOL_HOME_MEETING:case h.a.VACATION_RESPONSE_REQUIRED:case h.a.INVITED_TO_EXCEPTION_EVENT:case h.a.INVITED_TO_SINGLE_OCCURRENCE_OF_EVENT:case h.a.EVENT_CHANGED_BY_SOMEONE_ELSE:case h.a.FILE_SCAN_FAILED_EVENT:case h.a.FILE_SCAN_FAILED_EVENT_OCCURRENCE_EXCEPTION:this.openInfoModal(e);break;case h.a.FILE_SCAN_FAILED_POST:this.$router.push({name:"group"===this.parent?"group-single-post":"singlepost",params:{id:e.postId,groupId:this.group.id}});break;case h.a.FILE_SCAN_FAILED_ALBUM:this.$router.push({name:"albumDetails",params:{albumId:e.albumId}});break;case h.a.FILE_SCAN_FAILED_INTERNAL_SECURE_DOCUMENT:this.checkStepUp(),this.$router.push({name:"viewDocument",params:{documentType:E.a.INT
1ERNAL,documentId:e.documentId}});break;case h.a.FILE_SCAN_FAILED_EXTERNAL_SECURE_FILE:this.checkStepUp(),this.$router.push({name:"viewDocument",params:{documentType:E.a.EXTERNAL,documentId:e.documentId}});break;case h.a.FILE_SCAN_FAILED_PROFILE_PICTURE:this.$router.push({name:"userview",params:{id:e.profilePictureInstitutionProfileId}});break;case h.a.FILE_SCAN_FAILED_COMMON_FILE:window.location.href="/administration/index.html#/faellesfiler/rediger/".concat(e.commonFileId);break;case h.a.FILE_SCAN_FAILED_PRIVATE_INBOX_MESSAGE:this.$router.push({name:"uniqueThread",params:{id:e.threadId}});break;case h.a.FILE_SCAN_FAILED_COMMON_INBOX_MESSAGE:this.$router.push({name:"uniqueThread",params:{id:e.threadId},query:{mailOwnerId:e.commonInboxId,mailBoxOwnerType:G.a.COMMON_INBOX}})}},checkStepUp:function(){this.isSteppedUp||(window.location.href="/auth/stepup.php")},getShouldUseNotification:function(e){return[h.a.INVITED_TO_SURVEY,h.a.GENERAL_INFORMATION_SENT,h.a.EVENT_CANCELLED_NO_REASON,h.a.SINGLE_OCCURRENCE_EVENT_CANCELLED_NO_REASON,h.a.EVENT_CANCELLED_BY_SOMEONE_ELSE,h.a.DELETION_RULES_INFO,h.a.ADDED_TO_COMMON_INBOX,h.a.REMOVED_FROM_COMMON_INBOX,h.a.GRANTED_RIGHTS_FOR_OTHER_CALENDAR,h.a.REMOVED_RIGHTS_FOR_OTHERS_CALENDAR,h.a.VACATION_REQUEST_CANCELLED_NO_REASON,h.a.POST_WAS_DELETED,h.a.POST_WAS_REMOVED_FROM_GROUP_BY_ADMIN,h.a.EVENT_CHANGED_BY_SOMEONE_ELSE,h.a.EVENT_CHANGED_RESPONSE_REQUIRED,h.a.INVITED_TO_REPEATING_EVENT,h.a.RESOURCE_RESERVATION_DECLINED,h.a.INVITED_TO_EVENT_RESPONSE_REQUIRED,h.a.FILE_SCAN_FAILED_POST,h.a.FILE_SCAN_FAILED_EVENT,h.a.FILE_SCAN_FAILED_EVENT_OCCURRENCE_EXCEPTION,h.a.FILE_SCAN_FAILED_COMMON_FILE,h.a.FILE_SCAN_FAILED_COMMON_INBOX_MESSAGE,h.a.FILE_SCAN_FAILED_ALBUM,h.a.FILE_SCAN_FAILED_EXTERNAL_SECURE_FILE,h.a.FILE_SCAN_FAILED_INTERNAL_SECURE_DOCUMENT,h.a.FILE_SCAN_FAILED_PRIVATE_INBOX_MESSAGE,h.a.FILE_SCAN_FAILED_OTP_INBOX_MESSAGE,h.a.FILE_SCAN_FAILED_PROFILE_PICTURE].includes(e.notificationEventType)},isVacationResponseWithCustody:function(e){return e.notificationEventType===h.a.VACATION_RESPONSE_REQUIRED&&this.hasCustodyOrExtendedAccess(e.relatedChildInstitutionProfileId)},isVacationResponseWithNoCustody:function(e){return e.notificationEventType===h.a.VACATION_RESPONSE_REQUIRED&&!this.hasCustodyOrExtendedAccess(e.relatedChildInstitutionProfileId)},openDocumentDrawer:function(e){this.selectedDocumentId=e.documentId,this.selectedDocumentType=e.documentType,this.editDrawer=!1,this.$refs.calendarEventModal.hide(),this.isDocumentFormShown=!0},closeDocumentDrawer:function(){this.isDocumentFormShown=!1},handleClick:function(e){-1!==this.requiresReply.indexOf(e.notificationEventType)&&this.openInfoModal(e)},deleteEventNotification:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=[];if(e){var n=this.notifications.find((function(t){return t.notificationId===e})),i=this.getBadgeId(n),s=this.notifications.find((function(e){return e.notificationId===i}));t.push({notificationId:n.notificationId,institutionProfileId:n.institutionProfileId}),s&&t.push({notificationId:s.notificationId,institutionProfileId:s.institutionProfileId})}else{var a,r=H(this.notifications);try{for(r.s();!(a=r.n()).done;){var o=a.value;o.eventId&&o.eventId==this.popoverEvent.id&&o.relatedChildInstitutionProfileId==this.popoverEvent.relatedChildInstitutionProfileId&&t.push({notificationId:o.notificationId,institutionProfileId:o.institutionProfileId})}}catch(e){r.e(e)}finally{r.f()}}this.deleteNotifications({notifications:t}),this.parent===this.parentTypes.CALENDAR&&this.$emit("afterResponseNotification")},getBadgeId:function(e){return e.notificationId.split(":").map((function(e){return b.a.isEqual(e,m.a.ALERT,{caseInsensitive:!0})?m.a.BADGE:e})).join(":")},openInfoModal:function(e){var t=this;if(e.notificationEventType===h.a.VACATION_RESPONSE_REQUIRED)this.getVacationRegistrationResponse({vacationRegistrationResponseId:e.vacationRegistrationResponseId}).then((function(){var n=!t.guardianVacationResponse.vacationRegistration.isMissingAnswer,i=t.children.find((function(t){return t.id===e.relatedChildInstitutionProfileId}));if(i)if(!1===n){var s=new A.a({endDate:e.endDate,isEditable:!0,isMissingAnswer:!0,isPresenceTimesRequired:e.isPresenceTimesRequired,noteToGuardian:e.n
1oteToGuardians,responseDeadline:e.responseDeadline,responseId:e.vacationRegistrationResponseId,startDate:e.startDate,title:e.vacationRequestName,vacationRegistrationId:e.vacationRegistrationResponseId});t.$refs.registerVacationRequestDrawer.show(s,i,!1)}else{t.$refs.vacationRequestAnsweredWarning.show();var a=t.notifications.filter((function(t){return t.notificationEventType==e.notificationEventType&&t.relatedChildInstitutionProfileId==e.relatedChildInstitutionProfileId&&t.vacationRegistrationResponseId==e.vacationRegistrationResponseId}));t.deleteNotifications({notifications:a})}}));else if(this.relatedNotification=e,null!=e.eventId&&""!=e.eventId){var n=e.occurrenceDateTime?O.a.formatDate(e.occurrenceDateTime,"YYYY-MM-DD"):null,i=e.relatedChildInstitutionProfileId||e.institutionProfileId;this.$refs.calendarEventModal.show({id:e.eventId,title:e.title},n,[i])}},alertTimeDuration:function(e){var t=d()(e.startTime),n=d()(e.endTime);return t.format("DD/MM/YYYY")==n.format("DD/MM/YYYY")?t.format("dddd, DD/MM/YYYY HH:mmz")+" - "+n.format("HH:mm"):t.format("dddd, DD/MM/YYYY HH:mm")+" - "+n.format("dddd, DD/MM/YYYY HH:mm")},rebookEventResource:function(e){this.$route.path.includes("kalender")?this.$parent.editEvent(e.eventId):(this.setEventSelectedFromSearch(e),this.$router.push({name:"calendar"})),this.deleteNotifications({notifications:[{notificationId:e.notificationId,institutionProfileId:e.institutionProfileId}]})}})},q=z,K=Object(M.a)(q,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.showNoData&&0===e.filteredAlerts.length?n("div",{staticClass:"no-data"},[e._t("no-data")],2):e.filteredAlerts.length>0?n("div",{staticClass:"aula-alert-container no-print"},[e._l(e.shownNotifications,(function(t,i){return[e.getShouldUseNotification(t)?n("Notification",{key:t.notificationId,attrs:{notification:t},on:{open:function(n){return e.onOpenNotification(t)},delete:function(n){return e.deleteSelectedNotifications(t)}}}):n("div",{key:i,staticClass:"aula-alert",on:{click:function(n){return e.handleClick(t)}}},[n("span",{staticClass:"sr-only"},[e._v("\n        "+e._s(e.$getText("ARIA_LABEL_NOTIFICATION"))+"\n      ")]),e._v(" "),e.dismissOnClick.includes(t.notificationEventType)||e.isVacationResponseWithNoCustody(t)?n("div",{staticClass:"icon-box-exclamation",attrs:{"aria-hidden":"true"}},[n("div",{staticClass:"circle"},[n("i",{staticClass:"icon-Aula_exclamation_sign"})])]):n("div",{staticClass:"icon-box",attrs:{"aria-hidden":"true"},on:{click:function(n){return e.handleClick(t)}}},[n("i",{staticClass:"icon-Aula_bell"})]),e._v(" "),-1!==e.requiresReply.indexOf(t.notificationEventType)||e.isVacationResponseWithCustody(t)?[n("div",{staticClass:"alert-text",attrs:{role:"button"},on:{click:function(n){return e.openInfoModal(t)},keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.openInfoModal(t)}}},[t.notificationEventType===e.notificationEventTypes.INVITED_TO_SCHOOL_HOME_MEETING||t.notificationEventType===e.notificationEventTypes.INVITED_TO_PARENTAL_MEETING||t.notificationEventType===e.notificationEventTypes.INVITED_TO_PERFORMANCE_MEETING?n("span",{staticClass:"d-inline"},[n("span",{staticClass:"alert-title"},[e._v(e._s(e.getTruncatedTitle(t.title)))]),e._v(" - "+e._s(e.$getText("ALERT_FROM"))+"\n            "+e._s(e.$getText("ALERT_DATE"))+"\n            "+e._s(e.formattedStartTime(t))+"\n            "+e._s(e.$getText("ALERT_TO"))+" "+e._s(e.$getText("ALERT_DATE"))+"\n            "+e._s(e.formattedEndTime(t))+"\n          ")]):e._e(),e._v(" "),t.notificationEventType===e.notificationEventTypes.INVITED_TO_EVENT_RESPONSE_REQUIRED||t.notificationEventType===e.notificationEventTypes.INVITED_TO_EXCEPTION_EVENT||t.notificationEventType===e.notificationEventTypes.INVITED_TO_SINGLE_OCCURRENCE_OF_EVENT?n("span",{staticClass:"d-inline"},[n("span",{staticClass:"alert-title"},[e._v(e._s(e.getTruncatedTitle(t.title)))]),e._v(" - "+e._s(e.$getText("ALERT_FROM"))+"\n            "+e._s(e.$getText("ALERT_DATE"))+"\n            "+e._s(e.formattedEventStartTime(t))+"\n            "),null!=t.endTime?[e._v(e._s(e.$getText("ALERT_TO"))+"\n              "+e._s(e.$getText("ALERT_DATE"))+"\n              "+e._s(e.getEventEndTime(t))+"\n            ")]:e._e(
1)],2):e._e(),e._v(" "),t.notificationEventType===e.notificationEventTypes.VACATION_RESPONSE_REQUIRED?n("span",[e._v("\n            "+e._s(t.vacationRequestName)+" - "+e._s(t.relatedChildName)+":\n            "+e._s(e.$getText("ALERT_VACATION_RESPONSE_REQUIRED"))+"\n            "+e._s(e.formattedVacationStartDate(t))+" -\n            "+e._s(e.formattedVacationEndDate(t))+"\n          ")]):e._e()]),e._v(" "),n("div",{directives:[{name:"button",rawName:"v-button"}],staticClass:"text-right alert-link",attrs:{role:"button"},on:{click:function(n){return e.openInfoModal(t)}}},[n("span",{class:{"sr-only":e.isMobile}},[e._v(e._s(e.$getText("ALERT_REPLY")))]),e._v(" "),n("i",{staticClass:"icon-Aula_export"})])]:e._e(),e._v(" "),-1!==e.dismissOnClick.indexOf(t.notificationEventType)||e.isVacationResponseWithNoCustody(t)?[t.notificationEventType===e.notificationEventTypes.EVENT_SUBSTITUTE_ADDED?n("div",{staticClass:"alert-text alert-overflow",on:{click:function(n){return e.openInfoModal(t)}}},[e._v("\n          "+e._s(t.notificationMessage)+"\n          "),n("span",{staticClass:"alert-text--highlight"},[e._v("\n            "+e._s(e.$getText("ALERT_GO_TO_LESSON_TEXT"))+"\n          ")])]):e._e(),e._v(" "),t.notificationEventType===e.notificationEventTypes.EVENT_LESSON_NOTE_CHANGED?n("div",{staticClass:"alert-text alert-overflow",on:{click:function(n){return e.openInfoModal(t)}}},[e._v("\n          "+e._s(t.notificationMessage)+"\n          "),n("span",{staticClass:"alert-text--highlight"},[e._v("\n            "+e._s(e.$getText("ALERT_GO_TO_LESSON_TEXT"))+"\n          ")])]):e._e(),e._v(" "),t.notificationEventType===e.notificationEventTypes.LOST_ROOM_BECAUSE_OF_EXTERNAL_SCHEDULING?n("div",{staticClass:"alert-text alert-overflow",on:{click:function(n){t.notificationEventType===e.notificationEventTypes.SOMEONE_ELSE_RESPONDED_TO_EVENT&&e.openInfoModal(t)}}},[e._v("\n          "+e._s(e.$getText("ALERT_RESOURCE_HAS_BOOKED_TEXT1"))+"\n          "+e._s(t.roomName)+"\n          "+e._s(e.$getText("ALERT_RESOURCE_HAS_BOOKED_TEXT2"))+"\n          "+e._s(e.getTruncatedTitle(t.title))+"\n          "+e._s(e.alertTimeDuration(t))+"\n          "+e._s(e.$getText("ALERT_RESOURCE_HAS_BOOKED_TEXT3"))+"\n          "),n("a",{on:{click:function(n){return e.rebookEventResource(t)}}},[e._v(e._s(e.$getText("ALERT_RESOURCE_HAS_BOOKED_TEXT4")))])]):t.notificationEventType===e.notificationEventTypes.EVENT_CHANGED_NO_RESPONSE_REQUIRED?n("div",{staticClass:"alert-text alert-overflow",attrs:{role:"button"},on:{click:function(n){return e.openInfoModal(t)},keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.openInfoModal(t)}}},[n("span",{staticClass:"alert-title"},[e._v(e._s(e.getTruncatedTitle(t.title)))]),e._v(" - "+e._s(e.$getText("ALERT_FROM"))+"\n          "+e._s(e.$getText("ALERT_DATE"))+"\n          "+e._s(e.formattedStartTime(t))+"\n          "+e._s(e.$getText("ALERT_TO"))+" "+e._s(e.$getText("ALERT_DATE"))+"\n          "+e._s(e.formattedEndTime(t))+"\n        ")]):t.notificationEventType===e.notificationEventTypes.SOMEONE_ELSE_RESPONDED_TO_EVENT?n("div",{staticClass:"alert-text alert-overflow",attrs:{role:"button"},on:{click:function(n){return e.openInfoModal(t)},keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.openInfoModal(t)}}},[e._v("\n          "+e._s(t.responderName)+"\n          "+e._s(e.$getText("ALERT_RESPOND_ON_BEHALF"))+" "+e._s(e.getTruncatedTitle(t.title))+"\n        ")]):t.notificationEventType===e.notificationEventTypes.SOMEONE_ELSE_REMOVED_YOUR_RESPONSE_TO_EVENT?n("div",{staticClass:"alert-text alert-overflow",attrs:{role:"button"},on:{click:function(n){return e.openInfoModal(t)},keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.openInfoModal(t)}}},[e._v("\n          "+e._s(t.responderName)+"\n          "+e._s(e.$getText("ALERT_REMOVED_TIMESLOT_RESPONSE"))+"\n          "+e._s(e.getTruncatedTitle(t.title))+"\n        ")]):e._e(),e._v(" "),n("div",{staticClass:"text-right alert-link"},[n("span",{directives:[{name:"button",rawName:"v-button"}],attrs:{"aria-label":e.$getText("ARIA_LABEL_CLOSE_NOTIFICATION")},on:{click:function(n){return e.deleteEventNotification(t.notificationId)}}},[n("i",{staticClass:"icon-Aula_close"})])])]:e._e()],2)]})),e._v(" "),"group"!==e.parent&&e.filteredAlerts.length>2?n("b-btn",{staticClass:"clearfix float-right",attrs:{variant:"link"},on:{click:function(t){2==e.alertAmount?e.alertAmount=e.filteredAlerts.length:e.alertAmount=2}}},[e._v("\n    "+e._s(2==e.alertAmount?e.$getText("ALERT_SEE_ALL_BUTTON"):e.$getText("ALERT_SEE_LESS_BUTTON"))+"\n  ")]):e._e(
1),e._v(" "),n("div",{staticClass:"clearfix"}),e._v(" "),n("CalendarEventModal",{ref:"calendarEventModal",attrs:{parent:e.parent,"show-series-responses":e.canRespondToSeries,"show-occurrence-responses":e.canRespondToOccurrence},on:{deleted:e.emitUpdated,responded:e.emitUpdated,openAttachment:e.openDocumentDrawer}}),e._v(" "),n("register-vacation-request-drawer",{ref:"registerVacationRequestDrawer"}),e._v(" "),n("aula-modal",{ref:"vacationRequestAnsweredWarning",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.vacationRequestAnsweredWarning.hide()}}},[e._v("\n    "+e._s(e.$getText("WANRING_VACATION_REQUEST_ANSWERED"))+"\n  ")]),e._v(" "),e.isDocumentFormShown?n("DocumentDrawer",{attrs:{id:e.selectedDocumentId,type:e.selectedDocumentType,"is-edit-mode":e.editDrawer},on:{toggleEdit:function(t){e.editDrawer=!0},hidden:e.closeDocumentDrawer}}):e._e(),e._v(" "),n("aula-modal",{ref:"calendarParticipationWarning",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.calendarParticipationWarning.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_PARTICIPATION_NO_LONGER_POSSIBLE"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"surveyModal",attrs:{"css-class":"survey-modal","header-icon":e.iconClassEnum.LOGO,"header-text":"","cancel-text":"ALERT_SURVEY_DECLINE","ok-text":"ALERT_SURVEY_ACCEPT"},on:{cancelClicked:e.onSurveyDeclined,okClicked:e.onSurveyAccepted}},[e.selectedNotification?[n("h4",[e._v(e._s(e.selectedNotification.title))]),e._v(" "),n("div",{staticClass:"survey-content",domProps:{innerHTML:e._s(e.selectedNotification.content.html)}})]:e._e()],2),e._v(" "),n("aula-modal",{ref:"generalInformationModal",attrs:{"css-class":"general-information-modal","show-cancel":e.isMobile,"show-ok":!1,"header-icon":e.iconClassEnum.LOGO,"header-text":"","hide-footer":""},on:{cancelClicked:e.onGeneralInformationClosed}},[e.selectedNotification?[n("h4",[e._v(e._s(e.selectedNotification.title))]),e._v(" "),n("div",{staticClass:"general-information-content",domProps:{innerHTML:e._s(e.selectedNotification.content.html)}})]:e._e()],2)],2):e._e()}),[],!1,null,"6004c35b",null);t.a=K.exports},210:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(1),r=n.n(a),o=n(7),l=n.n(o),c=n(4),u=n(78),d=n.n(u),h=n(5),m=n.n(h),p=n(749),v=n(0),f=n(6),g=n(120),_=n(16),E=n.n(_);const A=new class{constructor(){this._registry=new Map,window.addEventListener("message",(e=>{const t=e.source,n=this._registry.get(t);null!=n&&n(e)}))}register(e,t){this._registry.set(e,t)}unregister(e){this._registry.delete(e)}clear(){this._registry.clear()}};var T;!function(e){e.getAulaToken="getAulaToken",e.triggerStepUp="triggerStepUp",e.getProps="getProps",e.setIframeHeight="setIframeHeight",e.deleteNotifications="deleteNotifications"}(T||(T={}));var b=n(9),C=n(117),k=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))};const y=new class{constructor(){this.widgetSessionTokenKey="token",this.widgetSessionTokenTimeIssuedIdentifierKey="tokenTime"}getSessionToken(e){return sessionStorage.getItem(this.widgetSessionTokenKey+e)}getSessionTokenTimeIssuedIdentifier(e){return sessionStorage.getItem(this.widgetSessionTokenTimeIssuedIdentifierKey+e)}setSessionToken(e,t){sessionStorage.setItem(this.widgetSessionTokenKey+e,t)}setSessionTokenTimeIssuedIdentifier(e,t){sessionStorage.setItem(this.widgetSessionTokenTimeIssuedIdentifierKey+e,t)}getAulaToken(e,t){return k(this,void 0,void 0,(function*(){const n=this.getSessionTokenTimeIssuedIdentifier(e);let i=null;if(n&&m()().isBefore(m()(n,"DD-MM-YYYY HH:mm:ss")))i=this.getSessionToken(e);else{const n=this.getAulaTokenEndpoint(e,t);yield b.b.get(n).then((t=>{i=t.data.data,this.setSessionToken(e,i),this.setSessionTokenTimeIssuedIdentifier(e,m()().add(4,"m").format("DD-MM-YYYY HH:mm:ss"))}))}return i}))}getAulaTokenEndpoint(e,t){let n=`/?method=aulaToken.getAulaToken&widgetId=${e}`;return t===C.a.NOTICE_BOARD&&(n=`/?method=AulaTokenNoticeBoard.getAulaToken&widgetId=${e}`),n}};var I;
1!function(e){e.PROPS="props",e.TOKEN="token"}(I||(I={}));class S{constructor(e){this.type=I.PROPS,this.data=e}}class D{constructor(e){this.type=I.TOKEN,this.data=e}}var w=n(165),N=n(13);function R(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P={components:{AulaBadge:w.a},props:{name:{type:String,default:""},placement:{type:String,default:""},widgetID:{type:String,default:""},widgetVersion:{type:String,default:""},widgetType:{type:String,default:""},restrictedGroups:{type:Array,default:function(){return[]}},supplier:{type:String,default:""},source:{type:String,default:"portal"},institutionCode:{type:String,default:""},isMobile:{type:Boolean,default:!1},widgetUrl:{type:String,default:""},badgeCount:{type:Number,default:0},notifications:{type:Array,default:function(){return[]}}},data:function(){return{moment:m.a,userProfile:null,instance:null,restrictedGroupNames:null,aulaToken:null,iframeHeight:""}},computed:x(x({},Object(f.c)({currentUniLogin:v.a.GET_CURRENT_UNILOGIN,activeInstitutions:v.a.GET_ACTIVE_INSTITUTIONS,activeChildrenUniLogin:v.a.GET_ACTIVE_CHILDREN_UNILOGIN,activeWeek:v.a.GET_CURRENT_WEEK,isSteppedUp:v.a.GET_GLOBAL_STEPPED_UP,isPreviewMode:v.a.GET_IS_PREVIEW_MODE,group:v.a.GET_ACTIVE_GROUP})),{},{userProfileStore:function(){return Object(N.a)()},profile:function(){return this.userProfileStore.institutionProfile},id:function(){return"W"+this.widgetID+"V"+this.widgetVersion},widgetTitle:function(){return""===this.supplier?"":this.$getText("WIDGET_SUPPLIED_BY")+" "+this.supplier},isIframeWidget:function(){return this.widgetType.toLowerCase()===g.a.IFRAME},getGroupId:function(){return this.$route.params.groupId},axios:function(){var e=d.a.create();return e.create=d.a.create,e},assuranceLevel:function(){return this.isSteppedUp?3:2},widgetProps:function(){var e=this.widgetType.toLowerCase(),t=this.placement,n={widgetID:this.widgetID,sessionUUID:this.currentUniLogin,placement:t,currentWeekNumber:this.activeWeek,isMobileApp:this.isMobile,userProfile:this.profile.role,group:this.group.uniGroupId,source:this.source,institutionCode:this.institutionCode};return[g.a.SECURE,g.a.NORMAL,g.a.NOTICEBOARD].includes(e)&&(n.axios=this.axios,n.moment=this.moment),g.a.SECURE===e&&(n.triggerStepUp=this.triggerStepUp,n.deleteNotifications=this.removeNotifications),[g.a.SECURE,g.a.IFRAME].includes(e)&&(n.notifications=this.notifications.map((function(e){return{widgetNotificationId:e.widgetNotificationId,notificationMessage:e.notificationMessage,triggered:e.triggered,institutionCode:e.institutionCode}})),n.assuranceLevel=this.assuranceLevel,n.childFilter=this.activeChildrenUniLogin.filter((function(e,t,n){return n.indexOf(e)===t})),n.institutionFilter=this.activeInstitutions.filter((function(e,t,n){return n.indexOf(e)===t}))),[g.a.NOTICEBOARD,g.a.SECURE].some((function(t){return t===e}))&&(n.getAulaToken=function(){var e=this,i=n.widgetID;null!=i?y.getAulaToken(i,t).then((function(t){c.default.nextTick((function(){e.aulaToken=t}))})):console.error("could not determine widgetId. Will not issue aula token")}),n},widgetInstance:function(){return p.a[this.id]}}),methods:x(x(x({},Object(f.d)({setStepUpNotification:v.a.MUTATE_SET_NOTIFICATION_STEP_UP})),Object(f.b)({deleteNotifications:v.a.DELETE_NOTIFICATIONS})),{},{removeNotifications:function(e){var t=this;return s()(l.a.mark((function n(){var i,s,a,r;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=[],s=R(e);try{for(r=function(){var e=a.value,n=t.notifications.find((function(t){return t.widgetNotificationId===e}));null!=n&&i.push({notificationId:n.notificationId,institutionProfileId:n.institutionProfileId})},s.s();!(a=s.n()).done;)r()}catch(e){s.e(e)}finally{s.f()}return n.next=5,t.deleteNotifications({notifications:i});case 5:case"end":return n.stop()}}),n)})))()},removeNotificationsFromIframe:function(e){var t=this;return s()(l.a.mark((function n(){var i,s;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.metadata,s=i.notificationIds,n.next=4,t.removeNotifications(s);case 4:case"end":return n.stop()}}),n)})))()},updateIframeWidgetProps:function(){var e=new S(this.widgetProps);this.postMessageToIframe(e)},updateIframeWidgetToken:function(){var e=new D({token:this.aulaToken});this.postMessageToIframe(e)},postMessageToIframe:function(e){null!=this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,this.widgetUrl)},triggerStepUp:function(){this.isSteppedUp||this.setStepUpNotification({showStepUpNotification:!0,redirectedUrl:window.location.href})},setAulaToken:function(){var e=this;return s()(l.a.mark((function t(){var n,i;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.widgetID,i=e.placement,t.next=4,y.getAulaToken(n,i);case 4:e.aulaToken=t.sent;case 5:case"end":return t.stop()}}),t)})))()},updateWidgetIframeHeight:function(e){var t=e.metadata;this.iframeHeight=t.height+30+"px"},updateIframeWidget:function(e){var t=this;return s()(l.a.mark((function n(){var i,s;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=e.data,s=i.request,n.t0=s,n.next=n.t0===T.getProps?5:n.t0===T.triggerStepUp?7:n.t0===T.getAulaToken?9:n.t0===T.setIframeHeight?13:n.t0===T.deleteNotifications?15:19;break;case 5:case 17:return t.updateIframeWidgetProps(),n.abrupt("break",19);case 7:return t.triggerStepUp(),n.abrupt("break",19);case 9:return n.next=11,t.setAulaToken();case 11:return t.updateIframeWidgetToken(),n.abrupt("break",19);case 13:return t.updateWidgetIframeHeight(i),n.abrupt("break",19);case 15:return n.next=17,t.removeNotificationsFromIframe(i);case 19:case"end":return n.stop()}}),n)})))()},registerWidgetIframe:function(){this.isIframeWidget&&A.register(this.$refs.iframe.contentWindow,this.updateIframeWidget)}}),watch:{$route:{immediate:!0,handler:function(){var e=this;this.$nextTick((function(){e.registerWidgetIframe()}))}},widgetProps:function(){this.widgetType===g.a.IFRAME&&this.updateIframeWidgetProps()}},mounted:function(){var e=this;this.isPreviewMode&&this.restrictedGroups.length>0&&(this.restrictedGroupNames="( "+this.$getText("ONLY")+" "+this.restrictedGroups.map((function(e){return e.name})).join(" "+this.$getText("AND")+" ")+")"),c.default.nextTick((function(){e.isMobile&&E()("body").on("DOMSubtreeModified",".aula-widget",(function(){E()(".aula-widget form").removeAttr("target"),E()(".aula-widget form").attr("method","GET")}))}))},beforeDestroy:function(){A.unregister(this.widgetUrl)}},M=n(3),F=Object(M.a)(P,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"aula-widget"},[e.isPreviewMode&&e.restrictedGroupNames?n("div",{staticClass:"restricted-groups"}
1,[e._v("\n    "+e._s(e.restrictedGroupNames)+"\n  ")]):e._e(),e._v(" "),n("div",{staticClass:"widgetBox"},[n("div",{staticClass:"id"},[e._v("\n      "+e._s(e.id)+"\n    ")]),e._v(" "),n("div",{staticClass:"header"},[e.badgeCount?n("AulaBadge",{staticClass:"mr-1"},[e._v(e._s(e.badgeCount))]):e._e(),e._v(" "),n("div",{staticClass:"widget-name text-truncate"},[e._v(e._s(e.name))]),e._v(" "),e.widgetTitle?n("div",{staticClass:"widget-supplier"},[e._v(e._s(e.widgetTitle))]):e._e()],1),e._v(" "),e.isIframeWidget?n("iframe",{ref:"iframe",staticClass:"iframe-content",style:{height:e.iframeHeight},attrs:{title:e.widgetTitle,src:e.widgetUrl}}):n(e.widgetInstance,e._b({tag:"component",staticClass:"content"},"component",Object.assign({},e.widgetProps),!1))],1)])}),[],!1,null,"4ca28cb7",null);t.a=F.exports},229:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(17),r=n.n(a),o=n(1),l=n.n(o),c=n(7),u=n.n(c),d=n(4),h=n(5),m=n.n(h),p=n(23),v=n(0),f=n(115),g=n(24),_=n(30),E=n(14),A=n(8),T=n(40),b=n(60),C=n(57),k=n(66),y=n(10),I=n(6),S=n(92),D=n(84),w=n(126);class N extends D.a{constructor(){super(...arguments),this._showMandatoryTitleError=!1,this._showTitleTooLongError=!1,this._showMandatoryReceiverError=!1,this._showPermissionsError=!1,this._showMandatoryContentError=!1,this._showContentTooLongError=!1,this._isExpiredBeforePublish=!1,this.validateMandatoryTitle=e=>(this._showMandatoryTitleError=D.a.isEmpty(e.title),!this._showMandatoryTitleError),this.validateTitleTooLong=e=>(this._showTitleTooLongError=D.a.exceedsMaxLength(e.title,N.MAX_TITLE_LENGTH),!this._showTitleTooLongError),this.validateTitle=e=>this.validateMandatoryTitle(e)&&this.validateTitleTooLong(e),this.validateMandatoryReceiver=e=>e.parent!==E.a.PROFILE||(this._showMandatoryReceiverError=D.a.isEmpty(e.sharedWithGroups),!this._showMandatoryReceiverError),this.validatePermissions=()=>(this._showPermissionsError=!D.a.hasAnyPermission([y.a.WRITE_POST,y.a.USE_GROUPS_AS_DISTRIBUTION_LISTS]),!this._showPermissionsError),this.validateMandatoryContent=e=>(this._showMandatoryContentError=D.a.isEmpty(e.content),!this._showMandatoryContentError),this.validateContentTooLong=e=>(this._showContentTooLongError=D.a.exceedsMaxLength(e.content,N.MAX_MESSAGE_WITHOUT_HTML),!this._showContentTooLongError),this.validateContent=e=>this.validateMandatoryContent(e)&&this.validateContentTooLong(e),this.expiredBeforePublish=e=>{const t=Object(p.b)(e.publishAt,15,"minutes");return this._isExpiredBeforePublish=Object(p.n)(e.expireAt,t),!this._isExpiredBeforePublish}}get showMandatoryTitleError(){return this._showMandatoryTitleError}get showTitleTooLongError(){return this._showTitleTooLongError}set showTitleTooLongError(e){this._showTitleTooLongError=e}get showMandatoryReceiverError(){return this._showMandatoryReceiverError}get showPermissionsError(){return this._showPermissionsError}get showContentTooLongError(){return this._showContentTooLongError}get showMandatoryContentError(){return this._showMandatoryContentError}get showDateNotValidError(){return this._isExpiredBeforePublish}set showDateNotValidError(e){this._isExpiredBeforePublish=e}validate(e){return this.validateRules([this.validateTitle,this.validateMandatoryReceiver,this.validatePermissions,this.validateContent,this.expiredBeforePublish],e)}validatePostContent(e){const t=w.a.stripHTML(e);return this.validateRules([this.validateContent],{content:t})}}N.MAX_MESSAGE_WITHOUT_HTML=6600,N.MAX_TITLE_LENGTH=255;var R=n(252),O=n(452),L=n(257),x=n(21),P=n(118),M=n(98),F=n(97),U=n(13);function B(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?W(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H={name:"NewPost",components:{ButtonToggles:O.a,PluginTextEditor:R.a,AulaSearchRecipients:C.a,AulaTimepicker:k.a,Upload:f.a},props:{parent:{type:String,default:E.a.PROFILE},id:{type:Number,default:void 0}},data:function(){var e=this;return{showEditor:!1,showAdminWarning:!1,Vue:d.default,newPostValidator:new N,postForm:{id:"",creatorInstitutionProfileId:"",institutionCode:null,title:"",content:"",allowComments:!1,isImportant:!1,importantFrom:"",importantTo:"",sharedWithGroups:[],attachments:[],preparedAttachments:{},parent:this.parent,publishDate:m()().format("YYYY-MM-DD"),publishTime:m()().format("HH:mm:ss"),expireDate:m()().add(1,"years").format("YYYY-MM-DD"),expireTime:m()().add(1,"years").format("HH:mm:ss")},isImportantFromClicked:!1,isImportantToClicked:!1,isLoading:!1,resetRecipientsInput:!1,existingParticipants:[],blockedCommunicationChannelResponse:null,maxLength:1e4,submitDisabled:!1,moduleTypes:_.a,existingMedia:[],publishOptions:{firstDayOfWeek:1,disabledDate:function(e){return m()().startOf("day").unix()>e.getTime()/1e3}},expireOptions:{firstDayOfWeek:1,disabledDate:function(t){var n=m()(e.postForm.publishDate).startOf("day").unix(),i=m()().startOf("day").unix(),s=t.getTime()/1e3;return n>s||i>s}},availableDateFrom:{disabledDate:function(t){var n,i=m()().startOf("day").unix();return n=e.postForm.importantTo?m()(e.postForm.importantTo).startOf("day").unix():m()(t).endOf("month").unix(),i>t.getTime()/1e3||t.getTime()/1e3>n},firstDayOfWeek:1},availableDateTo:{disabledDate:function(t){var n;return e.postForm.importantFrom?(n=m()(e.postForm.importantFrom).startOf("day").unix(),t.getTime()/1e3<n):(e.postForm.importantTo=null,!0)},firstDayOfWeek:1},docTypes:g.a,portalRoles:A.a,groupTypes:T.a,parentTypes:E.a,timepickerSettings:b.a,selectedTimespan:null}},computed:G(G({},Object(I.c)({post:v.a.GET_SINGLE_POST,group:v.a.GET_ACTIVE_GROUP,draftPost:v.a.GET_DRAFT_POST,institutions:v.a.GET_INSTITUTIONS,activeInstitutionCodes:v.a.GET_ACTIVE_INSTITUTIONS,getMaxFileSize:v.a.GET_MAX_FILE_SIZE,isValidFileFormat:v.a.GET_VALID_FILE_FORMAT,isMobile:v.a.GET_IS_MOBILE,defaultDateFormat:v.a.GET_DEFAULT_DATE_FORMAT,defaultDateValueFormat:v.a.GET_DEFAULT_DATE_VALUE_FORMAT,hasPermissionOnInstitutionGroup:v.a.HAS_PERMISSION_ON_INSTITUTION_GROUP,hasPermissionOnInstitution:v.a.HAS_PERMISSION_ON_INSTITUTION})),{},{showTitleAlert:function(){return this.newPostValidator.showMandatoryTitleError||this.newPostValidator.showTitleTooLongError},userProfileStore:function(){return Object(U.a)()},profile:function(){return this.userProfileStore.institutionProfile},blockedRecipientsString:function(){return this.blockedCommunicationChannelResponse?this.blockedCommunicationChannelResponse.getBlockedGroupRecipientsString(this.$getText):""},timeSpanOptions:function(){return[{label:this.$tc("label.number_of_weeks",2),value:L.a.TWO_WEEKS,ariaLabel:this.$t("label.adjust_expired_date",{option:this.$tc("label.number_of_weeks",2)})},{label:this.$tc("label.number_of_months",1),value:L.a.ONE_MONTH,ariaLabel:this.$t("label.adjust_expired_date",{option:this.$tc("label.number_of_months",1)})},{label:this.$tc("label.number_of_months",3),value:L.a.THREE_MONTHS,ariaLabel:this.$t("label.adjust_expired_date",{option:this.$tc("label.number_of_months",3)})}]},publishDateFormat:function(){var e=m()(this.post.publishAt).format("DD-MM-YYYY HH:mm");return this.$getText("POST_PUBLISH_DATE",{date:e})},expireDateFormat:function(){var e=m()(this.postForm.expireDate).format("DD-MM-YYYY");return this.$t("label.chosen_expired_date",{expireDate:e})},institutionsThatCanBeSeen:function(){var e=this,t=this.institutions;t=t.filter((function(e){return!e.communicationBlock}));var n=this.group;return this.parent===E.a.GROUP&&(t=Object(S.a)(t,n).filter((function(t){return e.hasPermissionOnInstitutionGroup({permissionId:y.a.WRITE_POST,institution:t,group:n})||e.hasPermissionOnInstitution(y.a.USE_GROUPS_AS_DISTRIBUTION_LISTS,t.institutionCode)}))),t},minuteInterval:function(){return b.a.FIFTEEN_MINUTE_INTERVAL},lastMinuteInterval:function(){return 60-this.minuteInterval},isEmployee:function(){return this.profile.role===A.a.EMPLOYEE},inEdit:function(){return void 0!==this.getId},getId:function(){return this.parent===E.a.PROFILE?this.id:this.$route.params.id},expireStartTime:function(){return this.postForm.publishDate===this.postForm.expireDate?m()(this.postForm.publishTime,"HH:mm").add(15,"minutes").format("HH:mm"):"00:00"},isEditedPostPublishedInPast:function(){return this.inEdit&&m()(this.post.publishAt).isBefore(m()())}}),watch:{draftPost:function(){this.postForm=G(G({},this.postForm),this.draftPost),this.existingMedia=this.postForm.attachments,this.existingParticipants=this.postForm.sharedWithGroups},"postForm.content":function(){this.newPostValidator.validatePostContent(this.postForm.content)},"postForm.title":function(){this.newPostValidator.showTitleTooLongError=this.postForm.title.length>N.MAX_TITLE_LENGTH},profile:function(){this.profile.id&&this.loadDraft()}},mounted:function(){var e=document.getElementsByClassName("el-select__input");e.length>0&&setTimeout((function(){e[0].focus()}),500),this.populatePostData(),this.profile.id&&this.loadDraft(),this.fetchMaxFileSize(),this.fetchAuthorisedFileFormats()},methods:G(G({},Object(I.b)({clearNewPostLocally:v.a.ACTIONS_CLEAR_NEW_POST,addNewPost:v.a.ACTIONS_ADD_NEW_POST,fetchPost:v.a.ACTION_GET_POST,editPost:v.a.ACTIONS_EDIT_POST,savePostsLocally:v.a.ACTIONS_SAVE_NEW_POSTS_LOCALLY,initSavedPosts:v.a.ACTIONS_INIT_LOCAL_NEW_POSTS,fetchMaxFileSize:v.a.ACTIONS_CENTRAL_CONFIG_MAX_FILE_SIZE,fetchAuthorisedFileFormats:v.a.ACTIONS_CENTRAL_CONFIG_AUTHORIZED_FILE_FORMATS,createAttachments:v.a.CREATE_ATTACHMENTS,updateAttachments:v.a.UPDATE_ATTACHMENTS})),{},{handleExpireDateSelect:function(){this.newPostValidator.showDateNotValidError=!1,this.selectedTimespan=null},adjustSelectedTimeSpan:function(){if(this.selectedTimespan){var e=this.postForm,t=e.publishDate,n=e.publishTime,i=x.a.getFutureOrToday(t),s=x.a.addTimeSpan(i,this.selectedTimespan);this.postForm.expireDate=x.a.formatDate(s,"YYYY-MM-DD"),this.postForm.expireTime=n}},populatePostData:function(){var e,t=this;this.inEdit?this.fetchPost({id:this.getId}).then((function(){var e;t.postForm=G(G({},t.postForm),t.post),t.postForm.content=t.post.content.html,t.postForm.importantFrom&&(t.postForm.importantFrom=m()(t.postForm.importantFrom).utc().format("YYYY-MM-DD")),t.postForm.importantTo&&(t.postForm.importantTo=m()(t.postForm.importantTo).utc().format("YYYY-MM-DD")),t.populatePublishExpire(),t.existingMedia=t.post.attachments;var n,i=[],s=B(t.post.sharedWithGroups);try{for(s.s();!(n=s.n()).done;){var a=n.value;if(null!=a.portalRoles){var r,o=B(a.portalRoles);try{for(o.s();!(r=o.n()).done;){var l=r.value;i.push({groupId:a.id,value:"group"+a.id+a.institutionCode+l,type:"group",id:a.id,institutionCode:a.institutionCode,name:a.name,portalRole:l,label:a.name+" ("+t.$getText("GROUP_LABEL_TYPE_"+l.toUpperCase())+")"})}}catch(e){o.e(e)}finally{o.f()}}else i.push({groupId:a.id,value:"group"+a.id+a.institutionCode,type:"group",id:a.id,institutionCode:a.institutionCode,name:a.name,portalRole:null,label:a.name})}}catch(e){s.e(e)}finally{s.f()}t.postForm.sharedWithGroups=i,t.existingParticipants=t.postForm.sharedWithGroups,t.postForm.institutionCode=null===(e=t.institutions.find((function(e){return e.institutionProfileId===t.post.ownerProfile.id})))||void 0===e?void 0:e.institutionCode,t.showEditor=!0})):this.postForm.institutionCode=Object(S.c)(this.institutionsThatCanBeSeen,this.activeInstitutionCodes,null===(e=this.institutionsThatCanBeSeen[0])||void 0===e?void 0:e.institutionCode)},onChangeImportantDate:function(){this.saveDraftInStorage()},onChangeIsImportant:function(){this.saveDraftInStorage()},onChangeExpireTime:function(){this.newPostValidator.showDateNotValidError=!1,this.selectedTimespan=null,this.saveDraftInStorage()},onChangePublishDate:function(){var e=this;this.saveDraftInStorage(),this.newPostValidator.showDateNotValidError=!1,this.$nextTick((function(){e.adjustSelectedTimeSpan()}))},saveDraftInStorage:function(){this.inEdit||this.savePostsLocally({profile:this.profile,group:this.group,draft:this.postForm})},clearAttachments:function(){this.existingMedia=[]},onInstitutionChange:function(){this.saveDraftInStorage(),this.resetRecipientsInput=!this.resetRecipientsInput,this.clearAttachments()},setDefaultPublishDate:function(){this.postForm.publishDate||(this.postForm.publishDate=m()().format("YYYY-MM-DD"))},setDefaultExpireDate:function(){this.postForm.expireDate||(this.postForm.expireDate=m()().add(1,"years").format("YYYY-MM-DD")),this.saveDraftInStorage()},disableSubmit:function(e){this.submitDisabled=e},showWarningWhenDisablingComments:function(){this.inEdit&&null!=this.postForm.commentCount&&this.postForm.commentCount>0&&!this.postForm.allowComments&&this.$refs.disableCommentsWarning.show(),this.saveDraftInStorage()},filesChanged:function(e){this.postForm.attachments=e},addGroups:function(e){var t=this;this.showAdminWarning=!1,this.postForm.sharedWithGroups=e.map((function(e){return null!=e.portalRole&&(t.showAdminWarning=!0),{groupId:e.id,value:e.value,type:"group",id:e.id,institutionCode:e.institutionCode,name:e.name,portalRole:e.portalRole,label:e.labelWhenGroupIsChosen}})),this.saveDraftInStorage()},discardPost:function(){setTimeout(this.executeDelayedDiscardPost,40)},executeDelayedDiscardPost:function(){this.resetForm(),this.inEdit||this.clearNewPostLocally({profile:this.profile,group:this.group}),this.parent===E.a.PROFILE?this.$emit("postSubmitted"):this.backToGroupOverviewPage()},resetForm:function(){this.postForm.title="",this.postForm.content="",this.postForm.allowComments=!1,this.postForm.isImportant=!1,this.postForm.importantFrom="",this.postForm.importantTo="",this.postForm.sharedWithGroups=[],this.postForm.attachments=[],this.existingParticipants=[],this.postForm.publishDate=m()().format("YYYY-MM-DD"),this.postForm.publishTime=m()().format("HH:mm:ss"),this.postForm.expireDate=m()().add(1,"years").format("YYYY-MM-DD"),this.postForm.expireTime=m()().add(1,"years").format("HH:mm:ss")},prepareSharedGroups:function(){var e=this,t=[];this.parent===E.a.GROUP&&null!=this.group.id&&0==this.postForm.sharedWithGroups.filter((function(t){return t.id==e.group.id})).length&&(this.postForm.sharedWithGroups.push({id:this.group.id,portalRole:A.a.GUARDIAN,name:this.group.name}),this.postForm.sharedWithGroups.push({id:this.group.id,portalRole:A.a.CHILD,name:this.group.name}),this.postForm.sharedWithGroups.push({id:this.group.id,portalRole:A.a.EMPLOYEE,name:this.group.name}));var n,i=B(this.postForm.sharedWithGroups);try{var s=function(){var e=n.value;if(null==e.id)return"continue";var i=t.find((function(t){return t.groupId==e.id}));if(null!=i)null!=e.portalRole?null!=i.portalRoles&&i.portalRoles.push(e.portalRole):null!=e.portalRoles?i.portalRoles=r()(new Set([].concat(r()(i.portalRoles),r()(e.portalRoles)))):i.portalRoles=null;else{var s=null!=e.portalRole?[e.portalRole]:null!=e.portalRoles?e.portalRoles:null;t.push({id:e.id,groupId:e.id,name:e.name,portalRoles:s})}};for(i.s();!(n=i.n()).done;)s()}catch(e){i.e(e)}finally{i.f()}this.postForm.sharedWithGroups=t},setPublishDateAndTime:function(){this.postForm.publishDate=m()().startOf("day").format("YYYY-MM-DD"),this.postForm.publishTime=m()().format("HH:mm:ss")},preparePostForm:function(){var e=this;this.isLoading=!0;var t=m()();m()(this.postForm.publishDate+" "+this.postForm.publishTime).isBefore(t)&&!this.isEditedPostPublishedInPast&&this.setPublishDateAndTime(),this.newPostValidator.validate(this.validationModel())?(this.postForm.parent=this.parent,this.postForm.importantFrom&&(this.postForm.importantFrom=m()(this.postForm.importantFrom).format("YYYY-MM-DD")),this.postForm.importantTo&&(this.postForm.importantTo=m()(this.postForm.importantTo).format("YYYY-MM-DD")),this.prepareSharedGroups(),null==this.postForm.institutionCode&&(this.postForm.institutionCode=Object(S.c)(this.institutions,this.activeInstitutionCodes)),this.postForm.creatorInstitutionProfileId=this.institutions.find((function(t){return t.institutionCode==e.postForm.institutionCode})).institutionProfileId,this.checkForBlockedComChannels()):this.isLoading=!1},removeBlocked:function(){var e=this;this.postForm.sharedWithGroups=this.blockedCommunicationChannelResponse.getUnblockedGroups(),this.resetRecipientsInput=!this.resetRecipientsInput,this.$nextTick((function(){e.existingParticipants=e.postForm.sharedWithGroups,e.postForm.sharedWithGroups.length>0&&e.send()}))},checkForBlockedComChannels:function(){var e=this;
1P.a.checkBlockedCommunicationChannel(P.a.toBCCRequestModelForPostAndGallery(this.postForm.creatorInstitutionProfileId,this.postForm.sharedWithGroups)).then((function(t){e.blockedCommunicationChannelResponse=t,e.blockedCommunicationChannelResponse.hasBlockedRecipients()?(e.$refs.theCommunicationChannelIsBlocked.show(),e.isLoading=!1):e.send()}))},send:function(){var e=this;return s()(u.a.mark((function t(){var n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.isLoading=!0,e.postForm.preparedAttachments=F.a.prepareAttachments(e.postForm.attachments),!(e.postForm.preparedAttachments.existingMedia.length>0)){t.next=14;break}if(!((n=e.postForm.preparedAttachments.existingMedia.filter((function(e){return null!=e.media&&e.media.updated}))).length>0)){t.next=14;break}return t.prev=5,t.next=8,e.updateAttachments({media:M.a.prepareMedia(n)});case 8:t.next=14;break;case 10:return t.prev=10,t.t0=t.catch(5),e.isLoading=!1,t.abrupt("return");case 14:null!=e.postForm.preparedAttachments.media||null!=e.postForm.preparedAttachments.files||null!=e.postForm.preparedAttachments.links?(e.postForm.preparedAttachments.ownerInstitutionProfileId=e.postForm.creatorInstitutionProfileId,e.postForm.preparedAttachments.institutionCode=e.postForm.institutionCode,e.createAttachments(e.postForm.preparedAttachments).then((function(t){var n=t.files.concat(t.links).concat(t.media).concat(e.postForm.preparedAttachments.existingMedia);e.postForm.attachmentIds=n.map((function(e){return e.id})),e.inEdit?(e.postForm.id=e.getId,e.editPost(e.postForm).then((function(){e.discardPost(),e.isLoading=!1}))):(e.postForm.publishAt=x.a.getStartOf(e.postForm.publishAt,"minute"),e.addNewPost(e.postForm).then((function(){e.discardPost(),e.isLoading=!1})))})).catch((function(){e.isLoading=!1}))):(e.postForm.attachmentIds=e.postForm.preparedAttachments.existingMedia.map((function(e){return e.id})),e.inEdit?(e.postForm.id=e.getId,e.editPost(e.postForm).then((function(){e.discardPost(),e.isLoading=!1}))):(e.postForm.publishAt=x.a.getStartOf(e.postForm.publishAt,"minute"),e.addNewPost(e.postForm).then((function(){e.discardPost(),e.isLoading=!1}))));case 15:case"end":return t.stop()}}),t,null,[[5,10]])})))()},cancel:function(){this.saveDraftInStorage(),this.resetForm(),this.parent===E.a.PROFILE?this.$emit("cancel"):this.backToGroupOverviewPage()},backToGroupOverviewPage:function(){this.$router.push({name:"group-overview",query:{filter:this.$router.currentRoute.query.filter}})},loadDraft:function(){this.inEdit||(this.initSavedPosts({parent:this.parent}),this.showEditor=!0)},populatePublishExpire:function(){this.postForm.publishDate=m()(this.post.publishAt).format("YYYY-MM-DD"),this.postForm.publishTime=m()(this.post.publishAt).format("HH:mm:ss"),this.postForm.expireDate=m()(this.post.expireAt).format("YYYY-MM-DD"),this.postForm.expireTime=m()(this.post.expireAt).format("HH:mm:ss")},validationModel:function(){return this.postForm.publishAt=Object(p.f)(this.postForm.publishDate,this.postForm.publishTime),this.postForm.expireAt=Object(p.f)(this.postForm.expireDate,this.postForm.expireTime),{parent:this.parent,title:this.postForm.title,content:w.a.stripHTML(this.postForm.content),expireAt:this.postForm.expireAt,publishAt:this.postForm.publishAt,sharedWithGroups:this.postForm.sharedWithGroups}}})},j=n(3),Y=Object(j.a)(H,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{"new-post-container":e.parent!==e.parentTypes.PROFILE}},[e.parent!==e.parentTypes.PROFILE?n("div",{staticClass:"new-post-heading"},[n("i",{staticClass:"icon-Aula_write"}),e._v(" "),e.inEdit?n("label",[e._v(e._s(e.$getText("POSTS_EDIT_LABEL_HEADING")))]):n("label",[e._v(e._s(e.$getText("POSTS_CREATE_LABEL_HEADING")))]),e._v(" "),n("div",{staticClass:"close"},[n("i",{staticClass:"icon-Aula_close",attrs:{tabindex:"0",role:"button","aria-label":e.$getText("ARIA_LABEL_CLOSE")},on:{click:e.cancel,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.cancel.apply(null,arguments)}}})])]):e._e(),e._v(" "),e.institutionsThatCanBeSeen.length>1?n("div",[n("label",{staticClass:"thin"},[e._v(e._s(e.$getText("CALENDAR_TITLE_CHOOSE_INSTITUTION")))]),e._v(" "),n("aula-select",{attrs:{placeholder:e.$getText("SELECT"),"aria-label":e.$getText("ARIA_LABEL_POST_CHOOSE_INSTITUTION"),disabled:e.inEdit||e.postForm.sharedWithGroups.length>0},on:{change:e.onInstitutionChange},model:{value:e.postForm.institutionCode,callback:function(t){e.$set(e.postForm,"institutionCode",t)},expression:"postForm.institutionCode"}},e._l(e.institutionsThatCanBeSeen,(function(e){return n("aula-option",{key:e.institutionCode,attrs:{id:e.institutionCode,label:e.name,value:e.institutionCode}})}
1)),1)],1):e._e(),e._v(" "),e.parent===e.parentTypes.PROFILE?n("div",[n("label",[e._v(e._s(e.$getText("POSTS_CREATE_LABEL_TO"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("aula-search-recipients",{class:e.newPostValidator.showMandatoryReceiverError?"red-border":"",attrs:{"data-testid":"post-recipient-search","include-otp-from-guardian-in-sub-group":!0,"portal-roles":[e.portalRoles.CHILD,e.portalRoles.GUARDIAN,e.portalRoles.EMPLOYEE,e.portalRoles.OTP],"doc-types-api":[e.docTypes.GROUP],"from-module":e.moduleTypes.OVERVIEW,"show-search-icon":!0,clearable:!0,"enable-relatives-for-students":!1,"close-dropdown-after-select":!1,"disable-portal-roles-members-when-expanding-group":[e.portalRoles.CHILD,e.portalRoles.EMPLOYEE,e.portalRoles.GUARDIAN],"allow-create":!1,"reset-input":e.resetRecipientsInput,"institution-code":e.postForm.institutionCode,"scope-employees-to-institution":!1,"existing-participants":e.existingParticipants},on:{emitSelected:e.addGroups}}),e._v(" "),e.showAdminWarning?n("div",{staticClass:"admin-warning"},[e._v("\n      "+e._s(e.$getText("POST_ADMIN_CAN_SEE_POST"))+"\n    ")]):e._e(),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.newPostValidator.showMandatoryReceiverError}},[e._v("\n      "+e._s(e.$getText("POST_MANDATORY_RECEIVERS"))+"\n    ")])],1):e._e(),e._v(" "),n("div",[n("label",[e._v(e._s(e.$getText("POSTS_CREATE_LABEL_TITLE"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("b-form-input",{class:e.showTitleAlert?"red-border":"",attrs:{"data-testid":"post-title-input",autocomplete:"off",placeholder:e.$getText("POSTS_CREATE_TITLE_INPUT_PLACEHOLDER"),"aria-label":e.$getText("ARIA_LABEL_POSTS_CREATE_TITLE")},on:{change:e.saveDraftInStorage},model:{value:e.postForm.title,callback:function(t){e.$set(e.postForm,"title","string"==typeof t?t.trim():t)},expression:"postForm.title"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.newPostValidator.showMandatoryTitleError}},[e._v("\n      "+e._s(e.$getText("POST_MANDATORY_TITLE"))+"\n    ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.newPostValidator.showTitleTooLongError}},[e._v("\n      "+e._s(e.$getText("POST_TITLE_TOO_LONG"))+"\n    ")])],1),e._v(" "),n("b-row",{attrs:{"align-h":"between"}},[n("b-col",{attrs:{cols:"12",lg:"5"}},[e.isEditedPostPublishedInPast?n("span",{staticClass:"sr-only",attrs:{tabindex:"0"}},[e._v("\n        "+e._s(e.publishDateFormat)+"\n      ")]):e._e(),e._v(" "),n("label",[e._v(e._s(e.$getText("POSTS_PUBLISH_LABEL")))]),e._v(" "),n("b-row",[n("b-col",{attrs:{cols:"7"}},[n("el-date-picker",{staticClass:"w-100",class:{"red-border":e.newPostValidator.showDateNotValidError},attrs:{"picker-options":e.publishOptions,format:e.defaultDateFormat,"value-format":e.defaultDateValueFormat,clearable:!1,type:"date",placeholder:e.$getText("ARIA_LABEL_POSTS_PUBLISH_DATE"),disabled:e.isEditedPostPublishedInPast},on:{change:e.onChangePublishDate,blur:e.setDefaultPublishDate},model:{value:e.postForm.publishDate,callback:function(t){e.$set(e.postForm,"publishDate",t)},expression:"postForm.publishDate"}})],1),e._v(" "),n("b-col",{attrs:{cols:"5"}},[n("label",{staticClass:"sr-only",attrs:{for:"publishTime"}},[e._v("\n            "+e._s(e.$getText("ARIA_LABEL_POSTS_PUBLISH_TIME"))+"\n          ")]),e._v(" "),n("AulaTimepicker",{class:{"red-border":e.newPostValidator.showDateNotValidError},attrs:{id:"publishTime",format:"HH:mm","hour-label":e.$getText("HOUR"),"minute-label":e.$getText("MINUTE"),placeholder:e.$getText("ARIA_LABEL_POSTS_PUBLISH_TIME"),"minute-interval":e.minuteInterval,disabled:e.isEditedPostPublishedInPast,"hide-clear-button":"","advanced-keyboard":"",lazy:""},on:{change:e.onChangePublishDate},model:{value:e.postForm.publishTime,callback:function(t){e.$set(e.postForm,"publishTime",t)},expression:"postForm.publishTime"}})],1)],1)],1),e._v(" "),e.handleExpireDateSelect?n("span",{staticClass:"sr-only",attrs:{"aria-live":"polite"}},[e._v("\n      "+e._s(e.expireDateFormat)+"\n    ")]):e._e(),e._v(" "),n("b-col",{attrs:{cols:"12",lg:"5"}},[n("label",[e._v(e._s(e.$getText("POSTS_EXPIRE_LABEL")))]),e._v(" "),n("b-row",[n("b-col",{attrs:{cols:"7"}},[n("el-date-picker",{staticClass:"w-100",class:{"red-border":e.newPostValidator.showDateNotValidError},attrs:{"picker-options":e.expireOptions,format:e.defaultDateFormat,"value-format":e.defaultDateValueFormat,clearable:!1,type:"date",placeholder:e.$getText("ARIA_LABEL_POSTS_EXPIRE_DATE")},on:{change:e.handleExpireDateSelect,blur:e.setDefaultExpireDate},model:{value:e.postForm.expireDate,callback:function(t){e.$set(e.postForm,"expireDate",t)},expression:"postForm.expireDate"}})],1),e._v(" "),n("b-col",{attrs:{cols:"5"}},[n("label",{staticClass:"sr-only",attrs:{for:"expireTime"}},[e._v("\n            "+e._s(e.$getText("ARIA_LABEL_POSTS_EXPIRE_TIME"))+"\n          ")]),e._v(" "),n("AulaTimepicker",{class:{"red-border":e.newPostValidator.showDateNotValidError},attrs:{id:"expireTime",format:"HH:mm","hour-label":e.$getText("HOUR"),"minute-label":e.$getText("MINUTE"),placeholder:e.$getText("ARIA_LABEL_POSTS_EXPIRE_TIME"),"minute-interval":e.minuteInterval,start:e.expireStartTime,end:"23:59","hide-clear-button":"","advanced-keyboard":""},on:{change:e.onChangeExpireTime},model:{value:e.postForm.expireTime,callback:function(t){e.$set(e.postForm,"expireTime",t)},expression:"postForm.expireTime"}})],1)],1),e._v(" "),n("ButtonToggles",{attrs:{options:e.timeSpanOptions},on:{change:e.adjustSelectedTimeSpan},model:{value:e.selectedTimespan,callback:function(t){e.selectedTimespan=t},expression:"selectedTimespan"}})],1)],1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.newPostValidator.showDateNotValidError}},[e._v("\n    "+e._s(e.$getText("POSTS_EXPIRE_BEFORE_PUBLISH"))+"\n  ")]),e._v(" "),n("div",{staticClass:"margin-bottom-40"},[n("label",[e._v(e._s(e.$getText("POSTS_CREATE_LABEL_CONTENTS"))+" "),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),e.showEditor?n("PluginTextEditor",{class:{"red-border":e.newPostValidator.showContentTooLongError||e.newPostValidator.showMandatoryContentError},attrs:{"max-length":e.maxLength,"hide-alert":e.newPostValidator.showContentTooLongError,"placeholder-textkey":"MESSAGE_TYPING_PLACEHOLDER","institution-code":e.postForm.institutionCode},on:{input:e.saveDraftInStorage,textTooLong:e.disableSubmit},model:{value:e.postForm.content,callback:function(t){e.$set(e.postForm,"content",t)},expression:"postForm.content"}}
1):e._e(),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.newPostValidator.showMandatoryContentError}},[e._v("\n      "+e._s(e.$getText("POST_MANDATORY_CONTENT"))+"\n    ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.newPostValidator.showContentTooLongError}},[e._v("\n      "+e._s(e.$getText("POST_CONTENT_TOO_LONG"))+"\n    ")])],1),e._v(" "),n("upload",{staticClass:"margin-top margin-bottom",attrs:{"selected-institution-code-for-filter":e.postForm.institutionCode,"limit-file-upload":200,"existing-media":e.existingMedia,"institution-code-for-tagging":e.postForm.institutionCode,"institution-code":e.postForm.institutionCode},on:{mediaUpdated:e.filesChanged}}),e._v(" "),n("b-row",{staticClass:"controls"},[n("b-col",[n("b-form-checkbox",{on:{input:function(t){return e.showWarningWhenDisablingComments()}},model:{value:e.postForm.allowComments,callback:function(t){e.$set(e.postForm,"allowComments",t)},expression:"postForm.allowComments"}},[e._v("\n        "+e._s(e.$getText("POSTS_CREATE_ENABLE_COMMENTS"))+"\n      ")]),e._v(" "),e.profile.role==e.portalRoles.EMPLOYEE?n("b-form-checkbox",{attrs:{value:!0,"unchecked-value":!1},on:{change:e.onChangeIsImportant},model:{value:e.postForm.isImportant,callback:function(t){e.$set(e.postForm,"isImportant",t)},expression:"postForm.isImportant"}},[e._v("\n        "+e._s(e.$getText("POSTS_CREATE_HIGH_PRIORITY"))+"\n      ")]):e._e()],1)],1),e._v(" "),e.isEmployee&&e.postForm.isImportant?n("b-row",{staticClass:"controls"},[n("b-col",{attrs:{sm:"6",md:"3"}},[n("el-date-picker",{class:{elPickerActive:e.isImportantFromClicked,"mb-3":e.isMobile},attrs:{"picker-options":e.availableDateFrom,format:"dd-MM-yyyy",type:"date",placeholder:e.$getText("POSTS_CREATE_DATE_FROM"),"aria-label":e.$getText("ARIA_LABEL_POSTS_CREATE_DATE_FROM")},on:{change:e.onChangeImportantDate,focus:function(t){e.datePickerModifier(),e.isImportantFromClicked=!0},blur:function(t){e.isImportantFromClicked=!1}},model:{value:e.postForm.importantFrom,callback:function(t){e.$set(e.postForm,"importantFrom",t)},expression:"postForm.importantFrom"}})],1),e._v(" "),n("b-col",{attrs:{sm:"6",md:"3"}},[n("el-date-picker",{class:{elPickerActive:e.isImportantToClicked},attrs:{"picker-options":e.availableDateTo,type:"date",format:"dd-MM-yyyy",placeholder:e.$getText("POSTS_CREATE_DATE_TO"),"aria-level":e.$getText("ARIA_LABEL_POSTS_CREATE_DATE_TO")},on:{change:e.onChangeImportantDate,focus:function(t){e.datePickerModifier(),e.isImportantToClicked=!0},blur:function(t){e.isImportantToClicked=!1}},model:{value:e.postForm.importantTo,callback:function(t){e.$set(e.postForm,"importantTo",t)},expression:"postForm.importantTo"}})],1)],1):e._e(),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.newPostValidator.showPermissionsError}},[e._v("\n    "+e._s(e.$getText("POST_NO_PERMISSION"))+"\n  ")]),e._v(" "),n("aula-form-footer",{attrs:{"is-loading":e.isLoading,"submit-text":e.inEdit?"BUTTON_SAVE":"BUTTON_CREATE","submit-disabled":e.submitDisabled},on:{cancelClicked:e.cancel,submitClicked:e.preparePostForm}}),e._v(" "),n("aula-modal",{ref:"warningCreateModal",attrs:{"header-text":"POST_CREATE_TITLE_WARNING"},on:{cancelClicked:function(t){return e.$refs.warningCreateModal.hide()},okClicked:function(t){e.$refs.warningCreateModal.hide(),e.cancel()}}},[e._v("\n    "+e._s(e.$getText("POST_CREATE_CONTENT_WARNING_POST"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"theCommunicationChannelIsBlocked",attrs:{"header-text":"MESSAGE_WARNING_HEADER","ok-text":"BUTTON_YES","cancel-text":"NO"},on:{cancelClicked:function(t){return e.$refs.theCommunicationChannelIsBlocked.hide()},okClicked:function(t){e.$refs.theCommunicationChannelIsBlocked.hide(),e.removeBlocked()}}},[e._v("\n    "+e._s(e.$getText("WARNING_THE_COMMUNICATION_CHANNEL_IS_BLOCKED_USERS"))+"\n    "),n("div",{staticClass:"mt-2"},[e._v("\n      "+e._s(e.blockedRecipientsString)+"\n    ")])]),e._v(" "),n("aula-modal",{ref:"disableCommentsWarning",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.disableCommentsWarning.hide()}}},[e._v("\n    "+e._s(e.$getText("POST_DISABLE_COMMENTS_WARNING"))+"\n  ")])],1)}),[],!1,null,"2ddd649a",null);t.a=Y.exports},243:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e){this.endDate=e.endDate,this.isEditable=e.isEditable,this.isMissingAnswer=e.isMissingAnswer,this.isPresenceTimesRequired=e.isPresenceTimesRequired,this.noteToGuardian=e.n
1oteToGuardian,this.responseDeadline=e.responseDeadline,this.responseId=e.responseId,this.startDate=e.startDate,this.title=e.title,this.vacationRegistrationId=e.vacationRegistrationId}}},245:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n(53),s=n(18);const a=new class{getNotifications(e,{widgetId:t,notificationType:n=i.a.BADGE,notificationEventType:a=s.a.WIDGET_NOTIFICATION}){return e.filter((e=>e.widgetId===t&&e.notificationType===n&&e.notificationEventType===a))}}},247:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(1),r=n.n(a),o=n(7),l=n.n(o),c=n(6),u=n(0),d=n(5),h=n.n(d),m=n(107),p=n(65),v=n(71),f=n(60),g=n(84);class _ extends g.a{constructor(e,t,n){super(),this._hasTimes=!0,this._isValidTimes=!0,this._isValidIncoming=!0,this._isWithinOpeningHour=!0,this.validateIsMissingTime=()=>{const{entryTime:e,exitTime:t,isComing:n,isDisabled:i,useTimes:s}=this._vacationInterval;let a=!0;return!i&&s&&!0===n&&(a=Boolean(e&&t)),this._vacationInterval.validator.hasTimes=a,a},this.validateIsValidTime=()=>{const{isComing:e,isDisabled:t,useTimes:n}=this._vacationInterval;let i=!0;return!t&&n&&!0===e&&(i=this.getIsEntryTimeLowerThanExitTime(this._vacationInterval)),this._vacationInterval.validator.isValidTimes=i,i},this.validateIsComing=()=>{const{isComing:e,isDisabled:t}=this._vacationInterval;let n=!0;return t||(n=null!=e),this._vacationInterval.validator.isValidIncoming=n,n},this.validateIsValidOpeningHour=()=>{const{isDisabled:e,entryTime:t,exitTime:n,useTimes:i,isComing:s}=this._vacationInterval,a=this.getHaveTimes();let r=!1;if(!e&&i&&s){if(a){const e=h()(this._vacationInterval.getStartTime(),"HH:mm"),i=h()(this._vacationInterval.getEndTime(),"HH:mm"),s=h()(t,"HH:mm"),a=h()(n,"HH:mm");r=e.isSameOrBefore(s)&&i.isSameOrAfter(a)}}else r=!0;return this._vacationInterval.validator.isWithinOpeningHour=r,r},this._vacationInterval=e,this._specificOpeningHours=t,this._generalOpeningHours=n}get isWithinOpeningHour(){return this._isWithinOpeningHour}set isWithinOpeningHour(e){this._isWithinOpeningHour=e}get hasTimes(){return this._hasTimes}set hasTimes(e){this._hasTimes=e}get isValidTimes(){return this._isValidTimes}set isValidTimes(e){this._isValidTimes=e}get isValidIncoming(){return this._isValidIncoming}set isValidIncoming(e){this._isValidIncoming=e}validate(){return this.validateRules([this.validateIsMissingTime,this.validateIsValidTime,this.validateIsComing,this.validateIsValidOpeningHour])}getHaveTimes(){const{entryTime:e,exitTime:t}=this._vacationInterval;return Boolean(e&&t)}getIsEntryTimeLowerThanExitTime(e){const{entryTime:t,exitTime:n}=e;if(!this.getHaveTimes())return!1;const i=h()(t,"HH:mm"),s=h()(n,"HH:mm");return i.isBefore(s)}}var E=n(8),A=n(13);const T=new class{get isEmployee(){return Object(A.a)().institutionProfile.role===E.a.EMPLOYEE}};class b{constructor(e,t,n,i,s){this._submitClicked=!1,this.date=e.date,this.isComing=e.isComing,this.entryTime=e.entryTime,this.exitTime=e.exitTime,this.useTimes=e.useTimes,this.year=e.year,this.week=e.week,this._vacationRegistration=t,this._specificOpeningHours=n,this._generalOpeningHours=i,this._dayTemplate=s,this._validator=new _(this,n,i),this.updateDisabled(),this.setupEntryTime(),this.setupExitTime()}get validator(){return this._validator}get isDisabled(){return this._disabled}get specificOpeningHour(){return this._specificOpeningHours}setSubmitClicked(e){this._submitClicked=e}isValid(){return this._validator.validate()}setEntryTime(e){this.entryTime=e,this._validator.validate()}setExitTime(e){this.exitTime=e,this._validator.validate()}setIsComing(e){this.isComing=e}getStartTime(){var e,t;let n="05:00";return(null===(e=this._specificOpeningHours)||void 0===e?void 0:e.openTime)?n=this._specificOpeningHours.openTime:(null===(t=this._generalOpeningHours)||void 0===t?void 0:t.openTime)&&(n=this._generalOpeningHours.openTime),n}getEndTime(){var e,t;let n="23:59";return(null===(e=this._specificOpeningHours)||void 0===e?void 0:e.closeTime)?n=this._specificOpeningHours.closeTime:(null===(t=this._generalOpeningHours)||void 0===t?void 0:t.closeTime)&&(n=this._generalOpeningHours.closeTime),n}getIsSpecificOpeningHours(){var e;return(null===(e=this._specificOpeningHours)||void 0===e?void 0:e.type)===p.a.SPECIFIC_OPEN_HOURS}getIsClosingDay(){var e;return(null===(e=this._specificOpeningHours)||void 0===e?void 0:e.type)===p.a.CLOSE_OPEN_HOURS}
1getShowHasTimesError(){return this._submitClicked&&!this._validator.hasTimes}getShowIsWithinOpeningHourError(){return this._validator.hasTimes&&!this._validator.isWithinOpeningHour}getShowIsValidTimesError(){return this._validator.hasTimes&&!this._validator.isValidTimes}updateDisabled(){const e=this.getIsClosingDay(),t=h()().isAfter(this.date);this._disabled=e||t||this.cannotRespondDueToDeadline}get cannotRespondDueToDeadline(){var e;const t=h()();let n=!1;return(null===(e=this._vacationRegistration)||void 0===e?void 0:e.responseDeadline)&&(n=t.isAfter(this._vacationRegistration.responseDeadline,"day")),!T.isEmployee&&n}setupEntryTime(){let e=this.entryTime;this._dayTemplate&&(e=this._dayTemplate.entryTime),this.entryTime=e||""}setupExitTime(){let e=this.exitTime;this._dayTemplate&&(e=this._dayTemplate.exitTime),this.exitTime=e||""}}var C={name:"VacationIntervalsFragmentDayRow"},k=n(3),y=Object(k.a)(C,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"vacation-response-row align-items-stretch"},[e._t("default")],2)}),[],!1,null,"3877180c",null).exports,I={name:"VacationIntervalsFragmentDayCol"},S=Object(k.a)(I,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"vacation-response-col"},[e._t("default")],2)}),[],!1,null,"405152ec",null).exports,D={name:"VacationIntervalsFragmentTimepicker",components:{Timepicker:n(66).a},props:{timepickerValue:{type:String,required:!0},start:{type:String,required:!1},end:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:function(){return!1}}},data:function(){return{timepickerSettings:f.a}}},w=Object(k.a)(D,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("Timepicker",{staticClass:"timepicker",attrs:{format:"HH:mm","hour-label":"Time","minute-label":"Minut","hide-clear-button":"","advanced-keyboard":"","minute-interval":e.timepickerSettings.DEFAULT_INTERVAL,start:e.start,end:e.end,placeholder:e.$getText("PRESENCE_PLACEHOLDER"),value:e.timepickerValue,disabled:e.disabled},on:{change:function(t){return e.$emit("change",t)},input:function(t){return e.$emit("input",t)}}})}),[],!1,null,"707c705e",null).exports,N={components:{VacationIntervalsFragmentTimepicker:w,VacationIntervalsFragmentDayCol:S,VacationIntervalsFragmentDayRow:y},props:{vacationRequestDays:{required:!0,type:Array},isReadonly:{required:!1,type:Boolean,default:function(){return!1}}},data:function(){return{isComing:null,disabled:!1,entryTime:"",exitTime:"",startTime:"",endTime:"",useTimes:!0,oldEntryTime:"",oldExitTime:"",entryDisplayTime:"",exitDisplayTime:""}},watch:{vacationRequestDays:{deep:!0,immediate:!0,handler:function(){this.disabled=v.a.getAreAllVacationRequestDaysDisabled(this.vacationRequestDays),this.isComing=v.a.getIsComingValueForAllVacationRequestDays(this.vacationRequestDays),this.useTimes=v.a.canUseTimesForVacationRequestDays(this.vacationRequestDays),this.entryTime=v.a.getAlignedEntryTimeFromVacationRequestDays(this.vacationRequestDays),this.exitTime=v.a.getAlignedExitTimeFromVacationRequestDays(this.vacationRequestDays),this.startTime=v.a.getLowestStartTimeFromVacationRequestDays(this.vacationRequestDays),this.endTime=v.a.getHighestEndTimeFromVacationRequestDays(this.vacationRequestDays)}}},methods:{onIsComing:function(e){var t=e;e===this.isComing&&(t=null),v.a.updateIsComingValueForVacationRequestDays(this.vacationRequestDays,t)},onUpdateExitTime:function(e){var t=this.exitTime,n=e.displayTime;this.exitTime=n,""!==n&&t!==n?(this.exitDisplayTime=n,v.a.hasSpecifiedExitTimeForVacationDay(this.vacationRequestDays)?(this.oldExitTime=t,this.$refs.exitTimesExistsWarning.show()):this.updateExitTimes()):this.exitTime=t},onUpdateEntryTime:function(e){var t=this.entryTime,n=e.displayTime;this.entryTime=n,""!==n&&t!==n?(this.entryDisplayTime=n,v.a.hasSpecifiedEntryTimeForVacationDay(this.vacationRequestDays)?(this.oldEntryTime=t,this.$refs.entryTimesExistsWarning.show()):this.updateEntryTimes()):this.entryTime=t},onOkEntryTimesExistsWarning:function(){this.entryDisplayTime&&this.updateEntryTimes(),this.entryDisplayTime="",this.$refs.entryTimesExistsWarning.hide()},onCancelEntryTimesExistsWarning:function(){this.entryTime=this.oldEntryTime,this.oldEntryTime="",this.$refs.entryTimesExistsWarning.hide()},onOkExitTimesExistsWarning:function(){this.exitDisplayTime&&this.updateExitTimes(),this.exitDisplayTime="",this.oldExitTime="",this.$refs.exitTimesExistsWarning.hide()},onCancelExitTimesExistsWarning:function(){this.exitTime=this.oldExitTime,this.oldExitTime="",this.exitDisplayTime="",this.$refs.exitTimesExistsWarning.hide()},updateEntryTimes:function(){v.a.updateEntryTimeForVacationRequestDays(this.vacationRequestDays,this.entryDisplayTime)}
1,updateExitTimes:function(){v.a.updateExitTimeForVacationRequestDays(this.vacationRequestDays,this.exitDisplayTime)}}},R=Object(k.a)(N,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("VacationIntervalsFragmentDayRow",{staticClass:"row"},[n("VacationIntervalsFragmentDayCol",{staticClass:"column mobile-day-display col-sm-2 col-3"},[n("p",{staticClass:"font-weight-bold"},[e._v("\n      "+e._s(e.$getText("CALENDAR_TIMES_MOBILE_FOR_ALL_WEEK_TITLE"))+"\n    ")])]),e._v(" "),n("VacationIntervalsFragmentDayCol",{staticClass:"column d-flex flex-column"},[n("b-form-checkbox",{class:{"checkbox-text-disabled":e.disabled},attrs:{checked:e.isComing,disabled:e.disabled||e.isReadonly,value:!0},on:{change:function(t){return e.onIsComing(!0)}}},[e._v("\n      "+e._s(e.$getText("RESPONSE_VACATION_COMING"))+"\n    ")]),e._v(" "),e.isComing&&e.useTimes?n("b-row",{staticClass:"ml-1 pt-1"},[n("b-col",{attrs:{cols:"4"}},[e._v("\n        "+e._s(e.$getText("RESPONSE_VACATION_COMMING_HOUR"))+"\n      ")]),e._v(" "),n("b-col",{attrs:{cols:"8"}},[n("VacationIntervalsFragmentTimepicker",{attrs:{id:"allWeekTo","timepicker-value":e.entryTime,start:e.startTime,end:e.endTime,disabled:e.disabled||e.isReadonly},on:{change:e.onUpdateEntryTime}})],1),e._v(" "),n("b-col",{staticClass:"separator",attrs:{cols:"12"}}),e._v(" "),n("b-col",{attrs:{cols:"4"}},[e._v("\n        "+e._s(e.$getText("RESPONSE_VACATION_NOT_COMMING_HOUR"))+"\n      ")]),e._v(" "),n("b-col",{attrs:{cols:"8"}},[n("VacationIntervalsFragmentTimepicker",{attrs:{id:"allWeekFrom","timepicker-value":e.exitTime,start:e.startTime,end:e.endTime,disabled:e.disabled||e.isReadonly},on:{change:e.onUpdateExitTime}})],1)],1):e._e(),e._v(" "),n("b-form-checkbox",{class:{"checkbox-text-disabled":e.disabled},attrs:{checked:e.isComing,disabled:e.disabled||e.isReadonly,value:!1},on:{change:function(t){return e.onIsComing(!1)}}},[e._v("\n      "+e._s(e.$getText("RESPONSE_VACATION_NOT_COMING"))+"\n    ")])],1),e._v(" "),n("aula-modal",{ref:"entryTimesExistsWarning",on:{cancelClicked:function(t){return e.onCancelEntryTimesExistsWarning()},okClicked:function(t){return e.onOkEntryTimesExistsWarning()}}},[e._v("\n    "+e._s(e.$getText("PRESENCE_WARNING_FILL_OUT_TIMES_FOR_ENTIRE_WEEK"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"exitTimesExistsWarning",on:{cancelClicked:function(t){return e.onCancelExitTimesExistsWarning()},okClicked:function(t){return e.onOkExitTimesExistsWarning()}}},[e._v("\n    "+e._s(e.$getText("PRESENCE_WARNING_FILL_OUT_TIMES_FOR_ENTIRE_WEEK"))+"\n  ")])],1)}),[],!1,null,"078a5adb",null).exports,O={name:"VacationIntervalsFragmentComeAllWeek",components:{VacationIntervalsFragmentTimepicker:w,VacationIntervalsFragmentDayCol:S,VacationIntervalsFragmentDayRow:y},props:{vacationRequestDays:{required:!0,type:Array},disabled:{required:!1,type:Boolean,default:function(){return!1}}},data:function(){return{entryTime:"",exitTime:"",startTime:"",endTime:"",oldEntryTime:"",oldExitTime:"",newEntryTime:"",newExitTime:""}},watch:{vacationRequestDays:{deep:!0,immediate:!0,handler:function(){this.entryTime=v.a.getAlignedEntryTimeFromVacationRequestDays(this.vacationRequestDays),this.exitTime=v.a.getAlignedExitTimeFromVacationRequestDays(this.vacationRequestDays),this.startTime=v.a.getLowestStartTimeFromVacationRequestDays(this.vacationRequestDays),this.endTime=v.a.getHighestEndTimeFromVacationRequestDays(this.vacationRequestDays)}}},methods:{onUpdateExitTime:function(e){var t=e.displayTime,n=this.exitTime;this.exitTime=t,""!==t&&t!==n?(this.newExitTime=t,v.a.hasSpecifiedExitTimeForVacationDay(this.vacationRequestDays)?(this.oldExitTime=n,this.$refs.exitTimesExistsWarning.show()):this.updateExitTimes()):this.exitTime=n},onUpdateEntryTime:function(e){var t=e.displayTime,n=this.entryTime;this.entryTime=t,""!==t&&t!==n?(this.newEntryTime=t,v.a.hasSpecifiedEntryTimeForVacationDay(this.vacationRequestDays)?(this.oldEntryTime=n,this.$refs.entryTimesExistsWarning.show()):this.updateEntryTimes()):this.entryTime=n},onCancelEntryTimesExistWarning:function(){this.entryTime=this.oldEntryTime,this.oldEntryTime="",this.newEntryTime="",this.$refs.entryTimesExistsWarning.hide()},onOkEntryTimesExistWarning:function(){""!==this.newEntryTime&&this.updateEntryTimes(),this.oldEntryTime="",this.newEntryTime="",this.$refs.entryTimesExistsWarning.hide()},onCancelExitTimesExistWarning:function(){this.exitTime=this.oldExitTime,this.oldExitTime="",this.newExitTime="",this.$refs.exitTimesExistsWarning.hide()},onOkExitTimesExistWarning:function(){this.updateExitTimes(),this.oldExitTime="",this.newExitTime="",this.$refs.exitTimesExistsWarning.hide()},updateExitTimes:function(){v.a.updateExitTimeForVacationRequestDays(this.vacationRequestDays,this.newExitTime)},updateEntryTimes:function(){v.a.updateEntryTimeForVacationRequestDays(this.vacationRequestDays,this.newEntryTime)}}},L=Object(k.a)(O,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("VacationIntervalsFragmentDayRow",{staticClass:"row"},[n("VacationIntervalsFragmentDayCol",[n("p",{staticClass:"font-weight-bold"},[e._v("\n      "+e._s(e.$getText("CALENDAR_TIMES_FOR_ALL_WEEK_TITLE"))+"\n    ")]),e._v(" "),n("p",{staticClass:"m-0"},[e._v("\n      "+e._s(e.$getText("CALENDAR_TIMES_FOR_ALL_WEEK_DESCRIPTION"))+"\n    ")])]),e._v(" "),n("VacationIntervalsFragmentDayCol",{staticClass:"d-flex justify-content-end flex-wrap"},[n("div",{staticClass:"timepicker-group"},[n("label",{staticClass:"timepicker-label",attrs:{for:"allWeekFrom"}},[e._v("\n        "+e._s(e.$getText("RESPONSE_VACATION_COMMING_HOUR"))+"\n      ")]),e._v(" "),n("VacationIntervalsFragmentTimepicker",{attrs:{id:"allWeekFrom","timepicker-value":e.entryTime,start:e.startTime,end:e.endTime,disabled:e.disabled},on:{change:e.onUpdateEntryTime}})],1),e._v(" "),n("div",{staticClass:"timepicker-group"},[n("label",{staticClass:"timepicker-label",attrs:{for:"allWeekTo"}},[e._v("\n        "+e._s(e.$getText("RESPONSE_VACATION_NOT_COMMING_HOUR"))+"\n      ")]),e._v(" "),n("VacationIntervalsFragmentTimepicker",{attrs:{id:"allWeekTo","timepicker-value":e.exitTime,start:e.startTime,end:e.endTime,disabled:e.disabled},on:{change:e.onUpdateExitTime}})],1)]),e._v(" "),n("VacationIntervalsFragmentDayCol"),e._v(" "),n("aula-modal",{ref:"entryTimesExistsWarning",on:{cancelClicked:function(t){return e.onCancelEntryTimesExistWarning()},okClicked:function(t){return e.onOkEntryTimesExistWarning()}}},[e._v("\n    "+e._s(e.$getText("PRESENCE_WARNING_FILL_OUT_TIMES_FOR_ENTIRE_WEEK"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"exitTimesExistsWarning",on:{cancelClicked:function(t){return e.onCancelExitTimesExistWarning()},okClicked:function(t){return e.onOkExitTimesExistWarning()}}},[e._v("\n    "+e._s(e.$getText("PRESENCE_WARNING_FILL_OUT_TIMES_FOR_ENTIRE_WEEK"))+"\n  ")])],1)}),[],!1,null,"6e4f8b2a",null).exports,x=n(23),P=n(29),M=n(15),F=n(20),U=n(32),B=n(21),V=n(67),W=n(156),G=n.n(W),H=n(34);function j(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var q={components:{AulaButton:U.a,Icon:F.a,VacationIntervalsFragmentTimepicker:w,VacationIntervalsFragmentComeAllWeek:L,VacationIntervalsFragmentMobileComeAllWeek:R},data:function(){return{timepickerSettings:f.a,isShown:!1,isLoading:!1,isSavingResponse:!1,focusTarget:".btn-clear",isReadonly:!1,isEditable:!1,isMissingData:!1,vacationRequestTitle:null,comingTimes:[],comment:"",activeChild:null,hasDataChanged:!1,presenceOpenHours:p.a,generalOpeningsHours:[],vacationRequestDaysList:[]}},computed:z(z({title:function(){var e=this.isMobile?40:120;return G()(this.vacationRequestTitle,{length:e})},iconClassEnum:function(){return M.a}},Object(c.c)({isMobile:u.a.GET_IS_MOBILE,guardianVacationResponse:u.a.GET_VACATION_REQUEST_RESPONSE,notifications:u.a.GET_NOTIFICATIONS,openHours:u.a.GET_GENERAL_OPENING_HOURS_FOR_GUARDIAN,specificOpenHours:u.a.GET_PRESENCE_OPEN_HOURS_GUARDIAN_DASHBOARD,presenceTimes:u.a.GET_PRESENCE_TIMES,hasCustodyOrExtendedAccess:u.a.GET_HAS_CUSTODY_OR_EXTENDED_ACCESS})),{},{userProfileStore:function(){return Object(A.a)()},profile:function(){return this.userProfileStore.institutionProfile},childInstitutionGeneralOpeningHoursDictionary:function(){var e,t=this,n={},i=this.openHours.find((function(e){return e.institutionCode===t.activeChild.institutionCode})),s=j((null==i?void 0:i.openingHours)||[]);try{for(s.s();!(e=s.n()).done;){var a=e.value;n[a.dayOfWeek]=a}}catch(e){s.e(e)}finally{s.f()}return n},specificOpeningHoursDictionary:function(){var e=this,t={};this.specificOpenHours.openingHoursOverviewDto;var n,i=this.specificOpenHours.openingHoursOverviewDto.find((function(t){return t.institutionCode===e.activeChild.institutionCode})),s=j((null==i?void 0:i.openingHoursDto)||[]);try{for(s.s();!(n=s.n()).done;){var a=n.value;t[a.date]=a}}catch(e){s.e(e)}finally{s.f()}return t},childPresenceDayTemplateDictionary:function(){var e,t={},n=this.guardianVacationResponse.vacationRegistrationResponse.childId,i=this.presenceTimes.presenceWeekTemplates.find((function(e){return e.institutionProfile.id===n})),s=j((null==i?void 0:i.dayTemplates)||[]);try{for(s.s();!(e=s.n()).done;){var a=e.value;t[B.a.formatDate(a.byDate,H.a.COMPLETE_DATE)]=a}}catch(e){s.e(e)}finally{s.f()}return t},vacationRequestWeeks:function(){var e=new Map;if(this.guardianVacationResponse){var t,n=j(this.vacationRequestDaysList);try{for(n.s();!(t=n.n()).done;){var i=t.value,s=i.year,a=i.week;e.set("".concat(a,",").concat(s),{week:a,year:s})}}catch(e){n.e(e)}finally{n.f()}}return Array.from(e.values())},isComingEntireVacationPeriod:function(){return this.vacationRequestDaysList.every((function(e){return!e.isDisabled&&e.isComing}))}}),methods:z(z({},Object(c.b)({loadGuardianVacationResponse:u.a.LOAD_VACATION_REQUEST_RESPONSE,addVacation:u.a.ADD_VACATION,deleteNotifications:u.a.DELETE_NOTIFICATIONS,get
1SpecificOpeningHours:u.a.LOAD_PRESENCE_OPEN_HOURS_GUARDIAN_DASHBOARD,getGeneralOpeningHours:u.a.LOAD_GENERAL_OPENING_HOURS_FOR_GUARDIAN,loadPresenceTimes:u.a.LOAD_PRESENCE_TIMES})),{},{formattedEventLongDate:function(e){return V.a.upperFirst(B.a.longDate(e,!0))},isComingAllWeek:function(e,t){var n,i=this.vacationRequestDaysList.filter((function(t){return e.year===t.year&&e.week===t.week&&!t.isDisabled})),s=!0,a=j(i);try{for(a.s();!(n=a.n()).done;){if(n.value.isComing!==t){s=null;break}}}catch(e){a.e(e)}finally{a.f()}return i.length>0&&s},checkIsComingAllWeek:function(e,t){var n=t;this.isComingAllWeek(e,t)&&(n=null);var i=this.vacationRequestDaysList.filter((function(t){var n=t.year,i=t.week;return e.year===n&&e.week===i}));v.a.updateIsComingValueForVacationRequestDays(i,n)},onEditMode:function(){this.isReadonly=!1},populateVacationRequestDaysList:function(){var e=this.guardianVacationResponse.vacationRegistration,t=h()(e.startDate).startOf("day"),n=h()(e.endDate).endOf("day"),i=this.childPresenceDayTemplateDictionary;for(this.comment=this.guardianVacationResponse.vacationRegistrationResponse.comment,this.vacationRequestDaysList=[];t.isBefore(n);){var s=t.isoWeekday();if(s<=m.a.FRIDAY){var a=t.format("YYYY-MM-DD");this.vacationRequestDaysList.push(new b({date:a,year:t.isoWeekYear(),week:t.isoWeek(),isComing:this.getVacationResponseIsComing(a),entryTime:this.getVacationResponseEntryTime(a),exitTime:this.getVacationResponseExitTime(a),useTimes:e.isPresenceTimesRequired},e,this.specificOpeningHoursDictionary[a],this.childInstitutionGeneralOpeningHoursDictionary[s],i[a]))}t.add(1,"day")}},getVacationResponseIsComing:function(e){var t=this.getVacationDayResponse(e),n=null;return t&&(n=t.isComing),n},getVacationResponseEntryTime:function(e){var t=this.getVacationDayResponse(e),n="";return null!=t&&t.entryTime&&(n=t.entryTime),n},getVacationResponseExitTime:function(e){var t=this.getVacationDayResponse(e),n="";return null!=t&&t.exitTime&&(n=t.exitTime),n},getVacationDayResponse:function(e){return this.guardianVacationResponse.vacationRegistrationResponse.days.find((function(t){return h()(t.date).format("YYYY-MM-DD")===e}))},show:function(e,t,n){this.isShown=!0,this.isReadonly=n,this.isEditable=e.isEditable,this.profile.role===E.a.GUARDIAN&&(this.isEditable=this.hasCustodyOrExtendedAccess(t.id)&&Object(x.s)(e.responseDeadline)),this.vacationRequestTitle=e.title,this.activeChild=t,this.resetData(),this.getGuardianVacationResponse(e)},loadChildPresenceTime:function(e){var t="YYYY-MM-DD",n=h()(e.startDate,t),i=h()(e.endDate,t),s=Object(x.u)();if(!i.isBefore(s))return n.isBefore(s)&&(n=h()().add(1,"days")),this.loadPresenceTimes({institutionProfileIds:[this.activeChild.id],fromDate:n.format(t),toDate:i.format(t)})},hide:function(){var e=this;this.$emit("onClosed"),this.$nextTick((function(){return e.isShown=!1}))},changeDrawerShow:function(e){e||this.handleDiscard()},convertDateFormat:function(e){return h()(e).format("DD. MMM. YYYY")},getComingString:function(e){if(e.getIsClosingDay()){var t=e.specificOpeningHour.name;return this.$getText("PRESENCE_VACATION_CLOSED_DAYS_NAME_CLOSED_PLACEHOLDER")+" "+t}return this.$getText("RESPONSE_VACATION_COMING")},getLeavingString:function(e){if(e.getIsClosingDay()){var t=e.specificOpeningHour.name;return this.$getText("PRESENCE_VACATION_CLOSED_DAYS_NAME_CLOSED_PLACEHOLDER")+" "+t}return this.$getText("RESPONSE_VACATION_NOT_COMING")},getSpecificOpeningHoursString:function(e){var t=e.specificOpeningHour,n=t.openTime,i=t.closeTime,s=this.$getText("PRESENCE_VACATION_SPECIFIC_OPENING_HOURS_PLACEHOLDER"),a=this.$getText("PRESENCE_VACATION_SPECIFIC_OPENING_HOURS_NAME_PLACEHOLDER");return"".concat(s," ").concat(a," ").concat(n," - ").concat(i)},getSpecificOpeningHourString:function(e){if(e&&e.type===p.a.SPECIFIC_OPEN_HOURS){var t=this.$getText("PRESENCE_VACATION_SPECIFIC_OPENING_HOURS_PLACEHOLDER"),n=this.$getText("PRESENCE_VACATION_SPECIFIC_OPENING_HOURS_NAME_PLACEHOLDER");return"".concat(t," ").concat(n," ").concat(e.openTime," - ").concat(e.closeTime)}return this.$getText("RESPONSE_VACATION_COMING")},onNotComingDateChange:function(){this.hasDataChanged=!0}
1,validateComingTime:function(e){e.isValid(),this.hasDataChanged=!0},onChangeVacationRequest:function(){this.hasDataChanged=!0},getMonthLabelForWeek:function(e){var t=h()().isoWeek(e).startOf("isoWeek").format("MMMM YYYY"),n=h()().isoWeek(e).endOf("isoWeek").format("MMMM YYYY");return t===n?t:"".concat(t," - ").concat(n)},getShortDateLabel:function(e){return V.a.upperFirst(h()(e).format("ddd - DD"))},getGuardianVacationResponse:function(e){var t=this;return s()(l.a.mark((function n(){return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.isLoading=!0,n.next=3,Promise.all([t.loadChildPresenceTime(e),t.loadGuardianVacationResponse({vacationRegistrationResponseId:e.responseId})]);case 3:return n.next=5,t.loadOpeningHours();case 5:t.populateVacationRequestDaysList(),t.isLoading=!1;case 7:case"end":return n.stop()}}),n)})))()},validateForm:function(){var e=this,t=!0;return this.vacationRequestDaysList.forEach((function(n){n.setSubmitClicked(!0),n.isValid()||(t=!1,n.validator.hasTimes&&n.validator.isValidIncoming||(e.isMissingData=!0))})),t},updateVacationResponses:function(){var e=this;this.isSavingResponse=!0;var t=this.vacationRequestDaysList.filter((function(e){return!e.isDisabled})).map((function(t){var n=t.isComing,i=t.entryTime,s=t.exitTime,a=t.useTimes,r=e.guardianVacationResponse.vacationRegistrationResponse.childId,o=e.presenceTimes.presenceWeekTemplates.find((function(e){return e.institutionProfile.id===r})),l=(null==o?void 0:o.dayTemplates)||[];if(l!==[]){var c=l.find((function(e){return Object(x.q)(e.byDate,t.date)}));return t.getIsClosingDay()&&(n=!1),!1===n||!1===a?(i="",s=""):(null==c?void 0:c.activityType)===P.a.SELF_DECIDER&&!0===n&&(s||(s=c.selfDeciderEndTime)),{date:t.date,isComing:n,entryTime:i,exitTime:s}}}));this.addVacation({vacationRegistrationResponseId:this.guardianVacationResponse.vacationRegistrationResponse.vacationRegistrationResponseId,childId:this.guardianVacationResponse.vacationRegistrationResponse.childId,days:t,comment:this.comment}).then((function(){if(e.guardianVacationResponse.vacationRegistration.isMissingAnswer){var t=e.notifications.filter((function(t){return t.vacationRegistrationResponseId===e.guardianVacationResponse.vacationRegistrationResponse.vacationRegistrationResponseId}));e.deleteNotifications({notifications:t})}e.hide()})).finally((function(){e.isSavingResponse=!1}))},onSaveClicked:function(){this.validateForm()&&this.updateVacationResponses()},resetData:function(){this.comment="",this.isMissingData=!1,this.hasDataChanged=!1},discardResponse:function(){this.$refs.discardResponseWarning.hide(),this.hide()},handleDiscard:function(){this.hasDataChanged?this.$refs.discardResponseWarning.show():this.hide()},loadOpeningHours:function(){var e=this.guardianVacationResponse.vacationRegistration.startDate,t=this.guardianVacationResponse.vacationRegistration.endDate,n=[this.activeChild.institutionCode],i={institutionCodes:n,startDate:e,endDate:t},s={institutionCodes:n};return this.getGeneralOpeningHours(s),this.getSpecificOpeningHours(i)},vacationDaysDisabled:function(e){return this.isReadonly||this.vacationRequestDaysList.filter((function(t){return t.week===e})).every((function(e){return e.isDisabled}))},isVacationFullWeek:function(e){return 5===this.vacationRequestDaysList.filter((function(t){return t.week===e.week&&t.year===e.year})).length},canSelectPresenceTimeForAllWeek:function(e,t,n){var i=this.isVacationFullWeek(e),s=this.isComingAllWeek(e,t);return i&&s&&n}})},K=Object(k.a)(q,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("drawer",{attrs:{show:e.isShown,"focus-target":e.focusTarget},on:{"change-show":e.changeDrawerShow},scopedSlots:e._u([{key:"drawer-title",fn:function(){return[n("div",{staticClass:"presence-drawer-header"},[n("Icon",{staticClass:"presence-drawer-icon hide-tablet-down mr-3",attrs:{name:e.iconClassEnum.EXPORT,"aria-hidden":"true"}}),e._v(" "),n("span",[e._v(e._s(e.title))])],1)]},proxy:!0},{key:"header-right",fn:function(){return[e.isReadonly&&e.isEditable?n("AulaButton",{staticClass:"drawer-edit-button mt-0 to-the-right",attrs:{variant:"link","aria-label":e.$getText("ARIA_LABEL_EDIT")},on:{click:function(t){return e.onEditMode()}}},[n("Icon",{staticClass:"icon",attrs:{name:e.iconClassEnum.EDIT_PEN}}),e._v(" "),e.isMobile?e._e():n("span",[e._v(" "+e._s(e.$getText("BUTTON_EDIT")))])],1
1):e._e()]},proxy:!0},{key:"drawer-content",fn:function(){return[e.isLoading?n("div",{staticClass:"vacation-request-spinner"},[n("b-spinner")],1):e.guardianVacationResponse?n("div",{staticClass:"register-vacation-request-container"},[e.isReadonly&&!e.isEditable?n("div",{staticClass:"aula-alert mb-3"},[n("div",{staticClass:"icon-box-exclamation",attrs:{"aria-hidden":"true"}},[n("div",{staticClass:"circle"},[n("i",{staticClass:"icon-Aula_exclamation_sign"})])]),e._v(" "),n("div",{staticClass:"alert-text"},[e._v("\n          "+e._s(e.$getText("PRESENCE_WARNING_VACATION_REQUEST_UNEDITABLE"))+"\n        ")])]):e._e(),e._v(" "),e.activeChild?n("h2",{staticClass:"mb-3"},[e.isMobile?e._e():n("span",[e._v(e._s(e.$getText("RESPONSE_VACATION_REQUEST_FOR")))]),e._v("\n        "+e._s(e.$getProfileDisplayName(e.activeChild))+"\n      ")]):e._e(),e._v(" "),e.isMobile?[n("div",{staticClass:"d-flex"},[n("div",{staticClass:"field-label"},[e._v(e._s(e.$getText("PRESENCE_VACATION_FR0M"))+":")]),e._v(" "),n("div",[e._v("\n            "+e._s(e.convertDateFormat(e.guardianVacationResponse.vacationRegistration.startDate))+"\n          ")])]),e._v(" "),n("div",{staticClass:"d-flex"},[n("div",{staticClass:"field-label"},[e._v(e._s(e.$getText("PRESENCE_VACATION_TO"))+":")]),e._v(" "),n("div",[e._v("\n            "+e._s(e.convertDateFormat(e.guardianVacationResponse.vacationRegistration.endDate))+"\n          ")])])]:n("div",{staticClass:"d-flex"},[n("div",{staticClass:"field-label"},[e._v("\n          "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_PERIOD_1"))+"\n        ")]),e._v(" "),n("div",[e._v("\n          "+e._s(e.convertDateFormat(e.guardianVacationResponse.vacationRegistration.startDate))+"\n          -\n          "+e._s(e.convertDateFormat(e.guardianVacationResponse.vacationRegistration.endDate))+"\n        ")])]),e._v(" "),e.guardianVacationResponse.vacationRegistration.responseDeadline?n("div",{staticClass:"d-flex"},[n("div",{staticClass:"field-label"},[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_REQUEST_DEADLINE"))+":")]),e._v(" "),n("div",[e._v("\n          "+e._s(e.convertDateFormat(e.guardianVacationResponse.vacationRegistration.responseDeadline))+"\n        ")])]):e._e(),e._v(" "),n("div",{staticClass:"my-3 my-lg-4"},[e._v("\n        "+e._s(e.guardianVacationResponse.vacationRegistration.noteToGuardian)+"\n      ")]),e._v(" "),e.isMobile?e._e():n("div",{staticClass:"font-weight-bold"},[e._v(e._s(e.$getText("RESPONSE_VACATION_REQUEST_INTRODUCTION"))+".")]),e._v(" "),n("div",{staticClass:"vacation-intervals mt-3 mt-lg-4"},[e._l(e.vacationRequestWeeks,(function(t,i){return[e.isMobile?[n("b-row",{key:"week"+i,staticClass:"header-container mt-2"},[n("b-col",{staticClass:"header-item font-weight-bold d-flex justify-content-between text-uppercase px-4"},[n("div",[e._v("\n                  "+e._s(e.getMonthLabelForWeek(t.week))+"\n                ")]),e._v(" "),n("div",[e._v("\n                  "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_WEEK"))+"\n                  "+e._s(t.week)+"\n                ")])])],1),e._v(" "),e.isVacationFullWeek(t)?n("VacationIntervalsFragmentMobileComeAllWeek",{attrs:{"vacation-request-days":e.vacationRequestDaysList.filter((function(e){return e.week===t.week&&e.year===t.year})),"is-readonly":e.isReadonly}}):e._e(),e._v(" "),e._l(e.vacationRequestDaysList.filter((function(e){return e.week===t.week&&e.year===t.year})),(function(t,s){return[n("b-row",{key:"day"+i+t.date+s,staticClass:"response-day"},[n("b-col",{staticClass:"day pl-4 pt-2",attrs:{cols:"3",sm:"2"}},[n("strong",[e._v(e._s(e.getShortDateLabel(t.date)))])]),e._v(" "),n("b-col",{staticClass:"mt-2 mb-1"},[t.getIsClosingDay()?n("p",{staticClass:"checkbox-text-disabled"},[e._v("\n                    "+e._s(e.getComingString(t))+"\n                  ")]):[n("b-form-checkbox",{attrs:{"unchecked-value":null,disabled:e.isReadonly||t.isDisabled},on:{input:e.onChangeVacationRequest},model:{value:t.isComing,callback:function(n){e.$set(t,"isComing",n)},expression:"vacationDay.isComing"}},[e._v("\n                      "+e._s(e.getComingString(t))+"\n                    ")]),e._v(" "),!t.getIsClosingDay()&&t.isComing&&t.useTimes?[n("b-row",{staticClass:"checkin-time ml-1 pt-1"},[n("b-col",{attrs:{cols:"4"}},[e._v("\n                          "+e._s(e.$getText("RESPONSE_VACATION_COMMING_HOUR"))+"\n                        ")]),e._v(" "),n("b-col",{attrs:{cols:"8"}},[n("VacationIntervalsFragmentTimepicker",{staticClass:"time",class:{"red-border":t.getShowIsWithinOpeningHourError()||t.getShowHasTimesError()||t.getShowIsValidTimesError()},attrs:{disabled:e.isReadonly||t.isDisabled,start:t.getStartTime(),end:t.getEndTime(),"timepicker-value":t.entryTime},on:{change:function(n){return e.validateComingTime(t)}},model:{value:t.entryTime,callback:function(n){e.$set(t,"entryTime",n)},expression:"vacationDay.entryTime"}})],1)],1),e._v(" "),n("b-row",{staticClass:"checkin-time ml-1"},[n("b-col",{attrs:{cols:"4"}},[e._v("\n                          "+e._s(e.$getText("RESPONSE_VACATION_NOT_COMMING_HOUR"))+"\n                        ")]),e._v(" "),n("b-col",{attrs:{cols:"8"}},[n("VacationIntervalsFragmentTimepicker",{staticClass:"time",class:{"red-border":t.getShowIsWithinOpeningHourError()||t.getShowHasTimesError()||t.getShowIsValidTimesError()},attrs:{disabled:e.isReadonly||t.isDisabled,start:t.getStartTime(),end:t.getEndTime(),"timepicker-value":t.exitTime},on:{change:function(n){return e.validateComingTime(t)}},model:{value:t.exitTime,callback:function(n){e.$set(t,"exitTime",n)},expression:"vacationDay.exitTime"}})],1),e._v(" "),n("b-col",{attrs:{cols:"12"}},[n("b-alert",{attrs:{variant:"danger",show:t.getShowIsWithinOpeningHourError()}},[e._v("\n                            "+e._s(e.$getText("RESPONSE_VACATION_TIMES_OUTSIDE_OPENING_HOURS"))+"\n                          ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:t.getShowHasTimesError()}},[e._v("\n                            "+e._s(e.$getText("RESPONSE_VACATION_COMING_TIME_INVALID"))+"\n                          ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:t.getShowIsValidTimesError()}},[e._v("\n                            "+e._s(e.$getText("PRESENCE_ALERT_INVALID_START_AND_END_TIME"))+"\n                          ")])],1)],1)]:e._e(),e._v(" "),n("b-form-checkbox",{attrs:{value:!1,"unchecked-value":null,disabled:e.isReadonly||t.isDisabled},on:{input:e.onChangeVacationRequest,change:function(n){return e.onNotComingDateChange(t.date)}},model:{value:t.isComing,callback:function(n){e.$set(t,"isComing",n)},expression:"vacationDay.isComing"}},[e._v("\n                      "+e._s(e.getLeavingString(t))+"\n                    ")])],e._v(" "),t.isComing&&t.getIsSpecificOpeningHours()&&!t.isDisabled?n("b-row",{attrs:{"aria-hidden":"true"}},[n("b-col",{staticClass:"circle-parent",attrs:{md:"auto"}},[n("i",{staticClass:"icon-Aula_exclamation_sign circle-specific-times icon-size"})]),e._v(" "),n("b-col",{staticClass:"pl-0"},[n("span",[e._v("\n                        "+e._s(e.getSpecificOpeningHoursString(t))+"\n                      ")])])],1):e._e(
1)],2)],1)]}))]:[n("b-row",{key:"week"+i,staticClass:"header-container font-weight-bold mt-2"},[n("b-col",{staticClass:"header-item mr-1"},[e._v("\n                "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_WEEK"))+"\n                "+e._s(t.week)+"\n              ")]),e._v(" "),n("b-col",{staticClass:"header-item mr-1 col-lg-4"},[e.isVacationFullWeek(t)?n("b-form-checkbox",{staticClass:"m-0",attrs:{checked:e.isComingAllWeek(t,!0),disabled:e.vacationDaysDisabled(t.week)},on:{input:e.onChangeVacationRequest,change:function(n){return e.checkIsComingAllWeek(t,!0)}}},[e._v("\n                  "+e._s(e.$getText("RESPONSE_VACATION_COMMING_TITLE"))+"\n                ")]):e._e()],1),e._v(" "),n("b-col",{staticClass:"header-item col-lg-4"},[e.isVacationFullWeek(t)?n("b-form-checkbox",{staticClass:"m-0",attrs:{checked:e.isComingAllWeek(t,!1),disabled:e.vacationDaysDisabled(t.week)},on:{input:e.onChangeVacationRequest,change:function(n){return e.checkIsComingAllWeek(t,!1)}}},[e._v("\n                  "+e._s(e.$getText("RESPONSE_VACATION_NOT_COMMING_TITLE"))+"\n                ")]):e._e()],1)],1),e._v(" "),e.canSelectPresenceTimeForAllWeek(t,!0,e.guardianVacationResponse.vacationRegistration.isPresenceTimesRequired)?n("VacationIntervalsFragmentComeAllWeek",{staticClass:"come-all-week",attrs:{disabled:e.isReadonly,"vacation-request-days":e.vacationRequestDaysList.filter((function(e){return e.week===t.week&&e.year===t.year}))}}):e._e(),e._v(" "),e._l(e.vacationRequestDaysList.filter((function(e){return e.week===t.week&&e.year===t.year})),(function(t,s){return[n("b-row",{key:"day-"+i+"-"+t.date+"-"+s,staticClass:"response-day"},[n("b-col",{staticClass:"day pl-3 mr-1"},[n("strong",[e._v(e._s(e.formattedEventLongDate(t.date)))])]),e._v(" "),n("b-col",{staticClass:"pl-3 col-lg-4"},[t.getIsClosingDay()?n("p",{staticClass:"checkbox-text-disabled"},[e._v("\n                    "+e._s(e.getComingString(t))+"\n                  ")]):n("b-form-checkbox",{attrs:{"unchecked-value":null,disabled:e.isReadonly||t.isDisabled},on:{input:e.onChangeVacationRequest},model:{value:t.isComing,callback:function(n){e.$set(t,"isComing",n)},expression:"vacationDay.isComing"}},[e._v("\n                    "+e._s(e.getComingString(t))+"\n                  ")]),e._v(" "),t.isComing&&t.getIsSpecificOpeningHours()&&!t.isDisabled?n("b-row",{attrs:{"aria-hidden":"true"}},[n("b-col",{staticClass:"circle-parent",attrs:{md:"auto"}},[n("i",{staticClass:"icon-Aula_exclamation_sign circle-specific-times icon-size"})]),e._v(" "),n("b-col",{staticClass:"pl-0"},[n("span",[e._v("\n                        "+e._s(e.getSpecificOpeningHoursString(t))+"\n                      ")])])],1):e._e(),e._v(" "),!t.getIsClosingDay()&&t.isComing&&t.useTimes?[n("div",{staticClass:"checkin-time d-flex justify-content-end flex-wrap"},[n("div",{staticClass:"mx-1"},[e._v("\n                        "+e._s(e.$getText("RESPONSE_VACATION_COMMING_HOUR"))+"\n                        "),n("VacationIntervalsFragmentTimepicker",{staticClass:"time",class:{"red-border":t.getShowIsWithinOpeningHourError()||t.getShowHasTimesError()||t.getShowIsValidTimesError()},attrs:{disabled:e.isReadonly||t.isDisabled,start:t.getStartTime(),end:t.getEndTime(),"timepicker-value":t.entryTime},on:{change:function(n){return e.validateComingTime(t)}},model:{value:t.entryTime,callback:function(n){e.$set(t,"entryTime",n)},expression:"vacationDay.entryTime"}})],1),e._v(" "),n("div",{staticClass:"ml-1"},[e._v("\n                        "+e._s(e.$getText("RESPONSE_VACATION_NOT_COMMING_HOUR"))+"\n                        "),n("VacationIntervalsFragmentTimepicker",{staticClass:"time",class:{"red-border":t.getShowIsWithinOpeningHourError()||t.getShowHasTimesError()||t.getShowIsValidTimesError()},attrs:{disabled:e.isReadonly||t.isDisabled,start:t.getStartTime(),end:t.getEndTime(),"timepicker-value":t.exitTime},on:{change:function(n){return e.validateComingTime(t)}},model:{value:t.exitTime,callback:function(n){e.$set(t,"exitTime",n)},expression:"vacationDay.exitTime"}})],1),e._v(" "),n("div",{staticClass:"w-100"},[n("b-alert",{attrs:{variant:"danger",show:t.getShowIsWithinOpeningHourError()}},[e._v("\n                          "+e._s(e.$getText("RESPONSE_VACATION_TIMES_OUTSIDE_OPENING_HOURS"))+"\n                        ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:t.getShowHasTimesError()}},[e._v("\n                          "+e._s(e.$getText("RESPONSE_VACATION_COMING_TIME_INVALID"))+"\n                        ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:t.getShowIsValidTimesError()}},[e._v("\n                          "+e._s(e.$getText("PRESENCE_ALERT_INVALID_START_AND_END_TIME"))+"\n                        ")])],1)])]:e._e()],2),e._v(" "),n("b-col",{staticClass:"pl-3 col-lg-4"},[t.getIsClosingDay()?n("p",{staticClass:"checkbox-text-disabled"},[e._v("\n                    "+e._s(e.getLeavingString(t))+"\n                  ")]):n("b-form-checkbox",{attrs:{value:!1,"unchecked-value":null,disabled:e.isReadonly||t.isDisabled},on:{input:e.onChangeVacationRequest,change:function(n){return e.onNotComingDateChange(t.date)}},model:{value:t.isComing,callback:function(n){e.$set(t,"isComing",n)},expression:"vacationDay.isComing"}},[e._v("\n                    "+e._s(e.getLeavingString(t))+"\n                  ")])],1)],1)]}))]]}))],2),e._v(" "),n("b-alert",{staticClass:"my-2",attrs:{variant:"danger",show:e.isMissingData}},[e._v("\n        "+e._s(e.$getText("CALENDAR_CANT_SAVE_VACATION_WARNING"))+"\n      ")]),e._v(" "),n("label",{staticClass:"mt-3"},[e._v(" "+e._s(e.$getText("RESPONSE_VACATION_NOTE_LABEL"))+" ")]),e._v(" "),n("b-form-textarea",{attrs:{placeholder:e.$getText("RESPONSE_VACATION_NOTE_PLACEHOLDER"),disabled:e.isReadonly||e.isComingEntireVacationPeriod,maxlength:"250",rows:"3"},on:{change:function(t){e.hasDataChanged=!0}},model:{value:e.comment,callback:function(t){e.comment=t},expression:"comment"}}),e._v(" "),n("aula-form-footer",{attrs:{"is-loading":e.isSavingResponse,"submit-text":e.isReadonly?"BUTTON_CLOSE":"BUTTON_SAVE","show-cancel":!e.isReadonly},on:{submitClicked:function(t){e.isReadonly?e.handleDiscard():e.onSaveClicked()},cancelClicked:e.handleDiscard}})],2):e._e(),e._v(" "),n("aula-modal",{ref:"discardResponseWarning",on:{cancelClicked:function(t){return e.$refs.discardResponseWarning.hide()},okClicked:function(t){return e.discardResponse()}}},[e._v("\n      "+e._s(e.$getText("CALENDAR_CANCEL_INFO"))),n("br"),e._v(e._s(e.$getText("CALENDAR_CANCEL_INFO_2"))+"\n    ")])]},proxy:!0}])})}),[],!1,null,"18b9f9c6",null);t.a=K.exports},250:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(1),r=n.n(a),o=n(7),l=n.n(o),c=n(4),u=n(78),d=n.n(u),h=n(5),m=n.n(h),p=n(0),v=n(6),f=n(9),g=n(16),_=n.n(g),E=n(165),A=n(13);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?T(Object(n),!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C={components:{AulaBadge:E.a},props:{placement:{type:String,default:""},widgetTitle:{type:String,default:""},widgetID:{default:""},widgetVersion:{default:""},widgetType:{type:String,default:""},icon:{type:String,default:""},SSOaction:{type:String,default:""},cleanUp:{type:Boolean,default:!1},supplier:{type:String,default:""},isMobile:{type:Boolean,default:!1},badgeCount:{type:Number,default:0},notifications:{type:Array,default:function(){return[]}}},data:function(){return{id:null,sessionUUID:null,userProfile:null,assuranceLevel:2,childFilter:[],institutionFilter:[],group:null,currentWeekNumber:null,aulaToken:null,loaded:!1}},computed:b(b(b({},Object(v.c)({isSteppedUp:p.a.GET_GLOBAL_STEPPED_UP,currentUniLogin:p.a.GET_CURRENT_UNILOGIN,activeInstitutions:p.a.GET_ACTIVE_INSTITUTIONS,activeChildrenUniLogin:p.a.GET_ACTIVE_CHILDREN_UNILOGIN,activeWeek:p.a.GET_CURRENT_WEEK,getGroup:p.a.GET_ACTIVE_GROUP})),Object(v.b)({deleteNotifications:p.a.DELETE_NOTIFICATIONS})),{},{userProfileStore:function(){return Object(A.a)()},profile:function(){return this.userProfileStore.institutionProfile},axios:function(){var e=d.a.create();return e.create=d.a.create,e}}),watch:{activeInstitutions:function(){this.setParams()},activeChildrenUniLogin:function(){this.setParams()},widgetID:function(){this.setParams()},activeWeek:function(){this.setParams()},isSteppedUp:function(){this.setParams()},getGroup:function(){this.setParams()}},mounted:function(){var e=this;this.id="W"+this.widgetID+"V"+this.widgetVersion;var t=this.widgetID;sessionStorage.getItem("tokenTime"+t)&&m()().isBefore(m()(sessionStorage.getItem("tokenTime"+t),"DD-MM-YYYY HH:mm:ss"))?c.default.nextTick((function(){e.aulaToken=sessionStorage.getItem("token"+t),e.setParams()})):f.b.get("/?method=aulaToken.getAulaToken&widgetId="+t).then((function(n){sessionStorage.setItem("token"+t,n.data.data),sessionStorage.setItem("tokenTime"+t,m()().add(4,"m").format("DD-MM-YYYY HH:mm:ss")),c.default.nextTick((function(){e.aulaToken=n.data.data,e.setParams()}))}))},methods:{submitForm:function(){document.getElementById(this.id+"aulaToken").value=this.aulaToken,document.getElementById(this.id+"SSOForm").submit(),document.getElementById(this.id+"aulaToken").value="",this.removeNotifications(this.notifications)},setParams:function(){if(this.userProfile=this.profile.role,this.sessionUUID=this.currentUniLogin,this.assuranceLevel=this.isSteppedUp?3:2,this.currentWeekNumber=this.activeWeek,this.childFilter=this.activeChildrenUniLogin.filter((function(e,t,n){return n.indexOf(e)===t})),this.institutionFilter=this.activeInstitutions.filter((function(e,t,n){return n.indexOf(e)===t})),this.group=this.getGroup.uniGroupId,this.SSOaction.split("?").length>0){_()(".widgetSSOmobile"+this.id+" .addons").html("");var e=this.SSOaction.split("?")[1];if(e&&e.length>0)for(var t=e.split("&"),n=0;n<t.length;n++)t[n].split("=").length>0&&_()(".widgetSSOmobile"+this.id+" .addons").append('<input type="hidden" name="'+t[n].split("=")[0]+'" value="'+t[n].split("=")[1]+'" />')}this.loaded=!0},removeNotifications:function(e){var t=this;return s()(l.a.mark((function n(){var i;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.map((function(e){return{notificationId:e.notificationId,institutionProfileId:e.institutionProfileId}})),n.next=3,t.deleteNotifications({notifications:i});case 3:case"end":return n.stop()}}),n)})))()}}},k=n(3),y=Object(k.a)(C,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"aula-widget"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.loaded,expression:"loaded"}],staticClass:"widgetBox"},[n("div",{staticClass:"id"},[e._v("\n      "+e._s(e.id)+"\n    ")]),e._v(" "),n("div",{staticClass:"header"},[e.badgeCount?n("AulaBadge",{staticClass:"mr-1"}
1,[e._v(e._s(e.badgeCount))]):e._e(),e._v(" "),n("div",{staticClass:"widget-name text-truncate"},[e._v(e._s(e.widgetTitle))]),e._v(" "),e.supplier?n("div",{staticClass:"widget-supplier"},[e._v(e._s(e.$getText("WIDGET_SUPPLIED_BY"))+" "+e._s(e.supplier))]):e._e()],1),e._v(" "),n("div",{staticClass:"content"},[n("div",[e.isMobile?[n("form",{class:"widgetSSOmobile"+e.id,attrs:{id:e.id+"SSOForm",name:"SSOForm",action:e.SSOaction,method:"get",enctype:"application/x-www-form-urlencoded"}},[n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobile}}),e._v(" "),n("input",{attrs:{id:e.id+"aulaToken",type:"hidden",name:"aulaToken"}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("span",{staticClass:"addons"})]),e._v(" "),n("button",{staticClass:"quick-access-item",attrs:{type:"button",title:e.widgetTitle},on:{click:function(t){return e.submitForm()}}},[e.icon?n("span",{staticClass:"widget-icon"},[n("img",{attrs:{src:e.icon}})]):e._e(),e._v("\n            "+e._s(e.widgetTitle)+"\n          ")])]:[n("form",{attrs:{id:e.id+"SSOForm",name:"SSOForm",action:e.SSOaction,target:"_blank",method:"post",enctype:"application/x-www-form-urlencoded"}},[n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobile}}),e._v(" "),n("input",{attrs:{id:e.id+"aulaToken",type:"hidden",name:"aulaToken"}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}})]),e._v(" "),n("button",{staticClass:"quick-access-item",attrs:{type:"button",title:e.widgetTitle},on:{click:function(t){return e.submitForm()}}},[e.icon?n("span",{staticClass:"widget-icon"},[n("img",{attrs:{src:e.icon}})]):e._e(),e._v("\n            "+e._s(e.widgetTitle)+"\n          ")])]],2)])])])}),[],!1,null,"2d049110",null);t.a=y.exports},252:function(e,t,n){"use strict";var i,s=n(127),a=n(6),r=n(0);!function(e){e.SKOLETUBE="skoletube",e.BORNETUBE="bornetube",e.YOUTUBE="youtube"}(i||(i={}));var o=n(75),l=n.n(o),c={components:{Editor:s.a},props:{institutionCode:{type:String,default:null},value:{type:String,default:""},maxLength:{type:Number,default:0},placeholderTextkey:{type:String,default:""},ariaLabel:{type:String,default:"ARIA_LABEL_WRITE_CONTENT"},disabled:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},minHeight:{type:Number,default:250},minContentHeight:{type:Number,default:48}},computed:Object.assign(Object.assign({},Object(a.c)({institutions:r.a.GET_INSTITUTIONS,editorPluginDetails:r.a.GET_EDITOR_PLUGIN_DETAILS})),{uniqueId:()=>`plugin_editor_${l()()}`,key(){return`${l()()}-${this.institutionCode}`},institution(){return this.institutions.find((e=>e.institutionCode===this.institutionCode))},plugins(){const e=[];return this.editorPluginDetails.forEach((t=>{var n,s;if(t.institutionType===(null===(n=this.institution)||void 0===n?void 0:n.institutionType)&&t.municipalityCode===(null===(s=this.institution)||void 0===s?void 0:s.municipalityCode))switch(t.pluginName.toLowerCase()){case"skoletube":e.push(i.SKOLETUBE);break;case"børnetube":e.push(i.BORNETUBE);break;case"youtube":e.push(i.YOUTUBE)}})),e}}
1)},u=n(3),d=Object(u.a)(c,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("Editor",e._g(e._b({key:e.key,attrs:{id:e.uniqueId,"toolbar-type":"basic",value:e.value,"max-length":e.maxLength,"placeholder-textkey":e.placeholderTextkey,"aria-label":e.ariaLabel,draggable:e.draggable,disabled:e.disabled,plugins:e.plugins,"min-height":e.minHeight,"min-content-height":e.minContentHeight}},"Editor",e.$attrs,!1),e.$listeners))}),[],!1,null,null,null);t.a=d.exports},253:function(e,t,n){"use strict";var i=n(1),s=n.n(i),a=n(210),r=n(250),o=n(120),l=n(6),c=n(0),u=n(245);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var h={components:{WidgetContent:a.a,WidgetLink:r.a},props:{listOfWidgets:{type:Array,default:function(){return[]}},placement:{type:String,default:""}},data:function(){return{widgetTypesEnum:o.a}},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Object(l.c)({notifications:c.a.GET_NOTIFICATIONS})),methods:{getWidgetNotificationCount:function(e){return this.getWidgetNotifications(e).length},getWidgetNotifications:function(e){return u.a.getNotifications(this.notifications,{widgetId:e.id})}}},m=h,p=n(3),v=Object(p.a)(m,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"aula-widget-placeholder"},[e._l(e.listOfWidgets,(function(t,i){return[t.type==e.widgetTypesEnum.SSO?[n("widget-link",{key:i,attrs:{placement:e.placement,supplier:t.widgetSupplier,icon:t.icon,"s-s-oaction":t.url,"widget-title":t.name,"widget-type":"SSO","widget-i-d":t.widgetId,"widget-version":t.widgetVersion,"badge-count":e.getWidgetNotificationCount(t),notifications:e.getWidgetNotifications(t)}})]:[n("widget-content",{key:i,attrs:{name:t.name,placement:e.placement,supplier:t.widgetSupplier,"restricted-groups":t.restrictedGroups,"widget-type":t.type,"widget-i-d":t.widgetId,"widget-version":t.widgetVersion,"widget-url":t.url,"badge-count":e.getWidgetNotificationCount(t),notifications:e.getWidgetNotifications(t)}})]]}))],2)}),[],!1,null,null,null);t.a=v.exports},295:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(35),s=n(77),a=n(21);class r{static getPattern(e,t,n,i,a,r){switch(e){case s.a.DAILY:return this.getDailyRepeatingPattern(t,a,r);case s.a.WEEKLY:return this.getWeeklyRepeatingPattern(t,n,r);case s.a.MONTHLY:return this.getMonthlyRepeatingPattern(t,i,r);default:return""}}static getDailyRepeatingPattern(e,t,n){return null==t?"":t>1?this.getIntervalPattern(e,t,n):this.getDailyPattern(e,n)}static getDailyPattern(e,t){return null!==t&&t>0?`${i.a.t("label.occur")} ${i.a.t("label.daily")} ${i.a.t("label.end_after",{total:t})}`.trim():`${i.a.t("label.occur")} ${i.a.t("label.daily")} ${e}`.trim()}static getIntervalPattern(e,t,n){return null!==n&&n>0?`${i.a.t("label.occur")} ${i.a.t("label.every")} ${t}. ${i.a.t("label.day")} ${i.a.t("label.end_after",{total:n})}`.trim():`${i.a.t("label.occur")} ${i.a.t("label.every")} ${t}. ${i.a.t("label.day")} ${e}`.trim()}static getWeeklyRepeatingPattern(e,t,n){return null==t?"":null!=n&&n>0?`${i.a.t("label.occur")} ${i.a.t("label.every")} ${this.convertToWeekDays(t)} ${i.a.t("label.and_end")} ${i.a.tc("label.number_of_weeks",n)}`.trim():`${i.a.t("label.occur")} ${i.a.t("label.every")} ${this.convertToWeekDays(t)} ${e}`.trim()}static getMonthlyRepeatingPattern(e,t,n){return null==t?"":null!=n&&n>0?`${i.a.t("label.occur")} ${i.a.t("label.every")} ${t}. ${i.a.t("label.month")} ${i.a.t("label.end_after",{total:n})}`.trim():`${i.a.t("label.occur")} ${i.a.t("label.every")} ${t}. ${i.a.t("label.month")} ${e}`.trim()}static convertToWeekDays(e){const t=this.getWeekdaysFromWeekdayMask(e);return this.formatWeekdays(t)}static getWeekdaysFromWeekdayMask(e){return e.map(((e,t)=>e?a.a.getWeekday(t):null)).filter((e=>null!==e))}static formatWeekdays(e){if(e.length>1){const t=e.pop();return`${e.join(", ")} ${i.a.t("label.and")} ${t}`}return e.join("")}}},304:function(e,t,n){"use strict";var i=n(15),s=n(41),a=n(9),r=function(e,t,n,i){return new(n||(n=Prom
1ise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))};const o=new class{constructor(){this.getEventById=(e,t=null)=>r(this,void 0,void 0,(function*(){try{const{data:n}=yield a.b.get("?method=calendar.getEventById",{params:{eventId:e,occurrenceDateTime:t}});return n.data}catch(e){return Promise.reject(new s.a(e))}})),this.respondToSimpleEvent=e=>r(this,void 0,void 0,(function*(){try{yield a.b.post("?method=calendar.respondToSimpleEvent",e)}catch(e){return Promise.reject(new s.a(e))}})),this.deleteEvent=e=>r(this,void 0,void 0,(function*(){try{yield a.b.post("?method=calendar.deleteEvent",e)}catch(e){return Promise.reject(new s.a(e))}})),this.respondToTimeSlotEvent=e=>r(this,void 0,void 0,(function*(){try{yield a.b.post("?method=calendar.respondToTimeSlotEvent",e)}catch(e){return Promise.reject(new s.a(e))}})),this.updateResponseToTimeSlotEvent=e=>r(this,void 0,void 0,(function*(){try{yield a.b.post("?method=calendar.updateResponseToTimeSlotEvent",e)}catch(e){return Promise.reject(new s.a(e))}})),this.blockTimeSlot=e=>r(this,void 0,void 0,(function*(){try{yield a.b.post("?method=calendar.blockTimeSlot",e)}catch(e){return Promise.reject(new s.a(e))}})),this.removeBlockingOrResponseToTimeSlot=e=>r(this,void 0,void 0,(function*(){try{yield a.b.post("?method=calendar.removeBlockingOrResponseToTimeSlot",e)}catch(e){return Promise.reject(new s.a(e))}})),this.getTimeSlotResponse=(e,t)=>r(this,void 0,void 0,(function*(){try{const{data:n}=yield a.b.get("?method=calendar.getTimeSlotResponse",{params:{eventId:e,concerningInstProfileId:t}});return n.data}catch(e){return Promise.reject(new s.a(e))}}))}};var l=n(4),c={components:{ContactPopover:n(464).a},props:{profile:{type:Object,required:!0}},computed:{id(){return`mention-${this.profile.id}`},name(){return this.profile.fullName||this.profile.name}},methods:{handleProfileClicked(){this.$router.push({name:"userview",params:{id:this.profile.id}})}}},u=n(3),d=Object(u.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-link",{staticClass:"mention",attrs:{id:e.id},on:{click:e.handleProfileClicked}},[e._v("\n  "+e._s(e.name)+" ("+e._s(e.profile.metadata)+")\n  "),n("ContactPopover",{attrs:{"profile-id":e.profile.id,target:e.id},on:{profileClicked:e.handleProfileClicked}})],1)}),[],!1,null,"63349f4d",null).exports,h=n(20),m={components:{Icon:h.a},props:{icon:{type:String,default:null},type:{type:String,required:!0}}},p=Object(u.a)(m,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"event-detail",attrs:{"data-type":e.type}},[e.icon?n("Icon",{attrs:{name:e.icon}}):e._e(),e._v(" "),e._t("default")],2)}),[],!1,null,"074d8a54",null).exports,v=n(80),f=Object(l.defineComponent)({components:{Avatar:v.a,EventDetail:p,Mention:d},props:{eventData:{type:Object,required:!0}},computed:{iconClassEnum:()=>i.a}}),g=Object(u.a)(f,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"event-details-overview"},[e.eventData.canViewDateTime?n("EventDetail",{attrs:{type:"dateTime",icon:e.iconClassEnum.CALENDAR}},[n("span",[e._v("\n      "+e._s(e.eventData.dateTime)+"\n      "),n("span",{staticClass:"duration"},[e._v("("+e._s(e.eventData.duration)+")")]),e._v(" "),e.eventData.oldDateTime?n("span",{staticClass:"old-date"},[e._v(e._s(e.eventData.oldDateTime))]):e._e()])]):e._e(),e._v(" "),e.eventData.recurrence?n("EventDetail",{attrs:{type:"recurrence",icon:e.iconClassEnum.REPEAT}},[e._v("\n    "+e._s(e.eventData.recurrence)+"\n  ")]):e._e(),e._v(" "),e.eventData.deadline?n("EventDetail",{attrs:{type:"deadline",icon:e.iconClassEnum.CLOCK,"data-highlighted":e.eventData.isInvitee}},[e._v("\n    "+e._s(e.eventData.deadline)+"\n  ")]):e._e(),e._v(" "),e.eventData.locations.length>0?n("EventDetail",{attrs:{type:"locations",icon:e.iconClassEnum.DOOR,title:e.$t("calendar.locations")}},[e._v("\n    "+e._s(e.eventData.locations.join(", "))+"\n  ")]):e._e(
1),e._v(" "),e.eventData.freeTextLocation?n("EventDetail",{attrs:{type:"freeTextLocation",icon:e.iconClassEnum.PIN,title:e.$t("calendar.meeting_place")}},[e._v("\n    "+e._s(e.eventData.freeTextLocation)+"\n  ")]):e._e(),e._v(" "),e.eventData.creator?n("EventDetail",{attrs:{type:"creator",icon:e.iconClassEnum.USER}},[n("i18n",{attrs:{path:"label.created_by"},scopedSlots:e._u([{key:"name",fn:function(){return[n("Mention",{attrs:{profile:e.eventData.creator}})]},proxy:!0}],null,!1,2535967292)})],1):e._e(),e._v(" "),e.eventData.coOrganizerList?n("EventDetail",{attrs:{type:"coOrganizer",icon:e.iconClassEnum.USER_ADMIN}},[n("i18n",{attrs:{path:"label.co_hosted_by"},scopedSlots:e._u([{key:"name",fn:function(){return[e._l(e.eventData.coOrganizers,(function(t,i){return[n("Mention",{key:t.instProfile.id,attrs:{profile:t.instProfile}}),e._v(" "),i<e.eventData.coOrganizers.length-1?n("span",{key:i},[e._v(", ")]):e._e()]}))]},proxy:!0}],null,!1,3964830868)})],1):e._e(),e._v(" "),e.eventData.seats!==1/0?n("EventDetail",{attrs:{type:"seats",icon:e.iconClassEnum.CHAIR}},[e._v("\n    "+e._s(e.eventData.emptySeats)+"/"+e._s(e.eventData.seats)+" "+e._s(e.$tc("calendar.available_seats",e.eventData.emptySeats))+"\n  ")]):e._e(),e._v(" "),e.eventData.resourceList?n("EventDetail",{attrs:{type:"resources",icon:e.iconClassEnum.BOOK_STACK,title:e.$t("calendar.resources")}},[e._v("\n    "+e._s(e.eventData.resourceList)+"\n  ")]):e._e(),e._v(" "),e.eventData.private?n("EventDetail",{attrs:{type:"private",icon:e.iconClassEnum.LOCK_OUTLINE}},[e._v("\n    "+e._s(e.$t("calendar.private_event"))+"\n  ")]):e._e(),e._v(" "),e.eventData.canViewRegardingProfile?n("EventDetail",{attrs:{type:"related"}},[n("Avatar",{staticClass:"regarding-avatar",attrs:{profile:e.eventData.regardingProfile}}),e._v("\n    "+e._s(e.$t("label.regarding"))+" "+e._s(e.eventData.regardingProfile.fullName)+" ("+e._s(e.eventData.regardingProfile.metadata)+")\n  ")],1):e._e(),e._v(" "),e.eventData.isLesson?[e.eventData.teachers.length>0?n("EventDetail",{attrs:{type:"teacher",icon:e.iconClassEnum.USER}},[n("div",[n("strong",[e._v(e._s(e.$t("calendar.lesson_teacher"))+":")]),e._v(" "),e._l(e.eventData.teachers,(function(t,i){return[n("Mention",{key:t.id,staticClass:"d-inline",attrs:{profile:t}}),e._v(" "),i<e.eventData.teachers.length-1?n("span",{key:t.id},[e._v(", ")]):e._e()]}))],2)]):e._e(),e._v(" "),e.eventData.assistances.length>0?n("EventDetail",{attrs:{type:"assistance",icon:e.iconClassEnum.USER_ADMIN}},[n("div",[n("strong",[e._v(e._s(e.$t("calendar.lesson_assistance"))+":")]),e._v(" "),e._l(e.eventData.assistances,(function(t,i){return[n("Mention",{key:t.id,staticClass:"d-inline",attrs:{profile:t}}),e._v(" "),i<e.eventData.assistances.length-1?n("span",{key:t.id},[e._v(", ")]):e._e()]}))],2)]):e._e(),e._v(" "),e.eventData.substitutes.length>0?n("EventDetail",{attrs:{type:"substitute",icon:e.iconClassEnum.USER_ADMIN}},[n("div",[n("strong",[e._v(e._s(e.$t("calendar.lesson_substitute"))+":")]),e._v(" "),e._l(e.eventData.substitutes,(function(t,i){return[n("Mention",{key:t.id,staticClass:"d-inline",attrs:{profile:t}}),e._v(" "),i<e.eventData.substitutes.length-1?n("span",{key:t.id},[e._v(", ")]):e._e()]}))],2)]):e._e(),e._v(" "),e.eventData.pedagogues.length>0?n("EventDetail",{attrs:{type:"pedagogue",icon:e.iconClassEnum.USER_ADMIN}},[n("div",[n("strong",[e._v(e._s(e.$t("calendar.lesson_pedagogue"))+":")]),e._v(" "),e._l(e.eventData.pedagogues,(function(t,i){return[n("Mention",{key:t.id,staticClass:"d-inline",attrs:{profile:t}}),e._v(" "),i<e.eventData.pedagogues.length-1?n("span",{key:t.id},[e._v(", ")]):e._e()]}))],2)]):e._e(),e._v(" "),e.eventData.invitedGroupList.length>0?n("EventDetail",{attrs:{type:"invitedGroups",icon:e.iconClassEnum.GROUP}},[e._v("\n      "+e._s(e.eventData.invitedGroupList.join(", "))+"\n    ")]):e._e()]:e._e()],2)}),[],!1,null,"b8852a9c",null).exports,_=n(62),E=n(43),A={name:"CalendarEventResponseTypeInvitee",components:{CalendarEventSendReminder:n(468).a},directives:{button:E.a},props:{invitees:{type:Array,required:!0},groupHomeInvitees:{type:Array,default:()=>[]},showParticipantInformation:{type:Boolean,default:!1},showReminder:{type:Boolean,default:!1},eventData:{type:Object,default:null}},emits:["reminderSent"],data:function(){return{isSubGroupOpen:!1}},computed:{inviteeCount(){return this.invitees.length+this.groupHomeInvitees.length},totalAdults(){return this.invitees.reduce(((e,t)=>e+t.numberOfAdultParticipants||0),0)+this.groupHomeInvitees.reduce(((e,t)=>e+t.numberOfAdultParticipants||0),0)},totalChildren(){return this.invitees.reduce(((e,t)=>e+t.numberOfChildParticipants||0),0)+this.groupHomeInvitees.reduce(((e,t)=>e+t.numberOfChildParticipants||0),0)}},methods:{onSubGroupClicked(){this.isSubGroupOpen=!this.isSubGroupOpen},emitReminderSent(){this.$emit("reminderSent")}}},T=Object(u.a)(A,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.inviteeCount>0?n("div",{staticClass:"d-flex text-left flex-column"},[n("div",{staticClass:"d-flex"},[n("div",{directives:[{name:"button",rawName:"v-button"}],staticClass:"response-collapse-button pointer",on:{click:e.onSubGroupClicked}},[e._t("default"),e._v(" "),n("i",{staticClass:"icon icon-Aula_down-arrow mx-1",class:{open:e.isSubGroupOpen}})],2),e._v(" "),e.eventData.canOrganize&&e.showReminder?n("CalendarEventSendReminder",{staticClass:"ml-auto",attrs:{"event-data":e.eventData},on:{reminderSent:e.emitReminderSent}}
1):e._e()],1),e._v(" "),n("transition",{attrs:{name:"toggle"}},[e.isSubGroupOpen?n("div",{staticClass:"invitee-response"},[e._l(e.groupHomeInvitees,(function(t,i){return n("div",{key:i,staticClass:"participant",class:e.showParticipantInformation?"information":"name"},[e.showParticipantInformation?[n("div",{staticClass:"participant-name"},[e._v(e._s(t.groupHomeName))]),e._v(" "),n("div",{staticClass:"number-of-participants"},[e._v("\n            "+e._s(t.numberOfAdultParticipants)+"\n            "+e._s(e.$getText(1===t.numberOfAdultParticipants?"ADULT":"ADULTS"))+"\n          ")]),e._v(" "),n("div",{staticClass:"number-of-participants"},[e._v("\n            "+e._s(t.numberOfChildParticipants)+"\n            "+e._s(e.$getText(1===t.numberOfChildParticipants?"SMALL_CHILD":"SMALL_CHILDREN"))+"\n          ")])]:[e._v("\n          "+e._s(t.groupHomeName)+" ("+e._s(t.regardingChildDisplayName)+")\n        ")]],2)})),e._v(" "),e._l(e.invitees,(function(t,i){return n("div",{key:i,staticClass:"participant",class:e.showParticipantInformation?"information":"name"},[e.showParticipantInformation?[n("div",{staticClass:"participant-name"},[e._v(e._s(t.instProfile.fullName))]),e._v(" "),n("div",{staticClass:"number-of-participants"},[e._v("\n            "+e._s(t.numberOfAdultParticipants||0)+"\n            "+e._s(e.$getText(1===t.numberOfAdultParticipants?"ADULT":"ADULTS"))+"\n          ")]),e._v(" "),n("div",{staticClass:"number-of-participants"},[e._v("\n            "+e._s(t.numberOfChildParticipants||0)+"\n            "+e._s(e.$getText(1===t.numberOfChildParticipants?"SMALL_CHILD":"SMALL_CHILDREN"))+"\n          ")])]:[e._v("\n          "+e._s(t.instProfile.fullName)+" ("+e._s(t.instProfile.metadata)+")\n        ")]],2)})),e._v(" "),e.showParticipantInformation?n("div",{staticClass:"participant information font-weight-bold"},[n("div",{staticClass:"participant-name text-capitalize"},[e._v(e._s(e.$getText("TOTAL")))]),e._v(" "),n("div",{staticClass:"number-of-participants"},[e._v("\n          "+e._s(e.totalAdults)+"\n          "+e._s(e.$getText(1===e.totalAdults?"ADULT":"ADULTS"))+"\n        ")]),e._v(" "),n("div",{staticClass:"number-of-participants"},[e._v("\n          "+e._s(e.totalChildren)+"\n          "+e._s(e.$getText(1===e.totalChildren?"SMALL_CHILD":"SMALL_CHILDREN"))+"\n        ")])]):e._e()],2):e._e()])],1):e._e()}),[],!1,null,"5f1b8622",null).exports,b=n(61),C=n(21),k=n(34),y={components:{AulaAlert:n(131).a,IconContainer:b.a,Icon:h.a,CalendarEventResponseTypeInvitee:T},props:{invitees:{type:Array,default:()=>[]},groupHomeInvitees:{type:Array,default:()=>[]},showParticipantInformation:{type:Boolean,default:!1},eventData:{type:Object,default:null}},emits:["reminderSent"],computed:{iconClassEnum:()=>i.a,inviteeCount(){return this.invitees.length+this.groupHomeInvitees.length},acceptedInvitees(){return this.invitees.filter((e=>e.responseType===_.a.ACCEPTED))},declinedInvitees(){return this.invitees.filter((e=>e.responseType===_.a.DECLINED))},tentativeInvitees(){return this.invitees.filter((e=>e.responseType===_.a.TENTATIVE))},waitingInvitees(){return this.invitees.filter((e=>e.responseType===_.a.WAITING))},acceptedGroupHomeInvitees(){return this.groupHomeInvitees.filter((e=>e.responseType===_.a.ACCEPTED))},declinedGroupHomeInvitees(){return this.groupHomeInvitees.filter((e=>e.responseType===_.a.DECLINED))},tentativeGroupHomeInvitees(){return this.groupHomeInvitees.filter((e=>e.responseType===_.a.TENTATIVE))},waitingGroupHomeInvitees(){return this.groupHomeInvitees.filter((e=>e.responseType===_.a.WAITING))},numberOfAdultParticipants(){return this.acceptedInvitees.reduce(((e,t)=>e+t.numberOfAdultParticipants||0),0)+this.acceptedGroupHomeInvitees.reduce(((e,t)=>e+t.numberOfAdultParticipants||0),0)},numberOfChildParticipants(){return this.acceptedInvitees.reduce(((e,t)=>e+t.numberOfChildParticipants||0),0)+this.acceptedGroupHomeInvitees.reduce(((e,t)=>e+t.numberOfChildParticipants||0),0)},acceptedInviteeCount(){return this.acceptedInvitees.length+this.acceptedGroupHomeInvitees.length},declinedInviteeCount(){return this.declinedInvitees.length+this.declinedGroupHomeInvitees.length},tentativeInviteeCount(){return this.tentativeInvitees.length+this.tentativeGroupHomeInvitees.length},waitingInviteeCount(){return this.waitingInvitees.length+this.waitingGroupHomeInvitees.length},acceptedParticipantInformation(){const e=this.$getText("CALENDAR_LABEL_EVENT_ANSWERS"),t=this.$getText("AND"),n=1===this.numberOfAdultParticipants?this.$getText("ADULT"):this.$getText("ADULTS"),i=1===this.numberOfChildParticipants?this.$getText("SMALL_CHILD"):this.$getText("SMALL_CHILDREN");return`(${this.acceptedInviteeCount} ${e}: ${this.numberOfAdultParticipants} ${n} ${t} ${this.numberOfChildParticipants} ${i})`},lastReminderDateTime(){return this.eventData.lastReminderDateTime&&this.eventData.canOrganize?C.a.formatDate(this.eventData.lastReminderDateTime,k.a.LONG_DATE_TIME_WITH_DATE_PREFIX):null}},methods:{emitReminderSent(){this.$emit("reminderSent")}}},I=Object(u.a)(y,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"calendar-event-invitees"},[n("div",{staticClass:"d-flex"},[n("Icon",{staticClass:"header-icon",attrs:{name:e.iconClassEnum.GROUP}}),e._v(" "),n("label",{staticClass:"mb-0 ml-1"},[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_INVITEES"))+" ("+e._s(e.inviteeCount)+")")])],1),e._v(" "),n("CalendarEventResponseTypeInvitee",{attrs:{"event-data":e.eventData,invitees:e.acceptedInvitees,"group-home-invitees":e.acceptedGroupHomeInvitees,"show-participant-information":e.showParticipantInformation}},[n("IconContainer",{staticClass:"group-icon-container"},[n("Icon",{attrs:{name:e.iconClassEnum.CHECKMARK_2}})],1),e._v("\n    "+e._s(e.$getText("CALENDAR_LABEL_EVENT_INVITED_ACCEPTED"))+"\n    "),e.showParticipantInformation?[e._v("\n      "+e._s(e.acceptedParticipantInformation)+"\n    ")]:[e._v("("+e._s(e.acceptedInviteeCount)+")")]],2),e._v(" "),n("CalendarEventResponseTypeInvitee",{attrs:{"event-data":e.eventData,invitees:e.declinedInvitees,"group-home-invitees":e.declinedGroupHomeInvitees}},[n("IconContainer",{staticClass:"group-icon-container"},[n("Icon",{attrs:{name:e.iconClassEnum.CLOSE}})],1),e._v("\n    "+e._s(e.$getText("CALENDAR_LABEL_EVENT_INVITED_DECLINED"))+" ("+e._s(e.declinedInviteeCount)+")\n  ")],1),e._v(" "),n("CalendarEventResponseTypeInvitee",{attrs:{"event-data":e.eventData,invitees:e.tentativeInvitees,"group-home-invitees":e.tentativeGroupHomeInvitees}},[n("IconContainer",{staticClass:"group-icon-container"},[n("Icon",{attrs:{name:e.iconClassEnum.QUESTIONMARK}})],1),e._v("\n    "+e._s(e.$getText("CALENDAR_LABEL_EVENT_INVITED_TENTATIVE"))+" ("+e._s(e.tentativeInviteeCount)+")\n  ")],1),e._v(" "),n("CalendarEventResponseTypeInvitee",{attrs:{invitees:e.waitingInvitees,"group-home-invitees":e.waitingGroupHomeInvitees,"event-data":e.eventData,"show-reminder":""},on:{reminderSent:e.emitReminderSent}},[n("IconContainer",{staticClass:"group-icon-container"},[n("Icon",{attrs:{name:e.iconClassEnum.EXCLAMATION_SIGN}}
1)],1),e._v("\n    "+e._s(e.$getText("CALENDAR_LABEL_EVENT_INVITED_WAITING"))+" ("+e._s(e.waitingInviteeCount)+")\n  ")],1),e._v(" "),e.lastReminderDateTime?n("AulaAlert",{staticClass:"event-alert"},[e._v("\n    "+e._s(e.$t("warning.last_sent_reminder_warning",{dateTime:e.lastReminderDateTime}))+"\n  ")]):e._e(),e._v(" "),!e.eventData.hasEnoughSlotsForEveryone&&e.eventData.isInvitee?n("AulaAlert",{staticClass:"event-alert"},[e._v("\n    "+e._s(e.$t("warning.not_enough_seats_for_everyone"))+"\n  ")]):e._e()],1)}),[],!1,null,"b0ffc3a0",null).exports,S=n(14),D=n(149),w=n(318),N=n(164),R=n(98),O=n(13);var L={components:{MediaDetail:N.a,MediaThumbnail:w.a,AttachmentList:D.a},props:{eventData:{type:Object,required:!0}},emits:["open"],data:()=>({isVisibleMediaGallery:!1,selectedMediaId:null}),computed:{userProfile(){var e;return null===(e=Object(O.a)())||void 0===e?void 0:e.institutionProfile},mediaList(){return R.a.filterScannedMediaForProfile(this.eventData.attachments,this.userProfile.profileId).map((e=>e.media))},hasMoreMedia(){return this.mediaList.length>4},numberOfHiddenMedia(){return this.hasMoreMedia?this.mediaList.length-4:0},visibleThumbnailMedia(){return this.mediaList.slice(0,4)},gridLayoutClass(){switch(this.visibleThumbnailMedia.length){case 1:return"grid-layout-1";case 2:return"grid-layout-2";case 3:return"grid-layout-3";default:return"grid-layout-4"}}},methods:{getOverlayText(e){return e<3||!this.hasMoreMedia?"":`+${this.numberOfHiddenMedia}`},openMediaGallery(e){this.isVisibleMediaGallery=!0,this.selectedMediaId=e.id},closeMediaGallery(){this.isVisibleMediaGallery=!1,this.selectedMediaId=null},emitOpen(e){this.$emit("open",e)}}},x=Object(u.a)(L,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"event-details-attachments"},[e.visibleThumbnailMedia.length>0?n("div",{staticClass:"media-grid",class:e.gridLayoutClass},e._l(e.visibleThumbnailMedia,(function(t,i){return n("MediaThumbnail",{key:t.id,staticClass:"media-grid-item",attrs:{media:t,"overlay-text":e.getOverlayText(i)},on:{click:function(n){return e.openMediaGallery(t)}}})})),1):e._e(),e._v(" "),n("AttachmentList",{attrs:{attachments:e.eventData.attachments,"show-media":!0},on:{openDocumentDrawer:e.emitOpen}}),e._v(" "),e.isVisibleMediaGallery?n("MediaDetail",{attrs:{album:e.visibleThumbnailMedia,"media-id":e.selectedMediaId},on:{onClosed:e.closeMediaGallery}}):e._e()],1)}),[],!1,null,"56ca6543",null).exports,P={props:{eventData:{type:Object,required:!0}},computed:{content(){var e,t;return null!==(t=null===(e=this.eventData.description)||void 0===e?void 0:e.html)&&void 0!==t?t:""},isLesson(){return null!=this.eventData.lesson},noteToClass(){var e,t,n;return null!==(n=null===(t=null===(e=this.eventData.lesson)||void 0===e?void 0:e.noteToClass)||void 0===t?void 0:t.html)&&void 0!==n?n:""},noteToTeacher(){var e,t,n;return null!==(n=null===(t=null===(e=this.eventData.lesson)||void 0===e?void 0:e.noteToTeacher)||void 0===t?void 0:t.html)&&void 0!==n?n:""},noteToSubstitute(){var e,t,n;return null!==(n=null===(t=null===(e=this.eventData.lesson)||void 0===e?void 0:e.noteToSubstitute)||void 0===t?void 0:t.html)&&void 0!==n?n:""},hasContent(){return this.isLesson?Boolean(this.noteToClass||this.noteToTeacher||this.noteToSubstitute):Boolean(this.content)}}},M={components:{EventDetailsContent:Object(u.a)(P,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.hasContent?n("div",{staticClass:"event-details-content"},[e.isLesson?[e.noteToClass?n("div",{staticClass:"lesson-note"},[n("label",[e._v(e._s(e.$t("calendar.note_to_class")))]),e._v(" "),n("div",{domProps:{innerHTML:e._s(e.noteToClass)}})]):e._e(),e._v(" "),e.noteToTeacher?n("div",{staticClass:"lesson-note"},[n("label",[e._v(e._s(e.$t("calendar.note_to_teacher")))]),e._v(" "),n("div",{domProps:{innerHTML:e._s(e.noteToTeacher)}})]):e._e(),e._v(" "),e.noteToSubstitute?n("div",{staticClass:"lesson-note"},[n("label",[e._v(e._s(e.$t("calendar.note_to_substitute")))]),e._v(" "),n("div",{domProps:{innerHTML:e._s(e.noteToSubstitute)}})]):e._e()]:n("div",{domProps:{innerHTML:e._s(e.content)}})],2):e._e()}),[],!1,null,"13395cfc",null).exports,EventDetailsAttachments:x,CalendarEventInvitees:I,EventDetailsOverview:g},props:{eventData:{type:Object,required:!0}},emits:["reminderSent","openAttachment"],computed:{parentTypes:()=>S.a,invitees(){var e;return null!==(e=this.eventData.invitees)&&void 0!==e?e:[]},groupHomeInvitees(){return this.eventData.invitedGroupHomeChildren||[]},hasInvitees(){return this.invitees.length+this.groupHomeInvitees.length>0}},methods:{emitReminderSent(){this.$emit("reminderSent")},emitOpenAttachment(e){this.$emit("openAttachment",e)}}},F=Object(u.a)(M,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"event-details"},[n("EventDetailsOverview",{attrs:{"event-data":e.eventData}}),e._v(" "),e.hasInvitees?n("CalendarEventInvitees",{attrs:{invitees:e.invitees,"group-home-invitees":e.groupHomeInvitees,"event-data":e.eventData,"show-participant-information":e.eventData.doRequestNumberOfParticipants},on:{reminderSent:e.emitReminderSent}}
1):e._e(),e._v(" "),n("EventDetailsContent",{attrs:{"event-data":e.eventData}}),e._v(" "),e.eventData.attachments.length>0?n("EventDetailsAttachments",{attrs:{"event-data":e.eventData},on:{open:e.emitOpenAttachment}}):e._e()],1)}),[],!1,null,null,null).exports,U=n(1),B=n.n(U),V=n(52),W=n(32),G=n(6),H=n(0);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){B()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $={components:{Icon:h.a,AulaButton:W.a,AulaButtons:V.a},props:{showEdit:{type:Boolean,default:!1},showDelete:{type:Boolean,default:!1},showRepeatingEventOptions:{type:Boolean,default:!1},showRepeatingOccurrenceOption:{type:Boolean,default:!0},dropUp:{type:Boolean,default:!1}},emits:["editCurrentEvent","edit","deleteCurrentEvent","delete"],computed:Y(Y({},Object(G.c)({isMobile:H.a.GET_IS_MOBILE})),{},{iconClassEnum:function(){return i.a}}),data:function(){return{eventResponseStatus:_.a}},methods:{emitEditCurrentEvent:function(){this.$emit("editCurrentEvent")},emitEdit:function(){this.$emit("edit")},emitDeleteCurrentEvent:function(){this.$emit("deleteCurrentEvent")},emitDelete:function(){this.$emit("delete")}}},z=Object(u.a)($,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("AulaButtons",{staticClass:"administer-buttons"},[e.showRepeatingEventOptions?[n("b-dropdown",{staticClass:"dropdown-select text-center",attrs:{variant:"primary",dropup:e.dropUp},scopedSlots:e._u([{key:"button-content",fn:function(){return[n("span",{staticClass:"button-text"},[n("Icon",{staticClass:"m-0",attrs:{name:e.iconClassEnum.EDIT_PEN}}),e._v("\n          "+e._s(e.$getText("CALENDAR_EDIT_EVENT_BUTTON"))+"\n          "),n("i",{staticClass:"icon icon-Aula_down-arrow"})],1)]},proxy:!0}],null,!1,3205409427)},[e._v(" "),e.showRepeatingOccurrenceOption?n("b-dropdown-item-btn",{on:{click:e.emitEditCurrentEvent}},[e._v("\n        "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_OCCURRENCE"))+"\n      ")]):e._e(),e._v(" "),n("b-dropdown-item-btn",{on:{click:e.emitEdit}},[e._v("\n        "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_SERIES"))+"\n      ")])],1),e._v(" "),n("b-dropdown",{staticClass:"dropdown-select text-center",attrs:{variant:"primary",dropup:e.dropUp},scopedSlots:e._u([{key:"button-content",fn:function(){return[n("span",{staticClass:"button-text"},[n("Icon",{attrs:{name:e.iconClassEnum.BIN}}),e._v("\n          "+e._s(e.$getText("DELETE"))+"\n          "),n("i",{staticClass:"icon icon-Aula_down-arrow"})],1)]},proxy:!0}],null,!1,1110391884)},[e._v(" "),e.showRepeatingOccurrenceOption?n("b-dropdown-item-btn",{on:{click:e.emitDeleteCurrentEvent}},[e._v("\n        "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_OCCURRENCE"))+"\n      ")]):e._e(),e._v(" "),n("b-dropdown-item-btn",{on:{click:e.emitDelete}},[e._v("\n        "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_SERIES"))+"\n      ")])],1)]:[e.showEdit?n("AulaButton",{staticClass:"text-center",attrs:{variant:"link"},on:{click:e.emitEdit}},[n("span",{staticClass:"button-text"},[n("Icon",{staticClass:"m-0",attrs:{name:e.iconClassEnum.EDIT_PEN}}),e._v("\n        "+e._s(e.$getText("CALENDAR_EDIT_EVENT_BUTTON"))+"\n      ")],1)]):e._e(),e._v(" "),e.showDelete?n("AulaButton",{staticClass:"text-center",attrs:{variant:"link"},on:{click:e.emitDelete}},[n("span",{staticClass:"button-text"},[n("Icon",{attrs:{name:e.iconClassEnum.BIN}}),e._v("\n        "+e._s(e.$getText("DELETE"))+"\n      ")],1)]):e._e()]],2)}),[],!1,null,"974cd888",null).exports,q={props:{selected:{type:Boolean,default:!1}},methods:{setDropdownWidth(){const e=this.$el.querySelector(".dropdown-toggle");this.$el.querySelector(".dropdown-menu").style.minWidth=e.clientWidth+2+"px"}}},K=Object(u.a)(q,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-dropdown",e._g(e._b({staticClass:"dropdown-select",attrs:{variant:"primary","aria-selected":e.selected,"popper-opts":{positionFixed:!0}},on:{show:e.setDropdownWidth},scopedSlots:e._u([{key:"button-content",fn:function(){return[n("span",{staticClass:"button-text"},[e._t("button-content"),e._v(" "),n("i",{staticClass:"icon icon-Aula_down-arrow"})],2)]},proxy:!0}],null,!0)},"b-dropdown",Object.assign({},e.$attrs,e.$props),!1),e.$listeners),[e._v(" "),e._t("default")],2)}),[],!1,null,"c2d2dbce",null).exports,Q=n(452),J={components:{IconContainer:b.a,Icon:h.a,ButtonToggles:Q.a,AulaButtons:V.a,CalendarEventFooterDropdown:K},props:{responseType:{type:String,default:null},showTentativeResponse:{type:Boolean,default:!1},showRepeatingOccurrenceOption:{type:Boolean,default:!0},showRepeatingSeriesOption:{type:Boolean,default:!0},showUpdateAnswer:{type:Boolean,default:!1},disabledAccept:{type:Boolean,default:!1},showRepeatingEventOptions:{type:Boolean,default:!1}},emits:["respondCurrentEvent","respond"],data:function(){return{eventResponseStatus:_.a}},computed:{iconClassEnum:function(){return i.a},responseOptions:function(){var e=this.$t("calendar.accepted");this.showUpdateAnswer&&(e=this.$t("calendar.update_answer"));var t={label:e,value:_.a.ACCEPTED,icon:i.a.CHECKMARK_2},n={label:this.$t("calendar.tentative"),value:_.a.TENTATIVE,icon:i.a.QUESTIONMARK},s={label:this.$t("calendar.declined"),value:_.a.DECLINED,icon:i.a.CLOSE};return this.showTentativeResponse?[t,n,s]:[t,s]}},methods:{handleResponseChange:function(e){this.$emit("respond",e)},handleResponseCurrentEventChange:function(e){this.$emit("respondCurrentEvent",e)}}},Z=Object(u.a)(J,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.showRepeatingEventOptions?n("AulaButtons",{staticClass:"dropdown-toggles"},[n("CalendarEventFooterDropdown",{staticClass:"text-center",attrs:{selected:e.responseType===e.eventResponseStatus.ACCEPTED},scopedSlots:e._u([{key:"button-content",fn:function(){return[n("IconContainer",[n("Icon",{attrs:{name:e.iconClassEnum.CHECKMARK_2}})],1),e._v("\n      "+e._s(e.$getText("CALENDAR_ACCEPT_EVENT_BUTTON"))+"\n    ")]},proxy:!0}],null,!1,2623318026)},[e._v(" "),e.showRepeatingOccurrenceOption?n("b-dropdown-item-btn",{on:{click:function(t){return e.handleResponseCurrentEventChange(e.eventResponseStatus.ACCEPTED)}}},[e._v("\n      "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_OCCURRENCE"))+"\n    ")]):e._e(
1),e._v(" "),e.showRepeatingSeriesOption?n("b-dropdown-item-btn",{on:{click:function(t){return e.handleResponseChange(e.eventResponseStatus.ACCEPTED)}}},[e._v("\n      "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_SERIES"))+"\n    ")]):e._e()],1),e._v(" "),e.showTentativeResponse?n("CalendarEventFooterDropdown",{staticClass:"text-center",scopedSlots:e._u([{key:"button-content",fn:function(){return[n("IconContainer",[n("Icon",{attrs:{name:e.iconClassEnum.QUESTIONMARK}})],1),e._v("\n      "+e._s(e.$getText("CALENDAR_MAYBE_EVENT_BUTTON"))+"\n    ")]},proxy:!0}],null,!1,2972377693)},[e._v(" "),e.showRepeatingOccurrenceOption?n("b-dropdown-item-btn",{on:{click:function(t){return e.handleResponseCurrentEventChange(e.eventResponseStatus.TENTATIVE)}}},[e._v("\n      "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_OCCURRENCE"))+"\n    ")]):e._e(),e._v(" "),e.showRepeatingSeriesOption?n("b-dropdown-item-btn",{on:{click:function(t){return e.handleResponseChange(e.eventResponseStatus.TENTATIVE)}}},[e._v("\n      "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_SERIES"))+"\n    ")]):e._e()],1):e._e(),e._v(" "),n("CalendarEventFooterDropdown",{staticClass:"text-center",scopedSlots:e._u([{key:"button-content",fn:function(){return[n("IconContainer",[n("Icon",{attrs:{name:e.iconClassEnum.CLOSE}})],1),e._v("\n      "+e._s(e.$getText("CALENDAR_REJECT_EVENT_BUTTON"))+"\n    ")]},proxy:!0}],null,!1,432785389)},[e._v(" "),e.showRepeatingOccurrenceOption?n("b-dropdown-item-btn",{on:{click:function(t){return e.handleResponseCurrentEventChange(e.eventResponseStatus.DECLINED)}}},[e._v("\n      "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_OCCURRENCE"))+"\n    ")]):e._e(),e._v(" "),e.showRepeatingSeriesOption?n("b-dropdown-item-btn",{on:{click:function(t){return e.handleResponseChange(e.eventResponseStatus.DECLINED)}}},[e._v("\n      "+e._s(e.$getText("CALENDAR_EDIT_REPEATING_SERIES"))+"\n    ")]):e._e()],1)],1):n("ButtonToggles",{staticClass:"response-toggles",attrs:{selected:e.responseType,options:e.responseOptions,"with-checkmark":!1},on:{change:e.handleResponseChange}})}),[],!1,null,"279a4df8",null).exports,X={props:{numberOfAdults:{type:Number,default:null},numberOfChildren:{type:Number,default:null},overCapacity:{type:Boolean,default:!1},remainingSeats:{type:Number,default:null},missingSelections:{type:Boolean,default:!1},full:{type:Boolean,default:!1}},emits:["adultSeatsChange","childSeatsChange"],data:()=>({isMissingNumberOfParticipants:!1,hasNumberOfParticipantsChanged:!1}),computed:{participantSlots:()=>Array.from(Array(21).keys())},methods:{handleAdultSeatsChange(e){this.$emit("adultSeatsChange",e)},handleChildSeatsChange(e){this.$emit("childSeatsChange",e)}}},ee=Object(u.a)(X,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"event-seat-selection"},[n("div",{staticClass:"seat-inputs"},[n("div",{staticClass:"seats adult"},[n("span",[e._v(e._s(e.$t("label.specify_number_of_adults")))]),e._v(" "),n("AulaSelect",{class:{"red-border":e.overCapacity||e.missingSelections},attrs:{value:e.numberOfAdults},on:{change:e.handleAdultSeatsChange}},e._l(e.participantSlots,(function(e,t){return n("AulaOption",{key:t,attrs:{label:e,value:e}})})),1)],1),e._v(" "),n("div",{staticClass:"seats child"},[n("span",[e._v(e._s(e.$t("label.specify_number_of_children")))]),e._v(" "),n("AulaSelect",{class:{"red-border":e.overCapacity||e.missingSelections},attrs:{value:e.numberOfChildren},on:{change:e.handleChildSeatsChange}},e._l(e.participantSlots,(function(e,t){return n("AulaOption",{key:t,attrs:{label:e,value:e}})})),1)],1)]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.overCapacity}},[e._v("\n    "+e._s(e.$t("warning.not_enough_seats",{remaining:e.remainingSeats}))+"\n  ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.missingSelections}},[e._v("\n    "+e._s(e.$t("warning.missing_seat_selections"))+"\n  ")]),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.full}},[e._v("\n    "+e._s(e.$t("warning.seats_full"))+"\n  ")])],1)}),[],!1,null,"37bce4c9",null).exports,te=n(10),ne=n(226),ie=n.n(ne),se=n(23),ae={props:{invitees:{type:Array,default:()=>[]}},emits:["assignSlot"],computed:{acceptedInvitees(){return this.invitees.filter((e=>e.responseType===_.a.ACCEPTED))},waitingInvitees(){return this.invitees.filter((e=>e.responseType===_.a.WAITING))}},methods:{assignSlot(e){this.$emit("assignSlot",e)}}},re=Object(u.a)(ae,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-dropdown",e._b({attrs:{variant:"link","toggle-class":"answer-button","menu-class":"invitee-list scrollbar","no-caret":"",boundary:"viewport","popper-opts":{positionFixed:!0}},scopedSlots:e._u([{key:"button-content",fn:function(){return[e._v("\n    "+e._s(e.$t("button.register"))+"\n    "),n("i",{staticClass:"icon-Aula_down-arrow"})]},proxy:!0}])},"b-dropdown",e.$attrs,!1),[e._v(" "),n("b-dropdown-header",[e._v(e._s(e.$getText("CALENDAR_TIMESLOT_HEADER_BLOCKED")))]),e._v(" "),n("b-dropdown-item-btn",{on:{click:function(t){return e.assignSlot(null)}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_TIMESLOT_OPTION_BLOCKED"))+"\n  ")]),e._v(" "),e.waitingInvitees.length>0?n("b-dropdown-header",[e._v("\n    "+e._s(e.$getText("CALENDAR_TIMESLOT_HEADER_WAITING"))+"\n  ")]):e._e(
1),e._v(" "),e._l(e.waitingInvitees,(function(t){return n("b-dropdown-item-btn",{key:t.instProfile.id,on:{click:function(n){return e.assignSlot(t)}}},[e._v("\n    "+e._s(e.$getProfileDisplayName(t.instProfile))+"\n  ")])})),e._v(" "),e.acceptedInvitees.length>0?n("b-dropdown-header",[e._v("\n    "+e._s(e.$getText("CALENDAR_TIMESLOT_HEADER_ACCEPTED"))+"\n  ")]):e._e(),e._v(" "),e._l(e.acceptedInvitees,(function(t){return n("b-dropdown-item-btn",{key:t.instProfile.id,on:{click:function(n){return e.assignSlot(t)}}},[e._v("\n    "+e._s(e.$getProfileDisplayName(t.instProfile))+"\n  ")])}))],2)}),[],!1,null,"6381ca0e",null).exports,oe={components:{Icon:h.a,AulaButton:W.a,CalendarTimeslotResponseSelect:re},props:{timeslot:{type:Object,required:!0},answers:{type:Array,required:!0},invitees:{type:Array,required:!0},numberOfSlots:{type:Number,default:1},canHandleSlot:{type:Boolean,default:!1}},emits:["assignSlot","clearSlot"],computed:{iconClassEnum:()=>i.a,startTime(){return se.e(this.timeslot.startTime,k.a.SHORT_TIME)},endTime(){return se.e(this.timeslot.endTime,k.a.SHORT_TIME)},acceptedInvitees(){const e=this.answers.map((e=>{var t;return null===(t=e.concerningProfile)||void 0===t?void 0:t.id}));return this.invitees.filter((t=>e.includes(t.instProfile.id)))},canRemoveAnswer(){return!!this.canHandleSlot&&this.answers.some((e=>e.canRemoveBlockingOrResponseForTimeSlot))},blockedAnswers(){return this.answers.filter((e=>null==e.instProfile))},numberOfSlotsOpen(){return this.numberOfSlots-this.acceptedInvitees.length-this.blockedAnswers.length},isBlocked(){return this.blockedAnswers.length>0&&1===this.numberOfSlots}},methods:{assignSlot(e){this.$emit("assignSlot",e)},clearSlot(e){this.$emit("clearSlot",e)}}},le=Object(u.a)(oe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"timeslot-response timeslot-response-variables",attrs:{"data-layout":e.numberOfSlots>1?"multiple":"single","data-blocked":e.isBlocked}},[n("div",{staticClass:"timeslot-header"},[n("Icon",{attrs:{name:e.iconClassEnum.WATCH}}),e._v(" "),n("span",{staticClass:"mr-auto"},[e._v(" "+e._s(e.startTime)+" - "+e._s(e.endTime)+" ")]),e._v(" "),e.numberOfSlots>1?n("div",{staticClass:"text-lowercase"},[e._v("\n      "+e._s(e.numberOfSlotsOpen)+"/"+e._s(e.numberOfSlots)+" "+e._s(e.$tc("calendar.available_seats",e.numberOfSlotsOpen))+"\n      "),n("span",{staticClass:"pl-1 font-weight-bold"},[e._v("·")])]):e._e(),e._v(" "),e.canHandleSlot&&e.numberOfSlots>1?n("CalendarTimeslotResponseSelect",{attrs:{disabled:0===e.numberOfSlotsOpen,invitees:e.invitees},on:{assignSlot:e.assignSlot}}):e._e()],1),e._v(" "),e._l(e.acceptedInvitees,(function(t,i){return n("div",{key:"accepted-"+i,staticClass:"participant"},[n("div",{staticClass:"slot-title"},[e._v(e._s(e.$getProfileDisplayName(t.instProfile)))]),e._v(" "),e.canRemoveAnswer?n("AulaButton",{staticClass:"close-button",attrs:{variant:"link"},on:{click:function(n){return e.clearSlot(t)}}},[e._v("\n      "+e._s(e.$t("button.unregister"))+"\n      "),n("Icon",{staticClass:"close-icon",attrs:{name:e.iconClassEnum.CLOSE}})],1):e._e()],1)})),e._v(" "),e._l(e.numberOfSlotsOpen,(function(t){return[e.numberOfSlots>1?n("div",{key:"open-"+t,staticClass:"participant"},[e._v("\n      "+e._s(e.$getText("CALENDAR_TIMESLOT_FREE_SLOT"))+"\n    ")]):e.canHandleSlot?n("CalendarTimeslotResponseSelect",{key:"open-"+t,attrs:{invitees:e.invitees},on:{assignSlot:e.assignSlot}}):e._e()]})),e._v(" "),e._l(e.blockedAnswers,(function(t,i){return n("div",{key:"blocked-"+i,staticClass:"participant"},[n("div",{staticClass:"slot-title",attrs:{"aria-disabled":"true"}},[e._v(e._s(e.$getText("CALENDAR_TIMESLOT_BLOCKED")))]),e._v(" "),e.canRemoveAnswer?n("AulaButton",{staticClass:"close-button",attrs:{variant:"link"},on:{click:function(t){return e.clearSlot(null)}}},[e._v("\n      "+e._s(e.$t("button.unregister_blocker"))+"\n      "),n("Icon",{staticClass:"close-icon",attrs:{name:e.iconClassEnum.CLOSE}})],1):e._e()],1)}))],2)}),[],!1,null,"5ab36b9a",null).exports,ce={props:{slotData:{type:Object,required:!0},timeslotId:{type:Number,required:!0},invitees:{type:Array,required:!0},answers:{type:Array,required:!0},regardingProfile:{type:Object,default:null},numberOfSlots:{type:Number,default:1},index:{type:Number,required:!0}},emits:["selectSlot"],computed:{slotValue(){return{timeslotId:this.timeslotId,index:this.index}},startTime(){return C.a.formatDate(this.slotData.startTime,k.a.SHORT_TIME)},endTime(){return C.a.formatDate(this.slotData.endTime,k.a.SHORT_TIME)},acceptedInvitees(){const e=this.answers.map((e=>{var t;return null===(t=e.concerningProfile)||void 0===t?void 0:t.id}));return this.invitees.filter((t=>e.includes(t.instProfile.id)))},blockedAnswers(){return this.answers.filter((e=>null==e.instProfile))},isAccepted(){return this.answers.some((e=>{var t,n;return(null===(t=e.concerningProfile)||void 0===t?void 0:t.profileId)===(null===(n=this.regardingProfile)||void 0===n?void 0:n.id)}))},numberOfSlotsRemaining(){return this.numberOfSlots-this.acceptedInvitees.length-this.blockedAnswers.length}},methods:{selectSlot(){this.$emit("selectSlot")}}},ue=Object(u.a)(ce,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"invitee-meeting-slot invitee-meeting-slot-variables",attrs:{"aria-selected":e.isAccepted}},[n("b-radio",{staticClass:"slot-radio",attrs:{value:e.slotValue,disabled:e.isAccepted||0===e.numberOfSlotsRemaining},on:{change:e.selectSlot}},[n("span",{staticClass:"slot-time"},[e._v(e._s(e.startTime)+" - "+e._s(e.endTime))])]),e._v(" "),1===e.numberOfSlots?[n("div",{staticClass:"ml-auto"},[e.acceptedInvitees[0]?[e._v("\n        "+e._s(e.$getProfileDisplayName(e.acceptedInvitees[0].instProfile))+"\n      ")]:e.blockedAnswers[0]?[e._v(e._s(e.$getText("CALENDAR_TIMESLOT_BLOCKED")))]:e._e()],2)]:[n("div",{staticClass:"remaining-slot"},[e._v("\n      "+e._s(e.numberOfSlotsRemaining)+"\n      "+e._s(e.$tc("calendar.available_seats",e.numberOfSlotsRemaining))+"\n    ")]),e._v(" "),e.acceptedInvitees.length>0?n("b-dropdown",{staticClass:"registered-slots-dropdown",attrs:{right:"","toggle-class":"registered-slots-button",variant:"link","popper-opts":{positionFixed:!0},"no-caret":""},scopedSlots:e._u([{key:"button-content",fn:function(){return[n("span",[e._v("\n          "+e._s(e.acceptedInvitees.length)+"\n          "+e._s(1===e.acceptedInvitees.length?e.$getText("CALENDAR_REGIST
1ERED_TIMESLOT"):e.$getText("CALENDAR_REGISTERED_TIMESLOTS"))+"\n        ")]),e._v(" "),n("i",{staticClass:"icon-Aula_down-arrow m-1"})]},proxy:!0}],null,!1,2910276273)},[e._v(" "),e._l(e.acceptedInvitees,(function(t){return n("b-dropdown-item",{key:t.instProfile.id},[e._v("\n        "+e._s(e.$getProfileDisplayName(t.instProfile))+"\n      ")])}))],2):e._e()]],2)}),[],!1,null,"407d228e",null).exports,de=n(744),he=n.n(de),me=n(162),pe=n.n(me),ve=n(745),fe=n.n(ve),ge=n(746),_e=n.n(ge),Ee=n(349),Ae=n.n(Ee),Te=n(424),be=n.n(Te);var Ce=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},ke={components:{CalendarInviteeMeetingSlot:ue,CalendarOrganizerMeetingSlot:le,Icon:h.a},props:{timeslot:{type:Object,required:!0},invitees:{type:Array,required:!0},numberOfParticipantsPerTimeSlot:{type:Number,default:1},canOrganize:{type:Boolean,default:!1},canRespond:{type:Boolean,default:!1},regardingProfile:{type:Object,default:null}},emits:["assign","block","clear"],computed:{iconClassEnum:()=>i.a,slotDate(){return ie()(C.a.formatDate(this.timeslot.startDate,"ddd. DD. MMM. YYYY"))},location(){var e,t;return null!==(t=null===(e=this.timeslot.primaryResource)||void 0===e?void 0:e.displayName)&&void 0!==t?t:this.timeslot.primaryResourceText},numberOfAvailableSlots(){return function(e,t){const n=e.timeSlotIndexes.length,i=fe()(he()(e.answers,"selectedTimeSlotIndex"),(e=>pe()(e,(e=>{var t,n;return null!==(n=null===(t=e.concerningProfile)||void 0===t?void 0:t.id)&&void 0!==n?n:e.id})).length)),s=_e()(be()(n),(e=>(i[e]||0)<t));return Ae()(s)}(this.timeslot,this.numberOfParticipantsPerTimeSlot)},slotIndexes(){return this.timeslot.timeSlotIndexes},shouldShowTimeSlotHeader(){1===this.numberOfParticipantsPerTimeSlot||this.canOrganize}},methods:{handleSlotAssigned(e,t){return Ce(this,void 0,void 0,(function*(){const n=t?"warning.confirm_assigning_slot":"warning.confirm_blocking_slot",i=yield this.$confirmAction(this.$t(n)),s={timeslotId:this.timeslot.id,timeslotIndex:e,invitee:t};i&&(t?this.$emit("assign",s):this.$emit("block",s))}))},emitSlotCleared(e,t){const n={timeslotId:this.timeslot.id,timeslotIndex:e,invitee:t};this.$emit("clear",n)},getAnswers(e){return this.timeslot.answers.filter((t=>t.selectedTimeSlotIndex===e))}}},ye=Object(u.a)(ke,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"timeslot"},[n("header",{staticClass:"slot-header-desktop"},[n("Icon",{attrs:{name:e.iconClassEnum.CALENDAR}}),e._v(" "),n("span",[e._v(e._s(e.slotDate))]),e._v("\n    ·\n    "),n("Icon",{attrs:{name:e.iconClassEnum.DOOR}}),e._v(" "),n("span",{staticClass:"text-truncate",attrs:{title:e.location}},[e._v(e._s(e.location))]),e._v(" "),e.shouldShowTimeSlotHeader?n("span",{staticClass:"total-slots"},[e._v("\n      "+e._s(e.numberOfAvailableSlots)+" "+e._s(e.$tc("calendar.available_timeslots",e.numberOfAvailableSlots))+"\n    ")]):e._e()],1),e._v(" "),n("header",{staticClass:"slot-header-mobile"},[n("div",{staticClass:"slot-header-mobile__top-row"},[n("div",{staticClass:"slot-header-mobile__date header"},[n("Icon",{staticClass:"header-icon",attrs:{name:e.iconClassEnum.CALENDAR}}),e._v(" "),n("span",[e._v(e._s(e.slotDate))])],1),e._v(" "),e.shouldShowTimeSlotHeader?n("div",{staticClass:"slot-header-mobile__slots"},[e._v("\n        "+e._s(e.numberOfAvailableSlots)+" "+e._s(e.$tc("calendar.available_timeslots",e.numberOfAvailableSlots))+"\n      ")]):e._e()]),e._v(" "),n("div",{staticClass:"slot-header-mobile__bottom-row header"},[n("Icon",{staticClass:"header-icon",attrs:{name:e.iconClassEnum.DOOR}}),e._v(" "),n("span",{staticClass:"slot-header-mobile__location text-truncate",attrs:{title:e.location}},[e._v(e._s(e.location))])],1)]),e._v(" "),e.canRespond?e._l(e.slotIndexes,(function(t,i){return n("CalendarInviteeMeetingSlot",{key:i,attrs:{index:i,"slot-data":t,"timeslot-id":e.timeslot.id,answers:e.getAnswers(i),invitees:e.invitees,"regarding-profile":e.regardingProfile,"number-of-slots":e.numberOfParticipantsPerTimeSlot}})})):e._l(e.slotIndexes,(function(t,i){return n("CalendarOrganizerMeetingSlot",{key:i,attrs:{timeslot:t,invitees:e.invitees,answers:e.getAnswers(i),"can-handle-slot":e.canOrganize,"
1number-of-slots":e.numberOfParticipantsPerTimeSlot},on:{assignSlot:function(t){return e.handleSlotAssigned(i,t)},clearSlot:function(t){return e.emitSlotCleared(i,t)}}})}))],2)}),[],!1,null,"df1be840",null).exports,Ie=n(747),Se=n.n(Ie),De=n(157),we=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},Ne={components:{EventDetailsTimeslot:ye},props:{eventData:{type:Object,required:!0}},emits:["updated","responded"],data:()=>({isShownTimeslots:!1,selectedSlot:null}),computed:{eventResponseStatus:()=>_.a,iconClassEnum:()=>i.a,timeslots(){return Se()(this.eventData.timeSlot.timeSlots,[e=>new Date(e.startDate).getTime()],["asc"])},answers(){return this.eventData.timeSlot.timeSlots.flatMap((e=>e.answers))},hasResponded(){return null!=this.eventData.respondedTimeslot}},created(){this.isShownTimeslots=!this.hasResponded||!this.eventData.canRespond},methods:{toggleTimeslotView(){this.isShownTimeslots=!this.isShownTimeslots},handleSlotAssigned({timeslotId:e,timeslotIndex:t,invitee:n}){var i;return we(this,void 0,void 0,(function*(){const s=this.answers.some((e=>{var t;return(null===(t=e.concerningProfile)||void 0===t?void 0:t.id)===n.instProfile.id}));try{s?yield this.reassign({timeslotId:e,timeslotIndex:t,institutionProfile:n.instProfile}):yield this.assign({timeslotId:e,timeslotIndex:t,institutionProfile:n.instProfile}),this.$showToast(this.$t("warning.changes_saved")),this.$emit("updated")}catch(e){if((null===(i=e.data)||void 0===i?void 0:i.status.code)===De.a.CONFLICT)return this.$alertAction(this.getConflictedWarning())}}))},getConflictedWarning(){return[this.$t("calendar.timeslot_is_already_booked_warning"),this.$createElement("br"),this.$t("calendar.therefore_choose_a_new_time")]},assign({timeslotId:e,timeslotIndex:t,institutionProfile:n}){return we(this,void 0,void 0,(function*(){const i={eventId:this.eventData.id,timeSlotId:e,timeSlotIndex:t,concerningInstProfileId:n.id};return o.respondToTimeSlotEvent(i)}))},reassign({timeslotId:e,timeslotIndex:t,institutionProfile:n}){return we(this,void 0,void 0,(function*(){const i={eventId:this.eventData.id,timeSlotId:e,timeSlotIndex:t,concerningInstProfileId:n.id};yield o.updateResponseToTimeSlotEvent(i)}))},handleSlotBlocked({timeslotId:e,timeslotIndex:t}){return we(this,void 0,void 0,(function*(){const n={eventId:this.eventData.id,timeSlotId:e,timeSlotIndex:t};yield o.blockTimeSlot(n),this.$showToast(this.$t("warning.changes_saved")),this.$emit("updated")}))},handleSlotCleared({timeslotId:e,timeslotIndex:t,invitee:n=null}){var i;return we(this,void 0,void 0,(function*(){const s={eventId:this.eventData.id,timeSlotId:e,timeSlotIndex:t,concerningInstitutionProfileId:null===(i=null==n?void 0:n.instProfile)||void 0===i?void 0:i.id};yield o.removeBlockingOrResponseToTimeSlot(s),this.$showToast(this.$t("warning.changes_saved")),this.$emit("updated")}))},handleTimeslotSaved(){var e,t;return we(this,void 0,void 0,(function*(){const{index:n,timeslotId:i}=this.selectedSlot,{regardingProfile:s}=this.eventData,a=null===(e=this.timeslots.find((e=>e.id==this.selectedSlot.timeslotId)))||void 0===e?void 0:e.timeSlotIndexes[this.selectedSlot.index];try{if(this.hasResponded){const e=C.a.formatDate(a.startTime,k.a.SHORT_TIME),t=C.a.formatDate(a.endTime,k.a.SHORT_TIME);if(!(yield this.$confirmAction(this.$t("warning.respond_to_timeslot",{startTime:e,endTime:t}))))return;yield this.reassign({timeslotId:i,timeslotIndex:n,institutionProfile:s})}else yield this.assign({timeslotId:i,timeslotIndex:n,institutionProfile:s});this.$showToast(this.$t("warning.changes_saved")),this.$emit("responded")}catch(e){if((null===(t=e.data)||void 0===t?void 0:t.status.code)===De.a.CONFLICT)return this.$alertAction(this.getConflictedWarning())}}))},handleMeetingDeclined(){return we(this,void 0,void 0,(function*(){const e=this.$createElement("p",{domProps:{innerHTML:this.$t("warning.decline_meeting_1")}}),t=this.$createElement("p",{domProps:{innerHTML:this.$t("warning.decline_meeting_2")}});(yield this.$confirmAction([e,t]))&&(yield this.decline())}))},decline(){return we(this,void 0,void 0,(function*(){const e={eventId:this.eventData.id,timeSlotId:this.eventData.respondedTimeslot.timeslotId,timeSlotIndex:this.eventData.respondedTimeslot.index,concerningInstitutionProfileId:this.eventData.regardingProfile.id};yield o.removeBlockingOrResponseToTimeSlot(e),this.$showToast(this.$t("warning.changes_saved")),this.$emit("responded")}))}}},Re=Object(u.a)(Ne,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"event-details-timeslots"},[n("b-collapse",{attrs:{visible:e.isShownTimeslots}},[n("b-radio-group",{staticClass:"timeslots",model:{value:e.selectedSlot,callback:function(t){e.selectedSlot=t},expression:"selectedSlot"}},e._l(e.timeslots,(function(t){return n("EventDetailsTimeslot",{key:t.id,attrs:{timeslot:t,invitees:e.eventData.meetingInvitees,"number-of-participants-per-time-slot":e.eventData.numberOfParticipantsPerTimeslot,"can-organize":e.eventData.canOrganize,"can-respond":e.eventData.canRespond,"regarding-profile":e.eventData.regardingProfile},on:{assign:e.handleSlotAssigned,block:e.handleSlotBlocked,clear:e.handleSlot
1Cleared}})})),1),e._v(" "),e.eventData.canRespond?n("div",{staticClass:"timeslot-buttons"},[n("b-button",{staticClass:"cancel-button",attrs:{variant:"link"},on:{click:e.toggleTimeslotView}},[e._v("\n        "+e._s(e.$t("button.cancel"))+"\n      ")]),e._v(" "),e.hasResponded?n("b-button",{staticClass:"decline-button",attrs:{variant:"primary"},on:{click:e.handleMeetingDeclined}},[e._v("\n        "+e._s(e.$t("calendar.decline_meeting"))+"\n      ")]):e._e(),e._v(" "),n("b-button",{staticClass:"save-button",attrs:{variant:"primary",disabled:!e.selectedSlot},on:{click:e.handleTimeslotSaved}},[e._v("\n        "+e._s(e.$t("button.save"))+"\n      ")])],1):e._e()],1),e._v(" "),e.isShownTimeslots?e._e():n("b-button",{staticClass:"change-response",attrs:{variant:"primary"},on:{click:e.toggleTimeslotView}},[e._v("\n    "+e._s(e.$t("calendar.change_timeslot"))+"\n  ")])],1)}),[],!1,null,"942be5be",null).exports,Oe=n(350),Le=n(37),xe=n(8),Pe=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},Me={name:"CalendarEventModal",components:{Icon:h.a,EventDetailsTimeslots:Re,EventDetailsSeatSelection:ee,CalendarEventFooterResponseButtons:Z,CalendarEventFooterAdministerButtons:z,EventDetails:F},props:{parent:{type:String,default:S.a.PROFILE},showSeriesResponses:{type:Boolean,default:!0},showOccurrenceResponses:{type:Boolean,default:!0}},emits:["deleted","responded","openAttachment"],data:()=>({isVisible:!1,title:"",eventData:null,selectedDate:null,regardingInstitutionProfileIds:[],isLoading:!1,numberOfAdults:null,numberOfChildren:null,hasSeatsChanged:!1,isMissingSeatSelections:!1}),computed:Object.assign(Object.assign({eventResponseStatus:()=>_.a},Object(G.c)({institutions:H.a.GET_INSTITUTIONS,activeInstitutionCodes:H.a.GET_ACTIVE_INSTITUTIONS,activeGroupHome:H.a.GET_ACTIVE_GROUP_HOME,activeOtpInboxes:H.a.MESSAGES_GET_OTP_INBOXES,delegatedContext:H.a.GET_DELEGATED_CONTEXT,hasPermissionOnInstitution:H.a.HAS_PERMISSION_ON_INSTITUTION})),{userProfileStore:()=>Object(O.a)(),profile(){return this.userProfileStore.institutionProfile},activeInstitutionProfileIds(){return this.institutions.filter((e=>this.activeInstitutionCodes.includes(e.institutionCode))).map((e=>e.institutionProfileId))},canViewTimeslots(){var e;return(null===(e=this.eventData)||void 0===e?void 0:e.hasTimeslots)&&(this.profile.role===xe.a.EMPLOYEE||this.canOrganize||this.canRespond)},iconClassEnum:()=>i.a,canSeeResponseButtons(){var e;return this.canRespond&&!(null===(e=this.eventData)||void 0===e?void 0:e.hasTimeslots)},isHandlingOthersEvent(){var e,t,n;return this.hasPermissionOnInstitution(te.a.HANDLE_OTHERS_EVENTS,null===(e=this.eventData)||void 0===e?void 0:e.institutionCode)&&!(null===(t=this.eventData)||void 0===t?void 0:t.isCreator)&&!(null===(n=this.eventData)||void 0===n?void 0:n.isCoOrganizer)},canHandleLesson(){var e;return this.profile.role===xe.a.EMPLOYEE&&(null===(e=this.eventData)||void 0===e?void 0:e.isLesson)},canEdit(){return this.canOrganize||this.isHandlingOthersEvent||this.canHandleLesson},canOrganize(){var e;return!0===(null===(e=this.eventData)||void 0===e?void 0:e.canOrganize)},canRespond(){var e;return!0===(null===(e=this.eventData)||void 0===e?void 0:e.canRespond)},hasFooter(){return!this.isLoading&&(this.canSeeResponseButtons||this.canViewTimeslots)},occupiedSeats(){var e;let t=this.numberOfAdults+this.numberOfChildren;return(null===(e=this.eventData.response)||void 0===e?void 0:e.responseType)===_.a.ACCEPTED&&(t=t-this.eventData.response.numberOfAdultParticipants-this.eventData.response.numberOfChildParticipants),this.eventData.actualNumberOfParticipants+t},isOverCapacity(){return this.occupiedSeats>this.eventData.seats},remainingSeats(){var e;let t=this.eventData.seats-this.eventData.actualNumberOfParticipants;return(null===(e=this.eventData.response)||void 0===e?void 0:e.responseType)===_.a.ACCEPTED&&(t=t+this.eventData.response.numberOfAdultParticipants+this.eventData.response.numberOfChildParticipants),t},isFull(){return this.remainingSeats<=0}}),methods:Object.assign(Object.assign({},Object(G.b)({loadOtpInboxes:H.a.ACTION_GET_OTP_INBOXES})),{show(e,t=null,n=[]){return Pe(this,void 0,void 0,(function*(){this.isVisible=!0,this.selectedDate=t,this.regardingInstitutionProfileIds=n,yield this.populateEventData(e)}))},hide(){this.isVisible=!1},reset(){this.eventData=null,this.hasSeatsChanged=!1,this.numberOfAdults=null,this.numberOfChildren=null,this.isMissingSeatSelections=!1},populateEventData(e){var t;return Pe(this,void 0,void 0,(function*(){this.title=e.title,this.isLoading=!0,(null===(t=e.extendedProps)||void 0===t?void 0:t.type)===Le.a.BIRTHDAY?this.mapBirthdayEvent(e):yield this.getEventDetails(e.id),this.isLoading=!1,this.initialize()}))},mapBirthdayEvent(e){this.eventData=new Oe.a({id:null,title:e.title,allDay:e.allDay,startDateTime:C.a.formatDate(C.a.getStartOf(e.start,"day"),""),endDateTime:C.a.formatDate(C.a.getEndOf(e.start,"day"),""),oldStartDateTime:"",oldEndDateTime:"",responseRequired:!1,private:!1,type:Le.a.BIRTHDAY,addedToInstitutionCalendar:!1,isDeleted:!1,eventClass:"",isDeadlineExceeded:!1,hideInOwnCalendar:!1,doRequestNumberOfParticipants:!1,creator:null,description:null,pendingMedia:!1,attachments:[],additionalResources:[]},this.regardingInstitutionProfileIds,[e.extendedProps.institutionProfileId])},initialize(){var e,t;this.eventData.isInvitee&&(this.numberOfAdults=(null===(e=this.eventData.response)||void 0===e?void 0:e.numberOfAdultParticipants)||null,this.numberOfChildren=(null===(t=this.eventData.response)||void 0===t?void 0:t.numberOfChildParticipants)||null)},getEventRelatedInstitutionProfileId(){var e;return(null===(e=this.delegatedContext)||void 0===e?void 0:e.institutionProfileId)?[this.delegatedContext.institutionProfileId]:this.activeInstitutionProfileIds},handleAdultSeatsChange(e){this.numberOfAdults=e,this.hasSeatsChanged=!0,this.checkValidSeats()},handleChildSeatsChange(e){this.numberOfChildren=e,this.hasSeatsChanged=!0,this.checkValidSeats()},checkValidSeats(){const e=this.numberOfAdults||0,t=this.numberOfChildren||0;return this.isMissingSeatSelections=this.eventData.isRequiredSeatSelection&&e+t===0,!this.isOverCapacity&&!this.isMissingSeatSelections},getEventDetails(e){var t,n;return Pe(this,void 0,void 0,(function*(){try{const i=yield o.getEventById(e,this.selectedDate),s=this.getEventRelatedInstitutionProfileId(i),a=(null===(t=this.activeGroupHome)||void 0===t?void 0:t.id)||null;this.title=i.title;const r=((null===(n=this.activeGroupHome)||void 0===n?void 0:n.children)||[]).map((e=>e.id)),l=this.activeOtpInboxes.map((e=>e.id));this.eventData=new Oe.a(i,this.regardingInstitutionProfileIds,s,a,this.selectedDate,r,l)}catch(e){this.$showToast(this.$t("error.api_error_event").toString(),"error")}}))},getDeletionWarningNodes(e=!1){const t=["warning.deleting_event"],n=["warning.deleting_others_event_1","warning.deleting_others_event_2"],i=["warning.deleting_occurrence_1","warning.deleting_occurrence_2"],s=["warning.deleting_series_1","warning.deleting_series_2"];let a=[];return a=this.isHandlingOthersEvent?n:this.eventData.isRepeating?e?i:s:t,a.map((e=>this.$createElement("p",this.$t(e))))},deleteEvent(e=!1){return Pe(this,void 0,void 0,(function*(){let t;e&&(t=C.a.formatDate(this.eventData.startDateTime,"YYYY-MM-DD")),yield o.deleteEvent({i
1d:this.eventData.id,occurrenceDateTime:t})}))},handleDeleteEventClick(e=!1){const t=this.getDeletionWarningNodes(e);this.$confirmAction(t).then((t=>{!0===t&&(this.deleteEvent(e),this.hide(),this.$emit("deleted"))}))},handleEditEventClick(e=!1){let t,n;e&&(t=C.a.formatDate(this.eventData.startDateTime,"YYYY-MM-DD")),n=this.eventData.hasTimeslots?this.parent===S.a.GROUP?"group-calendar-edit-meeting-event":"editMeetingEvent":this.parent===S.a.GROUP?"group-calendar-edit-event":"editEvent";const i={occurrence:t,parent:this.parent},s={eventId:this.eventData.id};this.$router.push({name:n,params:s,query:i}),this.hide()},handleTimeslotResponded(){this.hide(),this.$emit("responded")},handleRespondClick(e,t=!1){return Pe(this,void 0,void 0,(function*(){if(e===_.a.ACCEPTED&&!this.checkValidSeats())return;let n;t&&(n=C.a.formatDate(this.eventData.startDateTime,"YYYY-MM-DD")),yield this.respond(e,n),this.showResponseMessage(e),this.hide(),this.$emit("responded")}))},respond(e,t=null){var n,i;return Pe(this,void 0,void 0,(function*(){yield o.respondToSimpleEvent({eventId:this.eventData.id,responseType:e,occurrenceDateTime:t,numberOfAdultParticipants:this.numberOfAdults,numberOfChildParticipants:this.numberOfChildren,activeGroupHomeId:null!==(i=null===(n=this.activeGroupHome)||void 0===n?void 0:n.id)&&void 0!==i?i:null})}))},showResponseMessage(e){const t=this.eventData.getResponseToastMessage(e);this.$showToast(t)},emitOpenAttachment(e){this.$emit("openAttachment",e)}}),mounted(){return Pe(this,void 0,void 0,(function*(){this.profile.role===xe.a.OTP&&(yield this.loadOtpInboxes())}))}},Fe=Object(u.a)(Me,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-modal",{attrs:{"modal-class":"event-modal",centered:"",scrollable:"",title:e.title,"hide-footer":!e.hasFooter,"ignore-enforce-focus-selector":".media-detail-modal, .modal-aula"},on:{hidden:e.reset},scopedSlots:e._u([{key:"modal-header-close",fn:function(){return[n("Icon",{attrs:{name:e.iconClassEnum.CLOSE}})]},proxy:!0},{key:"default",fn:function(){return[e.isLoading?n("div",{staticClass:"loading-container"},[n("b-spinner")],1):[e.canEdit?n("div",{staticClass:"event-actions"},[n("CalendarEventFooterAdministerButtons",{attrs:{"show-delete":!e.eventData.isLesson,"show-edit":"","show-repeating-event-options":e.eventData.isRepeating},on:{editCurrentEvent:function(t){return e.handleEditEventClick(!0)},edit:e.handleEditEventClick,deleteCurrentEvent:function(t){return e.handleDeleteEventClick(!0)},delete:e.handleDeleteEventClick}})],1):e._e(),e._v(" "),e.eventData?n("EventDetails",{attrs:{"event-data":e.eventData},on:{reminderSent:function(t){return e.getEventDetails(e.eventData.id)},openAttachment:e.emitOpenAttachment}}):e._e()]]},proxy:!0},{key:"modal-footer",fn:function(){return[e.eventData.isRequiredSeatSelection?n("EventDetailsSeatSelection",{staticClass:"w-100 mb-3 pb-3",attrs:{"number-of-adults":e.numberOfAdults,"number-of-children":e.numberOfChildren,"remaining-seats":e.remainingSeats,"over-capacity":e.isOverCapacity,"missing-selections":e.isMissingSeatSelections,full:e.isFull},on:{adultSeatsChange:e.handleAdultSeatsChange,childSeatsChange:e.handleChildSeatsChange}}):e._e(),e._v(" "),e.canViewTimeslots?n("EventDetailsTimeslots",{staticClass:"w-100",attrs:{"event-data":e.eventData},on:{updated:function(t){return e.getEventDetails(e.eventData.id)},responded:e.handleTimeslotResponded}}):e._e(),e._v(" "),e.canSeeResponseButtons?n("CalendarEventFooterResponseButtons",{attrs:{"response-type":e.eventData.responseType,"show-tentative-response":e.eventData.canAnswerAsTentative,"show-repeating-event-options":e.eventData.isRepeating,"show-update-answer":e.hasSeatsChanged&&e.eventData.responseType!==e.eventResponseStatus.WAITING,"show-repeating-series-option":e.showSeriesResponses&&e.eventData.canAnswerForSeries,"show-repeating-occurrence-option":e.showOccurrenceResponses},on:{respondCurrentEvent:function(t){return e.handleRespondClick(t,!0)},respond:e.handleRespondClick}}):e._e()]},proxy:!0}]),model:{value:e.isVisible,callback:function(t){e.isVisible=t},expression:"isVisible"}})}),[],!1,null,"7c7cef0e",null);t.a=Fe.exports},328:function(e,t,n){"use strict";var i=n(4),s=n(20),a=n(62),r=n(143),o=n(0),l=n(53),c=n(15),u=n(37),d=n(21),h=n(286),m=n(146);var p=Object(i.defineComponent)({name:"CalendarViewTimelineViewEvent",components:{Icon:s.a},props:{eventModel:{type:Object,required:!0},isStart:{type:Boolean,default:!0},isEnd:{type:Boolean,default:!0}},setup:e=>function(e,t,n){const s=Object(i.getCurrentInstance)();if(!(null==s?void 0:s.proxy))throw new Error("useCalendarViewTimelineViewEvent must be called within setup()");const{proxy:p}=s,v=Object(i.computed)((()=>{var e;return null!==(e=p.$store.getters[o.a.GET_NOTIFICATIONS])&&void 0!==e?e:[]})),f=Object(i.computed)((()=>e.value.extendedProps.responseStatus)),g=Object(i.computed)((()=>e.value.extendedProps.private)),_=Object(i.computed)((()=>null!=e.value.extendedProps.repeating)),E=Object(i.computed)((()=>
1{if(null==e.value.extendedProps.repeating)return!1;const{startDateTime:t,endDateTime:n}=e.value.extendedProps,{originalStartDateTime:i,originalEndDateTime:s}=e.value.extendedProps.repeating;return!d.a.isSameTime(t,i)||!d.a.isSameTime(n,s)})),A=Object(i.computed)((()=>{var t;return Boolean(null===(t=e.value.extendedProps.lesson)||void 0===t?void 0:t.hasRelevantNote)})),T=Object(i.computed)((()=>{var t;return null===(t=e.value.extendedProps)||void 0===t?void 0:t.lesson})),b=Object(i.computed)((()=>{var t;return null===(t=e.value.extendedProps)||void 0===t?void 0:t.invitedGroups})),C=Object(i.computed)((()=>{var t,n;return(null===(t=e.value.extendedProps)||void 0===t?void 0:t.type)===u.a.LESSON&&Boolean(null===(n=e.value.extendedProps)||void 0===n?void 0:n.lesson)})),k=Object(i.computed)((()=>{var e,t;return null!==(t=null===(e=b.value)||void 0===e?void 0:e.map((e=>e.name)).join(", "))&&void 0!==t?t:""})),y=Object(i.computed)((()=>{const e=T.value;if(!(null==e?void 0:e.participants)||0===e.participants.length)return"";const t=e.participants.filter((e=>e.participantRole===m.a.SUBSTITUTE)).map((e=>e.teacherInitials));return t.length>0?t.join(", "):e.participants.filter((e=>e.participantRole===m.a.PRIMARY||e.participantRole===m.a.HELP||e.participantRole===m.a.PEDAGOGUE)).map((e=>e.teacherInitials)).join(", ")})),I=Object(i.computed)((()=>{const t=[r.a.getPrimaryLocation(e.value.extendedProps)];return C.value&&t.push(k.value,y.value),t.join(", ")})),S=Object(i.computed)((()=>[e.value.title,I.value].join("\n"))),D=Object(i.computed)((()=>{if(e.value.allDay)return"compact";const{start:i,end:s}=e.value,a=i,r=s,o=t.value,l=n.value,c=o?a:r,u=o||l?d.a.getDateDifferenceOnDay(a,r,c):1440;return u<45?"compact":u<75?"small":u<90?"medium":"large"})),w=Object(i.computed)((()=>{switch(f.value){case a.a.ACCEPTED:return"accepted";case a.a.TENTATIVE:return"tentative";case a.a.WAITING:return"waiting";default:return"none"}})),N=Object(i.computed)((()=>v.value.some((t=>e.value.extendedProps.eventId&&t.eventId==e.value.extendedProps.eventId&&t.notificationType===l.a.BADGE)))),R=Object(i.computed)((()=>e.value.title)),O=Object(i.computed)((()=>e.value.extendedProps.metadata?`(${e.value.extendedProps.metadata})`:"")),L=Object(i.computed)((()=>{var e;return(null===(e=T.value)||void 0===e?void 0:e.lessonStatus)==h.a.SUBSTITUTE?p.$t("calendar.substitute_teacher"):""}));return{iconClassEnum:c.a,tooltip:S,layout:D,isPrivate:g,isRecurring:_,isRecurringException:E,hasNote:A,indicator:w,extendedInfo:I,hasNotification:N,title:R,metadata:O,tag:L}}(Object(i.toRef)(e,"eventModel"),Object(i.toRef)(e,"isStart"),Object(i.toRef)(e,"isEnd"))}),v=n(3),f=Object(v.a)(p,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"timeline-view-event",attrs:{"data-indicator":e.indicator,"data-private":e.isPrivate,"data-layout":e.layout,title:e.tooltip}},[n("div",{staticClass:"text-container"},[n("span",{staticClass:"title"},[e.hasNotification?n("span",{staticClass:"notification"}):e._e(),e._v(" "),e.tag?n("span",{staticClass:"highlight-tag"},[e._v(e._s(e.tag))]):e._e(),e._v("\n      "+e._s(e.title)+"\n      "),e.metadata?n("span",{staticClass:"metadata"},[e._v(e._s(e.metadata))]):e._e()]),e._v(" "),e.extendedInfo?n("span",{staticClass:"extended-info"},[e._v("\n      "+e._s(e.extendedInfo)+"\n    ")]):e._e()]),e._v(" "),n("div",{staticClass:"icon-container"},[e.isRecurring&&!e.isRecurringException?n("Icon",{staticClass:"event-icon",attrs:{name:e.iconClassEnum.REPEAT,"aria-label":e.$t("calendar.repeating_event")}}):e._e(),e._v(" "),e.isRecurringException?n("Icon",{staticClass:"event-icon",attrs:{name:e.iconClassEnum.REPEAT_EXCEPTION,"aria-label":e.$t("calendar.exception_repeating_event")}}):e._e(),e._v(" "),e.isPrivate?n("Icon",{staticClass:"event-icon",attrs:{name:e.iconClassEnum.LOCK,"aria-label":e.$t("calendar.private_event")}}):e._e(),e._v(" "),e.hasNote?n("Icon",{staticClass:"event-icon",attrs:{name:e.iconClassEnum.PAPER}}):e._e()],1)])}),[],!1,null,"2d23110e",null);t.a=f.exports},350:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var i=n(37),s=n(226),a=n.n(s),r=n(21),o=n(35),l=n(295),c=n(112),u=n(146),d=n(62),h=n(8),m=n(34);class p{constructor(e,t=[],n=[],i=null,s=null,a=[],r=[]){Object.assign(this,e),this.institutionProfileIds=n,this.regardingInstitutionProfileIds=t,this.groupHomeId=i,this.selectedDate=s,this.regardingChildrenFromGroupHomeIds=a,this.activeOtpInboxIds=r}
1get canViewDateTime(){return!this.hasTimeslots||null!=this.respondedTimeslot}get regardingProfile(){var e,t;return(null===(t=null===(e=this.invitees)||void 0===e?void 0:e.find((e=>{var t;return null===(t=this.regardingInstitutionProfileIds)||void 0===t?void 0:t.includes(e.instProfile.id)})))||void 0===t?void 0:t.instProfile)||null}get isCreator(){var e;return this.institutionProfileIds.includes(null===(e=this.creator)||void 0===e?void 0:e.id)}get isCoOrganizer(){var e,t;return null!==(t=null===(e=this.coOrganizers)||void 0===e?void 0:e.some((e=>this.institutionProfileIds.includes(e.instProfile.id))))&&void 0!==t&&t}get isInvitee(){var e;const t=(null===(e=this.invitedGroupHomeChildren)||void 0===e?void 0:e.some((e=>e.groupHomeId===this.groupHomeId)))||!1;return null!=this.currentInviteeInstitutionProfile||this.isCoOrganizer&&!this.hasTimeslots||t}get currentInviteeInstitutionProfile(){const e=this.invitees||[],t=this.coOrganizers||[];return this.hasTimeslots?e.find((e=>this.institutionProfileIds.includes(e.instProfile.id))):[...e,...t].find((e=>this.institutionProfileIds.includes(e.instProfile.id)))}get response(){const e=[...this.invitees||[],...this.coOrganizers||[]],t=this.invitedGroupHomeChildren||[];return e.find((e=>this.institutionProfileIds.includes(e.instProfile.id)))||this.findMatchingGroupHomeInvitation(t,this.groupHomeId,this.regardingChildrenFromGroupHomeIds,this.activeOtpInboxIds)}get responseType(){var e;return(null===(e=this.response)||void 0===e?void 0:e.responseType)||null}get canRespond(){var e,t;if(this.isDeadlineExceeded)return!1;if(!this.isInvitee)return!1;if(this.hasTimeslots){const n=(null===(t=null===(e=this.currentInviteeInstitutionProfile)||void 0===e?void 0:e.instProfile)||void 0===t?void 0:t.role)===h.a.CHILD;return null!=this.regardingProfile&&!n}return!0}get canOrganize(){return(this.isCreator||this.isCoOrganizer)&&this.type!==i.a.PRESENCE_HOLIDAY}get canAnswerAsTentative(){var e,t;return(null===(t=null===(e=this.currentInviteeInstitutionProfile)||void 0===e?void 0:e.instProfile)||void 0===t?void 0:t.role)===h.a.EMPLOYEE}get dateTime(){const{startTime:e,endTime:t}=this.getEventTimeRange();return this.allDay?a()(r.a.formatDateRange(e,t,this.type!==i.a.BIRTHDAY)):a()(r.a.formatTimeRange(e,t))}get duration(){if(this.allDay)return o.a.t("calendar.all_day");const{startTime:e,endTime:t}=this.getEventTimeRange();return r.a.calculateDuration(e,t)}get oldDateTime(){if(!this.oldStartDateTime||!this.oldEndDateTime)return null;const e=r.a.isAllDayUtc(this.oldStartDateTime,this.oldEndDateTime),t=r.a.formatTimeRange(this.oldStartDateTime,this.oldEndDateTime,e);return a()(t)}get deadline(){return this.responseDeadline?o.a.t("calendar.response_deadline",{date:r.a.formatDate(this.responseDeadline,"ddd. DD. MMM.")}):null}get isRepeating(){return null!=this.repeating}get recurrence(){if(!this.repeating)return"";let e="";if(this.repeating.lastOccurrenceDate){const t=this.allDay?r.a.formatUtcDate(this.repeating.lastOccurrenceDate,m.a.SHORT_DATE):r.a.formatDate(this.repeating.lastOccurrenceDate,m.a.SHORT_DATE);e=o.a.t("calendar.end_at",{endDate:t})}return l.a.getPattern(this.repeating.pattern,e,this.repeating.weekdayMask,this.repeating.dayInMonth,this.repeating.interval,this.repeating.occurenceLimit)}get locations(){const e=[],t=this.respondedTimeslot?this.respondedTimeslot.primaryResource:this.primaryResource,n=this.respondedTimeslot?this.respondedTimeslot.primaryResourceText:this.primaryResourceText;return t&&(null==t?void 0:t.displayName)?e.push(t.displayName):n&&e.push(n),Array.isArray(this.additionalLocations)&&e.push(...this.additionalLocations),e}get additionalLocations(){return this.additionalResources.filter((e=>e.resourceCategory.resourceType===c.a.LOCATION)).map((e=>e.displayName))}get freeTextLocation(){return this.additionalResourceText}get coOrganizerList(){var e,t;return null!==(t=null===(e=this.coOrganizers)||void 0===e?void 0:e.map((e=>`${e.instProfile.fullName} (${e.instProfile.metadata})`)).join(", "))&&void 0!==t?t:""}get resources(){return this.additionalResources.filter((e=>e.resourceCategory.resourceType!==c.a.LOCATION))}get resourceList(){return this.resources.map((e=>e.displayName)).join(", ")}get isLesson(){return this.type===i.a.LESSON}get seats(){return this.maximumNumberOfParticipants||1/0}get emptySeats(){const e=this.actualNumberOfParticipants||0;return Math.max(this.seats-e,0)}lessonParticipantsByRole(e){var t;return(null===(t=this.lesson)||void 0===t?void 0:t.participants.filter((t=>t.participantRole===e)).map((e=>e.participantProfile)).filter((e=>null!==e)))||[]}get teachers(){return this.lessonParticipantsByRole(u.a.PRIMARY)}get assistances(){return this.lessonParticipantsByRole(u.a.HELP)}get substitutes(){return this.lessonParticipantsByRole(u.a.SUBSTITUTE
1)}get pedagogues(){return this.lessonParticipantsByRole(u.a.PEDAGOGUE)}get invitedGroupList(){return this.invitedGroups.map((e=>e.name))}get hasTimeslots(){return null!=this.timeSlot}get isRequiredSeatSelection(){return!0===this.doRequestNumberOfParticipants}get respondedTimeslot(){var e;const t=(null===(e=this.timeSlot)||void 0===e?void 0:e.timeSlots)||[];for(const e of t){const t=e.answers.find((e=>{var t;return e.concerningProfile&&e.concerningProfile.profileId===(null===(t=this.regardingProfile)||void 0===t?void 0:t.profileId)}));if(t){const{startTime:n,endTime:i}=e.timeSlotIndexes[t.selectedTimeSlotIndex];return{timeslotId:e.id,index:t.selectedTimeSlotIndex,startTime:n,endTime:i,primaryResource:e.primaryResource,primaryResourceText:e.primaryResourceText}}}return null}get meetingInvitees(){var e;return(null===(e=this.invitees)||void 0===e?void 0:e.filter((e=>[h.a.EMPLOYEE,h.a.CHILD].includes(e.instProfile.role))))||[]}get canViewRegardingProfile(){return null!=this.regardingProfile&&this.hasTimeslots}get numberOfParticipantsPerTimeslot(){return this.timeSlot.numberOfParticipantsPerTimeSlot||1}get hasEnoughSlotsForEveryone(){if(!this.timeSlot)return!0;const e=this.timeSlot.timeSlots;let t=0;for(const n of e){const e=n.answers.filter((e=>null===e.instProfile));t+=n.timeSlotIndexes.length*this.numberOfParticipantsPerTimeslot-e.length}return this.meetingInvitees.length<=t}findMatchingGroupHomeInvitation(e,t,n,i){return e.find((e=>{const s=e.groupHomeId===t,a=i.includes(e.otpInboxId),r=n.includes(e.regardingChildId);return s&&a&&r}))}getResponseToastMessage(e){let t="";switch(e){case d.a.ACCEPTED:t="calendar.response_accepted";break;case d.a.TENTATIVE:t="calendar.response_tentative";break;case d.a.DECLINED:t="calendar.response_declined";break;default:t="calendar.response_changed"}return o.a.t(t)}getEventTimeRange(){let e=this.startDateTime,t=this.endDateTime;return this.respondedTimeslot&&(e=this.respondedTimeslot.startTime,t=this.respondedTimeslot.endTime),this.isRepeating&&!this.selectedDate&&(e=this.repeating.originalStartDateTime,t=this.repeating.originalEndDateTime),{startTime:e,endTime:t}}}},380:function(e,t,n){"use strict";var i=n(381),s=n.n(i);t.default=s.a},381:function(e,t){e.exports={props:{axios:Function,moment:Function,sessionUUID:String,placement:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String},data:function(){var e="https://surf.cicero-suite.com";return{aulaToken:null,widgetVersion:"1.6",currentOffset:0,carouselWidth:0,slidesWidth:0,widthOfLongtermLoansSlideButton:58,remaingSlidesWidth:0,carouselInitialised:!1,slideLengthFactor:.5,loading:!0,branchIds:[],loans:[],longtermLoans:[],loansToShow:[],displayingLongtermLoans:!1,reservations:[],surfFrontendRootUrl:e,surfBackendLibraryStatusUrl:"https://surf.cicero-suite.com/portal-api/rest/aula/library/status/v3?",logoUrl:e+"/assets/cui/logo/cicero-portal-black.svg",defaultCoverImageUrl:e+"/assets/defaultCoverImage.png",backgroundImageUrl:e+"/assets/aulaCiceroPillBackground.svg",errorStateImageurl:e+"/assets/aulaCiceroEmptyState.svg",coverImageHeight:160,error:"",currentlySelectedLoanId:0,currentlySelectedReservationId:0,dueSoonColour:"#f5a623",dueColour:"#F6485C",dueIconColour:"#d0021b",loansTab:0,reservationsTab:1,selectedTab:0}},computed:{atEndOfList:function(){return this.carouselWidth-this.currentOffset>=this.slidesWidth||this.slidesWidth<=this.carouselWidth},atHeadOfList:function(){return 0===this.currentOffset}},methods:{setBackgroundImage:function(e){return{backgroundImage:'url("'+e+'")'}},setTriangleIndentation:function(){return{position:"relative",left:this.selectedTab===this.loansTab?"40px":"180px"}},slideAnimation:function(){return{transform:"translateX("+this.currentOffset+"px)"}},moveCarousel:function(e){1!==e||this.atEndOfList?-1!==e||this.atHeadOfList||this.slideLeft():this.slideRight()},slideRight:function(){this.remaingSlidesWidth<this.slideLength()?this.slideRemainingWidth():(this.remaingSlidesWidth-=this.slideLength(),this.currentOffset-=this.slideLength())},slideLength:function(){return this.carouselWidth*this.slideLengthFactor},slideRemainingWidth:function(){this.currentOffset-=this.remaingSlidesWidth,this.remaingSlidesWidth=0},slideLeft:function(){this.remaingSlidesWidth+this.slideLength()>=this.calculateRemainingSlidesWidth(0)?this.resetCarousel():(this.currentOffset+=this.slideLength(),this.remaingSlidesWidth+=this.slideLength())},resetCarousel:function(){this.currentOffset=0,this.remaingSlidesWidth=this.calculateRemainingSlidesWidth(0)}
1,overlayBackgroundColour:function(e){var t=["rgba(64, 93, 100, 0.8)","rgba(25, 53, 64, 0.8)","rgba(141, 86, 1, 0.6)","rgba(154, 62, 9, 0.65)","rgba(123, 15, 0, 0.65)","rgba(60, 62, 64, 0.5)","rgba(27, 53, 46, 0.7)","rgba(78, 74, 21, 0.7)","rgba(66, 44, 16, 0.7)","rgba(80, 20, 92, 0.5)","rgba(41, 119, 112, 0.6)","rgba(30, 86, 198, 0.5)","rgba(172, 32, 36, 0.7)","rgba(229, 172, 57, 0.75)","rgba(102, 102, 103, 0.6)"];return{backgroundColor:t[(e?e.split(" "):[]).reduce((function(e,t){return e+t.charCodeAt(0)}),0)%t.length]}},daysToDueDate:function(e){var t=this.moment(e);return t.isValid()?Math.ceil(this.moment.duration(t.diff(this.moment())).asDays()):null},selectAlertColour:function(e,t){var n=this.daysToDueDate(e);return null===n||n>3?t:n<=0?this.dueColour:n<=3?this.dueSoonColour:void 0},selectLoanIconColour:function(e,t){var n=this.daysToDueDate(e);return null===n||n>3?t:n<=0?this.dueIconColour:n<=3?this.dueSoonColour:void 0},loanInfoIconExtraStyle:function(e){return{background:this.selectLoanIconColour(e,"#555555")}},isLongtermLoan:function(e){return!!this.longtermLoans.find((function(t){return t.id===e.id}))},reservationInfoIconExtraStyle:function(e){return{background:"readyForPickup"===e?"#43A047":"#555555"}},ciceroDetailedViewExtraStyle:function(e,t){var n=e===this.loansTab&&t===this.currentlySelectedLoanId||e===this.reservationsTab&&t===this.currentlySelectedReservationId;return{top:n?"0px":"100%",transition:n?"top 0.25s ease-out":"top 0.25s ease-in"}},alertTextColour:function(e){return{color:this.selectAlertColour(e,"#FFFFFF")}},fetchStatus:function(){var e=this;this.loans=[],this.longtermLoans=[],this.reservations=[],this.branchIds=[],this.loading=!0,this.error="",this.selectedTab=this.loansTab,this.axios.get(this.surfBackendLibraryStatusUrl+this.createQueryParameter("institutions",this.institutionFilter)+"&"+this.createQueryParameter("children",this.childFilter)+"&coverImageHeight="+this.coverImageHeight+"&widgetVersion="+this.widgetVersion+"&userProfile="+this.userProfile+"&sessionUUID="+this.sessionUUID,{headers:{Authorization:"Bearer "+this.aulaToken}}).then((function(t){e.loans=t.data.loans,e.longtermLoans=t.data.longtermLoans,e.loansToShow=e.loans,e.sortLoans(e.loansToShow),e.reservations=t.data.reservations,e.sortReservations(),e.branchIds=t.data.branchIds?t.data.branchIds:[],e.loading=!1,e.currentlySelectedLoanId=0,e.currentlySelectedReservationId=0,e.resetCarousel()})).catch((function(t){[400,403,404,500].includes(t.response.status)&&(e.error="Noget gik galt. Prøv igen senere."),401===t.response.status&&(e.error=null===t.response.data||""===t.response.data?"Noget gik galt. Prøv igen senere.":t.response.data),e.loading=!1,e.currentlySelectedLoanId=0,e.currentlySelectedReservationId=0,e.resetCarousel()}))},sortLoans:function(e){var t=this.moment;e.sort((function(e,n){var i=t(e.dueDate),s=t(n.dueDate);return i.isValid()&&s.isValid()?i.diff(s):0}))},sortReservations:function(){var e=this.moment;this.reservations.sort((function(t,n){var i=["readyForPickup","reserved"];if(i.includes(t.state)&&!i.includes(n.state))return-1;if(t.state===i[0]&&n.state===i[1])return-1;if(t.state===i[1]&&n.state===i[0])return 1;if("readyForPickup"===t.state&&"readyForPickup"===n.state){var s=e(t.pickupDeadline),a=e(n.pickupDeadline);return s.isValid()&&a.isValid()?s.diff(a):0}return"reserved"===t.state&&"reserved"===n.state?t.numberInQueue-n.numberInQueue:0}))},displayLongtermLoans:function(){var e=this;this.sortLoans(this.longtermLoans),this.longtermLoans.map((function(t){return e.loansToShow.push(t)})),this.getWidthsForSliding(),this.displayingLongtermLoans=!0},showMessage:function(){return!this.loading&&""!==this.getMessage()},getMessage:function(){return""!==this.error?this.error:this.selectedTab===this.loansTab&&0===this.loans.length?"Du har ingen udlån i øjeblikket":this.selectedTab===this.reservationsTab&&0===this.reservations.length?"Du har ingen reservationer i øjeblikket":""},selectTab:function(e){this.selectedTab=e,this.getWidthsForSliding(),this.currentlySelectedLoanId=0,this.currentlySelectedReservationId=0,this.currentOffset=0},createQueryParameter:function(e,t){if(t){var n=t.map((function(e){return e.trim()})).filter((function(e){return!!e}));if(n.length>0)return e+"="+n.join("&"+e+"=")}return""},truncateTitle:function(e){return e?e.length>50?e.substr(0,50)+"...":e:""},getWidthsForSliding:function(){this.$refs.carouselItems&&!this.carouselInitialised?(this.carouselInitialised=!0,this.calculateCarouselProperties(0)):this.$refs.carouselItems&&this.slidesWidth!==this.sumOfSlidesWidths()&&this.carouselInitialised&&this.calculateCarouselProperties(this.currentOffset)},calculateCarouselProperties:function(e){this.carouselWidth=this.$refs.carouselItems.clientWidth,this.slidesWidth=this.calculateSumOfSlidesWidths(),this.slidesWidth+=this.shouldDisplayLongtermLoansButton()?this.widthOfLongtermLoansSlideButton:0,this.remaingSlidesWidth=this.calculateRemainingSlidesWidth(e)},shouldDisplayLongtermLoansButton:function(){return this.longtermLoans.length>0&&!this.displayingLongtermLoans},sumOfSlidesWidths:function(){return this.shouldDisplayLongtermLoansButton()?this.calculateSumOfSlidesWidths()+this.widthOfLongtermLoansSlideButton:this.calculateSumOfSlidesWidths()},calculateRemainingSlidesWidth:function(e){return e+this.slidesWidth-this.carouselWidth},calculateSumOfSlidesWidths:function(){var e=0;
1return this.$refs.carouselItems.childNodes.forEach((function(t){t.classList&&t.classList.contains("cicero-slide")&&(e+=t.clientWidth+4)})),e},onCoverImageLoadError:function(e){e.coverImageUrl=null},onSlideClicked:function(e){this.selectedTab===this.loansTab&&(this.currentlySelectedLoanId=e===this.currentlySelectedLoanId?0:e),this.selectedTab===this.reservationsTab&&(this.currentlySelectedReservationId=e===this.currentlySelectedReservationId?0:e)},multipleChildren:function(){return this.childFilter.length>1},formatDate:function(e){return e?this.moment(e).format("LL"):"ukendt dato"},formatLoanReturnAlertText:function(e){var t=this.daysToDueDate(e);return null===t?"":t<1?"med det samme":1===t?"om 1 dag":"om "+t+" dage"},formatName:function(e){return e?e.split(" ")[0]:""},validateConstraintsAndFetchStatus:function(){[2,3].includes(this.assuranceLevel)?this.fetchStatus():this.error="Du skal være logget ind for at se udlån og reservationer."},ciceroSurfBranchLandingPage:function(){return this.surfFrontendRootUrl+(this.branchIds.length>0?"/institution/"+this.branchIds[0]:"")},arraysDiffer:function(e,t){if(null===e&&null!==t||null===t&&null!==e)return!0;if(null===e&&null===t)return!1;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}},watch:{childFilter:function(e,t){this.arraysDiffer(e,t)&&void 0!==this.aulaToken&&this.validateConstraintsAndFetchStatus()},institutionFilter:function(e,t){this.arraysDiffer(e,t)&&void 0!==this.aulaToken&&this.validateConstraintsAndFetchStatus()},assuranceLevel:function(e,t){e!==t&&void 0!==this.aulaToken&&this.validateConstraintsAndFetchStatus()},aulaToken:function(){void 0!==this.aulaToken&&this.validateConstraintsAndFetchStatus()}},created:function(){this.moment.locale("da"),this.aulaToken=this.getAulaToken()},updated:function(){this.getWidthsForSliding()}}},382:function(e,t,n){"use strict";var i=n(383),s=n.n(i);t.default=s.a},383:function(e,t){e.exports={data:function(){return{icons:[{name:"Microsoft Teams",url:"https://teams.microsoft.com",icon:"teams"},{name:"Microsoft OneDrive",url:"https://www.office.com/launch/onedrive",icon:"onedrive"},{name:"Microsoft Word",url:"https://www.office.com/launch/word",icon:"word"},{name:"Microsoft Excel",url:"https://www.office.com/launch/excel",icon:"excel"},{name:"Microsoft PowerPoint",url:"https://www.office.com/launch/powerpoint",icon:"powerpoint"},{name:"Microsoft OneNote",url:"https://www.office.com/launch/onenote",icon:"onenote"},{name:"Microsoft Outlook",url:"https://outlook.office365.com",icon:"outlook"}]}},methods:{stringToColor:function(e,t,n){for(var i=0,s=0;s<e.length;s++)i=e.charCodeAt(s)+((i<<5)-i);return"hsl("+i%360+", "+t+"%, "+n+"%)"},getInitials:function(e){if(e){var t=e.split(" ");return 1===t.length?t[0].charAt(0).toUpperCase():t[0].charAt(0).toUpperCase()+t[t.length-1].charAt(0).toUpperCase()}return""}}}},384:function(e,t,n){"use strict";var i=n(385),s=n.n(i);t.default=s.a},385:function(e,t){e.exports={props:{axios:Function,getAulaToken:Function,institutionFilter:Array},data:function(){return{isLoading:!1,aulaToken:null,loginFailed:!1}},mounted:function(){this.aulaToken=this.getAulaToken()},methods:{IsInPreview:function(){return this.institutionFilter.indexOf("101021")>0||(this.institutionFilter.indexOf("185003")>0||void 0)},doLogin:function(){var e=this;this.isLoading=!0,this.loginFailed=!1;var t="https://production-shared-api.azurewebsites.net/v1/userLogin/AulaLogin";this.IsInPreview()&&(t="https://preview-shared-api.azurewebsites.net/v1/userLogin/AulaLogin"),null!=this.aulaToken&&this.axios({method:"post",url:t,headers:{"Content-Type":"application/json"},data:'"'+this.aulaToken+'"'}).then((function(t){if(console.log(t.data),t.data.accessToken){var n="";n+="?accesstoken="+t.data.accessToken,n+="&refreshtoken="+t.data.refreshToken,n+="&expires="+t.data.expires,e.IsInPreview()?window.open("https://preview-skole.substy.dk/login"+n):window.open("https://skole.substy.dk/login"+n)}e.isLoading=!1})).catch((function(t){console.error(t),e.isLoading=!1,e.loginFailed=!0}))}}}},386:function(e,t,n){"use strict";var i=n(387),s=n.n(i);t.default=s.a},387:function(e,t){e.exports={props:{getAulaToken:Function,axios:Function,userProfile:String,isMobileApp:Boolean,sessionUUID:String,assuranceLevel:Number,moment:Function},data:function(){return{aulaToken:null,tokenLoaded:!1}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&(this.tokenLoaded=!0,localStorage.setItem("token_expires",this.moment().add(5,"m").format("YYYY-MM-DD HH:mm:ss")))}},methods:{submit:function(){var e=this.moment(localStorage.getItem("token_expires"),"YYYY-MM-DD HH:mm:ss");if(this.moment().isAfter(e))this.tokenLoaded=!1,this.aulaToken=void 0,this.aulaToken=this.getAulaToken(),setTimeout(this.submit,200);else{var t=document.createElement("input");t.setAttribute("value",this.aulaToken),t.setAttribute("name","aulaToken"),t.setAttribute("type","hidden");var n=this.$refs.kalendaForm;n.appendChild(t),n.submit(),n.removeChild(t)}}}}},388:function(e,t,n){"use strict";var i=n(389),s=n.n(i);t.default=s.a},389:function(e,t){e.exports={props:{moment:Function,axios:Function,getAulaToken:Function,assuranceLevel:Number,sessionUUID:String,isMobileApp:Boolean,userProfile:String},data:function(){return{baseUrl:window.location.href.includes("widget-test2")?"https://login.kalendatest.dk/Kalenda":"https://login.kalenda.dk/Kalenda",apiUrl:"/widgetapi",aulaToken:void 0,tokenExpireTime:void 0,states:{login:0,absence:1,flex:2,vacation:3,receipt:4,oetid:5,history:6},state:1,stateBeforeReceipt:2,stateBeforeHistory:2,receiptTitle:"",receiptText:"",error:"",showError:!1,userNotLinked:!1,flexSaldo:0,selectedAbsenceCause:"",absenceCauses:[],absenceDate:(new Date).toString(),absenceEndDate:(new Date).toString(),absencePeriodeCheckbox:"false",absenceHours:"0",absenceDescription:"",absenceTimePicker:[new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate(),8,0),new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate(),10,0)],absenceManualHours:"false",flexDate:(new Date).toString(),flexType:"less",flexHours:"0",flexTimePicker:[new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate(),8,0),new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate(),10,0)],flexManualHours:"false",flexDescription:"",oetidDate:(new Date).toString(),oetidHours:"0",oetidTypes:[],selectedOetidType:"",loginList:[],selectedLogin:"",userId:"",showLoginList:!0,oetidTimePicker:[new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate(),8,0),new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate(),10,0)],oetidM
1anualHours:"false",oetidDescription:"",vacationStartDate:(new Date).toString(),vacationEndDate:(new Date).toString(),vacationType:"1",vacationDescription:"",loadingHistory:!1,historyData:[],historyFromDateStr:"",historyToDateStr:""}},created:function(){this.getLoginList(),this.loadAbsenceCauses(),this.checkIfUserExists(),this.getOetidTypes()},mounted:function(){},watch:{},methods:{switchTab:function(e){this.state=e,this.showError=!1,this.error=!1},getToken:function(e){if(null!=this.aulaToken&&null!=this.tokenExpireTime&&this.tokenExpireTime>(new Date).getTime())return e(this.aulaToken);this.aulaToken=void 0,this.aulaToken=this.getAulaToken();var t=this;setTimeout((function n(){null!=t.aulaToken?(t.tokenExpireTime=(new Date).getTime()+24e4,e(t.aulaToken)):setTimeout(n,100)}),100)},loadAbsenceCauses:function(){var e=this;this.getToken((function(t){var n={method:"post",url:"".concat(e.baseUrl+e.apiUrl,"/ApiGetAbsenceCauses"),headers:{"Content-Type":"text/plain"},data:JSON.stringify({aulaToken:t})},i=e;e.axios(n).then((function(e){i.absenceCauses=e.data.length>0?e.data:[]})).catch((function(e){console.log(e)}))}))},getOetidTypes:function(){var e=this;this.getToken((function(t){var n={method:"post",url:"".concat(e.baseUrl+e.apiUrl,"/getAllOetidTypes"),headers:{"Content-Type":"text/plain"},data:JSON.stringify({aulaToken:t,userId:e.userId})},i=e;e.axios(n).then((function(e){var t=e.data.oetidTypes&&e.data.oetidTypes.length?e.data.oetidTypes:[];i.oetidTypes=[],t.forEach((function(e){i.oetidTypes.push({text:e.name,value:e.id})}))})).catch((function(e){console.log(e)}))}))},getLoginList:function(){var e=this;this.getToken((function(t){var n={method:"post",url:"".concat(e.baseUrl+e.apiUrl,"/loginList"),headers:{"Content-Type":"text/plain"},data:JSON.stringify({aulaToken:t})},i=e;e.axios(n).then((function(e){(e.data.loginList&&e.data.loginList.length?e.data.loginList:[]).forEac
1h((function(e){i.loginList.push({text:e.customerName,value:{userId:e.userId,url:e.url}})})),i.loginList.length>=1&&(i.selectedLogin=i.loginList[0].value),i.showLoginList=i.loginList.length>1})).catch((function(e){console.log(e)}))}))},setUserLoginDetails:function(){null!=this.selectedLogin.url&&(this.baseUrl=this.selectedLogin.url),this.userId=this.selectedLogin.userId,this.checkIfUserExists(),this.getOetidTypes(),this.state==this.states.history&&this.showHistory()},checkIfUserExists:function(){var e=this;this.getToken((function(t){var n={method:"post",url:"".concat(e.baseUrl+e.apiUrl,"/checkUserLinked"),headers:{"Content-Type":"text/plain"},data:JSON.stringify({aulaToken:t,userId:e.userId})},i=e;e.axios(n).then((function(e){"user_not_linked"==e.data.status?i.userNotLinked=!0:(i.userNotLinked=!1,i.flexSaldo=e.data.flexSaldo)})).catch((function(e){console.log(e)}))}))},submit:function(){switch(this.state){case this.states.absence:this.submitAbsence();break;case this.states.flex:this.submitFlex();break;case this.states.oetid:this.submitOetid();break;case this.states.vacation:this.submitVacation()}},submitAbsence:function(){var e=this;this.getToken((function(t){var n={aulaToken:t,userId:e.userId,description:e.absenceDescription,cause:parseInt(e.selectedAbsenceCause),date:new Date(e.absenceDate).getTime()};"true"===e.absencePeriodeCheckbox&&(n.endDate=new Date(e.absenceEndDate).getTime()),"false"===e.absenceManualHours?n.hours=parseFloat(e.absenceHours.replace(/,/g,".")):(n.from=e.absenceTimePicker[0].getTime(),n.to=e.absenceTimePicker[1].getTime());var i={method:"post",url:"".concat(e.baseUrl).concat(e.apiUrl,"/absence"),headers:{"Content-Type":"text/plain"},data:JSON.stringify(n)},s=e;e.axios(i).then((function(e){"success"==e.data.status?s.showReceipt():(s.showError=!0,s.error=e.data.errorDescription)})).catch((function(e){console.log(e)}))}))},submitFlex:function(){var e=this;this.getToken((function(t){var n={aulaToken:t,userId:e.userId,date:new Date(e.flexDate).getTime(),description:e.flexDescription};if("false"===e.flexManualHours){if(n.hours="less"===e.flexType?-Math.abs(parseFloat(e.flexHours.replace(/,/g,"."))):Math.abs(parseFloat(e.flexHours.replace(/,/g,"."))),0==n.hours)return e.showError=!0,void(e.error="Tilføj venligst flextimer")}else n.from=e.flexTimePicker[0].getTime(),n.to=e.flexTimePicker[1].getTime(),n.hours=((e.flexTimePicker[1].getTime()-e.flexTimePicker[0].getTime())/36e5).toFixed(2),"less"===e.flexType&&(n.hours=-n.hours);var i={method:"post",url:"".concat(e.baseUrl).concat(e.apiUrl,"/flextime"),headers:{"Content-Type":"text/plain"},data:JSON.stringify(n)},s=e;e.axios(i).then((function(e){"success"==e.data.status?(s.showReceipt(),s.checkIfUserExists()):(s.showError=!0,s.error=e.data.errorDescription)})).catch((function(e){console.log(e)}))}))},submitOetid:function(){var e=this;this.getToken((function(t){var n={aulaToken:t,userId:e.userId,date:new Date(e.oetidDate).getTime(),description:e.oetidDescription,oetidType:parseInt(e.selectedOetidType)};if("false"===e.oetidManualHours){if(n.hours=Math.abs(parseFloat(e.oetidHours.replace(/,/g,"."))),0==n.hours)return e.showError=!0,void(e.error="Tilføj venligst ø-tidtimer")}else n.from=e.oetidTimePicker[0].getTime(),n.to=e.oetidTimePicker[1].getTime(),n.hours=((e.oetidTimePicker[1].getTime()-e.oetidTimePicker[0].getTime())/36e5).toFixed(2);var i={method:"post",url:"".concat(e.baseUrl).concat(e.apiUrl,"/oetid"),headers:{"Content-Type":"text/plain"},data:JSON.stringify(n)},s=e;e.axios(i).then((function(e){"success"==e.data.status?s.showReceipt():(s.showError=!0,s.error=e.data.errorDescription)})).catch((function(e){console.log(e)}))}))},submitVacation:function(){var e=this;this.getToken((function(t){var n={aulaToken:t,userId:e.userId,vacationType:parseInt(e.vacationType),startDate:new Date(e.vacationStartDate).getTime(),endDate:new Date(e.vacationEndDate).getTime(),description:e.vacationDescription,absenceStatus:1},i={method:"post",url:"".concat(e.baseUrl).concat(e.apiUrl,"/vacation"),headers:{"Content-Type":"text/plain"},data:JSON.stringify(n)},s=e;e.axios(i).then((function(e){"success"==e.data.status?s.showReceipt():(s.showError=!0,s.error=e.data.errorDescription)})).catch((function(e){console.log(e)}))}))},showReceipt:function(){var e=this;switch(this.state){case this.states.absence:if(this.receiptTitle="Fraværsanmodning sendt","false"===this.absencePeriodeCheckbox?this.receiptText="Dato: ".concat(this.moment(this.absenceDate).format("DD-MM-YYYY"),". "):this.receiptText="Fra ".concat(this.moment(this.absenceDate).format("DD-MM-YYYY")," til ").concat(this.moment(this.absenceEndDate).format("DD-MM-YYYY"),". "),this.receiptText+="Årsag: ".concat(this.absenceCauses.filter((function(t){return t.value==e.selectedAbsenceCause}))[0].text,". "),"false"===this.absenceManualHours)0!=this.absenceHours&&(this.receiptText+=" ".concat(this.absenceHours," timer. ")),0==this.absenceHours&&(this.receiptText+="Hele dagen. ");else{var t=this.moment(this.absenceTimePicker[0]).format("HH:mm"),n=this.moment(this.absenceTimePicker[1]).format("HH:mm");this.receiptText+="Fra ".concat(t," til ").concat(n,".")}break;case this.states.flex:if(this.receiptTitle="Flexanmodning sendt",this.receiptText="Dato: ".concat(this.moment(this.flexDate).format("DD-MM-YYYY"),". "),this.receiptText+="".concat("less"==this.flexType?"Afspadsering":"Merarbejde"," "),"false"===this.flexManualHours)this.receiptText+=" ".concat(this.flexHours," timer. ");else{var i=this.moment(this.flexTimePicker[0]).format("HH:mm"),s=this.moment(this.flexTimePicker[1]).format("HH:mm");this.receiptText+=" fra ".concat(i," til ").concat(s,". ")}""!=this.flexDescription&&(this.receiptText+=" ".concat(this.flexDescription," "));break;case this.states.oetid:if(this.receiptTitle="Ø-tidanmodning sendt",this.receiptText="Dato: ".concat(this.moment(this.oetidDate).format("DD-MM-YYYY"),". "),"false"===this.oetidManualHours)this.receiptText+=" ".concat(this.oetidHours," timer. ");else{var a=this.moment(this.oetidTimePicker[0]).format("HH:mm"),r=this.moment(this.oetidTimePicker[1]).format("HH:mm");this.receiptText+=" Fra ".concat(a," til ").concat(r,". ")}""!=this.oetidDescription&&(this.receiptText+=" ".concat(this.oetidDescription," "));break;case this.states.vacation:switch(this.receiptTitle="Ferieanmodning sendt",this.receiptText="Fra ".concat(this.moment(this.vacationStartDate).format("DD-MM-YYYY")," til ").concat(this.moment(this.vacationEndDate).format("DD-MM-YYYY"),". "),this.vacationType){case"1":this.receiptText+="Ferietype: Almindelig ferie. ";break;case"2":this.receiptText+="Ferietype: Feriefridage. ";break;case"3":this.receiptText+="Ferietype: Selvbetalt ferie. "}""!=this.vacationDescription&&(this.receiptText+=" ".concat(this.vacationDescription," "))}this.stateBeforeReceipt=this.state,this.state=this.states.receipt},closeReceipt:function(){this.state=this.stateBeforeReceipt,this.showError=!1,this.error=!1},showHistory:function(){var e=this;this.stateBeforeHistory=this.state,this.state=this.states.history,this.loadingHistory=!0;var t=this;this.getToken((function(n){var i={method:"post",url:"".concat(e.baseUrl).concat(e.apiUrl,"/getHistory"),headers:{"Content-Type":"text/plain"},data:JSON.stringify({aulaToken:n,userId:e.userId})};e.axios(i).then((function(e){var n=0;t.historyData=[],t.historyFromDateStr=t.msToDateStr(e.data.fromDateMs),t.historyToDateStr=t.msToDateStr(e.data.toDateMs),e.data.flexDTOs.forEac
1h((function(e){t.historyData.push({key:n++,date:e.date,type:"flex",obj:e})})),e.data.oetidDTOs.forEach((function(e){t.historyData.push({key:n++,date:e.date,type:"oetid",obj:e})})),e.data.absenceDTOs.forEach((function(e){t.historyData.push({key:n++,date:e.date,type:"absence",obj:e})})),e.data.vacationViewDays.forEach((function(e){t.historyData.push({key:n++,date:e.endDate,type:"vacation",obj:e})})),t.historyData.sort((function(e,t){return t.date-e.date}))})).catch((function(e){console.log(e)})).finally((function(){e.loadingHistory=!1}))}))},closeHistory:function(){this.state=this.stateBeforeHistory},HHmmssToDate:function(e){var t,n,i,s=e.split(":");t=parseInt(s[0],10),n=parseInt(s[1],10),i=parseInt(s[2],10);var a=new Date;return a.setHours(t,n,i),a},msToDateStr:function(e){return this.moment.unix(e/1e3).format("DD-MM-YYYY")}}}},390:function(e,t,n){"use strict";var i=n(391),s=n.n(i);t.default=s.a},391:function(e,t){var n="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+n+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=n+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}function a(e){return{groupName:e.GroupName,timeslots:[r(e)]}}function r(e){return{name:e.Name,time:"".concat(e.StartTime.slice(0,-3)," - ").concat(e.EndTime.slice(0,-3)),color:e.Color}}e.exports={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,moment:Function,assuranceLevel:Number,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,domain:n,domainOld:"https://www.infoba.dk",message:"",headerLink:n,section:"default",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,learningplatformHeaders:[],projectschemaHeaders:[],focusChildHeaders:[],pplanSortedTimeSlots:Array,headers:[],open:!1,timeSlots:Array,item:{Binder:{DigitalSuitcaseTile:{Header:"",Type:null},InspectionTile:{},LearningplatformTile:{},ProjectschemaTile:{},LearningLibraryTile:{},FocusChildTile:{},PTCMeetingTile:{},LearningPlanTile:{},KOMPASListTile:{},KOMPASProcessTile:{},PPlanTile:{}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)},firstLetter:function(e){return e.charAt(0)}},methods:{getColor:function(e){return"background-color:"+(0==e?this.item.Binder.InspectionTile.Inspection.InspectionSelectedType.ActionTypeList[0].Color:this.item.Binder.InspectionTile.Inspection.InspectionSelectedType.ActionTypeList[e-1].Color)},getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTilePersonnel",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),""!=this.selectedid&&null!=this.selectedid||(this.selectedid=0),this.axios.get(n+"/api/Aula/INTilePersonnelGet",{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.moment.locale("da"),e.item=t.data,s(e);for(var n=!0,i=null,a=0;a<e.item.Binder.Tile.length;a++){var r=e.item.Binder.Tile[a].Type;24!==r&&26!==r&&28!==r&&30!==r&&70!==r&&124!==r||(e.relationCircleSetData(r),n=!1)}
1null!==(i=e.getTile(36))&&(e.item.Binder.InspectionTile=i,n=!1),null!==(i=e.getTile(40))&&(e.item.Binder.LearningplatformTile=i,e.groupLearningplatformByProject(),n=!1),null!==(i=e.getTile(123))&&(e.item.Binder.ProjectschemaTile=i,e.groupProjectschemaByProject(),n=!1),null!=(i=e.getTile(56))&&(e.item.Binder.FocusChildTile=i,e.focusChildSetData()),null!=(i=e.getTile(95))&&(e.item.Binder.PTCMeetingTile=i),null!=(i=e.getTile(60))&&(e.item.Binder.LearningPlanTile=i,n=!1),null!==(i=e.getTile(200))&&(e.item.Binder.LearningLibraryTile=i.LearningLibraryTile,n=!1),null!==(i=e.getTile(80))&&(e.item.Binder.KOMPASListTile=i.KompasTile,n=!1),null!==(i=e.getTile(81))&&(e.item.Binder.KOMPASProcessTile=i.KompasTile,e.item.Binder.KOMPASProcessTile.NextWorkingDays=e.addOpen(e.item.Binder.KOMPASProcessTile.NextWorkingDays),n=!1),null!==(i=e.getTile(130))&&(e.item.Binder.PPlanTile=i,e.pplanSetData(),n=!1),n&&(e.section="nodata",e.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(t){s(e)})).finally((function(){return e.loading=!1}))},pplanSetData:function(){for(this.timeSlots=this.item.Binder.PPlanTile.TimeSlotList,this.pplanSortedTimeSlots=[],i=0;i<this.timeSlots.length;i++)if(this.pplanSortedTimeSlots.length>0&&this.pplanSortedTimeSlots[this.pplanSortedTimeSlots.length-1].institutionName==this.timeSlots[i].InstitutionName){var e=this.pplanSortedTimeSlots[this.pplanSortedTimeSlots.length-1].groups;e[e.length-1].groupName==this.timeSlots[i].GroupName?e[e.length-1].timeslots.push(r(this.timeSlots[i])):e.push(a(this.timeSlots[i]))}else this.pplanSortedTimeSlots||(this.pplanSortedTimeSlots=[]),this.pplanSortedTimeSlots.push({institutionName:(t=this.timeSlots[i]).InstitutionName,groups:[a(t)]});var t},relationCircleSetData:function(e){var t=null;24===e||26===e||28===e||30===e||70===e?null!==(t=this.getTile(e))&&(t.ChildList=t.SpfTile.ChildList):124===e&&null!==(t=this.getTile(e))&&(t.ChildList=t.TrvslTile.ChildList),null!==t&&this.groupByDates(t)},focusChildSetData:function(){for(var e=this,t=[],n=this.item.Binder.FocusChildTile.FocusChildList,i=0;i<n.length;i++)-1===t.indexOf(n[i].ScheduledDate)&&t.push(n[i].ScheduledDate);for(var s=function(i){e.focusChildHeaders.push({Open:!1,ScheduledDate:t[i],ChildList:n.filter((function(n){return e.moment(n.ScheduledDate).format("DD-MM-YYYY")==e.moment(t[i]).format("DD-MM-YYYY")}))})},a=0;a<t.length;a++)s(a)},filterByDate:function(e,t){var n=this;return e.filter((function(e){return n.moment(e.Date).format("DD-MM-YYYY")===n.moment(t).format("DD-MM-YYYY")}))},dismissReminder:function(e,t){var i=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(n+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<i.tile.ReminderList.length;t++)i.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&i.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(i)})).finally((function(){return i.loading=!1}))},groupByDates:function(e){var t=this,n=[];if(null!==e.ChildList){for(var i=0;i<e.ChildList.length;i++)-1===n.indexOf(moment(e.ChildList[i].NextEvaluationDate).format("MMMM YYYY"))&&n.push(moment(e.ChildList[i].NextEvaluationDate).format("MMMM YYYY"));for(var s=function(i){t.headers.push({TileType:e.Type,Open:!1,Month:n[i],Count:e.ChildList.filter((function(e){return t.moment(e.NextEvaluationDate).format("MMMM YYYY")==n[i]})).length,ChildList:e.ChildList.filter((function(e){return t.moment(e.NextEvaluationDate).format("MMMM YYYY")==n[i]}))})},a=0;a<n.length;a++)s(a)}},groupLearningplatformByProject:function(){for(var e=0;e<this.item.Binder.LearningplatformTile.ProjectPlan.ProjectList.length;e++)this.learningplatformHeaders.push({Open:!1,Project:this.item.Binder.LearningplatformTile.ProjectPlan.ProjectList[e]})},groupProjectschemaByProject:function(){for(var e=this,t=function(t){var n=e.item.Binder.ProjectschemaTile.Schema1List[t].ProjectSchema1Id,i=e.item.Binder.ProjectschemaTile.Schema2List.filter((function(e){return e.ProjectSchema1Id==n}));e.projectschemaHeaders.push({Open:!1,Schema1:e.item.Binder.ProjectschemaTile.Schema1List[t],Schema2:i})},n=0;n<this.item.Binder.ProjectschemaTile.Schema1List.length;n++)t(n)},goto:function(e){var t=this.item.INFOBAserial,i=this.item.INFOBAtoken,s="";if(null===t||null===i){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=n+"/Login/Index?serial="+t+"&token="+i+"&referrer=Aula&returnUrl="+encodeURIComponent(e);console.log(s),console.log(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},addEllipsis:function(e){return e.replace("<p>",'<p style="white-space: nowrap; overflow: hidden; -ms-text-overflow: ellipsis; -o-text-overflow: ellipsis;text-overflow: ellipsis; margin-bottom:0px">')},getTile:function(e){for(var t=null,n=0;n<this.item.Binder.Tile.length;n++)this.item.Binder.Tile[n].Type===e&&(t=this.item.Binder.Tile[n]);return t},headerLinkF:function(e){return null==this.getTile(e).Url||0==this.getTile(e).Url.length?{url:"",style:""}:{url:this.getTile(e).Url,style:"cursor:pointer;"}},getPTCMeetingLink:function(e){var t="";
1return 0==e.MeetingTypeId?t="#":0!=e.MeetingTypeId&&(t=n+"/IN/PTCMeeting/Reflection/"+e.Child.ChildId+"?meetingId="+(null==e.MeetingId?0:e.MeetingId)+"&meetingTypeId="+e.MeetingTypeId),null!=e.MeetingDateSent&&(t=n+"/IN/PTCMeeting/Conclusion/"+e.Child.ChildId+"?meetingId="+(null==e.MeetingId?0:e.MeetingId)),t},getReflectionColor:function(e){return returnClass="grey50",null!=e.MeetingId&&(e.MeetingDateSent?returnClass="green":returnClass="grey80"),returnClass+" icon-small-ptcLinks"},getParentColor:function(e){return returnClass="icon-house-grey50",null!=e.MeetingFirstSeenDate&&(e.MeetingDateApproved?returnClass="icon-house-green":returnClass="icon-house-grey80"),returnClass+" icon-small-ptcLinks"},getConclusionColor:function(e){return returnClass="icon-text-grey50",0!=e.ConslusionExists&&(e.ConclusionDateSent?returnClass="icon-text-green":returnClass="icon-text-grey80"),returnClass+" icon-small-ptcLinks"},getHistoryColor:function(e){return returnClass="grey50",e.MeetingId&&(returnClass="grey80"),returnClass+" icon-small-ptcLinks"},addOpen:function(e){return e.map((function(e){return{date:e,Open:!1}}))}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}},computed:{backgroundColor:function(){return 0==this.item.Binder.KOMPASListTile.GroupList.length||0==this.item.Binder.KOMPASListTile.GroupList[0].Texts.length?"#888888":this.item.Binder.KOMPASListTile.GroupList[0].Texts[0].ThemeColor},backgroundColorProcess:function(){return null==this.item.Binder.KOMPASProcessTile?"#888888":this.item.Binder.KOMPASProcessTile.Color}}}},392:function(e,t,n){"use strict";var i=n(393),s=n.n(i);t.default=s.a},393:function(e,t){e.exports={props:{axios:Function,getAulaToken:Function},data:function(){return{baseUrl:window.location.href.includes("widget-test2")?"https://login.kalendatest.dk/Kalenda":"https://login.kalenda.dk/Kalenda",infoScreenLocationCode:"",userNotLinked:!1,loading:!1,aulaToken:null,selectedOetidType:"",loginList:[],selectedLogin:"",userId:"",showLoginList:!0}},methods:{load:function(){var e={method:"post",url:"".concat(this.baseUrl,"/widgetapi/getInfoscreenLocationCode"),headers:{"Content-Type":"text/plain"},data:JSON.stringify({aulaToken:this.aulaToken,userId:this.userId})},t=this;t.loading=!0,this.axios(e).then((function(e){"user_not_linked"==e.data.status&&(t.userNotLinked=!0),"success"==e.data.status&&(t.infoScreenLocationCode=e.data.infoScreenLocationCode,t.userNotLinked=!1)})).catch((function(e){console.log(e)})).finally((function(){t.loading=!1}))},getLoginList:function(e){var t={method:"post",url:"".concat(this.baseUrl,"/widgetapi/loginList"),headers:{"Content-Type":"text/plain"},data:JSON.stringify({aulaToken:e})},n=this;this.axios(t).then((function(e){(e.data.loginList&&e.data.loginList.length?e.data.loginList:[]).forEac
1h((function(e){n.loginList.push({text:e.customerName,value:{userId:e.userId,url:e.url}})})),n.loginList.length>=1&&(n.selectedLogin=n.loginList[0].value),n.showLoginList=n.loginList.length>1})).catch((function(e){console.log(e)}))},setUserLoginDetails:function(){null!=this.selectedLogin.url&&(this.baseUrl=this.selectedLogin.url),this.userId=this.selectedLogin.userId,this.load()}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&(this.getLoginList(this.aulaToken),this.load())}}}},394:function(e,t,n){"use strict";var i=n(395),s=n.n(i);t.default=s.a},395:function(e,t){e.exports={data:function(){return{FPLink:"https://hh-forældreportalen.dk"}},props:{notifications:Array,deleteNotifications:Function},methods:{getNotificationCount:function(){return this.notifications?this.notifications.length:0},hasNotifications:function(){return this.getNotificationCount()>0},deleteAllNotifications:function(){var e=this.notifications.map((function(e){return e.widgetNotificationId}));this.deleteNotifications(e)}}}},396:function(e,t,n){"use strict";var i=n(397),s=n.n(i);t.default=s.a},397:function(e,t){e.exports={props:{axios:Function,moment:Function,placement:String,currentWeekNumber:String,institutionCode:String},data:function(){return{posts:{},someDate:null}},methods:{loadStuff:function(){var e=this;this.axios.get("/static/posts.json").then((function(t){e.posts=t.data})).catch((function(e){console.log(e)}))},openModal:function(){this.$refs["notes-modal"].show()}},mounted:function(){this.loadStuff()}}},398:function(e,t,n){"use strict";var i=n(399),s=n.n(i);t.default=s.a},399:function(e,t){e.exports={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:Number}}},400:function(e,t,n){"use strict";var i=n(401),s=n.n(i);t.default=s.a},401:function(e,t){e.exports={props:{axios:Function,moment:Function,widgetID:String,placement:String,group:String,currentWeekNumber:String,institutionCode:String,getAulaToken:Function,sessionUUID:String,source:String,someDate:String},data:function(){return{posts:{},aulaToken:null,properties:{}}},methods:{loadStuff:function(){var e=this;this.axios.get("/static/posts.json").then((function(t){e.posts=t.data})).catch((function(e){console.log(e)}))}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.loadStuff()}}}},426:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e){this.id=e.id,this.institutionCode=e.institutionCode,this.metadata=e.metadata,this.name=e.name}}},437:function(e,t,n){"use strict";n.r(t),n.d(t,"NO_POSTS",(function(){return i})),n.d(t,"NO_POSTS_EMPLOYEES",(function(){return s})),n.d(t,"NO_POSTS_STAFFS",(function(){return a})),n.d(t,"NO_POSTS_MARKED",(function(){return r})),n.d(t,"NO_POSTS_UNREAD",(function(){return o})),n.d(t,"NO_POSTS_PARENTS",(function(){return l})),n.d(t,"NO_POSTS_STUDENTS",(function(){return c})),n.d(t,"NO_POSTS_OWNPOST",(function(){return u})),n.d(t,"NO_POSTS_BOOKMARKED",(function(){return d})),n.d(t,"POSTS_PAGETITLE",(function(){return h})),n.d(t,"POSTS_FILTER_BUTTON",(function(){return m})),n.d(t,"POSTS_FILTER_ALL",(function(){return p})),n.d(t,"POSTS_FILTER_MARKED",(function(){return v})),n.d(t,"POSTS_FILTER_OWN",(function(){return f})),n.d(t,"POSTS_FILTER_BOOKMARK",(function(){return g})),n.d(t,"POSTS_FILTER_UNREAD",(function(){return _})),n.d(t,"POSTS_FILTER_STAFFS",(function(){return E})),n.d(t,"POSTS_FILTER_EMPLOYEES",(function(){return A})),n.d(t,"POSTS_FILTER_PARENTS",(function(){return T})),n.d(t,"POSTS_FILTER_STUDENTS",(function(){return b})),n.d(t,"POSTS_CREATE",(function(){return C})),n.d(t,"POSTS_NEW",(function(){return k})),n.d(t,"POSTS_NEW_DRAWER_TITLE",(function(){return y})),n.d(t,"POSTS_EDIT_DRAWER_TITLE",(function(){return I})),n.d(t,"POSTS_SEND_BTN",(function(){return S})),n.d(t,"POSTS_EDITED",(function(){return D})),n.d(t,"POSTS_CREATE_NEW_POST",(function(){return w})),n.d(t,"POSTS_CREATE_HIGH_PRIORITY",(function(){return N})),n.d(t,"POSTS_CREATE_ENABLE_COMMENTS",(function(){return R})),n.d(t,"POSTS_CREATE_LABEL_HEADING",(function(){return O})),n.d(t,"POSTS_EDIT_LABEL_HEADING",(function(){return L})),n.d(t,"POSTS_CREATE_DATE_FROM",(function(){return x})),n.d(t,"POSTS_CREATE_DATE_TO",(function(){return P})),n.d(t,"POSTS_CREATE_LABEL_TITLE",(function(){return M})),n.d(t,"POSTS_CREATE_LABEL_CONTENTS",(function(){return F})),n.d(t,"POSTS_CREATE_LABEL_MEETING",(function(){return U})),n.d(t,"POSTS_CREATE_LABEL_TO",(function(){return B})),n.d(t,"POSTS_CREATE_TITLE_INPUT_PLACEHOLDER",(function(){return V})),n.d(t,"POSTS_CREATE_LABEL_INSTITUTION",(function(){return W})),n.d(t,"POST_CREATE_CONTENT_WARNING_POST",(function(){return G})),n.d(t,"POST_CREATE_TITLE_WARNING",(function(){return H})),n.d(t,"POST_CREATE_TITLE_WARNING_CONTENT",(function(){return j})),n.d(t,"POST_NOT_FOUND",(function(){return Y})),n.d(t,"POST_MANDATORY_CONTENT",(function(){return $})),n.d(t,"POST_CONTENT_TOO_LONG",(function(){return z})),n.d(t,"POST_MANDATORY_TITLE",(function(){return q})),n.d(t,"POST_TITLE_TOO_LONG",(function(){return K})),n.d(t,"POST_MANDATORY_RECEIVERS",(function(){return Q})),n.d(t,"POST_ADMIN_CAN_SEE_POST",(function(){return J})),n.d(t,"POST_DISABLE_COMMENTS_WARNING",(function(){return Z})),n.d(t,"POST_NO_PERMISSION",(function(){return X})),n.d(t,"POSTS_MENU_LABEL_HOME",(function(){return ee})),n.d(t,"POSTS_START_DATE_WARNING",(function(){return te})),n.d(t,"POSTS_START_DATE_INVALID_WARNING",(function(){return ne})),n.d(t,"POSTS_END_DATE_INVALID_WARNING",(function(){return ie})),n.d(t,"POSTS_MENU_LABEL_CALENDARPOST",(function(){return se})),n.d(t,"POSTS_MENU_LABEL_PARENT_MEETING_POST",(function(){return ae})),n.d(t,"POSTS_MENU_LABEL_NEW_POST",(function(){return re})),n.d(t,"POSTS_MENU_LABEL_NEW_MESSAGE",(function(){return oe})),n.d(t,"POSTS_MENU_LABEL_ALBUM",(function(){return le})),n.d(t,"POSTS_MENU_LABEL_EDIT_POST",(function(){return ce})),n.d(t,"POSTS_MENU_LABEL_DELETE_POST",(function(){return ue})),n.d(t,"POSTS_MENU_LABEL_SECURE_FILE_SHARING",(function(){return de})),n.d(t,"POSTS_MENU_LABEL_SECURE_FILE_NOTE",(function(){return he})),n.d(t,"POSTS_MENU_LABEL_CREATE_POST",(function(){return me})),n.d(t,"POSTS_MENU_LABEL_CREATE_CALENDARPOST",(function(){return pe})),n.d(t,"POSTS_MENU_LABEL_CREATE_PARENT_MEETING_POST",(function(){return ve})),n.d(t,"POSTS_MENU_LABEL_CREATE_MESSAGE",(function(){return fe})),n.d(t,"POSTS_MENU_LABEL_CREATE_ALBUM",(function(){return ge})),n.d(t,"POSTS_TAB_OVERVIEW",(function(){return _e})),n.d(t,"POSTS_TAB_MYDAY",(function(){return Ee})),n.d(t,"POSTS_TAB_BIRTHDAY",(function(){return Ae})),n.d(t,"POSTS_TAB_PLANNING",(function(){return Te})),n.d(t,"POSTS_TAB_WIDGETS",(function(){return be})),n.d(t,"POSTS_ASIDE_BIRTHDAY",(function(){return Ce})),n.d(t,"POSTS_ASIDE_BIRTHDAY_TODAY",(function(){return ke})),n.d(t,"POSTS_ASIDE_BIRTHDAY_UPCOMMING",(function(){return ye})),n.d(t,"POSTS_ASIDE_BIRTHDAY_CONGRATULATION",(function(){return Ie})),n.d(t,"POSTS_ASIDE_BIRTHDAY_BUTTON_TITLE_SEEMORE",(function(){return Se})),n.d(t,"POSTS_ASIDE_BIRTHDAY_BUTTON_TITLE_SEEFEWER",(function(){return De})),n.d(t,"POSTS_BUTTON_SEEMORE",(function(){return we})),n.d(t,"POSTS_BUTTON_SEELESS",(function(){return Ne})),n.d(t,"POSTS_ASIDE_BIRTHDAY_DAYS_HAS",(function(){return Re})),n.d(t,"POSTS_ASIDE_BIRTHDAY_DAY_HAS",(function(){return Oe})),n.d(t,"POSTS_ASIDE_BIRTHDAY_ON",(function(){return Le})),n.d(t,"POSTS_ASIDE_NO_BIRTHDAY_EVENTS",(function(){return xe})),n.d(t,"POST_CONFIRM_DELETE",(function(){return Pe})),n.d(t,"POST_DELETE_POST_INFO_2",(function(){return Me})),n.d(t,"POST_DELETE_POST_INFO",(function(){return Fe})),n.d(t,"POST_BUTTON_CANCEL",(function(){return Ue})),n.d(t,"POST_BUTTON_OK",(function(){return Be})),n.d(t,"POST_BUTTON_FORTRYD",(function(){return Ve})),n.d(t,"POST_DETAIL_TITLE",(function(){return We})),n.d(t,"POSTS_SEARCH_RESULT_NOT_FOUND_ALL",(function(){return Ge})),n.d(t,"POSTS_SEARCH_RESULT_NOT_FOUND_PARENT",(function(){return He})),n.d(t,"POSTS_SEARCH_RESULT_NOT_FOUND_STAFF",(function(){return je})),n.d(t,"POSTS_SEARCH_RESULT_NOT_FOUND_STUDENT",(function(){return Ye})),n.d(t,"POSTS_SEARCH_RESULT_NOT_FOUND_IS_IMPORTANT",(function(){return $e})),n.d(t,"CONFIRM_MESSAGE_REMOVED_STYLE_QUESTION",(function(){return ze})),n.d(t,"ARIA_LABEL_POST_OPTIONS",(function(){return qe})),n.d(t,"ARIA_LABEL_POST_CHOOSE_INSTITUTION",(function(){return Ke})),n.d(t,"ARIA_LABEL_POSTS_CREATE_TITLE",(function(){return Qe})),n.d(t,"ARIA_LABEL_POSTS_CREATE_DATE_FROM",(function(){return Je})),n.d(t,"ARIA_LABEL_POSTS_CREATE_DATE_TO",(function(){return Ze})),n.d(t,"ARIA_LABEL_POSTS_PUBLISH_DATE",(function(){return Xe})),n.d(t,"ARIA_LABEL_POSTS_PUBLISH_TIME",(function(){return et})),n.d(t,"ARIA_LABEL_POSTS_EXPIRE_DATE",(function(){return tt})),n.d(t,"ARIA_LABEL_POSTS_EXPIRE_TIME",(function(){return nt})),n.d(t,"POST_PUBLISH_DATE",(function(){return it})),n.d(t,"POSTS_PUBLISH_LABEL",(function(){return st})),n.d(t,"POSTS_EXPIRE_LABEL",(function(){return at})),n.d(t,"POSTS_EXPIRE_BEFORE_PUBLISH",(function(){return rt})),n.d(t,"HOUR",(function(){return ot})),n.d(t,"MINUTE",(function(){return lt}));var i="Der er ingen opslag",s="Der er ingen opslag fra medarbejdere",a="Der er ingen opslag fra personale",r="Der er ingen opslag, der er markerede som vigtige",o="Der er ingen ulæste opslag",l="Der er ingen opslag fra forældre",c="Der er ingen opslag fra elever",u="Der er ingen opslag oprettet af dig",d="Du har ingen gemte opslag",h="Overblik",m="Filtrer",p="Alle",v="Vigtige",f="Egne opslag",g="Gemte",_="Ulæste",E="Personale",A="Medarbejdere",T="Forældre",b="Elever",C="Opret",k="NY",y="Nyt opslag",I="Rediger opslag",S="Gem",D="(redigeret {editedDate})",w="Opret ny post",N="Marker som vigtig",R="Tillad kommentarer",O="OPRET OPSLAG",L="REDIGER OPSLAG",x="Vigtig fra",P="Vigtig til",M="EMNE",F="TEKST",U="Samtale",B="Til",V="Skriv emne",W="Fra",G="Du har den blokerede kommunikationsrolle og har derfor ikke tilladelse til kommunikation i Aula. Kontakt din administrator, hvis du mener, dette er en fejl.",H="ADVARSEL",j="Kommunikationskanalen er blokeret. Modtagerne vil ikke se denne post.",Y="Vi kunne desværre ikke finde dit opslag. Det er muligvis blevet slettet eller ikke længere delt med dig.",$="Du mangler at angive en tekst",z="Teksten må ikke være mere end 6600 tegn lang",q="Du mangler at angive et emne",K="Emnet må ikke være mere end 255 tegn langt",Q="Du mangler at angive en modtager",J="Alle gruppeadministratorer i gruppen vil også kunne se opslaget",Z="Vær opmærksom på, at hvis du slår kommentarer fra, vil kommentarer der allerede er oprettet, blive skjult.",X="Ingen tilladelse til at skrive opslag",ee="Opslag",te="Indtast startdatoen",ne="Startdato kan ikke være i fortiden",ie="Slutdato er ugyldig",se="Begivenhed",ae="Samtale",re="Opslag",oe="Besked",le="Album",ce="Rediger opslag",ue="Slet",de="Dokument",he="Note",me="Opret opslag",pe="Opret begivenhed",ve="Opret samtale",fe="Opret besked",ge="Opret album",_e="OVERBLIK",Ee="MIN DAG",Ae="FØDSELSDAGE",Te="VIGTIGE DATOER",be="WIDGETS",Ce="fødselsdag",ke="I dag",ye="Kommende",Ie=", tillykke!",Se="Se flere",De="Se færre",we="Se mere",Ne="Se mindre",Re=" dage har",Oe=" dag har",Le="Om ",xe="Der er ingen fødselsdage inden for den næste uge",Pe="ADVARSEL",Me="Er du sikker på, at du vil slette opslaget?",Fe="Bemærk, at når du sletter et opslag, sletter du det også for alle andre brugere og grupper, som opslaget er delt med.",Ue="Annuller",Be="OK",Ve="Fortryd",We="Detaljer",Ge="Der er ingen opslag",He="Der er ingen opslag fra forældre",je="Der er ingen opslag fra medarbejdere",Ye="Der er ingen opslag fra elever",$e="Der er ingen opslag, der er markerede som vigtige",ze="Er du sikker på, at du vil fortsætte?",qe="Indstillinger for indlæg",Ke="Vælg institution",Qe="Skriv emne",Je="Vælg vigtigt fra",Ze="Vælg vigtigt til",Xe="Synligt fra dato",et="Vælg synligt fra tid",tt="Synligt til dato",nt="Vælg synligt til tid",it="Synlig fra: {date} kan ikke redigeres",st="Synlig fra",at="Synlig til",rt="Synlig til kan ikke være i fortiden og skal være mindst et kvarter efter synlig fra",ot="Time",lt="Minut"},438:function(e,t,n){"use strict";n.r(t),n.d(t,"CALENDAR_TOOLBAR_RESOURCE_TYPES_ENUM_location",(function(){return i})),n.d(t,"CALENDAR_TOOLBAR_RESOURCE_TYPES_ENUM_other",(function(){return s})),n.d(t,"CALENDAR_TOOLBAR_NEW_EVENT",(function(){return a})),n.d(t,"CALENDAR_TOOLBAR_NEW_EVENT_MOBILE",(function(){return r})),n.d(t,"CALENDAR_TOOLBAR_NEW_MEETING_EVENT_MOBILE",(function(){return o}
1)),n.d(t,"CALENDAR_TOOLBAR_TYPE_EVENT",(function(){return l})),n.d(t,"CALENDAR_TOOLBAR_SHARED_CALENDAR",(function(){return c})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION",(function(){return u})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION_HEADER",(function(){return d})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION_BODY",(function(){return h})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION_WARNING",(function(){return m})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION_WARNING_TITLE",(function(){return p})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION_WARNING_DEPARTMENT",(function(){return v})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION_WARNING_GROUP",(function(){return f})),n.d(t,"CALENDAR_TOOLBAR_SHARED_CALENDAR_OPEN",(function(){return g})),n.d(t,"CALENDAR_TOOLBAR_SHARED_CALENDAR_SEARCH",(function(){return _})),n.d(t,"CALENDAR_TOOLBAR_CONTROLLABLE_CALENDARS",(function(){return E})),n.d(t,"CALENDAR_TOOLBAR_MY_VACATION_REQUESTS",(function(){return A})),n.d(t,"CALENDAR_TOOLBAR_CONTROLLABLE_CALENDARS_MOBILE",(function(){return T})),n.d(t,"CALENDAR_TOOLBAR_SEE_SCHOOL_CALENDAR",(function(){return b})),n.d(t,"CALENDAR_TOOLBAR_SCHOOL_CALENDAR",(function(){return C})),n.d(t,"CALENDAR_VACATION_REQUEST_OTHERS",(function(){return k})),n.d(t,"CALENDAR_VACATION_REQUEST_SEND_MESSAGE",(function(){return y})),n.d(t,"CALENDAR_VACATION_REQUEST_CREATOR",(function(){return I})),n.d(t,"CALENDAR_VACATION_REQUEST_INSTITUTION",(function(){return S})),n.d(t,"CALENDAR_VACATION_REQUEST_DEPARTMENTS",(function(){return D})),n.d(t,"CALENDAR_VACATION_REQUEST_GROUPS",(function(){return w})),n.d(t,"CALENDAR_VACATION_REQUEST_PERIOD_1",(function(){return N})),n.d(t,"CALENDAR_VACATION_REQUEST_PERIOD_2",(function(){return R})),n.d(t,"CALENDAR_VACATION_REQUEST_PERIOD_3",(function(){return O})),n.d(t,"CALENDAR_VACATION_REQUEST_MISSING_ANSWER",(function(){return L})),n.d(t,"CALENDAR_VACATION_REQUEST_NOTE",(function(){return x})),n.d(t,"CALENDAR_VACATION_REQUEST_DELETE",(function(){return P})),n.d(t,"CALENDAR_VACATION_REQUEST_ALL_COMING",(function(){return M})),n.d(t,"CALENDAR_VACATION_REQUEST_COMING",(function(){return F})),n.d(t,"CALENDAR_VACATION_REQUEST_PENDDING",(function(){return U})),n.d(t,"CALENDAR_VACATION_REQUEST_WEEK",(function(){return B})),n.d(t,"CALENDAR_VACATION_REQUEST_RESPONSE_IS_COMING",(function(){return V})),n.d(t,"CALENDAR_VACATION_REQUEST_RESPONSE_IS_NOT_COMING",(function(){return W})),n.d(t,"CALENDAR_VACATION_REQUEST_RESPONSE_PENDING_ANSWER",(function(){return G})),n.d(t,"CALENDAR_VACATION_REQUEST_RESPONSE_CHILDREN",(function(){return H})),n.d(t,"CALENDAR_TITLE_CREATE_EVENT",(function(){return j})),n.d(t,"CALENDAR_TITLE_EDIT_EVENT",(function(){return Y})),n.d(t,"CALENDAR_TITLE_DELETE_EVENT",(function(){return $})),n.d(t,"CALENDAR_DELETE_EVENT_TEXT",(function(){return z})),n.d(t,"CALENDAR_DELETE_OTHERS_EVENT_WARNING_1",(function(){return q})),n.d(t,"CALENDAR_DELETE_OTHERS_EVENT_WARNING_2",(function(){return K})),n.d(t,"CALENDAR_EDIT_OTHERS_EVENT_WARNING_1",(function(){return Q})),n.d(t,"CALENDAR_EDIT_OTHERS_EVENT_WARNING_2",(function(){return J})),n.d(t,"CALENDAR_EDIT_REPEATING_SERIES_WARNING_1",(function(){return Z})),n.d(t,"CALENDAR_PARTIALLY_AVAILABLE_RESOURCES_WARNING",(function(){return X})),n.d(t,"CALENDAR_SAVE_EVENT_CONFIRMATION",(function(){return ee})),n.d(t,"CALENDAR_EXCESS_TIMESLOTS_WARNING",(function(){return te})),n.d(t,"CALENDAR_MISSING_TIMESLOTS_WARNING",(function(){return ne})),n.d(t,"CALENDAR_DELETE_VACATION_REGISTRATION_TEXT",(function(){return ie})),n.d(t,"CALENDAR_DELETE_SERIES_EVENT_TEXT",(function(){return se})),n.d(t,"CALENDAR_DELETE_SERIES_EVENT_TEXT_2",(function(){return ae})),n.d(t,"CALENDAR_DELETE_OCCURRENCE_EVENT_TEXT",(function(){return re})),n.d(t,"CALENDAR_DELETE_OCCURRENCE_EVENT_TEXT_2",(function(){return oe})),n.d(t,"CALENDAR_UPDATE_BOOKED_TIMESLOT_2",(function(){return le})),n.d(t,"CALENDAR_CLEAR_BOOKED_TIMESLOT",(function(){return ce})),n.d(t,"CALENDAR_CLEAR_BOOKED_TIMESLOT_2",(function(){return ue})),n.d(t,"CALENDAR_REMOVE_RESOURCES_WHEN_CHANGING_DATE_TIME",(function(){return de})),n.d(t,"CALENDAR_BOTH_PRIVATE_AND_ADDED_TO_INST_CALENDAR",(function(){return he})),n.d(t,"CALENDAR_DELETE_HOLIDAY_TEXT",(function(){return me})),n.d(t,"CALENDAR_DELETE_HOLIDAY_TEXT_2",(function(){return pe})),n.d(t,"CALENDAR_TIMESLOT_ALREADY_BOOKED",(function(){return ve})),n.d(t,"CALENDAR_TITLE_RIGHT_OF_DISPOSAL",(function(){return fe})),n.d(t,"CALENDAR_TITLE_PRINT",(function(){return ge})),n.d(t,"CALENDAR_TOOLBAR_PRINT_MAIN_DAY",(function(){return _e})),n.d(t,"CALENDAR_TOOLBAR_PRINT_FULL_DAY",(function(){return Ee})),n.d(t,"CALENDAR_ACTIVE_DELEGATED_ACCESS_START",(function(){return Ae})),n.d(t,"CALENDAR_ACTIVE_DELEGATED_ACCESS_END",(function(){return Te})),n.d(t,"CALENDAR_TIMES_FOR_ALL_WEEK_TITLE",(function(){return be})),n.d(t,"CALENDAR_TIMES_MOBILE_FOR_ALL_WEEK_TITLE",(function(){return Ce})),n.d(t,"CALENDAR_TIMES_FOR_ALL_WEEK_DESCRIPTION",(function(){return ke})),n.d(t,"CALENDAR_TOOLBAR_FILTER",(function(){return ye})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES",(function(){return Ie})),n.d(t,"CALENDAR_TOOLBAR_EVENT_FILTER_TYPES",(function(){return Se})),n.d(t,"CALENDAR_TOOLBAR_RESOURCE_TYPES",(function(){return De})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_event",(function(){return we})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_vacation_registration",(function(){return Ne})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_lesson",(function(){return Re})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_holiday",(function(){return Oe})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_presence_holiday",(function(){return Le})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_birthday",(function(){return xe})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_other",(function(){return Pe}
1)),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_school_home_meeting",(function(){return Me})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_parental_meeting",(function(){return Fe})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_performance_meeting",(function(){return Ue})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_excursion",(function(){return Be})),n.d(t,"CALENDAR_TOOLBAR_EVENT_TYPES_ENUM_DIRECTLY_RELATED",(function(){return Ve})),n.d(t,"CALENDAR_TOOLBAR_OTHER_FUNCTIONS",(function(){return We})),n.d(t,"CALENDAR_RESPOND_ON_BEHALF_CONFIRM",(function(){return Ge})),n.d(t,"CALENDAR_RESPOND_ON_BEHALF_CONFIRM_2",(function(){return He})),n.d(t,"CALENDAR_RESPOND_ON_BEHALF_CONFIRM_BLOCKED",(function(){return je})),n.d(t,"CALENDAR_RESPOND_ON_BEHALF_CONFIRM_2_BLOCKED",(function(){return Ye})),n.d(t,"CALENDAR_TIMESLOT_FREE_SLOT",(function(){return $e})),n.d(t,"LESSON_NOTE_TO_CLASS_TITLE",(function(){return ze})),n.d(t,"CALENDAR_TITLE_WITH_CHILDREN",(function(){return qe})),n.d(t,"CALENDAR_TITLE_WITH_CHILDREN_HELP",(function(){return Ke})),n.d(t,"CALENDAR_TOOLBAR_RESOURCE_TYPES_ENUM_rooms",(function(){return Qe})),n.d(t,"CALENDAR_TOOLBAR_RESOURCE_TYPES_ENUM_it",(function(){return Je})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION_SUCCESS",(function(){return Ze})),n.d(t,"CALENDAR_TOOLBAR_REQUEST_VACATION_UPDATE_SUCCESS",(function(){return Xe})),n.d(t,"CALENDAR_TOOLBAR_UPDATE_REQUEST_VACATION_SUCCESS",(function(){return et})),n.d(t,"HOLIDAY",(function(){return tt})),n.d(t,"PRESENCE_HOLIDAY",(function(){return nt})),n.d(t,"EVENT",(function(){return it})),n.d(t,"BIRTHDAY",(function(){return st})),n.d(t,"LESSON",(function(){return at})),n.d(t,"VACATION_REGISTRATION",(function(){return rt})),n.d(t,"EXCURSION",(function(){return ot})),n.d(t,"PARENTAL_MEETING",(function(){return lt})),n.d(t,"SCHOOL_HOME_MEETING",(function(){return ct})),n.d(t,"PERFORMANCE_MEETING",(function(){return ut})),n.d(t,"OTHER",(function(){return dt})),n.d(t,"CALENDAR_PROFILE_ROLE_EMPLOYEE",(function(){return ht})),n.d(t,"CALENDAR_PROFILE_ROLE_GUARDIAN",(function(){return mt})),n.d(t,"CALENDAR_PROFILE_ROLE_CHILD",(function(){return pt})),n.d(t,"CALENDAR_TITLE_CONFIRM_CANCEL",(function(){return vt})),n.d(t,"CALENDAR_CANCEL_INFO",(function(){return ft})),n.d(t,"CALENDAR_CANCEL_INFO_2",(function(){return gt})),n.d(t,"CALENDAR_TITLE_ATTENDEE_CONFLICT_TIME",(function(){return _t})),n.d(t,"CALENDAR_TITLE_NEVER_REPEAT",(function(){return Et})),n.d(t,"CALENDAR_PAGE_TITLE",(function(){return At})),n.d(t,"CALENDAR_TITLE_DAILY_EVENT",(function(){return Tt})),n.d(t,"CALENDAR_TITLE_WEEKLY_EVENT",(function(){return bt})),n.d(t,"CALENDAR_TITLE_MONTHLY_EVENT",(function(){return Ct})),n.d(t,"CALENDAR_TITLE_YEARLY_EVENT",(function(){return kt})),n.d(t,"CALENDAR_LABEL_EVENT_TITLE",(function(){return yt})),n.d(t,"CALENDAR_LABEL_EVENT_PLACEHOLDER_TITLE",(function(){return It})),n.d(t,"CALENDAR_ALERT_TITLE",(function(){return St})),n.d(t,"CALENDAR_ALERT_TITLE_TOO_LONG",(function(){return Dt})),n.d(t,"CALENDAR_ALERT_INVALID_MAXIMUM_PARTICIPANTS",(function(){return wt})),n.d(t,"CALENDAR_ALERT_NUMBER_OF_TIMESLOT_PARTICIPANTS",(function(){return Nt})),n.d(t,"CALENDAR_ALERT_TOO_FEW_MAXIMUM_PARTICIPANTS",(function(){return Rt})),n.d(t,"CALENDAR_ALERT_TIME",(function(){return Ot})),n.d(t,"CALENDAR_ALERT_CHOOSE_INSTITUTION",(function(){return Lt})),n.d(t,"CALENDAR_TITLE_CHOOSE_INSTITUTION",(function(){return xt})),n.d(t,"CALENDAR_TITLE_SELECTED_INSTITUTION",(function(){return Pt})),n.d(t,"CALENDAR_LABEL_EVENT_TYPE",(function(){return Mt})),n.d(t,"CALENDAR_LABEL_EVENT_PERSONS",(function(){return Ft})),n.d(t,"CALENDAR_LABEL_EVENT_PLACEHOLDER_PERSONS",(function(){return Ut})),n.d(t,"CALENDAR_LABEL_EVENT_REQUEST_FOR_ANSWER",(function(){return Bt})),n.d(t,"CALENDAR_LABEL_EVENT_REQUEST_FOR_ANSWER_HELP_TITLE",(function(){return Vt})),n.d(t,"CALENDAR_VACATION_REQUEST_CHOOSE_DEPARTMENTS",(function(){return Wt})),n.d(t,"CALENDAR_VACATION_REQUEST_CHOOSE_GROUPS",(function(){return Gt})),n.d(t,"CALENDAR_VACATION_REQUEST_PRESENCE_TIME_REQUIRED",(function(){return Ht})),n.d(t,"CALENDAR_VACATION_REQUEST_SETTINGS",(function(){return jt})),n.d(t,"CALENDAR_VACATION_REQUEST_RESPONSE_FILTERING_DEPARTMENT",(function(){return Yt})),n.d(t,"CALENDAR_VACATION_REQUEST_RESPONSE_FILTER",(function(){return $t})),n.d(t,"CALENDAR_VACATION_REQUEST_RESPONSE_FILTERING_GROUP",(function(){return zt})),n.d(t,"RESPONSE_VACATION_REQUEST_INTRODUCTION",(function(){return qt})),n.d(t,"RESPONSE_VACATION_COMING",(function(){return Kt})),n.d(t,"RESPONSE_VACATION_COMMING_HOUR",(function(){return Qt})),n.d(t,"RESPONSE_VACATION_NOT_COMMING_HOUR",(function(){return Jt})),n.d(t,"RESPONSE_VACATION_NOT_COMING",(function(){return Zt})),n.d(t,"RESPONSE_VACATION_COMMING_TITLE",(function(){return Xt})),n.d(t,"RESPONSE_VACATION_NOT_COMMING_TITLE",(function(){return en})),n.d(t,"RESPONSE_VACATION_COMING_TIME_INVALID",(function(){return tn})),n.d(t,"RESPONSE_VACATION_TIMES_OUTSIDE_OPENING_HOURS",(function(){return nn})),n.d(t,"RESPONSE_VACATION_NOTE_LABEL",(function(){return sn})),n.d(t,"RESPONSE_VACATION_NOTE_PLACEHOLDER",(function(){return an})),n.d(t,"CALENDAR_LABEL_EVENT_REQUEST_DEADLINE",(function(){return rn})),n.d(t,"CALENDAR_LABEL_EVENT_AVAILABLE_SEATS",(function(){return on})),n.d(t,"CALENDAR_EVENT_PARTICIPANTS",(function(){return ln})),n.d(t,"CALENDAR_LABEL_EVENT_INVALID_DEADLINE",(function(){return cn})),n.d(t,"CALENDAR_LABEL_EVENT_ADD_TO_INSTITUTION_CALENDAR",(function(){return un})),n.d(t,"CALENDAR_LABEL_EVENT_ADD_ONLY_TO_INSTITUTION_CALENDAR",(function(){return dn})),n.d(t,"CALENDAR_LABEL_EVENT_START",(function(){return hn})),n.d(t,"CALENDAR_LABEL_EVENT_START_LOWER",(function(){return mn})),n.d(t,"CALENDAR_LABEL_EVENT_SETTINGS_FOR_SIMPLE_EVENT",(function(){return pn})),n.d(t,"CALENDAR_LABEL_EVENT_SETTINGS_FOR_TIME_SLOT_EVENT",(function(){return vn})),n.d(t,"CALENDAR_LABEL_EVENT_PLACEHOLDER_START",(function(){return fn}
1)),n.d(t,"CALENDAR_ALERT_START_DATE",(function(){return gn})),n.d(t,"CALENDAR_ALERT_START_DATETIME_INVALID",(function(){return _n})),n.d(t,"CALENDAR_ALERT_START_TIME",(function(){return En})),n.d(t,"CALENDAR_ALERT_END_DATETIME",(function(){return An})),n.d(t,"CALENDAR_ALERT_EDIT_END_TIME_IN_THE_PAST",(function(){return Tn})),n.d(t,"CALENDAR_ALERT_CREATE_END_TIME_IN_THE_PAST",(function(){return bn})),n.d(t,"CALENDAR_ALERT_EDIT_REPEATING_IN_THE_PAST",(function(){return Cn})),n.d(t,"CALENDAR_ALERT_CREATE_REPEATING_IN_THE_PAST",(function(){return kn})),n.d(t,"CALENDAR_ALERT_OCCURENCE_DATE_BEFORE_FIRST_OCCURRENCE",(function(){return yn})),n.d(t,"CALENDAR_ALERT_OCCURENCE_DATE_AFTER_LAST_OCCURRENCE",(function(){return In})),n.d(t,"CALENDAR_LABEL_EVENT_END",(function(){return Sn})),n.d(t,"CALENDAR_LABEL_EVENT_PLACEHOLDER_END",(function(){return Dn})),n.d(t,"CALENDAR_LABEL_EVENT_DEFINE_PARTICIPANT_SEATS",(function(){return wn})),n.d(t,"CALENDAR_LABEL_EVENT_PARTICIPANT_NUMBER_REQUIRED",(function(){return Nn})),n.d(t,"CALENDAR_LABEL_EVENT_WRITE_PARTICIPANT_SEATS",(function(){return Rn})),n.d(t,"CALENDAR_LABEL_EVENT_WRITE_NUMBER_OF_PARTICIPANTS",(function(){return On})),n.d(t,"CALENDAR_LABEL_EVENT_ALL_DAY",(function(){return Ln})),n.d(t,"CALENDAR_LABEL_EVENT_ALLDAY",(function(){return xn})),n.d(t,"CALENDAR_LABEL_EVENT_PRIVATE",(function(){return Pn})),n.d(t,"CALENDAR_LABEL_EVENT_REPEAT",(function(){return Mn})),n.d(t,"CALENDAR_ALERT_EVENT_REPEAT",(function(){return Fn})),n.d(t,"CALENDAR_ALERT_EVENT_REPEAT_OCCURENCE_MAX",(function(){return Un})),n.d(t,"CALENDAR_ALERT_TOO_MANY_RECIPIENTS",(function(){return Bn})),n.d(t,"CALENDAR_ALERT_UNAVAILABLE_RESOURCES_1",(function(){return Vn})),n.d(t,"CALENDAR_ALERT_UNAVAILABLE_RESOURCES_2",(function(){return Wn})),n.d(t,"CALENDAR_ALERT_UNAVAILABLE_RESOURCES_3",(function(){return Gn})),n.d(t,"CALENDAR_ALERT_REPEATING_EVENT_CANNOT_MOVE_TO_EXISTING_REPETITION",(function(){return Hn})),n.d(t,"CALENDAR_INVITED_GROUPS",(function(){return jn})),n.d(t,"CALENDAR_LABEL_ORGANIZERS",(function(){return Yn})),n.d(t,"CALENDAR_SEND_REMINDER_WARNING_TITLE",(function(){return $n})),n.d(t,"CALENDAR_SEND_VACATION_REQUEST_REMINDER_WARNING",(function(){return zn})),n.d(t,"CALENDAR_SEND_EVENT_REMINDER_WARNING",(function(){return qn})),n.d(t,"CALENDAR_LABEL_EVENT_REPEAT_EACH",(function(){return Kn})),n.d(t,"CALENDAR_LABEL_EVENT_FOR_EACH",(function(){return Qn})),n.d(t,"CALENDAR_LABEL_EVENT_REPEAT_END_AFTER",(function(){return Jn})),n.d(t,"CALENDAR_LABEL_EVENT_REPEAT_REPETITION",(function(){return Zn})),n.d(t,"CALENDAR_LABEL_EVENT_REPEAT_THE",(function(){return Xn})),n.d(t,"CALENDAR_LABEL_EVENT_REPEAT_END_ON_DATE",(function(){return ei})),n.d(t,"CALENDAR_LABEL_EVENT_LOCATIONS",(function(){return ti})),n.d(t,"CALENDAR_LABEL_EVENT_PLACEHOLDER_PLACE",(function(){return ni})),n.d(t,"MESSAGE_EVENT_NOT_CREATED",(function(){return ii})),n.d(t,"MESSAGE_EVENT_RESPONSE_accepted",(function(){return si})),n.d(t,"MESSAGE_EVENT_RESPONSE_declined",(function(){return ai})),n.d(t,"CALENDAR_LABEL_EVENT_PRIMARY_LOCATION",(function(){return ri})),n.d(t,"CALENDAR_LABEL_EVENT_MEETING_PLACE",(function(){return oi})),n.d(t,"CALENDAR_LABEL_EVENT_MEETING_PLACE_PLACEHOLDER",(function(){return li})),n.d(t,"CALENDAR_LABEL_EVENT_EXTRA_ROOM_HELP",(function(){return ci})),n.d(t,"CALENDAR_LABEL_EVENT_RESOURCES",(function(){return ui})),n.d(t,"CALENDAR_LABEL_EVENT_RESOURCES_PLACEHOLDER",(function(){return di})),n.d(t,"CALENDAR_AVAILABLE",(function(){return hi})),n.d(t,"CALENDAR_AVAILABLE_PARTIALLY",(function(){return mi})),n.d(t,"CALENDAR_AVAILABLE_PARTIALLY_DESCRIPTION_1",(function(){return pi})),n.d(t,"CALENDAR_AVAILABLE_PARTIALLY_DESCRIPTION_2",(function(){return vi})),n.d(t,"CALENDAR_LABEL_EVENT_RESOURCES_HELP",(function(){return fi})),n.d(t,"CALENDAR_LABEL_EVENT_DESCRIPTION",(function(){return gi})),n.d(t,"CALENDAR_NO_MORE_SEATS",(function(){return _i})),n.d(t,"CALENDAR_MISSING_NUMBER_OF_PARTICIPANTS",(function(){return Ei})),n.d(t,"CALENDAR_PARTICIPATION_NO_LONGER_POSSIBLE",(function(){return Ai})),n.d(t,"CALENDAR_TOOLBAR_NEW_MEETING_EVENT",(function(){return Ti})),n.d(t,"CALENDAR_TITLE_CREATE_MEETING_EVENT",(function(){return bi})),n.d(t,"CALENDAR_TITLE_EDIT_MEETING_EVENT",(function(){return Ci})),n.d(t,"CALENDAR_TITLE_EDIT_LESSON",(function(){return ki})),n.d(t,"CALENDAR_LABEL_PARTICIPANT_SEATS_ADULT",(function(){return yi})),n.d(t,"CALENDAR_LABEL_PARTICIPANT_SEATS_CHILD",(function(){return Ii})),n.d(t,"CALENDAR_ALLOW_MULTIPLE_PARTICIPANTS",(function(){return Si})),n.d(t,"CALENDAR_MEETING_SUGGESTION_LABEL",(function(){return Di})),n.d(t,"CALENDAR_TITLE_MEETING_DURATION",(function(){return wi})),n.d(t,"CALENDAR_TITLE_PAUSE_AFTER",(function(){return Ni})),n.d(t,"CALENDAR_TITLE_PAUSE_DURATION",(function(){return Ri})),n.d(t,"CALENDAR_LABEL_MEETING_DATE",(function(){return Oi})),n.d(t,"CALENDAR_LABEL_MEETING_FROM_TIME",(function(){return Li}
1)),n.d(t,"CALENDAR_LABEL_MEETING_TO_TIME",(function(){return xi})),n.d(t,"CALENDAR_LABEL_MEETING_LOCATION",(function(){return Pi})),n.d(t,"CALENDAR_LABEL_MEETING_COORGANIZER",(function(){return Mi})),n.d(t,"CALENDAR_LABEL_MEETING_EVENT_ADD_TIME",(function(){return Fi})),n.d(t,"CALENDAR_LABEL_SERIES_EVENT_NEVER_END",(function(){return Ui})),n.d(t,"CALENDAR_MEETING_SUGGESTED_TIMESLOTS",(function(){return Bi})),n.d(t,"CALENDAR_MEETING_ADDED_TIMESLOTS",(function(){return Vi})),n.d(t,"CALENDAR_MEETING",(function(){return Wi})),n.d(t,"CALENDAR_MEETINGS",(function(){return Gi})),n.d(t,"CALENDAR_ALERT_SERIES_MONTHLY_END_DATE_OF_MONTH",(function(){return Hi})),n.d(t,"CALENDAR_ALERT_SERIES_DATE_INVALID",(function(){return ji})),n.d(t,"CALENDAR_ALERT_ATTENDEES",(function(){return Yi})),n.d(t,"CALENDAR_ALERT_INVITEES_ARE_CORGANIZERS",(function(){return $i})),n.d(t,"CALENDAR_ALERT_INVALID_MEETING_DURATION",(function(){return zi})),n.d(t,"CALENDAR_ALERT_INVALID_TIMESLOT",(function(){return qi})),n.d(t,"CALENDAR_ALERT_CONFLICT_TIMESLOT",(function(){return Ki})),n.d(t,"CALENDAR_ALERT_CONFLICTINT_INVITEES",(function(){return Qi})),n.d(t,"CALENDAR_ALERT_CONFLICTINT_CONFIRM",(function(){return Ji})),n.d(t,"CALENDAR_ALERT_INVALID_MEETING_LOCATION",(function(){return Zi})),n.d(t,"CALENDAR_ALERT_EDIT_SINGLE_OCCURRENCE",(function(){return Xi})),n.d(t,"CALENDAR_ALERT_EDIT_REPEATING_SERIES",(function(){return es})),n.d(t,"CALENDAR_ALERT_MISSING_TIMESLOT",(function(){return ts})),n.d(t,"CALENDAR_ALERT_NOT_ENOUGH_SLOTS_FOR_EVERYONE",(function(){return ns})),n.d(t,"CALENDAR_WARNING_MISSING_TIMESLOT",(function(){return is})),n.d(t,"CALENDAR_WARNING_EXCESS_TIMESLOT",(function(){return ss})),n.d(t,"CALENDAR_WARNING_REMOVE_ORGANIZER_FROM_SIMPLE_EVENT",(function(){return as})),n.d(t,"CALENDAR_WARNING_REMOVE_ORGANIZER_FROM_MEETING_EVENT",(function(){return rs})),n.d(t,"CALENDAR_WARNING_REMOVE_ORGANIZER_FROM_EVENT_CONFIRM",(function(){return os})),n.d(t,"CALENDAR_WEEK_IN_MONTH_ENUM_first",(function(){return ls})),n.d(t,"CALENDAR_WEEK_IN_MONTH_ENUM_second",(function(){return cs})),n.d(t,"CALENDAR_WEEK_IN_MONTH_ENUM_third",(function(){return us})),n.d(t,"CALENDAR_WEEK_IN_MONTH_ENUM_fourth",(function(){return ds})),n.d(t,"CALENDAR_WEEK_IN_MONTH_ENUM_last",(function(){return hs})),n.d(t,"CALENDAR_UPDATE_EVENT_ANSWER_BUTTON",(function(){return ms})),n.d(t,"CALENDAR_EDIT_EVENT_BUTTON",(function(){return ps})),n.d(t,"CALENDAR_ACCEPT_EVENT_BUTTON",(function(){return vs})),n.d(t,"CALENDAR_REJECT_EVENT_BUTTON",(function(){return fs})),n.d(t,"CALENDAR_MAYBE_EVENT_BUTTON",(function(){return gs})),n.d(t,"CALENDAR_EDIT_REPEATING_OCCURRENCE",(function(){return _s})),n.d(t,"CALENDAR_EDIT_REPEATING_SERIES",(function(){return Es})),n.d(t,"CALENDAR_LABEL_EVENT_ATTENDEE",(function(){return As})),n.d(t,"CALENDAR_LABEL_EVENT_CLASS",(function(){return Ts})),n.d(t,"CALENDAR_LABEL_EVENT_TEACHER",(function(){return bs})),n.d(t,"CALENDAR_LABEL_EVENT_PEDAGOGUE",(function(){return Cs})),n.d(t,"CALENDAR_LABEL_EVENT_HELP_TEACHER",(function(){return ks})),n.d(t,"CALENDAR_LABEL_EVENT_SUBSTITUTE",(function(){return ys})),n.d(t,"CALENDAR_LABEL_EVENT_MESSAGE_CLASS",(function(){return Is})),n.d(t,"CALENDAR_LABEL_EVENT_MESSAGE_TEACHER",(function(){return Ss})),n.d(t,"CALENDAR_LABEL_EVENT_MESSAGE_SUBSTITUTE",(function(){return Ds})),n.d(t,"CALENDAR_LABEL_EVENT_LOCATION",(function(){return ws})),n.d(t,"CALENDAR_LABEL_EVENT_CLOCK",(function(){return Ns})),n.d(t,"CALENDAR_LABEL_ALL_DAY_EVENT_TIME",(function(){return Rs})),n.d(t,"CALENDAR_LABEL_ALL_DAY_END_TIME",(function(){return Os})),n.d(t,"CALENDAR_LABEL_SERIES_EVENT",(function(){return Ls})),n.d(t,"CALENDAR_LABEL_EVENT_ENDS",(function(){return xs})),n.d(t,"CALENDAR_LABEL_EVENT_STARTS",(function(){return Ps})),n.d(t,"CALENDAR_LABEL_EVENT_NEVER_ENDS",(function(){return Ms})),n.d(t,"CALENDAR_LABEL_RESOURCE_TYPES",(function(){return Fs})),n.d(t,"CALENDAR_LABEL_EVENT_CREATOR",(function(){return Us})),n.d(t,"CALENDAR_LABEL_MOVED_FROM",(function(){return Bs})),n.d(t,"CALENDAR_LABEL_EVENT_ORGANIZERS",(function(){return Vs})),n.d(t,"CALENDAR_LABEL_EVENT_CONCERNING",(function(){return Ws})),n.d(t,"CALENDAR_LABEL_EVENT_SUNDAY",(function(){return Gs})),n.d(t,"CALENDAR_LABEL_EVENT_MONDAY",(function(){return Hs})),n.d(t,"CALENDAR_LABEL_EVENT_TUESDAY",(function(){return js})),n.d(t,"CALENDAR_LABEL_EVENT_WEDNESDAY",(function(){return Ys})),n.d(t,"CALENDAR_LABEL_EVENT_THURSDAY",(function(){return $s})),n.d(t,"CALENDAR_LABEL_EVENT_FRIDAY",(function(){return zs})),n.d(t,"CALENDAR_LABEL_EVENT_SATURDAY",(function(){return qs})),n.d(t,"CALENDAR_BUTTON_CANCEL",(function(){return Ks})),n.d(t,"CALENDAR_BUTTON_SAVE",(function(){return Qs})),n.d(t,"CALENDAR_BUTTON_CREATE",(function(){return Js})),n.d(t,"CALENDAR_BUTTON_CONFIRM",(function(){return Zs}
1)),n.d(t,"CALENDAR_BUTTON_UNDO",(function(){return Xs})),n.d(t,"CALENDAR_POPOVER_HEADER",(function(){return ea})),n.d(t,"CALENDAR_LABEL_EVENT_INVITED",(function(){return ta})),n.d(t,"CALENDAR_LABEL_EVENT_INVITEES",(function(){return na})),n.d(t,"CALENDAR_LABEL_EVENT_ANSWERS",(function(){return ia})),n.d(t,"CALENDAR_LABEL_EVENT_INVITED_ACCEPTED",(function(){return sa})),n.d(t,"CALENDAR_LABEL_EVENT_INVITED_DECLINED",(function(){return aa})),n.d(t,"CALENDAR_LABEL_EVENT_INVITED_TENTATIVE",(function(){return ra})),n.d(t,"CALENDAR_LABEL_EVENT_INVITED_WAITING",(function(){return oa})),n.d(t,"CALENDAR_MENU_MOBILE_HEADER",(function(){return la})),n.d(t,"CALENDAR_TEACHER_SUBSTITUTE",(function(){return ca})),n.d(t,"CALENDAR_BREAK_TEXT",(function(){return ua})),n.d(t,"CALENDAR_RESPONSE_ACCEPTED",(function(){return da})),n.d(t,"CALENDAR_RESPONSE_DECLINED",(function(){return ha})),n.d(t,"CALENDAR_RESPONSE_TENTATIVE",(function(){return ma})),n.d(t,"CALENDAR_RESPONSE_WAITING",(function(){return pa})),n.d(t,"CALENDAR_SEND_EVENT_REMINDER",(function(){return va})),n.d(t,"CALENDAR_EVENT_REMINDER_MESSAGE",(function(){return fa})),n.d(t,"CALENDAR_VACATION_REQUEST_REMINDER_MESSAGE",(function(){return ga})),n.d(t,"CALENDAR_EVENT_REMINDER_AUTO_GENERATED",(function(){return _a})),n.d(t,"CALENDAR_HOUR_UNIT",(function(){return Ea})),n.d(t,"CALENDAR_MINUTE_UNIT",(function(){return Aa})),n.d(t,"CALENDAR_APPROXIMATE_TEXT",(function(){return Ta})),n.d(t,"CALENDAR_AVAILABLE_TIMESLOT",(function(){return ba})),n.d(t,"CALENDAR_AVAILABLE_TIMESLOTS",(function(){return Ca})),n.d(t,"CALENDAR_REGISTERED_TIMESLOT",(function(){return ka})),n.d(t,"CALENDAR_REGISTERED_TIMESLOTS",(function(){return ya})),n.d(t,"CALENDAR_EVENT_REMINDER_ALERT",(function(){return Ia})),n.d(t,"CALENDAR_WARNING_DRAG_DROP_DEADLINE",(function(){return Sa})),n.d(t,"CALENDAR_WARNING_EDIT_TIMESLOT",(function(){return Da})),n.d(t,"CALENDAR_WARNING_EDIT_HOLIDAY",(function(){return wa})),n.d(t,"CALENDAR_WARNING_EDIT_PRESENCE_REGISTRATION",(function(){return Na})),n.d(t,"CALENDAR_NOTIFY_MESSAGE_1",(function(){return Ra})),n.d(t,"CALENDAR_NOTIFY_MESSAGE_2",(function(){return Oa})),n.d(t,"CALENDAR_NOTIFY_MESSAGE_3",(function(){return La})),n.d(t,"CALENDAR_NOTIFY_MESSAGE_CANNOT_SEND_INVITATION",(function(){return xa})),n.d(t,"CALENDAR_NOTIFY_MESSAGE_NO_PROFILE_GET_INVITATION_1",(function(){return Pa})),n.d(t,"CALENDAR_NOTIFY_MESSAGE_NO_PROFILE_GET_INVITATION_2",(function(){return Ma})),n.d(t,"CALENDAR_NOTIFY_MESSAGE_NO_NOTIFICATIONS",(function(){return Fa})),n.d(t,"CALENDAR_NOTIFY_MESSAGE_CHANGE_EVENT_TYPE",(function(){return Ua})),n.d(t,"CALENDAR_CONFIRM_BOX_MESSAGE",(function(){return Ba})),n.d(t,"CALENDAR_CONFIRM_BOX_OVERLAP_1",(function(){return Va})),n.d(t,"CALENDAR_CONFIRM_BOX_OVERLAP_2",(function(){return Wa})),n.d(t,"CALENDAR_CONFIRM_SWITCH_INSTITUTION_1",(function(){return Ga})),n.d(t,"CALENDAR_CONFIRM_SWITCH_INSTITUTION_2",(function(){return Ha})),n.d(t,"DAILY_OVERVIEW_SEE_CALENDAR",(function(){return ja})),n.d(t,"CALENDAR_HEADER_CALENDAR_MANAGEMENT",(function(){return Ya})),n.d(t,"CALENDAR_HANDLE_CALENDAR",(function(){return $a})),n.d(t,"CALENDAR_ADD_USER",(function(){return za})),n.d(t,"CALENDAR_WARNING_CONLICT_EVENT_TITLE",(function(){return qa})),n.d(t,"CALENDAR_WARNING_CONLICT_EVENT_MESSAGE",(function(){return Ka})),n.d(t,"CALENDAR_IMPORTANT_DATE",(function(){return Qa})),n.d(t,"CALENDAR_IMPORTANT_DATE_MORE",(function(){return Ja})),n.d(t,"CALENDAR_IMPORTANT_DATE_SEE_MORE",(function(){return Za})),n.d(t,"CALENDAR_NO_IMPORTANT_DATES",(function(){return Xa})),n.d(t,"CALENDAR_GO_TO_DAY",(function(){return er})),n.d(t,"CALENDAR_REGISTRATION_TIMESLOT_EVENT",(function(){return tr})),n.d(t,"CALENDAR_TIMESLOT_BLOCKED",(function(){return nr})),n.d(t,"CALENDAR_TIMESLOT_HEADER_BLOCKED",(function(){return ir})),n.d(t,"CALENDAR_TIMESLOT_HEADER_WAITING",(function(){return sr})),n.d(t,"CALENDAR_TIMESLOT_HEADER_ACCEPTED",(function(){return ar})),n.d(t,"CALENDAR_TIMESLOT_OPTION_BLOCKED",(function(){return rr})),n.d(t,"CALENDAR_TIMESLOT_CANCEL_EVENT",(function(){return or})),n.d(t,"CALENDAR_CHOOSE_TIMESLOT_EVENT",(function(){return lr})),n.d(t,"CALENDAR_ORGANIZER",(function(){return cr})),n.d(t,"CALENDAR_PARTICIPANT",(function(){return ur})),n.d(t,"CALENDAR_CONCERNING_CHILD",(function(){return dr})),n.d(t,"CALENDAR_NAVBAR_TAB_CALENDAR",(function(){return hr})),n.d(t,"CALENDAR_NAVBAR_TAB_NOTIFICATIONS",(function(){return mr})),n.d(t,"CALENDAR_RESOURCES_ALREADY_BOOKED",(function(){return pr})),n.d(t,"CALENDAR_RESOURCES_NO_PERMISSION",(function(){return vr})),n.d(t,"CALENDAR_CREATE_EVENT_ERROR",(function(){return fr})),n.d(t,"CALENDAR_BLOCK_COMMUNICATION_TITLE",(function(){return gr})),n.d(t,"CALENDAR_BLOCK_COMMUNICATION_BODY",(function(){return _r})),n.d(t,"CALENDAR_RECIPIENT_BLOCK_COMMUNICATION_BODY",(function(){return Er}
1)),n.d(t,"CALENDAR_RESPONSE_PARTICIPATE_TITLE",(function(){return Ar})),n.d(t,"CALENDAR_RESPONSE_AWAITING_TITLE",(function(){return Tr})),n.d(t,"CALENDAR_RESPONSE_NOT_PARTICIPATE_TITLE",(function(){return br})),n.d(t,"CALENDAR_CONFLICT_EVENT_CONFIRMED_TITLE",(function(){return Cr})),n.d(t,"CALENDAR_REPEAT_TYPE_HEADER",(function(){return kr})),n.d(t,"CALENDAR_FILTER_TITLE",(function(){return yr})),n.d(t,"CALENDAR_CONFIRMED_DELETE_EVENT",(function(){return Ir})),n.d(t,"CALENDAR_EVENT_PRIVATE_TITLE",(function(){return Sr})),n.d(t,"CALENDAR_EVENT_NOT_PRIVATE_TITLE",(function(){return Dr})),n.d(t,"CALENDAR_TAB_TITLE",(function(){return wr})),n.d(t,"MY_CALENDAR_TAB_TITLE",(function(){return Nr})),n.d(t,"CALENDAR_ACCESS_ON_BEHALF_OF",(function(){return Rr})),n.d(t,"EVENT_COMMUNICATION_EVENT_TYPE_TITLE",(function(){return Or})),n.d(t,"REGARDING_CHILDREND_LABEL",(function(){return Lr})),n.d(t,"CALENDAR_ALERT_ONLY_ONE_GROUP",(function(){return xr})),n.d(t,"CALENDAR_CANT_SAVE_VACATION_WARNING",(function(){return Pr})),n.d(t,"CALENDAR_VACATION_CHILD_NOT_COMING",(function(){return Mr})),n.d(t,"RESPONSE_VACATION_REQUEST_FOR",(function(){return Fr})),n.d(t,"PLANNING_ASSISTANT_HEADER",(function(){return Ur})),n.d(t,"PLANNING_ASSISTANT_BUTTON",(function(){return Br})),n.d(t,"PLANNING_ASSISTANT_ADD_RECIPIENT",(function(){return Vr})),n.d(t,"PLANNING_ASSISTANT_TOO_MANY_INVITEES",(function(){return Wr})),n.d(t,"ARIA_LABEL_VACATION_REQUEST_CHOOSE_INSTITUTION",(function(){return Gr})),n.d(t,"ARIA_LABEL_VACATION_REQUEST_CHOOSE_DEPARTMENTS",(function(){return Hr})),n.d(t,"ARIA_LABEL_VACATION_REQUEST_CHOOSE_GROUPS",(function(){return jr})),n.d(t,"ARIA_LABEL_VACATION_REQUEST_NOTES",(function(){return Yr})),n.d(t,"ARIA_LABEL_VACATION_REQUEST_SEE_LESS_NOTE",(function(){return $r})),n.d(t,"ARIA_LABEL_VACATION_REQUEST_SEE_FULL_NOTE",(function(){return zr})),n.d(t,"ARIA_LABEL_VACATION_REQUEST_SHOW_LIST_CHILDREN",(function(){return qr})),n.d(t,"ARIA_LABEL_VACATION_REQUEST_HIDE_CHILDREN",(function(){return Kr})),n.d(t,"ARIA_LABEL_REMOVE_DELEGATE_ACCESS",(function(){return Qr})),n.d(t,"ARIA_LABEL_CHOOSE_MEETING",(function(){return Jr}));var i="Location",s="Other",a="Opret begivenhed",r="BEGIVENHED",o="SAMTALE",l="Type begivenhed",c="Åbn kalender",u="Anmod om ferieregistrering",d="Ferieanmodning",h="Vær opmærksom på, at ferieanmodningen KUN bliver sendt til de forældre, der har komme/gå modulet.",m="Du skal angive en gyldig start og slut dato",p="Du skal angive en titel",v="Du skal vælge en afdeling",f="Du skal vælge mindst en gruppe",g="Åbn kalender",_="Du kan fremsøge en anden brugers kalender eller ressourcer",E="Kalendere med råderet",A="Ferieanmodninger",T="Kalendere jeg har råderet over",b="Se institutionens kalender",C="Kalender for",k="andre",y="Besked",I="Opretter:",S="Institution:",D="Afdeling:",w="Gruppe:",N="Ferieperiode:",R="d.",O="til d.",L="Mangler svar:",x="Tekst til forældre:",P="Slet ferieanmodning",M="Alle børn kommer",F="Kommer:",U="Mangler svar:",B="Uge",V="Kommer",W="Kommer ikke",G="Mangler svar",H="børn",j="OPRET BEGIVENHED",Y="REDIGER BEGIVENHED",$="SLET BEGIVENHED",z="Er du sikker på, at du vil slette begivenheden?",q="Du er ved at slette en begivenhed, du ikke selv har oprettet.",K="Er du sikker på du vil fortsætte?",Q="Du er ved at ændre en begivenhed, du ikke selv har oprettet.",J="Er du sikker på du vil fortsætte?",Z="Hvis du har lavet ændringer til enkelte begivenheder i serien, vil ændringerne blive overskrevet med de nye ændringer til serien.",X="Bemærk, at det valgte lokale/ressource ikke er tilgængeligt på ét eller flere tidspunkter.",ee="Vil du fortsætte?",te="Bemærk, at du har tilføjet mere tid end nødvendigt for at alle kan deltage.",ne="Vær opmærksom på, at du ikke har tilføjet nok tid til det antal personer, der er inviteret til samtalen.",ie="Er du sikker på, at du vil slette ferieanmodningen?",se="Du er ved at slette en serie af begivenheder.",ae="Er du sikker på, at du vil slette alle begivenhederne i serien?",re="Du er ved at slette en enkelt begivenhed i en serie af begivenheder.",oe="Er du sikker på, at du vil slette begivenheden?",le="kl.",ce="Vær opmærksom på, at du ikke kan vælge en ny tid, hvis du vælger ikke at deltage.",ue="Er du sikker på, at du ikke kan deltage?",de="Hvis du ændrer tid og dato, forsvinder dine bookinger af lokaler og ressourcer for denne begivenhed. Er du sikker på, at du vil fortsætte?",he="Begivenheden kan ikke både være privat og blive tilføjet til institutionens kalender",me="Du er ved at slette den oprettede ferie/fri",pe="Er du sikker på, at du vil slette den?",ve="Dette mødetidspunkt er allerede booket. Vælg venligst et andet.",fe="Giv råderet",ge="Print",_e="Print (06:00-18:00)",Ee="Print (Hele dagen)",Ae="OBS: Du bruger kalenderen på vegne af",Te="Alt hvad du foretager dig bliver gjort i personens navn. Klik her for at komme tilbage til din egen kalender",be="Tider for hele ugen",Ce="Hele ugen",ke="Her kan du angive tider for hele ugen. Du kan efterfølgende overskrive tider for enkelte dage ved at udfylde de pågældende dage manuelt.",ye="Filtrer",Ie="Begivenheder",Se="Du k
1an filtrere efter type",De="Ressourcer",we="Møde/Begivenhed",Ne="Ferieanmodning",Re="Skema",Oe="Ferie/fri",Le="Ferie/fri",xe="Fødselsdag",Pe="Andet",Me="Skole-hjem-samtale",Fe="Forældresamtale",Ue="MUS-samtale",Be="Ekskursion",Ve="Mine begivenheder",We="Andre funktioner",Ge="Er du sikker på, at du vil tilmelde personen til dette møde.",He="Denne handling kan ikke fortrydes",je="Du er ved at blokere en tid, så deltagerne ikke kan vælge den.",Ye="Er du sikker på, at du vil fortsætte?",$e="Ledig plads",ze="ADVARSEL",qe="Vis også samtalen i børns kalender, når forældre har svaret på indkaldelsen",Ke="Når forældre har valgt tid og dato, vil samtalen ligeledes fremgå i børns kalender.",Qe="Rum",Je="IT",Ze="Ferieanmodningen blev oprettet.",Xe="Ferieanmodningen blev besvaret.",et="Ferieanmodningen blev opdateret",tt="Ferie/fri",nt="Ferie/fri",it="Begivenheder",st="Fødselsdag",at="Skema",rt="Ferieanmodning",ot="Ekskursion",lt="Forældresamtale",ct="Skole-hjem-samtale",ut="MUS-samtale",dt="Andet",ht="employee",mt="guardian",pt="child",vt="ADVARSEL",ft="Ændringerne vil ikke blive gemt.",gt="Er du sikker på, du vil forlade siden?",_t="Advarsels konflikt",Et="Aldrig",At="Kalender",Tt="Dagligt",bt="Ugentligt",Ct="Månedligt",kt="Årligt",yt="EMNE",It="Skriv emne",St="Du mangler at angive emne",Dt="Emnet må ikke være mere end 255 tegn langt",wt="Angiv antal mellem 1 og 2000",Nt="Angiv antal mellem 2 og 10",Rt="Der er allerede tilmeldt {participants} personer. Du kan derfor ikke angive et antal, som er lavere end {participants}",Ot="Du mangler at vælge en tid",Lt="Vælg venligst en institution, som du ville oprette begivenhed til",xt="Vælg en institution",Pt="Institution",Mt="TYPE",Ft="DELTAGERE",Ut="Vælg personer",Bt="Send notifikation",Vt="Send notifikation",Wt="Vælg afdeling",Gt="Vælg grupper",Ht="Tilføj angivelse af tider, hvis barnet kommer",jt="Indstillinger",Yt="Afdeling:",$t="Filtrer",zt="Gruppe:",qt="Vælg nedenfor hvilke dage, dit barn kommer og ikke kommer i ferieperioden",Kt="Kommer",Qt="Fra kl.",Jt="Til kl.",Zt="Kommer ikke",Xt="Kommer hele ugen",en="Kommer ikke hele ugen",tn="Du mangler at angive tid",nn="Du har angivet tider, der ligger uden for åbningstiden",sn="Ferienote til institutionen",an="Skriv note her...",rn="Deadline for svar",on="Ledige pladser",ln="{available} ud af {max}",cn="Deadline kan ikke være efter start dato",un="Tilføj til min egen og kalender for",dn="Tilføj KUN til kalender for",hn="STARTER",mn="Start:",pn="Indstillinger for begivenheden",vn="Indstillinger for samtalen",fn="dd/mm/yyyy",gn="Indtast startdatoen",_n="Indtast venligst gyldig startdato tid",En="Indtast starttidspunkt",An="Indtast venligst en gyldig slutdato tid",Tn="Du er ved at ændre en begivenhed hvor sluttidspunktet allerede er overskredet.",bn="Du er ved at oprette en begivenhed hvor sluttidspunktet allerede er overskredet.",Cn="Du er ved at ændre en begivenhed hvor den første gentagelses sluttidspunkt allerede er overskredet.",kn="Du er ved at oprette en begivenhed hvor den første gentagelses sluttidspunkt allerede er overskredet.",yn="Du kan ikke ændre en begivenhed i en serie til et tidspunkt før den første begivenhed i serien.",In="Du kan ikke ændre en begivenhed i en serie til et tidspunkt efter den sidste begivenhed i serien.",Sn="SLUTTER",Dn="dd/mm/yyyy",wn="Angiv antal pladser til rådighed",Nn="Anmod om angivelse af deltagerantal",Rn="Skriv antal",On="Vælg antal",Ln="Hele dagen",xn="HELDAG",Pn="Privat",Mn="GENTAG",Fn="Felt skal udfyldes",Un="Max 2000 gentagelser",Bn="Begivenheden kan ikke oprettes, da der er valgt mere end 2000 deltagere.",Vn="Ressourcen/Ressourcerne",Wn="er blevet booket af en anden bruger i det valgte tidsrum og er derfor blevet fjernet.",Gn="Ønsker du at gemme begivenheden alligevel?",Hn="Det er ikke muligt at flytte en gentagelse til en dag hvor der er en anden gentagelse i serien.",jn="Følgende grupper er inviteret til begivenheden og nye medlemmer af gruppen inviteres automatisk:",Yn="Medarrangører",$n="Rykker",zn="Du er ved at sende en rykker til forældrene til {numberOfInvitees} børn, der mangler at svare.",qn="Du er ved at sende en rykker til {numberOfInvitees} inviterede, der mangler at svare.",Kn="Gentag hver",Qn="for hver",Jn="Slut efter",Zn="gentagelser",Xn="Den",ei="Slut: ",ti="Lokaler",ni="Book et eller flere lokaler",ii="Begivenheden blev ikke oprettet ",si="Du har accepteret begivenheden",ai="Du har afvist begivenheden",ri="Primær lokale",oi="Mødested (fritekst)",li="Tilføj møde
1sted i fritekst",ci="Her kan du tilføje ekstra lokaler, hvis der er behov for det, fx til gruppearbejde eller lignende",ui="RESSOURCER",di="Tilføj ressourcer",hi="Ledig",mi="Ledig {available} ud af {occurrences} gange",pi="{resource} er ledig",vi="{available} ud af {occurrences} gange",fi="Her kan du tilføje de ressourcer, der er tilknyttet institutionen, som fx læringsmaterialer og teknisk udstyr",gi="TEKST",_i="Der er ingen ledige pladser",Ei="Du skal angive mindst en deltager for at deltage i begivenheden.",Ai="Tilmelding er desværre ikke længere mulig, da der ikke er flere ledige pladser",Ti="Opret samtale",bi="OPRET SAMTALE",Ci="REDIGER SAMTALE",ki="REDIGER SKEMABRIK",yi="Angiv antal voksne",Ii="Angiv antal børn",Si="Flere kan vælge samme tid",Di="Tidspunkter",wi="Samtalens varighed",Ni="Antal samtaler før pause",Ri="Pausens varighed",Oi="Dato",Li="Fra kl.",xi="Til kl.",Pi="Lokale",Mi="Co-organizer",Fi="Tilføj tidspunkt",Ui="Begivenhed slutter aldrig",Bi="Hvis du ønsker at alle får tid til en samtale, skal du tilføje tid til",Vi="Lige nu har du tilføjet nok tid til",Wi="samtale",Gi="samtaler",Hi="Begivenhederne vil blive sat på den sidste dag i måneden",ji="Datoen er ugyldig",Yi="Du skal vælge mindst én person",$i="Du kan ikke vælge en medarrangør, der også er deltager",zi="Du mangler at angive varighed af den enkelte samtale",qi="Du har indtastet ugyldig tid eller varighed er mindre end mødevarighed",Ki="Tidspunktet er allerede booket",Qi="Følgende personer har andre begivenheder på samme tidspunkt:",Ji="Vil du gemme begivenheden alligevel?",Zi="Du mangler at angive et lokale",Xi="Du er ved at redigere en enkelt begivenhed i en serie af begivenheder",es="Du er ved at redigere en serie af begivenheder",ts="Du skal tilføje nok tid til mindst en samtale.",ns="Vær opmærksom på, at der ikke er nok tider til alle.",is="Hvis du ønsker, at alle skal kunne deltage, mangler du at tilføje tid til {missingSlots}, hvilket er {missingTime}",ss="Bemærk, at du har tilføjet tid til {excessSlots} mere end nødvendigt, hvilket er {excessTime} for meget.",as="Du er ved at fjerne en medarrangør fra begivenheden. Det betyder, at vedkommende ikke længere vil kunne se eller redigere i begivenheden.",rs="Du er ved at fjerne en medarrangør fra samtalen. Det betyder, at vedkommende ikke længere vil kunne se eller redigere i samtalen.",os="Er du sikker på, at du vil fortsætte?",ls="Første",cs="Anden",us="Tredje",ds="Fjerde",hs="Sidste",ms="Opdater svar",ps="Rediger",vs="DELTAG",fs="AFVIS",gs="MÅSKE",_s="Denne begivenhed",Es="Hele serien",As="Gæster",Ts="Klasse",bs="Lærer",Cs="Pædagog",ks="Hjælpelærer",ys="Vikar",Is="NOTE TIL KLASSE",Ss="NOTE TIL LÆRER",Ds="NOTE TIL VIKAR",ws="Sted",Ns="Kl.",Rs="00:00 - 23:59",Os="23:59",Ls="Begivenheden er en del af en serie",xs="og slutter",Ps="Serien startede",Ms="og slutter aldrig",Fs="Ressourcer",Us="Oprettet af",Bs="Flyttet fra",Vs="Medarrangører",Ws="Vedrører",Gs="Søndag",Hs="Mandag",js="Tirsdag",Ys="Onsdag",$s="Torsdag",zs="Fredag",qs="Lørdag",Ks="Annuller",Qs="GEM",Js="Opret",Zs="Opdater tidspunkt",Xs="Fortryd ændring",ea="DETALJER",ta="DELTAGERE",na="Inviterede",ia="svar",sa="Deltager",aa="Deltager ikke",ra="Deltager måske",oa="Mangler svar",la="KALENDERMENU",ca="Vikar",ua="Pause",da="Deltager",ha="Deltager ikke",ma="Måske",pa="Afventer",va="Ryk for svar",fa="Du bedes svare på den vedhæftede invitation.",ga="Du bedes svare på den vedhæftede ferieanmodning.",_a="Denne besked kan ikke besvares.",Ea="t.",Aa="min.",Ta="cirka",ba="ledig tid",Ca="ledige tider",ka="tilmeldt",ya="tilmeldte",Ia="Seneste rykker blev sendt {dateTime}",Sa="Du kan ikke opdatere begivenheden, da start tidspunktet er tidligere end deadline for svar.",Da="Du skal åbne samtalen for at redigere i den",wa="Du skal åbne ferie/fri begivenheden for at redigere i den",Na="Du kan ikke flytte en ferieanmodning",Ra='Er du sikker på, at du vil flytte begivenheden "',Oa='" til',La="kl.",xa="Du kan som Værge ikke kommunikere med andre Værger, da en administrator har blokeret din kommunikationskanal.",Pa="Du er blokeret fra at kommunikere med brugere af profiltypen ",Ma=". Derfor vil brugere med denne profiltype ikke modtage din invitation.",Fa="Du har ingen invitationer",Ua="Er du sikker på, at du vil skifte type? Hvis du skifter, vil dine ændringer blive slettet.",Ba="Er du sikker på du vil flytte [eventTitle] til [eventWeekday] kl. [eventTime]?",Va="Bemærk:",Wa="har en anden aftale på det valgte tidspunkt",Ga="Er du sikker på, at du vil bytte institution?",Ha="Formularen nulstiller alle data, du har indtastet",ja="Se kalender",Ya="RÅDERET OVER KALENDER",$a="Brugere, der må håndtere min kalender",za="Tilføj bruger:",qa="ADVARSEL",Ka="Du har konfliktbegivenhed med nogle mennesker.",Qa="Vigtige datoer",Ja="Se kalender",Za="Se flere datoer",Xa="Der er ingen vigtige datoer at vise.",er="Gå til dag",tr="TILMELDING",nr="Blokeret",ir="Bloker",sr="Mangler tider",ar="Har booket tid",rr="Blokér tiden",or="Deltager ikke",lr="GEM",cr="Arrangør",ur="Deltagere",dr="om",hr="KALENDER",mr="INVITATIONER",pr="De valgte ressourcer er allerede booket",vr="Du har ikke tilladelse til at booke de valgte ressourcer",fr="Kunne ikke oprette begivenhed",gr="ADVARSEL",_r="Du er blevet blokeret fra at kommunikere i Aula. Kontakt institutionens administrator for mere information",Er="Kalenderindkaldelsen kan ikke sendes, da kommunikation til modtageren er blokeret af en administrator. Kontakt institutionens administrator for mere information",Ar="Deltager",Tr="Afventer svar",br="Deltager ikke",Cr="Vil du stadig oprette begivenheden?",kr="Vælg en af mulighederne herunder",yr="Kalendermenu",Ir="Er du sikker på du vil slette begivenheden",Sr="Nej",Dr="Ja",wr="Kalender",Nr="FØDSELSDAGE",Rr="OBS: Du bruger kalenderen på vegne af {0}. Klik her for at komme tilbage til din egen kalender",Or="Samtale",Lr="Vedrører",xr="Du kan kun vælge én gruppe ad gangen",Pr="Du skal vælge nogle datoer for ferie/fri, eller vælge at dit barn kommer i hele perioden",Mr="Mit barn kommer, da vi ikke har planlagt ferie/fri i den periode",Fr="Registrer ferie for ",Ur="Planlægningsassistent",Br="Åbn planlægningsassistenten",Vr="Tilføj deltager",Wr="Du k
1an kun se kalenderen for 40 inviterede",Gr="Vælg institution",Hr="Vælg afdelinger",jr="Vælg grupper",Yr="Skriv her",$r="Vis mindre note",zr="Vis mindre note",qr="Vis liste over børn",Kr="Skjul børn",Qr="Fjern råderet",Jr="vælge et mødetidspunkt"},446:function(e,t,n){"use strict";var i=n(1),s=n.n(i),a=n(6),r=n(0),o=n(37),l=n(5),c=n.n(l),u=Object.freeze({IS_COMING:"is_coming",IS_NOT_COMING:"is_not_coming",PENDING_ANSWER:"pending_answer"}),d=n(10);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p={props:{responseStatus:{type:String,default:""},showInModal:{type:Boolean,default:!1},children:{type:Array,default:function(){return[]}}},data:function(){return{isChildrenShown:!1}},computed:m(m({},Object(a.c)({isMobile:r.a.GET_IS_MOBILE,hasPermissionInstitution:r.a.HAS_PERMISSION_ON_INSTITUTION,activeEvent:r.a.GET_CURRENT_EVENT})),{},{canEditVacationRequest:function(){return this.activeEvent&&this.hasPermissionInstitution(d.a.EDIT_PRESENCE_TEMPLATES,this.activeEvent.institutionCode)}}),methods:{openVacationResponse:function(e){this.$emit("openVacationResponseForChild",e)}}},v=n(3),f=Object(v.a)(p,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vacation-status"},[n("div",{staticClass:"status",class:{header:e.showInModal}},[e._v("\n    "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_RESPONSE_"+e.responseStatus.toUpperCase()))+"\n    "),e.showInModal?e._e():[e._v("\n      : "+e._s(e.children.length)+"\n      "+e._s(1==e.children.length?e.$getText("SMALL_CHILD"):e.$getText("SMALL_CHILDREN"))+"\n    ")],e._v(" "),!e.isMobile&&e.children.length>0?n("b-btn",{staticClass:"show-more",attrs:{variant:"link","aria-label":e.isChildrenShown?e.$getText("ARIA_LABEL_VACATION_REQUEST_SHOW_LIST_CHILDREN"):e.$getText("ARIA_LABEL_VACATION_REQUEST_HIDE_CHILDREN")},on:{click:function(t){e.isChildrenShown=!e.isChildrenShown}}},[e.isChildrenShown?n("i",{staticClass:"icon icon-Aula_up-arrow"}):n("i",{staticClass:"icon icon-Aula_down-arrow"})]):e._e()],2),e._v(" "),!e.isMobile&&e.isChildrenShown||e.showInModal?n("ul",{staticClass:"vacation-children"},e._l(e.children,(function(t,i){return n("li",{key:i},[n("a",{class:{disabled:!e.canEditVacationRequest},attrs:{role:"button"},on:{click:function(n){return n.preventDefault(),e.openVacationResponse(t)}}},[e._v("\n        "+e._s(e.$getProfileDisplayName(t.child))+"\n      ")])])})),0):e._e()])}),[],!1,null,"db8cadda",null).exports,g=n(65),_=n(21),E=n(67);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b={props:{vacationDay:{type:Object,default:function(){}},openingHour:{type:Object,default:function(){}}},data:function(){return{vacationResponseStatus:u,isChildrenComingShown:!1,isChildrenNotComingShown:!1,isChildrenDependShown:!1,showDayResponseStatus:null}},computed:T(T({},Object(a.c)({isMobile:r.a.GET_IS_MOBILE})),{},{isCloseDay:function(){return this.openingHour&&this.openingHour.type===g.a.CLOSE_OPEN_HOURS},formattedVacationDate:function(){return E.a.upperFirst(_.a.longDate(this.vacationDay.date,!0))}}),methods:{viewDayResponseStatus:function(){this.$refs.dayResponseStatus.show()},getChildrenByStatus:function(e){return this.vacationDay.children.filter((function(t){return t.status==e}))},openVacationRequest:function(e){this.$emit("openVacationResponseForChild",e)},getClosedDayString:function(){return this.$getText("PRESENCE_VACATION_CLOSED_DAYS_NAME_CLOSED_PLACEHOLDER")+" "+this.openingHour.name}},components:{ChildrenByResponseStatus:f}},C=b,k=Object(v.a)(C,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vacation-date"},[n("div",{staticClass:"vacation-day"},[e._v("\n    "+e._s(e.formattedVacationDate)+"\n    "),e.isMobile?n("b-btn",{staticClass:"view-detail",attrs:{variant:"link"}
1,on:{click:e.viewDayResponseStatus}},[n("i",{staticClass:"icon icon-Aula_forward-arrow"})]):e._e()],1),e._v(" "),e.isCloseDay?n("div",{staticClass:"close-day"},[e._v("\n    "+e._s(e.getClosedDayString())+"\n  ")]):n("div",[n("children-by-response-status",{attrs:{"response-status":e.vacationResponseStatus.IS_COMING,children:e.getChildrenByStatus(e.vacationResponseStatus.IS_COMING)},on:{openVacationResponseForChild:e.openVacationRequest}}),e._v(" "),n("children-by-response-status",{attrs:{"response-status":e.vacationResponseStatus.IS_NOT_COMING,children:e.getChildrenByStatus(e.vacationResponseStatus.IS_NOT_COMING)},on:{openVacationResponseForChild:e.openVacationRequest}}),e._v(" "),n("children-by-response-status",{attrs:{"response-status":e.vacationResponseStatus.PENDING_ANSWER,children:e.getChildrenByStatus(e.vacationResponseStatus.PENDING_ANSWER)},on:{openVacationResponseForChild:e.openVacationRequest}})],1),e._v(" "),n("aula-modal",{ref:"dayResponseStatus",attrs:{"css-class":"day-response-status","header-text":e.formattedVacationDate,"header-text-from-textkey":!1,"show-cancel":!1},on:{okClicked:function(t){return e.$refs.dayResponseStatus.hide()}}},[n("div",{staticClass:"statistics"}),e._v(" "),n("children-by-response-status",{attrs:{"response-status":e.vacationResponseStatus.IS_COMING,"show-in-modal":!0,children:e.getChildrenByStatus(e.vacationResponseStatus.IS_COMING)},on:{openVacationResponseForChild:e.openVacationRequest}}),e._v(" "),n("children-by-response-status",{attrs:{"response-status":e.vacationResponseStatus.IS_NOT_COMING,"show-in-modal":!0,children:e.getChildrenByStatus(e.vacationResponseStatus.IS_NOT_COMING)},on:{openVacationResponseForChild:e.openVacationRequest}}),e._v(" "),n("children-by-response-status",{attrs:{"response-status":e.vacationResponseStatus.PENDING_ANSWER,"show-in-modal":!0,children:e.getChildrenByStatus(e.vacationResponseStatus.PENDING_ANSWER)},on:{openVacationResponseForChild:e.openVacationRequest}})],1)],1)}),[],!1,null,"139843f8",null).exports,y=n(468),I=n(61),S=n(20),D=n(15),w={components:{Icon:S.a,IconContainer:I.a},computed:{iconClassEnum:()=>D.a}},N=Object(v.a)(w,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"headline-alert headline-alert-variables",attrs:{role:"alert","aria-live":"polite"}},[n("IconContainer",{staticClass:"mr-2"},[n("Icon",{attrs:{name:e.iconClassEnum.EXCLAMATION_SIGN}}
1)],1),e._v(" "),e._t("default")],2)}),[],!1,null,"6df00c48",null).exports,R=n(23),O=n(34),L=n(350),x=n(13);function P(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B={components:{HeadlineAlert:N,CalendarEventSendReminder:y.a,VacationResponseStatusByDay:k},props:{vacationRequest:{type:Object,required:!1,default:function(){return null}}},data:function(){return{moment:c.a,isLoading:!1,isLoadingDetails:!0,showAllPendingAnswers:!1,showAllNoteToGuardian:!1,isResponseStatusLoading:!0,filteringGroups:[],filteringDepartments:[],filteringResponse:{departmentId:"all",departmentName:null,groupId:"all",groupName:null},openingHours:[]}},computed:U(U({},Object(a.c)({vacationRequestResponses:r.a.GET_VACATION_REQUEST_RESPONSES,activeEvent:r.a.GET_CURRENT_EVENT,isMobile:r.a.GET_IS_MOBILE,institutions:r.a.GET_INSTITUTIONS,activeInstitutions:r.a.GET_ACTIVE_INSTITUTIONS,hasPermissionOnInstitution:r.a.HAS_PERMISSION_ON_INSTITUTION,generalOpenHours:r.a.GET_GENERAL_OPENING_HOURS_FOR_GUARDIAN,specificOpenHours:r.a.GET_PRESENCE_OPEN_HOURS_GUARDIAN_DASHBOARD})),{},{userProfileStore:function(){return Object(x.a)()},profile:function(){return this.userProfileStore.institutionProfile},eventData:function(){return new L.a(this.activeEvent,null)},lastReminderDateTime:function(){var e;return null!==(e=this.activeEvent)&&void 0!==e&&e.lastReminderDateTime?Object(R.e)(this.activeEvent.lastReminderDateTime,O.a.LONG_DATE_TIME_WITH_DATE_PREFIX):null},canHandleVacationRequests:function(){return this.activeEvent&&this.hasPermissionOnInstitution(d.a.HANDLE_VACATION_REQUESTS,this.activeEvent.institutionCode)},canEditVacationRequest:function(){return this.activeEvent&&this.hasPermissionOnInstitution(d.a.EDIT_PRESENCE_TEMPLATES,this.activeEvent.institutionCode)}}),mounted:function(){var e=this;this.getVacationRequestDetail().then((function(){e.initial(),e.reloadResponseStatus(),e.loadPresenceConfiguration({institutionCode:e.activeEvent.institutionCode})}))},methods:U(U({},Object(a.b)({deleteNotifications:r.a.DELETE_NOTIFICATIONS,deleteVacationRequest:r.a.DELETE_EVENT,loadVacationRequestResponses:r.a.LOAD_VACATION_REQUEST_RESPONSES,getEventById:r.a.GET_EVENT_BY_ID,loadVacationResponseForChild:r.a.LOAD_VACATION_REQUEST_RESPONSE,loadPresenceConfiguration:r.a.LOAD_PRESENCE_CONFIGURATION,loadOpenHours:r.a.LOAD_PRESENCE_OPEN_HOURS_GUARDIAN_DASHBOARD})),{},{getOpenHour:function(e){return this.openingHours.find((function(t){return Object(R.p)(t.date,e)}))},onVacationResponse:function(e){var t=[u.IS_COMING,u.IS_NOT_COMING],n=e.vacationRegistrationResponseId,i=t.includes(e.status),s=e;e.child&&(s=e.child),this.$emit("showChildVacationRequest",{child:s,hasAnswered:i,registrationResponseId:n})},handleDeleteClick:function(){this.$refs.deleteModal.show()},setSelectedDepartment:function(e){if(this.filteringResponse.departmentId=e,"all"!==e){var t=this.filteringDepartments.find((function(t){return t.id===e}));t&&(this.filteringResponse.departmentName=t.name)}},changeFilteringGroupOnMobile:function(e,t){this.setSelectedDepartment(t),this.filteringResponse.groupId=e;var n=this.getFilteringGroupsByDepartmentId(t).find((function(t){return t.id===e}));n&&(this.filteringResponse.groupName=n.name),this.reloadResponseStatus()},changeFilteringGroup:function(e){if(this.filteringResponse.groupId=e,"all"!==e){var t=this.filteringGroups.find((function(t){return t.id===e}));t&&(this.filteringResponse.groupName=t.name)}this.reloadResponseStatus()},changeFilteringDepartment:function(e){this.setSelectedDepartment(e),this.filteringResponse.groupId="all",this.setFilteringGroups(e),this.reloadResponseStatus()},getVacationRequestDetail:function(){var e,t=this,n=this.$route.params.id||(null===(e=this.vacationRequest)||void 0===e?void 0:e.vacationRegistrationId);return this.isLoadingDetails=!0,this.getEventById({eventId:n}).then((function(){t.loadOpenHours({startDate:t.activeEvent.startDateTime,endDate:t.activeEvent.endD
1ateTime,institutionCodes:[t.activeEvent.institutionCode]}).then((function(){t.openingHours=t.specificOpenHours.openingHoursOverviewDto.flatMap((function(e){return e.openingHoursDto})),t.isLoadingDetails=!1}))}))},reloadResponseStatus:function(){var e,t=this,n={vacationRequestId:this.$route.params.id||(null===(e=this.vacationRequest)||void 0===e?void 0:e.vacationRegistrationId),filterDepartmentGroupIds:"all"!==this.filteringResponse.departmentId?[this.filteringResponse.departmentId]:this.activeEvent.vacationRegistration.departments.map((function(e){return e.mainGroup.id})),filterDepartmentFilteringGroupIds:"all"!==this.filteringResponse.groupId?[this.filteringResponse.groupId]:null};this.isResponseStatusLoading=!0,this.loadVacationRequestResponses(n).then((function(){t.isResponseStatusLoading=!1}))},getFilteringGroupsByDepartmentId:function(e){var t=[],n=this.activeEvent.vacationRegistration.departments.find((function(t){return t.mainGroup.id===e}));return n&&(t=n.filteringGroups),t},setFilteringDepartments:function(){this.filteringDepartments=null!=this.activeEvent.vacationRegistration&&null!=this.activeEvent.vacationRegistration.departments?this.activeEvent.vacationRegistration.departments.map((function(e){return e.mainGroup})):[]},setFilteringGroups:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=[],i=null;"all"!==t?i=this.activeEvent.vacationRegistration.departments.find((function(e){return e.mainGroup.id===t})):1===this.activeEvent.vacationRegistration.departments.length&&(i=this.activeEvent.vacationRegistration.departments[0]),null!=i&&(n=i.filteringGroups),n=null===(e=n)||void 0===e?void 0:e.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})),this.filteringGroups=n},closeVacationRequestDetail:function(){-1!==this.$route.path.indexOf("kalender")?this.$router.push({name:"calendar"}):this.$emit("onClosed")},getVacationRequestGroups:function(){var e=[];if(null!=this.activeEvent.vacationRegistration&&this.activeEvent.vacationRegistration.departments){var t,n=P(this.activeEvent.vacationRegistration.departments);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(null!=i.filteringGroups){var s=i.filteringGroups.filter((function(t){return null==e.find((function(e){return e.id===t.id}))}));e=e.concat(s.map((function(e){return{id:e.id,name:e.name}})))}}}catch(e){n.e(e)}finally{n.f()}}return e.map((function(e){return e.name})).join(", ")},confirmDelete:function(){var e=this;this.isLoading=!0,this.deleteVacationRequest({eventForm:{id:this.activeEvent.id},type:o.a.VACATION_REGISTRATION}).then((function(){e.isLoading=!1,e.$emit("reloadCalendar"),e.closeVacationRequestDetail()}))},initial:function(){this.filteringResponse.departmentId="all",this.filteringResponse.departmentName="",this.filteringResponse.groupId="all",this.filteringResponse.groupName="",this.setFilteringDepartments(),this.setFilteringGroups("all")}})},V=B,W=Object(v.a)(V,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vacation-request-details",attrs:{"data-testid":"vacation-request-details"}},[e.lastReminderDateTime?n("HeadlineAlert",{staticClass:"mb-3"},[e._v("\n    "+e._s(e.$getText("CALENDAR_EVENT_REMINDER_ALERT",{dateTime:e.lastReminderDateTime}))+"\n  ")]):e._e(),e._v(" "),!e.isLoadingDetails&&e.activeEvent.vacationRegistration?n("div",{class:e.isMobile?"p-2":""},[n("b-row",{staticClass:"mt-2"},[n("b-col",{attrs:{cols:"4",sm:"3",lg:"2"}},[n("strong",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_PERIOD_1")))])]),e._v(" "),n("b-col",[e._v("\n        "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_PERIOD_2"))+"\n        "+e._s(e.moment(e.activeEvent.startDateTime).utc().format("DD-MM-YYYY"))+"\n        "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_PERIOD_3"))+"\n        "+e._s(e.moment(e.activeEvent.endDateTime).utc().format("DD-MM-YYYY"))+"\n      ")])],1),e._v(" "),e.activeEvent.responseDeadline?n("b-row",{staticClass:"mt-2"},[n("b-col",{attrs:{cols:"4",sm:"3",lg:"2"}},[n("strong",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_REQUEST_DEADLINE"))+":")])]),e._v(" "),n("b-col",[e._v("\n        "+e._s(e.moment(e.activeEvent.responseDeadline).utc().format("DD-MM-YYYY"))+"\n      ")])],1):e._e(
1),e._v(" "),n("b-row",{staticClass:"mt-2"},[n("b-col",{attrs:{cols:"4",sm:"3",lg:"2"}},[n("strong",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_CREATOR")))])]),e._v(" "),n("b-col",[e._v("\n        "+e._s(e.$getProfileDisplayName(e.activeEvent.creator))+"\n      ")])],1),e._v(" "),n("b-row",{staticClass:"mt-2"},[n("b-col",{attrs:{cols:"4",sm:"3",lg:"2"}},[n("strong",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_INSTITUTION")))])]),e._v(" "),n("b-col",[e._v("\n        "+e._s(e.activeEvent.institutionName)+"\n      ")])],1),e._v(" "),n("b-row",{staticClass:"mt-2"},[n("b-col",{attrs:{cols:"4",sm:"3",lg:"2"}},[n("strong",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_DEPARTMENTS")))])]),e._v(" "),n("b-col",[e._v("\n        "+e._s(e.activeEvent.vacationRegistration.departments.map((function(e){return e.mainGroup.name+" ("+e.mainGroup.institutionName+")"})).join(", "))+"\n      ")])],1),e._v(" "),n("b-row",{staticClass:"mt-2"},[n("b-col",{attrs:{cols:"4",sm:"3",lg:"2"}},[n("strong",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_GROUPS")))])]),e._v(" "),n("b-col",[e._v("\n        "+e._s(e.getVacationRequestGroups())+"\n      ")])],1),e._v(" "),n("b-row",{staticClass:"mt-2"},[n("b-col",{attrs:{cols:"4",sm:"3",lg:"2"}},[n("strong",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_MISSING_ANSWER")))])]),e._v(" "),n("b-col",[e._l(e.activeEvent.vacationRegistration.childrenPendingAnswers,(function(t,i){return[i<2||e.showAllPendingAnswers?[n("a",{key:i,class:{disabled:!e.canEditVacationRequest},attrs:{role:"button"},on:{click:function(n){return e.onVacationResponse(t)}}},[e._v("\n              "+e._s(e.$getProfileDisplayName(t))+"\n            ")]),e._v(" "),i<1||e.showAllPendingAnswers&&i<e.activeEvent.vacationRegistration.childrenPendingAnswers.length-1?[e._v("\n              ,\n            ")]:e._e()]:e._e()]})),e._v(" "),e.activeEvent.vacationRegistration.childrenPendingAnswers.length-2>0&&!e.showAllPendingAnswers?n("b-btn",{staticClass:"show-more-pending-answers",attrs:{variant:"link","aria-label":e.$getText("ARIA_LABEL_VACATION_REQUEST_SEE_ALL_PENDING")},on:{click:function(t){e.showAllPendingAnswers=!0}}},[e._v("\n          +\n          "+e._s(e.activeEvent.vacationRegistration.childrenPendingAnswers.length-2)+"\n          "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_OTHERS"))+"\n        ")]):e._e(),e._v(" "),e.showAllPendingAnswers?n("b-btn",{staticClass:"show-more-pending-answers",attrs:{variant:"link","aria-label":e.$getText("ARIA_LABEL_VACATION_REQUEST_SEE_LESS_PENDING")},on:{click:function(t){e.showAllPendingAnswers=!1}}},[n("i",{staticClass:"icon icon-Aula_up-arrow"})]):e._e(),e._v(" "),n("div",{staticClass:"send-reminder-container"},[n("CalendarEventSendReminder",{attrs:{"event-data":e.eventData},on:{reminderSent:e.getVacationRequestDetail}})],1)],2)],1),e._v(" "),n("b-row",{staticClass:"mt-2"},[n("b-col",{attrs:{cols:"4",sm:"3",lg:"2"}},[n("strong",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_NOTE")))])]),e._v(" "),n("b-col",[null!=e.activeEvent.description&&e.activeEvent.description.html.length>0?[e.activeEvent.description.html.length<100?[e._v("\n            "+e._s(e.activeEvent.description.html)+"\n          ")]:[e.showAllNoteToGuardian?[e._v("\n              "+e._s(e.activeEvent.description.html)+"\n            ")]:[e._v(" "+e._s(e.activeEvent.description.html.substr(0,100))+"... ")],e._v(" "),n("b-btn",{staticClass:"show-more-pending-answers",attrs:{variant:"link","aria-label":e.showAllNoteToGuardian?e.$getText("ARIA_LABEL_VACATION_REQUEST_SEE_LESS_NOTE"):e.$getText("ARIA_LABEL_VACATION_REQUEST_SEE_FULL_NOTE")},on:{click:function(t){e.showAllNoteToGuardian=!e.showAllNoteToGuardian}}},[e.showAllNoteToGuardian?n("i",{staticClass:"icon icon-Aula_up-arrow"}):n("i",{staticClass:"icon icon-Aula_down-arrow"})])]]:e._e()],2)],1),e._v(" "),e.isMobile?e._e():n("hr")],1):e._e(),e._v(" "),n("b-row",[e.isLoadingDetails?e._e():n("b-col",{staticClass:"filter-responses"},[e.isMobile?n("div",{staticClass:"filtering-department-group"},[e._v("\n        "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_RESPONSE_FILTER"))+"\n        "),n("b-dropdown",{ref:"sorter",staticClass:"dropdown-select filter-sorter mr-1"},[n("template",{slot:"button-content"},["all"===e.filteringResponse.departmentId?[e._v("\n              "+e._s(e.$getText("ALL"))+"\n            ")]:[e._v("\n              "+e._s(e.filteringResponse.departmentName)+"\n              "),"all"!==e.filteringResponse.groupId?[e._v(" - "+e._s(e.filteringResponse.groupName))]:e._e()],e._v(" "),n("i",{staticClass:"icon icon-Aula_down-arrow",attrs:{"aria-hidden":"true"}})],2),e._v(" "),n("b-dropdown-item",{key:"all",attrs:{active:"all"===e.filteringResponse.departmentId},on:{click:function(t){return e.changeFilteringDepartment("all")}}},[e._v("\n            "+e._s(e.$getText("ALL"))+"\n          ")]),e._v(" "),e._l(e.filteringDepartments,(function(t,i){return[n("b-dropdown-item",{key:i,staticClass:"department",attrs:{active:e.filteringResponse.departmentId===t.id},on:{click:function(n){return e.changeFilteringDepartment(t.id)}}},[e._v("\n              "+e._s(t.name)+"\n            ")]),e._v(" "),e._l(e.getFilteringGroupsByDepartmentId(t.id),(function(s,a){return[n("b-dropdown-item",{key:"group"+i+"-"+a,staticClass:"group",attrs:{active:e.filteringResponse.departmentId===t.id&&e.filteringResponse.groupId===s.id},on:{click:function(n){return e.changeFilteringGroupOnMobile(s.id,t.id)}}},[e._v("\n                "+e._s(s.name)+"\n              ")])]}))]}))],2)],1):n("div",{staticClass:"filtering-department-group"},[e.filteringDepartments.length>1?[e._v("\n          "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_RESPONSE_FILTERING_DEPARTMENT"))+"\n          "),e.filteringDepartments.length>1?n("b-dropdown",{ref:"sorter",staticClass:"dropdown-select filter-sorter mr-1"},[n("template",{slot:"button-content"},["all"===e.filteringResponse.departmentId?[e._v("\n                "+e._s(e.$getText("ALL"))+"\n              ")]:[e._v("\n                "+e._s(e.filteringResponse.departmentName)+"\n              ")],e._v(" "),n("i",{staticClass:"icon icon-Aula_down-arrow",attrs:{"aria-hidden":"true"}})],2),e._v(" "),n("b-dropdown-item",{key:"all",attrs:{active:"all"===e.filteringResponse.departmentId},on:{click:function(t){return e.changeFilteringDepartment("all")}}},[e._v("\n              "+e._s(e.$getText("ALL"))+"\n            ")]),e._v(" "),e._l(e.filteringDepartments,(function(t,i){return[n("b-dropdown-item",{key:i,attrs:{active:e.filteringResponse.departmentId===t.id},on:{click:function(n){return e.changeFilteringDepartment(t.id)}}},[e._v("\n                "+e._s(t.name)+"\n              ")])]}))],2):e._e()]:e._e(),e._v("\n        "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_RESPONSE_FILTERING_GROUP"))+"\n        "),n("b-dropdown",{ref:"sorter",staticClass:"dropdown-select filter-sorter mr-1"},[n("template",{slot:"button-content"},["all"===e.filteringResponse.groupId?[e._v("\n              "+e._s(e.$getText("ALL"))+"\n            ")]:[e._v("\n              "+e._s(e.filteringResponse.groupName)+"\n            ")],e._v(" "),n("i",{staticClass:"icon icon-Aula_down-arrow",attrs:{"aria-hidden":"true"}})],2),e._v(" "),n("b-dropdown-item",{key:"all",attrs:{active:"all"===e.filteringResponse.groupId},on:{click:function(t){return e.changeFilteringGroup("all")}}},[e._v("\n            "+e._s(e.$getText("ALL"))+"\n          ")]),e._v(" "),e._l(e.filteringGroups,
1(function(t,i){return[n("b-dropdown-item",{key:"group"+i,attrs:{active:e.filteringResponse.groupId===t.id},on:{click:function(n){return e.changeFilteringGroup(t.id)}}},[e._v("\n              "+e._s(t.name)+"\n            ")])]}))],2)],2)])],1),e._v(" "),e.isResponseStatusLoading?n("aula-spinner"):n("b-row",e._l(e.vacationRequestResponses,(function(t,i){return n("b-col",{key:i,staticClass:"week-overview",attrs:{cols:"12",md:1===e.vacationRequestResponses.length?"12":"6"}},[n("div",{staticClass:"week-header"},[e._v("\n        "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_WEEK"))+"\n        "+e._s(t.weekNumber)+"\n      ")]),e._v(" "),n("div",{staticClass:"week-days p-2"},e._l(t.vacationDays,(function(t,i){return n("vacation-response-status-by-day",{key:i,attrs:{"vacation-day":t,"opening-hour":e.getOpenHour(t.date)},on:{openVacationResponseForChild:e.onVacationResponse}})})),1)])})),1),e._v(" "),e.isMobile?e._e():[n("aula-form-footer",{attrs:{"submit-text":"BUTTON_CLOSE","delete-text":"CALENDAR_VACATION_REQUEST_DELETE","is-loading":!1,"show-cancel":!1,"show-delete":e.canHandleVacationRequests&&!e.isLoadingDetails,"show-delete-mobile":e.canHandleVacationRequests,"show-delete-icon":e.canHandleVacationRequests},on:{submitClicked:e.closeVacationRequestDetail,deleteClicked:e.handleDeleteClick}})],e._v(" "),n("aula-modal",{ref:"deleteModal",attrs:{"ok-text":"YES"},on:{cancelClicked:function(t){return e.$refs.deleteModal.hide()},okClicked:function(t){return e.confirmDelete()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_DELETE_VACATION_REGISTRATION_TEXT"))+"\n  ")])],2)}),[],!1,null,"29d08591",null);t.a=W.exports},447:function(e,t,n){"use strict";var i=n(1),s=n.n(i),a=n(6),r=n(0),o=n(5),l=n.n(o),c=n(451),u=n(36),d=n(63),h=n(30),m=n(8),p=n(24),v=n(16),f=n.n(v),g=n(321),_=n(474),E=n(102),A={components:{CalendarViewEvent:n(328).a,ContactAvatar:E.a,FullCalendar:g.a},props:{resources:{type:Array,required:!0},eventSources:{type:Function,required:!0}},emits:["datesSet"],computed:{options(){return{schedulerLicenseKey:"0076219922-fcs-1735791579",locale:"da",initialView:"resourceTimeGridDay",plugins:[_.a],nowIndicator:!0,nowIndicatorContent:"",weekends:!0,weekNumbers:!1,allDayText:"",titleFormat:{month:"long",day:"2-digit",year:"numeric"},slotLabelFormat:{hour:"2-digit",minute:"2-digit"},slotEventOverlap:!1,slotMinWidth:30,dayMaxEvents:2,moreLinkText:this.$t("button.more"),dayHeaderFormat:{month:"long",day:"2-digit",year:"numeric"},buttonText:{today:this.$t("calendar.today")},headerToolbar:{left:"today title prev,next",end:""},slotMinTime:"08:00:00",slotMaxTime:"18:00:00",contentHeight:"auto",resources:this.resources,eventSources:this.eventSources,datesSet:this.emitDatesSet}}},methods:{getApi(){return this.$refs.calendar.getApi()},getAvatarProfileFromResource:e=>Object.assign(Object.assign({},e.extendedProps),{id:parseInt(e.extendedProps.singleId)}),emitDatesSet(e){this.$emit("datesSet",e)}}},T=n(3),b=Object(T.a)(A,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("FullCalendar",{ref:"calendar",attrs:{options:e.options},scopedSlots:e._u([{key:"eventContent",fn:function(e){var t=e.event;return[n("CalendarViewEvent",{attrs:{"event-model":t}})]}},{key:"resourceLabelContent",fn:function(t){var i=t.resource;return[n("ContactAvatar",{staticClass:"calendar-resource",attrs:{profile:e.getAvatarProfileFromResource(i)}})]}}])})}),[],!1,null,"656e0434",null).exports,C=n(21),k=n(13);function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?S(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w={components:{DailyOverviewCalendarView:b,"important-date-overview":c.a},props:{isAside:{type:Boolean,default:!0}},data:function(){return{calendar:null,weekNumber:l()().isoWeek(),moment:l.a,moduleWidgetPlacements:d.a,moduleTypes:h.a,isLoading:!1}},computed:D(D({},Object(a.c)({events:r.a.GET_EVENTS,institutions:r.a.GET_INSTITUTIONS,activeInstitutions:r.a.GET_ACTIVE_INSTITUTIONS,children:r.a.GET_CHILDREN,activeChildren:r.a.GET_ACTIVE_CHILDREN,menuItems:r.a.GET_MENU_ITEMS,isMobile:r.a.GET_IS_MOBILE,activeGroupHome:r.a.GET_ACTIVE_GROUP_HOME})),{},{userProfileStore:function(){return Object(k.a)()},profile:function(){return this.userProfileStore.institutionProfile},isProfileLoaded:function(){return!1===this.userProfileStore.isLoading},defaultProfile:function(){return{role:this.profile.role,
1id:this.profile.id}},resources:function(){var e=this,t=[];if([m.a.GUARDIAN,m.a.OTP].indexOf(this.profile.role)>-1){var n,i=y(this.children);try{var s=function(){var i=n.value;if(e.activeChildren.includes(i.id)&&0==t.filter((function(e){return e.profileId==i.profileId})).length){var s={id:p.a.PROFILE.toLowerCase()+"-"+i.id,singleId:i.id,title:i.name,type:p.a.PROFILE.toLowerCase(),eventClassName:i.id,shortName:i.shortName,profileId:i.profileId,profilePicture:i.profilePicture};t.push(s)}};for(i.s();!(n=i.n()).done;)s()}catch(e){i.e(e)}finally{i.f()}}else t=[{id:p.a.PROFILE.toLowerCase()+"-"+this.profile.id,singleId:this.profile.id,type:p.a.PROFILE.toLowerCase(),title:this.profile.firstName+" "+this.profile.lastName,shortName:this.profile.shortName,eventClassName:this.profile.id,profilePicture:this.profile.profilePicture,profileId:this.profile.profileId}];return t}}),methods:D(D({},Object(a.b)({loadEventsByProfileId:r.a.LOAD_EVENTS_BY_PROFILEID,loadEventByGroupHome:r.a.LOAD_EVENTS_BY_GROUPHOME,clearEvents:r.a.CLEAR_EVENTS})),{},{handleDatesSet:function(e){this.weekNumber=C.a.formatDate(e.start,"W")},showCalendarOverview:function(){this.isMobile||(f()(".daily-overview").removeClass("daily-close"),f()(".daily-overview").addClass("daily-open"))},shouldHideCalendarOverview:function(e){return!this.isMobile&&(null==e||!(this.isChildOfFullcalendarToolbar(e.target)||this.isChildOfCalendarOverivew(e.target)))},isChildOfFullcalendarToolbar:function(e){return this.isChildOfNodeWithClass(e,"fc-left")},isChildOfCalendarOverivew:function(e){return this.$el.contains(e)},isChildOfNodeWithClass:function(e,t){for(var n=e;null!=n;){if(null!=n.classList&&n.classList.contains(t))return!0;n=n.parentNode}return!1},hideCalendarOverview:function(e){this.shouldHideCalendarOverview(e)&&(f()(".daily-overview").removeClass("daily-open"),f()(".daily-overview").addClass("daily-close"))},calculateResourcesAndEvents:function(){var e,t=this,n=[],i=y(this.events);try{var s=function(){var i=e.value;if(i.startEditable=!1,null!=i.resourceIds&&t.resources.filter((function(e){return i.resourceIds.includes(String(e.id))})).length>0&&!i.type.includes("sum-")){var s,a=y(i.resourceIds);try{for(a.s();!(s=a.n()).done;){var r=s.value;n.push(D(D({},i),{},{resourceIds:[r],parentId:r}))}}catch(e){a.e(e)}finally{a.f()}}};for(i.s();!(e=i.n()).done;)s()}catch(e){i.e(e)}finally{i.f()}return n},fetchEvents:function(e,t){var n=this;if(this.isLoading=!0,this.profile.role===m.a.OTP){if(null==this.activeGroupHome)return Promise.resolve([]);var i=this.activeChildren.map((function(e){return{regardingChildId:e,groupHomeId:n.activeGroupHome.id}})),s=[this.defaultProfile.id];[m.a.OTP,m.a.GUARDIAN].indexOf(this.defaultProfile.role)>-1&&(s=s.concat(this.activeChildren));var a={groupHomeChildPairs:i,start:l()(e.start),end:l()(e.end),instProfileIds:s};this.loadEventByGroupHome(a).then((function(){t(n.calculateResourcesAndEvents()),n.isLoading=!1}))}else{var r,o=[],c=y(this.institutions.filter((function(e){return n.activeInstitutions.includes(e.institutionCode)})));try{var u=function(){var e=r.value;0==o.filter((function(t){return t==e.institutionProfileId})).length&&o.push(e.institutionProfileId)};for(c.s();!(r=c.n()).done;)u()}catch(e){c.e(e)}finally{c.f()}this.profile.role===m.a.GUARDIAN&&(o=o.concat(this.children.map((function(e){return e.id})))),this.clearEvents(),this.loadEventsByProfileId({instProfileIds:o,start:l()(e.start),end:l()(e.end)}).then((function(){t(n.calculateResourcesAndEvents()),n.isLoading=!1}))}},goToCalendar:function(){var e=l()(this.calendar.getDate()).format("YYYY-MM-DD");u.a.Create("calendarDate",e),this.$router.push({name:"calendar"})},init:function(){var e=this;this.isProfileLoaded&&this.$nextTick((function(){e.clearEvents(),e.calendar=e.$refs.fullCalendar.getApi()})),u.a.Read("initialLogin")||(this.showCalendarOverview(),u.a.Create("initialLogin",!0),setTimeout((function(){e.hideCalendarOverview()}),5e3))}}),watch:{activeInstitutions:function(){null!=this.calendar&&(this.clearEvents(),null!=this.calendar&&this.calendar.refetchEvents())},isProfileLoaded:function(){this.init()}},mounted:function(){this.init()}},N=Object(T.a)(w,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.hideCalendarOverview,expression:"hideCalendarOverview"}],staticClass:"aula-calendar daily-overview",class:{mobile:!e.isAside,"daily-close":e.isAside},attrs:{"data-testid":"daily-overview","data-loading":e.isLoading,tabindex:"0"},on:{click:e.showCalendarOverview,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.showCalendarOverview.apply(null,arguments)},focus:e.showCalendarOverview}},[n("div",{staticClass:"week-number"},[e._v("\n    "+e._s(e.$t("label.week_number",{number:e.weekNumber}))+"\n  ")]),e._v(" "),e.isProfileLoaded?n("DailyOverviewCalendarView",{ref:"fullCalendar",attrs:{"event-sources":e.fetchEvents,resources:e.resources},on:{datesSet:e.handleDatesSet}}
1):e._e(),e._v(" "),e.isMobile?e._e():n("b-btn",{staticClass:"daily-overview-close",attrs:{variant:"link","aria-label":e.$getText("ARIA_LABEL_CLOSE_CALENDAR")},on:{click:function(t){return t.stopPropagation(),e.hideCalendarOverview()}}},[n("i",{staticClass:"icon-Aula_close",attrs:{"aria-hidden":"true"}})]),e._v(" "),n("b-button",{class:e.isMobile?"":"pull-right",attrs:{variant:"link",size:"sm"},on:{click:e.goToCalendar}},[e._v("\n    "+e._s(e.$getText("DAILY_OVERVIEW_SEE_CALENDAR"))),n("i",{staticClass:"icon-Aula_forward-arrow"})]),e._v(" "),e.isAside?n("important-date-overview",{on:{showCalendarOverview:e.showCalendarOverview,hideCalendarOverview:e.hideCalendarOverview}}):e._e()],1)}),[],!1,null,"9db45fac",null);t.a=N.exports},449:function(e,t,n){"use strict";var i={props:{html:{type:String,default:""}},data:function(){return{}},computed:{strippedHtml:function(){return this.html?this.stripTags(this.html):""}},methods:{stripTags:function(e){var t=/^(?:(?:[a-z]+:)?\/\/|mailto:|https?:)/i,n="<a><em><p><div><span><strong><u><ul><ol><li><table><thead><tbody><tr><th><td><br>";return n=(((n||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join(""),e.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,(function(e,t){return n.indexOf("<"+t.toLowerCase()+">")>-1?e:""})).replace(/href="(.*?)"/gi,(function(e,n){return'href="'+(t.test(n.toLowerCase())?n:"javascript:void(0);")+'"'})).replace(/src="(.*?)"/gi,(function(e,n){return'src="'+(t.test(n.toLowerCase())?n:"javascript:void(0);")+'"'})).replace(/<[^>]+/g,(function(e){return e.replace(/ on\w+="[^"]*"/gi,"")}))}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("span",{domProps:{innerHTML:e._s(e.strippedHtml)}})}),[],!1,null,"149ae0e1",null);t.a=a.exports},450:function(e,t,n){"use strict";var i=n(1),s=n.n(i),a=n(6),r=n(0),o=n(5),l=n.n(o),c=n(13);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p={data:function(){return{birthdayTitle:"POSTS_ASIDE_BIRTHDAY_BUTTON_TITLE_SEEMORE",isExpandedBirthday:!1,moment:l.a}},computed:m(m({},Object(a.c)({birthdayEvents:r.a.GET_BIRTHDAY_EVENTS,activeInstitutions:r.a.GET_ACTIVE_INSTITUTIONS})),{},{userProfileStore:function(){return Object(c.a)()},profile:function(){return this.userProfileStore.institutionProfile},isProfileLoaded:function(){return!1===this.userProfileStore.isLoading},todayBirthdays:function(){return this.birthdayEvents.filter((function(e){return l()(e.start).isSame(l()(),"day")}))},futureBirthdays:function(){var e,t=this.birthdayEvents.filter((function(e){return l()(e.start).isAfter(l()(),"day")})).sort((function(e,t){return l()(e.start).diff(t.start)})),n=u(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.upComingDays=l()(i.start,"YYYY-MM-DD").diff(l()().startOf("day"),"days",!1)}}catch(e){n.e(e)}finally{n.f()}return t}}),methods:m(m({},Object(a.b)({loadBirthdayEvents:r.a.LOAD_BIRTHDAY_EVENTS})),{},{expandBirthday:function(){this.isExpandedBirthday=!this.isExpandedBirthday,this.birthdayTitle=this.isExpandedBirthday?"POSTS_ASIDE_BIRTHDAY_BUTTON_TITLE_SEEFEWER":"POSTS_ASIDE_BIRTHDAY_BUTTON_TITLE_SEEMORE"},initBirthdayEvents:function(){this.activeInstitutions.length>0&&this.loadBirthdayEvents({start:l()(),end:l()().add(6,"days"),source:"overview",instCodes:this.activeInstitutions})}}),watch:{profile:function(){this.initBirthdayEvents()},activeChildren:function(){this.initBirthdayEvents()},activeInstitutions:function(){this.initBirthdayEvents()}},mounted:function(){this.initBirthdayEvents()}},v=n(3),f=Object(v.a)(p,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.birthdayEvents.length>0?n("div",{staticClass:"shortcuts margin-bottom-40"},[n("div",{staticClass:"birthday-title margin-bottom-10 margin-top"},[e._v("\n    "+e._s(e.$getText("POSTS_ASIDE_BIRTHDAY"))+"\n  ")]),e._v(" "),e.todayBirthdays.length>0?n("div",{staticClass:"margin-bottom-20"},[e._v("\n    "+e._s(e.$getText("POSTS_ASIDE_BIRTHDAY_TODAY"))+"\n  ")]):e._e(
1),e._v(" "),e._l(e.todayBirthdays,(function(t,i){return[e.isExpandedBirthday||i<5?n("div",{key:i,staticClass:"quick-access-item"},[n("div",{staticClass:"text"},[e._v(e._s(t.title)+e._s(e.$getText("POSTS_ASIDE_BIRTHDAY_CONGRATULATION")))])]):e._e()]})),e._v(" "),e.isExpandedBirthday||e.todayBirthdays.length<5?n("div",{staticClass:"margin-bottom-20 margin-top"},[e._v("\n    "+e._s(e.$getText("POSTS_ASIDE_BIRTHDAY_UPCOMMING"))+"\n  ")]):e._e(),e._v(" "),e._l(e.futureBirthdays,(function(t,i){return[e.isExpandedBirthday||e.todayBirthdays.length+i<5?n("div",{key:i,staticClass:"quick-access-item"},[n("div",{staticClass:"text"},[e._v("\n        "+e._s(e.$getText("POSTS_ASIDE_BIRTHDAY_ON"))+"\n        "+e._s(t.upComingDays)+"\n        "+e._s(t.upComingDays>1?e.$getText("POSTS_ASIDE_BIRTHDAY_DAYS_HAS"):e.$getText("POSTS_ASIDE_BIRTHDAY_DAY_HAS"))+"\n        "+e._s(t.title)+"\n        "+e._s(e.$getText("POSTS_ASIDE_BIRTHDAY"))+"\n      ")])]):e._e()]})),e._v(" "),e.birthdayEvents.length>5?n("div",{staticClass:"pull-right margin-top"},[n("b-btn",{attrs:{variant:"link"},on:{click:e.expandBirthday}},[e._v("\n      "+e._s(e.$getText(e.birthdayTitle))+"\n      "),n("i",{staticClass:"small",class:{"icon-Aula_down-arrow":!e.isExpandedBirthday,"icon-Aula_up-arrow":e.isExpandedBirthday}})])],1):e._e()],2):n("div",[e._v(e._s(e.$getText("POSTS_ASIDE_NO_BIRTHDAY_EVENTS")))])}),[],!1,null,"17108d02",null);t.a=f.exports},451:function(e,t,n){"use strict";var i=n(1),s=n.n(i),a=n(6),r=n(5),o=n.n(r),l=n(0),c=n(37),u=n(216),d=n(13),h=n(21);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g={components:{AvatarGroup:u.a},props:{isAside:{type:Boolean,default:!0}},data:function(){return{moment:o.a,eventTypes:c.a,isLoadMore:!1,importantDates:[]}},computed:f(f({},Object(a.c)({children:l.a.GET_CHILDREN,importantDatesResult:l.a.GET_IMPORTANT_DATES})),{},{userProfileStore:function(){return Object(d.a)()},profile:function(){return this.userProfileStore.institutionProfile},isProfileLoaded:function(){return!1===this.userProfileStore.isLoading},importantDatesFiltered:function(){return this.isLoadMore?this.importantDates.slice(0,10):this.importantDates.slice(0,5)},isShowLoadMore:function(){return this.importantDates.length>5}}),methods:f(f({},Object(a.b)({loadImportantDates:l.a.LOAD_IMPORTANT_DATES})),{},{concerningChilds:function(e){var t,n=[],i=m(this.children);try{for(i.s();!(t=i.n()).done;){var s=t.value;e.belongsToProfiles.includes(s.id)&&n.push(s)}}catch(e){i.e(e)}finally{i.f()}return n},loadMoreDates:function(){this.isLoadMore&&this.importantDates.length>5?(this.triggerHideCalendarOverview(),this.$router.push({name:"calendar"})):this.isLoadMore=!0},triggerShowCalendarOverview:function(){this.$emit("showCalendarOverview")},triggerHideCalendarOverview:function(){this.$emit("hideCalendarOverview")},initImportantDates:function(){var e=this,t=h.a.getStartOfTomorrow();this.loadImportantDates({limit:11,startDateTime:t}).then((function(){null!=e.importantDatesResult&&e.importantDatesResult.length>0&&(e.importantDates=e.importantDatesResult.sort((function(e,t){var n=new Date(e.start),i=new Date(t.start);return n>i?1:n<i?-1:0})))}))}}),watch:{isProfileLoaded:function(){this.isProfileLoaded&&this.initImportantDates()}},mounted:function(){this.isProfileLoaded&&this.initImportantDates()}},_=n(3),E=Object(_.a)(g,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"important-date-container",class:{mobile:!e.isAside}},[n("div",{staticClass:"important-date-header"},[n("div",{staticClass:"important-date-icon"},[n("i",{staticClass:"icon-Aula_calendar",attrs:{tabindex:"0",role:"button","aria-label":e.$getText("ARIA_LABEL_IMPORTANT_DATA")},on:{click:e.triggerShowCalendarOverview,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.triggerShowCalendarOverview.apply(null,arguments)}}})]),e._v(" "),n("div",{staticClass:"important-date-title"},[n("span",[e._v(e._s(e.$getText("CALENDAR_IMPORTANT_DATE")))])])]),e._v(" "),n("div",{staticClass:"important-date-body"},[0===e.importantDates.length?n("div",{staticClass:"no-important-dates"},[e._v("\n      "+e._s(e.$getText("CALENDAR_NO_IMPORTANT_DATES"))+"\n    ")]):e._e(
1),e._v(" "),e._l(e.importantDatesFiltered,(function(t,i){return[n("div",{key:i,staticClass:"important-date-row"},[n("div",{staticClass:"important-date-col-month",attrs:{tabindex:"0",role:"button"},on:{click:e.triggerShowCalendarOverview,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.triggerShowCalendarOverview.apply(null,arguments)}}},[n("div",{staticClass:"date"},[e._v("\n            "+e._s(e.moment(t.start).format("DD"))+"\n            "),t.allDay||e.moment(t.start).date()==e.moment(t.end).date()?t.allDay&&e.moment(t.start).utc().date()!=e.moment(t.end).utc().date()?[e._v("\n              - "+e._s(e.moment(t.end).utc().format("DD"))+"\n            ")]:e._e():[e._v("\n              - "+e._s(e.moment(t.end).format("DD"))+"\n            ")]],2),e._v(" "),n("div",{staticClass:"month"},[e._v("\n            "+e._s(e.moment(t.start).format("MMM"))+"\n          ")])]),e._v(" "),n("div",{staticClass:"important-date-col-detail"},[n("div",{staticClass:"description"},[e._v("\n            "+e._s(t.title)+"\n            "),t.type==e.eventTypes.HOLIDAY?[e._v("\n              ("+e._s(e.moment(t.start).format("DD MMMM"))+" - "+e._s(e.moment(t.end).format("DD MMMM"))+")\n            ")]:e._e()],2),e._v(" "),t.allDay?n("div",{staticClass:"from-to"},[e._v("\n            "+e._s(e.$getText("CALENDAR_LABEL_EVENT_ALL_DAY"))+"\n          ")]):n("div",{staticClass:"from-to"},[e._v("\n            "+e._s(e.moment(t.start).format("HH:mm"))+" -\n            "+e._s(e.moment(t.end).format("HH:mm"))+"\n          ")])]),e._v(" "),e.concerningChilds(t).length>0?n("div",{staticClass:"important-date-col-child"},[n("AvatarGroup",{staticClass:"mr-2",attrs:{profiles:e.concerningChilds(t)}})],1):e._e()]),e._v(" "),n("div",{key:"clear"+i,staticClass:"clearfix"})]}))],2),e._v(" "),e.isShowLoadMore?n("div",{staticClass:"important-date-footer pull-right"},[n("b-btn",{attrs:{variant:"link",size:"sm"},on:{click:function(t){return t.stopPropagation(),e.loadMoreDates.apply(null,arguments)}}},[e.isLoadMore?[e._v("\n        "+e._s(e.$getText("CALENDAR_IMPORTANT_DATE_MORE"))+"\n        "),n("i",{staticClass:"icon-Aula_forward-arrow"})]:[e._v("\n        "+e._s(e.$getText("CALENDAR_IMPORTANT_DATE_SEE_MORE"))+"\n        "),n("i",{staticClass:"icon-Aula_forward-arrow"})]],2)],1):e._e()])}),[],!1,null,"0dbe63da",null);t.a=E.exports},452:function(e,t,n){"use strict";var i=n(61),s={components:{Icon:n(20).a,IconContainer:i.a},model:{prop:"selected",event:"change"},props:{options:{type:Array,required:!0},selected:{type:String,default:null},withCheckmark:{type:Boolean,default:!0}},emits:["change"],computed:{},methods:{setSelected(e){this.$emit("change",e)}}},a=n(3),r=Object(a.a)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-btn-group",{staticClass:"button-toggles button-toggles-variables",attrs:{role:"group"}},e._l(e.options,(function(t,i){return n("b-btn",{key:i,attrs:{"aria-selected":t.value===e.selected,"aria-checked":t.value===e.selected,role:"option","data-checkmark":e.withCheckmark,variant:"primary","aria-label":t.ariaLabel||t.label},on:{click:function(n){return e.setSelected(t.value)}}},[t.icon?n("IconContainer",[n("Icon",{attrs:{name:t.icon}})],1):e._e(),e._v(" "),n("div",{staticClass:"text-truncate"},[e._v("\n      "+e._s(t.label)+"\n    ")])],1)})),1)}),[],!1,null,"09147c61",null);t.a=r.exports},461:function(e,t,n){"use strict";var i={name:"AulaSwitch",props:{value:{required:!0,type:Boolean}},emits:["input","change"],setup:(e,{emit:t})=>({onClick:n=>{t("input",!e.value),t("change",n)}})},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("button",e._g(e._b({staticClass:"switch switch-variables",attrs:{role:"switch",type:"button","aria-checked":e.value},on:{click:e.onClick}},"button",Object.assign({},e.$attrs),!1),e.$listeners))}),[],!1,null,"8b3fa370",null);t.a=a.exports},462:function(e,t,n){"use strict";var i=n(17),s=n.n(i),a=n(1),r=n.n(a),o=n(6),l=n(0),c=n(10),u=n(14),d=n(8),h=n(297),m=n.n(h),p=n(39),v=n.n(p),f=n(5),g=n.n(f),_=n(37),E=n(13),A=n(298),T=n(4);function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I={props:{parent:{type:String,default:u.a.PROFILE},isEditMode:{type:Boolean,default:!1},selectedVacationRequestId:{type:Number,default:null}},setup:function(){var e=Object(A.a)();return{startDate:e.startDate,endDate:e.endDate,deadline:e.deadline,startDatePickerOptions:e.startDatePickerOptions,endDatePickerOptions:e.endDatePickerOptions,deadlinePickerOptions:e.deadlinePickerOptions,isDisabledDeadline:e.isDisabledDeadline,hasWorkingDay:e.hasWorkingDay,isEndDateValid:e.isEndDateValid}},data:function(){return{Vue:T.default,portalRoles:d.a,permissionEnum:c.a,isLoading:!1,vacationRequest:{institutionCode:null,departmentIds:[],groupIds:[],title:"",isPresenceTimesRequired:!1,noteToGuardians:null},departments:[],groups:[],departmentGroups:[],emptyVacationRequest:{},showAlertNoStartAndEndDate:!1,showAlertNoTitle:!1,showAlertNoDepartment:!1,showAlertNoGroup:!1,previousDepartmentIds:[],previousGroupIds:[]}},computed:y(y({},Object(o.c)({getPresenceFilters:l.a.GET_PRESENCE_FILTERS,activeEvent:l.a.GET_CURRENT_EVENT,activeInstitutions:l.a.GET_ACTIVE_INSTITUTIONS,hasPermissionInstitution:l.a.HAS_PERMISSION_ON_INSTITUTION,defaultDateFormat:l.a.GET_DEFAULT_DATE_FORMAT,defaultDateValueFormat:l.a.GET_DEFAULT_DATE_VALUE_FORMAT,hasPermission:l.a.HAS_PERMISSION,hasPermissionOnInstitution:l.a.HAS_PERMISSION_ON_INSTITUTION,institutions:l.a.GET_INSTITUTIONS,sameAuthorityInstitutions:l.a.GET_SAME_AUTHORITY_INSTITUTIONS,isMobile:l.a.GET_IS_MOBILE})),{},{userProfileStore:function(){return Object(E.a)()},profile:function(){return this.userProfileStore.institutionProfile},activeInstWithVacationRequestPermission:function(){var e=this;return this.institutions.filter((function(t){return e.activePresenceInstitutions.includes(t.institutionCode)&&e.hasPermissionInstitution(c.a.HANDLE_VACATION_REQUESTS,t.institutionCode)}))},activePresenceInstitutions:function(){var e=this;return this.getPresenceFilters.filter((function(t){return null!=t.departments&&t.departments.length>0&&e.activeInstitutions.includes(t.institutionCode)})).map((function(e){return e.institutionCode}))},vacationRequestCreator:function(){var e=this,t=null;return this.vacationRequest.institutionCode?t=this.institutions.find((function(t){return t.institutionCode==e.vacationRequest.institutionCode})).institutionProfileId:this.activeInstWithVacationRequestPermission.length>0&&(t=this.institutions.find((function(t){return t.institutionCode==e.activeInstWithVacationRequestPermission[0].institutionCode})).institutionProfileId),t},canHandleVacationRequests:function(){return this.activeEvent&&this.hasPermissionOnInstitution(c.a.HANDLE_VACATION_REQUESTS,this.activeEvent.institutionCode)}}),methods:y(y({},Object(o.b)({loadPresenceFilters:l.a.LOAD_PRESENCE_FILTER,loadEventById:l.a.GET_EVENT_BY_ID,deleteEvent:l.a.DELETE_EVENT,requestVacation:l.a.CREATE_VACATION_REQUEST,updateVacationRequest:l.a.UPDATE_REQUEST_VACATION,loadEventTypes:l.a.LOAD_EVENT_TYPES,loadAssignedDelegatedAccesses:l.a.LOAD_ASSIGNED_DELEGATED_ACCESSES,loadMyDelegatedAccesses:l.a.LOAD_MY_DELEGATED_ACCESSES,updateDelegatedAccess:l.a.UPDATE_DELEGATED_ACCESS,loadNotifications:l.a.LOAD_NOTIFICATIONS})),{},{resetForm:function(){this.vacationRequest.institutionCode=null,this.vacationRequest.departmentIds=[],this.vacationRequest.groupIds=[],this.vacationRequest.title="",this.vacationRequest.isPresenceTimesRequired=!1,this.vacationRequest.noteToGuardians=null,this.showAlertNoTitle=!1,this.showAlertNoStartAndEndDate=!1,this.startDate=null,this.endDate=null,this.deadline=null,this.isEditMode||(this.startDate=g()().format("YYYY-MM-DD"))},validateForm:function(){var e=!0;return this.vacationRequest.title&&""!=this.vacationRequest.title.trim()||(this.showAlertNoTitle=!0,this.isLoading=!1,e=!1),this.startDate&&this.endDate&&this.isEndDateValid()||(this.showAlertNoStartAndEndDate=!0,e=!1),this.hasWorkingDay()||(this.showAlertNoStartAndEndDate=!0,e=!1),0===this.vacationRequest.departmentIds.length&&(this.showAlertNoDepartment=!0,e=!1),0===this.vacationRequest.groupIds.length&&(this.showAlertNoGroup=!0,e=!1),this.isLoading=!!e&&this.isLoading,e},saveVacationRequest:function(){var e=this;if(this.validateForm()){this.isLoading=!0;var t={startDateTime:g()(this.startDate).format("YYYY-MM-DD"),endDateTime:g()(this.endDate).format("YYYY-MM-DD"),responseDeadline:this.deadline?g()(this.deadline).format("YYYY-MM-DD"):null};if(this.isEditMode){var n={id:this.activeEvent.id,responseDeadline:t.responseDeadline};
1this.updateVacationRequest(n).then((function(){e.isLoading=!1,e.closeForm()}))}else{var i,s=[],a=b(this.vacationRequest.departmentIds);try{var r=function(){var t=i.value,n={groupId:t,filteringGroups:e.vacationRequest.groupIds.filter((function(n){return null!=e.departmentGroups.find((function(e){return e.id==n&&e.departmentId==t}))}))};s.push(n)};for(a.s();!(i=a.n()).done;)r()}catch(e){a.e(e)}finally{a.f()}this.requestVacation(y({creatorInstProfileId:this.vacationRequestCreator,title:this.vacationRequest.title,departments:s,noteToGuardians:this.vacationRequest.noteToGuardians,isPresenceTimesRequired:this.vacationRequest.isPresenceTimesRequired},t)).then((function(){e.isLoading=!1,e.$emit("reloadVacationRequest"),e.closeForm()}))}}},deleteVacationRequest:function(){var e=this;this.isLoading=!0,this.deleteEvent({eventForm:{id:this.activeEvent.id},type:_.a.VACATION_REGISTRATION}).then((function(){e.isLoading=!1,e.$refs.deleteModal.hide(),e.$emit("reloadCalendar"),e.closeForm()}))},closeForm:function(){this.resetForm(),this.parent===u.a.PROFILE?this.$router.push({path:"/kalender"}):this.parent===u.a.PRESENCE?this.$emit("onClosed"):this.$router.push({name:"group-calendar"})},closeVacationRequestForm:function(){!m()(this.emptyVacationRequest,this.vacationRequest)||this.startDate||this.endDate?this.$refs.cancelModal.show():this.closeForm()},validateAddOrHideInOwnCalendar:function(){var e=this;T.default.nextTick((function(){e.$forceUpdate()}))},changeDepartment:function(){var e=this;this.showAlertNoDepartment=!1;var t=this.vacationRequest.departmentIds.find((function(t){return!e.previousDepartmentIds.includes(t)}));if(null!=t){var n=this.departmentGroups.filter((function(e){return e.departmentId==t})).map((function(e){return e.id}));this.vacationRequest.groupIds=s()(new Set([].concat(s()(this.vacationRequest.groupIds),s()(n))))}var i=this.departmentGroups.filter((function(t){return e.vacationRequest.departmentIds.includes(t.departmentId)})),a=[];i.forEach((function(e){null==a.find((function(t){return t.id==e.id}))&&a.push(e)})),this.groups=a,this.vacationRequest.groupIds=this.vacationRequest.groupIds.filter((function(t){return null!=e.groups.find((function(e){return e.id==t}))})),this.previousDepartmentIds=v()(this.vacationRequest.departmentIds),this.previousGroupIds=v()(this.vacationRequest.groupIds)},changeGroup:function(){var e=this;this.showAlertNoGroup=0===this.vacationRequest.groupIds.length;var t=this.vacationRequest.groupIds.find((function(t){return!e.previousGroupIds.includes(t)}));if(null!=t){var n,i=b(this.departmentGroups.filter((function(e){return e.id==t})));try{for(i.s();!(n=i.n()).done;){var s=n.value;this.vacationRequest.departmentIds.includes(s.departmentId)||this.vacationRequest.departmentIds.push(s.departmentId)}}catch(e){i.e(e)}finally{i.f()}}if(this.previousGroupIds.find((function(t){return!e.vacationRequest.groupIds.includes(t)}))){var a=[];if(1==this.departments.length)a.push(this.departments[0].id);else{var r,o=b(this.vacationRequest.departmentIds);try{var l=function(){var t=r.value,n=e.departmentGroups.filter((function(e){return e.departmentId==t})).map((function(e){return e.id}));null!=e.vacationRequest.groupIds.find((function(e){return n.includes(e)}))&&a.push(t)};for(o.s();!(r=o.n()).done;)l()}catch(e){o.e(e)}finally{o.f()}}this.vacationRequest.departmentIds=a,this.groups=this.departmentGroups.filter((function(t){return e.vacationRequest.departmentIds.includes(t.departmentId)}))}this.previousDepartmentIds=v()(this.vacationRequest.departmentIds),this.previousGroupIds=v()(this.vacationRequest.groupIds)},populateDepartmentsAndGroups:function(){var e=this;this.departments=[],this.groups=[],this.departmentGroups=[];var t,n=b(this.getPresenceFilters);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(this.vacationRequest.institutionCode===i.institutionCode){var s,a=b(this.isEditMode?this.activeEvent.vacationRegistration.departments:i.departments);try{var r=function(){var t=s.value;if(null==e.departments.find((function(e){return e.id===t.mainGroup.id}))){if(e.departments.push({id:t.mainGroup.id,name:t.mainGroup.name+" ("+i.institutionName+")"}),null==t.filteringGroups)return"continue";var n,a=b(t.filteringGroups);try{var r=function(){var s=n.value;e.departmentGroups.push({id:s.id,name:s.name+" ("+i.institutionName+")",departmentId:t.mainGroup.id}),null==e.groups.find((function(e){return e.id==s.id}))&&e.groups.push({id:s.id,name:s.name+" ("+i.institutionName+")",departmentId:t.mainGroup.id})};for(a.s();!(n=a.n()).done;)r()}catch(e){a.e(e)}finally{a.f()}}};for(a.s();!(s=a.n()).done;)r()}catch(e){a.e(e)}finally{a.f()}}}}catch(e){n.e(e)}finally{n.f()}this.isEditMode||this.setDefaultDepartmentsAndGroups(),this.previousDepartmentIds=v()(this.vacationRequest.departmentIds),this.previousGroupIds=v()(this.vacationRequest.groupIds)},setDefaultDepartmentsAndGroups:function(){this.vacationRequest.groupIds=this.groups.map((function(e){return e.id})),this.vacationRequest.departmentIds=this.departments.map((function(e){return e.id}))},populateVacationRequest:function(){this.vacationRequest.institutionCode=this.isEditMode?this.activeEvent.institutionCode:null,this.vacationRequest.title=this.activeEvent.title,this.vacationRequest.responseRequired=this.activeEvent.responseRequired,this.vacationRequest.isPresenceTimesRequired=this.activeEvent.vacationRegistration.isPresenceTimesRequired,this.vacationRequest.noteToGuardians=null!=this.activeEvent.description?this.activeEvent.description.html:"",this.vacationRequest.departmentIds=this.activeEvent.vacationRegistration.departments.map((function(e){return e.mainGroup.id})),this.startDate=this.activeEvent.startDateTime,this.endDate=this.activeEvent.endD
1ateTime,this.deadline=this.activeEvent.responseDeadline;var e,t=b(this.activeEvent.vacationRegistration.departments);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.filteringGroups){var i=n.filteringGroups.map((function(e){return e.id}));this.vacationRequest.groupIds=s()(new Set([].concat(s()(this.vacationRequest.groupIds),s()(i))))}}}catch(e){t.e(e)}finally{t.f()}this.previousGroupIds=this.vacationRequest.groupIds},resetVacationRequestData:function(){this.isEditMode||(this.vacationRequest.institutionCode=this.activeInstWithVacationRequestPermission.length>0?this.activeInstWithVacationRequestPermission[0].institutionCode:null),this.populateDepartmentsAndGroups(),this.emptyVacationRequest=v()(this.vacationRequest)},initData:function(){var e=this;if(this.hasPermission(c.a.HANDLE_VACATION_REQUESTS)&&this.activeInstitutions){if(this.isEditMode){var t=this.$route.params.id||this.selectedVacationRequestId;this.activeEvent.id!=t?this.loadEventById({eventId:t}).then((function(){e.populateVacationRequest()})):this.populateVacationRequest()}this.resetVacationRequestData()}}}),mounted:function(){this.resetForm(),this.initData()}},S=n(3),D=Object(S.a)(I,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-form",[n("div",{staticClass:"mb-2"},[n("br"),e._v(e._s(e.$getText("CALENDAR_TOOLBAR_REQUEST_VACATION_BODY")))]),e._v(" "),n("b-row",{staticClass:"mt-3"},[n("b-col",{attrs:{cols:"12",lg:"6"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_CREATE_EVENT_TITLE"))),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("b-form-input",{class:{"red-border":e.showAlertNoTitle},attrs:{disabled:e.isEditMode},on:{input:function(t){e.showAlertNoTitle=!1}},model:{value:e.vacationRequest.title,callback:function(t){e.$set(e.vacationRequest,"title",t)},expression:"vacationRequest.title"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showAlertNoTitle}},[e._v("\n        "+e._s(e.$getText("CALENDAR_TOOLBAR_REQUEST_VACATION_WARNING_TITLE"))+"\n      ")])],1)],1),e._v(" "),n("b-row",[n("b-col",{staticClass:"mt-2",attrs:{cols:"12",lg:"6"}},[n("label",[e._v(e._s(e.$getText("ALERT_FROM"))),n("span",{staticClass:"mandatory"},[e._v("*")])]),n("br"),e._v(" "),n("el-date-picker",{ref:"requestVacationFrom",staticClass:"datetime-input",class:{"red-border":e.showAlertNoStartAndEndDate},attrs:{"picker-options":e.startDatePickerOptions,"append-to-body":!0,clearable:!1,disabled:e.isEditMode,type:"date",format:e.defaultDateFormat,"value-format":e.defaultDateValueFormat,placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE"),editable:!1},on:{focus:function(t){return e.datePickerModifier()}},model:{value:e.startDate,callback:function(t){e.startDate=t},expression:"startDate"}})],1),e._v(" "),n("b-col",{staticClass:"mt-2",attrs:{cols:"12",lg:"6"}},[n("label",[e._v(e._s(e.$getText("ALERT_TO"))),n("span",{staticClass:"mandatory"},[e._v("*")])]),n("br"),e._v(" "),n("el-date-picker",{ref:"requestVacationTo",staticClass:"datetime-input",class:{"red-border":e.showAlertNoStartAndEndDate},attrs:{"picker-options":e.endDatePickerOptions,"append-to-body":!0,clearable:!1,disabled:e.isEditMode,type:"date",format:e.defaultDateFormat,"value-format":e.defaultDateValueFormat,placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE"),editable:!1},on:{focus:function(t){return e.datePickerModifier()}},model:{value:e.endDate,callback:function(t){e.endDate=t},expression:"endDate"}})],1)],1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showAlertNoStartAndEndDate}},[e._v("\n    "+e._s(e.$getText("CALENDAR_TOOLBAR_REQUEST_VACATION_WARNING"))+"\n  ")]),e._v(" "),n("b-row",{staticClass:"mt-3"},[n("b-col",{attrs:{cols:"12",lg:"6"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_LABEL_EVENT_REQUEST_DEADLINE")))]),n("br"),e._v(" "),n("el-date-picker",{attrs:{"picker-options":e.deadlinePickerOptions,disabled:e.isEditMode&&e.isDisabledDeadline,format:e.defaultDateFormat,"value-format":e.defaultDateValueFormat,type:"date","aria-label":e.$getText("ARIA_LABEL_CALENDAR_START_DATE"),placeholder:e.$getText("MESSAGE_PLACEHOLDER_SELECT_DATE")},on:{focus:function(t){return e.datePickerModifier()}},model:{value:e.deadline,callback:function(t){e.deadline=t},expression:"deadline"}})],1),e._v(" "),n("b-col",{staticClass:"align-self-stretch d-flex align-items-end",attrs:{cols:"12",lg:"
16"}},[n("div",{staticClass:"pl-3",class:{"mt-3":e.isMobile}},[n("b-form-checkbox",{staticClass:"pl-3",attrs:{disabled:e.isEditMode},model:{value:e.vacationRequest.isPresenceTimesRequired,callback:function(t){e.$set(e.vacationRequest,"isPresenceTimesRequired",t)},expression:"vacationRequest.isPresenceTimesRequired"}},[e._v("\n          "+e._s(e.$getText("CALENDAR_VACATION_REQUEST_PRESENCE_TIME_REQUIRED"))+"\n        ")])],1)])],1),e._v(" "),n("b-row",{staticClass:"mt-3"},[n("b-col",{attrs:{cols:"12"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_NOTE")))]),e._v(" "),n("b-textarea",{staticClass:"absence-input",attrs:{id:"comment",disabled:e.isEditMode,maxlength:"400","max-rows":"1",rows:"5",placeholder:e.$getText("ARIA_LABEL_VACATION_REQUEST_NOTES"),"aria-label":e.$getText("ARIA_LABEL_VACATION_REQUEST_NOTES")},model:{value:e.vacationRequest.noteToGuardians,callback:function(t){e.$set(e.vacationRequest,"noteToGuardians",t)},expression:"vacationRequest.noteToGuardians"}})],1)],1),e._v(" "),n("hr",{staticClass:"mt-5"}),e._v(" "),n("b-row",[e.activeInstWithVacationRequestPermission.length>1?n("b-col",{class:{"mt-3":e.isMobile},attrs:{cols:"12",lg:"6"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_CREATE_EVENT_CHOOSE_INSTITUTION")))]),e._v(" "),n("aula-select",{attrs:{"aria-label":e.$getText("ARIA_LABEL_VACATION_REQUEST_CHOOSE_INSTITUTION"),placeholder:e.$getText("ARIA_LABEL_VACATION_REQUEST_CHOOSE_INSTITUTION"),disabled:e.isEditMode},on:{change:e.populateDepartmentsAndGroups},model:{value:e.vacationRequest.institutionCode,callback:function(t){e.$set(e.vacationRequest,"institutionCode",t)},expression:"vacationRequest.institutionCode"}},e._l(e.activeInstWithVacationRequestPermission,(function(e,t){return n("aula-option",{key:"institution"+t,attrs:{id:e.institutionCode,label:e.name,value:e.institutionCode}})})),1)],1):e._e(),e._v(" "),e.departments.length>1?n("b-col",{class:{"mt-3":e.isMobile},attrs:{cols:"12",lg:"6"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_CHOOSE_DEPARTMENTS")))]),e._v(" "),n("aula-select",{class:{"red-border":e.showAlertNoDepartment},attrs:{disabled:e.isEditMode,multiple:"","aria-label":e.$getText("ARIA_LABEL_VACATION_REQUEST_CHOOSE_DEPARTMENTS"),placeholder:e.$getText("ARIA_LABEL_VACATION_REQUEST_CHOOSE_DEPARTMENTS")},on:{change:e.changeDepartment},model:{value:e.vacationRequest.departmentIds,callback:function(t){e.$set(e.vacationRequest,"departmentIds",t)},expression:"vacationRequest.departmentIds"}},e._l(e.departments,(function(e){return n("aula-option",{key:"department"+e.id,attrs:{id:e.id,label:e.name,value:e.id}})})),1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showAlertNoDepartment}},[e._v("\n        "+e._s(e.$getText("CALENDAR_TOOLBAR_REQUEST_VACATION_WARNING_DEPARTMENT"))+"\n      ")])],1):e._e(),e._v(" "),n("b-col",{class:{"mt-3":e.isMobile},attrs:{cols:"12",lg:"6"}},[n("label",[e._v(e._s(e.$getText("CALENDAR_VACATION_REQUEST_CHOOSE_GROUPS"))),n("span",{staticClass:"mandatory"},[e._v("*")])]),e._v(" "),n("aula-select",{class:{"red-border":e.showAlertNoGroup},attrs:{multiple:"",disabled:e.isEditMode,placeholder:e.$getText("ARIA_LABEL_VACATION_REQUEST_CHOOSE_GROUPS"),"aria-label":e.$getText("ARIA_LABEL_VACATION_REQUEST_CHOOSE_GROUPS")},on:{change:e.changeGroup},model:{value:e.vacationRequest.groupIds,callback:function(t){e.$set(e.vacationRequest,"groupIds",t)},expression:"vacationRequest.groupIds"}},e._l(e.groups,(function(e,t){return n("aula-option",{key:"groups"+t,attrs:{id:e.id,label:e.name,value:e.id}})})),1),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showAlertNoGroup}},[e._v("\n        "+e._s(e.$getText("CALENDAR_TOOLBAR_REQUEST_VACATION_WARNING_GROUP"))+"\n      ")])],1)],1),e._v(" "),n("aula-form-footer",{attrs:{"delete-text":"CALENDAR_VACATION_REQUEST_DELETE","is-loading":e.isLoading,"show-delete":e.isEditMode&&e.canHandleVacationRequests,"show-delete-mobile":e.isEditMode&&e.canHandleVacationRequests,"show-delete-icon":e.isEditMode&&e.canHandleVacationRequests,"submit-text":e.isEditMode?"BUTTON_SAVE":"BUTTON_CREATE"},on:{cancelClicked:e.closeVacationRequestForm,submitClicked:e.saveVacationRequest,deleteClicked:function(t){return e.$refs.deleteModal.show()}}}),e._v(" "),n("aula-modal",{ref:"cancelModal",attrs:{"ok-text":"BUTTON_YES"},on:{cancelClicked:function(t){return e.$refs.cancelModal.hide()},okClicked:function(t){e.closeForm(),e.$refs.cancelModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_CANCEL_INFO"))+" "),n("br"),e._v("\n    "+e._s(e.$getText("CALENDAR_CANCEL_INFO_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"deleteModal",attrs:{"ok-text":"BUTTON_YES"},on:{cancelClicked:function(t){return e.$refs.deleteModal.hide()},okClicked:e.deleteVacationRequest}},[e._v("\n    "+e._s(e.$getText("CALENDAR_DELETE_VACATION_REGISTRATION_TEXT"))+"\n  ")])],1)}),[],!1,null,"0dce6480",null);t.a=D.exports},468:function(e,t,n){"use strict";var i=n(32),s=n(127),a=n(20),r=n(15),o=n(6),l=n(0),c=n(37),u=n(8),d=n(62),h=n(21),m=n(128),p=function(e,t,n,i){return new(n||(n=Prom
1ise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},v={components:{AulaInfoTrigger:m.a,Icon:a.a,AulaButton:i.a,Editor:s.a},props:{eventData:{type:Object,required:!0}},emits:["reminderSent"],data:()=>({reminderMessage:"",isValid:!0,isValidReminderMessage:!0,portalRoles:u.a,isLoading:!1,isShown:!1}),computed:{canSendReminder(){const e=null!=this.eventData.repeating;let t=this.eventData.isDeadlineExceeded;return this.eventData.responseDeadline||(t=h.a.isSameOrBefore(this.eventData.endDateTime,new Date)),!e&&!t},iconClassEnum:()=>r.a,isVacationRequest(){return this.eventData.type===c.a.VACATION_REGISTRATION},isMeeting(){return this.eventData.type===c.a.SCHOOL_HOME_MEETING||this.eventData.type===c.a.PARENTAL_MEETING||this.eventData.type===c.a.PERFORMANCE_MEETING},warningText(){if(this.isVacationRequest)return this.$getText("CALENDAR_SEND_VACATION_REQUEST_REMINDER_WARNING",{numberOfInvitees:this.eventData.vacationRegistration.childrenPendingAnswers.length});let e=this.eventData.invitees.filter((e=>e.responseType===d.a.WAITING));this.isMeeting&&(e=e.filter((e=>e.instProfile.role!==u.a.CHILD)));const t=this.eventData.invitedGroupHomeChildren.filter((e=>e.responseType===d.a.WAITING)),n=e.length+t.length;return this.$getText("CALENDAR_SEND_EVENT_REMINDER_WARNING",{numberOfInvitees:n})},reminderMessageText(){return this.isVacationRequest?this.$getText("CALENDAR_VACATION_REQUEST_REMINDER_MESSAGE"):this.$getText("CALENDAR_EVENT_REMINDER_MESSAGE")},autoGeneratedText(){return this.$getText("CALENDAR_EVENT_REMINDER_AUTO_GENERATED")}},mounted(){this.initReminderMessage()},methods:Object.assign(Object.assign({},Object(o.b)({sendReminder:l.a.SEND_EVENT_REMINDER,loadEventById:l.a.GET_EVENT_BY_ID})),{initReminderMessage(){this.reminderMessage=`<div>${this.reminderMessageText}</div>\r\n<div><em>(${this.autoGeneratedText})</em></div>`},validateReminderMessage(){this.isValidReminderMessage=this.reminderMessage.length>0},validateReminder(){this.isValidReminderMessage||(this.isValid=!1)},resetReminderStates(){this.isValidReminderMessage=!0,this.isValid=!0},onSendReminderClicked(){return p(this,void 0,void 0,(function*(){if(this.validateReminder(),this.isValid){this.isLoading=!0;try{yield this.sendReminder({eventId:this.eventData.id,message:this.reminderMessage})}catch(e){this.isValid=!1}this.isLoading=!1,this.$refs.sendReminderWarningModal.hide(),this.$emit("reminderSent")}}))},openSendReminderModal(){this.$refs.sendReminderWarningModal.show()}})},f=n(3),g=Object(f.a)(v,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"send-reminder"},[e.canSendReminder?n("AulaButton",{staticClass:"send-reminder-button",attrs:{variant:"link"},on:{click:e.openSendReminderModal}},[n("Icon",{staticClass:"icon",attrs:{name:e.iconClassEnum.AULA_BELL}}),e._v(" "),n("span",{staticClass:"font-weight-bold text-decoration-underline"},[e._v(e._s(e.$getText("CALENDAR_SEND_EVENT_REMINDER")))])],1):e._e(),e._v(" "),e.canSendReminder?n("AulaInfoTrigger",{staticClass:"ml-2",attrs:{area:"SEND_EVENT_REMINDER"}}):e._e(),e._v(" "),n("b-modal",{ref:"sendReminderWarningModal",attrs:{title:e.$getText("CALENDAR_SEND_REMINDER_WARNING_TITLE"),"ok-title":e.$getText("MESSAGE_SEND_BUTTON"),"cancel-title":e.$getText("CANCEL"),"cancel-variant":"link","body-class":"bg-grey-light","footer-class":"bg-grey-light","is-loading":e.isLoading,"ok-disabled":!e.isValidReminderMessage,"ignore-enforce-focus-selector":".tox-tinymce-aux, .modal-aula"},on:{ok:e.onSendReminderClicked,show:e.initReminderMessage,hidden:e.resetReminderStates},model:{value:e.isShown,callback:function(t){e.isShown=t},expression:"isShown"}},[n("p",{staticClass:"pt-3"},[e._v(e._s(e.warningText)),n("br")]),e._v(" "),e.isShown?n("Editor",{class:{"red-border":!e.isValidReminderMessage},attrs:{disabled:!1},on:{input:e.validateReminderMessage},model:{value:e.reminderMessage,callback:function(t){e.reminderMessage=t},expression:"reminderMessage"}}
1):e._e(),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:!e.isValidReminderMessage}},[e._v("\n      "+e._s(e.$getText("MESSAGE_VALIDATE_TEXT"))+"\n    ")])],1)],1)}),[],!1,null,"504144e5",null);t.a=g.exports},477:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(4),s=n(41),a=n(9),r=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))};const o=new class{constructor(){this.bookmark=e=>r(this,void 0,void 0,(function*(){try{yield a.b.post("?method=posts.bookmark",{postId:e})}catch(e){return Promise.reject(new s.a(e))}})),this.unbookmark=e=>r(this,void 0,void 0,(function*(){try{yield a.b.post("?method=posts.unbookmark",{postId:e})}catch(e){return Promise.reject(new s.a(e))}}))}};var l=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))};function c(){const e=Object(i.ref)([]),t=Object(i.ref)(!1);return{posts:e,isBookmarking:t,assignPosts:t=>{e.value=t},toggleBookmark:e=>l(this,void 0,void 0,(function*(){if(!t.value)try{t.value=!0,e.isBookmarked?(yield o.unbookmark(e.id),e.isBookmarked=!1):(yield o.bookmark(e.id),e.isBookmarked=!0)}finally{t.value=!1}}))}}},528:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"cicero-frame"},[n("div",{staticClass:"cicero-contents",style:e.setBackgroundImage(e.backgroundImageUrl)},[n("div",{staticClass:"cicero-tab-container"},[n("div",{staticClass:"cicero-tab",class:{"cicero-selected-tab":e.selectedTab===e.loansTab},on:{click:function(t){return e.selectTab(e.loansTab)}}},[e._v("\n        udlån "+e._s(""===this.error?"("+e.loans.length+")":"")+"\n      ")]),e._v(" "),n("div",{staticClass:"cicero-tab",class:{"cicero-selected-tab":e.selectedTab===e.reservationsTab},on:{click:function(t){return e.selectTab(e.reservationsTab)}}},[e._v("\n        reservationer "+e._s(""===this.error?"("+e.reservations.length+")":"")+"\n      ")])]),e._v(" "),n("div",{staticClass:"cicero-tab-triangle",style:e.setTriangleIndentation()}),e._v(" "),e.showMessage()?n("div",{staticClass:"cicero-error-container"},[n("div",{staticClass:"cicero-error-image",style:e.setBackgroundImage(e.errorStateImageurl)}),e._v(" "),n("div",{staticClass:"cicero-error-text"},[e._v(e._s(e.getMessage()))]),e._v(" "),this.shouldDisplayLongtermLoansButton()&&e.selectedTab===e.loansTab?n("div",{staticClass:"cicero-long-term-loans-error-button",on:{click:function(t){return e.displayLongtermLoans()}}},[n("div",{staticClass:"cicero-long-term-error-button-text"},[e._v("\n          Vis langtidsudlån "+e._s("("+this.longtermLoans.length+")")+"\n        ")])]):e._e()]):e._e(),e._v(" "),e.showMessage()?e._e():n("div",[e.loading?n("div",{staticClass:"cicero-slides"},e._l(4,(function(e){return n("div",{key:e,staticClass:"cicero-slide"},[n("div",{staticClass:"cicero-loading-placeholder"})])})),0):e._e(),e._v(" "),e.loading?e._e():n("div",{staticClass:"cicero-slides"},[e.atHeadOfList?e._e():n("div",{staticClass:"cicero-prev cicero-arrow",on:{click:function(t){return e.moveCarousel(-1)}}},[n("i",{staticClass:"fa fa-angle-left fa-2x"})]),e._v(" "),n("div",{staticClass:"cicero-carousel"},[n("div",{ref:"carouselItems",staticClass:"cicero-carousel-items",style:e.slideAnimation()},[e._l(e.loansToShow,(function(t){return e.selectedTab===e.loansTab&&e.loansToShow.length>0?n("div",{key:t.id,staticClass:"cicero-slide",on:{click:function(n){return e.onSlideClicked(t.id)}}},[e.multipleChildren()?n("div",{staticClass:"cicero-patron-name"},[e._v(e._s(e.formatName(t.patronDisplayName)))]):e._e(),e._v(" "),e.multipleChildren()?e._e():n("div",{staticClass:"cicero-one-child-filler"}),e._v(" "),n("div",{staticClass:"cicero-loans-layer-container"},[n("div",{staticClass:"cicero-loan"},[t.coverImageUrl?n("div",{staticClass:"cicero-real-cover-image"},[n("img",{attrs:{src:t.coverImageUrl,alt:"Forsidebillede"},on:{error:function(n){return e.onCoverImageLoadError(t)}}}
1)]):e._e(),e._v(" "),t.coverImageUrl?e._e():n("div",{staticClass:"cicero-default-cover-image",style:e.setBackgroundImage(e.defaultCoverImageUrl)},[n("div",{staticClass:"cicero-overlay",style:e.overlayBackgroundColour(t.title)},[t.author?n("div",{staticClass:"cicero-text cicero-author"},[e._v(e._s(t.author))]):e._e(),e._v(" "),n("div",{staticClass:"cicero-text cicero-title"},[e._v("\n                        "+e._s(e.truncateTitle(t.title))+"\n                      ")])])]),e._v(" "),e.isLongtermLoan(t)?n("div",{staticClass:"cicero-longterm-loan-info"},[e._v("Langtidsudlån")]):e._e(),e._v(" "),t.numberOfLoans<2?n("div",{staticClass:"cicero-info-icon",style:e.loanInfoIconExtraStyle(t.dueDate)},[e._v("i")]):e._e(),e._v(" "),t.numberOfLoans>1?n("div",{staticClass:"cicero-number-of-loans-icon"},[e._v(e._s(t.numberOfLoans))]):e._e(),e._v(" "),n("div",{staticClass:"cicero-hover-container"}),e._v(" "),n("div",{staticClass:"cicero-detailed-view",style:e.ciceroDetailedViewExtraStyle(e.loansTab,t.id)},[n("div",{staticClass:"cicero-detailed-view-header"},[t.author?n("div",{staticClass:"cicero-text cicero-author"},[e._v(e._s(t.author))]):e._e(),e._v(" "),n("div",{staticClass:"cicero-text cicero-title"},[e._v("\n                        "+e._s(e.truncateTitle(t.title))+"\n                      ")])]),e._v(" "),n("div",{staticClass:"cicero-detailed-view-footer"},[n("div",{staticClass:"cicero-text cicero-handin-text"},[e._v("Skal afleveres")]),e._v(" "),n("div",{staticClass:"cicero-text cicero-date"},[e._v("\n                        "+e._s(e.formatDate(t.dueDate))+"\n                      ")]),e._v(" "),n("div",{staticClass:"cicero-text cicero-return-alert",style:e.alertTextColour(t.dueDate)},[e._v("\n                        "+e._s(e.formatLoanReturnAlertText(t.dueDate))+"\n                      ")])])])]),e._v(" "),t.numberOfLoans>1?n("div",{staticClass:"cicero-loans-layer-1"}):e._e(),e._v(" "),t.numberOfLoans>1?n("div",{staticClass:"cicero-loans-layer-2"}):e._e()])]):e._e()})),e._v(" "),this.shouldDisplayLongtermLoansButton()&&e.selectedTab===e.loansTab?n("div",{staticClass:"cicero-long-term-loans-slide-button",on:{click:function(t){return e.displayLongtermLoans()}}},[n("div",{staticClass:"cicero-long-term-loans-slide-button-text"},[e._v("\n                Vis langtidsudlån "+e._s("("+this.longtermLoans.length+")")+"\n              ")])]):e._e(),e._v(" "),e._l(e.reservations,(function(t){return e.selectedTab===e.reservationsTab&&e.reservations.length>0?n("div",{key:t.id,staticClass:"cicero-slide",on:{click:function(n){return e.onSlideClicked(t.id)}}},[e.multipleChildren()?n("div",{staticClass:"cicero-patron-name"},[e._v("\n                "+e._s(e.formatName(t.patronDisplayName))+"\n              ")]):e._e(),e._v(" "),e.multipleChildren()?e._e():n("div",{staticClass:"cicero-one-child-filler"}),e._v(" "),n("div",{staticClass:"cicero-reservation"},[t.coverImageUrl?n("img",{staticClass:"cicero-real-cover-image",attrs:{src:t.coverImageUrl,alt:"Forsidebillede"},on:{error:function(n){return e.onCoverImageLoadError(t)}}}):e._e(),e._v(" "),t.coverImageUrl?e._e():n("div",{staticClass:"cicero-default-cover-image",style:e.setBackgroundImage(e.defaultCoverImageUrl)},[n("div",{staticClass:"cicero-overlay",style:e.overlayBackgroundColour(t.title)},[t.author?n("div",{staticClass:"cicero-text cicero-author"},[e._v(e._s(t.author))]):e._e(),e._v(" "),n("div",{staticClass:"cicero-text cicero-title"},[e._v("\n                      "+e._s(e.truncateTitle(t.title))+"\n                    ")])])]),e._v(" "),n("div",{staticClass:"cicero-info-icon",style:e.reservationInfoIconExtraStyle(t.state)},[e._v("i")]),e._v(" "),n("div",{staticClass:"cicero-hover-container"}),e._v(" "),n("div",{staticClass:"cicero-detailed-view",style:e.ciceroDetailedViewExtraStyle(e.reservationsTab,t.id)},[n("div",{staticClass:"cicero-detailed-view-header"},[t.author?n("div",{staticClass:"cicero-text cicero-author"},[e._v(e._s(t.author))]):e._e(),e._v(" "),n("div",{staticClass:"cicero-text cicero-title"},[e._v("\n                      "+e._s(e.truncateTitle(t.title))+"\n                    ")])]),e._v(" "),n("div",{staticClass:"cicero-detailed-view-footer"},["reserved"===t.state?n("div",{staticClass:"cicero-text cicero-number-in-queue"}
1,[e._v("\n                      "+e._s("Du er nr. "+t.numberInQueue+" i køen")+"\n                    ")]):e._e(),e._v(" "),"readyForPickup"===t.state?n("div",[n("div",{staticClass:"cicero-text cicero-details-header"},[e._v("\n                        "+e._s("Kan hentes indtil "+e.formatDate(t.pickupDeadline))+"\n                      ")]),e._v(" "),n("div",{staticClass:"cicero-text cicero-ready-for-pickup"},[e._v("\n                        Klar til afhentning\n                      ")])]):e._e()])])])]):e._e()}))],2)]),e._v(" "),e.atEndOfList?e._e():n("div",{staticClass:"cicero-next cicero-arrow",on:{click:function(t){return e.moveCarousel(1)}}},[n("i",{staticClass:"fa fa-angle-right fa-2x"})])])]),e._v(" "),n("div",{staticClass:"cicero-footer"},[n("a",{attrs:{href:e.ciceroSurfBranchLandingPage(),target:"_blank"}},[n("img",{attrs:{src:e.logoUrl,height:"13",alt:"Cicero portal"}})]),e._v(" "),n("a",{attrs:{href:e.ciceroSurfBranchLandingPage(),target:"_blank"}},[e._v("Besøg biblioteket >")])])]),e._v(" "),e._m(0)])},s=[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"cicero-wedge-container"},[t("div",{staticClass:"cicero-wedge"})])}]},529:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"shortcuts"},e._l(e.icons,(function(t){return n("a",{key:t.icon,attrs:{href:t.url,target:"_blank",title:t.name}},["teams"==t.icon?n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("circle",{attrs:{cx:"17",cy:"6",r:"4.7",fill:"#7b83eb"}}),e._v(" "),n("path",{attrs:{d:"M16.7 7h-4.3v.1a4.7 4.7 0 0 0 5.6 3.5V8.3A1.3 1.3 0 0 0 16.7 7z",opacity:".1"}}),e._v(" "),n("path",{attrs:{d:"M15.7 8h-3a4.7 4.7 0 0 0 4.3 2.7V9.3A1.3 1.3 0 0 0 15.7 8z",opacity:".2"}}),e._v(" "),n("circle",{attrs:{"data-name":"Head",cx:"27.5",cy:"7.5",r:"3.5",fill:"#5059c9"}}),e._v(" "),n("path",{attrs:{d:"M30.5 12h-7.9a.6.6 0 0 0-.6.6v8.1a5.1 5.1 0 0 0 4 5.1 5 5 0 0 0 6-4.9v-7.4a1.5 1.5 0 0 0-1.5-1.5z",fill:"#5059c9"}}),e._v(" "),n("path",{attrs:{d:"M25 13.5V23a8 8 0 0 1-15 4 7.2 7.2 0 0 1-.4-1 8.4 8.4 0 0 1-.3-1 8.2 8.2 0 0 1-.3-2v-9.5a1.5 1.5 0 0 1 1.5-1.5h13a1.5 1.5 0 0 1 1.5 1.5z",fill:"#7b83eb"}}),e._v(" "),n("path",{attrs:{d:"M15.7 8h-3a4.7 4.7 0 0 0 4.3 2.7V9.3A1.3 1.3 0 0 0 15.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M18 12v12.7a1.3 1.3 0 0 1-1 1.3 1 1 0 0 1-.3 0H9.6a8.4 8.4 0 0 1-.3-1 8.2 8.2 0 0 1-.3-2v-9.5a1.5 1.5 0 0 1 1.5-1.5z",opacity:".1"}}),e._v(" "),n("path",{attrs:{d:"M17 12v13.7a1 1 0 0 1 0 .3 1.3 1.3 0 0 1-1.3 1H10a7.2 7.2 0 0 1-.5-1 8.4 8.4 0 0 1-.3-1 8.2 8.2 0 0 1-.3-2v-9.5a1.5 1.5 0 0 1 1.5-1.5z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M17 12v11.7a1.3 1.3 0 0 1-1.3 1.3H9.3a8.2 8.2 0 0 1-.3-2v-9.5a1.5 1.5 0 0 1 1.5-1.5z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M10.5 12A1.5 1.5 0 0 0 9 13.5V23a8.2 8.2 0 0 0 .3 2h5.4a1.3 1.3 0 0 0 1.3-1.3V12z",opacity:".2"}}),e._v(" "),n("path",{attrs:{"data-name":"Back Plate",d:"M1.3 8h13.4A1.3 1.3 0 0 1 16 9.3v13.4a1.3 1.3 0 0 1-1.3 1.3H1.3A1.3 1.3 0 0 1 0 22.7V9.3A1.3 1.3 0 0 1 1.3 8z",fill:"#4b53bc"}}),e._v(" "),n("path",{attrs:{d:"M12 13H9v8H7v-8H4v-2h8z",fill:"#fff"}}),e._v(" "),n("path",{attrs:{fill:"none",d:"M0 0h32v32H0z"}})]):"onedrive"==t.icon?n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M12.2 11.2l6.7 4 4-1.7a6.5 6.5 0 0 1 2.6-.5h.4a10 10 0 0 0-18-3H8a8 8 0 0 1 4.2 1.2z",fill:"#0364b8"}}),e._v(" "),n("path",{attrs:{d:"M12.2 11.2A8 8 0 0 0 8 10h-.1a8 8 0 0 0-6.5 12.6l6-2.5L10 19l5.9-2.5 3-1.3z",fill:"#0078d4"}}),e._v(" "),n("path",{attrs:{d:"M26 13h-.5a6.5 6.5 0 0 0-2.6.5l-4 1.7 1.2.7 3.8 2.3 1.6 1 5.7 3.4A6.5 6.5 0 0 0 26 13z",fill:"#1490df"}}),e._v(" "),n("path",{attrs:{d:"M25.5 19.2l-1.6-1-3.8-2.3-1.2-.7-3 1.3-6 2.5-2.5 1-6 2.6A8 8 0 0 0 8 26h17.5a6.5 6.5 0 0 0 5.7-3.4z",fill:"#28a8ea"}})]):"word"==t.icon?n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -30 474 474"}},[n("path",{attrs:{d:"M454.2 0h-316a19.7 19.7 0 0 0-19.7 19.7v83.9l177.8 51.8L474 103.7v-84C474 8.8 465.2 0 454.2 0z",fill:"#41a5ee"}}
1),e._v(" "),n("path",{attrs:{fill:"#2b7cd3",d:"M474 103.7H118.5v103.7l177.7 51.8L474 207.4z"}}),e._v(" "),n("path",{attrs:{fill:"#185abd",d:"M474 207.4H118.5v103.7l177.7 51.8L474 311.1z"}}),e._v(" "),n("path",{attrs:{d:"M474 311.1H118.5V395c0 10.9 8.8 19.8 19.8 19.8h316c10.9 0 19.7-8.8 19.7-19.8v-83.9z",fill:"#103f91"}}),e._v(" "),n("path",{attrs:{d:"M246.9 74.1H118.5v281.4h128.4a20 20 0 0 0 19.8-19.8V93.8a19.8 19.8 0 0 0-19.8-19.7z",opacity:".1"}}),e._v(" "),n("path",{attrs:{opacity:".2","enable-background":"new",d:"M232.1 88.9H118.5v281.4h113.6a20 20 0 0 0 19.8-19.8V108.6a19.8 19.8 0 0 0-19.8-19.7z"}}),e._v(" "),n("path",{attrs:{opacity:".2","enable-background":"new",d:"M232.1 88.9H118.5v251.8h113.6a20 20 0 0 0 19.8-19.8V108.6a19.8 19.8 0 0 0-19.8-19.7z"}}),e._v(" "),n("path",{attrs:{opacity:".2","enable-background":"new",d:"M217.2 88.9h-98.7v251.8h98.7a20 20 0 0 0 19.8-19.8V108.6c0-10.9-8.9-19.7-19.8-19.7z"}}),e._v(" "),n("path",{attrs:{id:"Back_Plate",fill:"#185abd",d:"M19.7 88.9h197.5c10.9 0 19.8 8.8 19.8 19.7v197.5c0 10.9-8.8 19.8-19.8 19.8H19.7A19.8 19.8 0 0 1 0 306.1V108.6c0-10.9 8.8-19.7 19.7-19.7z"}}),e._v(" "),n("path",{attrs:{id:"Letter",d:"M177 281.4h-26.7l-31.1-102.2-32.5 102.2H60L30.4 133.3H57L77.8 237l31.1-100.7h22.2L160.7 237l20.7-103.7h25.2L177 281.4z",fill:"#fff"}})]):"excel"==t.icon?n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M20 2H9.3A1.3 1.3 0 0 0 8 3.3V9l12 7 6 2.5 6-2.5V9z",fill:"#21a366"}}),e._v(" "),n("path",{attrs:{fill:"#107c41",d:"M8 9h12v7H8z"}}),e._v(" "),n("path",{attrs:{d:"M30.7 2H20v7h12V3.3A1.3 1.3 0 0 0 30.7 2z",fill:"#33c481"}}),e._v(" "),n("path",{attrs:{d:"M20 16H8v12.7A1.3 1.3 0 0 0 9.3 30h21.4a1.3 1.3 0 0 0 1.3-1.3V23z",fill:"#185c37"}}),e._v(" "),n("path",{attrs:{fill:"#107c41",d:"M20 16h12v7H20z"}}),e._v(" "),n("path",{attrs:{d:"M16.7 7H8v19h8.7a1.3 1.3 0 0 0 1.3-1.3V8.3A1.3 1.3 0 0 0 16.7 7z",opacity:".1"}}),e._v(" "),n("path",{attrs:{d:"M15.7 8H8v19h7.7a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 15.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M15.7 8H8v17h7.7a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 15.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M14.7 8H8v17h6.7a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 14.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{"data-name":"Back Plate",d:"M1.3 8h13.4A1.3 1.3 0 0 1 16 9.3v13.4a1.3 1.3 0 0 1-1.3 1.3H1.3A1.3 1.3 0 0 1 0 22.7V9.3A1.3 1.3 0 0 1 1.3 8z",fill:"#107c41"}}),e._v(" "),n("path",{attrs:{d:"M3.5 21l3.3-5-3-5h2.4l1.6 3.2.3.7.4-.7 1.7-3.2h2.2l-3 5 3 5h-2.3l-1.8-3.5A3 3 0 0 1 8 17a2.2 2.2 0 0 1-.2.5l-2 3.5z",fill:"#fff"}}),e._v(" "),n("path",{attrs:{fill:"none",d:"M0 0h32v32H0z"}})]):"powerpoint"==t.icon?n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M18 2A14 14 0 0 0 4 16l17.7 3.7z",fill:"#ed6c47"}}),e._v(" "),n("path",{attrs:{d:"M18 2a14 14 0 0 1 14 14l-7 4.8-7-4.8z",fill:"#ff8f6b"}}),e._v(" "),n("path",{attrs:{d:"M18 30a14 14 0 0 0 14-14H4a14 14 0 0 0 14 14z",fill:"#d35230"}}),e._v(" "),n("path",{attrs:{d:"M16.7 7H7.3a14 14 0 0 0 1 19h8.4a1.3 1.3 0 0 0 1.3-1.3V8.3A1.3 1.3 0 0 0 16.7 7z",opacity:".1"}}),e._v(" "),n("path",{attrs:{d:"M15.7 8H6.5a14 14 0 0 0 2.9 19h6.3a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 15.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M15.7 8H6.5a13.9 13.9 0 0 0 .8 17h8.4a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 15.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M14.7 8H6.5a13.9 13.9 0 0 0 .8 17h7.4a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 14.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{"data-name":"Back Plate",d:"M1.3 8h13.4A1.3 1.3 0 0 1 16 9.3v13.4a1.3 1.3 0 0 1-1.3 1.3H1.3A1.3 1.3 0 0 1 0 22.7V9.3A1.3 1.3 0 0 1 1.3 8z",fill:"#c43e1c"}}),e._v(" "),n("path",{attrs:{d:"M8 11a4.2 4.2 0 0 1 2.8.8 2.9 2.9 0 0 1 1 2.3 2.7 2.7 0 0 1-.6 1.6A3.2 3.2 0 0 1 10 17a4.6 4.6 0 0 1-2 .4h-2V21H4V11zm-2 4.7h1.6a2.2 2.2 0 0 0 1.5-.5 1.1 1.1 0 0 0 .5-1q0-1.6-1.9-1.6H6z",fill:"#f9f7f7"}}),e._v(" "),n("path",{attrs:{fill:"none",d:"M0 0h32v32H0z"}})]):"onenote"==t.icon?n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M9.3 2h21.4A1.3 1.3 0 0 1 32 3.3v25.4a1.3 1.3 0 0 1-1.3 1.3H9.3A1.3 1.3 0 0 1 8 28.7V3.3A1.3 1.3 0 0 1 9.3 2z",fill:"#ca64ea"}}),e._v(" "),n("path",{attrs:{d:"M32 3.3A1.3 1.3 0 0 0 30.7 2H9.3A1.3 1.3 0 0 0 8 3.3v25.4A1.3 1.3 0 0 0 9.3 30H25l7-21z",fill:"#ca64ea"}}),e._v(" "),n("path",{attrs:{fill:"#ae4bd5",d:"M32 9h-7v7l3.5 3.2L32 16V9z"}}),e._v(" "),n("path",{attrs:{fill:"#9332bf",d:"M32 16h-7v7l3.5 3.4L32 23v-7z"}}
1),e._v(" "),n("path",{attrs:{d:"M25 23h7v5.7a1.3 1.3 0 0 1-1.3 1.3H25v-7z",fill:"#7719aa"}}),e._v(" "),n("path",{attrs:{d:"M16.7 7H8v19h8.7a1.3 1.3 0 0 0 1.3-1.3V8.3A1.3 1.3 0 0 0 16.7 7z",opacity:".1"}}),e._v(" "),n("path",{attrs:{d:"M15.7 8H8v19h7.7a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 15.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M15.7 8H8v17h7.7a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 15.7 8z",opacity:".3"}}),e._v(" "),n("path",{attrs:{d:"M14.7 8H8v17h6.7a1.3 1.3 0 0 0 1.3-1.3V9.3A1.3 1.3 0 0 0 14.7 8z",opacity:".2"}}),e._v(" "),n("path",{attrs:{"data-name":"Back Plate",d:"M1.3 8h13.4A1.3 1.3 0 0 1 16 9.3v13.4a1.3 1.3 0 0 1-1.3 1.3H1.3A1.3 1.3 0 0 1 0 22.7V9.3A1.3 1.3 0 0 1 1.3 8z",fill:"#7719aa"}}),e._v(" "),n("path",{attrs:{d:"M4 11h2.1l3.7 6.7.4.7a9.5 9.5 0 0 1 0-1.3V11H12v10h-2l-3.8-6.6a5.1 5.1 0 0 1-.4-.7 13.6 13.6 0 0 1 0 1.4V21H4z",fill:"#fff"}}),e._v(" "),n("path",{attrs:{fill:"none",d:"M0 0h32v32H0z"}})]):"outlook"==t.icon?n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M28.596 2H11.404A1.404 1.404 0 0010 3.404V5l9.69 3L30 5V3.404A1.404 1.404 0 0028.596 2z",fill:"#0364b8"}}),e._v(" "),n("path",{attrs:{d:"M31.65 17.405A11.341 11.341 0 0032 16a.666.666 0 00-.333-.576l-.013-.008-.004-.002-10.838-6.175a1.499 1.499 0 00-.145-.082 1.5 1.5 0 00-1.334 0 1.49 1.49 0 00-.145.082L8.35 15.415l-.004.002-.012.007A.666.666 0 008 16a11.344 11.344 0 00.35 1.405l11.492 8.405z",fill:"#0a2767"}}),e._v(" "),n("path",{attrs:{fill:"#28a8ea",d:"M24 5h-7l-2.021 3L17 11l7 6h6v-6l-6-6z"}}),e._v(" "),n("path",{attrs:{fill:"#0078d4",d:"M10 5h7v6h-7z"}}),e._v(" "),n("path",{attrs:{fill:"#50d9ff",d:"M24 5h6v6h-6z"}}),e._v(" "),n("path",{attrs:{fill:"#0364b8",d:"M24 17l-7-6h-7v6l7 6 10.832 1.768L24 17z"}}),e._v(" "),n("path",{attrs:{fill:"none",d:"M10.031 5H30"}}),e._v(" "),n("path",{attrs:{fill:"#0078d4",d:"M17 11h7v6h-7z"}}),e._v(" "),n("path",{attrs:{fill:"#064a8c",d:"M10 17h7v6h-7z"}}),e._v(" "),n("path",{attrs:{fill:"#0078d4",d:"M24 17h6v6h-6z"}}),e._v(" "),n("path",{attrs:{d:"M20.19 25.218l-11.793-8.6.495-.87s10.745 6.12 10.909 6.212a.528.528 0 00.42-.012l10.933-6.23.496.869z",fill:"#0a2767",opacity:".5"}}),e._v(" "),n("path",{attrs:{d:"M31.667 16.577l-.014.008-.003.002-10.838 6.174a1.497 1.497 0 01-1.46.091l3.774 5.061 8.254 1.797v.004A1.498 1.498 0 0032 28.5V16a.666.666 0 01-.333.577z",fill:"#1490df"}}),e._v(" "),n("path",{attrs:{d:"M32 28.5v-.738l-9.983-5.688-1.205.687a1.497 1.497 0 01-1.46.091l3.774 5.061 8.254 1.797v.004A1.498 1.498 0 0032 28.5z",opacity:".05"}}),e._v(" "),n("path",{attrs:{d:"M31.95 28.883L21.007 22.65l-.195.11a1.497 1.497 0 01-1.46.092l3.774 5.061 8.254 1.797v.004a1.501 1.501 0 00.57-.83z",opacity:".1"}}),e._v(" "),n("path",{attrs:{d:"M8.35 16.59v-.01h-.01l-.03-.02A.65.65 0 018 16v12.5A1.498 1.498 0 009.5 30h21a1.503 1.503 0 00.37-.05.637.637 0 00.18-.06.142.142 0 00.06-.02 1.048 1.048 0 00.23-.13c.02-.01.03-.01.04-.03z",fill:"#28a8ea"}}),e._v(" "),n("path",{attrs:{d:"M18 24.667V8.333A1.337 1.337 0 0016.667 7H10.03v7.456l-1.68.958-.005.002-.012.007A.666.666 0 008 16v.005V16v10h8.667A1.337 1.337 0 0018 24.667z",opacity:".1"}}),e._v(" "),n("path",{attrs:{d:"M17 25.667V9.333A1.337 1.337 0 0015.667 8H10.03v6.456l-1.68.958-.005.002-.012.007A.666.666 0 008 16v.005V16v11h7.667A1.337 1.337 0 0017 25.667z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M17 23.667V9.333A1.337 1.337 0 0015.667 8H10.03v6.456l-1.68.958-.005.002-.012.007A.666.666 0 008 16v.005V16v9h7.667A1.337 1.337 0 0017 23.667z",opacity:".2"}}),e._v(" "),n("path",{attrs:{d:"M16 23.667V9.333A1.337 1.337 0 0014.667 8H10.03v6.456l-1.68.958-.005.002-.012.007A.666.666 0 008 16v.005V16v9h6.667A1.337 1.337 0 0016 23.667z",opacity:".2"}}),e._v(" "),n("path",{attrs:{"data-name":"Back Plate",d:"M1.333 8h13.334A1.333 1.333 0 0116 9.333v13.334A1.333 1.333 0 0114.667 24H1.333A1.333 1.333 0 010 22.667V9.333A1.333 1.333 0 011.333 8z",fill:"#0078d4"}}),e._v(" "),n("path",{attrs:{d:"M3.867 13.468a4.181 4.181 0 011.642-1.814A4.965 4.965 0 018.119 11a4.617 4.617 0 012.413.62 4.14 4.14 0 011.598 1.733 5.597 5.597 0 01.56 2.55 5.901 5.901 0 01-.577 2.666 4.239 4.239 0 01-1.645 1.794A4.8 4.8 0 017.963 21a4.729 4.729 0 01-2.468-.627 4.204 4.204 0 01-1.618-1.736 5.459 5.459 0 01-.567-2.519 6.055 6.055 0 01.557-2.65zm1.75 4.258a2.716 2.716 0 00.923 1.194 2.411 2.411 0 001.443.435 2.533 2.533 0 001.541-.449 2.603 2.603 0 00.897-1.197 4.626 4.626 0 00.286-1.665 5.063 5.063 0 00-.27-1.686 2.669 2.669 0 00-.866-1.24 2.387 2.387 0 00-1.527-.473 2.493 2.493 0 00-1.477.439 2.741 2.741 0 00-.944 1.203 4.776 4.776 0 00-.007 3.44z",fill:"#fff"}}),e._v(" "),n("path",{attrs:{fill:"none",d:"M0 0h32v32H0z"}})]):n("span",{staticClass:"default-icon",style:{"background-color":e.stringToColor(t.name,90,75)}},[n("span",{staticClass:"initial",style:{"background-color":e.stringToColor(t.name,100,50)}},[e._v("\n                  "+e._s(e.getInitials(t.name))+"\n              ")])])])})),0)},s=[]},530:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("Log ind i Vikarlæggeren")]),e._v(" "),e.loginFailed?n("div",{staticStyle:{"padding-top":"1rem"}},[n("b-alert",{attrs:{show:e.loginFailed,dismissible:"",variant:"danger"},on:{dismissed:function(t){e.loginFailed=!1}}},[n("p",[e._v("Kunne ikke logge ind i vikarlæggeren, kontakt Substy's support.")])])],1):e._e(
1),e._v(" "),n("div",{staticStyle:{"padding-top":"1rem"}},[n("b-button",{on:{click:e.doLogin}},[e.isLoading?n("i",{staticClass:"fa fa-spinner fa-spin"}):n("span",[e._v("Log ind")])])],1)])},s=[]},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"minFormDivCSS"},[e.tokenLoaded?n("form",{ref:"kalendaForm",attrs:{action:"https://secure.kalenda.dk/auth/realms/Kalenda/protocol/openid-connect/auth/",method:"post",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"response_type",value:"code"}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"response_mode",value:"fragment"}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"redirect_uri",value:"https://login.kalenda.dk/Kalenda/"}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"scope",value:"openid"}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"client_id",value:"Kalenda"}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}})]):e._e(),e._v(" "),n("img",{staticClass:"center",attrs:{src:"https://img.kalenda.dk/aula/Kalenda_cmyk_uden_payoff.svg",alt:"Kalenda - Tid til det vigtige. Skemalægningsprogram"},on:{click:e.submit}})])},s=[]},532:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{display:"inline-block",width:"100%"}},[n("b-alert",{attrs:{variant:"danger"},model:{value:e.userNotLinked,callback:function(t){e.userNotLinked=t},expression:"userNotLinked"}},[e._v("Din AULA-bruger er ikke knyttet sammen med nogen Kalenda-bruger - kontakt\n    din leder eller ring til Greenbyte på 70 27 70 47.")]),e._v(" "),n("div",{staticStyle:{"font-size":"18px"}},[e._v("\n    KALENDA\n    "),e.showLoginList?n("b-form-select",{on:{change:function(t){return e.setUserLoginDetails()}},model:{value:e.selectedLogin,callback:function(t){e.selectedLogin=t},expression:"selectedLogin"}},e._l(e.loginList,(function(t){return n("option",{key:t.value.userId,domProps:{value:t.value}},[e._v("\n        "+e._s(t.text)+"\n      ")])})),0):e._e()],1),e._v(" "),n("div",{staticClass:"button-bar"},[n("div",{class:{active:e.state==e.states.absence},on:{click:function(t){return e.switchTab(e.states.absence)}}},[e._v("\n      Fravær\n    ")]),e._v(" "),n("div",{class:{active:e.state==e.states.flex},on:{click:function(t){return e.switchTab(e.states.flex)}}},[e._v("\n      Flex\n    ")]),e._v(" "),n("div",{class:{active:e.state==e.states.oetid},on:{click:function(t){return e.switchTab(e.states.oetid)}}},[e._v("\n      Ø-tid\n    ")]),e._v(" "),n("div",{class:{active:e.state==e.states.vacation},on:{click:function(t){return e.switchTab(e.states.vacation)}}},[e._v("\n      Ferie\n    ")]),e._v(" "),n("div",{class:{active:e.state==e.states.history},on:{click:function(t){e.switchTab(e.states.history),e.showHistory()}}},[e._v("\n      Historik\n    ")])]),e._v(" "),e.state==e.states.absence?n("div",[n("b-form-group",{attrs:{label:"Dato"}},[n("el-date-picker",{attrs:{clearable:!1},model:{value:e.absenceDate,callback:function(t){e.absenceDate=t},expression:"absenceDate"}})],1),e._v(" "),n("b-form-group",{attrs:{label:"Årsag"}},[n("b-form-select",{attrs:{options:e.absenceCauses},model:{value:e.selectedAbsenceCause,callback:function(t){e.selectedAbsenceCause=t},expression:"selectedAbsenceCause"}})],1),e._v(" "),n("b-form-group",{attrs:{label:"Beskrivelse"}},[n("b-form-input",{attrs:{type:"text"},model:{value:e.absenceDescription,callback:function(t){e.absenceDescription=t},expression:"absenceDescription"}})],1),e._v(" "),"false"==e.absenceManualHours?n("b-form-group",{attrs:{label:"Timer",description:"0 timer betyder hele dagen"}},[n("b-form-input",{attrs:{type:"number"},model:{value:e.absenceHours,callback:function(t){e.absenceHours=t},expression:"absenceHours"}}
1)],1):e._e(),e._v(" "),"true"==e.absenceManualHours?n("b-form-group",{attrs:{label:"Fra - til"}},[n("el-time-picker",{attrs:{"is-range":"","start-placeholder":"Fra","end-placeholder":"Til","picker-options":{step:"00:15"}},model:{value:e.absenceTimePicker,callback:function(t){e.absenceTimePicker=t},expression:"absenceTimePicker"}})],1):e._e(),e._v(" "),n("b-form-checkbox",{attrs:{value:"true","unchecked-value":"false"},model:{value:e.absenceManualHours,callback:function(t){e.absenceManualHours=t},expression:"absenceManualHours"}},[e._v("Vis fra og til")]),e._v(" "),n("b-form-checkbox",{attrs:{value:"true","unchecked-value":"false"},model:{value:e.absencePeriodeCheckbox,callback:function(t){e.absencePeriodeCheckbox=t},expression:"absencePeriodeCheckbox"}},[e._v("Fravær over periode")]),e._v(" "),"true"==e.absencePeriodeCheckbox?n("b-form-group",{attrs:{label:"Slutdato"}},[n("el-date-picker",{attrs:{clearable:!1},model:{value:e.absenceEndDate,callback:function(t){e.absenceEndDate=t},expression:"absenceEndDate"}})],1):e._e()],1):e._e(),e._v(" "),e.state==e.states.flex?n("div",[n("label",[e._v("\n      Flexsaldo:\n      "),n("b",[e._v(e._s(e.flexSaldo))])]),e._v(" "),n("b-form-group",{attrs:{label:"Dato"}},[n("el-date-picker",{attrs:{clearable:!1,id:"flexDate"},model:{value:e.flexDate,callback:function(t){e.flexDate=t},expression:"flexDate"}})],1),e._v(" "),n("b-form-group",[n("b-form-radio",{attrs:{value:"less"},model:{value:e.flexType,callback:function(t){e.flexType=t},expression:"flexType"}},[e._v("Afspadsering")]),e._v(" "),n("b-form-radio",{attrs:{value:"more"},model:{value:e.flexType,callback:function(t){e.flexType=t},expression:"flexType"}},[e._v("Merarbejde")])],1),e._v(" "),"false"==e.flexManualHours?n("b-form-group",{attrs:{label:"Timer"}},[n("b-form-input",{attrs:{type:"number",placeholder:"Timer"},model:{value:e.flexHours,callback:function(t){e.flexHours=t},expression:"flexHours"}})],1):e._e(),e._v(" "),"true"==e.flexManualHours?n("b-form-group",{attrs:{label:"Fra - til"}},[n("el-time-picker",{attrs:{"is-range":"","start-placeholder":"Fra","end-placeholder":"Til","picker-options":{step:"00:15"}},model:{value:e.flexTimePicker,callback:function(t){e.flexTimePicker=t},expression:"flexTimePicker"}})],1):e._e(),e._v(" "),n("b-form-checkbox",{attrs:{value:"true","unchecked-value":"false"},model:{value:e.flexManualHours,callback:function(t){e.flexManualHours=t},expression:"flexManualHours"}},[e._v("Vis fra og til")]),e._v(" "),n("b-form-group",{attrs:{label:"Evt. beskrivelse"}},[n("b-form-input",{attrs:{placeholder:"Evt. beskrivelse"},model:{value:e.flexDescription,callback:function(t){e.flexDescription=t},expression:"flexDescription"}})],1)],1):e._e(),e._v(" "),e.state==e.states.oetid?n("div",[n("b-form-group",{attrs:{label:"Dato"}},[n("el-date-picker",{attrs:{clearable:!1,id:"oetidDate"},model:{value:e.oetidDate,callback:function(t){e.oetidDate=t}
1,expression:"oetidDate"}})],1),e._v(" "),"false"==e.oetidManualHours?n("b-form-group",{attrs:{label:"Timer"}},[n("b-form-input",{attrs:{type:"number",placeholder:"Timer"},model:{value:e.oetidHours,callback:function(t){e.oetidHours=t},expression:"oetidHours"}})],1):e._e(),e._v(" "),"true"==e.oetidManualHours?n("b-form-group",{attrs:{label:"Fra - til"}},[n("el-time-picker",{attrs:{"is-range":"","start-placeholder":"Fra","end-placeholder":"Til","picker-options":{step:"00:15"}},model:{value:e.oetidTimePicker,callback:function(t){e.oetidTimePicker=t},expression:"oetidTimePicker"}})],1):e._e(),e._v(" "),n("b-form-checkbox",{attrs:{value:"true","unchecked-value":"false"},model:{value:e.oetidManualHours,callback:function(t){e.oetidManualHours=t},expression:"oetidManualHours"}},[e._v("Vis fra og til")]),e._v(" "),n("b-form-group",{attrs:{label:"Ø-tid type"}},[n("b-form-select",{attrs:{options:e.oetidTypes},model:{value:e.selectedOetidType,callback:function(t){e.selectedOetidType=t},expression:"selectedOetidType"}})],1),e._v(" "),n("b-form-group",{attrs:{label:"Evt. beskrivelse"}},[n("b-form-input",{attrs:{placeholder:"Evt. beskrivelse"},model:{value:e.oetidDescription,callback:function(t){e.oetidDescription=t}
1,expression:"oetidDescription"}})],1)],1):e._e(),e._v(" "),e.state==e.states.vacation?n("div",[n("b-form-group",{attrs:{label:"Fra"}},[n("el-date-picker",{attrs:{clearable:!1},model:{value:e.vacationStartDate,callback:function(t){e.vacationStartDate=t},expression:"vacationStartDate"}})],1),e._v(" "),n("b-form-group",{attrs:{label:"Til"}},[n("el-date-picker",{attrs:{clearable:!1},model:{value:e.vacationEndDate,callback:function(t){e.vacationEndDate=t},expression:"vacationEndDate"}})],1),e._v(" "),n("b-form-group",[n("b-form-radio",{attrs:{value:"1"},model:{value:e.vacationType,callback:function(t){e.vacationType=t},expression:"vacationType"}},[e._v("Almindelig ferie")]),e._v(" "),n("b-form-radio",{attrs:{value:"2"},model:{value:e.vacationType,callback:function(t){e.vacationType=t},expression:"vacationType"}},[e._v("Feriefridage")]),e._v(" "),n("b-form-radio",{attrs:{value:"3"},model:{value:e.vacationType,callback:function(t){e.vacationType=t},expression:"vacationType"}},[e._v("Selvbetalt ferie")])],1),e._v(" "),n("b-form-group",{attrs:{label:"Evt. beskrivelse"}},[n("b-form-input",{attrs:{placeholder:"Evt. beskrivelse"},model:{value:e.vacationDescription,callback:function(t){e.vacationDescription=t},expression:"vacationDescription"}})],1)],1):e._e(),e._v(" "),e.state==e.states.receipt?n("div",{staticStyle:{"text-align":"center"}},[n("b",{staticStyle:{color:"#45b7c1","font-size":"18px"}},[e._v(e._s(e.receiptTitle))]),e._v(" "),n("div",[e._v(e._s(e.receiptText))]),e._v(" "),n("b-button",{staticClass:"mt-2",attrs:{size:"sm"},on:{click:function(t){return e.closeReceipt()}}},[e._v("Luk")])],1):e._e(),e._v(" "),e.state==e.states.history?n("div",{staticStyle:{height:"450px",display:"flex","flex-direction":"column"}},[n("div",{staticStyle:{flex:"1","overflow-y":"scroll"}},[e.loadingHistory||0!=e.historyData.length?e._e():n("div",[e._v("\n        Intet at vise\n      ")]),e._v(" "),e.loadingHistory?n("div",[n("b-spinner",{attrs:{label:"Spinning"}})],1):e._e(),e._v(" "),n("div",e._l(e.historyData,(function(t){return n("div",{key:t.key},["vacation"==t.type?n("div",{staticClass:"history-item"},[n("div",{staticStyle:{"font-weight":"bold"}},[e._v("Ferie")]),e._v(" "),n("div",[e._v("\n              fra "+e._s(e.msToDateStr(t.obj.startDate))+" til\n              "+e._s(e.msToDateStr(t.obj.endDate))+"\n            ")])]):e._e(),e._v(" "),"absence"==t.type?n("div",{staticClass:"history-item"},[n("div",[n("b",[e._v("Fravær,")]),e._v(" "+e._s(e.msToDateStr(t.obj.date)))]),e._v(" "),n("div",[e._v(e._s(t.obj.string))])]):e._e(),e._v(" "),"flex"==t.type?n("div",{staticClass:"history-item"},[n("div",[n("b",[e._v("Flex,")]),e._v(" "+e._s(e.msToDateStr(t.obj.date)))]),e._v(" "),n("div",[e._v(e._s(t.obj.string))])]):e._e(),e._v(" "),"oetid"==t.type?n("div",{staticClass:"history-item"},[n("div",[n("b",[e._v("Ø-tid,")]),e._v(" "+e._s(e.msToDateStr(t.obj.date)))]),e._v(" "),n("div",[e._v(e._s(t.obj.string))])]):e._e()])})),0)]),e._v(" "),n("div",[e.historyFromDateStr&&e.historyToDateStr?n("div",[e._v("\n        Data fra "+e._s(e.historyFromDateStr)+" og frem\n      ")]):e._e()])]):e._e(),e._v(" "),e.state==e.states.receipt||e.state==e.states.history||e.userNotLinked?e._e():n("div",{staticClass:"mt-2"},[n("b-alert",{attrs:{variant:"danger",dismissible:""},model:{value:e.showError,callback:function(t){e.showError=t},expression:"showError"}},[e._v(e._s(e.error))]),e._v(" "),n("div",{staticStyle:{"text-align":"right"}},[n("b-button",{attrs:{variant:"primary",size:"sm"},on:{click:function(t){return e.submit()}}},[e._v("Anmod")])],1)],1)],1)},s=[]},533:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}}
1)],1)]):e._e(),e._v(" "),n("section",{directives:[{name:"show",rawName:"v-show",value:"default"==e.section&&!e.loading,expression:"section=='default' && !loading"}]},e._l(e.item.Binder.Tile,(function(t){return n("div",{key:t.Type},[e.item.Binder.InspectionTile&&36===t.Type?n("div",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#96be2c"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-clipboard"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[e._v("\n              "+e._s(e.item.Binder.InspectionTile.Header)+"\n            ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[void 0!==e.item.Binder.InspectionTile.Inspection?n("div",[e.item.Binder.InspectionTile.Inspection.VisitDate?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[n("div",[e._v("Næste tilsyn")])]):e._e(),e._v(" "),e.item.Binder.InspectionTile.Inspection.VisitDate?n("div",{staticClass:"infoba-accordeon-row",staticStyle:{border:"none","background-color":"#FAFAFA"}},[n("div",{staticStyle:{display:"flex","align-items":"center","padding-left":"15px","padding-bottom":"20px"}},[n("div",{staticClass:"icon-calendar-green",staticStyle:{padding:"20px 10px 0 20px"}}),e._v(" "),null!=e.item.Binder.InspectionTile.Inspection.InspectionId?n("div",{staticClass:"infoba-link",staticStyle:{"font-size":"16px",color:"#555555 !important"},on:{click:function(t){return e.goto(e.domain+"/IN/Inspection/Index/"+e.item.Binder.Tile.Inspection.InstitutionId)}}},[n("b",[e._v(e._s(e.moment(e.item.Binder.InspectionTile.Inspection.VisitDate).format("DD.MMMM.")))]),e._v(" "+e._s(e.moment(e.item.Binder.InspectionTile.Inspection.VisitDate).format("YYYY"))+"\n                ")]):e._e()])]):e._e(),e._v(" "),0!=e.item.Binder.InspectionTile.Inspection.DevelopmentPointList.length?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticStyle:{color:"#555555"}},[n("b",[e._v(e._s(e.item.Binder.InspectionTile.TileSettings.InstitutionSettings.InspectionDevelopmentPointNamePlural))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:e.open},staticStyle:{cursor:"pointer","padding-left":"48px"},on:{click:function(t){e.open=!e.open}}})]):e._e(),e._v(" "),0!=e.item.Binder.InspectionTile.Inspection.DevelopmentPointList.length?n("div",[e._l(e.item.Binder.InspectionTile.Inspection.DevelopmentPointList,(function(t){return[n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}]},[n("div",{staticClass:"infoba-accordeon-row",staticStyle:{"padding-left":"24px","padding-right":"20px","align-items":"center"}},[n("div",{staticStyle:{cursor:"pointer"},on:{click:function(n){return e.goto(e.domain+"/IN/Inspection/ActionPlan/"+t.ActionPlanRef.ActionPlanId+"?devPointId="+t.DevelopmentPointId+"&institutionId="+e.item.Binder.InspectionTile.Inspection.InstitutionId+"&inspectionId="+t.InspectionId)}}},[n("b",[e._v(e._s(t.Title))])]),e._v(" "),n("div",{staticClass:"icon-status-dot",style:e.getColor(t.ActionPlanRef.Status)})]),e._v(" "),n("div",{staticClass:"infoba-accordeon-row infoba-gray",staticStyle:{"padding-left":"24px","padding-right":"20px","align-items":"center"}},[n("div",[n("b",[e._v("Frist:")]),e._v(" "+e._s(e.moment(t.ClosingDate).format("DD.MMM.YYYY")))]),e._v(" "),n("div",[e._v(e._s(e.item.Binder.InspectionTile.Inspection.InspectionSelectedType.SeverityList[t.SeverityId].Name))])])])])]}))],2):n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n              Vi har ikke noget relevant data at vise dig.\n            ")])]):e._e()])]):e._e(),e._v(" "),e.item.Binder.LearningplatformTile&&40===t.Type?n("div",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#873C79"}},[n("div",{on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[n("i",{staticClass:"font-awesome-header fas fa-list"}),e._v(" "),n("span",{staticClass:"header-link"},[e._v("Læringsplatform")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[n("div",{staticStyle:{height:"auto"}},[0==e.learningplatformHeaders.length?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n              Vi har ikke noget relevant data at vise dig.\n            ")]):e._e(
1),e._v(" "),e._l(e.learningplatformHeaders,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center",width:"100%"}},[n("div",{staticClass:"theme-circle"},[e._v("\n                    "+e._s(t.Project.ActivityList.length)+"\n                  ")]),e._v(" "),n("widget-html",{staticClass:"ellipsis",staticStyle:{cursor:"pointer",width:"80%","font-weight":"bold"},attrs:{html:t.Project.Name},on:{click:function(n){return e.goto(e.domain+"/IN/ProjectPlan/ProjectView/"+t.Project.ProjectId)}}})],1),e._v(" "),t.Project.ActivityList.length>0?n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}}):e._e()]),e._v(" "),n("div",[e._l(t.Project.ActivityList,(function(i){return[n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"project.Open"}],staticClass:"infoba-accordeon-row",staticStyle:{border:"none","padding-left":"58px","padding-right":"45px"}},[n("div",{staticClass:"ellipsis",staticStyle:{cursor:"pointer",width:"100%"},on:{click:function(n){return e.goto(e.domain+"/IN/ProjectPlan/Activity/"+i.ActivityId+"?pid="+t.Project.ProjectId)}}},[n("widget-html",{attrs:{html:i.Name}})],1)])])]}))],2)]}))],2)])]):e._e(),e._v(" "),e.item.Binder.ProjectschemaTile&&123===t.Type?n("div",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#96BE2C"}},[n("div",{on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[n("i",{staticClass:"font-awesome-header fas fa-list"}),e._v(" "),n("span",{staticClass:"header-link"},[e._v(e._s(t.Header))])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[n("div",{staticStyle:{height:"auto"}},[0==e.projectschemaHeaders.length?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n              Vi har ikke noget relevant data at vise dig.\n            ")]):e._e(),e._v(" "),e._l(e.projectschemaHeaders,(function(t){return[n("div",{key:t.Schema1.ProjectSchema1Id,staticClass:"infoba-accordeon-header",staticStyle:{"padding-top":"0","align-items":"center"}},[n("div",{staticStyle:{display:"flex","align-items":"baseline",cursor:"pointer",width:"90%"}},[n("div",{staticClass:"theme-circle",staticStyle:{"flex-shrink":"0","background-color":"#96BE2C"}},[e._v("\n                    "+e._s(t.Schema2.length)+"\n                  ")]),e._v(" "),n("div",{staticClass:"ellipsis"},[""!=t.Schema1.ProjectTitle?n("b",[n("widget-html",{staticClass:"ellipsis",attrs:{html:t.Schema1.ProjectTitle.replace("<p>","").replace("</p>","")},on:{click:function(n){return e.goto(e.domain+"/IN/ProjectSchema/Schema1/"+t.Schema1.ProjectSchema1Id)}}})],1):n("b",{on:{click:function(n){return e.goto(e.domain+"/IN/ProjectSchema/Schema1/"+t.Schema1.ProjectSchema1Id)}}},[e._v("Skema for retning")])])]),e._v(" "),t.Schema2.length>0?n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}}):e._e()]),e._v(" "),n("div",{key:t.Schema1.ProjectSchema1Id+"act",staticStyle:{"background-color":"#FFFFFF"}},[e._l(t.Schema2,(function(i){return[n("transition",{key:i.ProjectSchema2Id,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"project.Open"}],staticStyle:{border:"none"}},[n("div",{staticStyle:{display:"flex","align-items":"baseline","justify-content":"space-between",padding:"10px 0 10px 0"}},[n("div",{staticClass:"ellipsis",staticStyle:{cursor:"pointer","margin-left":"33px"},on:{click:function(n){return e.goto(e.domain+"/IN/ProjectSchema/Schema2/"+i.ProjectSchema2Id+"?schema1Id="+t.Schema1.ProjectSchema1Id)}}},[null!=i.ProjectTitle?n("widget-html",{staticClass:"ellipsis",attrs:{html:i.ProjectTitle.replace("<p>","").replace("</p>","")}}):n("p",[e._v("\n                            Titel ikke udfyldt\n                          ")])],1),e._v(" "),n("div",{staticClass:"icon-status-dot",staticStyle:{"background-color":"orange","margin-left":"8px","margin-right":"15px","flex-shrink":"0"}})])])])]}))],2)]}
1))],2)])]):e._e(),e._v(" "),e.item.Binder.FocusChildTile&&56===t.Type?n("div",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-eye"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[e._v("\n              Fokusbarnskema\n            ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[0==e.focusChildHeaders.length?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n            Vi har ikke noget relevant data at vise dig.\n          ")]):e._e(),e._v(" "),n("div",{staticClass:"infoba-content"},[e._l(e.focusChildHeaders,(function(t){return[n("div",{staticClass:"infoba-accordeon-header"},[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n                    "+e._s(t.ChildList.length)+"\n                  ")]),e._v(" "),n("b",[e._v(e._s(e.moment(t.ScheduledDate).format("DD. MMM ")))]),e._v(" "+e._s(e.moment(t.ScheduledDate).format("YYYY"))+"\n                ")]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),e._l(t.ChildList,(function(i){return[n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"dd.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","flex-direction":"column","flex-grow":"1"}},[n("div",{staticStyle:{display:"flex","flex-direction":"column"}},[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle-big",style:{backgroundColor:"#"+i.ThemeColor}},[n("widget-html",{attrs:{html:e._f("firstLetter")(i.ThemeName)}})],1),e._v(" "),n("div",{staticClass:"ellipsis",staticStyle:{width:"200px","margin-left":"3px",cursor:"pointer"},on:{click:function(t){return e.goto(e.domain+"/IN/FocusChild?rtmip=56&rid=0&tid="+i.ThemeId+"&gid="+i.GoalId+"&cid="+i.FocusChild.ChildId)}}},[n("div",{staticClass:"infoba-link ellipsis"},[n("widget-html",{attrs:{html:i.FocusChild.Name}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:i.DAPSchema2Name.length>0,expression:"focusChildSchema.DAPSchema2Name.length>0"}],staticStyle:{"border-bottom":"solid 1px #ccc","padding-bottom":"5px","font-size":"15px","font-weight":"bold"}},[n("widget-html",{staticClass:"ellipsis",attrs:{html:i.DAPSchema2Name}})],1),e._v(" "),n("widget-html",{attrs:{html:i.GoalName}})],1)])])])])])]}))]}))],2)])]):e._e(),e._v(" "),e.item.Binder.PTCMeetingTile&&95===t.Type?n("div",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#96be2c"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-house-solid"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain+"/IN/PTCMeeting/")}}},[e._v("\n              "+e._s(t.Header)+"\n            ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),0==t.PTCMeeting.MeetingList.length?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n          Vi har ikke noget relevant data at vise dig.\n        ")]):e._e(),e._v(" "),n("div",{staticClass:"infoba-quick-access-item",staticStyle:{height:"auto"}},[n("div",{staticClass:"infoba-content"},[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-top":"0","align-items":"center",border:"none","padding-left":"10px"}},[e._m(1,!0),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:e.open},staticStyle:{cursor:"pointer"},on:{click:function(t){e.open=!e.open}}})]),e._v(" "),n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],staticStyle:{border:"none"}},e._l(t.PTCMeeting.MeetingList,(function(t){return n("div",{staticClass:"infoba-row",staticStyle:{border:"none","flex-direction":"column"}},[n("div",[null!=t.MeetingDate?n("div",{staticClass:"infoba-gray"},[e._v("\n                      "+e._s(e.moment(t.MeetingDate).format("DD. MMM YYYY"))+" kl. "+e._s(e.moment(t.MeetingDate).format("hh:mm"))+"\n                    ")]):e._e(
1),e._v(" "),n("div",{class:0==t.MeetingTypeId?"infoba-gray":"infoba-link",staticStyle:{color:"#555 !important","border-bottom":"solid 1px #ccc",width:"100%"},on:{click:function(n){e.goto(e.getPTCMeetingLink(t))}}},[0==t.MeetingTypeId?n("b",[e._v(e._s(t.Child.FullName)+" (Ukendt)")]):n("b",[e._v(e._s(t.Child.FullName)+"  ("+e._s(t.Child.AgeInMonthsText+" år")+")")])])]),e._v(" "),n("div",{staticStyle:{display:"flex","justify-content":"space-between","align-content":"center","margin-top":"5px","margin-bottom":"10px"}},[n("div",[e._v(" "+e._s(t.MeetingType))]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center"}},[t.MeetingId>0?n("span",{class:e.getReflectionColor(t)},[n("i",{staticClass:"fas fa-user",staticStyle:{cursor:"pointer"},on:{click:function(n){e.goto(e.domain+"/IN/PTCMeeting/Reflection/"+t.Child.ChildId+"?meetingId="+(null==t.MeetingId?0:t.MeetingId)+"&meetingTypeId="+t.MeetingTypeId)}}})]):n("span",{class:e.getReflectionColor(t)},[n("i",{staticClass:"fas fa-user"})]),e._v(" "),n("div",{class:e.getParentColor(t)}),e._v(" "),null!=t.MeetingDateSent?n("div",{class:e.getConclusionColor(t),staticStyle:{cursor:"pointer"},on:{click:function(n){e.goto(e.domain+"/IN/PTCMeeting/Conclusion/"+t.Child.ChildId+"?meetingId="+(null==t.MeetingId?0:t.MeetingId))}}}):n("div",{class:e.getConclusionColor(t)}),e._v(" "),t.MeetingId>0?n("span",{class:e.getHistoryColor(t)},[n("i",{staticClass:"far fa-clock",staticStyle:{cursor:"pointer"},on:{click:function(n){e.goto(e.domain+"/IN/PTCMeeting/History/"+t.Child.ChildId+"?meetingId="+(null==t.MeetingId?0:t.MeetingId))}}})]):n("span",{class:e.getHistoryColor(t)},[n("i",{staticClass:"far fa-clock"})])])])])})),0)])],1)])]):e._e(),e._v(" "),24===t.Type||26===t.Type||28===t.Type||30===t.Type||70===t.Type||124===t.Type?n("div",[n("div",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=t.Type?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==t.Type?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[e._v("\n                "+e._s(t.Header)+"\n              ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),null!==t.SpfTile?n("div",{staticClass:"wrapper"},[124!=t.Type?n("div",[t.SpfTile.ReminderList.length?n("div",[e._m(2,!0),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(t.SpfTile.ReminderList,(function(i){return n("div",{key:i.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(t.Header)+" "+e._s(i.Description)+" ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+t.TypeId)}}},[e._v("\n                          "+e._s(i.ChildName)+"\n                        ")])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(t){return e.dismissReminder(i.ReminderId,i.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("div",{staticClass:"icon-bell-off",staticStyle:{"margin-right":"9px","background-size":"18px","margin-left":"5px"}})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers.filter((function(e){return e.TileType===t.Type})),(function(i){return[n("div",{key:t.Type+"_"+i.Count+"_"+i.Month,staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"23px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n                    "+e._s(i.Count)+"\n                  ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(i.Month))))]),e._v(e._s(e._f("getYear")(i.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:i.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){i.Open=!i.Open}}})]),e._v(" "),e._l(i.ChildList,(function(s){return n("div",{key:t.Type+"_"+i.C
1ount+"_"+i.Month+"_"+s.ChildId},[n("transition",{key:s.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:i.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+s.ChildId+"?spfTypeId="+t.SpfTile.TypeId)}}},[e._v("\n                        "+e._s(s.Name)+"\n                      ")]),e._v(" "),n("span",{class:"none"!=s.Reminder?"icon-alarm-"+s.Reminder:""},[n("i",{class:"none"!=s.Reminder?"far fa-alarm-clock":""})])])])])],1)}))]}))],2):null!==t.TrvslTile?n("div",{staticClass:"wrapper"},[e._l(e.headers.filter((function(e){return e.TileType===t.Type})),(function(i){return[n("div",{key:t.Type+"_"+i.Count+"_"+i.Month,staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"23px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n                    "+e._s(i.Count)+"\n                  ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(i.Month))))]),e._v(e._s(e._f("getYear")(i.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:i.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){i.Open=!i.Open}}})]),e._v(" "),e._l(i.ChildList,(function(s){return n("div",{key:t.Type+"_"+i.Count+"_"+i.Month+"_"+s.ChildId},[n("transition",{key:s.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:i.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+s.ChildId)}}},[e._v("\n                        "+e._s(s.Name)+"\n                      ")]),e._v(" "),n("span",{class:e.statusColor(s.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})])])])])],1)}))]}))],2):n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n            Vi har ikke noget relevant data at vise dig.\n          ")])])]):e._e(),e._v(" "),e.item.Binder.LearningPlanTile&&60===t.Type?n("div",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#425D82"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-book"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[e._v("\n              "+e._s(t.Header)+"\n            ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),0==t.LearningPlanV2.ChangesSections.length?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n          Vi har ikke noget relevant data at vise dig.\n        ")]):e._e(),e._v(" "),e._l(t.LearningPlanV2.ChangesSections,(function(t){return[n("div",{staticClass:"infoba-accordeon-row",staticStyle:{"padding-top":"0","margin-bottom":"7px"}},[n("div",{staticStyle:{padding:"16px"}},[n("p",{staticStyle:{"margin-bottom":"0px",color:"#888888","font-size":"12px"}},[e._v("\n                "+e._s(e.moment(t.UpdatedDate).format("DD.MMM.YYYY"))+"\n              ")]),e._v(" "),n("p",{staticClass:"ellipsis",staticStyle:{"margin-bottom":"0px"}},[n("b",[e._v(e._s(t.SectionName))])])])])]}))],2):e._e(),e._v(" "),e.item.Binder.LearningLibraryTile&&200===t.Type?n("div",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#425D82"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-bookshelf"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[e._v("\n              "+e._s(t.Header)+"\n            ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),0==e.item.Binder.LearningLibraryTile.ChildrenList.length?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n          Vi har ikke noget relevant data at vise dig.\n        ")]):e._e(
1),e._v(" "),n("div",{staticClass:"wrapper",staticStyle:{"margin-top":"10px"}},[n("div",{staticStyle:{height:"auto"}},[e._l(e.item.Binder.LearningLibraryTile.ChildrenList,(function(t){return[n("div",{staticClass:"infoba-accordeon-row",staticStyle:{cursor:"pointer"},style:{paddingTop:"0px",marginBottom:"7px",borderLeft:"4px solid "+t.Color},on:{click:function(n){return e.goto(e.domain+"/IN/LearningLibrary/Content/"+t.LearningLibraryId+"?pid="+t.ParentId+"&fvid="+t.FVId)}}},[n("div",{staticStyle:{padding:"16px"}},[n("p",{staticClass:"infoba-gray"},[e._v("\n                    "+e._s(e.moment(t.PublishedDate).format("DD.MMM YYYY"))+"\n                  ")]),e._v(" "),n("p",{staticClass:"topicheader"},[e._v("\n                    "+e._s(t.HeaderText)+"\n                  ")])])])]}))],2)])]):e._e(),e._v(" "),e.item.Binder.KOMPASListTile&&80===t.Type?n("div",[n("div",{staticClass:"infoba-header",style:{backgroundColor:e.backgroundColor}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-kompas"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[e._v("\n              "+e._s(t.Header)+"\n            ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),0==e.item.Binder.KOMPASListTile.GroupList.length?n("div",[n("div",{staticClass:"infoba-quick-access-item"},[e._v("\n            En ny aktivitetsperiode er begyndt og du er endnu ikke tilknyttet en KOMPAS-gruppe.\n          ")])]):n("div",{staticClass:"wrapper"},[e._l(e.item.Binder.KOMPASListTile.GroupList,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v(e._s(t.Texts[0].Header))])])]),e._v(" "),0==t.isLocked?n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}}):n("i",{staticClass:"far fa-lock-alt"})]),e._v(" "),n("div",[e._l(t.ChildrenGroupList,(function(i){return[n("transition",{key:i.ChildName,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1"}},[n("div",{staticClass:"theme-circle",style:{backgroundColor:t.Texts[0].ThemeColor,marginLeft:"20px"}},[e._v("\n                        "+e._s(i.Fills)+"\n                      ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.item.Binder.KOMPASListTile.TypeId)}}},[e._v("\n                        "+e._s(i.ChildName)+"\n                      ")])])])])]}))],2)]}))],2)]):e._e(),e._v(" "),e.item.Binder.KOMPASProcessTile&&81===t.Type?n("div",[n("div",{staticClass:"infoba-header",style:{backgroundColor:e.backgroundColorProcess}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-kompas"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(n){e.goto(e.headerLinkF(t.Type).url)}}},[e._v("\n              "+e._s(t.Header)+"\n            ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[e._l(e.item.Binder.KOMPASProcessTile.NextWorkingDays,(function(t){return[n("div",{staticClass:"infoba-accordeon-header"},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",style:{backgroundColor:e.backgroundColorProcess}},[e._v("\n                  "+e._s(e.filterByDate(e.item.Binder.KOMPASProcessTile.FocusPeriodActivity,t.date).length)+"\n                ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("firstToUpper")(e.moment(t.date).format("dddd"))))]),e._v(e._s(e.moment(t.date).format(" DD. MMM YYYY")))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(e.filterByDate(e.item.Binder.KOMPASProcessTile.FocusPeriodActivity,t.date),(function(i){return[n("transition",{key:i.Tile,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"day.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{"margin-left":"54px"}},[n("div",{staticClass:"infoba-gray",staticStyle:{cursor:"pointer"},on:{click:function(t){return e.goto(e.domain+"/IN/Institution/GroupChildrenList/"+i.InstitutionId)}}},[e._v("\n                        "+e._s(i.InstitutionName)+"\n                      ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer"},on:{click:function(t){return e.goto(e.domain+"/IN/KOMPAS/FocusPeriodProcess/"+i.FocusPeriodId+"?KOMPASGroupPeriodActivityId="+i.GroupPeriodActivityId+"&activityId="+i.FocusPeriodActivityId)}}},[n("b",[e._v(e._s(i.Title))])])])])])]}))],2)]}
1))],2)]):e._e(),e._v(" "),e.item.Binder.PPlanTile&&130===t.Type?n("div",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#425d82"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-calendar-account"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain+"/IN/PPlan")}}},[e._v("\n              INFOBA Vagtplan\n            ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e.pplanSortedTimeSlots.length>0?n("div",{staticClass:"wrapper"},[e._l(e.pplanSortedTimeSlots,(function(t){return[n("div",{staticClass:"institution"},[n("widget-html",{staticClass:"institution-name infoba-gray",attrs:{html:t.institutionName}}),e._v(" "),e._l(t.groups,(function(t){return[n("div",{staticClass:"group"},[n("widget-html",{staticClass:"group-name",attrs:{html:t.groupName}}),e._v(" "),e._l(t.timeslots,(function(t){return[n("div",{staticClass:"timeslot",on:{click:function(t){return e.goto(e.domain+"/IN/PPlan")}}},[n("div",{staticClass:"timeslot-content",style:{borderLeftColor:t.color}},[n("div",{staticClass:"timeslot-time infoba-gray"},[e._v("\n                          "+e._s(t.time)+"\n                        ")]),e._v(" "),n("widget-html",{staticClass:"timeslot-name",attrs:{html:t.name}})],1)])]}))],2)]}))],2)]}))],2):n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n          Vi har ikke noget relevant data at vise dig.\n        ")])]):e._e()])})),0)])},s=[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ellipsis"},[n("b",[e._v("Kommende samtaler")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("Påmelse")])])])])}]},534:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{display:"inline-block",width:"100%"}},[n("div",{staticStyle:{"font-size":"18px"}},[e._v("\n    KALENDA INFOSKÆRM\n    "),e.showLoginList?n("b-form-select",{on:{change:function(t){return e.setUserLoginDetails()}},model:{value:e.selectedLogin,callback:function(t){e.selectedLogin=t},expression:"selectedLogin"}},e._l(e.loginList,(function(t){return n("option",{key:t.value.userId,domProps:{value:t.value}},[e._v("\n        "+e._s(t.text)+"\n      ")])})),0):e._e()],1),e._v(" "),e.loading?n("div",{staticStyle:{"text-align":"center","margin-top":"12px"}},[n("b-spinner",{attrs:{label:"Spinning"}})],1):e._e(),e._v(" "),n("b-alert",{attrs:{variant:"danger"},model:{value:e.userNotLinked,callback:function(t){e.userNotLinked=t},expression:"userNotLinked"}},[e._v("Din AULA-bruger er ikke knyttet sammen med nogen Kalenda-bruger - kontakt\n    din leder eller ring til Greenbyte på 70 27 70 47.")]),e._v(" "),e.infoScreenLocationCode&&!e.userNotLinked?n("div",[n("b-link",{attrs:{href:e.baseUrl+"/Display?location="+e.infoScreenLocationCode+"&scheduleType=classic",target:"blank"}},[n("i",{staticClass:"fas fa-external-link-alt"}),e._v(" Aktivitetsoversigt")]),n("br"),e._v(" "),n("b-link",{attrs:{href:e.baseUrl+"/Display?location="+e.infoScreenLocationCode+"&scheduleType=working-hours",target:"blank"}},[n("i",{staticClass:"fas fa-external-link-alt"}),e._v(" Ugens skema")])],1):e._e()],1)},s=[]},535:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"wrapper"}},[n("div",{attrs:{id:"title-and-notification"}},[n("h1",[e._v("Forældreportalen")]),e._v(" "),e.hasNotifications()?n("div",{attrs:{id:"notification-badge"}},[e._v("\n      "+e._s(e.getNotificationCount())+"\n    ")]):e._e(
1)]),e._v(" "),e.hasNotifications()?n("p",[e._v("\n    Der er nyt om dit barn i Forældreportalen.\n    Tilgå nyheder ved at klikke her og anvende dit MitID for login:\n  ")]):n("p",[e._v("\n    Tilgå information omkring dit barn i Forældreportalen ved at klikke her og anvende dit MitID for login:\n  ")]),e._v(" "),n("a",{attrs:{href:e.FPLink,target:"_blank"},on:{click:e.deleteAllNotifications}},[e._v("\n    "+e._s(e.FPLink.replace("https://",""))+"\n    "),n("i",{staticClass:"fa fa-chevron-right"})])])},s=[]},536:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("widget - notice board ")]),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.currentWeekNumber?[n("strong",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.institutionCode?[n("strong",[e._v("institutionCode:")]),e._v(" "+e._s(e.institutionCode)),n("br")]:e._e(
1),e._v(" "),e.aulaToken?[n("strong",[e._v("aulaToken:")]),e._v(" "),n("span",{staticClass:"breakWord"},[e._v(e._s(e.aulaToken))]),n("br")]:e._e(),e._v(" "),n("br"),n("button",{staticClass:"btn btn-primary",on:{click:function(t){return e.openModal()}}},[e._v("open modal")]),n("br"),e._v(" "),n("p",[e._v(" Lets load some data with Axios:\n      ")]),e.posts&&e.posts.length?n("blockquote",e._l(e.posts,(function(t){return n("p",[n("strong",[e._v(e._s(t.id)+" - "+e._s(t.title))]),e._v(" "),n("br"),e._v(" "+e._s(t.body)+"\n          ")])})),0):e._e(),e._v(" "),n("p"),e._v(" "),n("b-modal",{ref:"notes-modal",attrs:{title:"test modal","hide-footer":""}},[e._v("\n    test\n  ")])],2)},s=[]},537:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("Widget-7")]),e._v(" "),e.sessionUUID?[n("strong",[e._v("sessionUUID:")]),e._v(" "+e._s(e.sessionUUID)),n("br")]:e._e(),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(
1),e._v(" "),e.currentWeekNumber?[n("strong",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.isMobileApp?[n("strong",[e._v("isMobileApp:")]),e._v(" "+e._s(e.isMobileApp)),n("br")]:e._e(),e._v(" "),e.userProfile?[n("strong",[e._v("userProfile:")]),e._v(" "+e._s(e.userProfile)),n("br")]:e._e(),e._v(" "),e.assuranceLevel?[n("strong",[e._v("assuranceLevel:")]),e._v(" "+e._s(e.assuranceLevel)),n("br")]:e._e(),e._v(" "),e.childFilter?[n("strong",[e._v("childFilter:")]),e._v(" "+e._s(e.childFilter)),n("br")]:e._e(),e._v(" "),e.institutionFilter?[n("strong",[e._v("institutionFilter:")]),e._v(" "+e._s(e.institutionFilter)),n("br")]:e._e(),e._v(" "),e.group?[n("strong",[e._v("group:")]),e._v(" "+e._s(e.group)),n("br")]:e._e()],2)},s=[]},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("widget - secure notice board data")]),e._v(" "),e.sessionUUID?[n("strong",[e._v("sessionUUID:")]),e._v(" "+e._s(e.sessionUUID)),n("br")]:e._e(
1),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.currentWeekNumber?[n("strong",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.group?[n("strong",[e._v("group:")]),e._v(" "+e._s(e.group)),n("br")]:e._e(),e._v(" "),e.someDate?[n("strong",[e._v("moment date:")]),e._v(" "+e._s(e.someDate)),n("br")]:e._e(),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.institutionCode?[n("strong",[e._v("institutionCode:")]),e._v(" "+e._s(e.institutionCode)),n("br")]:e._e(),e._v(" "),e.source?[n("strong",[e._v("source:")]),e._v(" "+e._s(e.source)),n("br")]:e._e(),e._v(" "),e.aulaToken?[n("strong",[e._v("aulaToken:")]),e._v(" "),n("span",{staticClass:"breakWord"},[e._v(e._s(e.aulaToken))]),n("br")]:e._e()],2)},s=[]},62:function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return i})),function(e){e.WAITING="waiting",e.DECLINED="declined",e.ACCEPTED="accepted",e.TENTATIVE="tentative",e.BLOCKED="blocked"}(i||(i={}))},750:function(e,t,n){"use strict";var i=n(528),s=n(380),a=(n(1187),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"81ae13fa",null);t.default=r.exports},751:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},752:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},753:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},755:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},756:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},757:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},758:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},759:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},760:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},761:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},762:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},763:function(e,t,n){"use strict";var i=n(529),s=n(382),a=(n(1188),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"f7125016",null);t.default=r.exports},764:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},765:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},766:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},767:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},768:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},769:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},77:function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return i})),function(e){e.NEVER="never",e.DAILY="daily",e.WEEKLY="weekly",e.MONTHLY="monthly"}(i||(i={}))},770:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},771:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},772:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},773:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},774:function(e,t,n){"use strict";var i=n(530),s=n(384),a=n(3),r=Object(a.a)(s.default,i.a,i.b,!1,null,"1692a912",null);t.default=r.exports},775:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({}
1,undefined,undefined,!1,null,null,null);t.a=s.exports},776:function(e,t,n){"use strict";var i=n(531),s=n(386),a=(n(1189),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"fd494f82",null);t.default=r.exports},777:function(e,t,n){"use strict";var i=n(3),s=Object(i.a)({},undefined,undefined,!1,null,null,null);t.a=s.exports},778:function(e,t,n){"use strict";var i=n(532),s=n(388),a=(n(1190),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"5e11788e",null);t.default=r.exports},779:function(e,t,n){"use strict";var i=n(533),s=n(390),a=(n(1191),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"4caf5780",null);t.default=r.exports},783:function(e,t,n){"use strict";var i=n(534),s=n(392),a=n(3),r=Object(a.a)(s.default,i.a,i.b,!1,null,"27ff57f8",null);t.default=r.exports},784:function(e,t,n){"use strict";var i=n(535),s=n(394),a=(n(1192),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"5194ea1c",null);t.default=r.exports},785:function(e,t,n){"use strict";var i=n(536),s=n(396),a=(n(1193),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"0a97cdb0",null);t.default=r.exports},786:function(e,t,n){"use strict";var i=n(537),s=n(398),a=(n(1194),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"f0df24da",null);t.default=r.exports},787:function(e,t,n){"use strict";var i=n(538),s=n(400),a=(n(1195),n(3)),r=Object(a.a)(s.default,i.a,i.b,!1,null,"441c8a10",null);t.default=r.exports},810:function(e,t,n){"use strict";var i=n(47),s=n.n(i),a=n(17),r=n.n(a),o=n(1),l=n.n(o),c=n(12),u=n.n(c),d=n(100),h=n.n(d),m=n(99),p=n.n(m),v=n(780),f=n.n(v),g=n(781),_=n.n(g),E=n(425),A=n.n(E),T=n(782),b=n.n(T),C=n(7),k=n.n(C),y={props:{size:{type:Number,default:50}}},I=n(3),S=Object(I.a)(y,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"loader-center"},[n("svg",{staticClass:"loader-spinner",attrs:{xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size,viewBox:"0 0 31 31",fill:"none"}},[n("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.1068 31H12.8945C11.8497 31 10.9996 30.1924 10.9996 29.1999V25.3163C10.9996 24.8636 10.5984 24.583 10.2271 24.583C10.0842 24.583 9.94744 24.6215 9.82028 24.6968L5.66917 27.16
178C5.36703 27.3473 5.01932 27.4425 4.6643 27.4425C4.00658 27.4425 3.40569 27.1266 3.05685 26.598L0.289819 22.4018C0.0208797 21.9945 -0.0646407 21.5119 0.0490115 21.0431C0.162101 20.5744 0.461422 20.1757 0.889587 19.9207L5.88972 16.9447C6.11927 16.8084 6.25149 16.5823 6.25149 16.3252C6.25149 16.0676 6.11927 15.8421 5.89028 15.7058L0.889587 12.7298C0.461422 12.4743 0.162101 12.0761 0.0490115 11.6074C-0.0646407 11.1386 0.0208797 10.656 0.289819 10.2487L3.05685 6.05302C3.40569 5.52388 4.00658 5.208 4.6643 5.208C5.01989 5.208 5.36703 5.30314 5.66917 5.48272L9.82084 7.95364C9.94744 8.029 10.0842 8.06748 10.2271 8.06748C10.5984 8.06748 10.9996 7.78688 10.9996 7.33417V1.80014C10.9996 0.807603 11.8497 0 12.8945 0H18.1068C19.1516 0 20.0017 0.807603 20.0017 1.80014V7.30371C20.0017 7.56347 20.1289 7.7329 20.2352 7.82964C20.4873 8.05786 20.8828 8.10436 21.1872 7.9189L25.3225 5.39721C25.6286 5.21014 25.9825 5.11126 26.3449 5.11126C27.0026 5.11126 27.604 5.42714 27.9523 5.95628L30.7115 10.1402C31.2662 10.9815 30.9967 12.0943 30.1117 12.6218L24.9293 15.7058C24.6997 15.8421 24.5681 16.0676 24.5681 16.3252C24.5681 16.5823 24.6997 16.8084 24.9293 16.9452L30.1117 20.0292C30.9967 20.5562 31.2662 21.669 30.7115 22.5103L27.9557 26.6889C27.6068 27.218 27.0059 27.5333 26.3482 27.5333C25.9825 27.5333 25.6264 27.4334 25.318 27.2437L21.1906 24.6995C21.0617 24.6199 20.9216 24.5793 20.7748 24.5793C20.4034 24.5793 20.0017 24.8599 20.0017 25.3131V29.1999C20.0017 30.1924 19.1516 31 18.1068 31Z",fill:"#4D88FF"}})])])}),[],!1,null,null,null).exports,D={props:{isMinimized:Boolean,isUntouched:Boolean,schools:Object,shownBlacklistReasons:null,closeBlacklistReasonsModal:Function,translations:Object,isLoading:Boolean},components:{spinner:S},computed:{sortedSchools:function(){return Object.values(this.schools).sort((function(e,t){return!!e.communication!=!!t.communication?e.communication?-1:1:e.name.localeCompare(t.name)}))}}},w=Object(I.a)(D,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"select-school"},[n("div",{class:[e.isMinimized&&"b-radius0","header"]},[n("div",{staticClass:"header-heading"},[n("svg",{staticClass:"header-icon left",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M0.667 0v32l10.24-9.333h13.093c4.050 0 7.333-3.283 7.333-7.333v0-15.333h-30.667zM30 15.333c0 3.314-2.686 6-6 6v0h-13.587l-8.413 7.88v-27.88h28v14zM10 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2zM18 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2zM26 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2z"}})]),e._v(" "),n("h3",{staticClass:"header-title"},[e._v(e._s(e.translations.selectSchoolScreen.headerTitle))]),e._v(" "),e.isMinimized?n("svg",{staticClass:"header-icon right pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:function(t){return e.$emit("maximize")}}},[n("path",{attrs:{d:"M12.193 18.827l-8.193 8.193v-6.353h-1.333v8.667h8.667v-1.333h-6.393l8.2-8.213-0.947-0.96zM20.667 2.667v1.333h6.393l-8.2 8.18 0.947 0.933 8.193-8.207v6.427h1.333v-8.667h-8.667zM11.333 4v-1.333h-8.667v8.667h1.333v-6.427l8.193 8.2 0.947-0.927-8.2-8.18h6.393zM28 26.933l-7.513-8.087-0.973 0.927 7.627 8.227h-6.473v1.333h8.667v-8.667h-1.333v6.267z"}}
1)]):n("svg",{staticClass:"header-icon right pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:function(t){return e.$emit("minimize")}}},[n("path",{attrs:{d:"M28 10.667h-5.833l7.167-7.133-0.9-0.867-7.167 7.16 0.067-5.827h-1.267l-0.067 8h8v-1.333zM4 21.333h5.833l-7.167 7.133 0.867 0.867 7.133-7.167v5.833h1.333v-8h-8v1.333zM28 21.333v-1.333h-8v8h1.333v-5.833l7.133 7.167 0.867-0.867-7.167-7.133h5.833zM10.667 9.833l-7.133-7.167-0.867 0.867 7.167 7.133h-5.833v1.333h8v-8h-1.333v5.833z"}})])])]),e._v(" "),n("div",{class:[e.isUntouched?"untouched":e.isMinimized?"closed":"open","select-school-container mx-auto text-center"]},[e.isLoading?e._e():n("div",{staticClass:"select-school-content main-screen-content scrollable"},[n("svg",{staticClass:"select-school-image",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"165",viewBox:"0 0 165 96.633"}},[n("g",{attrs:{id:"Illustration",transform:"translate(-0.194)"}},[n("g",{attrs:{id:"Group_1856","data-name":"Group 1856",transform:"translate(0.194)",opacity:"0.75"}},[n("path",{attrs:{id:"Path_684","data-name":"Path 684",d:"M164.106,48.564c8.968,23.959-39.779,45.957-61.662,47.832-21.821,1.968-62.355,4.729-90.026-25.955C-15.175,39.644,4.382-15.8,66.68,7.53,129.029,30.927,155.192,24.683,164.106,48.564Z",transform:"translate(-0.194 -0.857)",fill:"#f2f5f9","fill-rule":"evenodd"}}),e._v(" "),n("image",{attrs:{id:"Rectangle_1719","data-name":"Rectangle 1719",width:"59.389",height:"96.367",transform:"translate(96.108)","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAACsCAYAAACTkDk+AAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAaqADAAQAAAABAAAArAAAAACUMqf3AAAFVElEQVR4Ae2awXbTMBBFCYcVe5b8/3/BDtawLRGnOhi1nsia0bPGudnYruyZ53uj1G10+/bj18sHXksT+Prl8+3j0gkJ95fA95+/XxCV5M2AKEQlIZAkJjMKUUkIJInJjEJUEgJJYn7qzXn/o6v31A/3537z3KhaUXVK2KhaUXVagFM++qyw1lgbLvLY6muNRWZoax3pO0VUG4hjPwFE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSCoiSYPY3QZSfoaTCFFHW91HW2Mw7tvpaY2dlavveWCnbIlnzeMqMWvNWc6dCVBJ/iEJUEgJJYjKjkohiudirqCMrgqzH+ag67ftnyoyywlpjbbjIY6uvNRaZoa11pO8UUW0gjv0EEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSClNEWd/XWGMz79jqa42dlanty3Kxlsiix1Nm1KL3mjoWopLoQxSikhBIEpMZlUQUy8VeRR1ZEWQ9zkfVad8/U2aUFdYaa8NFHlt9rbHIDG2tI32niGoDcewngCg/Q0kFREkw+5sgys9QUgFREsz+JojyM5RUQJQEs78JovwMJRUQJcHsb4IoP0NJBURJMPubIMrPUFIBURLM/iaI8jOUVJgiyvq+xhqbecdWX2vsrExtX5aLtUQWPZ4yoxa919SxEJVEH6IQlYRAkpjMqCSiWC72KurIiiDrcT6qTvv+mTKjrLDWWBsu8tjqa41FZmhrHek7RVQbiGM/AUT5GUoqIEqC2d8EUX6GkgqIkmD2N0GUn6GkAqIkmP1NEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpMIUUdb3NdbYzDu2+lpjZ2Vq+7JcrCWy6PGUGbXovaaOhagk+hCFqCQEksRkRiURJV8udmTlTWFoPTpH1YqqU/JG1ir16mvKjDoatoZhu09giqj9doyMEkDUKDnxdYgSAx9th6hRcuLrECUGPtoOUaPkxNchSgx8tB2iRsmJr0OUGPhoO0SNkhNfhygx8NF2iBolJ74OUWLgo+0QNUpOfB2rkMTAR9sxo0bJia9DlBj4aDtEjZITX4coMfDRdogaJSe+DlFi4KPtpiwXK2H2lnkdXaG0V6f0iKoVVScyU6m1fTGjtjQW3kfUwnK20RC1pbHwPqIWlrONhqgtjUX37w87N0QtKqfGKpLKPqIqkQW3VRKiFpRTI20lIapSWWzbSirxuv8zsdi9XDLOe4LqjfI7qpI4eWtJKtEQdbKg0v6RpHIOH32Fwnmv211SV3dmVBemKSf9/fuotzKieknFnndIUmnNcrFYAWa1nt9FewWYUXtkgn/ukVSi8DARLKQt5xVU6yGqkgjeRgmqsfjoqyQCt9GSSjRm1OKCajxmVCXh3M6YRdtI3TPqHmR73cP9vWVeUXVKgKhanjr3aw//TfQQ3jsndIt659qn/pFKUIWMqEqif9v9/7n+ko/PRNRjRvUMyUdcbdZuEdUSeXt8qqAaB1GVxNvtEoJqLERVEv+2SwmqsRBVSdy/Sfi3u97e04tSP2aPvgWeVlQWQVXsU4nKJqdKKttnEbX075+tkL39q4tKL6iKu6Koy8ipksr2KqIuKedKoi4vqMpKt1ws85NbhT6yTfHR96xytkKXFYWcraaFHiYQ87+Y9ujUGYWcVsf+sUwUUvYl9IxME4WYHvz957hFIaQftufMXVEI8GCNv/YPKdzNQsY/Fm4AAAAASUVORK5CYII="}}),e._v(" "),n("path",{attrs:{id:"Path_685","data-name":"Path 685",d:"M67.318,124.161c-16.677-2.775-34.217-9.72-48.387-25.418a49.186,49.186,0,0,1-3.95-5.024v-27.4H67.318Z",transform:"translate(-6.696 -29.16)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_686","data-name":"Path 686",d:"M28.731,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H23.794V80.064A4.937,4.937,0,0,1,28.731,75.127Z",transform:"translate(-10.572 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_687","data-name":"Path 687",d:"M28.731,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H28.078s-1.074-.986-2.159-2.053-2.028-2.121-2.028-2.121l-.1-4.1A4.937,4.937,0,0,1,28.731,110.157Z",transform:"translate(-10.572 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_688","data-name":"Path 688",d:"M57.813,75.127a4.937,4.937,0,0,1,4.937,4.937v8.271H52.875V80.064A4.937,4.937,0,0,1,57.813,75.127Z",transform:"translate(-23.388 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_689","data-name":"Path 689",d:"M57.813,110.157a4.937,4.937,0,0,1,4.937,4.937v8.27H52.875v-8.27A4.937,4.937,0,0,1,57.813,110.157Z",transform:"translate(-23.388 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_690","data-name":"Path 690",d:"M86.894,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H81.956V80.064A4.938,4.938,0,0,1,86.894,75.127Z",transform:"translate(-36.191 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_691","data-name":"Path 691",d:"M86.894,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H81.956v-8.27A4.937,4.937,0,0,1,86.894,110.157Z",transform:"translate(-36.191 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_692","data-name":"Path 692",d:"M58.2,145.187a4.937,4.937,0,0,1,4.937,4.937v2.7L58.2,150.483s-1.516-.759-4.447-2.451A4.785,4.785,0,0,1,58.2,145.187Z",transform:"translate(-23.774 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_693","data-name":"Path 693",d:"M86.894,145.187a4.937,4.937,0,0,1,4.938,4.937l.054,7.805s-3.195-.718-5.677-1.4-4.252-1.333-4.252-1.333v-5.07A4.937,4.937,0,0,1,86.894,145.187Z",transform:"translate(-36.191 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_694","data-name":"Path 694",d:"M26,33.267H65.991V45.611H26Z",transform:"translate(-11.54 -14.628)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_695","data-name":"Path 695",d:"M29.3,36.572h36.29v8.641H29.3Z",transform:"translate(-12.994 -16.082)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_696","data-name":"Path 696",d:"M38.687,55.3H37.453V61.47h1.234Z",transform:"translate(-16.578 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_697","data-name":"Path 697",d:"M84.953,55.3H83.719V61.47h1.234Z",transform:"translate(-36.965 -24.316)",fill:"#e2eaf5"}})]),e._v(" "),n("g",{attrs:{id:"Group_3167","data-name":"Group 3167",transform:"translate(0.194)"}},[n("path",{attrs:{id:"Path_698","data-name":"Path 698",d:"M156.534,124.218a56.486,56.486,0,0,1-6.419.964c-10.667.961-25.8,2.112-41.721-.537V85.931l24.07-18.515,24.07,18.515Z",transform:"translate(-47.851 -29.645)",fill:"#48f","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_699","data-name":"Path 699",d:"M117.577,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,107.293Z",transform:"translate(-51.711 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_700","data-name":"Path 700",d:"M143.353,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,107.293Z",transform:"translate(-63.06 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_701","data-name":"Path 701",d:"M169.13,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,107.293Z",transform:"translate(-74.408 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_702","data-name":"Path 702",d:"M117.577,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,128.443Z",transform:"translate(-51.711 -56.479)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_703","data-name":"Path 703",d:"M143.353,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,128.443Z",transform:"translate(-63.06 -56.479)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_704","data-name":"Path 704",d:"M169.13,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,128.443Z",transform:"translate(-74.408 -56.479)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_705","data-name":"Path 705",d:"M117.577,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,149.593Z",transform:"translate(-51.711 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_706","data-name":"Path 706",d:"M143.353,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,149.593Z",transform:"translate(-63.06 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_707","data-name":"Path 707",d:"M169.13,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,149.593Z",transform:"translate(-74.408 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("circle",{attrs:{id:"Ellipse_274","data-name":"Ellipse 274",cx:"4",cy:"4",r:"4",transform:"translate(80.613 47)",fill:"#fff"}}),e._v(" "),n("rect",{attrs:{id:"Rectangle_1846","data-name":"Rectangle 1846",width:"3",height:"10",rx:"1",transform:"translate(83 30)",fill:"#48f"}}),e._v(" "),n("rect",{attrs:{id:"Rectangle_1847","data-name":"Rectangle 1847",width:"6",height:"4",rx:"1",transform:"translate(85 31)",fill:"#48f"}})])])]),e._v(" "),n("h3",{staticClass:"select-school-heading"},[e._v(e._s(e.translations.selectSchoolScreen.screenHeading))]),e._v(" "),n("h6",{staticClass:"select-school-tagline"},[e._v(e._s(e.translations.selectSchoolScreen.screenTagline))]),e._v(" "),e.sortedSchools.length?n("div",e._l(e.sortedSchools,(function(t){return n("div",{key:t.id,staticClass:"select-school-button pointer",class:{disabled:!t.communication},on:{click:function(n){return e.$emit("select-school",t)}}},[e._v("\n                    "+e._s(t.name)+"\n                ")])}
1)),0):e._e()]),e._v(" "),e.isLoading?n("div",{staticClass:"select-school-content"},[n("spinner",{attrs:{size:40}})],1):e._e()]),e._v(" "),e.shownBlacklistReasons?n("div",{staticClass:"modal-background"}):e._e(),e._v(" "),e.shownBlacklistReasons?n("div",{staticClass:"modal-container blacklist-reasons-modal"},[n("svg",{staticClass:"modal-illustration",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"165",height:"96.633",viewBox:"0 0 165 96.633"}},[n("defs",[n("filter",{attrs:{id:"Path_709",x:"34.54",y:"6.326",width:"57.219",height:"56.113",filterUnits:"userSpaceOnUse"}},[n("feOffset",{attrs:{dy:"3",input:"SourceAlpha"}}),e._v(" "),n("feGaussianBlur",{attrs:{stdDeviation:"3",result:"blur"}}),e._v(" "),n("feFlood",{attrs:{"flood-opacity":"0.161"}}),e._v(" "),n("feComposite",{attrs:{operator:"in",in2:"blur"}}),e._v(" "),n("feComposite",{attrs:{in:"SourceGraphic"}})],1)]),e._v(" "),n("g",{attrs:{id:"Illustration",transform:"translate(-0.194)"}},[n("g",{attrs:{id:"Group_1856","data-name":"Group 1856",transform:"translate(0.194)",opacity:"0.75"}},[n("path",{attrs:{id:"Path_684","data-name":"Path 684",d:"M164.106,48.564c8.968,23.959-39.779,45.957-61.662,47.832-21.821,1.968-62.355,4.729-90.026-25.955C-15.175,39.644,4.382-15.8,66.68,7.53,129.029,30.927,155.192,24.683,164.106,48.564Z",transform:"translate(-0.194 -0.857)",fill:"#f2f5f9","fill-rule":"evenodd"}}),e._v(" "),n("image",{attrs:{id:"Rectangle_1719","data-name":"Rectangle 1719",width:"59.389",height:"96.367",transform:"translate(96.108)","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAACsCAYAAACTkDk+AAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAaqADAAQAAAABAAAArAAAAACUMqf3AAAFVElEQVR4Ae2awXbTMBBFCYcVe5b8/3/BDtawLRGnOhi1nsia0bPGudnYruyZ53uj1G10+/bj18sHXksT+Prl8+3j0gkJ95fA95+/XxCV5M2AKEQlIZAkJjMKUUkIJInJjEJUEgJJYn7qzXn/o6v31A/3537z3KhaUXVK2KhaUXVagFM++qyw1lgbLvLY6muNRWZoax3pO0VUG4hjPwFE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSCoiSYPY3QZSfoaTCFFHW91HW2Mw7tvpaY2dlavveWCnbIlnzeMqMWvNWc6dCVBJ/iEJUEgJJYjKjkohiudirqCMrgqzH+ag67ftnyoyywlpjbbjIY6uvNRaZoa11pO8UUW0gjv0EEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSClNEWd/XWGMz79jqa42dlanty3Kxlsiix1Nm1KL3mjoWopLoQxSikhBIEpMZlUQUy8VeRR1ZEWQ9zkfVad8/U2aUFdYaa8NFHlt9rbHIDG2tI32niGoDcewngCg/Q0kFREkw+5sgys9QUgFREsz+JojyM5RUQJQEs78JovwMJRUQJcHsb4IoP0NJBURJMPubIMrPUFIBURLM/iaI8jOUVJgiyvq+xhqbecdWX2vsrExtX5aLtUQWPZ4yoxa919SxEJVEH6IQlYRAkpjMqCSiWC72KurIiiDrcT6qTvv+mTKjrLDWWBsu8tjqa41FZmhrHek7RVQbiGM/AUT5GUoqIEqC2d8EUX6GkgqIkmD2N0GUn6GkAqIkmP1NEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpMIUUdb3NdbYzDu2+lpjZ2Vq+7JcrCWy6PGUGbXovaaOhagk+hCFqCQEksRkRiURJV8udmTlTWFoPTpH1YqqU/JG1ir16mvKjDoatoZhu09giqj9doyMEkDUKDnxdYgSAx9th6hRcuLrECUGPtoOUaPkxNchSgx8tB2iRsmJr0OUGPhoO0SNkhNfhygx8NF2iBolJ74OUWLgo+0QNUpOfB2rkMTAR9sxo0bJia9DlBj4aDtEjZITX4coMfDRdogaJSe+DlFi4KPtpiwXK2H2lnkdXaG0V6f0iKoVVScyU6m1fTGjtjQW3kfUwnK20RC1pbHwPqIWlrONhqgtjUX37w87N0QtKqfGKpLKPqIqkQW3VRKiFpRTI20lIapSWWzbSirxuv8zsdi9XDLOe4LqjfI7qpI4eWtJKtEQdbKg0v6RpHIOH32Fwnmv211SV3dmVBemKSf9/fuotzKieknFnndIUmnNcrFYAWa1nt9FewWYUXtkgn/ukVSi8DARLKQt5xVU6yGqkgjeRgmqsfjoqyQCt9GSSjRm1OKCajxmVCXh3M6YRdtI3TPqHmR73cP9vWVeUXVKgKhanjr3aw//TfQQ3jsndIt659qn/pFKUIWMqEqif9v9/7n+ko/PRNRjRvUMyUdcbdZuEdUSeXt8qqAaB1GVxNvtEoJqLERVEv+2SwmqsRBVSdy/Sfi3u97e04tSP2aPvgWeVlQWQVXsU4nKJqdKKttnEbX075+tkL39q4tKL6iKu6Koy8ipksr2KqIuKedKoi4vqMpKt1ws85NbhT6yTfHR96xytkKXFYWcraaFHiYQ87+Y9ujUGYWcVsf+sUwUUvYl9IxME4WYHvz957hFIaQftufMXVEI8GCNv/YPKdzNQsY/Fm4AAAAASUVORK5CYII="}}),e._v(" "),n("path",{attrs:{id:"Path_685","data-name":"Path 685",d:"M67.318,124.161c-16.677-2.775-34.217-9.72-48.387-25.418a49.186,49.186,0,0,1-3.95-5.024v-27.4H67.318Z",transform:"translate(-6.696 -29.16)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_686","data-name":"Path 686",d:"M28.731,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H23.794V80.064A4.937,4.937,0,0,1,28.731,75.127Z",transform:"translate(-10.572 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_687","data-name":"Path 687",d:"M28.731,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H28.078s-1.074-.986-2.159-2.053-2.028-2.121-2.028-2.121l-.1-4.1A4.937,4.937,0,0,1,28.731,110.157Z",transform:"translate(-10.572 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_688","data-name":"Path 688",d:"M57.813,75.127a4.937,4.937,0,0,1,4.937,4.937v8.271H52.875V80.064A4.937,4.937,0,0,1,57.813,75.127Z",transform:"translate(-23.388 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_689","data-name":"Path 689",d:"M57.813,110.157a4.937,4.937,0,0,1,4.937,4.937v8.27H52.875v-8.27A4.937,4.937,0,0,1,57.813,110.157Z",transform:"translate(-23.388 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_690","data-name":"Path 690",d:"M86.894,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H81.956V80.064A4.938,4.938,0,0,1,86.894,75.127Z",transform:"translate(-36.191 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_691","data-name":"Path 691",d:"M86.894,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H81.956v-8.27A4.937,4.937,0,0,1,86.894,110.157Z",transform:"translate(-36.191 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_692","data-name":"Path 692",d:"M58.2,145.187a4.937,4.937,0,0,1,4.937,4.937v2.7L58.2,150.483s-1.516-.759-4.447-2.451A4.785,4.785,0,0,1,58.2,145.187Z",transform:"translate(-23.774 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_693","data-name":"Path 693",d:"M86.894,145.187a4.937,4.937,0,0,1,4.938,4.937l.054,7.805s-3.195-.718-5.677-1.4-4.252-1.333-4.252-1.333v-5.07A4.937,4.937,0,0,1,86.894,145.187Z",transform:"translate(-36.191 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_694","data-name":"Path 694",d:"M26,33.267H65.991V45.611H26Z",transform:"translate(-11.54 -14.628)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_695","data-name":"Path 695",d:"M29.3,36.572h36.29v8.641H29.3Z",transform:"translate(-12.994 -16.082)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_696","data-name":"Path 696",d:"M38.687,55.3H37.453V61.47h1.234Z",transform:"translate(-16.578 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_697","data-name":"Path 697",d:"M84.953,55.3H83.719V61.47h1.234Z",transform:"translate(-36.965 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_698","data-name":"Path 698",d:"M156.534,124.218a56.486,56.486,0,0,1-6.419.964c-10.667.961-25.8,2.112-41.721-.537V85.931l24.07-18.515,24.07,18.515Z",transform:"translate(-47.851 -29.645)",fill:"#d3e0f1","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_699","data-name":"Path 699",d:"M117.577,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,107.293Z",transform:"translate(-51.711 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_700","data-name":"Path 700",d:"M143.353,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,107.293Z",transform:"translate(-63.059 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_701","data-name":"Path 701",d:"M169.13,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,107.293Z",transform:"translate(-74.408 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_702","data-name":"Path 702",d:"M117.577,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,128.443Z",transform:"translate(-51.711 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_703","data-name":"Path 703",d:"M143.353,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,128.443Z",transform:"translate(-63.059 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_704","data-name":"Path 704",d:"M169.13,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,128.443Z",transform:"translate(-74.408 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_705","data-name":"Path 705",d:"M117.577,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,149.593Z",transform:"translate(-51.711 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_706","data-name":"Path 706",d:"M143.353,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,149.593Z",transform:"translate(-63.059 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_707","data-name":"Path 707",d:"M169.13,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,149.593Z",transform:"translate(-74.408 -65.78)",fill:"#fff","fill-rule":"evenodd"}})]),e._v(" "),n("path",{attrs:{id:"Path_708","data-name":"Path 708",d:"M124.766,39.5h35.3a11.766,11.766,0,0,1,11.766,11.766v25a11.766,11.766,0,0,1-11.766,11.766H127.9l-10.132,8A2.941,2.941,0,0,1,113,93.728V51.266A11.766,11.766,0,0,1,124.766,39.5Z",transform:"translate(-49.693 -17.369)",fill:"#fd5061"}}),e._v(" "),n("g",{attrs:{transform:"matrix(1, 0, 0, 1, 0.19, 0)",filter:"url
1(#Path_709)"}},[n("path",{attrs:{id:"Path_709-2","data-name":"Path 709",d:"M109.375,22H85.844A7.844,7.844,0,0,0,78,29.844V46.512a7.844,7.844,0,0,0,7.844,7.844h21.445l6.755,5.335a1.961,1.961,0,0,0,3.176-1.539V29.844A7.844,7.844,0,0,0,109.375,22Z",transform:"translate(-34.46 -9.67)",fill:"#fd5061"}})])])]),e._v(" "),n("h3",{staticClass:"modal-heading text-color-primary"},[e._v(e._s(e.translations.selectSchoolScreen.blacklistReasonHeader))]),e._v(" "),n("p",{staticClass:"modal-text text-color-lighter"},[e._v(e._s(e.translations.selectSchoolScreen.blacklistReasonMessage))]),e._v(" "),n("ul",{staticClass:"modal-list"},e._l(e.shownBlacklistReasons,(function(t){return n("li",{key:t.id,staticClass:"text-color-lighter"},[e._v(e._s(t.message||t.code))])})),0),e._v(" "),n("div",{staticClass:"modal-buttons"},[n("div",{staticClass:"modal-button action",on:{click:e.closeBlacklistReasonsModal}},[e._v("\n                "+e._s(e.translations.selectSchoolScreen.blacklistReasonBack)+"\n            ")])])]):e._e()])}),[],!1,null,null,null).exports,N=n(155),R={data:function(){return{isHoveringMessagePendingTooltip:!1,isHoveringMessageSuccessfullySentTooltip:!1,isHoveringMessageUnsuccessfullySentTooltip:!1}},props:{message:Object,translations:Object},methods:{interpolate:N.a,openMessagePendingTooltip:function(){this.isHoveringMessagePendingTooltip=!0},closeMessagePendingTooltip:function(){this.isHoveringMessagePendingTooltip=!1},openMessageSuccessfullySentTooltip:function(){this.isHoveringMessageSuccessfullySentTooltip=!0},closeMessageSuccessfullySentTooltip:function(){this.isHoveringMessageSuccessfullySentTooltip=!1},openMessageUnsuccessfullySentTooltip:function(){this.isHoveringMessageUnsuccessfullySentTooltip=!0},closeMessageUnsuccessfullySentTooltip:function(){this.isHoveringMessageUnsuccessfullySentTooltip=!1}}},O=Object(I.a)(R,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"message-container"},[n("div",{staticClass:"message-container-header",on:{click:function(t){return e.$emit("handle-open-single-message",e.message)}}},[n("p",{staticClass:"message-time text-center"},[e._v("\n            "+e._s(e.message.created_at.format("Do MMMM YYYY, HH:mm"))+"\n        ")]),e._v(" "),n("div",{staticClass:"message-delivery-status-container"},[n("div",{staticClass:"message-delivery-status-item",on:{mouseleave:e.closeMessagePendingTooltip}},[n("svg",{staticClass:"message-delivery-status-icon fill-grey",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openMessagePendingTooltip}},[n("path",{attrs:{d:"M24 7.273v-5.94h2.667v-1.333h-21.333v1.333h2.667v5.94c0 0.001 0 0.002 0 0.003 0 2.429 1.181 4.582 3 5.916l0.020 0.014 3.847 2.793-3.847 2.8c-1.838 1.348-3.019 3.499-3.020 5.926v5.94h-2.667v1.333h21.333v-1.333h-2.667v-5.94c0-0.001 0-0.002 0-0.003 0-2.429-1.181-4.582-3-5.916l-0.020-0.014-3.847-2.793 3.847-2.8c1.838-1.348 3.019-3.499 3.020-5.926v-0zM9.333 30.667v-3.447l6.667-1.22 6.667 1.213v3.453h-13.333zM20.193 19.873c1.506 1.103 2.473 2.865 2.473 4.853v1.14l-6.667-1.2-6.667 1.2v-1.14c0-1.988 0.967-3.75 2.457-4.842l0.017-0.012 4.193-3.047zM20.193 12.12l-4.193 3.053-4.193-3.053c-1.504-1.102-2.471-2.861-2.473-4.846v-5.94h13.333v5.94c-0 1.988-0.967 3.75-2.457 4.842l-0.017 0.012z"}})]),e._v(" "),n("p",{staticClass:"message-delivery-status-number number-text"},[e._v(e._s(e.message.delivery_status_counts.pending))]),e._v(" "),e.isHoveringMessagePendingTooltip?n("div",{staticClass:"tooltip-container tooltip-bottom message-delivery-status-tooltip"},[e._v("\n                    "+e._s(e.interpolate(e.translations.groupMessagesScreen.pendingTooltip,{count:e.message.delivery_status_counts.pending}))+"\n                ")]):e._e()]),e._v(" "),n("div",{staticClass:"message-delivery-status-item",on:{mouseleave:e.closeMessageSuccessfullySentTooltip}},[n("svg",{staticClass:"message-delivery-status-icon fill-green",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openMessageSuccessfullySentTooltip}},[n("path",{attrs:{d:"M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16v0c0-8.837-7.163-16-16-16v0zM16 30.667c-8.1 0-14.667-6.567-14.667-14.667s6.566-14.667 14.667-14.667c8.1 0 14.667 6.566 14.667 14.667v0c0 8.1-6.566 14.667-14.667 14.667v0zM15.453 20.72l-5.567-5.567-0.94 0.94 6.793 6.793 7.587-13.133-1.153-0.667-6.72 11.633z"}})]),e._v(" "),n("p",{staticClass:"message-delivery-status-number number-text"},[e._v(e._s(e.message.delivery_status_counts.received))]),e._v(" "),e.isHoveringMessageSuccessfullySentTooltip?n("div",{staticClass:"tooltip-container tooltip-bottom message-delivery-status-tooltip"},[e._v("\n                    "+e._s(e.interpolate(e.translations.groupMessagesScreen.successTooltip,{count:e.message.delivery_status_counts.received}
1))+"\n                ")]):e._e()]),e._v(" "),e.message.delivery_status_counts.failed>0?n("div",{staticClass:"message-delivery-status-item",on:{mouseleave:e.closeMessageUnsuccessfullySentTooltip}},[n("svg",{staticClass:"message-delivery-status-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openMessageUnsuccessfullySentTooltip}},[n("path",{attrs:{d:"M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16v0c0-8.837-7.163-16-16-16v0zM16 30.667c-8.1 0-14.667-6.567-14.667-14.667s6.566-14.667 14.667-14.667c8.1 0 14.667 6.566 14.667 14.667v0c0 8.1-6.566 14.667-14.667 14.667v0zM21.527 9.527l-5.527 5.533-5.527-5.533-0.947 0.947 5.533 5.527-5.533 5.527 0.947 0.947 5.527-5.533 5.527 5.533 0.947-0.947-5.533-5.527 5.533-5.527-0.947-0.947z"}})]),e._v(" "),n("p",{staticClass:"message-delivery-status-number number-text"},[e._v(e._s(e.message.delivery_status_counts.failed))]),e._v(" "),e.isHoveringMessageUnsuccessfullySentTooltip?n("div",{staticClass:"tooltip-container tooltip-bottom message-delivery-status-tooltip"},[e._v("\n                    "+e._s(e.interpolate(e.translations.groupMessagesScreen.failedTooltip,{count:e.message.delivery_status_counts.failed}))+"\n                ")]):e._e()]):e._e()])]),e._v(" "),n("div",{staticClass:"message-bubble"},[n("pre",{staticClass:"message-text"},[e._v(e._s(e.message.text))])])])}),[],!1,null,null,null).exports,L={data:function(){return{isHoveringLengthDescriptionTooltip:!1,inputHeight:44}},props:{message:String,group_id:null,onMessageChange:Function,messageLengthDescription:String,onSubmit:Function,newMessageMessagesAmount:Number,charactersInCurrentMessage:Number,isValidGsmMessage:Boolean,translations:Object},watch:{message:function(){""===this.message&&(this.inputHeight=44)}},methods:{interpolate:N.a,handleChange:function(e){var t=e.key,n=e.target.value,i=document.getElementById("subit-message-input-shadow"),s=document.getElementById("subit-message-input");i.innerHTML=n+("Enter"===t?"\n":""),i.style.width="".concat(s.offsetWidth,"px");var a=i.clientHeight;this.inputHeight=Math.max(Math.min(150,a),44),this.onMessageChange(n)},openLengthDescriptionTooltip:function(){this.isHoveringLengthDescriptionTooltip=!0},closeLengthDescriptionTooltip:function(){this.isHoveringLengthDescriptionTooltip=!1}}},x=Object(I.a)(L,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("form",{staticClass:"message-form"},[n("div",{staticClass:"message-form-input-component"},[n("div",{staticStyle:{position:"relative"}},[n("pre",{staticClass:"message-input-shadow message-input",attrs:{id:"subit-message-input-shadow"}}),e._v(" "),n("textarea",{staticClass:"message-input scrollable",style:{height:String(e.inputHeight+2)+"px"},attrs:{id:"subit-message-input",placeholder:e.translations.messageForm.messageFormPlaceholder},domProps:{value:e.message},on:{keyup:e.handleChange}}),e._v(" "),n("svg",{staticClass:"message-icon pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mousedown:function(e){return e.preventDefault()},click:this.onSubmit}},[n("path",{attrs:{d:"M32 2.667l-32 9 7.333 6.893v10.773l6-5.12 5.333 5.12zM26.527 5.82l-18.447 11.613-5.413-5.1zM8.667 26.527v-6.707l3.693 3.473zM9.087 18.38l19.873-12.52-10.813 21.047z"}})])])]),e._v(" "),n("div",{staticClass:"message-length-description number-text",on:{mouseenter:e.openLengthDescriptionTooltip,mouseleave:e.closeLengthDescriptionTooltip}},[e._v("\n        "+e._s(e.messageLengthDescription||"-")+"\n        "),e.isHoveringLengthDescriptionTooltip&&e.charactersInCurrentMessage?n("div",{staticClass:"tooltip-container message-length-description-tooltip"},[e._v("\n            "+e._s(e.interpolate(e.translations.messageForm.lengthDescription,{characterCount:e.message.length,messageCount:e.newMessageMessagesAmount}))+"\n            "),e.isValidGsmMessage?e._e():n("span",{staticClass:"tooltip-section"},[e._v("\n                    "+e._s(e.translations.messageForm.utfDescription)+"\n                ")])]):e._e()])])}),[],!1,null,null,null).exports,P={props:{sortedSelectedGroupMessages:Array,selectedGroup:Object,newMessage:String,newMessageLengthDescription:String,newMessageMessagesAmount:Number,charactersInCurrentMessage:Number,isValidGsmMessage:Boolean,isNewMessageLoading:Boolean,handleNewMessageChange:Function,attemptSendMessageToExistingGroup:Function,handleOpenMessageRecipientsScreen:Function,translations:Object},components:{"group-message":O,"message-form":x,spinner:S}},M=Object(I.a)(P,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"group-messages-screen main-screen-content"},[n("div",{staticClass:"group-messages-list scrollable",attrs:{id:"group-messages-list"}},e._l(e.sortedSelectedGroupMessages,(function(t){return n("div",{key:t.id},[n("group-message",{attrs:{translations:e.translations,message:t},on:{"handle-open-single-message":function(n){return e.handleOpenMessageRecipientsScreen(t)}}})],1)})),0),e._v(" "),n("div",{staticClass:"group-messages-form-box"},[n("message-form",{staticStyle:{"margin-top":"0"},attrs:{message:e.newMessage,"on-message-change":e.handleNewMessageChange,group_id:e.selectedGroup.id,"on-submit":e.attemptSendMessageToExistingGroup,"message-length-description":e.newMessageLengthDescription,"new-message-messages-amount":e.newMessageMessagesAmount,"characters-in-current-message":e.charactersInCurrentMessage,"is-valid-gsm-message":e.isValidGsmMessage,translations:e.translations}})],1),e._v(" "),e.isNewMessageLoading?n("div",[n("spinner"),e._v(" "),n("div")],1):e._e(
1)])}),[],!1,null,null,null).exports,F={props:{users:Array,subHeaderText:String,giveConsent:Function,translations:Object},components:{spinner:S},data:function(){return{isOpen:!1,isLoading:!1}},methods:{toggleOpen:function(){this.isOpen=!this.isOpen},onGiveConsent:function(){var e=this;return u()(k.a.mark((function t(){return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.isLoading=!0,t.next=3,e.giveConsent();case 3:e.isLoading=!1;case 4:case"end":return t.stop()}}),t)})))()}}},U=Object(I.a)(F,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"give-consent-container",class:{pointer:!e.isOpen}},[e.isLoading?n("div",{staticClass:"give-consent-loading-container"},[n("spinner",{attrs:{size:40}})],1):e._e(),e._v(" "),n("div",[n("div",{staticClass:"consent-header",on:{click:function(t){return e.toggleOpen()}}},[n("svg",{staticClass:"header-consent-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M4 0v32h15.333c4.786 0 8.667-3.88 8.667-8.667v0-23.333h-24zM26.667 23.333c0 4.050-3.283 7.333-7.333 7.333v0h-14v-29.333h21.333v22zM10.667 9.333h10.667v1.333h-10.667v-1.333zM10.667 14.667h10.667v1.333h-10.667v-1.333zM10.667 20h8v1.333h-8v-1.333z"}})]),e._v(" "),n("div",{staticClass:"header-consent-text"},[n("h3",{staticClass:"header-consent-heading"},[e._v(e._s(e.translations.consentBox.header))]),e._v(" "),n("h3",{staticClass:"header-consent-subheading"},[e._v(e._s(e.subHeaderText)+" ("),n("span",{staticClass:"number-text"},[e._v(e._s(this.users.length))]),e._v(" "+e._s(e.translations.consentBox.people)+")\n                ")])]),e._v(" "),e.isOpen?e._e():n("svg",{staticClass:"header-consent-exit pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M28 15.333h-11.333v-11.333h-1.333v11.333h-11.333v1.333h11.333v11.333h1.333v-11.333h11.333v-1.333z"}})]),e._v(" "),e.isOpen?n("svg",{staticClass:"header-consent-exit pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M5.333 15.333h21.333v1.333h-21.333v-1.333z"}})]):e._e()]),e._v(" "),e.isOpen?n("div",{staticClass:"consent-body"},[n("p",{staticClass:"consent-text"},[e._v(e._s(e.translations.consentBox.text))]),e._v(" "),n("div",{staticClass:"consent-button-container pointer"},[n("div",{staticClass:"consent-button text-primary border border-primary pointer",on:{click:function(t){return e.onGiveConsent()}}},[e._v("\n                    "+e._s(e.translations.consentBox.buttonText)+"\n                ")])])]):e._e()])])}),[],!1,null,"57e70834",null).exports,B={props:{search:String,searchClear:Function,searchChange:Function,placeholder:String},data:function(){return{localSearchStr:this.search,debounceTimeout:null}},watch:{search:function(e){this.localSearchStr=e}},methods:{onInput:function(){var e=this;this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout((function(){e.searchChange(e.localSearchStr)}),500)}}},V=Object(I.a)(B,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("form",{staticClass:"search-person-form"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.localSearchStr,expression:"localSearchStr"}],staticClass:"search-person-input",attrs:{type:"text",placeholder:e.placeholder},domProps:{value:e.localSearchStr},on:{keyup:e.onInput,input:function(t){t.target.composing||(e.localSearchStr=t.target.value)}}}),e._v(" "),e.localSearchStr.length?n("div",[n("svg",{staticClass:"search-person-icon pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:e.searchClear}},[n("path",{attrs:{d:"M26 6.96l-0.96-0.96-9.040 9.040-9.040-9.040-0.96 0.96 9.040 9.040-9.040 9.040 0.96 0.96 9.040-9.040 9.040 9.040 0.96-0.96-9.040-9.040 9.040-9.040z"}})])]):n("div",[n("svg",{staticClass:"search-person-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M32 31.060l-12.233-12.24c1.777-1.992 2.863-4.634 2.863-7.53 0-6.259-5.074-11.333-11.333-11.333s-11.333 5.074-11.333 11.333c0 6.259 5.074 11.333 11.333 11.333 2.896 0 5.538-1.086 7.541-2.873l-0.011 0.010 12.233 12.24zM1.293 11.333c0-5.523 4.477-10 10-10s10 4.477 10 10c0 5.509-4.454 9.977-9.958 10h-0.002c-0 0-0 0-0 0-5.531 0-10.017-4.472-10.040-9.998v-0.002z"}})])])])}),[],!1,null,null,null).exports,W={props:{role:String,recipient:Object,keyedClasse
1s:Object,isSelected:Boolean,isSelectable:Boolean,giveConsent:Function,isMissingPhoneIconVisible:{type:Boolean,default:!0},isConsentIconVisible:{type:Boolean,default:!0},isMessageStatusIconVisible:{type:Boolean,default:!1},recipientStatus:String,translations:Object},data:function(){return{isOpen:!1,isAddConsentMenuOpen:!1,isHoveringConsentTooltip:!1,isHoveringRecipientMissingPhoneTooltip:!1,isStatusTooltipOpen:!1}},methods:{interpolate:N.a,onGiveConsent:function(){this.giveConsent([this.recipient]),this.closeAddConsentMenu()},onToggleSelection:function(){this.isSelected?this.$emit("remove-recipient",this.recipient):this.isSelectable&&this.$emit("add-recipient",this.recipient)},toggleAddConsentMenu:function(){this.isAddConsentMenuOpen=!this.isAddConsentMenuOpen},closeAddConsentMenu:function(){this.isAddConsentMenuOpen=!1},openConsentTooltip:function(){this.isHoveringConsentTooltip=!0},closeConsentTooltip:function(){this.isHoveringConsentTooltip=!1},toggleOpen:function(){this.isOpen=!this.isOpen},openRecipientMissingPhoneTooltip:function(){this.isHoveringRecipientMissingPhoneTooltip=!0},closeRecipientMissingPhoneTooltip:function(){this.isHoveringRecipientMissingPhoneTooltip=!1},openStatusTooltip:function(){this.isStatusTooltipOpen=!0},closeStatusTooltip:function(){this.isStatusTooltipOpen=!1}},computed:{initials:function(){var e,t=this;return(null===(e=this.recipient.roles.find((function(e){return e.type===t.role})))||void 0===e?void 0:e.initials)||"N/A"},otherRolesText:function(){var e=this,t=this.recipient.roles.filter((function(t){return t.type!==e.role})),n=this.translations.general.roles;return t.length>0?t.map((function(e){return n[e.type]})).join(", "):null},mainClassName:function(){var e;if("student"!==this.role)return null;var t=this.recipient.roles.find((function(e){return"student"===e.type}));return!t||!t.classes||t.classes.length<1?void 0:this.keyedClasses&&(null===(e=this.keyedClasses[t.classes[0]])||void 0===e?void 0:e.name)},consentTooltipText:function(){return this.recipient.is_consented?this.translations.recipient.consentGiven:this.recipient.is_changeable_consent?this.translations.recipient.consentCanBeGiven:this.translations.recipient.consentDenied}}},G=W,H=Object(I.a)(G,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{position:"relative"}},[n("div",{class:[e.isSelectable&&"pointer"],on:{click:e.onToggleSelection}},[n("div",{class:["recipient-list-item"]},[e.isSelectable?n("div",{staticClass:"form-check"},[n("input",{staticClass:"form-check-input select-group-checkbox",attrs:{type:"checkbox",id:"all-tutors"},domProps:{checked:e.isSelected}})]):e._e(),e._v(" "),"teacher"===e.role||"tutor"===e.role?n("div",{staticClass:"recipient-initials"},[n("span",[e._v(e._s(e.initials||"N/A"))])]):e._e(),e._v(" "),n("p",{staticClass:"recipient-name"},[e._v(e._s(e.recipient.name))]),e._v(" "),n("div",{staticClass:"recipient-right-icons"},[e.isMissingPhoneIconVisible?n("div",{staticClass:"recipient-icon-container"}
1,[e.recipient.has_phone_number?e._e():n("svg",{staticClass:"recipient-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openRecipientMissingPhoneTooltip,mouseleave:e.closeRecipientMissingPhoneTooltip}},[n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),!e.recipient.has_phone_number&&e.isHoveringRecipientMissingPhoneTooltip?n("div",{staticClass:"tooltip-container tooltip-left recipient-no-phone-tooltip"},[e._v("\n                        "+e._s(e.translations.recipient.userDoesNotHavePhoneNumber)+"\n                    ")]):e._e()]):e._e(),e._v(" "),e.isConsentIconVisible?n("div",{staticClass:"recipient-icon-container"}
1,[e.recipient.is_consented?n("svg",{staticClass:"recipient-icon fill-blue",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openConsentTooltip,mouseleave:e.closeConsentTooltip}},[n("path",{attrs:{d:"M4 0v32h15.333c4.786 0 8.667-3.88 8.667-8.667v0-23.333h-24zM26.667 23.333c0 4.050-3.283 7.333-7.333 7.333v0h-14v-29.333h21.333v22zM10.667 9.333h10.667v1.333h-10.667v-1.333zM10.667 14.667h10.667v1.333h-10.667v-1.333zM10.667 20h8v1.333h-8v-1.333z"}})]):e.recipient.is_changeable_consent?e.recipient.is_changeable_consent?n("svg",{staticClass:"recipient-icon icon-consent-denied fill-orange pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openConsentTooltip,mouseleave:e.closeConsentTooltip,click:function(t){return t.stopPropagation(),e.toggleAddConsentMenu.apply(null,arguments)}}},[n("path",{attrs:{d:"M10.667 14.679v1.333h10.667v-1.333h-10.667zM18.667 20.012v1.333h-8v-1.333h8zM10.667 9.346v1.333h10.667v-1.333h-10.667zM19.333 30.667l-14 0.012v-29.333h21.333v15.988c0.529 0 0.863 0 1.333 0v-17.321h-24v32l15.333-0.012v-1.333zM26.171 21.333l-0.179 5.254-0.008 0.242v0.004h-1.308l-0.183-5.5zM26.212 28.504c0 0.1-0.012 0.196-0.042 0.283 0 0 0 0 0 0-0.038 0.117-0.104 0.221-0.2 0.313-0.050 0.050-0.108 0.092-0.171 0.125-0.133 0.075-0.292 0.108-0.471 0.108-0.121 0-0.229-0.017-0.329-0.050-0.117-0.038-0.217-0.1-0.304-0.183-0.121-0.117-0.196-0.254-0.225-0.413-0.012-0.058-0.017-0.117-0.017-0.179 0-0.242 0.079-0.438 0.242-0.596s0.375-0.238 0.633-0.238h0.012c0.258 0.004 0.471 0.079 0.629 0.233 0.133 0.129 0.212 0.288 0.233 0.475 0.008 0.038 0.008 0.079 0.008 0.121zM25.333 20c1.425 0 2.762 0.554 3.771 1.563s1.563 2.346 1.563 3.771-0.554 2.762-1.563 3.771-2.346 1.563-3.771 1.563-2.762-0.554-3.771-1.563c-1.008-1.008-1.563-2.346-1.563-3.771s0.554-2.762 1.563-3.771c1.008-1.008 2.346-1.563 3.771-1.563zM25.333 18.667c-3.683 0-6.667 2.983-6.667 6.667s2.983 6.667 6.667 6.667 6.667-2.983 6.667-6.667-2.983-6.667-6.667-6.667v0z"}})]):e._e():n("svg",{staticClass:"recipient-icon icon-consent-denied fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openConsentTooltip,mouseleave:e.closeConsentTooltip}},[n("path",{attrs:{d:"M10.667 14.679v1.333h10.667v-1.333h-10.667zM18.667 20.012v1.333h-8v-1.333h8zM10.667 9.346v1.333h10.667v-1.333h-10.667zM19.333 30.667l-14 0.012v-29.333h21.333v15.988c0.529 0 0.863 0 1.333 0v-17.321h-24v32l15.333-0.012v-1.333zM26.171 21.333l-0.179 5.254-0.008 0.242v0.004h-1.308l-0.183-5.5zM26.212 28.504c0 0.1-0.012 0.196-0.042 0.283 0 0 0 0 0 0-0.038 0.117-0.104 0.221-0.2 0.313-0.050 0.050-0.108 0.092-0.171 0.125-0.133 0.075-0.292 0.108-0.471 0.108-0.121 0-0.229-0.017-0.329-0.050-0.117-0.038-0.217-0.1-0.304-0.183-0.121-0.117-0.196-0.254-0.225-0.413-0.012-0.058-0.017-0.117-0.017-0.179 0-0.242 0.079-0.438 0.242-0.596s0.375-0.238 0.633-0.238h0.012c0.258 0.004 0.471 0.079 0.629 0.233 0.133 0.129 0.212 0.288 0.233 0.475 0.008 0.038 0.008 0.079 0.008 0.121zM25.333 20c1.425 0 2.762 0.554 3.771 1.563s1.563 2.346 1.563 3.771-0.554 2.762-1.563 3.771-2.346 1.563-3.771 1.563-2.762-0.554-3.771-1.563c-1.008-1.008-1.563-2.346-1.563-3.771s0.554-2.762 1.563-3.771c1.008-1.008 2.346-1.563 3.771-1.563zM25.333 18.667c-3.683 0-6.667 2.983-6.667 6.667s2.983 6.667 6.667 6.667 6.667-2.983 6.667-6.667-2.983-6.667-6.667-6.667v0z"}})]),e._v(" "),e.isHoveringConsentTooltip?n("div",{staticClass:"tooltip-container tooltip-left recipient-consent-tooltip"},[e._v("\n                        "+e._s(e.consentTooltipText)+"\n                    ")]):e._e()]):e._e(),e._v(" "),e.recipientStatus&&e.isMessageStatusIconVisible?n("div",{staticClass:"recipient-icon-container"},["received"===e.recipientStatus?n("svg",{staticClass:"recipient-icon fill-green",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openStatusTooltip,mouseleave:e.closeStatusTooltip}},[n("path",{attrs:{d:"M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16v0c0-8.837-7.163-16-16-16v0zM16 30.667c-8.1 0-14.667-6.567-14.667-14.667s6.566-14.667 14.667-14.667c8.1 0 14.667 6.566 14.667 14.667v0c0 8.1-6.566 14.667-14.667 14.667v0zM15.453 20.72l-5.567-5.567-0.94 0.94 6.793 6.793 7.587-13.133-1.153-0.667-6.72 11.633z"}})]):"pending"===e.recipientStatus?n("svg",{staticClass:"recipient-icon fill-grey",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openStatusTooltip,mouseleave:e.closeStatusTooltip}},[n("path",{attrs:{d:"M24 7.273v-5.94h2.667v-1.333h-21.333v1.333h2.667v5.94c0 0.001 0 0.002 0 0.003 0 2.429 1.181 4.582 3 5.916l0.020 0.014 3.847 2.793-3.847 2.8c-1.838 1.348-3.019 3.499-3.020 5.926v5.94h-2.667v1.333h21.333v-1.333h-2.667v-5.94c0-0.001 0-0.002 0-0.003 0-2.429-1.181-4.582-3-5.916l-0.020-0.014-3.847-2.793 3.847-2.8c1.838-1.348 3.019
1-3.499 3.020-5.926v-0zM9.333 30.667v-3.447l6.667-1.22 6.667 1.213v3.453h-13.333zM20.193 19.873c1.506 1.103 2.473 2.865 2.473 4.853v1.14l-6.667-1.2-6.667 1.2v-1.14c0-1.988 0.967-3.75 2.457-4.842l0.017-0.012 4.193-3.047zM20.193 12.12l-4.193 3.053-4.193-3.053c-1.504-1.102-2.471-2.861-2.473-4.846v-5.94h13.333v5.94c-0 1.988-0.967 3.75-2.457 4.842l-0.017 0.012z"}})]):"failed"===e.recipientStatus?n("svg",{staticClass:"recipient-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{mouseenter:e.openStatusTooltip,mouseleave:e.closeStatusTooltip}},[n("path",{attrs:{d:"M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16v0c0-8.837-7.163-16-16-16v0zM16 30.667c-8.1 0-14.667-6.567-14.667-14.667s6.566-14.667 14.667-14.667c8.1 0 14.667 6.566 14.667 14.667v0c0 8.1-6.566 14.667-14.667 14.667v0zM21.527 9.527l-5.527 5.533-5.527-5.533-0.947 0.947 5.533 5.527-5.533 5.527 0.947 0.947 5.527-5.533 5.527 5.533 0.947-0.947-5.533-5.527 5.533-5.527-0.947-0.947z"}})]):e._e(),e._v(" "),"received"===e.recipientStatus&&e.isStatusTooltipOpen?n("div",{staticClass:"tooltip-container tooltip-left recipient-status-tooltip"},[e._v("\n                        "+e._s(e.interpolate(e.translations.recipient.messageReceivedBy,{name:e.recipient.name}))+"\n                    ")]):e._e(),e._v(" "),"pending"===e.recipientStatus&&e.isStatusTooltipOpen?n("div",{staticClass:"tooltip-container tooltip-left recipient-status-tooltip"},[e._v("\n                        "+e._s(e.interpolate(e.translations.recipient.messagePendingFor,{name:e.recipient.name}))+"\n                    ")]):e._e(),e._v(" "),"failed"===e.recipientStatus&&e.isStatusTooltipOpen?n("div",{staticClass:"tooltip-container tooltip-left recipient-status-tooltip"},[e._v("\n                        "+e._s(e.interpolate(e.translations.recipient.messageFailedFor,{name:e.recipient.name}))+"\n                    ")]):e._e()]):e._e(),e._v(" "),e.mainClassName?n("div",{staticClass:"recipient-initials",staticStyle:{"margin-left":"10px"}},[n("span",[e._v(e._s(e.mainClassName))])]):e._e(),e._v(" "),n("div",{staticClass:"recipient-icon-container",on:{click:function(t){return t.stopPropagation(),e.toggleOpen.apply(null,arguments)}}},[n("svg",{staticClass:"recipient-icon pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M3.333 5.333h25.333v1.333h-25.333v-1.333zM3.333 14.667h18.667v1.333h-18.667v-1.333zM3.333 24h25.333v1.333h-25.333v-1.333z"}})])])])]),e._v(" "),e.isOpen?n("div",{staticClass:"recipient-details-container"},[n("div",{staticClass:"recipient-details-item"},[n("span",{staticClass:"contact-details-item-key"},[e._v(e._s(e.translations.recipient.otherRoles))]),e._v(" "),n("span",{staticClass:"recipient-details-item-value"},[e._v(e._s(e.otherRolesText||"-"))])]),e._v(" "),n("div",{staticClass:"recipient-details-item"},[n("span",{staticClass:"contact-details-item-key"},[e._v(e._s(e.translations.recipient.uniId))]),e._v(" "),n("span",{staticClass:"recipient-details-item-value"},[e._v(e._s(this.recipient.provider_id||"-"))])])]):e._e(),e._v(" "),e.isAddConsentMenuOpen?n("div",{staticClass:"give-consent-card"},[n("div",{staticClass:"consent-button text-primary border border-primary pointer",on:{click:function(t){return t.stopPropagation(),e.onGiveConsent.apply(null,arguments)}}},[e._v("\n                "+e._s(e.translations.recipient.giveConsentForUser)+"\n            ")]),e._v(" "),n("div",{staticClass:"recipient-border-bottom"})]):e._e()]),e._v(" "),n("div",{staticClass:"recipient-border-bottom"})])}),[],!1,null,null,null),j=H.exports,Y={props:{role:String,header:String,recipients:Array,keyedClasses:Object,isSelectable:{type:Boolean,default:!0},giveConsent:Function,selectedUsers:Object,isConsentIconVisible:{type:Boolean,default:!0},isMessageStatusIconVisible:{type:Boolean,default:!1},isMissingPhoneIconVisible:{type:Boolean,default:!0},recipientStatuses:Object,translations:Object},data:function(){return{openToggle:null,pages:1,pageSize:25}},computed:{isOpen:function(){return null===this.openToggle&&this.recipients.length<=5||!!this.openToggle},paginated:function(){return this.recipients.slice(0,this.pages*this.pageSize)},numberOfItemsOnNextPage:function(){var e=this.pages*this.pageSize;return e>this.recipients.length?0:Math.min(this.pageSize,this.recipients.length-e)}},methods:{interpolate:N.a,toggleOpen:function(){this.openToggle=!this.openToggle},showMore:function(){this.pages=this.pages+1}},components:{recipient:j}},$=Object(I.a)(Y,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.recipients.length>0?n("div",{staticClass:"recipient-type"},[n("div",{staticClass:"recipient-type-header",on:{click:function(t){return e.toggleOpen()}}},[e.isOpen?e._e():n("svg",{staticClass:"recipient-type-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M5.333 12.273l0.94-0.94 9.727 8.78 9.727-8.78 0.94 0.94-10.667 9.727-10.667-9.727z"}})]),e._v(" "),e.isOpen?n("svg",{staticClass:"recipient-type-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}}
1,[n("path",{attrs:{d:"M16 10.667l-10.667 9.727 0.94 0.94 9.727-8.78 9.727 8.78 0.94-0.94-10.667-9.727z"}})]):e._e(),e._v(" "),n("p",{class:[e.isOpen&&"bold","recipient-type-heading"]},[e._v("\n            "+e._s(e.header)+"\n        ")]),e._v(" "),n("div",{staticClass:"recipient-type-count number-text"},[e._v("\n            "+e._s(e.recipients.length)+"\n        ")])]),e._v(" "),e.isOpen?n("div",{staticClass:"recipient-type-body"},[n("div",{staticClass:"contact-list"},e._l(e.paginated,(function(t){return n("recipient",{key:t.id,attrs:{role:e.role,recipient:t,"is-selected":e.selectedUsers&&!!e.selectedUsers[t.id],"is-selectable":e.isSelectable,"give-consent":e.giveConsent,"keyed-classes":e.keyedClasses,"is-consent-icon-visible":e.isConsentIconVisible,"is-message-status-icon-visible":e.isMessageStatusIconVisible,"is-missing-phone-icon-visible":e.isMissingPhoneIconVisible,"recipient-status":e.recipientStatuses?e.recipientStatuses[t.id]:null,translations:e.translations},on:{"add-recipient":function(n){return e.$emit("add-recipient",t)},"remove-recipient":function(n){return e.$emit("remove-recipient",t)}}})})),1),e._v(" "),e.numberOfItemsOnNextPage>0?n("div",{staticClass:"next-page",on:{click:function(t){return e.showMore()}}},[e._v("\n            "+e._s(e.interpolate(e.translations.recipientType.showMore,{count:e.numberOfItemsOnNextPage}))+"\n        ")]):e._e()]):e._e()]):e._e()}),[],!1,null,"42696119",null),z=$.exports,q={props:{members:Array,classes:Object,users:Object,selectedGroupMembersFiltered:Object,selectedGroupMembersWhereConsentable:Array,selected:Object,recipientSearch:String,clearRecipientSearch:Function,setRecipientSearch:Function,giveConsent:Function,translations:Object},components:{"consent-box":U,search:V,"recipient-type":z},computed:{previews:function(){var e=this;return this.members.filter((function(e){return!e.user_id})).map((function(t){var n;if(t.class_id&&t.relation){var i,s=null===(i=e.classes[t.class_id])||void 0===i?void 0:i.name,a=e.translations.general.roles[t.relation];return"".concat(s,": ").concat(a)}return t.relation?e.translations.general.roles.all[t.relation]:null===(n=e.users[t.user_id])||void 0===n?void 0:n.name}))}}},K=Object(I.a)(q,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"group-members main-screen-content scrollable"},[n("div",{staticClass:"group-members-padding-container"},[e.previews.length>0?n("p",{staticClass:"group-members-section-header"},[e._v(e._s(e.translations.groupMembersScreen.groups))]):e._e(),e._v(" "),e.previews.length>0?n("div",{staticClass:"group-members-groups-container"},e._l(e.previews,(function(t){return n("div",{key:t},[n("div",{staticClass:"group-members-group-bubble"},[e._v("\n                    "+e._s(t)+"\n                ")])])})),0):e._e(),e._v(" "),n("p",{staticClass:"group-members-section-header"},[e._v(e._s(e.translations.groupMembersScreen.members))]),e._v(" "),e.selectedGroupMembersWhereConsentable.length>0?n("consent-box",{attrs:{"sub-header-text":e.translations.groupMembersScreen.consentBoxSubheader,users:e.selectedGroupMembersWhereConsentable,"give-consent":function(){return e.giveConsent(e.selectedGroupMembersWhereConsentable)},translations:e.translations}}):e._e(),e._v(" "),n("search",{attrs:{placeholder:e.translations.groupMembersScreen.searchPlaceholder,search:e.recipientSearch,"search-clear":e.clearRecipientSearch,"search-change":e.setRecipientSearch}})],1),e._v(" "),n("recipient-type",{attrs:{role:"teacher",translations:e.translations,header:e.translations.general.roles.teachers,recipients:e.selectedGroupMembersFiltered.teachers,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent,"is-selectable":!1}}),e._v(" "),n("recipient-type",{attrs:{role:"tutor",translations:e.translations,header:e.translations.general.roles.tutors,recipients:e.selectedGroupMembersFiltered.tutors,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent,"is-selectable":!1}}),e._v(" "),n("recipient-type",{attrs:{role:"student",translations:e.translations,header:e.translations.general.roles.students,recipients:e.selectedGroupMembersFiltered.students,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent,"is-selectable":!1}}),e._v(" "),n("recipient-type",{attrs:{role:"contact_person",translations:e.translations,header:e.translations.general.roles.contacts,recipients:e.selectedGroupMembersFiltered.contactPersons,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent,"is-selectable":!1}}),e._v(" "),n("recipient-type",{attrs:{role:"inspector",translations:e.translations,header:e.translations.general.roles.inspectors,recipients:e.selectedGroupMembersFiltered.inspectors,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent,"is-selectable":!1}})],1)}),[],!1,null,null,null).exports,Q={props:{recipientSearch:String,clearRecipientSearch:Function,setRecipientSearch:Function,selectedMessageStatuses:Object,selectedMessageStatusFilters:Array,selectedMessageRecipientsLength:Number,selected:Object,selectedMessageRecipientsFiltered:Object,addStatusFilter:Function,navigate:Function,removeStatusFilter:Function,translations:Object,keyedClasse
1s:Object},methods:{mustHaveStatus:function(e,t){return e.filter((function(e){return t[e.id]}))}},computed:{statusCounts:function(){var e={};return Object.values(this.selectedMessageStatuses).forEach((function(t){e[t]=e[t]?e[t]+1:1})),e}},components:{search:V,"recipient-type":z}},J=Object(I.a)(Q,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"message-recipients-screen"},[n("div",{staticClass:"header"},[n("div",{staticClass:"header-heading"},[n("svg",{staticClass:"header-icon left pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:function(t){return e.navigate("group-messages-screen")}}},[n("path",{attrs:{d:"M20.393 5.333l0.94 0.94-8.78 9.727 8.78 9.727-0.94 0.94-9.727-10.667 9.727-10.667z"}})]),e._v(" "),n("h3",{staticClass:"header-title"},[e._v(e._s(e.translations.messageRecipientsScreen.headerTitle))])])]),e._v(" "),n("div",{staticClass:"main-screen-content scrollable"},[n("div",{staticClass:"message-recipients-container"},[n("div",{staticStyle:{"margin-bottom":"15px"}},[n("search",{attrs:{placeholder:e.translations.messageRecipientsScreen.searchPlaceholder,search:e.recipientSearch,"search-clear":e.clearRecipientSearch,"search-change":e.setRecipientSearch}})],1),e._v(" "),n("div",{staticClass:"filter-buttons-container"},[e.statusCounts.pending?n("div",{class:[e.selectedMessageStatusFilters.includes("pending")&&"active","filter-button pointer"],on:{click:function(t){e.selectedMessageStatusFilters.includes("pending")?e.removeStatusFilter("pending"):e.addStatusFilter("pending")}}},[n("div",{staticClass:"filter-button-top"},[n("svg",{staticClass:"button-icon fill-grey",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M24 7.273v-5.94h2.667v-1.333h-21.333v1.333h2.667v5.94c0 0.001 0 0.002 0 0.003 0 2.429 1.181 4.582 3 5.916l0.020 0.014 3.847 2.793-3.847 2.8c-1.838 1.348-3.019 3.499-3.020 5.926v5.94h-2.667v1.333h21.333v-1.333h-2.667v-5.94c0-0.001 0-0.002 0-0.003 0-2.429-1.181-4.582-3-5.916l-0.020-0.014-3.847-2.793 3.847-2.8c1.838-1.348 3.019-3.499 3.020-5.926v-0zM9.333 30.667v-3.447l6.667-1.22 6.667 1.213v3.453h-13.333zM20.193 19.873c1.506 1.103 2.473 2.865 2.473 4.853v1.14l-6.667-1.2-6.667 1.2v-1.14c0-1.988 0.967-3.75 2.457-4.842l0.017-0.012 4.193-3.047zM20.193 12.12l-4.193 3.053-4.193-3.053c-1.504-1.102-2.471-2.861-2.473-4.846v-5.94h13.333v5.94c-0 1.988-0.967 3.75-2.457 4.842l-0.017 0.012z"}})]),e._v(" "),n("span",{staticClass:"filter-button-amount number-text"},[e._v(e._s(e.statusCounts.pending))])]),e._v(" "),n("p",[e._v(e._s(e.translations.messageRecipientsScreen.pending))])]):e._e(),e._v(" "),e.statusCounts.received?n("div",{class:[e.selectedMessageStatusFilters.includes("received")&&"active","filter-button pointer"],on:{click:function(t){e.selectedMessageStatusFilters.includes("received")?e.removeStatusFilter("received"):e.addStatusFilter("received")}}},[n("div",{staticClass:"filter-button-top"},[n("svg",{staticClass:"button-icon fill-green",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16v0c0-8.837-7.163-16-16-16v0zM16 30.667c-8.1 0-14.667-6.567-14.667-14.667s6.566-14.667 14.667-14.667c8.1 0 14.667 6.566 14.667 14.667v0c0 8.1-6.566 14.667-14.667 14.667v0zM15.453 20.72l-5.567-5.567-0.94 0.94 6.793 6.793 7.587-13.133-1.153-0.667-6.72 11.633z"}})]),e._v(" "),n("span",{staticClass:"filter-button-amount number-text"},[e._v(e._s(e.statusCounts.received))])]),e._v(" "),n("p",[e._v(e._s(e.translations.messageRecipientsScreen.received))])]):e._e(),e._v(" "),e.statusCounts.failed?n("div",{class:[e.selectedMessageStatusFilters.includes("failed")&&"active","filter-button fill-green pointer"],on:{click:function(t){e.selectedMessageStatusFilters.includes("failed")?e.removeStatusFilter("failed"):e.addStatusFilter("failed")}}},[n("div",{staticClass:"filter-button-top"},[n("svg",{staticClass:"button-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16v0c0-8.837-7.163-16-16-16v0zM16 30.667c-8.1 0-14.667-6.567-14.667-14.667s6.566-14.667 14.667-14.667c8.1 0 14.667 6.566 14.667 14.667v0c0 8.1-6.566 14.667-14.667 14.667v0zM21.527 9.527l-5.527 5.533-5.527-5.533-0.947 0.947 5.533 5.527-5.533 5.527 0.947 0.947 5.527-5.533 5.527 5.533 0.947-0.947-5.533-5.527 5.533-5.527-0.947-0.947z"}})]),e._v(" "),n("span",{staticClass:"filter-button-amount number-text"},[e._v(e._s(e.statusCounts.failed))])]),e._v(" "),n("p",[e._v(e._s(e.translations.messageRecipientsScreen.failed))])]):e._e(
1)])])]),e._v(" "),e.selectedMessageRecipientsLength?n("div",[n("recipient-type",{attrs:{role:"teacher",translations:e.translations,header:e.translations.general.roles.teachers,recipients:e.mustHaveStatus(e.selectedMessageRecipientsFiltered.teachers,e.selectedMessageStatuses),"is-selectable":!1,"keyed-classes":e.keyedClasses,"is-consent-icon-hidden":!0,"is-message-status-icon-visible":!0,"is-missing-phone-icon-visible":!1,"recipient-statuses":e.selectedMessageStatuses}}),e._v(" "),n("recipient-type",{attrs:{role:"tutor",translations:e.translations,header:e.translations.general.roles.tutors,recipients:e.mustHaveStatus(e.selectedMessageRecipientsFiltered.tutors,e.selectedMessageStatuses),"is-selectable":!1,"keyed-classes":e.keyedClasses,"is-consent-icon-hidden":!0,"is-message-status-icon-visible":!0,"is-missing-phone-icon-visible":!1,"recipient-statuses":e.selectedMessageStatuses}}),e._v(" "),n("recipient-type",{attrs:{role:"student",translations:e.translations,header:e.translations.general.roles.students,recipients:e.mustHaveStatus(e.selectedMessageRecipientsFiltered.students,e.selectedMessageStatuses),"is-selectable":!1,"keyed-classes":e.keyedClasse
1s,"is-consent-icon-hidden":!0,"is-message-status-icon-visible":!0,"is-missing-phone-icon-visible":!1,"recipient-statuses":e.selectedMessageStatuses}}),e._v(" "),n("recipient-type",{attrs:{role:"contact_person",translations:e.translations,header:e.translations.general.roles.contacts,recipients:e.mustHaveStatus(e.selectedMessageRecipientsFiltered.contactPersons,e.selectedMessageStatuses),"is-selectable":!1,"keyed-classes":e.keyedClasses,"is-consent-icon-hidden":!0,"is-message-status-icon-visible":!0,"is-missing-phone-icon-visible":!1,"recipient-statuses":e.selectedMessageStatuses}}),e._v(" "),n("recipient-type",{attrs:{role:"inspector",translations:e.translations,header:e.translations.general.roles.inspectors,recipients:e.mustHaveStatus(e.selectedMessageRecipientsFiltered.inspectors,e.selectedMessageStatuses),"is-selectable":!1,"keyed-classes":e.keyedClasses,"is-consent-icon-hidden":!0,"is-message-status-icon-visible":!0,"is-missing-phone-icon-visible":!1,"recipient-statuses":e.selectedMessageStatuses}})],1):n("div",{staticClass:"no-results-message"},[e._v("\n        "+e._s(e.translations.messageRecipientsScreen.noResults)+"\n    ")])])}),[],!1,null,null,null).exports,Z=n(87),X=n.n(Z),ee={props:{visibleWithoutAnySelections:Boolean,selected:Object,selectedRecipients:Array,unSelectRecipient:Function,unSelectAllGroupType:Function,unSelectAllGroupTypeByClass:Function,translations:Object},data:function(){return{preview:this.createPreview()}},watch:{selected:{deep:!0,handler:function(){this.preview=this.createPreview()}}},methods:{interpolate:N.a,createPreview:function(){var e=this.translations.general.roles;return this.createTypePreviews("teachers",e.teachers,e.all.teachers).concat(this.createTypePreviews("tutors",e.tutors,e.all.tutors)).concat(this.createTypePreviews("students",e.students,e.all.students)).concat(this.createTypePreviews("contactPersons",e.contacts,e.all.contacts)).concat(this.createIndividualPreviews())},createTypePreviews:function(e,t,n){var i=this;return"all"===this.selected[e]?[{label:n,onRemove:function(){return i.unSelectAllGroupType(e)}}]:this.selected[e]&&"object"===X()(this.selected[e])?Object.values(this.selected[e]).filter((function(e){return!!e})).map((function(n){return{label:"".concat(n.name,": ").concat(t),onRemove:function(){return i.unSelectAllGroupTypeByClass(e,n)}}})):[]},createIndividualPreviews:function(){var e=this;return Object.values(this.selected.users).map((function(t){return{label:t.name,onRemove:function(){return e.unSelectRecipient(t)}}}))}}},te=Object(I.a)(ee,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.preview.length||e.visibleWithoutAnySelections?n("div",{staticStyle:{position:"relative"}},[n("div",{staticClass:"selected-recipients-container scrollable"},[n("div",{staticClass:"selected-recipients-list"},e._l(e.preview,(function(t){return n("div",{staticClass:"selected-recipient-bubble"},[t.label?n("span",{staticClass:"selected-recipient-text"},[e._v(e._s(t.label))]):e._e(),e._v(" "),t.onRemove?n("svg",{staticClass:"selected-recipient-icon pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:t.onRemove}},[n("path",{attrs:{d:"M26 6.96l-0.96-0.96-9.040 9.04040-9.0-9.040-0.96 0.96 9.040 9.040-9.040 9.040 0.96 0.96 9.040-9.040 9.040 9.040 0.96-0.96-9.040-9.040 9.040-9.040z"}})]):e._e()])})),0)]),e._v(" "),e.selectedRecipients.length?n("span",{staticClass:"selected-recipients-total number-text"},[e._v("\n                "+e._s(e.interpolate(e.translations.selectedRecipients.peopleSelected,{count:e.selectedRecipients.length}))+"\n            ")]):e._e(),e._v(" "),e.selectedRecipients.length?n("span",{staticClass:"clear-selected-recipients-button pointer",on:{click:function(t){return e.$emit("unselect-all-recipients")}}},[e._v("\n                "+e._s(e.interpolate(e.translations.selectedRecipients.clearSelected))+"\n            ")]):e._e()]):e._e()])}),[],!1,null,null,null).exports,ne={props:{errors:Array,onClose:Function,translations:Object}},ie=Object(I.a)(ne,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal-container message-validation-errors-modal text-center"},[n("svg",{staticClass:"modal-illustration",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 165 96.633"}}
1,[n("defs",[n("filter",{attrs:{id:"Path_709",x:"34.54",y:"6.326",width:"57.219",height:"56.113",filterUnits:"userSpaceOnUse"}},[n("feOffset",{attrs:{dy:"3",input:"SourceAlpha"}}),e._v(" "),n("feGaussianBlur",{attrs:{stdDeviation:"3",result:"blur"}}),e._v(" "),n("feFlood",{attrs:{"flood-opacity":"0.161"}}),e._v(" "),n("feComposite",{attrs:{operator:"in",in2:"blur"}}),e._v(" "),n("feComposite",{attrs:{in:"SourceGraphic"}})],1)]),e._v(" "),n("g",{attrs:{id:"Illustration",transform:"translate(-0.194)"}},[n("g",{attrs:{id:"Group_1856","data-name":"Group 1856",transform:"translate(0.194)",opacity:"0.75"}},[n("path",{attrs:{id:"Path_684","data-name":"Path 684",d:"M164.106,48.564c8.968,23.959-39.779,45.957-61.662,47.832-21.821,1.968-62.355,4.729-90.026-25.955C-15.175,39.644,4.382-15.8,66.68,7.53,129.029,30.927,155.192,24.683,164.106,48.564Z",transform:"translate(-0.194 -0.857)",fill:"#f2f5f9","fill-rule":"evenodd"}}),e._v(" "),n("image",{attrs:{id:"Rectangle_1719","data-name":"Rectangle 1719",width:"59.389",height:"96.367",transform:"translate(96.108)","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAACsCAYAAACTkDk+AAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAaqADAAQAAAABAAAArAAAAACUMqf3AAAFVElEQVR4Ae2awXbTMBBFCYcVe5b8/3/BDtawLRGnOhi1nsia0bPGudnYruyZ53uj1G10+/bj18sHXksT+Prl8+3j0gkJ95fA95+/XxCV5M2AKEQlIZAkJjMKUUkIJInJjEJUEgJJYn7qzXn/o6v31A/3537z3KhaUXVK2KhaUXVagFM++qyw1lgbLvLY6muNRWZoax3pO0VUG4hjPwFE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSCoiSYPY3QZSfoaTCFFHW91HW2Mw7tvpaY2dlavveWCnbIlnzeMqMWvNWc6dCVBJ/iEJUEgJJYjKjkohiudirqCMrgqzH+ag67ftnyoyywlpjbbjIY6uvNRaZoa11pO8UUW0gjv0EEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSClNEWd/XWGMz79jqa42dlanty3Kxlsiix1Nm1KL3mjoWopLoQxSikhBIEpMZlUQUy8VeRR1ZEWQ9zkfVad8/U2aUFdYaa8NFHlt9rbHIDG2tI32niGoDcewngCg/Q0kFREkw+5sgys9QUgFREsz+JojyM5RUQJQEs78JovwMJRUQJcHsb4IoP0NJBURJMPubIMrPUFIBURLM/iaI8jOUVJgiyvq+xhqbecdWX2vsrExtX5aLtUQWPZ4yoxa919SxEJVEH6IQlYRAkpjMqCSiWC72KurIiiDrcT6qTvv+mTKjrLDWWBsu8tjqa41FZmhrHek7RVQbiGM/AUT5GUoqIEqC2d8EUX6GkgqIkmD2N0GUn6GkAqIkmP1NEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpMIUUdb3NdbYzDu2+lpjZ2Vq+7JcrCWy6PGUGbXovaaOhagk+hCFqCQEksRkRiURJV8udmTlTWFoPTpH1YqqU/JG1ir16mvKjDoatoZhu09giqj9doyMEkDUKDnxdYgSAx9th6hRcuLrECUGPtoOUaPkxNchSgx8tB2iRsmJr0OUGPhoO0SNkhNfhygx8NF2iBolJ74OUWLgo+0QNUpOfB2rkMTAR9sxo0bJia9DlBj4aDtEjZITX4coMfDRdogaJSe+DlFi4KPtpiwXK2H2lnkdXaG0V6f0iKoVVScyU6m1fTGjtjQW3kfUwnK20RC1pbHwPqIWlrONhqgtjUX37w87N0QtKqfGKpLKPqIqkQW3VRKiFpRTI20lIapSWWzbSirxuv8zsdi9XDLOe4LqjfI7qpI4eWtJKtEQdbKg0v6RpHIOH32Fwnmv211SV3dmVBemKSf9/fuotzKieknFnndIUmnNcrFYAWa1nt9FewWYUXtkgn/ukVSi8DARLKQt5xVU6yGqkgjeRgmqsfjoqyQCt9GSSjRm1OKCajxmVCXh3M6YRdtI3TPqHmR73cP9vWVeUXVKgKhanjr3aw//TfQQ3jsndIt659qn/pFKUIWMqEqif9v9/7n+ko/PRNRjRvUMyUdcbdZuEdUSeXt8qqAaB1GVxNvtEoJqLERVEv+2SwmqsRBVSdy/Sfi3u97e04tSP2aPvgWeVlQWQVXsU4nKJqdKKttnEbX075+tkL39q4tKL6iKu6Koy8ipksr2KqIuKedKoi4vqMpKt1ws85NbhT6yTfHR96xytkKXFYWcraaFHiYQ87+Y9ujUGYWcVsf+sUwUUvYl9IxME4WYHvz957hFIaQftufMXVEI8GCNv/YPKdzNQsY/Fm4AAAAASUVORK5CYII="}}),e._v(" "),n("path",{attrs:{id:"Path_685","data-name":"Path 685",d:"M67.318,124.161c-16.677-2.775-34.217-9.72-48.387-25.418a49.186,49.186,0,0,1-3.95-5.024v-27.4H67.318Z",transform:"translate(-6.696 -29.16)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_686","data-name":"Path 686",d:"M28.731,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H23.794V80.064A4.937,4.937,0,0,1,28.731,75.127Z",transform:"translate(-10.572 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_687","data-name":"Path 687",d:"M28.731,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H28.078s-1.074-.986-2.159-2.053-2.028-2.121-2.028-2.121l-.1-4.1A4.937,4.937,0,0,1,28.731,110.157Z",transform:"translate(-10.572 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_688","data-name":"Path 688",d:"M57.813,75.127a4.937,4.937,0,0,1,4.937,4.937v8.271H52.875V80.064A4.937,4.937,0,0,1,57.813,75.127Z",transform:"translate(-23.388 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_689","data-name":"Path 689",d:"M57.813,110.157a4.937,4.937,0,0,1,4.937,4.937v8.27H52.875v-8.27A4.937,4.937,0,0,1,57.813,110.157Z",transform:"translate(-23.388 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_690","data-name":"Path 690",d:"M86.894,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H81.956V80.064A4.938,4.938,0,0,1,86.894,75.127Z",transform:"translate(-36.191 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_691","data-name":"Path 691",d:"M86.894,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H81.956v-8.27A4.937,4.937,0,0,1,86.894,110.157Z",transform:"translate(-36.191 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_692","data-name":"Path 692",d:"M58.2,145.187a4.937,4.937,0,0,1,4.937,4.937v2.7L58.2,150.483s-1.516-.759-4.447-2.451A4.785,4.785,0,0,1,58.2,145.187Z",transform:"translate(-23.774 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_693","data-name":"Path 693",d:"M86.894,145.187a4.937,4.937,0,0,1,4.938,4.937l.054,7.805s-3.195-.718-5.677-1.4-4.252-1.333-4.252-1.333v-5.07A4.937,4.937,0,0,1,86.894,145.187Z",transform:"translate(-36.191 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_694","data-name":"Path 694",d:"M26,33.267H65.991V45.611H26Z",transform:"translate(-11.54 -14.628)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_695","data-name":"Path 695",d:"M29.3,36.572h36.29v8.641H29.3Z",transform:"translate(-12.994 -16.082)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_696","data-name":"Path 696",d:"M38.687,55.3H37.453V61.47h1.234Z",transform:"translate(-16.578 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_697","data-name":"Path 697",d:"M84.953,55.3H83.719V61.47h1.234Z",transform:"translate(-36.965 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_698","data-name":"Path 698",d:"M156.534,124.218a56.486,56.486,0,0,1-6.419.964c-10.667.961-25.8,2.112-41.721-.537V85.931l24.07-18.515,24.07,18.515Z",transform:"translate(-47.851 -29.645)",fill:"#d3e0f1","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_699","data-name":"Path 699",d:"M117.577,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,107.293Z",transform:"translate(-51.711 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_700","data-name":"Path 700",d:"M143.353,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,107.293Z",transform:"translate(-63.059 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_701","data-name":"Path 701",d:"M169.13,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,107.293Z",transform:"translate(-74.408 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_702","data-name":"Path 702",d:"M117.577,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,128.443Z",transform:"translate(-51.711 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_703","data-name":"Path 703",d:"M143.353,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,128.443Z",transform:"translate(-63.059 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_704","data-name":"Path 704",d:"M169.13,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,128.443Z",transform:"translate(-74.408 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_705","data-name":"Path 705",d:"M117.577,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,149.593Z",transform:"translate(-51.711 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_706","data-name":"Path 706",d:"M143.353,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,149.593Z",transform:"translate(-63.059 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_707","data-name":"Path 707",d:"M169.13,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,149.593Z",transform:"translate(-74.408 -65.78)",fill:"#fff","fill-rule":"evenodd"}})]),e._v(" "),n("path",{attrs:{id:"Path_708","data-name":"Path 708",d:"M124.766,39.5h35.3a11.766,11.766,0,0,1,11.766,11.766v25a11.766,11.766,0,0,1-11.766,11.766H127.9l-10.132,8A2.941,2.941,0,0,1,113,93.728V51.266A11.766,11.766,0,0,1,124.766,39.5Z",transform:"translate(-49.693 -17.369)",fill:"#fd5061"}}),e._v(" "),n("g",{attrs:{transform:"matrix(1, 0, 0, 1, 0.19, 0)",filter:"url
1(#Path_709)"}},[n("path",{attrs:{id:"Path_709-2","data-name":"Path 709",d:"M109.375,22H85.844A7.844,7.844,0,0,0,78,29.844V46.512a7.844,7.844,0,0,0,7.844,7.844h21.445l6.755,5.335a1.961,1.961,0,0,0,3.176-1.539V29.844A7.844,7.844,0,0,0,109.375,22Z",transform:"translate(-34.46 -9.67)",fill:"#fd5061"}})])])]),e._v(" "),n("h3",{staticClass:"modal-heading text-color-primary"},[e._v(e._s(e.translations.messageValidationErrorsModal.heading))]),e._v(" "),n("p",{staticClass:"modal-text text-color-lighter"},[e._v(e._s(e.translations.messageValidationErrorsModal.text))]),e._v(" "),n("ul",{staticClass:"modal-list"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"text-color-lighter"},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"modal-buttons"},[n("div",{staticClass:"modal-button action",on:{click:function(t){return e.onClose()}}},[e._v("\n            "+e._s(e.translations.messageValidationErrorsModal.goBack)+"\n        ")])])])}),[],!1,null,null,null).exports,se={props:{messagesAmount:Number,recipientsReceivable:Array,recipientsNotReceivable:Array,recipientsWithoutConsent:Array,recipientsWithoutPhone:Array,translations:Object}},ae=Object(I.a)(se,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal-container confirm-send-modal text-center"},[n("svg",{staticClass:"confirm-icon",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 165 96.633"}},[n("defs",[n("filter",{attrs:{id:"Path_709",x:"34.54",y:"6.326",width:"57.219",height:"56.113",filterUnits:"userSpaceOnUse"}},[n("feOffset",{attrs:{dy:"3",input:"SourceAlpha"}}),e._v(" "),n("feGaussianBlur",{attrs:{stdDeviation:"3",result:"blur"}}),e._v(" "),n("feFlood",{attrs:{"flood-opacity":"0.161"}}),e._v(" "),n("feComposite",{attrs:{operator:"in",in2:"blur"}}),e._v(" "),n("feComposite",{attrs:{in:"SourceGraphic"}})],1)]),e._v(" "),n("g",{attrs:{id:"Illustration",transform:"translate(-0.194)"}},[n("g",{attrs:{id:"Group_1856","data-name":"Group 1856",transform:"translate(0.194)",opacity:"0.75"}},[n("path",{attrs:{id:"Path_684","data-name":"Path 684",d:"M164.106,48.564c8.968,23.959-39.779,45.957-61.662,47.832-21.821,1.968-62.355,4.729-90.026-25.955C-15.175,39.644,4.382-15.8,66.68,7.53,129.029,30.927,155.192,24.683,164.106,48.564Z",transform:"translate(-0.194 -0.857)",fill:"#f2f5f9","fill-rule":"evenodd"}}),e._v(" "),n("image",{attrs:{id:"Rectangle_1719","data-name":"Rectangle 1719",width:"59.389",height:"96.367",transform:"translate(96.108)","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAACsCAYAAACTkDk+AAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAaqADAAQAAAABAAAArAAAAACUMqf3AAAFVElEQVR4Ae2awXbTMBBFCYcVe5b8/3/BDtawLRGnOhi1nsia0bPGudnYruyZ53uj1G10+/bj18sHXksT+Prl8+3j0gkJ95fA95+/XxCV5M2AKEQlIZAkJjMKUUkIJInJjEJUEgJJYn7qzXn/o6v31A/3537z3KhaUXVK2KhaUXVagFM++qyw1lgbLvLY6muNRWZoax3pO0VUG4hjPwFE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSCoiSYPY3QZSfoaTCFFHW91HW2Mw7tvpaY2dlavveWCnbIlnzeMqMWvNWc6dCVBJ/iEJUEgJJYjKjkohiudirqCMrgqzH+ag67ftnyoyywlpjbbjIY6uvNRaZoa11pO8UUW0gjv0EEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSClNEWd/XWGMz79jqa42dlanty3Kxlsiix1Nm1KL3mjoWopLoQxSikhBIEpMZlUQUy8VeRR1ZEWQ9zkfVad8/U2aUFdYaa8NFHlt9rbHIDG2tI32niGoDcewngCg/Q0kFREkw+5sgys9QUgFREsz+JojyM5RUQJQEs78JovwMJRUQJcHsb4IoP0NJBURJMPubIMrPUFIBURLM/iaI8jOUVJgiyvq+xhqbecdWX2vsrExtX5aLtUQWPZ4yoxa919SxEJVEH6IQlYRAkpjMqCSiWC72KurIiiDrcT6qTvv+mTKjrLDWWBsu8tjqa41FZmhrHek7RVQbiGM/AUT5GUoqIEqC2d8EUX6GkgqIkmD2N0GUn6GkAqIkmP1NEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpMIUUdb3NdbYzDu2+lpjZ2Vq+7JcrCWy6PGUGbXovaaOhagk+hCFqCQEksRkRiURJV8udmTlTWFoPTpH1YqqU/JG1ir16mvKjDoatoZhu09giqj9doyMEkDUKDnxdYgSAx9th6hRcuLrECUGPtoOUaPkxNchSgx8tB2iRsmJr0OUGPhoO0SNkhNfhygx8NF2iBolJ74OUWLgo+0QNUpOfB2rkMTAR9sxo0bJia9DlBj4aDtEjZITX4coMfDRdogaJSe+DlFi4KPtpiwXK2H2lnkdXaG0V6f0iKoVVScyU6m1fTGjtjQW3kfUwnK20RC1pbHwPqIWlrONhqgtjUX37w87N0QtKqfGKpLKPqIqkQW3VRKiFpRTI20lIapSWWzbSirxuv8zsdi9XDLOe4LqjfI7qpI4eWtJKtEQdbKg0v6RpHIOH32Fwnmv211SV3dmVBemKSf9/fuotzKieknFnndIUmnNcrFYAWa1nt9FewWYUXtkgn/ukVSi8DARLKQt5xVU6yGqkgjeRgmqsfjoqyQCt9GSSjRm1OKCajxmVCXh3M6YRdtI3TPqHmR73cP9vWVeUXVKgKhanjr3aw//TfQQ3jsndIt659qn/pFKUIWMqEqif9v9/7n+ko/PRNRjRvUMyUdcbdZuEdUSeXt8qqAaB1GVxNvtEoJqLERVEv+2SwmqsRBVSdy/Sfi3u97e04tSP2aPvgWeVlQWQVXsU4nKJqdKKttnEbX075+tkL39q4tKL6iKu6Koy8ipksr2KqIuKedKoi4vqMpKt1ws85NbhT6yTfHR96xytkKXFYWcraaFHiYQ87+Y9ujUGYWcVsf+sUwUUvYl9IxME4WYHvz957hFIaQftufMXVEI8GCNv/YPKdzNQsY/Fm4AAAAASUVORK5CYII="}}),e._v(" "),n("path",{attrs:{id:"Path_685","data-name":"Path 685",d:"M67.318,124.161c-16.677-2.775-34.217-9.72-48.387-25.418a49.186,49.186,0,0,1-3.95-5.024v-27.4H67.318Z",transform:"translate(-6.696 -29.16)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_686","data-name":"Path 686",d:"M28.731,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H23.794V80.064A4.937,4.937,0,0,1,28.731,75.127Z",transform:"translate(-10.572 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_687","data-name":"Path 687",d:"M28.731,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H28.078s-1.074-.986-2.159-2.053-2.028-2.121-2.028-2.121l-.1-4.1A4.937,4.937,0,0,1,28.731,110.157Z",transform:"translate(-10.572 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_688","data-name":"Path 688",d:"M57.813,75.127a4.937,4.937,0,0,1,4.937,4.937v8.271H52.875V80.064A4.937,4.937,0,0,1,57.813,75.127Z",transform:"translate(-23.388 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_689","data-name":"Path 689",d:"M57.813,110.157a4.937,4.937,0,0,1,4.937,4.937v8.27H52.875v-8.27A4.937,4.937,0,0,1,57.813,110.157Z",transform:"translate(-23.388 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_690","data-name":"Path 690",d:"M86.894,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H81.956V80.064A4.938,4.938,0,0,1,86.894,75.127Z",transform:"translate(-36.191 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_691","data-name":"Path 691",d:"M86.894,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H81.956v-8.27A4.937,4.937,0,0,1,86.894,110.157Z",transform:"translate(-36.191 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_692","data-name":"Path 692",d:"M58.2,145.187a4.937,4.937,0,0,1,4.937,4.937v2.7L58.2,150.483s-1.516-.759-4.447-2.451A4.785,4.785,0,0,1,58.2,145.187Z",transform:"translate(-23.774 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_693","data-name":"Path 693",d:"M86.894,145.187a4.937,4.937,0,0,1,4.938,4.937l.054,7.805s-3.195-.718-5.677-1.4-4.252-1.333-4.252-1.333v-5.07A4.937,4.937,0,0,1,86.894,145.187Z",transform:"translate(-36.191 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_694","data-name":"Path 694",d:"M26,33.267H65.991V45.611H26Z",transform:"translate(-11.54 -14.628)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_695","data-name":"Path 695",d:"M29.3,36.572h36.29v8.641H29.3Z",transform:"translate(-12.994 -16.082)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_696","data-name":"Path 696",d:"M38.687,55.3H37.453V61.47h1.234Z",transform:"translate(-16.578 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_697","data-name":"Path 697",d:"M84.953,55.3H83.719V61.47h1.234Z",transform:"translate(-36.965 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_698","data-name":"Path 698",d:"M156.534,124.218a56.486,56.486,0,0,1-6.419.964c-10.667.961-25.8,2.112-41.721-.537V85.931l24.07-18.515,24.07,18.515Z",transform:"translate(-47.851 -29.645)",fill:"#d3e0f1","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_699","data-name":"Path 699",d:"M117.577,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,107.293Z",transform:"translate(-51.711 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_700","data-name":"Path 700",d:"M143.353,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,107.293Z",transform:"translate(-63.059 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_701","data-name":"Path 701",d:"M169.13,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,107.293Z",transform:"translate(-74.408 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_702","data-name":"Path 702",d:"M117.577,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,128.443Z",transform:"translate(-51.711 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_703","data-name":"Path 703",d:"M143.353,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,128.443Z",transform:"translate(-63.059 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_704","data-name":"Path 704",d:"M169.13,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,128.443Z",transform:"translate(-74.408 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_705","data-name":"Path 705",d:"M117.577,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,149.593Z",transform:"translate(-51.711 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_706","data-name":"Path 706",d:"M143.353,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,149.593Z",transform:"translate(-63.059 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_707","data-name":"Path 707",d:"M169.13,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,149.593Z",transform:"translate(-74.408 -65.78)",fill:"#fff","fill-rule":"evenodd"}})]),e._v(" "),n("path",{attrs:{id:"Path_708","data-name":"Path 708",d:"M124.766,39.5h35.3a11.766,11.766,0,0,1,11.766,11.766v25a11.766,11.766,0,0,1-11.766,11.766H127.9l-10.132,8A2.941,2.941,0,0,1,113,93.728V51.266A11.766,11.766,0,0,1,124.766,39.5Z",transform:"translate(-49.693 -17.369)",fill:"#4d88ff"}}),e._v(" "),n("g",{attrs:{transform:"matrix(1, 0, 0, 1, 0.19, 0)",filter:"url
1(#Path_709)"}},[n("path",{attrs:{id:"Path_709-2","data-name":"Path 709",d:"M109.375,22H85.844A7.844,7.844,0,0,0,78,29.844V46.512a7.844,7.844,0,0,0,7.844,7.844h21.445l6.755,5.335a1.961,1.961,0,0,0,3.176-1.539V29.844A7.844,7.844,0,0,0,109.375,22Z",transform:"translate(-34.46 -9.67)",fill:"#4d88ff"}})])])]),e._v(" "),n("h3",{staticClass:"confirm-heading"},[e._v(e._s(e.translations.confirmSendMessageModal.header))]),e._v(" "),n("div",{staticClass:"confirm-detail-container"},[n("svg",{staticClass:"confirm-detail-icon fill-blue",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 37 32"}},[n("path",{attrs:{d:"M7.733 11.713c0.54 3.007 2.54 4.953 5.093 4.953s4.513-1.893 5.093-4.947c0.093-0.467 0.54-2.827 0.567-3.4 0.003-0.070 0.005-0.152 0.005-0.235 0-1.418-0.564-2.704-1.48-3.647l0.001 0.001c-1.063-1.092-2.548-1.77-4.191-1.77-1.662 0-3.163 0.694-4.227 1.808l-0.002 0.002c-0.888 0.922-1.435 2.179-1.435 3.563 0 0.102 0.003 0.204 0.009 0.305l-0.001-0.014c0.033 0.58 0.513 3.1 0.567 3.38zM9.567 5.393c0.822-0.848 1.971-1.375 3.243-1.375s2.422 0.527 3.242 1.373l0.001 0.001c0.683 0.704 1.104 1.665 1.104 2.724 0 0.062-0.001 0.123-0.004 0.184l0-0.009c0 0.367-0.34 2.167-0.547 3.207-0.353 1.833-1.533 3.833-3.78 3.833s-3.493-2.080-3.787-3.867c-0.2-1.047-0.52-2.847-0.547-3.22-0.003-0.058-0.005-0.125-0.005-0.193 0-1.034 0.411-1.973 1.079-2.661l-0.001 0.001zM20.973 19.813l-8.147-1.093-8.1 1.073c-2 0.393-4.18 1.787-4.46 4l-0.267 5.54h25.847l-0.32-5.273c-0.14-2.18-1.833-3.767-4.553-4.247zM1.233 28l0.353-4.033c0.193-1.553 1.893-2.573 3.333-2.86l7.9-1.040 7.94 1.060c0.987 0.173 3.293 0.82 3.433 3.013l0.24 3.86h-23.2zM22.62 14.307c0.447 2.447 2.1 4 4.207 4s3.727-1.54 4.207-4c0.073-0.373 0.433-2.24 0.453-2.707v0c0.003-0.057 0.004-0.124 0.004-0.191 0-1.15-0.457-2.192-1.199-2.957l0.001 0.001c-0.882-0.911-2.117-1.477-3.483-1.477s-2.601 0.566-3.482 1.475l-0.001 0.001c-0.722 0.749-1.166 1.77-1.166 2.894 0 0.082 0.002 0.163 0.007 0.244l-0-0.011c0.027 0.5 0.38 2.367 0.453 2.727zM24.3 9.407c0.639-0.655 1.53-1.062 2.517-1.062s1.878 0.406 2.516 1.061l0.001 0.001c0.513 0.527 0.829 1.247 0.829 2.041 0 0.044-0.001 0.088-0.003 0.132l0-0.006c0 0.267-0.26 1.633-0.433 2.513-0.133 0.667-0.74 2.94-2.9 2.94-1.74 0-2.667-1.513-2.893-2.94-0.16-0.82-0.413-2.233-0.433-2.52-0.004-0.054-0.006-0.117-0.006-0.18 0-0.77 0.305-1.468 0.8-1.981l-0.001 0.001zM29.333 29.333h8l-0.073-5.013c-0.14-1.807-1.533-3.127-3.773-3.527l-6.58-0.793-0.16 1.333 6.547 0.787c0.753 0.133 2.513 0.627 2.667 2.293l0.16 3.587h-6.787v1.333z"}})]),e._v(" "),n("p",{staticClass:"confirm-detail-text"},[n("span",{staticClass:"confirm-message-number number-text"},[e._v(e._s(e.recipientsReceivable.length))]),e._v(" "+e._s(e.translations.confirmSendMessageModal.receivesMessage)+"\n        ")])]),e._v(" "),n("div",{staticClass:"confirm-detail-container"},[n("svg",{staticClass:"confirm-detail-icon fill-blue",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M32 2.667l-32 9 7.333 6.893v10.773l6-5.12 5.333 5.12zM26.527 5.82l-18.447 11.613-5.413-5.1zM8.667 26.527v-6.707l3.693 3.473zM9.087 18.38l19.873-12.52-10.813 21.047z"}})]),e._v(" "),n("p",{staticClass:"confirm-detail-text"},[n("span",{staticClass:"confirm-message-number number-text"},[e._v(e._s(e.messagesAmount*e.recipientsReceivable.length))]),e._v("\n            "+e._s(e.translations.confirmSendMessageModal.messagesTotal)+"\n        ")])]),e._v(" "),n("div",{staticClass:"confirm-detail-container"},[n("svg",{staticClass:"confirm-detail-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 37 32"}},[n("path",{attrs:{d:"M7.733 11.713c0.54 3.007 2.54 4.953 5.093 4.953s4.513-1.893 5.093-4.947c0.093-0.467 0.54-2.827 0.567-3.4 0.003-0.070 0.005-0.152 0.005-0.235 0-1.418-0.564-2.704-1.48-3.647l0.001 0.001c-1.063-1.092-2.548-1.77-4.191-1.77-1.662 0-3.163 0.694-4.227 1.808l-0.002 0.002c-0.888 0.922-1.435 2.179-1.435 3.563 0 0.102 0.003 0.204 0.009 0.305l-0.001-0.014c0.033 0.58 0.513 3.1 0.567 3.38zM9.567 5.393c0.822-0.848 1.971-1.375 3.243-1.375s2.422 0.527 3.242 1.373l0.001 0.001c0.683 0.704 1.104 1.665 1.104 2.724 0 0.062-0.001 0.123-0.004 0.184l0-0.009c0 0.367-0.34 2.167-0.547 3.207-0.353 1.833-1.533 3.833-3.78 3.833s-3.493-2.080-3.787-3.867c-0.2-1.047-0.52-2.847-0.547-3.22-0.003-0.058-0.005-0.125-0.005-0.193 0-1.034 0.411-1.973 1.079-2.661l-0.001 0.001zM20.973 19.813l-8.147-1.093-8.1 1.073c-2 0.393-4.18 1.787-4.46 4l-0.267 5.54h25.847l-0.32-5.273c-0.14-2.18-1.833-3.767-4.553-4.247zM1.233 28l0.353-4.033c0.193-1.553 1.893-2.573 3.333-2.86l7.9-1.040 7.94 1.060c0.987 0.173 3.293 0.82 3.433 3.013l0.24 3.86h-23.2zM22.62 14.307c0.447 2.447 2.1 4 4.207 4s3.727-1.54 4.207-4c0.073-0.373 0.433-2.24 0.453-2.707v0c0.003-0.057 0.004-0.124 0.004-0.191 0-1.15-0.457-2.192-1.199-2.957l0.001 0.001c-0.882-0.911-2.117-1.477-3.483-1.477s-2.601 0.566-3.482 1.475l-0.001 0.001c-0.722 0.749-1.166 1.77-1.166 2.894 0 0.082 0.002 0.163 0.007 0.244l-0-0.011c0.027 0.5 0.38 2.367 0.453 2.727zM24.3 9.407c0.639-0.655 1.53-1.062 2.517-1.062s1.878 0.406 2.516 1.061l0.001 0.001c0.513 0.527 0.829 1.247 0.829 2.041 0 0.044-0.001 0.088-0.003 0.132l0-0.006c0 0.267-0.26 1.633-0.433 2.513-0.133 0.667-0.74 2.94-2.9 2.94-1.74 0-2.667-1.513-2.893-2.94-0.16-0.82-0.413-2.233-0.433-2.52-0.004-0.054-0.006-0.117-0.006-0.18 0-0.77 0.305-1.468 0.8-1.981l-0.001 0.001zM29.333 29.333h8l-0.073-5.013c-0.14-1.807-1.533-3.127-3.773-3.527l-6.58-0.793-0.16 1.333 6.547 0.787c0.753 0.133 2.513 0.627 2.667 2.293l0.16 3.587h-6.787v1.333z"}})]),e._v(" "),n("p",{staticClass:"confirm-detail-text"},[n("span",{staticClass:"confirm-message-number number-text"},[e._v(e._s(e.recipientsNotReceivable.length))]),e._v("\n            "+e._s(e.translations.confirmSendMessageModal.notReceiveMessageA)+"\n            "),n("strong",[e._v(e._s(e.translations.confirmSendMessageModal.notReceiveMessageB))]),e._v("\n            "+e._s(e.translations.confirmSendMessageModal.notReceiveMessageC)+"\n        ")])]),e._v(" "),n("div",{staticClass:"confirm-detail-container inset"},[n("svg",{staticClass:"confirm-detail-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M10.667 14.679v1.333h10.667v-1.333h-10.667zM18.667 20.012v1.333h-8v-1.333h8zM10.667 9.346v1.333h10.667v-1.333h-10.667zM19.333 30.667l-14 0.012v-29.333h21.333v15.988c0.529 0 0.863 0 1.333 0v-17.321h-24v32l15.333-0.012v-1.333zM26.171 21.333l-0.
1179 5.254-0.008 0.242v0.004h-1.308l-0.183-5.5zM26.212 28.504c0 0.1-0.012 0.196-0.042 0.283 0 0 0 0 0 0-0.038 0.117-0.104 0.221-0.2 0.313-0.050 0.050-0.108 0.092-0.171 0.125-0.133 0.075-0.292 0.108-0.471 0.108-0.121 0-0.229-0.017-0.329-0.050-0.117-0.038-0.217-0.1-0.304-0.183-0.121-0.117-0.196-0.254-0.225-0.413-0.012-0.058-0.017-0.117-0.017-0.179 0-0.242 0.079-0.438 0.242-0.596s0.375-0.238 0.633-0.238h0.012c0.258 0.004 0.471 0.079 0.629 0.233 0.133 0.129 0.212 0.288 0.233 0.475 0.008 0.038 0.008 0.079 0.008 0.121zM25.333 20c1.425 0 2.762 0.554 3.771 1.563s1.563 2.346 1.563 3.771-0.554 2.762-1.563 3.771-2.346 1.563-3.771 1.563-2.762-0.554-3.771-1.563c-1.008-1.008-1.563-2.346-1.563-3.771s0.554-2.762 1.563-3.771c1.008-1.008 2.346-1.563 3.771-1.563zM25.333 18.667c-3.683 0-6.667 2.983-6.667 6.667s2.983 6.667 6.667 6.667 6.667-2.983 6.667-6.667-2.983-6.667-6.667-6.667v0z"}})]),e._v(" "),n("p",{staticClass:"confirm-detail-text"},[n("span",{staticClass:"confirm-message-number number-text"},[e._v(e._s(e.recipientsWithoutConsent.length))]),e._v(" "+e._s(e.translations.confirmSendMessageModal.haveNotConsented)+"\n        ")])]),e._v(" "),n("div",{staticClass:"confirm-detail-container inset"},[n("svg",{staticClass:"confirm-detail-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),n("p",{staticClass:"confirm-detail-text"},[n("span",{staticClass:"confirm-message-number number-text"},[e._v(e._s(e.recipientsWithoutPhone.length))]),e._v(" "+e._s(e.translations.confirmSendMessageModal.areMissingPhoneNumber)+"\n        ")])]),e._v(" "),n("div",{staticClass:"confirm-button-container"},[n("div",{staticClass:"confirm-button confirm-button-hollow pointer",on:{click:function(t){return e.$emit("close-modal")}}},[e._v(e._s(e.translations.confirmSendMessageModal.cancel))]),e._v(" "),n("div",{staticClass:"confirm-button confirm-button-primary pointer",on:{click:function(t){return e.$emit("send-message")}}},[e._v(e._s(e.translations.confirmSendMessageModal.send))])])])}),[],!1,null,null,null).exports,re={props:{onClose:Function,onConfirm:Function,translations:Object}},oe=Object(I.a)(re,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal-container confirm-back-modal"},[n("svg",{staticClass:"modal-top-right-icon pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:e.onClose}},[n("path",{attrs:{d:"M26 6.96l-0.96-0.96-9.040 9.040-9.040-9.040-0.96 0.96 9.040 9.040-9.040 9.040 0.96 0.96 9.040-9.040 9.040 9.040 0.96-0.96-9.040-9.040 9.040-9.040z"}})]),e._v(" "),n("h6",{staticClass:"modal-heading text-color-primary"},[e._v(e._s(e.translations.confirmBackModal.header))]),e._v(" "),n("p",{staticClass:"modal-text text-color-lighter"},[e._v(e._s(e.translations.confirmBackModal.text))]),e._v(" "),n("div",{staticClass:"modal-buttons"},[n("div",{staticClass:"modal-button normal",on:{click:e.onClose}},[e._v(e._s(e.translations.confirmBackModal.cancel))]),e._v(" "),n("div",{staticClass:"modal-button danger",on:{click:e.onConfirm}},[e._v(e._s(e.translations.confirmBackModal.confirm))])])])}),[],!1,null,null,null).exports,le={props:{isNewMessageConfirmModalOpen:Boolean,isNewMessageErrorModalOpen:Boolean,newMessageMessagesAmount:Number,selectedRecipients:Array,unSelectRecipient:Function,unSelectAllGroupType:Function,unSelectAllGroupTypeByClass:Function,selected:null,anySelectedRecipients:Boolean,newMessage:String,onMessageChange:Function,attemptSendMessage:Function,charactersInCurrentMessage:Number,isValidGsmMessage:Boolean,isNewMessageLoading:Boolean,newMessageLengthDescription:String,newMessageErrors:Array,selectedRecipientsReceivable:Array,selectedRecipientsWithoutPhone:Array,selectedRecipientsWithoutConsent:Array,selectedRecipientsNotReceivable:Array,closeNewMessageConfirmModal:Function,handleSendMessage:Function,handleMessageGroupNameChange:Function,newMessageGroupName:String,translations:Object,isConfirmBackModalOpen:Boolean,closeConfirmBackModal:Function,confirmGoBack:Function,isRemovedSelectedRecipientsNotEmpty:Boolean,undoRemoveSelectedRecipients:Function},components:{"selected-recipients":te,"message-form":x,"message-validation-errors-modal":ie,"confirm-send-message-modal":ae,spinner:S,"confirm-back-modal":oe}},ce=Object(I.a)(le,(function(){var e=this,t=this,n=t.$createElement,i=t._self._c||n;return i("div",{staticClass:"sending-container"},[t.isNewMessageConfirmModalOpen?i("div",{staticClass:"modal-background"},[i("confirm-send-message-modal",{attrs:{"messages-amount":t.newMessageMessagesAmount,"recipients-receivable":t.selectedRecipientsReceivable,"recipients-not-receivable":t.selectedRecipientsNotReceivable,"recipients-without-consent":t.selectedRecipientsWithoutConsent,"recipients-without-phone":t.selectedRecipientsWithoutPhone,translations:t.translations},on:{"close-modal":t.closeNewMessageConfirmModal,"send-message":function(e){t.closeNewMessageConfirmModal(),t.handleSendMessage()}}}
1)],1):t._e(),t._v(" "),t.isConfirmBackModalOpen?i("div",{staticClass:"modal-background"},[i("confirm-back-modal",{attrs:{"on-close":t.closeConfirmBackModal,"on-confirm":t.confirmGoBack,translations:t.translations}})],1):t._e(),t._v(" "),t.isNewMessageErrorModalOpen?i("div",{staticClass:"modal-background"},[i("message-validation-errors-modal",{attrs:{errors:t.newMessageErrors,translations:t.translations,"on-close":function(){return t.$emit("close-new-message-error-modal")}}})],1):t._e(),t._v(" "),i("div",{staticClass:"header"},[i("div",{staticClass:"header-heading"},[i("svg",{staticClass:"header-icon left pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:function(e){return t.$emit("handle-close")}}},[i("path",{attrs:{d:"M20.393 5.333l0.94 0.94-8.78 9.727 8.78 9.727-0.94 0.94-9.727-10.667 9.727-10.667z"}})]),t._v(" "),i("h3",{staticClass:"header-title"},[t._v(t._s(t.translations.newMessageScreen.headerTitle))])])]),t._v(" "),i("div",{staticClass:"not-selecting main-screen-content scrollable"},[i("div",{staticClass:"new-message-container"},[i("div",{staticClass:"new-message-container-grow"},[i("div",{staticClass:"new-message-heading"},[i("h3",{staticClass:"new-message-heading-text"},[t._v(t._s(t.translations.newMessageScreen.groupNameHeading))])]),t._v(" "),i("input",{staticClass:"new-message-group-name-input",attrs:{type:"text"},domProps:{value:t.newMessageGroupName},on:{input:function(t){return e.handleMessageGroupNameChange(t.target.value)}}}),t._v(" "),i("div",{staticClass:"new-message-heading pointer",on:{click:function(e){return t.$emit("open-select-recipients-screen")}}},[i("h3",{staticClass:"new-message-heading-text"},[t._v(t._s(t.translations.newMessageScreen.selectRecipientsHeading))]),t._v(" "),i("div",{staticClass:"new-message-heading-icon-container"},[i("svg",{staticClass:"new-message-heading-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[i("path",{attrs:{d:"M28 15.333h-11.333v-11.333h-1.333v11.333h-11.333v1.333h11.333v11.333h1.333v-11.333h11.333v-1.333z"}})])])]),t._v(" "),t.anySelectedRecipients?i("selected-recipients",{attrs:{translations:t.translations,"visible-without-any-selections":!0,selected:t.selected,"selected-recipients":t.selectedRecipients,"un-select-recipient":t.unSelectRecipient,"un-select-all-group-type":t.unSelectAllGroupType,"un-select-all-group-type-by-class":t.unSelectAllGroupTypeByClass},on:{"unselect-recipient":function(e){return t.$emit("unselect-recipient",t.recipient)},"unselect-all-recipients":function(e){return t.$emit("unselect-all-recipients")}}}):t._e()],1),t._v(" "),t.isNewMessageLoading?i("div",{staticClass:"new-message-loading-backdrop"},[i("spinner")],1):t._e(),t._v(" "),i("div",[i("message-form",{attrs:{message:t.newMessage,"on-message-change":t.onMessageChange,"on-submit":t.attemptSendMessage,"message-length-description":t.newMessageLengthDescription,"new-message-messages-amount":t.newMessageMessagesAmount,"characters-in-current-message":t.charactersInCurrentMessage,"is-valid-gsm-message":t.isValidGsmMessage,translations:t.translations}})],1)])]),t._v(" "),t.isRemovedSelectedRecipientsNotEmpty?i("div",{staticClass:"undo-remove",on:{click:t.undoRemoveSelectedRecipients}},[i("p",{staticClass:"undo-text"},[t._v(t._s(t.translations.selectRecipientsScreen.peopleRemoved))]),t._v(" "),i("div",{staticClass:"undo-button pointer"},[t._v(t._s(t.translations.selectRecipientsScreen.undo))])]):t._e()])}),[],!1,null,null,null).exports,ue={props:{search:String,currentClass:Object,selectedStudents:null,selectedContactPersons:null,selectClassRole:Function,unselectClassRole:Function,translations:Object},data:function(){return{isManuallyToggled:!1,isManuallyOpen:!1}},computed:{isOpen:function(){return this.isManuallyToggled?this.isManuallyOpen:this.isDefaultOpen},isDefaultOpen:function(){return this.search.length>0},isStudentsSelected:function(){return"all"===this.selectedStudents||this.selectedStudents&&this.selectedStudents[this.currentClass.id]},isContactsSelected:function(){return"all"===this.selectedContactPersons||this.selectedContactPersons&&this.selectedContactPersons[this.currentClass.id]},isAllSelected:function(){return this.isStudentsSelected&&this.isContactsSelected}},methods:{toggleOpen:function(){this.isManuallyToggled=!0,this.isManuallyOpen=!this.isManuallyOpen},toggleHeaderCheckbox:function(){if(this.isAllSelected)return this.toggleContactsCheckbox(),void this.toggleStudentsCheckbox();this.isStudentsSelected||this.toggleStudentsCheckbox(),this.isContactsSelected||this.toggleContactsCheckbox()},toggleStudentsCheckbox:function(){(this.isStudentsSelected?this.unselectClassRole:this.selectClassRole)("students",this.currentClass)},toggleContactsCheckbox:function(){(this.isContactsSelected?this.unselectClassRole:this.selectClassRole)("contactPersons",this.currentClass)}}},de=Object(I.a)(ue,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"class-container pointer",class:{open:e.isOpen}},[n("div",{staticClass:"class-header",on:{click:function(t){return e.toggleOpen()}}},[n("div",{staticClass:"form-check"},[n("input",{staticClass:"form-check-input class-checkbox",attrs:{type:"checkbox"},domProps:{checked:e.isAllSelected},on:{click:function(t){return t.stopPropagation(),e.toggleHeaderCheckbox.apply(null,arguments)}}}),e._v(" "),n("span",{staticClass:"class-name"},[e._v(e._s(e.currentClass.name))])]),e._v(" "),e.isOpen?n("svg",{staticClass:"class-dropdown-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}}
1,[n("path",{attrs:{d:"M16 10.667l-10.667 9.727 0.94 0.94 9.727-8.78 9.727 8.78 0.94-0.94-10.667-9.727z"}})]):n("svg",{staticClass:"class-dropdown-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M5.333 12.273l0.94-0.94 9.727 8.78 9.727-8.78 0.94 0.94-10.667 9.727-10.667-9.727z"}})])]),e._v(" "),e.isOpen?n("div",{staticClass:"class-body"},[n("div",{staticClass:"class-dropdown"},[n("div",{staticClass:"dropdown-menu-item",on:{click:function(t){return e.toggleContactsCheckbox()}}},[n("input",{attrs:{type:"checkbox"},domProps:{checked:e.isContactsSelected}}),e._v(" "),n("span",{staticClass:"dropdown-label"},[e._v(e._s(e.translations.general.roles.contacts))])]),e._v(" "),n("div",{staticClass:"dropdown-menu-item",on:{click:function(t){return e.toggleStudentsCheckbox()}}},[n("input",{attrs:{type:"checkbox"},domProps:{checked:e.isStudentsSelected}}),e._v(" "),n("span",{staticClass:"dropdown-label"},[e._v(e._s(e.translations.general.roles.students))])])])]):e._e()])}),[],!1,null,null,null),he=de.exports,me={props:{selectRecipientsMode:String,selected:Object,selectedRecipients:Array,teachers:Array,recipientSearch:String,clearRecipientSearch:Function,setRecipientSearch:Function,unSelectRecipient:Function,removeSelectedRecipients:Function,giveConsentUsers:Array,filteredRecipients:Array,filteredTeachers:Array,filteredTutors:Array,filteredStudents:Array,filteredContactPersons:Array,filteredInspectors:Array,giveConsent:Function,isRemovedSelectedRecipientsNotEmpty:Boolean,anySelectedRecipients:null,classSearch:String,clearClassSearch:Function,setClassSearch:Function,filteredClasses:Array,unSelectAllGroupType:Function,selectAllGroupTypeByClass:Function,unSelectAllGroupTypeByClass:Function,translations:Object,undoRemoveSelectedRecipients:Function,keyedClasses:Object},components:{search:V,"consent-box":U,"recipient-type":z,"selected-recipients":te,"select-from-class":he},methods:{interpolate:N.a}},pe=Object(I.a)(me,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"select-recipients-screen"},[n("div",{staticClass:"header d-flex"},[n("div",{staticClass:"header-heading"},[n("svg",{staticClass:"header-icon left pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:function(t){return e.$emit("close-select-recipients-screen")}}},[n("path",{attrs:{d:"M20.393 5.333l0.94 0.94-8.78 9.727 8.78 9.727-0.94 0.94-9.727-10.667 9.727-10.667z"}})]),e._v(" "),n("h3",{staticClass:"header-title"},[e._v(e._s(e.translations.selectRecipientsScreen.headerTitle))])]),e._v(" "),n("div",{staticClass:"done-selecting-button",on:{click:function(t){return e.$emit("close-select-recipients-screen")}}},[e._v("\n            "+e._s(e.translations.selectRecipientsScreen.done)+"\n        ")])]),e._v(" "),n("div",{staticClass:"select-recipients-container main-screen-content scrollable"},[n("div",{staticClass:"container-padding"},[n("div",{staticClass:"recipient-category-buttons"},[n("a",{class:["people"===e.selectRecipientsMode&&"active","recipient-category-button pointer"],on:{click:function(t){return e.$emit("select-recipients-by-people")}}},[e._v(e._s(e.translations.selectRecipientsScreen.people))]),e._v(" "),n("a",{class:["group"===e.selectRecipientsMode&&"active","recipient-category-button pointer"],on:{click:function(t){return e.$emit("select-recipients-by-group")}}},[e._v(e._s(e.translations.selectRecipientsScreen.groups))])])]),e._v(" "),"people"===e.selectRecipientsMode?n("div",{staticClass:"select-by-people"},[n("div",{staticStyle:{padding:"0 15px 15px 15px"}},[n("search",{attrs:{placeholder:e.translations.selectRecipientsScreen.peopleSearchPlaceholder,search:e.recipientSearch,"search-clear":e.clearRecipientSearch,"search-change":e.setRecipientSearch}}),e._v(" "),n("selected-recipients",{attrs:{translations:e.translations,"visible-without-any-selections":!1,selected:e.selected,"selected-recipients":e.selectedRecipients,"un-select-recipient":e.unSelectRecipient,"un-select-all-group-type":e.unSelectAllGroupType,"un-select-all-group-type-by-class":e.unSelectAllGroupTypeByClass},on:{"unselect-recipient":function(t){return e.selectRecipient(t)},"unselect-all-recipients":e.removeSelectedRecipients}}),e._v(" "),e.giveConsentUsers.length>0?n("consent-box",{attrs:{"sub-header-text":e.anySelectedRecipients?e.translations.selectRecipientsScreen.consentBoxSubheaderSelectedRecipients:e.translations.selectRecipientsScreen.consentBoxSubheaderPeople,users:e.giveConsentUsers,"give-consent":function(){return e.giveConsent(e.giveConsentUsers)},translations:e.translations}}
1):e._e(),e._v(" "),n("h3",{staticClass:"recipient-amount-description"},[e._v(e._s(e.interpolate(e.recipientSearch?e.translations.selectRecipientsScreen.peopleAmount:e.translations.selectRecipientsScreen.resultsAmount,{count:e.filteredRecipients.length})))])],1),e._v(" "),n("recipient-type",{attrs:{role:"teacher",translations:e.translations,header:e.translations.general.roles.teachers,recipients:e.filteredTeachers,"selected-users":e.selected.users,"keyed-classes":e.keyedClasses,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.$emit("select-recipient",t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}),e._v(" "),n("recipient-type",{attrs:{role:"tutor",translations:e.translations,header:e.translations.general.roles.tutors,recipients:e.filteredTutors,"selected-users":e.selected.users,"keyed-classes":e.keyedClasses,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.$emit("select-recipient",t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}),e._v(" "),n("recipient-type",{attrs:{role:"student",translations:e.translations,header:e.translations.general.roles.students,recipients:e.filteredStudents,"selected-users":e.selected.users,"keyed-classes":e.keyedClasse
1s,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.$emit("select-recipient",t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}),e._v(" "),n("recipient-type",{attrs:{role:"contact_person",translations:e.translations,header:e.translations.general.roles.contacts,recipients:e.filteredContactPersons,"selected-users":e.selected.users,"keyed-classes":e.keyedClasses,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.$emit("select-recipient",t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}),e._v(" "),n("recipient-type",{attrs:{role:"inspector",translations:e.translations,header:e.translations.general.roles.inspectors,recipients:e.filteredInspectors,"selected-users":e.selected.users,"keyed-classes":e.keyedClasses,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.$emit("select-recipient",t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}})],1):(e.selectRecipientsMode="group")?n("div",{staticClass:"select-by-group"},[n("div",{staticClass:"container-padding"},[n("selected-recipients",{attrs:{translations:e.translations,"visible-without-any-selections":!1,selected:e.selected,"selected-recipients":e.selectedRecipients,"un-select-recipient":e.unSelectRecipient,"un-select-all-group-type":e.unSelectAllGroupType,"un-select-all-group-type-by-class":e.unSelectAllGroupTypeByClass},on:{"unselect-recipient":function(t){return e.$emit("select-recipient",t)},"unselect-all-recipients":e.removeSelectedRecipients}}),e._v(" "),n("div",{staticClass:"group-selection-section"},[n("div",{staticClass:"group-selection-types-container"},[n("div",{staticClass:"pointer group-selection-type-container",class:{checked:"all"===e.selected.teachers},on:{click:function(t){"all"!==e.selected.teachers?e.$emit("select-all-group-type","teachers"):e.$emit("un-select-all-group-type","teachers")}}},[n("div",{staticClass:"form-check"},[n("input",{staticClass:"form-check-input select-group-checkbox",attrs:{type:"checkbox",value:"",id:"all-teachers"},domProps:{checked:"all"===e.selected.teachers}}),e._v(" "),n("span",{staticClass:"select-group-label"},[e._v("\n                                                "+e._s(e.translations.general.roles.all.teachers)+"\n                                            ")])])]),e._v(" "),n("div",{staticClass:"pointer group-selection-type-container",class:{checked:"all"===e.selected.tutors},on:{click:function(t){"all"!==e.selected.tutors?e.$emit("select-all-group-type","tutors"):e.$emit("un-select-all-group-type","tutors")}}},[n("div",{staticClass:"form-check"},[n("input",{staticClass:"form-check-input select-group-checkbox",attrs:{type:"checkbox",value:"",id:"all-tutors"},domProps:{checked:"all"===e.selected.tutors}}),e._v(" "),n("span",{staticClass:"select-group-label"},[e._v("\n                                                "+e._s(e.translations.general.roles.all.tutors)+"\n                                            ")])])]),e._v(" "),n("div",{staticClass:"pointer group-selection-type-container",class:{checked:"all"===e.selected.students},on:{click:function(t){"all"!==e.selected.students?e.$emit("select-all-group-type","students"):e.$emit("un-select-all-group-type","students")}}},[n("div",{staticClass:"form-check"},[n("input",{staticClass:"form-check-input select-group-checkbox",attrs:{type:"checkbox",value:"",id:"all-students"},domProps:{checked:"all"===e.selected.students}}),e._v(" "),n("span",{staticClass:"select-group-label"},[e._v("\n                                                "+e._s(e.translations.general.roles.all.students)+"\n                                            ")])])]),e._v(" "),n("div",{staticClass:"pointer group-selection-type-container",class:{checked:"all"===e.selected.contactPersons},on:{click:function(t){"all"!==e.selected.contactPersons?e.$emit("select-all-group-type","contactPersons"):e.$emit("un-select-all-group-type","contactPersons")}}},[n("div",{staticClass:"form-check"},[n("input",{staticClass:"form-check-input select-group-checkbox",attrs:{type:"checkbox"},domProps:{checked:"all"===e.selected.contactPersons}}),e._v(" "),n("span",{staticClass:"select-group-label"},[e._v(e._s(e.translations.general.roles.all.contacts))])])])])]),e._v(" "),n("div",{staticClass:"group-selection-section"},[n("h6",{staticClass:"group-selection-heading"},[e._v(e._s(e.translations.selectRecipientsScreen.classes))]),e._v(" "),n("search",{attrs:{placeholder:e.translations.selectRecipientsScreen.classSearchPlaceholder,search:e.classSearch,"search-clear":e.clearClassSearch,"search-ch
1ange":e.setClassSearch}}),e._v(" "),e._l(e.filteredClasses,(function(t){return n("div",{key:t.id,staticClass:"group-selection-classes-list"},[n("select-from-class",{attrs:{search:e.classSearch,"current-class":t,"selected-students":e.selected.students,"selected-contact-persons":e.selected.contactPersons,"select-class-role":e.selectAllGroupTypeByClass,"unselect-class-role":e.unSelectAllGroupTypeByClass,translations:e.translations}})],1)}))],2)],1)]):e._e(),e._v(" "),e.isRemovedSelectedRecipientsNotEmpty?n("div",{staticClass:"undo-remove",on:{click:e.undoRemoveSelectedRecipients}},[n("p",{staticClass:"undo-text"},[e._v(e._s(e.translations.selectRecipientsScreen.peopleRemoved))]),e._v(" "),n("div",{staticClass:"undo-button pointer"},[e._v(e._s(e.translations.selectRecipientsScreen.undo))])]):e._e()])])}),[],!1,null,null,null),ve=pe.exports,fe={props:{translations:Object}},ge=Object(I.a)(fe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"message-success-screen"},[n("div",{staticClass:"header"},[n("div",{staticClass:"header-heading"},[n("h3",{staticClass:"header-title"},[e._v(e._s(e.translations.messageSuccessScreen.headerTitle))])])]),e._v(" "),n("div",{staticClass:"message-success-container"},[n("div",{staticClass:"message-success-content"},[n("svg",{staticClass:"modal-illustration",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 165 96.633"}},[n("defs",[n("filter",{attrs:{id:"Path_709",x:"34.54",y:"6.326",width:"57.219",height:"56.113",filterUnits:"userSpaceOnUse"}},[n("feOffset",{attrs:{dy:"3",input:"SourceAlpha"}}),e._v(" "),n("feGaussianBlur",{attrs:{stdDeviation:"3",result:"blur"}}),e._v(" "),n("feFlood",{attrs:{"flood-opacity":"0.161"}}),e._v(" "),n("feComposite",{attrs:{operator:"in",in2:"blur"}}),e._v(" "),n("feComposite",{attrs:{in:"SourceGraphic"}})],1)]),e._v(" "),n("g",{attrs:{id:"Illustration",transform:"translate(-0.194)"}},[n("g",{attrs:{id:"Group_1856","data-name":"Group 1856",transform:"translate(0.194)",opacity:"0.75"}},[n("path",{attrs:{id:"Path_684","data-name":"Path 684",d:"M164.106,48.564c8.968,23.959-39.779,45.957-61.662,47.832-21.821,1.968-62.355,4.729-90.026-25.955C-15.175,39.644,4.382-15.8,66.68,7.53,129.029,30.927,155.192,24.683,164.106,48.564Z",transform:"translate(-0.194 -0.857)",fill:"#f2f5f9","fill-rule":"evenodd"}}),e._v(" "),n("image",{attrs:{id:"Rectangle_1719","data-name":"Rectangle 1719",width:"59.389",height:"96.367",transform:"translate(96.108)","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAACsCAYAAACTkDk+AAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAaqADAAQAAAABAAAArAAAAACUMqf3AAAFVElEQVR4Ae2awXbTMBBFCYcVe5b8/3/BDtawLRGnOhi1nsia0bPGudnYruyZ53uj1G10+/bj18sHXksT+Prl8+3j0gkJ95fA95+/XxCV5M2AKEQlIZAkJjMKUUkIJInJjEJUEgJJYn7qzXn/o6v31A/3537z3KhaUXVK2KhaUXVagFM++qyw1lgbLvLY6muNRWZoax3pO0VUG4hjPwFE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSCoiSYPY3QZSfoaTCFFHW91HW2Mw7tvpaY2dlavveWCnbIlnzeMqMWvNWc6dCVBJ/iEJUEgJJYjKjkohiudirqCMrgqzH+ag67ftnyoyywlpjbbjIY6uvNRaZoa11pO8UUW0gjv0EEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSClNEWd/XWGMz79jqa42dlanty3Kxlsiix1Nm1KL3mjoWopLoQxSikhBIEpMZlUQUy8VeRR1ZEWQ9zkfVad8/U2aUFdYaa8NFHlt9rbHIDG2tI32niGoDcewngCg/Q0kFREkw+5sgys9QUgFREsz+JojyM5RUQJQEs78JovwMJRUQJcHsb4IoP0NJBURJMPubIMrPUFIBURLM/iaI8jOUVJgiyvq+xhqbecdWX2vsrExtX5aLtUQWPZ4yoxa919SxEJVEH6IQlYRAkpjMqCSiWC72KurIiiDrcT6qTvv+mTKjrLDWWBsu8tjqa41FZmhrHek7RVQbiGM/AUT5GUoqIEqC2d8EUX6GkgqIkmD2N0GUn6GkAqIkmP1NEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpMIUUdb3NdbYzDu2+lpjZ2Vq+7JcrCWy6PGUGbXovaaOhagk+hCFqCQEksRkRiURJV8udmTlTWFoPTpH1YqqU/JG1ir16mvKjDoatoZhu09giqj9doyMEkDUKDnxdYgSAx9th6hRcuLrECUGPtoOUaPkxNchSgx8tB2iRsmJr0OUGPhoO0SNkhNfhygx8NF2iBolJ74OUWLgo+0QNUpOfB2rkMTAR9sxo0bJia9DlBj4aDtEjZITX4coMfDRdogaJSe+DlFi4KPtpiwXK2H2lnkdXaG0V6f0iKoVVScyU6m1fTGjtjQW3kfUwnK20RC1pbHwPqIWlrONhqgtjUX37w87N0QtKqfGKpLKPqIqkQW3VRKiFpRTI20lIapSWWzbSirxuv8zsdi9XDLOe4LqjfI7qpI4eWtJKtEQdbKg0v6RpHIOH32Fwnmv211SV3dmVBemKSf9/fuotzKieknFnndIUmnNcrFYAWa1nt9FewWYUXtkgn/ukVSi8DARLKQt5xVU6yGqkgjeRgmqsfjoqyQCt9GSSjRm1OKCajxmVCXh3M6YRdtI3TPqHmR73cP9vWVeUXVKgKhanjr3aw//TfQQ3jsndIt659qn/pFKUIWMqEqif9v9/7n+ko/PRNRjRvUMyUdcbdZuEdUSeXt8qqAaB1GVxNvtEoJqLERVEv+2SwmqsRBVSdy/Sfi3u97e04tSP2aPvgWeVlQWQVXsU4nKJqdKKttnEbX075+tkL39q4tKL6iKu6Koy8ipksr2KqIuKedKoi4vqMpKt1ws85NbhT6yTfHR96xytkKXFYWcraaFHiYQ87+Y9ujUGYWcVsf+sUwUUvYl9IxME4WYHvz957hFIaQftufMXVEI8GCNv/YPKdzNQsY/Fm4AAAAASUVORK5CYII="}}),e._v(" "),n("path",{attrs:{id:"Path_685","data-name":"Path 685",d:"M67.318,124.161c-16.677-2.775-34.217-9.72-48.387-25.418a49.186,49.186,0,0,1-3.95-5.024v-27.4H67.318Z",transform:"translate(-6.696 -29.16)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_686","data-name":"Path 686",d:"M28.731,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H23.794V80.064A4.937,4.937,0,0,1,28.731,75.127Z",transform:"translate(-10.572 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_687","data-name":"Path 687",d:"M28.731,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H28.078s-1.074-.986-2.159-2.053-2.028-2.121-2.028-2.121l-.1-4.1A4.937,4.937,0,0,1,28.731,110.157Z",transform:"translate(-10.572 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_688","data-name":"Path 688",d:"M57.813,75.127a4.937,4.937,0,0,1,4.937,4.937v8.271H52.875V80.064A4.937,4.937,0,0,1,57.813,75.127Z",transform:"translate(-23.388 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_689","data-name":"Path 689",d:"M57.813,110.157a4.937,4.937,0,0,1,4.937,4.937v8.27H52.875v-8.27A4.937,4.937,0,0,1,57.813,110.157Z",transform:"translate(-23.388 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_690","data-name":"Path 690",d:"M86.894,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H81.956V80.064A4.938,4.938,0,0,1,86.894,75.127Z",transform:"translate(-36.191 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_691","data-name":"Path 691",d:"M86.894,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H81.956v-8.27A4.937,4.937,0,0,1,86.894,110.157Z",transform:"translate(-36.191 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_692","data-name":"Path 692",d:"M58.2,145.187a4.937,4.937,0,0,1,4.937,4.937v2.7L58.2,150.483s-1.516-.759-4.447-2.451A4.785,4.785,0,0,1,58.2,145.187Z",transform:"translate(-23.774 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_693","data-name":"Path 693",d:"M86.894,145.187a4.937,4.937,0,0,1,4.938,4.937l.054,7.805s-3.195-.718-5.677-1.4-4.252-1.333-4.252-1.333v-5.07A4.937,4.937,0,0,1,86.894,145.187Z",transform:"translate(-36.191 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_694","data-name":"Path 694",d:"M26,33.267H65.991V45.611H26Z",transform:"translate(-11.54 -14.628)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_695","data-name":"Path 695",d:"M29.3,36.572h36.29v8.641H29.3Z",transform:"translate(-12.994 -16.082)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_696","data-name":"Path 696",d:"M38.687,55.3H37.453V61.47h1.234Z",transform:"translate(-16.578 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_697","data-name":"Path 697",d:"M84.953,55.3H83.719V61.47h1.234Z",transform:"translate(-36.965 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_698","data-name":"Path 698",d:"M156.534,124.218a56.486,56.486,0,0,1-6.419.964c-10.667.961-25.8,2.112-41.721-.537V85.931l24.07-18.515,24.07,18.515Z",transform:"translate(-47.851 -29.645)",fill:"#d3e0f1","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_699","data-name":"Path 699",d:"M117.577,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,107.293Z",transform:"translate(-51.711 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_700","data-name":"Path 700",d:"M143.353,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,107.293Z",transform:"translate(-63.059 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_701","data-name":"Path 701",d:"M169.13,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,107.293Z",transform:"translate(-74.408 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_702","data-name":"Path 702",d:"M117.577,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,128.443Z",transform:"translate(-51.711 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_703","data-name":"Path 703",d:"M143.353,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,128.443Z",transform:"translate(-63.059 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_704","data-name":"Path 704",d:"M169.13,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,128.443Z",transform:"translate(-74.408 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_705","data-name":"Path 705",d:"M117.577,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,149.593Z",transform:"translate(-51.711 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_706","data-name":"Path 706",d:"M143.353,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,149.593Z",transform:"translate(-63.059 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_707","data-name":"Path 707",d:"M169.13,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,149.593Z",transform:"translate(-74.408 -65.78)",fill:"#fff","fill-rule":"evenodd"}})]),e._v(" "),n("path",{attrs:{id:"Path_708","data-name":"Path 708",d:"M124.766,39.5h35.3a11.766,11.766,0,0,1,11.766,11.766v25a11.766,11.766,0,0,1-11.766,11.766H127.9l-10.132,8A2.941,2.941,0,0,1,113,93.728V51.266A11.766,11.766,0,0,1,124.766,39.5Z",transform:"translate(-49.693 -17.369)",fill:"#4d88ff"}}),e._v(" "),n("g",{attrs:{transform:"matrix(1, 0, 0, 1, 0.19, 0)",filter:"url
1(#Path_709)"}},[n("path",{attrs:{id:"Path_709-2","data-name":"Path 709",d:"M109.375,22H85.844A7.844,7.844,0,0,0,78,29.844V46.512a7.844,7.844,0,0,0,7.844,7.844h21.445l6.755,5.335a1.961,1.961,0,0,0,3.176-1.539V29.844A7.844,7.844,0,0,0,109.375,22Z",transform:"translate(-34.46 -9.67)",fill:"#4d88ff"}})])])]),e._v(" "),n("h3",{staticClass:"modal-heading text-color-primary"},[e._v(e._s(e.translations.messageSuccessScreen.heading))]),e._v(" "),n("div",{staticClass:"message-success-link pointer",on:{click:function(t){return e.$emit("open-groups-overview-screen")}}},[e._v(e._s(e.translations.messageSuccessScreen.backText))])])])])}),[],!1,null,null,null).exports,_e={props:{isMinimized:Boolean,translations:Object}},Ee=Object(I.a)(_e,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"unauthorized-screen"},[n("div",{class:[e.isMinimized&&"b-radius0","header"]},[n("div",{staticClass:"header-heading"},[n("svg",{staticClass:"header-icon left",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M0.667 0v32l10.24-9.333h13.093c4.050 0 7.333-3.283 7.333-7.333v0-15.333h-30.667zM30 15.333c0 3.314-2.686 6-6 6v0h-13.587l-8.413 7.88v-27.88h28v14zM10 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2zM18 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2zM26 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2z"}})]),e._v(" "),n("h3",{staticClass:"header-title"},[e._v(e._s(e.translations.unauthorizedScreen.headerTitle))]),e._v(" "),e.isMinimized?n("svg",{staticClass:"header-icon right pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:function(t){return e.$emit("maximize")}}},[n("path",{attrs:{d:"M12.193 18.827l-8.193 8.193v-6.353h-1.333v8.667h8.667v-1.333h-6.393l8.2-8.213-0.947-0.96zM20.667 2.667v1.333h6.393l-8.2 8.18 0.947 0.933 8.193-8.207v6.427h1.333v-8.667h-8.667zM11.333 4v-1.333h-8.667v8.667h1.333v-6.427l8.193 8.2 0.947-0.927-8.2-8.18h6.393zM28 26.933l-7.513-8.087-0.973 0.927 7.627 8.227h-6.473v1.333h8.667v-8.667h-1.333v6.267z"}}
1)]):n("svg",{staticClass:"header-icon right pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:function(t){return e.$emit("minimize")}}},[n("path",{attrs:{d:"M28 10.667h-5.833l7.167-7.133-0.9-0.867-7.167 7.16 0.067-5.827h-1.267l-0.067 8h8v-1.333zM4 21.333h5.833l-7.167 7.133 0.867 0.867 7.133-7.167v5.833h1.333v-8h-8v1.333zM28 21.333v-1.333h-8v8h1.333v-5.833l7.133 7.167 0.867-0.867-7.167-7.133h5.833zM10.667 9.833l-7.133-7.167-0.867 0.867 7.167 7.133h-5.833v1.333h8v-8h-1.333v5.833z"}})])])]),e._v(" "),n("div",{class:[e.isMinimized?"closed":"open","unauthorized-screen-container mx-auto text-center"]},[n("div",{staticClass:"unauthorized-screen-content scrollable main-screen-content"},[n("svg",{staticClass:"modal-illustration",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 165 96.633"}},[n("defs",[n("filter",{attrs:{id:"Path_709",x:"34.54",y:"6.326",width:"57.219",height:"56.113",filterUnits:"userSpaceOnUse"}},[n("feOffset",{attrs:{dy:"3",input:"SourceAlpha"}}),e._v(" "),n("feGaussianBlur",{attrs:{stdDeviation:"3",result:"blur"}}),e._v(" "),n("feFlood",{attrs:{"flood-opacity":"0.161"}}),e._v(" "),n("feComposite",{attrs:{operator:"in",in2:"blur"}}),e._v(" "),n("feComposite",{attrs:{in:"SourceGraphic"}})],1)]),e._v(" "),n("g",{attrs:{id:"Illustration",transform:"translate(-0.194)"}},[n("g",{attrs:{id:"Group_1856","data-name":"Group 1856",transform:"translate(0.194)",opacity:"0.75"}},[n("path",{attrs:{id:"Path_684","data-name":"Path 684",d:"M164.106,48.564c8.968,23.959-39.779,45.957-61.662,47.832-21.821,1.968-62.355,4.729-90.026-25.955C-15.175,39.644,4.382-15.8,66.68,7.53,129.029,30.927,155.192,24.683,164.106,48.564Z",transform:"translate(-0.194 -0.857)",fill:"#f2f5f9","fill-rule":"evenodd"}}),e._v(" "),n("image",{attrs:{id:"Rectangle_1719","data-name":"Rectangle 1719",width:"59.389",height:"96.367",transform:"translate(96.108)","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAACsCAYAAACTkDk+AAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAaqADAAQAAAABAAAArAAAAACUMqf3AAAFVElEQVR4Ae2awXbTMBBFCYcVe5b8/3/BDtawLRGnOhi1nsia0bPGudnYruyZ53uj1G10+/bj18sHXksT+Prl8+3j0gkJ95fA95+/XxCV5M2AKEQlIZAkJjMKUUkIJInJjEJUEgJJYn7qzXn/o6v31A/3537z3KhaUXVK2KhaUXVagFM++qyw1lgbLvLY6muNRWZoax3pO0VUG4hjPwFE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSCoiSYPY3QZSfoaTCFFHW91HW2Mw7tvpaY2dlavveWCnbIlnzeMqMWvNWc6dCVBJ/iEJUEgJJYjKjkohiudirqCMrgqzH+ag67ftnyoyywlpjbbjIY6uvNRaZoa11pO8UUW0gjv0EEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSClNEWd/XWGMz79jqa42dlanty3Kxlsiix1Nm1KL3mjoWopLoQxSikhBIEpMZlUQUy8VeRR1ZEWQ9zkfVad8/U2aUFdYaa8NFHlt9rbHIDG2tI32niGoDcewngCg/Q0kFREkw+5sgys9QUgFREsz+JojyM5RUQJQEs78JovwMJRUQJcHsb4IoP0NJBURJMPubIMrPUFIBURLM/iaI8jOUVJgiyvq+xhqbecdWX2vsrExtX5aLtUQWPZ4yoxa919SxEJVEH6IQlYRAkpjMqCSiWC72KurIiiDrcT6qTvv+mTKjrLDWWBsu8tjqa41FZmhrHek7RVQbiGM/AUT5GUoqIEqC2d8EUX6GkgqIkmD2N0GUn6GkAqIkmP1NEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpMIUUdb3NdbYzDu2+lpjZ2Vq+7JcrCWy6PGUGbXovaaOhagk+hCFqCQEksRkRiURJV8udmTlTWFoPTpH1YqqU/JG1ir16mvKjDoatoZhu09giqj9doyMEkDUKDnxdYgSAx9th6hRcuLrECUGPtoOUaPkxNchSgx8tB2iRsmJr0OUGPhoO0SNkhNfhygx8NF2iBolJ74OUWLgo+0QNUpOfB2rkMTAR9sxo0bJia9DlBj4aDtEjZITX4coMfDRdogaJSe+DlFi4KPtpiwXK2H2lnkdXaG0V6f0iKoVVScyU6m1fTGjtjQW3kfUwnK20RC1pbHwPqIWlrONhqgtjUX37w87N0QtKqfGKpLKPqIqkQW3VRKiFpRTI20lIapSWWzbSirxuv8zsdi9XDLOe4LqjfI7qpI4eWtJKtEQdbKg0v6RpHIOH32Fwnmv211SV3dmVBemKSf9/fuotzKieknFnndIUmnNcrFYAWa1nt9FewWYUXtkgn/ukVSi8DARLKQt5xVU6yGqkgjeRgmqsfjoqyQCt9GSSjRm1OKCajxmVCXh3M6YRdtI3TPqHmR73cP9vWVeUXVKgKhanjr3aw//TfQQ3jsndIt659qn/pFKUIWMqEqif9v9/7n+ko/PRNRjRvUMyUdcbdZuEdUSeXt8qqAaB1GVxNvtEoJqLERVEv+2SwmqsRBVSdy/Sfi3u97e04tSP2aPvgWeVlQWQVXsU4nKJqdKKttnEbX075+tkL39q4tKL6iKu6Koy8ipksr2KqIuKedKoi4vqMpKt1ws85NbhT6yTfHR96xytkKXFYWcraaFHiYQ87+Y9ujUGYWcVsf+sUwUUvYl9IxME4WYHvz957hFIaQftufMXVEI8GCNv/YPKdzNQsY/Fm4AAAAASUVORK5CYII="}}),e._v(" "),n("path",{attrs:{id:"Path_685","data-name":"Path 685",d:"M67.318,124.161c-16.677-2.775-34.217-9.72-48.387-25.418a49.186,49.186,0,0,1-3.95-5.024v-27.4H67.318Z",transform:"translate(-6.696 -29.16)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_686","data-name":"Path 686",d:"M28.731,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H23.794V80.064A4.937,4.937,0,0,1,28.731,75.127Z",transform:"translate(-10.572 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_687","data-name":"Path 687",d:"M28.731,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H28.078s-1.074-.986-2.159-2.053-2.028-2.121-2.028-2.121l-.1-4.1A4.937,4.937,0,0,1,28.731,110.157Z",transform:"translate(-10.572 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_688","data-name":"Path 688",d:"M57.813,75.127a4.937,4.937,0,0,1,4.937,4.937v8.271H52.875V80.064A4.937,4.937,0,0,1,57.813,75.127Z",transform:"translate(-23.388 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_689","data-name":"Path 689",d:"M57.813,110.157a4.937,4.937,0,0,1,4.937,4.937v8.27H52.875v-8.27A4.937,4.937,0,0,1,57.813,110.157Z",transform:"translate(-23.388 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_690","data-name":"Path 690",d:"M86.894,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H81.956V80.064A4.938,4.938,0,0,1,86.894,75.127Z",transform:"translate(-36.191 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_691","data-name":"Path 691",d:"M86.894,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H81.956v-8.27A4.937,4.937,0,0,1,86.894,110.157Z",transform:"translate(-36.191 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_692","data-name":"Path 692",d:"M58.2,145.187a4.937,4.937,0,0,1,4.937,4.937v2.7L58.2,150.483s-1.516-.759-4.447-2.451A4.785,4.785,0,0,1,58.2,145.187Z",transform:"translate(-23.774 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_693","data-name":"Path 693",d:"M86.894,145.187a4.937,4.937,0,0,1,4.938,4.937l.054,7.805s-3.195-.718-5.677-1.4-4.252-1.333-4.252-1.333v-5.07A4.937,4.937,0,0,1,86.894,145.187Z",transform:"translate(-36.191 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_694","data-name":"Path 694",d:"M26,33.267H65.991V45.611H26Z",transform:"translate(-11.54 -14.628)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_695","data-name":"Path 695",d:"M29.3,36.572h36.29v8.641H29.3Z",transform:"translate(-12.994 -16.082)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_696","data-name":"Path 696",d:"M38.687,55.3H37.453V61.47h1.234Z",transform:"translate(-16.578 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_697","data-name":"Path 697",d:"M84.953,55.3H83.719V61.47h1.234Z",transform:"translate(-36.965 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_698","data-name":"Path 698",d:"M156.534,124.218a56.486,56.486,0,0,1-6.419.964c-10.667.961-25.8,2.112-41.721-.537V85.931l24.07-18.515,24.07,18.515Z",transform:"translate(-47.851 -29.645)",fill:"#d3e0f1","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_699","data-name":"Path 699",d:"M117.577,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,107.293Z",transform:"translate(-51.711 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_700","data-name":"Path 700",d:"M143.353,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,107.293Z",transform:"translate(-63.059 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_701","data-name":"Path 701",d:"M169.13,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,107.293Z",transform:"translate(-74.408 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_702","data-name":"Path 702",d:"M117.577,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,128.443Z",transform:"translate(-51.711 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_703","data-name":"Path 703",d:"M143.353,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,128.443Z",transform:"translate(-63.059 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_704","data-name":"Path 704",d:"M169.13,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,128.443Z",transform:"translate(-74.408 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_705","data-name":"Path 705",d:"M117.577,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,149.593Z",transform:"translate(-51.711 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_706","data-name":"Path 706",d:"M143.353,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,149.593Z",transform:"translate(-63.059 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_707","data-name":"Path 707",d:"M169.13,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,149.593Z",transform:"translate(-74.408 -65.78)",fill:"#fff","fill-rule":"evenodd"}})]),e._v(" "),n("path",{attrs:{id:"Path_708","data-name":"Path 708",d:"M124.766,39.5h35.3a11.766,11.766,0,0,1,11.766,11.766v25a11.766,11.766,0,0,1-11.766,11.766H127.9l-10.132,8A2.941,2.941,0,0,1,113,93.728V51.266A11.766,11.766,0,0,1,124.766,39.5Z",transform:"translate(-49.693 -17.369)",fill:"#4d88ff"}}),e._v(" "),n("g",{attrs:{transform:"matrix(1, 0, 0, 1, 0.19, 0)",filter:"url
1(#Path_709)"}},[n("path",{attrs:{id:"Path_709-2","data-name":"Path 709",d:"M109.375,22H85.844A7.844,7.844,0,0,0,78,29.844V46.512a7.844,7.844,0,0,0,7.844,7.844h21.445l6.755,5.335a1.961,1.961,0,0,0,3.176-1.539V29.844A7.844,7.844,0,0,0,109.375,22Z",transform:"translate(-34.46 -9.67)",fill:"#4d88ff"}})])])]),e._v(" "),n("h3",{staticClass:"modal-heading text-color-primary"},[e._v(e._s(e.translations.unauthorizedScreen.heading))]),e._v(" "),n("p",{staticClass:"modal-text text-color-lighter"},[e._v(e._s(e.translations.unauthorizedScreen.text))]),e._v(" "),n("ul",{staticClass:"modal-text unauthorized-screen-bullets"},[n("li",{staticClass:"text-color-lighter"},[e._v(e._s(e.translations.unauthorizedScreen.bullet1))]),e._v(" "),n("li",{staticClass:"text-color-lighter"},[e._v(e._s(e.translations.unauthorizedScreen.bullet2))]),e._v(" "),n("li",{staticClass:"text-color-lighter"},[e._v(e._s(e.translations.unauthorizedScreen.bullet3))])]),e._v(" "),n("div",{staticClass:"unauthorized-screen-contact-box modal-text"},[e._v("\n                "+e._s(e.translations.unauthorizedScreen.contactBoxText)+"\n            ")])])])])}),[],!1,null,null,null).exports,Ae={props:{translations:Object}},Te=Object(I.a)(Ae,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"error-message-screen"},[n("div",{staticClass:"header header-alert"},[n("div",{staticClass:"header-heading"},[n("h3",{staticClass:"header-title"},[e._v(e._s(e.translations.errorScreen.headerTitle))])])]),e._v(" "),n("div",{staticClass:"error-message-padding-container text-center"},[n("svg",{staticClass:"modal-illustration",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 165 96.633"}},[n("defs",[n("filter",{attrs:{id:"Path_709",x:"34.54",y:"6.326",width:"57.219",height:"56.113",filterUnits:"userSpaceOnUse"}},[n("feOffset",{attrs:{dy:"3",input:"SourceAlpha"}}),e._v(" "),n("feGaussianBlur",{attrs:{stdDeviation:"3",result:"blur"}}),e._v(" "),n("feFlood",{attrs:{"flood-opacity":"0.161"}}),e._v(" "),n("feComposite",{attrs:{operator:"in",in2:"blur"}}),e._v(" "),n("feComposite",{attrs:{in:"SourceGraphic"}})],1)]),e._v(" "),n("g",{attrs:{id:"Illustration",transform:"translate(-0.194)"}},[n("g",{attrs:{id:"Group_1856","data-name":"Group 1856",transform:"translate(0.194)",opacity:"0.75"}},[n("path",{attrs:{id:"Path_684","data-name":"Path 684",d:"M164.106,48.564c8.968,23.959-39.779,45.957-61.662,47.832-21.821,1.968-62.355,4.729-90.026-25.955C-15.175,39.644,4.382-15.8,66.68,7.53,129.029,30.927,155.192,24.683,164.106,48.564Z",transform:"translate(-0.194 -0.857)",fill:"#f2f5f9","fill-rule":"evenodd"}}),e._v(" "),n("image",{attrs:{id:"Rectangle_1719","data-name":"Rectangle 1719",width:"59.389",height:"96.367",transform:"translate(96.108)","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAACsCAYAAACTkDk+AAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAaqADAAQAAAABAAAArAAAAACUMqf3AAAFVElEQVR4Ae2awXbTMBBFCYcVe5b8/3/BDtawLRGnOhi1nsia0bPGudnYruyZ53uj1G10+/bj18sHXksT+Prl8+3j0gkJ95fA95+/XxCV5M2AKEQlIZAkJjMKUUkIJInJjEJUEgJJYn7qzXn/o6v31A/3537z3KhaUXVK2KhaUXVagFM++qyw1lgbLvLY6muNRWZoax3pO0VUG4hjPwFE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSCoiSYPY3QZSfoaTCFFHW91HW2Mw7tvpaY2dlavveWCnbIlnzeMqMWvNWc6dCVBJ/iEJUEgJJYjKjkohiudirqCMrgqzH+ag67ftnyoyywlpjbbjIY6uvNRaZoa11pO8UUW0gjv0EEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSClNEWd/XWGMz79jqa42dlanty3Kxlsiix1Nm1KL3mjoWopLoQxSikhBIEpMZlUQUy8VeRR1ZEWQ9zkfVad8/U2aUFdYaa8NFHlt9rbHIDG2tI32niGoDcewngCg/Q0kFREkw+5sgys9QUgFREsz+JojyM5RUQJQEs78JovwMJRUQJcHsb4IoP0NJBURJMPubIMrPUFIBURLM/iaI8jOUVJgiyvq+xhqbecdWX2vsrExtX5aLtUQWPZ4yoxa919SxEJVEH6IQlYRAkpjMqCSiWC72KurIiiDrcT6qTvv+mTKjrLDWWBsu8tjqa41FZmhrHek7RVQbiGM/AUT5GUoqIEqC2d8EUX6GkgqIkmD2N0GUn6GkAqIkmP1NEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpMIUUdb3NdbYzDu2+lpjZ2Vq+7JcrCWy6PGUGbXovaaOhagk+hCFqCQEksRkRiURJV8udmTlTWFoPTpH1YqqU/JG1ir16mvKjDoatoZhu09giqj9doyMEkDUKDnxdYgSAx9th6hRcuLrECUGPtoOUaPkxNchSgx8tB2iRsmJr0OUGPhoO0SNkhNfhygx8NF2iBolJ74OUWLgo+0QNUpOfB2rkMTAR9sx
1o0bJia9DlBj4aDtEjZITX4coMfDRdogaJSe+DlFi4KPtpiwXK2H2lnkdXaG0V6f0iKoVVScyU6m1fTGjtjQW3kfUwnK20RC1pbHwPqIWlrONhqgtjUX37w87N0QtKqfGKpLKPqIqkQW3VRKiFpRTI20lIapSWWzbSirxuv8zsdi9XDLOe4LqjfI7qpI4eWtJKtEQdbKg0v6RpHIOH32Fwnmv211SV3dmVBemKSf9/fuotzKieknFnndIUmnNcrFYAWa1nt9FewWYUXtkgn/ukVSi8DARLKQt5xVU6yGqkgjeRgmqsfjoqyQCt9GSSjRm1OKCajxmVCXh3M6YRdtI3TPqHmR73cP9vWVeUXVKgKhanjr3aw//TfQQ3jsndIt659qn/pFKUIWMqEqif9v9/7n+ko/PRNRjRvUMyUdcbdZuEdUSeXt8qqAaB1GVxNvtEoJqLERVEv+2SwmqsRBVSdy/Sfi3u97e04tSP2aPvgWeVlQWQVXsU4nKJqdKKttnEbX075+tkL39q4tKL6iKu6Koy8ipksr2KqIuKedKoi4vqMpKt1ws85NbhT6yTfHR96xytkKXFYWcraaFHiYQ87+Y9ujUGYWcVsf+sUwUUvYl9IxME4WYHvz957hFIaQftufMXVEI8GCNv/YPKdzNQsY/Fm4AAAAASUVORK5CYII="}}),e._v(" "),n("path",{attrs:{id:"Path_685","data-name":"Path 685",d:"M67.318,124.161c-16.677-2.775-34.217-9.72-48.387-25.418a49.186,49.186,0,0,1-3.95-5.024v-27.4H67.318Z",transform:"translate(-6.696 -29.16)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_686","data-name":"Path 686",d:"M28.731,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H23.794V80.064A4.937,4.937,0,0,1,28.731,75.127Z",transform:"translate(-10.572 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_687","data-name":"Path 687",d:"M28.731,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H28.078s-1.074-.986-2.159-2.053-2.028-2.121-2.028-2.121l-.1-4.1A4.937,4.937,0,0,1,28.731,110.157Z",transform:"translate(-10.572 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_688","data-name":"Path 688",d:"M57.813,75.127a4.937,4.937,0,0,1,4.937,4.937v8.271H52.875V80.064A4.937,4.937,0,0,1,57.813,75.127Z",transform:"translate(-23.388 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_689","data-name":"Path 689",d:"M57.813,110.157a4.937,4.937,0,0,1,4.937,4.937v8.27H52.875v-8.27A4.937,4.937,0,0,1,57.813,110.157Z",transform:"translate(-23.388 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_690","data-name":"Path 690",d:"M86.894,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H81.956V80.064A4.938,4.938,0,0,1,86.894,75.127Z",transform:"translate(-36.191 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_691","data-name":"Path 691",d:"M86.894,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H81.956v-8.27A4.937,4.937,0,0,1,86.894,110.157Z",transform:"translate(-36.191 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_692","data-name":"Path 692",d:"M58.2,145.187a4.937,4.937,0,0,1,4.937,4.937v2.7L58.2,150.483s-1.516-.759-4.447-2.451A4.785,4.785,0,0,1,58.2,145.187Z",transform:"translate(-23.774 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_693","data-name":"Path 693",d:"M86.894,145.187a4.937,4.937,0,0,1,4.938,4.937l.054,7.805s-3.195-.718-5.677-1.4-4.252-1.333-4.252-1.333v-5.07A4.937,4.937,0,0,1,86.894,145.187Z",transform:"translate(-36.191 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_694","data-name":"Path 694",d:"M26,33.267H65.991V45.611H26Z",transform:"translate(-11.54 -14.628)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_695","data-name":"Path 695",d:"M29.3,36.572h36.29v8.641H29.3Z",transform:"translate(-12.994 -16.082)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_696","data-name":"Path 696",d:"M38.687,55.3H37.453V61.47h1.234Z",transform:"translate(-16.578 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_697","data-name":"Path 697",d:"M84.953,55.3H83.719V61.47h1.234Z",transform:"translate(-36.965 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_698","data-name":"Path 698",d:"M156.534,124.218a56.486,56.486,0,0,1-6.419.964c-10.667.961-25.8,2.112-41.721-.537V85.931l24.07-18.515,24.07,18.515Z",transform:"translate(-47.851 -29.645)",fill:"#d3e0f1","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_699","data-name":"Path 699",d:"M117.577,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,107.293Z",transform:"translate(-51.711 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_700","data-name":"Path 700",d:"M143.353,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,107.293Z",transform:"translate(-63.059 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_701","data-name":"Path 701",d:"M169.13,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,107.293Z",transform:"translate(-74.408 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_702","data-name":"Path 702",d:"M117.577,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,128.443Z",transform:"translate(-51.711 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_703","data-name":"Path 703",d:"M143.353,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,128.443Z",transform:"translate(-63.059 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_704","data-name":"Path 704",d:"M169.13,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,128.443Z",transform:"translate(-74.408 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_705","data-name":"Path 705",d:"M117.577,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,149.593Z",transform:"translate(-51.711 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_706","data-name":"Path 706",d:"M143.353,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,149.593Z",transform:"translate(-63.059 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_707","data-name":"Path 707",d:"M169.13,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,149.593Z",transform:"translate(-74.408 -65.78)",fill:"#fff","fill-rule":"evenodd"}})]),e._v(" "),n("path",{attrs:{id:"Path_708","data-name":"Path 708",d:"M124.766,39.5h35.3a11.766,11.766,0,0,1,11.766,11.766v25a11.766,11.766,0,0,1-11.766,11.766H127.9l-10.132,8A2.941,2.941,0,0,1,113,93.728V51.266A11.766,11.766,0,0,1,124.766,39.5Z",transform:"translate(-49.693 -17.369)",fill:"#fd5061"}}),e._v(" "),n("g",{attrs:{transform:"matrix(1, 0, 0, 1, 0.19, 0)",filter:"url
1(#Path_709)"}},[n("path",{attrs:{id:"Path_709-2","data-name":"Path 709",d:"M109.375,22H85.844A7.844,7.844,0,0,0,78,29.844V46.512a7.844,7.844,0,0,0,7.844,7.844h21.445l6.755,5.335a1.961,1.961,0,0,0,3.176-1.539V29.844A7.844,7.844,0,0,0,109.375,22Z",transform:"translate(-34.46 -9.67)",fill:"#fd5061"}})])])]),e._v(" "),n("h3",{staticClass:"modal-heading text-color-primary"},[e._v(e._s(e.translations.errorScreen.heading))]),e._v(" "),n("p",{staticClass:"modal-text text-color-lighter"},[e._v(e._s(e.translations.errorScreen.text))])])])}),[],!1,null,null,null).exports,be={},Ce=Object(I.a)(be,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-footer"},[n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M0 4v18c0 3.314 2.686 6 6 6v0h20c3.314 0 6-2.686 6-6v0-18h-32zM30.667 22c0 2.577-2.089 4.667-4.667 4.667v0h-20c-2.577 0-4.667-2.089-4.667-4.667v0-16.667h29.333v16.667zM28.32 9.113l-0.893-0.987-11.427 10.307-11.36-10.293-0.893 0.987 12.253 11.107 12.32-11.12z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("[email protected]")])]),e._v(" "),n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("70 60 51 02")])])])}),[],!1,null,null,null).exports,ke=n(523);function ye(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ie(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=A()(e);if(t){var s=A()(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return _()(this,n)}}var Ne="https://api.subit.dk",Re="aula-sms-widget",Oe="subit_token",Le="subit_token_expires",xe="subit_language",Pe=function(e){f()(n,e);var t=we(n);function n(e){var i;return p()(this,n),(i=t.call(this,"Http request error: ".concat(e.method," ").concat(e.url))).metaData=e,i}return h()(n)}(b()(Error)),Me={props:{getAulaToken:Function,moment:Function,axios:Function},components:{"select-school-screen":w,"group-messages-screen":M,"group-members-screen":K,"message-recipients-screen":J,"new-group-message-screen":ce,"select-recipients-screen":ve,"message-success-screen":ge,spinner:S,"group-message":O,"recipient-type":z,search:V,"consent-box":U,"error-screen":Te,"unauthorized-screen":Ee,"message-validation-errors-modal":ie,"confirm-send-message-modal":ae,"select-from-class":he,"message-form":x,"confirm-back-modal":oe,"widget-footer":Ce},data:function(){return{user:null,language:localStorage.getItem(xe)||"da",TRANSLATIONS:ke.a,isMinimized:!0,isUntouched:!0,isPerformingFirstLoad:!1,hasPerformedFirstLoad:!1,openScreen:"select-school-screen",previousScreen:"select-school-screen",isGroupsLoading:!1,isNewMessageLoading:!1,selected:this.getSelectedStateBoilerPlate(),selectedSchool:null,shownBlacklistReasons:null,aulaToken:null,
1schools:{},users:{},classes:{},groups:{},removedSelectedRecipients:this.getSelectedStateBoilerPlate(),newMessage:"",newMessageErrors:[],newMessageGroupName:"",isNewMessageConfirmModalOpen:!1,isNewMessageErrorModalOpen:!1,isConfirmBackModalOpen:!1,selectRecipientsMode:"people",recipientSearch:"",classSearch:"",groupSearch:"",selectedGroup:null,selectedGroupMessages:[],selectedMessage:null,selectedMessageStatuses:{},selectedMessageStatusFilters:[],isIndividualMessageRecipientsOpen:!1,isPeopleStatusesOverlayOpen:!1,isValidGsmMessage:!0}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),setInterval(u()(k.a.mark((function t(){var n;return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=Object.values(e.selectedGroupMessages).filter((function(t){return e.moment().diff(t.created_at,"seconds")<300})).map((function(e){return e.id}))).length>0&&e.refreshMessages(n),!e.selectedMessage||!n.includes(e.selectedMessage.id)){t.next=6;break}return t.next=5,e.fetchMessageStatuses(e.selectedMessage.id);case 5:e.selectedMessageStatuses=t.sent;case 6:case"end":return t.stop()}}),t)}))),2e4)},watch:{aulaToken:function(){null!=this.aulaToken&&Object.keys(this.aulaToken).length>0&&this.initRender()},openScreen:function(){setTimeout(this.scrollMessagesToBottom,100)}},methods:{interpolate:N.a,initRender:function(){return u()(k.a.mark((function e(){return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},reportError:function(e){var t=this;return u()(k.a.mark((function n(){var i,s,a,r,o;return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.error("Unexpected error"),console.error(e),n.prev=2,r=e.stack.split("\n").map((function(e){return e.trim()})).map((function(e){return/^at ((.*?)(?: \[as (.*?)\])? \((.*?):([0-9]+):([0-9]+)\)|(.*?):([0-9]+):([0-9]+))$/.exec(e)})).filter((function(e){return e})).map((function(e){return{function:e[3]||e[2]||e[7],file:e[4],line:parseInt(e[5]||e[8]),character:parseInt(e[6]||e[9])}})),o={payloadVersion:5,notifier:{name:Re,version:1,url:"https://subit.dk"},events:[{user:{userId:null===(i=t.user)||void 0===i?void 0:i.id,uniId:null===(s=t.user)||void 0===s?void 0:s.provider_id,schoolId:null===(a=t.selectedSchool)||void 0===a?void 0:a.id},metaData:{httpRequest:e.metaData||{}},app:{version:1},exceptions:[{errorClass:e.message,stacktrace:r.map((function(e){return{file:e.file,lineNumber:e.line,columnNumber:e.character,method:e.function}}))}]}]},n.t0=t,n.next=8,t.postJson("/proxy/bugsnag",o,{headers:{"Content-Type":"application/json","Bugsnag-Api-Key":"0d385a466567cb8c4084bcbdfaa92de9","Bugsnag-Payload-Version":5},transformRequest:function(e,t){return delete t.common,e}});case 8:n.t1=n.sent,n.t0.getResponseDataOrThrow.call(n.t0,n.t1),n.next=16;break;case 12:n.prev=12,n.t2=n.catch(2),console.error("Could not report error"),console.error(n.t2);case 16:case"end":return n.stop()}}),n,null,[[2,12]])})))()},scrollMessagesToBottom:function(){if("group-messages-screen"===this.openScreen){var e=document.getElementById("group-messages-list");e.scrollTop=e.clientHeight+2e3}},requestJson:function(e,t){var n=arguments,i=this;return u()(k.a.mark((function s(){var a,r;return k.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return a=n.length>2&&void 0!==n[2]?n[2]:{},s.prev=1,s.next=4,i.axios.request(De(De({url:t,method:e},a),{},{validateStatus:function(){return!0}}));case 4:return r=s.sent,s.abrupt("return",{response:r,data:r.data.data,content:r.data,status:r.status,successful:r.status>=200&&r.status<300,url:t,method:e,options:a});case 8:throw s.prev=8,s.t0=s.catch(1),new Pe({message:s.t0.message,url:t,method:e,options:a});case 11:case"end":return s.stop()}}),s,null,[[1,8]])})))()},getResponseDataOrThrow:function(e){return u()(k.a.mark((function t(){var n;return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.successful){t.next=4;break}throw delete(n=De({},e)).response,new Pe(n);case 4:return t.abrupt("return",e.data);case 5:case"end":return t.stop()}}),t)})))()},getJson:function(e){var t=arguments,n=this;return u()(k.a.mark((function i(){var s;return k.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=t.length>1&&void 0!==t[1]?t[1]:{},i.abrupt("return",n.requestJson("GET",e,s));case 2:case"end":return i.stop()}}),i)})))()},postJson:function(e,t){var n=arguments,i=this;return u()(k.a.mark((function s(){var a;return k.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return a=n.length>2&&void 0!==n[2]?n[2]:{},s.next=3,i.requestJson("POST",e,De(De({},a),{},{headers:De(De({},a.headers||{}),{},{Accept:"application/json","Content-Type":"application/json"}),data:JSON.stringify(t)}));case 3:return s.abrupt("return",s.sent);case 4:case"end":return s.stop()}}),s)})))()},patchJson:function(e,t){var n=arguments,i=this;return u()(k.a.mark((function s(){var a;return k.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return a=n.length>2&&void 0!==n[2]?n[2]:{},s.next=3,i.requestJson("PATCH",e,De(De({},a),{},{headers:De(De({},a.headers||{}),{},{Accept:"application/json","Content-Type":"application/json"}),data:JSON.stringify(t)}));case 3:return s.abrupt("return",s.sent);case 4:case"end":return s.stop()}}),s)})))()},fetchMe:function(){var e=this;return u()(k.a.mark((function t(){var n;return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e,t.next=3,e.getJson("/v2/me");case 3:return t.t1=t.sent,t.next=6,t.t0.getResponseDataOrThrow.call(t.t0,t.t1);case 6:e.user=t.sent,n=ke.a[e.user.language]?e.user.language:"da",e.language=n,localStorage.setItem(xe,n);case 10:case"end":return t.stop()}}),t)})))()},fetchSchools:function(){var e=this;return u()(k.a.mark((function t(){return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e,t.next=3,e.getJson("/v2/schools");case 3:return t.t1=t.sent,t.abrupt("return",t.t0.getResponseDataOrThrow.call(t.t0,t.t1));case 5:case"end":return t.stop()}}),t)})))()},fetchUsers:function(e){var t=this;return u()(k.a.mark((function n(){return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=t,n.next=3,t.getJson("/v2/communication/schools/".concat(e,"/users"));case 3:return n.t1=n.sent,n.abrupt("return",n.t0.getResponseDataOrThrow.call(n.t0,n.t1));case 5:case"end":return n.stop()}}),n)})))()},fetchClasses:function(e){var t=this;return u()(k.a.mark((function n(){return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=t,n.next=3,t.getJson("/v2/communication/schools/".concat(e,"/classes"));case 3:return n.t1=n.sent,n.abrupt("return",n.t0.getResponseDataOrThrow.call(n.t0,n.t1));case 5:case"end":return n.stop()}}),n)})))()},fetchGroups:function(e){var t=this;return u()(k.a.mark((function n(){return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=t,n.next=3,t.getJson("/v2/communication/schools/".concat(e,"/groups"));case 3:return n.t1=n.sent,n.abrupt("return",n.t0.getResponseDataOrThrow.call(n.t0,n.t1));case 5:case"end":return n.stop()}}),n)})))()},fetchMessages:function(e){var t=arguments,n=this;return u()(k.a.mark((function i(){var s,a;return k.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=t.length>1&&void 0!==t[1]?t[1]:{},i.t0=n,i.next=4,n.getJson("/v2/communication/groups/".concat(e,"/messages").concat(Object(N.b)(s))
1);case 4:return i.t1=i.sent,i.next=7,i.t0.getResponseDataOrThrow.call(i.t0,i.t1);case 7:return a=i.sent,i.abrupt("return",a.map(n.enrichMessage));case 9:case"end":return i.stop()}}),i)})))()},fetchMessageStatuses:function(e){var t=this;return u()(k.a.mark((function n(){var i,s;return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=t,n.next=3,t.getJson("/v2/communication/groups/messages/".concat(e,"/statuses"));case 3:return n.t1=n.sent,n.next=6,n.t0.getResponseDataOrThrow.call(n.t0,n.t1);case 6:return i=n.sent,s={},i.forEach((function(e){e.is_received||e.is_failed?e.is_received?s[e.user_id]="received":s[e.user_id]="failed":s[e.user_id]="pending"})),n.abrupt("return",s);case 10:case"end":return n.stop()}}),n)})))()},selectSchool:function(e){var t=this;return u()(k.a.mark((function n(){var i,s,a;return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.communication){n.next=2;break}return n.abrupt("return");case 2:if(!e.communication.blacklist_reasons){n.next=5;break}return t.shownBlacklistReasons=e.communication.blacklist_reasons,n.abrupt("return");case 5:return t.selectedSchool=e,n.prev=6,t.isGroupsLoading=!0,n.next=10,t.fetchUsers(e.id);case 10:return i=n.sent,n.next=13,t.fetchClasses(e.id);case 13:return s=n.sent,n.next=16,t.fetchGroups(e.id);case 16:a=n.sent,t.addUsers(i,!0),t.addClasses(s,!0),t.addGroups(a,!0),t.isGroupsLoading=!1,t.selected=t.getSelectedStateBoilerPlate(),t.recipientSearch="",t.selectedGroupMessages=[],t.openScreen="groups-overview-screen",n.next=30;break;case 27:n.prev=27,n.t0=n.catch(6),t.handleError(n.t0);case 30:case"end":return n.stop()}}),n,null,[[6,27]])})))()},navigate:function(e){this.previousScreen=this.openScreen,this.openScreen=e},handleCloseNewGroupMessageScreen:function(){this.newMessageGroupName.length||this.selectedRecipients.length||this.newMessage.length?this.openConfirmBackModal():this.navigate("groups-overview-screen")}
1,closeNewGroupMessageScreen:function(){this.selected=this.getSelectedStateBoilerPlate(),this.newMessage="",this.newMessageGroupName="",this.isConfirmBackModalOpen=!1,this.navigate("groups-overview-screen")},unselectSchool:function(){this.selectedSchool=null,this.isGroupsLoading=!1,this.selected=this.getSelectedStateBoilerPlate(),this.recipientSearch="",this.selectedGroupMessages=[],this.navigate("select-school-screen")},addClasses:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n&&(this.classes={}),e.forEach((function(e){t.classes[e.id]=e}))},addUsers:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n&&(this.users={}),e.forEach((function(e){t.users[e.id]=e}))},addSchools:function(e){var t={};e.forEach((function(e){t[e.id]=De(De({},e),{},{name:e.short_name||e.name})})),this.schools=t},addGroups:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n&&(this.groups={});var i={};e.map((function(e){return De(De({},e),{},{members:e.members.filter((function(e){return!e.user_id||t.users[e.user_id]}))})})).filter((function(e){return e.members.length})).forEach((function(e){i[e.id]=t.enrichGroup(e)})),this.groups=De(De({},this.groups),i)},selectGroupMessages:function(e){var t=this,n={};e.forEach((function(e){n[e.id]=t.enrichMessage(e)})),this.selectedGroupMessages=n},addMessages:function(e){var t=this,n={};e.forEach((function(e){n[e.id]=t.enrichMessage(e)})),this.selectedGroupMessages=De(De({},this.selectedGroupMessages),n)},enrichGroup:function(e){return De(De({},e),{},{created_at:this.moment(e.created_at).locale(this.language),latest_group_message:e.latest_group_message?this.enrichMessage(e.latest_group_message):null})},enrichMessage:function(e){return De(De({},e),{},{created_at:this.moment(e.created_at).locale(this.language)})},createGroup:function(){var e=this;return u()(k.a.mark((function t(){var n;return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={school_id:e.selectedSchool.id,members:e.recipientsFormattedForGroupCreation,name:e.newMessageGroupName},t.abrupt("return",e.postJson("/v2/communication/groups",n));case 2:case"end":return t.stop()}}),t)})))()},createMessage:function(e){var t=this;return u()(k.a.mark((function n(){return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",t.postJson("/v2/communication/groups/".concat(e,"/messages/send"),{encoding:t.isValidGsmMessage?"gsm7":"utf8",text:t.newMessage}));case 1:case"end":return n.stop()}}),n)})))()},handleSelectGroup:function(e){var t=this;return u()(k.a.mark((function n(){return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,t.selectedGroup=t.groups[e],n.t0=t,n.next=5,t.fetchMessages(e);case 5:n.t1=n.sent,n.t0.selectGroupMessages.call(n.t0,n.t1),t.navigate("group-messages-screen"),n.next=13;break;case 10:n.prev=10,n.t2=n.catch(0),t.handleError(n.t2);case 13:case"end":return n.stop()}}),n,null,[[0,10]])})))()},handleUpdateMessages:function(e){var t=this;return u()(k.a.mark((function n(){return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.t0=t,n.next=4,t.fetchMessages(e);case 4:n.t1=n.sent,n.t0.addMessages.call(n.t0,n.t1),n.next=11;break;case 8:n.prev=8,n.t2=n.catch(0),t.handleError(n.t2);case 11:case"end":return n.stop()}}),n,null,[[0,8]])})))()},refreshMessages:function(e){var t=this;return u()(k.a.mark((function n(){var i;return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.fetchMessages(t.selectedGroup.id,{ids:e});case 3:i=n.sent,t.addMessages(i),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),t.reportError(n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},handleOpenMessageRecipientsScreen:function(e){var t=this;return u()(k.a.mark((function n(){return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.fetchMessageStatuses(e.id);case 3:t.selectedMessageStatuses=n.sent,t.selectedMessage=e,t.selectedMessageStatusFilters=[],t.n
1avigate("message-recipients-screen"),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(0),t.handleError(n.t0);case 12:case"end":return n.stop()}}),n,null,[[0,9]])})))()},getGroupMembers:function(e){var t=[],n=[],i=[],s=[],a=[];if(e){var r=[],o=new Set;e.members.forEach((function(e){"teachers"===e.relation&&r.push((function(e){return e.roles.some((function(e){return"teacher"===e.type}))})),"tutors"===e.relation&&r.push((function(e){return e.roles.some((function(e){return"tutor"===e.type}))})),"students"===e.relation&&r.push((function(t){return t.roles.some((function(t){return"student"===t.type&&(!e.class_id||t.classes.includes(e.class_id))}))})),"contact_persons"===e.relation&&r.push((function(t){return t.roles.some((function(t){return"contact_person"===t.type&&(!e.class_id||t.classes.includes(e.class_id))}))})),e.user_id&&o.add(e.user_id)})),o.size>0&&r.push((function(e){return o.has(e.id)})),this.sortedUsers.forEach((function(e){r.some((function(t){return t(e)}))&&function(e){t.push(e),e.has_phone_number||a.push(e),e.is_consented||s.push(e),e.has_phone_number&&e.is_consented||i.push(e),e.has_phone_number&&e.is_consented&&n.push(e)}(e)}))}return{users:t,usersReceivable:n,usersConsented:[],usersNotReceivable:i,usersNotConsented:s,usersNoPhoneNumber:a}},addStatusFilter:function(e){this.selectedMessageStatusFilters.push(e)},removeStatusFilter:function(e){this.selectedMessageStatusFilters=this.selectedMessageStatusFilters.filter((function(t){return t!==e}))},giveConsent:function(e){var t=this;return u()(k.a.mark((function n(){var i,s;return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i="/v2/communication/schools/".concat(t.selectedSchool.id,"/update-consents"),s=e.map((function(e){return{user_id:e.id,is_consented:!0}})),n.prev=2,n.t0=t,n.next=6,t.patchJson(i,s);case 6:return n.t1=n.sent,n.next=9,n.t0.getResponseDataOrThrow.call(n.t0,n.t1);case 9:n.sent.forEach((function(e){t.users[e.user_id]&&(t.users[e.user_id]=De(De({},t.users[e.user_id]),{},{is_consented:e.is_consented}))})),t.users=De({},t.users),n.next=17;break;case 14:n.prev=14,n.t2=n.catch(2),t.handleError(n.t2);case 17:case"end":return n.stop()}}),n,null,[[2,14]])})))()},performFirstLoad:function(){var e=arguments,t=this;return u()(k.a.mark((function n(){var i,s,a,r,o,l;return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=e.length>0&&void 0!==e[0]&&e[0],t.isPerformingFirstLoad=!0,n.prev=2,t.axios.defaults.baseURL=Ne,t.axios.defaults.headers.common["x-client"]=Re,t.axios.defaults.headers.common["x-client-version"]=1,s=!1;try{a=localStorage.getItem(Oe),r=localStorage.getItem(Le),(!a||new Date(r).getTime()<(new Date).getTime())&&(s=!0)}catch(e){s=!0}if(!s&&!i){n.next=27;break}return"/v2/auth/aula",o={jwt_token:t.aulaToken},n.prev=11,n.t0=t,n.next=15,t.postJson("/v2/auth/aula",o);case 15:return n.t1=n.sent,n.next=18,n.t0.getResponseDataOrThrow.call(n.t0,n.t1);case 18:l=n.sent,localStorage.setItem(Oe,l.access_token),localStorage.setItem(Le,l.expires_at),n.next=27;break;case 23:return n.prev=23,n.t2=n.catch(11),t.showUnauthorizedScreen(),n.abrupt("return");case 27:return t.axios.defaults.headers.common.Authorization="Bearer "+localStorage.getItem(Oe),n.next=30,t.fetchMe();case 30:return n.t3=t,n.next=33,t.fetchSchools();case 33:n.t4=n.sent,n.t3.addSchools.call(n.t3,n.t4),t.isPerformingFirstLoad=!1,t.hasPerformedFirstLoad=!0,n.next=42;break;case 39:n.prev=39,n.t5=n.catch(2),t.handleError(n.t5,i);case 42:case"end":return n.stop()}}),n,null,[[2,39],[11,23]])})))()},minimize:function(){this.isMinimized=!0},maximize:function(){this.isMinimized=!1,this.isUntouched=!1,this.hasPerformedFirstLoad||this.performFirstLoad()},formatGroupActivityTime:function(e){return e.isSame(this.moment(),"day")?e.format("HH:mm"):e.format("DD/MM")},closeNewMessageConfirmModal:function(){this.isNewMessageConfirmModalOpen=!1},closeNewMessageErrorModal:function(){this.newMessageErrors=[],this.isNewMessageErrorModalOpen=!1},openConfirmBackModal:function(){this.isConfirmBackModalOpen=!0},closeConfirmBackModal:function(){this.isConfirmBackModalOpen=!1},getSelectedStateBoilerPlate:function(){return{contactPersons:null,students:null,tutors:null,teachers:null,users:{}}},setRecipientSearch:function(e){this.recipientSearch=e||""},setClassSearch:function(e){this.classSearch=e||""},setGroupSearch:function(e){this.groupSearch=e||""},clearGroupSearch:function(){this.groupSearch=""},clearRecipientSearch:function(){this.recipientSearch=""},clearClassSearch:function(){this.classSearch=""},selectRecipient:function(e){this.selected.users=De(De({},this.selected.users),{},l()({},e.id,e))},unSelectRecipient:function(e){var t=this.selected.users;
1delete t[e.id],this.selected.users=De({},t)},selectAllGroupType:function(e){this.selected[e]="all"},unSelectAllGroupType:function(e){this.selected[e]=null},selectAllGroupTypeByClass:function(e,t){if("all"===this.selected[e])return null;this.selected[e]=De(De({},this.selected[e]||{}),{},l()({},t.id,t)),this.selected[e]&&"all"!==this.selected[e]&&Object.keys(this.selected[e]).length===this.sortedClasses.length&&(this.selected[e]="all")},unSelectAllGroupTypeByClass:function(e,t){if(!this.selected[e])return null;var n=this.selected[e];"all"===n&&(n={},this.sortedClasses.forEach((function(e){n[e.id]=e}))),n[t.id]=!1,Object.keys(n).length||(n=null),this.selected[e]=n},handleError:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];401!==(null===(t=e.response)||void 0===t?void 0:t.status)&&401!==(null===(n=e.metaData)||void 0===n?void 0:n.status)||i?(this.showErrorScreen(),this.reportError(e)):this.performFirstLoad(!0)},showErrorScreen:function(){this.openScreen="error-screen"},showUnauthorizedScreen:function(){this.openScreen="unauthorized-screen"},closeBlacklistReasonsModal:function(){this.shownBlacklistReasons=null},selectRecipientsByPeople:function(){this.selectRecipientsMode="people"},selectRecipientsByGroup:function(){this.selectRecipientsMode="group"},removeSelectedRecipients:function(){var e=this;this.removedSelectedRecipients=this.selected,this.selected=this.getSelectedStateBoilerPlate(),setTimeout((function(){e.removedSelectedRecipients=e.getSelectedStateBoilerPlate()}),1e4)},undoRemoveSelectedRecipients:function(){this.selected=this.removedSelectedRecipients,this.removedSelectedRecipients=this.getSelectedStateBoilerPlate()},attemptSendMessage:function(){var e=this;return u()(k.a.mark((function t(){return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.newMessageErrors=e.validateGroup(),e.newMessageErrors=e.newMessageErrors.concat(e.validateMessage(e.newMessage)),!e.newMessageErrors.length){t.next=5;break}return e.isNewMessageErrorModalOpen=!0,t.abrupt("return");case 5:e.isNewMessageConfirmModalOpen=!0;case 6:case"end":return t.stop()}}),t)})))()},handleSendMessage:function(){var e=this;return u()(k.a.mark((function t(){var n,i;return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.isNewMessageLoading=!0,t.next=3,e.createGroup();case 3:if(403===(n=t.sent).status?e.newMessageErrors.push(e.translations.errors.requestBlacklisted):n.successful||e.newMessageErrors.push(e.translations.errors.requestCreateGroupFailed),!n.successful){t.next=10;break}return t.next=8,e.createMessage(n.data.id);case 8:403===(i=t.sent).status?e.newMessageErrors.push(e.translations.errors.requestBlacklisted):i.successful||e.newMessageErrors.push(e.translations.errors.requestSendMessageFailed);case 10:if(!e.newMessageErrors.length){t.next=14;break}return e.isNewMessageLoading=!1,e.isNewMessageErrorModalOpen=!0,t.abrupt("return");case 14:return t.t0=e,t.next=17,e.fetchGroups(e.selectedSchool.id);case 17:t.t1=t.sent,t.t0.addGroups.call(t.t0,t.t1),e.newMessage="",e.newMessageGroupName="",e.isNewMessageLoading=!1,e.selected=e.getSelectedStateBoilerPlate(),e.navigate("new-group-message-success-screen");case 24:case"end":return t.stop()}}),t)})))()},attemptSendMessageToExistingGroup:function(){var e=this;return u()(k.a.mark((function t(){return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.newMessageErrors=e.validateMessage(e.newMessage),!e.newMessageErrors.length){t.next=4;break}return e.isNewMessageErrorModalOpen=!0,t.abrupt("return");case 4:e.isNewMessageConfirmModalOpen=!0;case 5:case"end":return t.stop()}}),t)})))()},sendMessageToExistingGroup:function(e){var t=this;return u()(k.a.mark((function n(){var i,s,a;return k.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.createMessage(e);case 2:if(403===(i=n.sent).status?t.newMessageErrors.push(t.translations.errors.requestBlacklisted):i.successful||t.newMessageErrors.push(t.translations.errors.requestSendMessageFailed),!t.newMessageErrors.length){n.next=7;break}return t.isNewMessageErrorModalOpen=!0,n.abrupt("return");
1case 7:return n.next=9,t.fetchMessages(e);case 9:if(s=n.sent,t.addMessages(s),!t.newMessageErrors.length){n.next=15;break}return t.isNewMessageLoading=!1,t.isNewMessageErrorModalOpen=!0,n.abrupt("return");case 15:t.newMessageGroupName="",t.newMessage="",t.isNewMessageLoading=!1,(a=t.groups[e])&&s.length>0&&(a.latest_group_message=t.enrichMessage(s[s.length-1])),setTimeout(t.scrollMessagesToBottom,100);case 21:case"end":return n.stop()}}),n)})))()},validateGroup:function(){var e=[];return this.anySelectedRecipients||e.push(this.translations.errors.noSelectedRecipients),this.newMessageGroupName||e.push(this.translations.errors.missingGroupName),this.newMessageGroupName&&this.newMessageGroupName.length>100&&e.push(this.translations.errors.groupNameTooLong),e},validateMessage:function(e){var t=[];return!e||e.length<1?t.push(this.translations.errors.messageTextEmpty):!this.newMessage.length>1e4&&t.push(this.translations.errors.messageTextTooLong),t},handleNewMessageGroupNameChange:function(e){this.newMessageGroupName=e},handleNewMessageChange:function(e){this.newMessage=e,this.isValidGsmMessage=this.isGsmMessage(this.newMessage)},openPeopleStatusesOverlay:function(){this.isPeopleStatusesOverlayOpen=!0},closePeopleStatusesOverlay:function(){this.isPeopleStatusesOverlayOpen=!1},isGsmMessage:function(e){var t,n=new Set([10,12,13,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,163,164,165,167,191,196,197,198,199,201,209,214,216,220,223,224,228,229,230,232,233,236,241,242,246,248,249,252,915,916,920,923,926,928,931,934,936,937,8364]),i=ye(e);try{for(i.s();!(t=i.n()).done;){var s=t.value.codePointAt(0);if(s&&!n.has(s))return!1}}catch(e){i.e(e)}finally{i.f()}return!0}},computed:{translations:function(){return this.TRANSLATIONS[this.language]},allGroups:function(){return Object.values(this.groups)},filteredGroups:function(){var e=this;if(!this.groupSearch||this.groupSearch.length<1)return Object.values(this.groups);var t=this.groupSearch.toLowerCase();return this.allGroups.filter((function(n){return function(e){return e.name&&e.name.toLowerCase().includes(t)}(n)||function(n){var i;return null===(i=n.members)||void 0===i?void 0:i.some((function(n){var i,s;return!!(n.class_id&&null!==(i=e.classes[n.class_id])&&void 0!==i&&i.name&&null!==(s=e.classes[n.class_id])&&void 0!==s&&s.name.toLowerCase().includes(t))}))}(n)}))},sortedGroups:function(){return r()(this.filteredGroups).sort((function(e,t){var n,i,s=(null===(n=e.latest_group_message)||void 0===n?void 0:n.created_at)||e.created_at;return((null===(i=t.latest_group_message)||void 0===i?void 0:i.created_at)||t.created_at).unix()-s.unix()}))},groupMembers:function(){var e=this,t={};return this.sortedGroups.forEach((function(n){t[n.id]=e.getGroupMembers(n)})),t},selectedGroupMembers:function(){var e;return this.groupMembers[null===(e=this.selectedGroup)||void 0===e?void 0:e.id]},selectedGroupMembersWhereConsentable:function(){var e=this;return this.selectedGroupMembers.users.filter((function(t){return e.consentableUsers[t.id]}))},consentableUsers:function(){var e={};return this.sortedUsers.forEach((function(t){e[t.id]=!t.is_consented&&t.is_changeable_consent})),e},sortedSelectedGroupMessages:function(){return Object.values(this.selectedGroupMessages).sort((function(e,t){return e.created_at.unix()-t.created_at.unix()}))},selectedGroupMembersFiltered:function(){var e={};this.selectedGroupMembers.users.forEach((function(t){return e[t.id]=!0}));var t=function(t){return e[t.id]};return{teachers:this.filteredTeachers.filter(t),tutors:this.filteredTutors.filter(t),students:this.filteredStudents.filter(t),contactPersons:this.filteredContactPersons.filter(t),inspectors:this.filteredInspectors.filter(t)}},selectedMessageRecipientsFiltered:function(){var e=this;if(!this.selectedMessageStatusFilters.length)return this.selectedGroupMembersFiltered;var t=this.selectedMessageStatusFilters.includes("received"),n=this.selectedMessageStatusFilters.includes("pending"),i=this.selectedMessageStatusFilters.includes("failed"),s=function(s){return t&&"received"===e.selectedMessageStatuses[s.id]||n&&"pending"===e.selectedMessageStatuses[s.id]||i&&"failed"===e.selectedMessageStatuses[s.id]};return{teachers:this.selectedGroupMembersFiltered.teachers.filter(s),tutors:this.selectedGroupMembersFiltered.tutors.filter(s),students:this.selectedGroupMembersFiltered.students.filter(s),contactPersons:this.selectedGroupMembersFiltered.contactPersons.filter(s),inspectors:this.selectedGroupMembersFiltered.inspectors.filter(s)}},selectedMessageRecipientsLength:function(){return this.selectedMessageRecipientsFiltered.teachers.length+this.selectedMessageRecipientsFiltered.tutors.length+this.selectedMessageRecipientsFiltered.students.length+this.selectedMessageRecipientsFiltered.contactPersons.length},newMessageLengthDescription:function(){return 0===this.newMessage.length?null:this.newMessageMessagesAmount<=1?"".concat(this.charactersInCurrentMessage):"".concat(this.charactersInCurrentMessage,"/").concat(this.newMessageMessagesAmount)},newMessageMessagesAmount:function(){return this.newMessage.length<=(this.isValidGsmMessage?160:70)?1:Math.ceil(this.newMessage.length/(this.isValidGsmMessage?153:67))},charactersInCurrentMessage:function(){var e=this.isValidGsmMessage?160:70,t=this.isValidGsmMessage?153:67;return this.newMessage.length<=e?this.newMessage.length:this.newMessage.length%t},selectedRecipients:function(){var e=this,t=[function(t){return e.selected.users[t.id]},function(t){return e.selected.teachers&&t.roles.some((function(e){return"teacher"===e.type}))},function(t){return e.selected.tutors&&t.roles.some((function(e){return"tutor"===e.type}))},function(t){return!!e.selected.students&&("all"===e.selected.students?t.roles.some((function(e){return"student"===e.type})):t.roles.some((function(t){return"student"===t.type&&t.classes&&t.classes.some((function(t){return e.selected.students[t]}))})))},function(t){return!!e.selected.contactPersons&&("all"===e.selected.contactPersons?t.roles.some((function(e){return"contact_person"===e.type})):t.roles.some((function(t){return"contact_person"===t.type&&t.classes&&t.classes.some((function(t){return e.selected.contactPersons[t]}))})))}];return this.sortedUsers.filter((function(e){return t.some((function(t){return t(e)}))}))},selectedRecipientsReceivable:function(){return this.selectedRecipients.filter((function(e){return e.is_consented&&e.has_phone_number}))},selectedRecipientsNotReceivable:function(){var e={};return this.selectedRecipientsWithoutConsent.forEach((function(t){return e[t.id]=t})),this.selectedRecipientsWithoutPhone.forEach((function(t){return e[t.id]=t})),Object.values(e)},selectedRecipientsWithoutConsent:function(){return this.selectedRecipients.filter((function(e){return!e.is_consented}))},selectedRecipientsWithoutPhone:function(){return this.selectedRecipients.filter((function(e){return!e.has_phone_number}))},anySelectedRecipients:function(){return!!(this.selected.contactPersons||this.selected.students||this.selected.tutors||this.selected.teachers||Object.values(this.selected.users).length>0)},selectedRecipientsWhereConsentCanBeGiven:function(){return this.selectedRecipients.filter((function(e){return!e.is_consented&&e.is_changeable_consent}))},usersWhereConsentCanBeGiven:function(){return this.sortedUsers.filter((function(e){return!e.is_consented&&e.is_changeable_consent}))},giveConsentUsers:function(){return this.anySelectedRecipients?this.selectedRecipientsWhereConsentCanBeGiven:this.usersWhereConsentCanBeGiven},isRemovedSelectedRecipientsNotEmpty:function(){return!!(this.removedSelectedRecipients.c
1ontactPersons||this.removedSelectedRecipients.students||this.removedSelectedRecipients.tutors||this.removedSelectedRecipients.teachers)||!!Object.keys(this.removedSelectedRecipients.users).length},recipientsFormattedForGroupCreation:function(){var e=[];return"all"===this.selected.teachers&&e.push({relation:"teachers"}),"all"===this.selected.tutors&&e.push({relation:"tutors"}),Object.keys(this.selected.users).forEach((function(t){e.push({user_id:parseInt(t)})})),"all"===this.selected.students?e.push({relation:"students"}):this.selected.students&&Object.entries(this.selected.students).forEach((function(t){var n=s()(t,2),i=n[0];n[1]&&e.push({relation:"students",class_id:parseInt(i)})})),"all"===this.selected.contactPersons?e.push({relation:"contact_persons"}):this.selected.contactPersons&&Object.entries(this.selected.contactPersons).forEach((function(t){var n=s()(t,2),i=n[0];n[1]&&e.push({relation:"contact_persons",class_id:parseInt(i)})})),e},sortedUsers:function(){return Object.values(this.users).sort((function(e,t){var n=""!==(e.name||""),i=""!==(t.name||"");return n||i?n!==i?n?-1:1:e.name.localeCompare(t.name):0}))},filteredRecipients:function(){var e=this,t=this.recipientSearch.toLowerCase();if(t.length<1)return this.sortedUsers;return this.sortedUsers.filter((function(n){return function(e){return e.name&&e.name.toLowerCase().includes(t)}(n)||function(e){return e.provider_id&&e.provider_id===t}(n)||function(e){return e.roles.some((function(e){return e.initials&&e.initials.toLowerCase().includes(t)}))}(n)||function(n){return n.roles.some((function(n){return n.classes&&n.classes.some((function(n){var i=e.classes[n];return i&&i.name&&i.name.toLowerCase().includes(t)}))}))}(n)}))},teachers:function(){return this.sortedUsers.filter((function(e){return e.roles.some((function(e){return"teacher"===e.type}))}))},filteredTeachers:function(){return this.filteredRecipients.filter((function(e){return e.roles.some((function(e){return"teacher"===e.type}))}))},tutors:function(){return this.sortedUsers.filter((function(e){return e.roles.some((function(e){return"tutor"===e.type}))}))},filteredTutors:function(){return this.filteredRecipients.filter((function(e){return e.roles.some((function(e){return"tutor"===e.type}))}))},students:function(){return this.sortedUsers.filter((function(e){return e.roles.some((function(e){return"student"===e.type}))}))},filteredStudents:function(){return this.filteredRecipients.filter((function(e){return e.roles.some((function(e){return"student"===e.type}))}))},contactPersons:function(){return this.sortedUsers.filter((function(e){return e.roles.some((function(e){return"contact_person"===e.type}))}))},filteredContactPersons:function(){return this.filteredRecipients.filter((function(e){return e.roles.some((function(e){return"contact_person"===e.type}))}))},inspectors:function(){return this.sortedUsers.filter((function(e){return e.roles.some((function(e){return"inspector"===e.type}))}))},filteredInspectors:function(){return this.filteredRecipients.filter((function(e){return e.roles.some((function(e){return"inspector"===e.type}))}))},consentedUsersCount:function(){return this.sortedUsers.filter((function(e){return e.is_consented})).length},undecidedConsentUsersCount:function(){return this.sortedUsers.filter((function(e){return!e.is_consented&&e.is_changeable_consent})).length},deniedConsentUserCount:function(){return this.sortedUsers.filter((function(e){return!e.is_consented&&!e.is_changeable_consent})).length},hasNoPhoneNumberCount:function(){return this.sortedUsers.filter((function(e){return!e.has_phone_number})).length},sortedClasses:function(){return Object.values(this.classes).sort((function(e,t){var n=e.name.toLocaleLowerCase(),i=t.name.toLocaleLowerCase();return n.localeCompare(i)}))},filteredClasses:function(){var e=this.classSearch.toLowerCase();return e.length<1?this.sortedClasses:this.sortedClasses.filter((function(t){return t.name&&t.name.toLowerCase().includes(e)}))}}},Fe=Me,Ue=Object(I.a)(Fe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app"},["error-screen"===e.openScreen?n("error-screen",{attrs:{translations:e.translations}}
1):e._e(),e._v(" "),"unauthorized-screen"===e.openScreen?n("unauthorized-screen",{attrs:{translations:e.translations,"is-minimized":e.isMinimized},on:{maximize:e.maximize,minimize:e.minimize}}):"select-school-screen"===e.openScreen?n("select-school-screen",{attrs:{"is-loading":e.isPerformingFirstLoad,"is-minimized":e.isMinimized,"is-untouched":e.isUntouched,schools:e.schools,"shown-blacklist-reasons":e.shownBlacklistReasons,"close-blacklist-reasons-modal":e.closeBlacklistReasonsModal,translations:e.translations},on:{maximize:e.maximize,minimize:e.minimize,"select-school":function(t){return e.selectSchool(t)}}}):"groups-overview-screen"===e.openScreen||"people-overview-screen"===e.openScreen?n("div",{class:[e.isMinimized&&"closed","main-container"]},[n("div",{staticClass:"header"},[n("div",{staticClass:"header-heading"},[n("svg",{staticClass:"header-icon left pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:e.unselectSchool}},[n("path",{attrs:{d:"M20.393 5.333l0.94 0.94-8.78 9.727 8.78 9.727-0.94 0.94-9.727-10.667 9.727-10.667z"}})]),e._v(" "),n("h3",{staticClass:"header-title"},[e._v(e._s(e.selectedSchool.name))]),e._v(" "),e.isMinimized?n("svg",{staticClass:"header-icon right pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:e.maximize}},[n("path",{attrs:{d:"M12.193 18.827l-8.193 8.193v-6.353h-1.333v8.667h8.667v-1.333h-6.393l8.2-8.213-0.947-0.96zM20.667 2.667v1.333h6.393l-8.2 8.18 0.947 0.933 8.193-8.207v6.427h1.333v-8.667h-8.667zM11.333 4v-1.333h-8.667v8.667h1.333v-6.427l8.193 8.2 0.947-0.927-8.2-8.18h6.393zM28 26.933l-7.513-8.087-0.973 0.927 7.627 8.227h-6.473v1.333h8.667v-8.667h-1.333v6.267z"}}
1)]):n("svg",{staticClass:"header-icon right pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:e.minimize}},[n("path",{attrs:{d:"M28 10.667h-5.833l7.167-7.133-0.9-0.867-7.167 7.16 0.067-5.827h-1.267l-0.067 8h8v-1.333zM4 21.333h5.833l-7.167 7.133 0.867 0.867 7.133-7.167v5.833h1.333v-8h-8v1.333zM28 21.333v-1.333h-8v8h1.333v-5.833l7.133 7.167 0.867-0.867-7.167-7.133h5.833zM10.667 9.833l-7.133-7.167-0.867 0.867 7.167 7.133h-5.833v1.333h8v-8h-1.333v5.833z"}})])]),e._v(" "),n("div",{staticClass:"header-links"},[n("div",{staticClass:"header-links-background"},[n("div",{class:["groups-overview-screen"===e.openScreen&&"header-link-active","header-link"],on:{click:function(t){return e.navigate("groups-overview-screen")}}},[n("span",[e._v(e._s(e.translations.groupsOverviewScreen.toggleTitle))])]),e._v(" "),n("div",{class:["people-overview-screen"===e.openScreen&&"header-link-active","header-link"],on:{click:function(t){return e.navigate("people-overview-screen")}}},[n("span",[e._v(e._s(e.translations.peopleOverviewScreen.toggleTitle))])])])])]),e._v(" "),n("div",{staticClass:"body main-screen-content scrollable"},["groups-overview-screen"===e.openScreen||"people-overview-screen"===e.openScreen?n("div",["groups-overview-screen"===e.openScreen?n("div",[e.allGroups.length?n("div",{staticClass:"group-list-container"},[n("div",{staticStyle:{"padding-top":"10px"}},[n("search",{attrs:{placeholder:e.translations.groupsOverviewScreen.searchPlaceholder,search:e.groupSearch,"search-change":e.setGroupSearch,"search-clear":e.clearGroupSearch}})],1),e._v(" "),e.filteredGroups.length<1?n("div",[n("p",{staticStyle:{"font-size":"14px",color:"#6F7785"}},[e._v(e._s(e.translations.groupsOverviewScreen.noMatchingGroups))])]):e._e(),e._v(" "),e._l(e.sortedGroups,(function(t){return n("div",{key:t.id,staticClass:"group-card pointer",on:{click:function(n){return e.handleSelectGroup(t.id)}}},[n("div",{staticClass:"group-member-amount"},[n("span",{staticClass:"number-text"},[e._v(e._s(e.groupMembers[t.id].users.length))])]),e._v(" "),n("div",{staticClass:"group-text-container"},[n("h3",{staticClass:"group-heading"},[e._v(e._s(t.name))]),e._v(" "),t.latest_group_message?n("p",{staticClass:"group-excerpt"},[e._v("\n                  "+e._s(t.latest_group_message?t.latest_group_message.text:"")+"\n                ")]):e._e()]),e._v(" "),n("p",{staticClass:"group-date"},[e._v("\n                "+e._s(e.formatGroupActivityTime(t.latest_group_message?t.latest_group_message.created_at:t.created_at)))])])}))],2):!e.sortedGroups.length&&e.isGroupsLoading?n("div",[n("spinner")],1):n("div",[n("div",{staticClass:"no-groups-container container mx-auto text-center"},[n("svg",{staticClass:"no-groups-illustration",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 165 96.633"}},[n("defs",[n("filter",{attrs:{id:"Path_709",x:"34.54",y:"6.326",width:"57.219",height:"56.113",filterUnits:"userSpaceOnUse"}},[n("feOffset",{attrs:{dy:"3",input:"SourceAlpha"}}),e._v(" "),n("feGaussianBlur",{attrs:{stdDeviation:"3",result:"blur"}}),e._v(" "),n("feFlood",{attrs:{"flood-opacity":"0.161"}}),e._v(" "),n("feComposite",{attrs:{operator:"in",in2:"blur"}}),e._v(" "),n("feComposite",{attrs:{in:"SourceGraphic"}})],1)]),e._v(" "),n("g",{attrs:{id:"Illustration",transform:"translate(-0.194)"}},[n("g",{attrs:{id:"Group_1856","data-name":"Group 1856",transform:"translate(0.194)",opacity:"0.75"}},[n("path",{attrs:{id:"Path_684","data-name":"Path 684",d:"M164.106,48.564c8.968,23.959-39.779,45.957-61.662,47.832-21.821,1.968-62.355,4.729-90.026-25.955C-15.175,39.644,4.382-15.8,66.68,7.53,129.029,30.927,155.192,24.683,164.106,48.564Z",transform:"translate(-0.194 -0.857)",fill:"#f2f5f9","fill-rule":"evenodd"}}),e._v(" "),n("image",{attrs:{id:"Rectangle_1719","data-name":"Rectangle 1719",width:"59.389",height:"96.367",transform:"translate(96.108)","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAACsCAYAAACTkDk+AAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAaqADAAQAAAABAAAArAAAAACUMqf3AAAFVElEQVR4Ae2awXbTMBBFCYcVe5b8/3/BDtawLRGnOhi1nsia0bPGudnYruyZ53uj1G10+/bj18sHXksT+Prl8+3j0gkJ95fA95+/XxCV5M2AKEQlIZAkJjMKUUkIJInJjEJUEgJJYn7qzXn/o6v31A/3537z3KhaUXVK2KhaUXVagFM++qyw1lgbLvLY6muNRWZoax3pO0VUG4hjPwFE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSCoiSYPY3QZSfoaTCFFHW91HW2Mw7tvpaY2dlavveWCnbIlnzeMqMWvNWc6dCVBJ/iEJUEgJJYjKjkohiudirqCMrgqzH+ag67ftnyoyywlpjbbjIY6uvNRaZoa11pO8UUW0gjv0EEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpAKiJJj9TRDlZyipgCgJZn8TRPkZSiogSoLZ3wRRfoaSClNEWd/XWGMz79jqa42dlanty3Kxlsiix1Nm1KL3mjoWopLoQxSikhBIEpMZlUQUy8VeRR1ZEWQ9zkfVad8/U2aUFdYaa8NFHlt9rbHIDG2tI32niGoDcewngCg/Q0kFREkw+5sgys9QUgFREsz+JojyM5RUQJQEs78JovwMJRUQJcHsb4IoP0NJBURJMPubIMrPUFIBURLM/iaI8jOUVJgiyvq+xhqbecdWX2vsrExtX5aLtUQWPZ4yoxa919SxEJVEH6IQlYRAkpjMqCSiWC72KurIiiDrcT6qTvv+mTKjrLDWWBsu8tjqa41FZmhrHek7RVQbiGM/AUT5GUoqIEqC2d8EUX6GkgqIkmD2N0GUn6GkAqIkmP1NEOVnKKmAKAlmfxNE+RlKKiBKgtnfBFF+hpIKiJJg9jdBlJ+hpMIUUdb3NdbYzDu2+lpjZ2Vq+7JcrCWy6PGUGbXovaaOhagk+hCFqCQEksRkRiURJV8udmTlTWFoPTpH1YqqU/JG1ir16mvKjDoatoZhu09giqj9doyMEkDUKDnxdYgSAx9th6hRcuLrECUGPtoOUaPkxNchSgx8tB2iRsmJr0OUGPhoO0SNkhNfhygx8NF2iBolJ74OUWLgo+0QNUpOfB2rkMTAR9sx
1o0bJia9DlBj4aDtEjZITX4coMfDRdogaJSe+DlFi4KPtpiwXK2H2lnkdXaG0V6f0iKoVVScyU6m1fTGjtjQW3kfUwnK20RC1pbHwPqIWlrONhqgtjUX37w87N0QtKqfGKpLKPqIqkQW3VRKiFpRTI20lIapSWWzbSirxuv8zsdi9XDLOe4LqjfI7qpI4eWtJKtEQdbKg0v6RpHIOH32Fwnmv211SV3dmVBemKSf9/fuotzKieknFnndIUmnNcrFYAWa1nt9FewWYUXtkgn/ukVSi8DARLKQt5xVU6yGqkgjeRgmqsfjoqyQCt9GSSjRm1OKCajxmVCXh3M6YRdtI3TPqHmR73cP9vWVeUXVKgKhanjr3aw//TfQQ3jsndIt659qn/pFKUIWMqEqif9v9/7n+ko/PRNRjRvUMyUdcbdZuEdUSeXt8qqAaB1GVxNvtEoJqLERVEv+2SwmqsRBVSdy/Sfi3u97e04tSP2aPvgWeVlQWQVXsU4nKJqdKKttnEbX075+tkL39q4tKL6iKu6Koy8ipksr2KqIuKedKoi4vqMpKt1ws85NbhT6yTfHR96xytkKXFYWcraaFHiYQ87+Y9ujUGYWcVsf+sUwUUvYl9IxME4WYHvz957hFIaQftufMXVEI8GCNv/YPKdzNQsY/Fm4AAAAASUVORK5CYII="}}),e._v(" "),n("path",{attrs:{id:"Path_685","data-name":"Path 685",d:"M67.318,124.161c-16.677-2.775-34.217-9.72-48.387-25.418a49.186,49.186,0,0,1-3.95-5.024v-27.4H67.318Z",transform:"translate(-6.696 -29.16)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_686","data-name":"Path 686",d:"M28.731,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H23.794V80.064A4.937,4.937,0,0,1,28.731,75.127Z",transform:"translate(-10.572 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_687","data-name":"Path 687",d:"M28.731,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H28.078s-1.074-.986-2.159-2.053-2.028-2.121-2.028-2.121l-.1-4.1A4.937,4.937,0,0,1,28.731,110.157Z",transform:"translate(-10.572 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_688","data-name":"Path 688",d:"M57.813,75.127a4.937,4.937,0,0,1,4.937,4.937v8.271H52.875V80.064A4.937,4.937,0,0,1,57.813,75.127Z",transform:"translate(-23.388 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_689","data-name":"Path 689",d:"M57.813,110.157a4.937,4.937,0,0,1,4.937,4.937v8.27H52.875v-8.27A4.937,4.937,0,0,1,57.813,110.157Z",transform:"translate(-23.388 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_690","data-name":"Path 690",d:"M86.894,75.127a4.938,4.938,0,0,1,4.938,4.937v8.271H81.956V80.064A4.938,4.938,0,0,1,86.894,75.127Z",transform:"translate(-36.191 -33.035)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_691","data-name":"Path 691",d:"M86.894,110.157a4.937,4.937,0,0,1,4.938,4.937v8.27H81.956v-8.27A4.937,4.937,0,0,1,86.894,110.157Z",transform:"translate(-36.191 -48.439)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_692","data-name":"Path 692",d:"M58.2,145.187a4.937,4.937,0,0,1,4.937,4.937v2.7L58.2,150.483s-1.516-.759-4.447-2.451A4.785,4.785,0,0,1,58.2,145.187Z",transform:"translate(-23.774 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_693","data-name":"Path 693",d:"M86.894,145.187a4.937,4.937,0,0,1,4.938,4.937l.054,7.805s-3.195-.718-5.677-1.4-4.252-1.333-4.252-1.333v-5.07A4.937,4.937,0,0,1,86.894,145.187Z",transform:"translate(-36.191 -63.842)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_694","data-name":"Path 694",d:"M26,33.267H65.991V45.611H26Z",transform:"translate(-11.54 -14.628)",fill:"#e2eaf5","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_695","data-name":"Path 695",d:"M29.3,36.572h36.29v8.641H29.3Z",transform:"translate(-12.994 -16.082)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_696","data-name":"Path 696",d:"M38.687,55.3H37.453V61.47h1.234Z",transform:"translate(-16.578 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_697","data-name":"Path 697",d:"M84.953,55.3H83.719V61.47h1.234Z",transform:"translate(-36.965 -24.316)",fill:"#e2eaf5"}}),e._v(" "),n("path",{attrs:{id:"Path_698","data-name":"Path 698",d:"M156.534,124.218a56.486,56.486,0,0,1-6.419.964c-10.667.961-25.8,2.112-41.721-.537V85.931l24.07-18.515,24.07,18.515Z",transform:"translate(-47.851 -29.645)",fill:"#d3e0f1","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_699","data-name":"Path 699",d:"M117.577,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,107.293Z",transform:"translate(-51.711 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_700","data-name":"Path 700",d:"M143.353,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,107.293Z",transform:"translate(-63.059 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_701","data-name":"Path 701",d:"M169.13,107.293h8.641a.37.37,0,0,1,.37.37V116.3a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,107.293Z",transform:"translate(-74.408 -47.179)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_702","data-name":"Path 702",d:"M117.577,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,128.443Z",transform:"translate(-51.711 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_703","data-name":"Path 703",d:"M143.353,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,128.443Z",transform:"translate(-63.059 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_704","data-name":"Path 704",d:"M169.13,128.443h8.641a.37.37,0,0,1,.37.37v8.641a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,128.443Z",transform:"translate(-74.408 -56.48)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_705","data-name":"Path 705",d:"M117.577,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,117.577,149.593Z",transform:"translate(-51.711 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_706","data-name":"Path 706",d:"M143.353,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37h-8.641a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,143.353,149.593Z",transform:"translate(-63.059 -65.78)",fill:"#fff","fill-rule":"evenodd"}}),e._v(" "),n("path",{attrs:{id:"Path_707","data-name":"Path 707",d:"M169.13,149.593h8.641a.37.37,0,0,1,.37.37V158.6a.37.37,0,0,1-.37.37H169.13a.37.37,0,0,1-.37-.37v-8.641A.37.37,0,0,1,169.13,149.593Z",transform:"translate(-74.408 -65.78)",fill:"#fff","fill-rule":"evenodd"}})]),e._v(" "),n("path",{attrs:{id:"Path_708","data-name":"Path 708",d:"M124.766,39.5h35.3a11.766,11.766,0,0,1,11.766,11.766v25a11.766,11.766,0,0,1-11.766,11.766H127.9l-10.132,8A2.941,2.941,0,0,1,113,93.728V51.266A11.766,11.766,0,0,1,124.766,39.5Z",transform:"translate(-49.693 -17.369)",fill:"#8c94a6"}}),e._v(" "),n("g",{attrs:{transform:"matrix(1, 0, 0, 1, 0.19, 0)",filter:"url
1(#Path_709)"}},[n("path",{attrs:{id:"Path_709-2","data-name":"Path 709",d:"M109.375,22H85.844A7.844,7.844,0,0,0,78,29.844V46.512a7.844,7.844,0,0,0,7.844,7.844h21.445l6.755,5.335a1.961,1.961,0,0,0,3.176-1.539V29.844A7.844,7.844,0,0,0,109.375,22Z",transform:"translate(-34.46 -9.67)",fill:"#8c94a6"}})])])]),e._v(" "),n("h3",{staticClass:"no-groups-heading"},[e._v("\n                "+e._s(e.translations.groupsOverviewScreen.noGroupsHeading)+"\n              ")]),e._v(" "),n("p",{staticClass:"no-groups-text"},[e._v("\n                "+e._s(e.translations.groupsOverviewScreen.noGroupsText)+"\n              ")])])])]):"people-overview-screen"===e.openScreen?n("div",[n("div",{staticClass:"people"},[n("div",{staticClass:"people-padding"},[n("search",{attrs:{placeholder:e.translations.peopleOverviewScreen.peopleSearchPlaceholder,search:e.recipientSearch,"search-clear":e.clearRecipientSearch,"search-change":e.setRecipientSearch}}),e._v(" "),e.giveConsentUsers.length>0?n("consent-box",{attrs:{"sub-header-text":e.anySelectedRecipients?e.translations.peopleOverviewScreen.consentBoxSubheaderSelectedRecipients:e.translations.peopleOverviewScreen.consentBoxSubheaderPeople,users:e.giveConsentUsers,"give-consent":function(){return e.giveConsent(e.giveConsentUsers)},translations:e.translations}}):e._e(),e._v(" "),n("div",{staticClass:"recipient-information"},[n("div",{staticClass:"recipient-amount-description number-text"},[e._v("\n                  "+e._s(e.interpolate(e.translations.peopleOverviewScreen.amountDescription,{count:e.filteredRecipients.length}))+"\n                ")]),e._v(" "),n("div",{staticClass:"recipient-status-icon-container",on:{mouseenter:e.openPeopleStatusesOverlay,mouseleave:e.closePeopleStatusesOverlay}},[n("svg",{staticClass:"recipient-status-main-icon fill-blue",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M12.667 5.333h16.667v1.333h-16.667v-1.333zM12.667 15.333h16.667v1.333h-16.667v-1.333zM12.667 25.333h16.667v1.333h-16.667v-1.333zM6 2.667c-1.841 0-3.333 1.492-3.333 3.333s1.492 3.333 3.333 3.333c1.841 0 3.333-1.492 3.333-3.333v0c0-1.841-1.492-3.333-3.333-3.333v0zM6 8c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM6 12.667c-1.841 0-3.333 1.492-3.333 3.333s1.492 3.333 3.333 3.333c1.841 0 3.333-1.492 3.333-3.333v0c0-1.841-1.492-3.333-3.333-3.333v0zM6 18c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM6 22.667c-1.841 0-3.333 1.492-3.333 3.333s1.492 3.333 3.333 3.333c1.841 0 3.333-1.492 3.333-3.333v0c0-1.841-1.492-3.333-3.333-3.333v0zM6 28c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0z"}})]),e._v(" "),e.isPeopleStatusesOverlayOpen?n("div",{staticClass:"recipient-status-overlay-container"},[n("div",{staticClass:"recipient-status-overlay-item"},[n("svg",{staticClass:"recipient-status-overlay-icon fill-blue",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M4 0v32h15.333c4.786 0 8.667-3.88 8.667-8.667v0-23.333h-24zM26.667 23.333c0 4.050-3.283 7.333-7.333 7.333v0h-14v-29.333h21.333v22zM10.667 9.333h10.667v1.333h-10.667v-1.333zM10.667 14.667h10.667v1.333h-10.667v-1.333zM10.667 20h8v1.333h-8v-1.333z"}})]),e._v(" "),n("p",{staticClass:"recipient-status-overlay-text"},[e._v(e._s(e.translations.peopleOverviewScreen.consentGiven))]),e._v(" "),n("p",{staticClass:"recipient-status-overlay-number number-text"},[e._v(e._s(e.consentedUsersCount))])]),e._v(" "),n("div",{staticClass:"recipient-status-overlay-item"},[n("svg",{staticClass:"recipient-status-overlay-icon fill-orange",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M10.667 14.679v1.333h10.667v-1.333h-10.667zM18.667 20.012v1.333h-8v-1.333h8zM10.667 9.346v1.333h10.667v-1.333h-10.667zM19.333 30.667l-14 0.012v-29.333h21.333v15.988c0.529 0 0.863 0 1.333 0v-17.321h-24v32l15.333-0.012v-1.333zM26.171 21.333l-0.179 5.254-0.008 0.242v0.004h-1.308l-0.183-5.5zM26.212 28.504c0 0.1-0.012 0.196-0.042 0.283 0 0 0 0 0 0-0.038 0.117-0.104 0.221-0.2 0.313-0.050 0.050-0.108 0.092-0.171 0.125-0.133 0.075-0.292 0.108-0.471 0.108-0.121 0-0.229-0.017-0.329-0.050-0.117-0.038-0.217-0.1-0.304-0.
1183-0.121-0.117-0.196-0.254-0.225-0.413-0.012-0.058-0.017-0.117-0.017-0.179 0-0.242 0.079-0.438 0.242-0.596s0.375-0.238 0.633-0.238h0.012c0.258 0.004 0.471 0.079 0.629 0.233 0.133 0.129 0.212 0.288 0.233 0.475 0.008 0.038 0.008 0.079 0.008 0.121zM25.333 20c1.425 0 2.762 0.554 3.771 1.563s1.563 2.346 1.563 3.771-0.554 2.762-1.563 3.771-2.346 1.563-3.771 1.563-2.762-0.554-3.771-1.563c-1.008-1.008-1.563-2.346-1.563-3.771s0.554-2.762 1.563-3.771c1.008-1.008 2.346-1.563 3.771-1.563zM25.333 18.667c-3.683 0-6.667 2.983-6.667 6.667s2.983 6.667 6.667 6.667 6.667-2.983 6.667-6.667-2.983-6.667-6.667-6.667v0z"}})]),e._v(" "),n("p",{staticClass:"recipient-status-overlay-text"},[e._v(e._s(e.translations.peopleOverviewScreen.consentUndecided))]),e._v(" "),n("p",{staticClass:"recipient-status-overlay-number number-text"},[e._v(e._s(e.undecidedConsentUsersCount))])]),e._v(" "),n("div",{staticClass:"recipient-status-overlay-item"},[n("svg",{staticClass:"recipient-status-overlay-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M10.667 14.679v1.333h10.667v-1.333h-10.667zM18.667 20.012v1.333h-8v-1.333h8zM10.667 9.346v1.333h10.667v-1.333h-10.667zM19.333 30.667l-14 0.012v-29.333h21.333v15.988c0.529 0 0.863 0 1.333 0v-17.321h-24v32l15.333-0.012v-1.333zM26.171 21.333l-0.179 5.254-0.008 0.242v0.004h-1.308l-0.183-5.5zM26.212 28.504c0 0.1-0.012 0.196-0.042 0.283 0 0 0 0 0 0-0.038 0.117-0.104 0.221-0.2 0.313-0.050 0.050-0.108 0.092-0.171 0.125-0.133 0.075-0.292 0.108-0.471 0.108-0.121 0-0.229-0.017-0.329-0.050-0.117-0.038-0.217-0.1-0.304-0.183-0.121-0.117-0.196-0.254-0.225-0.413-0.012-0.058-0.017-0.117-0.017-0.179 0-0.242 0.079-0.438 0.242-0.596s0.375-0.238 0.633-0.238h0.012c0.258 0.004 0.471 0.079 0.629 0.233 0.133 0.129 0.212 0.288 0.233 0.475 0.008 0.038 0.008 0.079 0.008 0.121zM25.333 20c1.425 0 2.762 0.554 3.771 1.563s1.563 2.346 1.563 3.771-0.554 2.762-1.563 3.771-2.346 1.563-3.771 1.563-2.762-0.554-3.771-1.563c-1.008-1.008-1.563-2.346-1.563-3.771s0.554-2.762 1.563-3.771c1.008-1.008 2.346-1.563 3.771-1.563zM25.333 18.667c-3.683 0-6.667 2.983-6.667 6.667s2.983 6.667 6.667 6.667 6.667-2.983 6.667-6.667-2.983-6.667-6.667-6.667v0z"}})]),e._v(" "),n("p",{staticClass:"recipient-status-overlay-text"},[e._v(e._s(e.translations.peopleOverviewScreen.consentNotGiven))]),e._v(" "),n("p",{staticClass:"recipient-status-overlay-number number-text"},[e._v(e._s(e.deniedConsentUserCount))])]),e._v(" "),n("div",{staticClass:"recipient-status-overlay-item"},[n("svg",{staticClass:"recipient-status-overlay-icon fill-red",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),n("p",{staticClass:"recipient-status-overlay-text"},[e._v(e._s(e.translations.peopleOverviewScreen.missingPhone))]),e._v(" "),n("p",{staticClass:"recipient-status-overlay-number number-text"},[e._v(e._s(e.hasNoPhoneNumberCount))])])]):e._e()])])],1),e._v(" "),n("recipient-type",{attrs:{role:"teacher",translations:e.translations,header:e.translations.general.roles.teachers,recipients:e.filteredTeachers,"is-selectable":!1,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.selectRecipient(t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}),e._v(" "),n("recipient-type",{attrs:{role:"tutor",translations:e.translations,header:e.translations.general.roles.tutors,recipients:e.filteredTutors,"is-selectable":!1,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.selectRecipient(t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}),e._v(" "),n("recipient-type",{attrs:{role:"student",translations:e.translations,header:e.translations.general.roles.students,recipients:e.filteredStudents,"is-selectable":!1,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.selectRecipient(t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}),e._v(" "),n("recipient-type",{attrs:{role:"contact_person",translations:e.translations,header:e.translations.general.roles.contacts,recipients:e.filteredContactPersons,"is-selectable":!1,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.selectRecipient(t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}),e._v(" "),n("recipient-type",{attrs:{role:"inspector",translations:e.translations,header:e.translations.general.roles.inspectors,recipients:e.filteredInspectors,"is-selectable":!1,"selected-users":e.selected.users,"keyed-classes":this.classes,"give-consent":e.giveConsent},on:{"add-recipient":function(t){return e.selectRecipient(t)},"remove-recipient":function(t){return e.unSelectRecipient(t)}}}
1)],1)]):e._e()]):e._e(),e._v(" "),n("div",{class:[e.isMinimized&&"closed","new-message-button"],on:{click:function(t){return e.navigate("new-group-message-screen")}}},[n("svg",{staticClass:"new-message-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("path",{attrs:{d:"M0.667 0v32l10.24-9.333h13.093c4.050 0 7.333-3.283 7.333-7.333v0-15.333h-30.667zM30 15.333c0 3.314-2.686 6-6 6v0h-13.587l-8.413 7.88v-27.88h28v14zM10 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2zM18 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2zM26 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2z"}})])])])]):"group-messages-screen"===e.openScreen||"group-members-screen"===e.openScreen?n("div",{staticClass:"group-messages-container"},[e.isNewMessageConfirmModalOpen?n("div",{staticClass:"modal-background"},[n("confirm-send-message-modal",{attrs:{"messages-amount":e.newMessageMessagesAmount,"recipients-receivable":e.selectedGroupMembers.usersReceivable,"recipients-not-receivable":e.selectedGroupMembers.usersNotReceivable,"recipients-without-consent":e.selectedGroupMembers.usersNotConsented,"recipients-without-phone":e.selectedGroupMembers.usersNoPhoneNumber,translations:e.translations},on:{"close-modal":e.closeNewMessageConfirmModal,"send-message":function(t){e.closeNewMessageConfirmModal(),e.sendMessageToExistingGroup(e.selectedGroup.id)}}})],1):e._e(),e._v(" "),e.isNewMessageErrorModalOpen?n("div",{staticClass:"modal-background"},[n("message-validation-errors-modal",{attrs:{errors:e.newMessageErrors,translations:e.translations,"on-close":e.closeNewMessageErrorModal}})],1):e._e(),e._v(" "),n("div",{staticClass:"header"},[n("div",{staticClass:"header-heading"},[n("svg",{staticClass:"header-icon left pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},on:{click:function(t){"group-members-screen"!==e.openScreen?e.handleCloseNewGroupMessageScreen():e.navigate("group-messages-screen")}}},[n("path",{attrs:{d:"M20.393 5.333l0.94 0.94-8.78 9.727 8.78 9.727-0.94 0.94-9.727-10.667 9.727-10.667z"}})]),e._v(" "),n("div",{staticClass:"pointer",on:{click:function(t){return e.navigate("group-members-screen")}}},[n("h3",{class:["group-members-screen"!==e.openScreen&&"text-underline","header-title"]},[e._v("\n            "+e._s(e.selectedGroup.name)+"\n          ")]),e._v(" "),"group-members-screen"!==e.openScreen?n("p",{staticClass:"header-tagline"},[n("span",{staticClass:"number-text"},[e._v(e._s(e.selectedGroupMembers.users.length))]),e._v(" "+e._s(e.translations.groupMessagesScreen.members)+"\n          ")]):e._e()])])]),e._v(" "),e.isConfirmBackModalOpen?n("div",{staticClass:"modal-background"},[n("confirm-back-modal",{attrs:{"on-close":e.closeConfirmBackModal,"on-confirm":e.closeNewGroupMessageScreen,translations:e.translations}})],1):e._e(),e._v(" "),"group-messages-screen"===e.openScreen?n("group-messages-screen",{attrs:{"sorted-selected-group-messages":e.sortedSelectedGroupMessages,"new-message":e.newMessage,"new-message-length-description":e.newMessageLengthDescription,"new-message-messages-amount":e.newMessageMessagesAmount,"characters-in-current-message":e.charactersInCurrentMessage,"is-new-message-loading":e.isNewMessageLoading,"handle-new-message-change":e.handleNewMessageChange,"attempt-send-message-to-existing-group":e.attemptSendMessageToExistingGroup,"handle-open-message-recipients-screen":e.handleOpenMessageRecipientsScreen,translations:e.translations,"is-valid-gsm-message":e.isValidGsmMessage,"selected-group":e.selectedGroup}}):e._e(),e._v(" "),"group-members-screen"===e.openScreen?n("group-members-screen",{attrs:{members:e.selectedGroup.members,classes:this.classes,users:this.users,"selected-group-members-filtered":e.selectedGroupMembersFiltered,"selected-group-members-where-consentable":e.selectedGroupMembersWhereConsentable,selected:e.selected,"recipient-search":e.recipientSearch,"clear-recipient-search":e.clearRecipientSearch,"set-recipient-search":e.setRecipientSearch,"g
1ive-consent":e.giveConsent,translations:e.translations}}):e._e()],1):"message-recipients-screen"===e.openScreen?n("message-recipients-screen",{attrs:{"recipient-search":e.recipientSearch,"clear-recipient-search":e.clearRecipientSearch,"set-recipient-search":e.setRecipientSearch,"selected-message-statuses":e.selectedMessageStatuses,"selected-message-status-filters":e.selectedMessageStatusFilters,"selected-message-recipients-length":e.selectedMessageRecipientsLength,selected:e.selected,"selected-message-recipients-filtered":e.selectedMessageRecipientsFiltered,"add-status-filter":e.addStatusFilter,"remove-status-filter":e.removeStatusFilter,navigate:e.navigate,translations:e.translations,"keyed-classes":this.classes}}):"new-group-message-screen"===e.openScreen?n("new-group-message-screen",{attrs:{"is-new-message-confirm-modal-open":e.isNewMessageConfirmModalOpen,"is-new-message-error-modal-open":e.isNewMessageErrorModalOpen,"new-message-messages-amount":e.newMessageMessagesAmount,"is-new-message-loading":e.isNewMessageLoading,"selected-recipients":e.selectedRecipients,"un-select-recipient":e.unSelectRecipient,"un-select-all-group-type":e.unSelectAllGroupType,"un-select-all-group-type-by-class":e.unSelectAllGroupTypeByClass,"new-message":e.newMessage,"on-message-change":e.handleNewMessageChange,"new-message-length-description":e.newMessageLengthDescription,"characters-in-current-message":e.charactersInCurrentMessage,selected:e.selected,"any-selected-recipients":e.anySelectedRecipients,"new-message-errors":e.newMessageErrors,"selected-recipients-receivable":e.selectedRecipientsReceivable,"selected-recipients-without-consent":e.selectedRecipientsWithoutConsent,"selected-recipients-without-phone":e.selectedRecipientsWithoutPhone,"selected-recipients-not-receivable":e.selectedRecipientsNotReceivable,"close-new-message-confirm-modal":e.closeNewMessageConfirmModal,"is-valid-gsm-message":e.isValidGsmMessage,"handle-send-message":e.handleSendMessage,"new-message-group-name":e.newMessageGroupName,translations:e.translations,"is-confirm-back-modal-open":e.isConfirmBackModalOpen,"close-confirm-back-modal":e.closeConfirmBackModal,"confirm-go-back":e.closeNewGroupMessageScreen,"is-removed-selected-recipients-not-empty":e.isRemovedSelectedRecipientsNotEmpty,"undo-remove-selected-recipients":e.undoRemoveSelectedRecipients,"handle-message-group-name-change":function(t){return e.handleNewMessageGroupNameChange(t)},"attempt-send-message":e.attemptSendMessage},on:{"handle-message-change":function(t){return e.handleNewMessageChange(t)},"unselect-recipient":function(t){return e.selectRecipient(t)},"unselect-all-recipients":e.removeSelectedRecipients,"open-select-recipients-screen":function(t){return e.navigate("select-recipients-screen")},"handle-close":e.handleCloseNewGroupMessageScreen,"close-new-message-error-modal":e.closeNewMessageErrorModal}}):"select-recipients-screen"===e.openScreen?n("select-recipients-screen",{attrs:{"select-recipients-mode":e.selectRecipientsMode,selected:e.selected,"selected-recipients":e.selectedRecipients,teachers:e.teachers,"recipient-search":e.recipientSearch,"filtered-recipients":e.filteredRecipients,"set-recipient-search":e.setRecipientSearch,"clear-recipient-search":e.clearRecipientSearch,"set-recipients-Search":e.setRecipientSearch,"un-select-recipient":e.unSelectRecipient,"remove-selected-recipients":e.removeSelectedRecipients,"give-consent-users":e.giveConsentUsers,"filtered-teachers":e.filteredTeachers,"filtered-tutors":e.filteredTutors,"filtered-students":e.filteredStudents,"filtered-contact-persons":e.filteredContactPersons,"filtered-inspectors":e.filteredInspectors,"give-consent":e.giveConsent,"is-removed-selected-recipients-not-empty":e.isRemovedSelectedRecipientsNotEmpty,"any-selected-recipients":e.anySelectedRecipients,"class-search":e.classSearch,"clear-class-search":e.clearClassSearch,"set-slass-search":e.setClassSearch,"filtered-classes":e.filteredClasses,"keyed-classes":e.classes,"select-all-group-type-by-class":e.selectAllGroupTypeByClass,"un-select-all-group-type-by-class":e.unSelectAllGroupTypeByClass,"un-select-all-group-type":e.unSelectAllGroupType,"set-class-search":e.setClassSearch,translations:e.translations,"undo-remove-selected-recipients":e.undoRemoveSelectedRecipients},on:{"select-recipients-by-people":e.selectRecipientsByPeople,"select-recipients-by-group":e.selectRecipientsByGroup,"select-all-group-type":function(t){return e.selectAllGroupType(t)},"un-select-all-group-type":function(t){return e.unSelectAllGroupType(t)},"select-recipient":function(t){return e.selectRecipient(t)},"close-select-recipients-screen":function(t){return e.navigate("new-group-message-screen")}
1}}):"new-group-message-success-screen"===e.openScreen?n("message-success-screen",{attrs:{translations:e.translations},on:{"open-groups-overview-screen":function(t){return e.navigate("groups-overview-screen")}}}):e._e(),e._v(" "),n("widget-footer")],1)}),[],!1,null,"a99acef2",null);t.a=Ue.exports},813:function(e,t,n){"use strict";var i={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,group:String,userProfile:{type:String,default:"employee"},institutionFilter:Array,full:Boolean},data:function(){return{fullSize:this.full,aulaToken:null,user:{},errors:[],weekPlanInfo:{},monthNames:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],shortMonthNames:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],dayNames:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],selectedGroup:"",fetchingData:!1,selectedWeekNr:"",selectedChild:"",notificationListIsVisible:!1,baseApiAddress:"https://api.easyiqcloud.dk/api/aula/",planSort:function(e,t){return e.title>t.title?1:-1},countEvents:function(e){return this.weekPlanInfo.Events.filter((function(t){return t.itemType==e})).length},ssoLinkUrlParams:function(e){try{var t="?token="+this.aulaToken;return t+="&userProfile="+this.userProfile,t+="&institutionFilter="+this.institutionFilter.join(","),t+="&ssoLink="+decodeURIComponent(e),t+="&selectedChild=".concat(this.displaySelectedChild)}catch(e){return""}},eventsByType:function(e){if(2===e){var t=new Array,n=this.weekPlanInfo.Events.filter((function(e){return 4==e.itemType})),i=this.weekPlanInfo.Events.filter((function(e){return 1==e.itemType})),s=this.weekPlanInfo.Events.filter((function(e){return 2==e.itemType}));if(s.length>0)for(var a in s)t.push(s[a]);if(n.length>0)for(var a in n)t.push(n[a]);if(i.length>0)for(var a in i)t.push(i[a]);return t}t=new Array;return this.weekPlanInfo.Events.filter((function(t){return t.itemType==e}))},eventsByDateAndType:function(e,t){if(2===t){var n=new Array,i=this.weekPlanInfo.Events.filter((function(t){return 4==t.itemType&&new Date(t.start).getDay()==e})),s=this.weekPlanInfo.Events.filter((function(t){return 1==t.itemType&&new Date(t.start).getDay()==e})),a=this.weekPlanInfo.Events.filter((function(t){return 3==t.itemType&&new Date(t.start).getDay()==e})),r=this.weekPlanInfo.Events.filter((function(t){return 2==t.itemType&&new Date(t.start).getDay()==e}));if(r.length>0)for(var o in r)n.push(r[o]);if(i.length>0)for(var o in i)n.push(i[o]);if(s.length>0)for(var o in s)n.push(s[o]);if(a.length>0)for(var o in a)n.push(a[o]);return n}n=new Array;return this.weekPlanInfo.Events.filter((function(n){return n.itemType==t&&new Date(n.start).getDay()==e}))},dateToFormat:function(e){var t=e.getDate();return this.dayNames[e.getDay()]+" "+t+". "+this.shortMonthNames[e.getMonth()]},dateToTimeFormat:function(e){var t=new Date(e),n=t.getHours(),i=t.getMinutes();return(n<10?"0"+n:n)+":"+(i<10?"0"+i:i)},addDay:function(e,t){var n=new Date(e);return n.setDate(n.getDate()+t),n},dateOnlyCompare:function(e,t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),i=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n>i?1:n<i?-1:0},getWeekDaysClasses:function(){return new Array},getResponsiveEventClasses:function(){var e=new Array;return"narrow"!=this.placement&&e.push("d-lg-block d-xl-none"),e},getPlanCssClasses2:function(e,t){var n=new Array;n.push("wp-day-plancontainer2");var i=new Date(this.weekPlanInfo.fromDate),s=new Date(this.weekPlanInfo.toDate),a=new Date(e.start),r=new Date(e.end);return this.dateOnlyCompare(a,i)>=0&&n.push("wp-day-plancontainer-showstart"),this.dateOnlyCompare(r,s)<0&&n.push("wp-day-plancontainer-showend"),"employee"!=this.userProfile.toLowerCase()||6==e.itemType||e.canEdit||n.push("wp-day-plan-notowner"),n},getPlanStyles2:function(e,t){var n=new Date(this.weekPlanInfo.fromDate),i=new Date(this.weekPlanInfo.toDate),s=new Date(e.start),a=new Date(e.end),r=0,o=5;return this.dateOnlyCompare(s,n)>=0&&(r=s.getDay()-1),this.dateOnlyCompare(a,i)<0&&(o=a.getDay()),{"margin-left":20*r+"%",width:20*(o-r)+"%","--plancolor":this.setOpacity(e.color,.5),"--plancolor2":this.setOpacity(e.color,.25),"--plancolor3":this.setOpacity(e.color,.3)}},getEventStyles:function(e){if(null!=e.color&&""!=e.color)return{"--eventcolor":this.setOpacity(e.color,.5)}}
1,getBackgroundImage:function(e){var t;return t=e.icon.startsWith("~")?this.baseSchoolPortalUrl+e.icon.replace("~","").replaceAll("\\","/"):e.icon,{"background-image":"url(".concat(t,")")}},getNotificationStyle:function(e){return{"background-color":e.viewed?"#FFF":"aliceblue","font-size":"0.8em",margin:"1px 0",padding:"2px"}},getNotificationAgeText:function(e){var t=1440,n=10080,i=Math.round((new Date-new Date(e.timestamp)).valueOf()/6e4);if(i<3)return"Lige nu";if(i>=60&&i<t){var s=Math.round(i/60);return s+(s>1?" timer":" time")}if(i>=t&&i<n){var a=Math.round(i/t);return a+(a>1?" dage":" dag")}if(i>=n){var r=Math.round(i/n);return r+(r>1?" uger":" uge")}return i+" minutter"},getNotificationHeaderStyle:function(){return{"background-color":"transparent","font-size":"1em",padding:"5px 10px",color:"#12798c"}},getNotificationTopHeaderStyle:function(){return{"background-color":"#FFF","font-size":"1em",padding:"5px 10px",color:"#12798c"}},getNotificationContentStyle:function(){return{"background-color":"#EEE",padding:"2px"}},getNewNotifications:function(){if(this.hasNotifications){var e=new Date;return this.weekPlanInfo.notifications.notificationlist.filter((function(t){return(e-new Date(t.timestamp)).valueOf()<36e5}))}return null},getOldNotifications:function(){if(this.hasNotifications){var e=new Date;return this.weekPlanInfo.notifications.notificationlist.filter((function(t){return(e-new Date(t.timestamp)).valueOf()>36e5}))}return null},rgbToHex:function(e){var t=e.indexOf(",")>-1?",":" ",n=(+(e=e.substr(4).split(")")[0].split(t))[0]).toString(16),i=(+e[1]).toString(16),s=(+e[2]).toString(16);return 1==n.length&&(n="0"+n),1==i.length&&(i="0"+i),1==s.length&&(s="0"+s),"#"+n+i+s},setOpacity:function(e,t){return-1!=e.indexOf("rgb")&&(e=this.rgbToHex(e)),e+Math.floor(255*t).toString(16)},shadeBlendConvert:function(e,t,n){if("number"!=typeof e||e<-1||e>1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||n&&"string"!=typeof n)return null;this.sbcRip||(this.sbcRip=function(e){var t=e.length,n={};if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=i(e[0].split("(")[1]),n[1]=i(e[1]),n[2]=i(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=i(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=-1,9!=t&&5!=t||(n[3]=s(n[2]/255*1e4)/1e4,n[2]=n[1],n[1]=n[0],n[0]=e>>24&255)}return n});var i=parseInt,s=Math.round,a=t.length>9,r=(a="string"==typeof n?n.length>9||"c"==n&&!a:a,e<0),o=(e=r?-1*e:e,n=n&&"c"!=n?n:r?"#000000":"#FFFFFF",this.sbcRip(t)),l=this.sbcRip(n);return o&&l?a?"rgb"+(o[3]>-1||l[3]>-1?"a(":"(")+s((l[0]-o[0])*e+o[0])+","+s((l[1]-o[1])*e+o[1])+","+s((l[2]-o[2])*e+o[2])+(o[3]<0&&l[3]<0?")":","+(o[3]>-1&&l[3]>-1?s(1e4*((l[3]-o[3])*e+o[3]))/1e4:l[3]<0?o[3]:l[3])+")"):"#"+(4294967296+16777216*s((l[0]-o[0])*e+o[0])+65536*s((l[1]-o[1])*e+o[1])+256*s((l[2]-o[2])*e+o[2])+(o[3]>-1&&l[3]>-1?s(255*((l[3]-o[3])*e+o[3])):l[3]>-1?s(255*l[3]):o[3]>-1?s(255*o[3]):255)).toString(16).slice(1,o[3]>-1||l[3]>-1?void 0:-2):null},initWidget:function(){var e=this;this.fetchingData=!0,this.isLocalhost?(this.weekPlanInfo=window.input,this.fetchingData=!1):(this.axios.post(this.baseApiAddress+"weekplaninfo",this.aulaFilter,{headers:{Authorization:"bearer "+this.aulaToken,"x-aula-userprofile":this.userProfile,"x-aula-institutionfilter":this.institutionFilter,"Content-Type":"application/json"}}).then((function(t){e.fetchingData=!1,e.weekPlanInfo=t.data})),this.errors.push({message:"henter data2"}))},readNotifications:function(){var e=this;this.axios.post(this.baseApiAddress+"notifications/updateviewed",this.aulaFilter,{headers:{Authorization:"bearer "+this.aulaToken,"x-aula-userprofile":this.userProfile,"x-aula-institutionfilter":this.institutionFilter,"Content-Type":"application/json"}}).then((function(t){if(null!=e.weekPlanInfo&&null!=e.weekPlanInfo.notifications&&null!=e.weekPlanInfo.notifications.notificationlist&&e.weekPlanInfo.notifications.notificationlist.length>0){for(var n=0;n<e.weekPlanInfo.notifications.notificationlist.length;n++)e.weekPlanInfo.notifications.notificationlist[n]&&(e.weekPlanInfo.notifications.notificationlist[n].read=!0);e.$emit("updateUnread",e.notViewedNotifications)}}))},listNotifications:function(){var e=this;null!=this.weekPlanInfo&&this.axios.post(this.baseApiAddress+"notifications/list",this.aulaFilter,{headers:{Authorization:"bearer "+this.aulaToken,"x-aula-userprofile":this.userProfile,"x-aula-institutionfilter":this.institutionFilter,"Content-Type":"application/json"}}).then((function(t){e.weekPlanInfo.notifications=t.data,e.$emit("updateUnread",e.notViewedNotifications)}))},showMoreId:function(e){return"input-".concat(e)},imgClose:function(){this.$el.getElementById("imgDialog").close(),this.$el.getElementById("imgView").src=""},videoClose:function(){this.$el.getElementById("videoDialog").close(),this.$el.getElementById("videoView").src=""}
1,audioClose:function(){this.$el.getElementById("audioDialog").close(),this.$el.getElementById("audioView").src=""}}},computed:{aulaFilter:function(){return{sessionId:this.sessionUUID,group:""!=this.selectedGroup?this.selectedGroup:this.group,currentWeekNr:""!=this.selectedWeekNr?this.selectedWeekNr:this.currentWeekNumber,userProfile:this.userProfile,institutionFilter:this.institutionFilter,childFilter:""!=this.selectedChild?[this.selectedChild.trim()]:this.childFilter}},selectedGroupName:function(){var e=this;return this.group&&null!=this.weekPlanInfo.groups?this.weekPlanInfo.groups.filter((function(t){return t.GroupId==e.group})).Name:""},displaySelectedChild:function(){return""!=this.selectedChild?this.selectedChild.trim():this.childFilter[0]},isLocalhost:function(){return-1!=window.location.href.indexOf("localhost")},isWidgetTest:function(){if(window.origin){if(window.origin.includes("widget-test"))return!0}else{if(!window.location.origin)return!1;if(window.location.origin.includes("widget-test"))return!0}},baseSchoolPortalUrl:function(){try{return this.isWidgetTest?"Https://skoleportal-udv.easyiqcloud.dk/":"Https://skoleportal.easyiqcloud.dk/"}catch(e){return"Https://skoleportal.easyiqcloud.dk/"}},notViewedNotifications:function(){return!this.fetchingData&&null!=this.weekPlanInfo&&null!=this.weekPlanInfo.notifications&&null!=this.weekPlanInfo.notifications.notificationlist&&this.weekPlanInfo.notifications.notificationlist.length>0?this.weekPlanInfo.notifications.notificationlist.filter((function(e){return 0==e.viewed})).length:0},hasNotifications:function(){return!this.fetchingData&&null!=this.weekPlanInfo&&null!=this.weekPlanInfo.notifications&&null!=this.weekPlanInfo.notifications.notificationlist&&this.weekPlanInfo.notifications.notificationlist.length>0},hasNewNotifications:function(){if(this.hasNotifications){var e=this.getNewNotifications();return null!=e&&e.length>0}},hasOldNotifications:function(){if(this.hasNotifications){var e=this.getOldNotifications();return null!=e&&e.length>0}},plansIsVisible:function(){return"narrow"==this.placement?this.weekPlanInfo.weekplanconfiguration.narrowview_showplans:this.weekPlanInfo.weekplanconfiguration.showplans},weekPlanItemsVisible:function(){return this.weekPlanInfo.weekplanconfiguration.showweekplanitemplanner},useHtmlWidgets:function(){return!1}},watch:{aulaToken:function(){(this.isLocalhost||void 0!==this.aulaToken)&&this.initWidget()},selectedGroup:function(){this.initWidget()},aulaFilter:function(){this.aulaToken=this.isLocalhost?[]:this.getAulaToken()},weekPlanInfo:function(){0!=this.notViewedNotifications&&this.$emit("updateUnread",this.notViewedNotifications)}},created:function(){try{(this.isLocalhost||this.isWidgetTest)&&(this.baseApiAddress="https://test-api.easyiqcloud.dk/api/aula/")}catch(e){}this.aulaToken=this.isLocalhost?[]:this.getAulaToken(),window.addEventListener("resize",this.resize),this.resize()},destroyed:function(){window.removeEventListener("resize",this.resize)},methods:{resize:function(){this.full="narrow"!=this.placement&&window.innerWidth>1024,this.$emit("update:full","narrow"!=this.placement&&window.innerWidth>1024)}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{attrs:{"data-widgetversion":"2.0.2"}},[n("dialog",{attrs:{id:"imgDialog"}},[n("img",{attrs:{id:"imgView",src:""},on:{click:function(t){return e.imgClose()}}}),e._v(" "),n("button",{staticClass:"closebutton",on:{click:function(t){return e.imgClose()}}},[e._v("Luk")])]),e._v(" "),n("dialog",{attrs:{id:"videoDialog"}},[n("video",{attrs:{id:"videoView",src:"",controls:"",disablepictureinpicture:""},on:{click:function(t){return e.videoClose()}}}),e._v(" "),n("button",{staticClass:"closebutton",on:{click:function(t){return e.videoClose()}}},[e._v("Luk")])]),e._v(" "),n("dialog",{attrs:{id:"audioDialog"}},[n("audio",{attrs:{id:"audioView",src:"",controls:""},on:{click:function(t){return e.audioClose()}}}),e._v(" "),n("button",{staticClass:"closebutton",on:{click:function(t){return e.audioClose()}}},[e._v("Luk")])]),e._v(" "),n("div",{staticClass:"p-2 d-flex align-items-center easyiq-wp-widgetheader"},[n("div",[e._v("UGEPLAN "),null!=e.weekPlanInfo&&null!=e.weekPlanInfo.group?n("span",{staticClass:"pl-1"}
1,[e._v(e._s(e.weekPlanInfo.group.Name))]):e._e()]),e._v(" "),n("div",{staticClass:"pl-2"},[e.hasNotifications?n("div",{staticClass:"easyiq-wp-notificationbrand"},[n("b-button",{ref:"button",attrs:{variant:"outlined",id:"btnNotification"}},[n("b-img",{attrs:{id:"imgNotification",src:e.baseSchoolPortalUrl+"/Images/24/notification.png"},on:{click:function(t){return e.readNotifications()}}})],1),e._v(" "),e.notViewedNotifications>0?n("b-badge",{staticClass:"easyiq-wp-notificationbadge",attrs:{variant:"danger"}},[e._v("\n            "+e._s(e.notViewedNotifications)+"\n          ")]):e._e(),e._v(" "),e.hasNotifications?n("b-popover",{attrs:{target:"btnNotification",placement:"bottomright",triggers:"focus"}},[n("div",{staticClass:"container",style:e.getNotificationContentStyle()},[n("div",{staticClass:"row"},[n("div",{staticClass:"col no-gutter"},[n("div",{style:e.getNotificationTopHeaderStyle()},[n("strong",[e._v("Notifikationer")])])])]),e._v(" "),e.hasNewNotifications?n("div",{staticClass:"row",style:e.getNotificationHeaderStyle()},[n("div",{staticClass:"col"},[e._v("\n                  Nye\n                ")])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},e._l(e.getNewNotifications(),(function(t){return n("div",[1==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("p",[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har oprettet et "),n("strong",[e._v("overblik")]),e._v(" til "),n("strong",[e._v(e._s(t.target.fullname))]),e._v(".")])]),n("br")],1)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("img",{staticStyle:{display:"inline-block"},attrs:{src:e.baseSchoolPortalUrl+"/Images/16/clock.png",id:"notificationhistory"}}),e._v(" "),n("i",{staticClass:"far fa-history"}),e._v(" "),n("p",{staticStyle:{margin:"0",display:"inline"}},[e._v(" "+e._s(e.getNotificationAgeText(t)))])])])])]):e._e(),e._v(" "),6==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("p",{staticStyle:{margin:"0"}},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har kommenteret "),n("strong",[e._v(e._s(t.target.fullname))]),e._v("'s "),n("strong",[e._v("elevplan")]),e._v(".")])])],1)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("img",{staticStyle:{display:"inline-block"},attrs:{src:e.baseSchoolPortalUrl+"/Images/16/clock.png",id:"notificationhistory"}}),e._v(" "),n("p",{staticStyle:{margin:"0",display:"inline"}},[e._v(" "+e._s(e.getNotificationAgeText(t)))])])])])]):2==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har oprettet en "),n("strong",[e._v("ugeplan")]),e._v(" for uge "+e._s(t.data[1])+" til "),n("strong",[e._v(e._s(t.target.fullname))]),e._v(".\n                          ")])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col text-left"},[n("p",{staticStyle:{margin:"0",display:"inline"}},[n("i",{staticClass:"far fa-history"}),e._v(" "+e._s(e.getNotificationAgeText(t)))])]),e._v(" "),n("div",{staticClass:"col text-right"},[n("div",{attrs:{role:"link"},on:{click:function(n){e.selectedWeekNr=t.data[0]+"-W"+t.data[1]}}},[e._v("GÃ¥ til uge "+e._s(t.data[1]))])])])])]):e._e()])})),0)]),e._v(" "),e.hasNewNotifications&&e.hasOldNotifications?n("div",{staticClass:"row",style:e.getNotificationHeaderStyle()},[n("div",{staticClass:"col"},[e._v("\n                  Tidligere\n                ")])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},e._l(e.getOldNotifications(),(function(t){return n("div",[1==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har oprettet et "),n("strong",[e._v("overblik")]),e._v(" til "+e._s(t.target.fullname)+".\n                            ")])],1)])])]):e._e(
1),e._v(" "),2==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har oprettet en "),n("strong",[e._v("ugeplan")]),e._v(" for uge "+e._s(t.data[1])+" til "),n("strong",[e._v(e._s(t.target.fullname))]),e._v(".\n\n                          ")])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col text-left"},[n("p",{staticStyle:{margin:"0",display:"inline"}},[n("i",{staticClass:"far fa-history"}),e._v(" "+e._s(e.getNotificationAgeText(t)))])]),e._v(" "),n("div",{staticClass:"col text-right"},[n("div",{attrs:{role:"link"},on:{click:function(n){e.selectedWeekNr=t.data[0]+"-W"+t.data[1]}}},[e._v("GÃ¥ til uge "+e._s(t.data[1]))])])])])]):e._e(),e._v(" "),3==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("p",{staticStyle:{margin:"0"}},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har kommenteret en "),n("strong",[e._v("elevplan")]),e._v(".")])])],1)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("img",{staticStyle:{display:"inline-block"},attrs:{src:e.baseSchoolPortalUrl+"/Images/16/clock.png",id:"notificationhistory"}}),e._v(" "),n("p",{staticStyle:{margin:"0",display:"inline"}},[e._v(" "+e._s(e.getNotificationAgeText(t)))])])])])]):e._e(),e._v(" "),6==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("p",{staticStyle:{margin:"0"}},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har kommenteret "),n("strong",[e._v(e._s(t.target.fullname))]),e._v("'s "),n("strong",[e._v("elevplan")]),e._v(".")])])],1)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("img",{staticStyle:{display:"inline-block"},attrs:{src:e.baseSchoolPortalUrl+"/Images/16/clock.png",id:"notificationhistory"}}),e._v(" "),n("p",{staticStyle:{margin:"0",display:"inline"}},[e._v(" "+e._s(e.getNotificationAgeText(t)))])])])])]):e._e()])})),0)])])]):e._e()],1):e._e()]),e._v(" "),n("div",{staticClass:"ml-auto easyiq-wp-classesDropdown"},[null!=e.weekPlanInfo.groups&&"employee"==e.userProfile.toLowerCase()?n("b-dropdown",{attrs:{text:"Klasser",right:"","toggle-class":"p-1 m-0 ",size:"sm",variant:"outline"}},e._l(e.weekPlanInfo.groups,(function(t){return n("b-dropdown-item",{key:t.Name,attrs:{value:t.GroupId,active:t.GroupId==t},on:{click:function(n){e.selectedGroup=t.GroupId}}},[e._v(e._s(t.Name))])})),1):e._e(),e._v(" "),"parent"==e.userProfile.toLowerCase()||"guardian"==e.userProfile.toLowerCase()?n("b-dropdown",{attrs:{text:"Barn","toggle-class":"p-1 m-0",size:"sm",variant:"outline",right:""}},e._l(e.childFilter,(function(t){return n("b-dropdown-item",{key:t,attrs:{value:t},on:{click:function(n){e.selectedChild=t}}},[e._v(e._s(t))])})),1):e._e()],1)]),e._v(" "),n("div",{staticClass:"easyiq-wp-widgetsubheader easyiq-wp-classesDropdown"},["narrow"!=e.placement?n("div",[e._l(e.weekPlanInfo.links,(function(t){return null!=e.weekPlanInfo.links?[t.ssoenable?n("b-link",{staticClass:"p-2 widget-toplink",attrs:{href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(t.address),target:"_blank"}},[e._v(e._s(t.name))]):n("b-link",{staticClass:"p-2 widget-toplink",attrs:{href:t.address,target:"_blank"}},[e._v(e._s(t.name))])]:e._e()}))],2):n("div",[null!=e.weekPlanInfo.links?n("b-dropdown",{attrs:{text:"Links","toggle-class":"p-1 m-0 ",size:"sm",variant:"outline"}},[e._l(e.weekPlanInfo.links,(function(t){return null!=e.weekPlanInfo.links?[t.ssoenable?n("b-dropdown-item",{staticClass:"p-2 widget-toplink",attrs:{href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(t.address),target:"_blank"}},[e._v(e._s(t.name))]):n("b-dropdown-item",{staticClass:"p-2 widget-toplink",attrs:{href:t.address,target:"_blank"}},[e._v(e._s(t.name))])]:e._e()}))],2):e._e()],1)])]),e._v(" "),null!=e.weekPlanInfo.ErrorCode?n("div",[n("b-alert",{attrs:{show:"",variant:"warning"}}
1,[e._v(e._s(e.weekPlanInfo.ErrorDescription))])],1):n("div",[e.fetchingData?n("div",{staticClass:"lds-css",staticStyle:{"align-content":"center",height:"5em",width:"5em"}},[e._m(0)]):e._e(),e._v(" "),e.fetchingData?e._e():n("div",[n("div",{staticClass:"easyiq-wp-weekinfocontainer"},[n("div",{staticClass:"easyiq-wp-weekinfocontaineruser"},["guardian"==e.userProfile.toLowerCase()?n("span",[e._v(e._s(e.displaySelectedChild))]):e._e()]),e._v(" "),n("div",{staticClass:"easyiq-wp-weekinfocontainerlinks"},[n("div",{staticClass:"easyiq-wp-todayweekcontainer"},[n("div",{attrs:{role:"link"},on:{click:function(t){e.selectedWeekNr=e.weekPlanInfo.weekinfo.todaysweeknr}}},[e._v("I dag")])]),e._v(" "),n("div",[n("div",{attrs:{role:"link"},on:{click:function(t){e.selectedWeekNr=e.weekPlanInfo.weekinfo.prevweeknr}}},[n("i",{staticClass:"fal fa-chevron-circle-left easyiq-wp-arrowcirle"})])]),e._v(" "),n("div",{staticClass:"easyiq-wp-currentweekcontainer"},[null!=e.weekPlanInfo.weekinfo?n("span",[e._v(e._s(e.weekPlanInfo.weekinfo.currentweeknr))]):e._e()]),e._v(" "),n("div",[n("div",{attrs:{role:"link"},on:{click:function(t){e.selectedWeekNr=e.weekPlanInfo.weekinfo.nextweeknr}}},[n("i",{staticClass:"fal fa-chevron-circle-right easyiq-wp-arrowcirle"})])])])]),e._v(" "),this.full?n("div",[null!=e.weekPlanInfo.WeekPlan&&null!=e.weekPlanInfo.WeekPlan.Text?n("div",{staticClass:"EasyIQCard"},[n("div",{staticClass:"EasyIQCardHeader"},[e._v("\n            Beskrivelse\n          ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody"},[n("widget-html",{attrs:{html:e.weekPlanInfo.WeekPlan.Text}})],1)]):e._e(),e._v(" "),e._l(e.weekPlanInfo.otherweekplans,(function(t){return null!=e.weekPlanInfo.otherweekplans&&e.weekPlanInfo.otherweekplans.length?n("div",{staticClass:"EasyIQCard"},[n("div",{staticClass:"EasyIQCardHeader"},[n("widget-html",{attrs:{html:t.ActivityName}})],1),e._v(" "),n("div",{staticClass:"EasyIQCardBody"},[n("widget-html",{staticClass:"p-1",attrs:{html:t.Text}})],1)]):e._e()})),e._v(" "),e.eventsByType(6).length?n("div",{staticClass:"EasyIQCard wp-weekcontainer mt-3",attrs:{"data-wptype":"6"}},[n("div",{staticClass:"EasyIQCardHeader"},[n("div",{staticClass:"EasyIQCardHeaderExtra mb-4"},[n("div",{staticClass:"wp-weekdays"},e._l(5,(function(t){return n("div",{attrs:{"data-dayofweek":t-1}},[e._v("\n                  "+e._s(e.dateToFormat(e.addDay(e.weekPlanInfo.fromDate,t-1)))+"\n                ")])})),0)]),e._v("\n            Ferier og begivenheder\n          ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody"},[n("div",{attrs:{"data-wpplans":""}},e._l(e.eventsByType(6).sort(this.planSort),(function(t,i){return n("div",{class:e.getPlanCssClasses2(t),style:e.getPlanStyles2(t)},[n("div",{staticClass:"wp-day-planbackground"}),e._v(" "),n("div",{staticClass:"wp-day-plancontainer",attrs:{"data-plan":""}},[n("div",{staticClass:"PlanIcon2"},[n("div",{staticClass:"Icon48"}),e._v(" "),n("div",{staticClass:"Icon48",style:e.getBackgroundImage(t)})]),e._v(" "),n("div",{staticClass:"CutText",staticStyle:{padding:"0 1rem"}},[e._v("\n                    "+e._s(t.title)+"\n                  ")])])])})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"EasyIQCard wp-weekcontainer mt-3",attrs:{"data-flatbottom":"","data-wptype":"8"}},[n("div",{staticClass:"EasyIQCardHeader"},[n("div",{staticClass:"EasyIQCardHeaderExtra mb-4"},[n("div",{staticClass:"wp-weekdays"},e._l(5,(function(t){return n("div",{attrs:{"data-dayofweek":t-1}},[e._v("\n                  "+e._s(e.dateToFormat(e.addDay(e.weekPlanInfo.fromDate,t-1)))+"\n                ")])})),0)]),e._v("\n            Vigtig information\n          ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody FlexOnly wp-eventContainer"},e._l(5,(function(t){return n("div",{attrs:{"data-dayofweek":t-1}},[n("div",{attrs:{"data-dayheader":""}}),e._v(" "),n("div",{attrs:{"data-events":""}},e._l(e.eventsByDateAndType(t,8),(function(t){return n("div",{staticClass:"wp-dayassignmentevent",style:e.getEventStyles(t),attrs:{"data-itemeventype":"8"}},[n("div",{attrs:{"data-text":""}},[n("div",{staticClass:"wp-dayassignmentevent-header"},[n("div",{staticClass:"Flex"},[n("div",{staticClass:"Flex11",attrs:{title:""}},[e._v(e._s(t.courses))]),e._v(" "),n("div",{staticClass:"Flex11 FlexChildRight",staticStyle:{"text-align":"right"},attrs:{title:t.activities}},[e._v(e._s(t.activities))])])]),e._v(" "),n("div",{staticClass:"wp-day-plan-title"},[n("input",{staticClass:"showmore",attrs:{id:e.showMoreId(t.itemid),type:"checkbox"}}),e._v(" "),n("label",{staticClass:"showmorecontent",attrs:{for:e.showMoreId(t.itemid)}},[n("widget-html",{attrs:{html:t.description}})],1),e._v(" "),n("span",{staticClass:"showmorecontrols"})])])])})),0)])})),0)]),e._v(" "),n("div",{staticClass:"EasyIQCard wp-weekcontainer",attrs:{"data-flattop":"","data-flatbottom":"","data-wptype":"9"}},[n("div",{staticClass:"EasyIQCardHeader"},[e._v("\n            Ugeplan\n          ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody FlexOnly wp-eventContainer"},e._l(5,(function(t){return n("div",{attrs:{"data-dayofweek":t-1}},[n("div",{attrs:{"data-dayheader":""}}),e._v(" "),n("div",{attrs:{"data-events":""}},e._l(e.eventsByDateAndType(t,9),(function(t){return n("div",{staticClass:"wp-dayassignmentevent",style:e.getEventStyles(t),attrs:{"data-itemeventype":"9"}},[n("div",{attrs:{"data-text":""}},[n("div",{staticClass:"wp-dayassignmentevent-header"},[n("div",{staticClass:"Flex"},[n("div",{staticClass:"Flex11",attrs:{title:""}},[e._v(e._s(t.courses))]),e._v(" "),n("div",{staticClass:"Flex11 FlexChildRight",staticStyle:{"text-align":"right"},attrs:{title:t.activities}},[e._v(e._s(t.activities))])])]),e._v(" "),n("div",{staticClass:"timeinfo"},[n("img",{staticClass:"Icon24 mr-1",attrs:{src:e.baseSchoolPortalUrl+"Images/svg/clock.svg"}}),e._v(" "),n("div",[e._v(e._s(e.dateToTimeFormat(t.start)))]),e._v("\n                       - \n                      "),n("div",[e._v(e._s(e.dateToTimeFormat(t.end)))])]),e._v(" "),n("div",{staticClass:"wp-day-plan-title"},[n("input",{staticClass:"showmore",attrs:{id:e.showMoreId(t.itemid),type:"checkbox"}}),e._v(" "),n("label",{staticClass:"showmorecontent",attrs:{for:e.showMoreId(t.itemid)}},[n("widget-html",{attrs:{html:t.description}})],1),e._v(" "),n("span",{staticClass:"showmorecontrols"})])])])})),0)])})),0)]),e._v(" "),n("div",{staticClass:"EasyIQCard wp-weekcontainer",attrs:{"data-flattop":"","data-wptype":"8"}},[n("div",{staticClass:"EasyIQCardHeader"},[e._v("\n            Forberedelse\n          ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody FlexOnly wp-eventContainer"},e._l(5,(function(t){return n("div",{attrs:{"data-dayofweek":t-1}},[n("div",{attrs:{"data-dayheader":""}}),e._v(" "),n("div",{attrs:{"data-events":""}}
1,[e._l(e.eventsByDateAndType(t,4),(function(t){return n("div",{staticClass:"wp-dayassignmentevent",style:e.getEventStyles(t),attrs:{"data-itemeventype":"4"}},[n("div",{attrs:{"data-text":""}},[n("div",{staticClass:"wp-dayassignmentevent-header"},[n("div",{staticClass:"Flex"},[n("div",{staticClass:"Flex11",attrs:{title:""}},[e._v(e._s(t.courses))]),e._v(" "),n("div",{staticClass:"Flex11 FlexChildRight",staticStyle:{"text-align":"right"},attrs:{title:t.activities}},[e._v(e._s(t.activities))])])]),e._v(" "),n("p",{staticClass:"wp-day-plan-title"},[n("input",{staticClass:"showmore",attrs:{id:e.showMoreId(t.itemid),type:"checkbox"}}),e._v(" "),n("label",{staticClass:"showmorecontent",attrs:{for:e.showMoreId(t.itemid)}},[n("widget-html",{attrs:{html:t.description}})],1),e._v(" "),n("span",{staticClass:"showmorecontrols"})])])])})),e._v(" "),e._l(e.eventsByDateAndType(t,1),(function(t){return n("div",{staticClass:"wp-dayassignmentevent",style:e.getEventStyles(t),attrs:{"data-itemeventype":"1"}},[n("div",{attrs:{"data-text":""}},[n("div",{staticClass:"wp-dayassignmentevent-header"},[n("div",{staticClass:"Flex"},[n("div",{staticClass:"Flex11",attrs:{title:""}},[e._v(e._s(t.courses))]),e._v(" "),n("div",{staticClass:"Flex11 FlexChildRight",staticStyle:{"text-align":"right"},attrs:{title:t.activities}},[e._v(e._s(t.activities))])])]),e._v(" "),n("p",{staticClass:"wp-day-plan-title",staticStyle:{"margin-top":"1rem"}},[null!=t&&""!=t.itemurl?n("a",{attrs:{href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(t.itemurl),target:"_blank"}},[n("widget-html",{attrs:{html:t.title}})],1):n("span",[n("widget-html",{attrs:{html:t.title}})],1)]),e._v(" "),n("div",{staticClass:"wp-dayassignmentevent-plantitles Flex"},[n("img",{staticClass:"wp-plan-icon",attrs:{src:e.baseSchoolPortalUrl+t.icon.replace("~","")}}),e._v("\n                      "+e._s(t.plans[0].title)+"\n                    ")])])])}))],2)])})),0)]),e._v(" "),e.plansIsVisible?n("div",{staticClass:"EasyIQCard wp-weekcontainer mt-3"},[n("div",{staticClass:"EasyIQCardHeader"},[n("div",{staticClass:"EasyIQCardHeaderExtra mb-4"},[n("div",{staticClass:"wp-weekdays"},e._l(5,(function(t){return n("div",{attrs:{"data-dayofweek":t-1}},[e._v("\n                  "+e._s(e.dateToFormat(e.addDay(e.weekPlanInfo.fromDate,t-1)))+"\n                ")])})),0)]),e._v("\n            Forløb\n          ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody"},[n("div",{attrs:{"data-wpplans":""}},e._l(e.eventsByType(5).sort(this.planSort),(function(t,i){return n("a",{class:e.getPlanCssClasses2(t),style:e.getPlanStyles2(t),attrs:{href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(t.itemurl),target:"_blank"}},[n("div",{staticClass:"wp-day-planbackground"}),e._v(" "),n("div",{staticClass:"wp-day-plancontainer",attrs:{"data-plan":""}},[n("div",{staticClass:"PlanIcon2"},[n("div",{staticClass:"Icon48"}),e._v(" "),n("div",{staticClass:"Icon48",style:e.getBackgroundImage(t)})]),e._v(" "),n("div",{staticClass:"CutText",staticStyle:{padding:"0 1rem"}},[e._v("\n                    "+e._s(t.title)+" ("+e._s(t.courses)+")\n                  ")])])])})),0)])]):e._e()],2):e._e(),e._v(" "),this.full?e._e():n("div",[null!=e.weekPlanInfo.WeekPlan&&null!=e.weekPlanInfo.WeekPlan.Text?n("div",{staticClass:"EasyIQCard"},[n("div",{staticClass:"EasyIQCardHeader"},[e._v("\n            Beskrivelse\n          ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody"},[n("widget-html",{staticClass:"p-1",attrs:{html:e.weekPlanInfo.WeekPlan.Text}})],1)]):e._e(),e._v(" "),e._l(e.weekPlanInfo.otherweekplans,(function(t){return null!=e.weekPlanInfo.otherweekplans&&e.weekPlanInfo.otherweekplans.length?n("div",{staticClass:"EasyIQCard"},[n("div",{staticClass:"EasyIQCardHeader"},[n("widget-html",{attrs:{html:t.ActivityName}})],1),e._v(" "),n("div",{staticClass:"EasyIQCardBody"},[n("widget-html",{staticClass:"p-1",attrs:{html:t.Text}})],1)]):e._e()})),e._v(" "),e._l(5,(function(t){return n("div",[n("div",{staticClass:"EasyIQCard mt-3"},[n("div",{staticClass:"EasyIQCardHeader"},[e._v("\n              "+e._s(e.dateToFormat(e.addDay(e.weekPlanInfo.fromDate,t-1)))+"\n            ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody"},[e.eventsByDateAndType(t,8).length?n("div",{staticClass:"narrowHeader"},[e._v("\n                Vigtig information\n              ")]):e._e(
1),e._v(" "),e.eventsByDateAndType(t,8).length?n("div",{staticClass:"eiqContent"},e._l(e.eventsByDateAndType(t,8),(function(t){return n("div",{staticClass:"wp-dayassignmentevent",style:e.getEventStyles(t),attrs:{"data-itemeventype":"8"}},[n("div",{attrs:{"data-text":""}},[n("div",{staticClass:"wp-dayassignmentevent-header"},[n("div",{staticClass:"Flex"},[n("div",{staticClass:"Flex11",attrs:{title:""}},[e._v(e._s(t.courses))]),e._v(" "),n("div",{staticClass:"Flex11 FlexChildRight",staticStyle:{"text-align":"right"},attrs:{title:t.activities}},[e._v(e._s(t.activities))])])]),e._v(" "),n("div",{staticClass:"wp-day-plan-title"},[n("input",{staticClass:"showmore",attrs:{id:e.showMoreId(t.itemid),type:"checkbox"}}),e._v(" "),n("label",{staticClass:"showmorecontent",attrs:{for:e.showMoreId(t.itemid)}},[n("widget-html",{attrs:{html:t.description}})],1),e._v(" "),n("span",{staticClass:"showmorecontrols"})])])])})),0):e._e(),e._v(" "),e.eventsByDateAndType(t,9).length?n("div",{staticClass:"narrowHeader"},[e._v("\n                Ugeplan\n              ")]):e._e(),e._v(" "),e.eventsByDateAndType(t,9).length?n("div",{staticClass:"eiqContent"},e._l(e.eventsByDateAndType(t,9),(function(t){return n("div",{staticClass:"wp-dayassignmentevent",style:e.getEventStyles(t),attrs:{"data-itemeventype":"9"}},[n("div",{attrs:{"data-text":""}},[n("div",{staticClass:"wp-dayassignmentevent-header"},[n("div",{staticClass:"Flex"},[n("div",{staticClass:"Flex11",attrs:{title:""}},[e._v(e._s(t.courses))]),e._v(" "),n("div",{staticClass:"Flex11 FlexChildRight",staticStyle:{"text-align":"right"},attrs:{title:t.activities}},[e._v(e._s(t.activities))])])]),e._v(" "),n("div",{staticClass:"timeinfo"},[n("img",{staticClass:"Icon24 mr-1",attrs:{src:e.baseSchoolPortalUrl+"Images/svg/clock.svg"}}),e._v(" "),n("div",[e._v(e._s(e.dateToTimeFormat(t.start)))]),e._v("\n                       - \n                      "),n("div",[e._v(e._s(e.dateToTimeFormat(t.end)))])]),e._v(" "),n("div",{staticClass:"wp-day-plan-title"},[n("input",{staticClass:"showmore",attrs:{id:e.showMoreId(t.itemid),type:"checkbox"}}),e._v(" "),n("label",{staticClass:"showmorecontent",attrs:{for:e.showMoreId(t.itemid)}},[n("widget-html",{attrs:{html:t.description}})],1),e._v(" "),n("span",{staticClass:"showmorecontrols"})])])])})),0):e._e(),e._v(" "),e.eventsByDateAndType(t,4).length||e.eventsByDateAndType(t,1).length?n("div",{staticClass:"narrowHeader"},[e._v("\n                Forberedelse\n              ")]):e._e(),e._v(" "),e._l(e.eventsByDateAndType(t,4),(function(t){return n("div",{staticClass:"wp-dayassignmentevent",style:e.getEventStyles(t),attrs:{"data-itemeventype":"4"}},[n("div",{attrs:{"data-text":""}},[n("div",{staticClass:"wp-dayassignmentevent-header"},[n("div",{staticClass:"Flex"},[n("div",{staticClass:"Flex11",attrs:{title:""}},[e._v(e._s(t.courses))]),e._v(" "),n("div",{staticClass:"Flex11 FlexChildRight",staticStyle:{"text-align":"right"},attrs:{title:t.activities}},[e._v(e._s(t.activities))])])]),e._v(" "),n("p",{staticClass:"wp-day-plan-title"},[n("input",{staticClass:"showmore",attrs:{id:e.showMoreId(t.itemid),type:"checkbox"}}),e._v(" "),n("label",{staticClass:"showmorecontent",attrs:{for:e.showMoreId(t.itemid)}},[n("widget-html",{attrs:{html:t.description}})],1),e._v(" "),n("span",{staticClass:"showmorecontrols"})])])])})),e._v(" "),e._l(e.eventsByDateAndType(t,1),(function(t){return n("div",{staticClass:"wp-dayassignmentevent",style:e.getEventStyles(t),attrs:{"data-itemeventype":"1"}},[n("div",{attrs:{"data-text":""}},[n("div",{staticClass:"wp-dayassignmentevent-header"},[n("div",{staticClass:"Flex"},[n("div",{staticClass:"Flex11",attrs:{title:""}},[e._v(e._s(t.courses))]),e._v(" "),n("div",{staticClass:"Flex11 FlexChildRight",staticStyle:{"text-align":"right"},attrs:{title:t.activities}},[e._v(e._s(t.activities))])])]),e._v(" "),n("p",{staticClass:"wp-day-plan-title",staticStyle:{"margin-top":"0.5rem"}},[null!=t&&""!=t.itemurl?n("a",{attrs:{href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(t.itemurl),target:"_blank"}},[n("widget-html",{attrs:{html:t.title}}
1)],1):n("span",[n("widget-html",{attrs:{html:t.title}})],1)]),e._v(" "),n("div",{staticClass:"wp-dayassignmentevent-plantitles Flex"},[n("img",{staticClass:"wp-plan-icon",attrs:{src:e.baseSchoolPortalUrl+t.icon.replace("~","")}}),e._v("\n                    "+e._s(t.plans[0].title)+"\n                  ")])])])}))],2)])])})),e._v(" "),e.plansIsVisible?n("div",{staticClass:"EasyIQCard wp-weekcontainer mt-3"},[n("div",{staticClass:"EasyIQCardHeader"},[n("div",{staticClass:"EasyIQCardHeaderExtra mb-4"},[n("div",{staticClass:"wp-weekdays"},e._l(5,(function(t){return n("div",{attrs:{"data-dayofweek":t-1}},[e._v("\n                  "+e._s(e.dateToFormat(e.addDay(e.weekPlanInfo.fromDate,t-1)))+"\n                ")])})),0)]),e._v("\n            Forløb\n          ")]),e._v(" "),n("div",{staticClass:"EasyIQCardBody"},[n("div",{attrs:{"data-wpplans":""}},[e._l(e.eventsByType(6),(function(t){return n("div",{class:e.getPlanCssClasses2(t),style:e.getPlanStyles2(t),attrs:{title:t.title}},[n("div",{staticClass:"wp-day-planbackground"}),e._v(" "),n("div",{staticClass:"wp-day-plancontainer",attrs:{"data-plan":""}},[n("div",{staticClass:"PlanIcon2"},[n("div",{staticClass:"Icon48"}),e._v(" "),n("div",{staticClass:"Icon48",style:e.getBackgroundImage(t)})]),e._v(" "),n("div",{staticClass:"CutText",staticStyle:{padding:"0 1rem"}},[e._v("\n                    "+e._s(t.title)+"\n                  ")])])])})),e._v(" "),e._l(e.eventsByType(5),(function(t,i){return n("a",{class:e.getPlanCssClasses2(t),style:e.getPlanStyles2(t),attrs:{href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(t.itemurl),target:"_blank",title:t.title}},[n("div",{staticClass:"wp-day-planbackground"}),e._v(" "),n("div",{staticClass:"wp-day-plancontainer",attrs:{"data-plan":""}},[n("div",{staticClass:"PlanIcon2"},[n("div",{staticClass:"Icon48"}),e._v(" "),n("div",{staticClass:"Icon48",style:e.getBackgroundImage(t)})]),e._v(" "),n("div",{staticClass:"CutText",staticStyle:{padding:"0 1rem"}},[e._v("\n                    "+e._s(t.title)+" "),null!=t.courses&&""!=t.courses?n("span",[e._v("("+e._s(t.courses)+")")]):e._e()])])])}))],2)])]):e._e()],2)])]),e._v(" "),n("div",{staticClass:"bg-info",staticStyle:{"min-height":"20px"}})])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"lds-ring"},[t("div"),t("div"),t("div"),t("div"),t("div")])}],!1,null,"1b8ecfd9",null);t.a=a.exports},814:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],props:{widgetIdentifier:{type:String,default:"relatedWeeklyBooks-"}},data:function(){return{aulaTokenExpired:null}},methods:{getCurrentWeekNumberPatchFormated:function(){return this.currentWeekNumber.length>7?this.currentWeekNumber:this.currentWeekNumber.replace("W","W0")},loadContent:function(){var e=arguments,t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=e.length>0&&void 0!==e[0]&&e[0],t.errors=[],t.childFilter&&0!==t.childFilter.length){n.next=7;break}return t.items=[],t.errors.push("Vælg en eller flere elever i Aula top-menu for at se data"),t.loading=!1,n.abrupt("return");case 7:return n.prev=7,n.next=10,t.getClient();case 10:return s=n.sent,n.next=13,s.get("relatedweeklybook/all",{params:{currentWeekNumber:t.getCurrentWeekNumberPatchFormated(),childFilter:t.childFilter,institutionFilter:t.institutionFilter}});case 13:a=n.sent,t.loading=!1,t.items=a.data||[],n.next=36;break;case 18:if(n.prev=18,n.t0=n.catch(7),!n.t0.response||401!==n.t0.response.status||i){n.next=33;break}return t.loading=!0,t.errors.push("Din Aula-token fornyes.. Øjeblik"),n.prev=23,n.next=26,t.ensureAulaToken();case 26:return t.errors.pop(),n.abrupt("return",t.loadContent(!0));case 30:n.prev=30,n.t1=n.catch(23),t.errors.pop();case 33:t.loading=!1,t.items=[],n.t0.response&&n.t0.response.data&&n.t0.response.data.exceptionMessage?t.errors.push(n.t0.response.data.exceptionMessage):t.errors.push("Ugens forløb kunne ikke hentes.");case 36:case"end":return n.stop()}}),n,null,[[7,18],[23,30]])})))()}},watch:{childFilter:function(){this.aulaToken&&this.loadContent()}}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0003V0001"},[n("div",{staticClass:"widget"},[n("h2",{staticClass:"widget-title"},[e._v("Ugens Meebook forløb")]),e._v(" "),e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}
1),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])})),0)]):e._e(),e._v(" "),e.loading?e._e():n("div",[e.items&&e.items.length?n("ul",{staticClass:"widget"},e._l(e.items,(function(t){return n("li",{key:t.id,staticClass:"widget__item"},[n("span",{staticClass:"widget__item__name"},[e._v(e._s(t.name))]),e._v(" "),t.books&&t.books.length>0?n("div",[n("ul",{staticClass:"widgetlist"},e._l(t.books.slice(0,e.maxShown),(function(i){return n("li",{key:i.id,staticClass:"widgetlist__item",style:e.getBookIcon()},[n("form",{staticClass:"widgetlist__item__form",attrs:{action:e.getApiBaseUrl()+"relatedweeklybooklinkauth",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"bookId"},domProps:{value:i.id}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.getCurrentWeekNumberPatchFormated()}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter[]"},domProps:{value:t.unilogin}}),e._v(" "),n("button",{staticClass:"widgetlist__item__link",attrs:{type:"submit",title:"Se "+i.title+" ("+i.category+") i Meebook"}},[n("div",{staticClass:"widgetlist__item__title"},[n("span",[e._v(e._s(i.title))])]),e._v(" "),n("div",{staticClass:"widgetlist__item__subtitle"},[n("span",[e._v(e._s(i.category))])])])])])})),0),e._v(" "),t.books.length>3?n("button",{staticClass:"widgetlist__showall",on:{click:e.toggleShowAll}},[e._v("\n              "+e._s(e.showAll?"Se færre":"Se alle")+"\n            ")]):e._e()]):n("div",[n("p",[e._v("Ingen forløb i denne uge")])])])})),0):e.hasErrors?e._e():n("div",[n("p",[e._v("Ingen forløb i denne uge")])])])])])}),[],!1,null,null,null);t.a=u.exports},815:function(e,t,n){"use strict";var i,s=n(12),a=n.n(s),r=n(7),o=n.n(r),l={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return a()(o.a.mark((function t(){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return a()(o.a.mark((function t(){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return a()(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],props:{widgetIdentifier:{type:String,default:"relatedWeekPlan-"}},methods:{addReadmore:function(){var e=this.$refs.containers;e&&e.forEach((function(e){e.querySelector(".js-content").scrollHeight>51&&e.querySelector(".js-button").classList.add("show")}))},handleClick:function(e){var t=e.currentTarget,n=t.querySelector(".js-content"),i=t.querySelector(".js-button"),s=n.getBoundingClientRect().height;n.classList.contains("open")&&s>51?(n.style.height="51px",n.classList.remove("open"),i.innerHTML=i.getAttribute("data-more")):(n.style.height=s+"px",n.style.height=n.scrollHeight+"px",n.classList.add("open"),i.innerHTML=i.getAttribute("data-less"))}
1,getBackgroundStyle:function(e){var t={task:"assignment",note:"comment"}[e]||e;return"background-image: url(".concat(this.meebookImgBaseUrl,"task-").concat(t,"-2x.png);")},getLinkIcon:function(){return"background-image: url(".concat(this.meebookImgBaseUrl,"link-2x.png)")},getDate:function(e){return this.moment(e)},getDayOfWeek:function(e){return e.substr(0,2)},getDateOfMonth:function(e){return e.match(/\d+/)[0]},formatAulaYearWeek:function(){return this.moment.locale("da"),this.moment(this.getCurrentWeekNumberPatchFormated()).format("GGGG-[W]WW")},getFormatedActiveWeekNumber:function(e){return this.moment(this.getActiveWeekNumber()).format(e)},getActiveWeekNumber:function(){return null===this.activeWeekNumber?this.getCurrentWeekNumberPatchFormated():this.activeWeekNumber},getCurrentWeekNumberPatchFormated:function(){return this.currentWeekNumber.length>7?this.currentWeekNumber:this.currentWeekNumber.replace("W","W0")},dayHasNoTasks:function(e,t){return this.data[e].weekPlan[t].tasks.length>=1},checkDayForTasks:function(e){var t=!1;return this.data.forEach((function(n){n.weekPlan[e].tasks.length>=1&&(t=!0)})),t},getNextWeekPlan:function(){var e=this;return a()(o.a.mark((function t(){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getActiveWeekNumber(),e.moment.locale("da"),e.activeWeekNumber=e.moment(n).add(1,"w"),t.next=5,e.getWeekPlan(e.moment(e.activeWeekNumber).format("GGGG-[W]WW"));case 5:case"end":return t.stop()}}),t)})))()},getWeekday:function(){var e=this;return a()(o.a.mark((function t(){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getActiveWeekNumber(),e.moment.locale("da"),e.activeWeekNumber=e.moment(n).add(1,"w"),t.next=5,e.getWeekPlan(e.moment(e.activeWeekNumber).format("GGGG-[W]WW"));case 5:case"end":return t.stop()}}),t)})))()},triggerGetNextWeekPlan:function(e){var t=this;return a()(o.a.mark((function n(){return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("Enter"!==e.code&&"Space"!==e.code){n.next=3;break}return n.next=3,t.getNextWeekPlan();case 3:case"end":return n.stop()}}),n)})))()},getPreviousWeekPlan:function(){var e=this;return a()(o.a.mark((function t(){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getActiveWeekNumber(),e.moment.locale("da"),e.activeWeekNumber=e.moment(n).subtract(1,"w"),t.next=5,e.getWeekPlan(e.moment(e.activeWeekNumber).format("GGGG-[W]WW"));case 5:case"end":return t.stop()}}),t)})))()},triggerGetPreviousWeekPlan:function(e){var t=this;return a()(o.a.mark((function n(){return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("Enter"!==e.code&&"Space"!==e.code){n.next=3;break}return n.next=3,t.getPreviousWeekPlan();case 3:case"end":return n.stop()}}),n)})))()},getWeekPlan:function(e){var t=arguments,n=this;return a()(o.a.mark((function i(){var s,a,r;return o.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(s=t.length>1&&void 0!==t[1]&&t[1],n.errors=[],0!==n.childFilter.length){i.next=5;break}return n.errors.push("Vælg en eller flere elever i Aula top-menu for at se data"),i.abrupt("return");case 5:return i.prev=5,i.next=8,n.getClient();case 8:return a=i.sent,i.next=11,a.get("relatedweekplan/all",{params:{currentWeekNumber:e,userProfile:n.userProfile,childFilter:n.childFilter,institutionFilter:n.institutionFilter}});case 11:r=i.sent,n.loading=!1,n.data=r.data||[],i.next=34;break;case 16:if(i.prev=16,i.t0=i.catch(5),!i.t0.response||401!==i.t0.response.status||s){i.next=31;break}return n.loading=!0,n.errors.push("Din Aula-token fornyes.. Øjeblik"),i.prev=21,i.next=24,n.ensureAulaToken();case 24:return n.errors.pop(),i.abrupt("return",n.getWeekPlan(e,!0));case 28:i.prev=28,i.t1=i.catch(21),n.errors.pop();case 31:n.loading=!1,n.data=[],i.t0.response&&i.t0.response.data&&i.t0.response.data.exceptionMessage?n.errors.push(i.t0.response.data.exceptionMessage):n.errors.push("Ugeplanen kunne ikke hentes.");case 34:case"end":return i.stop()}}),i,null,[[5,16],[21,28]])})))()},loadContent:function(){var e=this;return a()(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getWeekPlan(e.formatAulaYearWeek());case 2:case"end":return t.stop()}}),t)})))()}},data:function(){return{loading:!0,activeWeekNumber:null,dayIsActive:!1,activeItemId:0,data:{},errors:[],aulaToken:null}},mounted:function(){this.moment().isoWeekday()<=5?this.activeItemId=this.moment().isoWeekday()-1:this.activeItemId=0},updated:function(){this.addReadmore()},watch:{childFilter:(i=a()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.aulaToken){e.next=3;break}return e.next=3,this.loadContent();case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}},c=l,u=n(3),d=Object(u.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0004V0001"},[n("div",{staticClass:"studentplan-widget",class:e.placement},[e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}
1),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])})),0)]):e._e(),e._v(" "),n("h2",{staticClass:"weekplan-title"},[e._v(" UGEPLANER: ")]),e._v(" "),n("div",{staticClass:"widget-nav"},[n("span",{staticClass:"widget-nav__week-link",attrs:{title:"Se ugeplan for forrige uge",tabindex:"0"},on:{click:function(t){return e.getPreviousWeekPlan()},keypress:function(t){return e.triggerGetPreviousWeekPlan(t)}}},[e._v("◀")]),e._v(" "),n("span",{staticClass:"widget-nav__week-info"},[e._v("Uge "+e._s(e.getFormatedActiveWeekNumber("WW")))]),e._v(" "),n("span",{staticClass:"widget-nav__week-link",attrs:{title:"Se ugeplan for næste uge",tabindex:"0"},on:{click:function(t){return e.getNextWeekPlan()},keypress:function(t){return e.triggerGetNextWeekPlan(t)}}},[e._v("▶")])]),e._v(" "),e._l(e.data,(function(t,i){return e.loading||e.hasErrors?e._e():n("div",{staticClass:"weekplan-container"},[n("h3",{staticClass:"studentname"},[e._v(" "+e._s(t.name)+" ")]),e._v(" "),i<1?n("div",{staticClass:"weekdays"},[e._l(t.weekPlan,(function(t,s){return n("div",{key:t.date,staticClass:"weekdays__day",class:e.activeItemId===s?"active":"",attrs:{id:i+""+s},on:{click:function(t){e.activeItemId=s}}},[e._v("\n          "+e._s(e.getDayOfWeek(t.date))+"\n          "),n("br"),e._v("\n          "+e._s(e.getDateOfMonth(t.date))+"\n        ")])})),e._v(" "),e._l(t.weekPlan,(function(t,s){return i<1?n("span",{staticClass:"circle",class:e.checkDayForTasks(s)?"visible":""},[e._v("●")]):e._e()}))],2):e._e(),e._v(" "),n("div",{staticClass:"weekplan"},e._l(t.weekPlan,(function(s,a){return n("div",{key:s.date,staticClass:"weekplan__column",class:e.activeItemId===a?"active":""},[n("div",{staticClass:"weekplan__column__head"},[n("span",{staticClass:"plandate"},[e._v(e._s(s.date)+" ")]),e._v(" "),n("span",{staticClass:"childname"},[e._v(e._s(t.name)+" ")])]),e._v(" "),n("div",{staticClass:"weekplan__column__tasks"},[e.dayHasNoTasks(i,a)?e._e():n("span",{staticClass:"no-tasks"},[e._v("Der er intet indhold for denne dag")]),e._v(" "),e._l(s.tasks,(function(i){return n("div",{key:i.id,class:"weekplan-task weekplan-task--"+i.type},[n("div",{staticClass:"weekplan-task__top"},[n("div",{staticClass:"pills-wrap"},e._l(i.pill?i.pill.split(","):[],(function(t){return n("div",{staticClass:"weekplan-task__pill"},[e._v(e._s(t)+"\n                  ")])})),0),e._v(" "),n("div",{staticClass:"event-icon",style:e.getBackgroundStyle(i.type)})]),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"weekplan-task__title"},[e._v("\n                "+e._s(i.title)+"\n              ")]),e._v(" "),n("div",{ref:"containers",refInFor:!0,staticClass:"weekplan-task__toggle-container",on:{click:function(t){return e.handleClick(t)}}},[n("div",{staticClass:"weekplan-task__toggle-container__content js-content"},[e._v("\n                  "+e._s(i.content)+"\n                ")]),e._v(" "),n("div",{staticClass:"weekplan-task__toggle-container__button js-button",attrs:{"data-more":"Læs mere","data-less":"Læs mindre"}},[e._v("\n                  Læs mere\n                ")])]),e._v(" "),i.linkText?n("hr",{staticClass:"link-hr"}):e._e(),e._v(" "),i.linkText?n("div",{staticClass:"weekplan-task--bottom"},[n("div",{staticClass:"link-icon",style:e.getLinkIcon()}),e._v(" "),n("form",{staticClass:"weekplan-task__form",attrs:{action:e.getApiBaseUrl()+"relatedweekplanassignmentlinkauth",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"id"},domProps:{value:i.id}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter[]"},domProps:{value:t.unilogin}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.formatAulaYearWeek()}}),e._v(" "),n("button",{staticClass:"weekplan-task__link",attrs:{type:"submit",title:"Se "+i.title+" i Meebook"}}
1,[n("span",[e._v(e._s(i.linkText))])])])]):e._e()])}))],2)])})),0)])}))],2)])}),[],!1,null,null,null);t.a=d.exports},816:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],props:{widgetIdentifier:{type:String,default:"studentLastOpenedBooks-"}},methods:{loadContent:function(){var e=arguments,t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]&&e[0],t.errors=[],n.prev=2,n.next=5,t.getClient();case 5:return s=n.sent,n.next=8,s.get("studentlastopenedbook/all",{params:{currentWeekNumber:t.currentWeekNumber,institutionFilter:t.institutionFilter}});case 8:a=n.sent,t.loading=!1,t.items=a.data||[],n.next=31;break;case 13:if(n.prev=13,n.t0=n.catch(2),!n.t0.response||401!==n.t0.response.status||i){n.next=28;break}return t.loading=!0,t.errors.push("Din Aula-token fornyes.. Øjeblik"),n.prev=18,n.next=21,t.ensureAulaToken();case 21:return t.errors.pop(),n.abrupt("return",t.loadContent(!0));case 25:n.prev=25,n.t1=n.catch(18),t.errors.pop();case 28:t.loading=!1,t.items=[],n.t0.response&&n.t0.response.data&&n.t0.response.data.exceptionMessage?t.errors.push(n.t0.response.data.exceptionMessage):t.errors.push("Ugens plan kunne ikke hentes.");case 31:case"end":return n.stop()}}),n,null,[[2,13],[18,25]])})))()}}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0005V0001"},[n("div",{staticClass:"widget"},[n("h2",{staticClass:"widget-title"},[e._v("Senest åbnede forløb")]),e._v(" "),e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])}
1)),0)]):e._e(),e._v(" "),e.loading?e._e():n("div",[e.items&&e.items.length?n("ul",{staticClass:"widget"},e._l(e.items,(function(t){return n("li",{key:t.id,staticClass:"widget__item"},[t.books&&t.books.length>0?n("div",[n("ul",{staticClass:"widgetlist"},e._l(t.books.slice(0,e.maxShown),(function(t){return n("li",{key:t.id,staticClass:"widgetlist__item",style:e.getBookIcon()},[n("form",{staticClass:"widgetlist__item__form",attrs:{action:e.getApiBaseUrl()+"studentlastopenedbooklinkauth",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"bookId"},domProps:{value:t.id}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("button",{staticClass:"widgetlist__item__link",attrs:{type:"submit",title:"Se "+t.title+" ("+t.category+") i Meebook"}},[n("div",{staticClass:"widgetlist__item__title"},[n("span",[e._v(e._s(t.title))])]),e._v(" "),n("div",{staticClass:"widgetlist__item__subtitle"},[n("span",[e._v(e._s(t.category))])])])])])})),0),e._v(" "),t.books.length>3?n("button",{staticClass:"widgetlist__showall",on:{click:e.toggleShowAll}},[e._v("\n              "+e._s(e.showAll?"Se færre":"Se alle")+"\n            ")]):e._e()]):n("div",[n("p",[e._v("Ingen forløb at vise")])])])})),0):e.hasErrors?e._e():n("div",[n("p",[e._v("Ingen forløb at vise")])])])])])}),[],!1,null,null,null);t.a=u.exports},817:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],props:{widgetIdentifier:{type:String,default:"studentWeeklyBooks-"}},methods:{getThisYearWeek:function(){return this.moment.locale("da"),this.moment().format("GGGG-[W]WW")},loadContent:function(){var e=arguments,t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]&&e[0],t.errors=[],n.prev=2,n.next=5,t.getClient();case 5:return s=n.sent,n.next=8,s.get("studentweeklybook/all",{params:{currentWeekNumber:t.getThisYearWeek(),userProfile:t.userProfile,institutionFilter:t.institutionFilter}});case 8:a=n.sent,t.loading=!1,t.items=a.data||[],n.next=31;break;case 13:if(n.prev=13,n.t0=n.catch(2),!n.t0.response||401!==n.t0.response.status||i){n.next=28;break}return t.loading=!0,t.errors.push("Din Aula-token fornyes.. Øjeblik"),n.prev=18,n.next=21,t.ensureAulaToken();case 21:return t.errors.pop(),n.abrupt("return",t.loadContent(!0));case 25:n.prev=25,n.t1=n.catch(18),t.errors.pop();case 28:t.loading=!1,t.items=[],n.t0.response&&n.t0.response.data&&n.t0.response.data.exceptionMessage?t.errors.push(n.t0.response.data.exceptionMessage):t.errors.push("Ugens forløb kunne ikke hentes.");case 31:case"end":return n.stop()}}),n,null,[[2,13],[18,25]])})))()}}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0006V0001"},[n("div",{staticClass:"widget"},[n("h2",{staticClass:"widget-title"},[e._v("Ugens forløb")]),e._v(" "),e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}
1),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])})),0)]):e._e(),e._v(" "),e.loading?e._e():n("div",[e.items&&e.items.length?n("ul",{staticClass:"widget"},e._l(e.items,(function(t){return n("li",{key:t.id,staticClass:"widget__item"},[t.books&&t.books.length>0?n("div",[n("ul",{staticClass:"widgetlist"},e._l(t.books.slice(0,e.maxShown),(function(t){return n("li",{key:t.id,staticClass:"widgetlist__item",style:e.getBookIcon()},[n("form",{staticClass:"widgetlist__item__form",attrs:{action:e.getApiBaseUrl()+"studentweeklybooklinkauth",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"bookId"},domProps:{value:t.id}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.getThisYearWeek()}}),e._v(" "),n("button",{staticClass:"widgetlist__item__link",attrs:{type:"submit",title:"Se "+t.title+" ("+t.category+") i Meebook"}},[n("div",{staticClass:"widgetlist__item__title"},[n("span",[e._v(e._s(t.title))])]),e._v(" "),n("div",{staticClass:"widgetlist__item__subtitle"},[n("span",[e._v(e._s(t.category))])])])])])})),0),e._v(" "),t.books.length>3?n("button",{staticClass:"widgetlist__showall",on:{click:e.toggleShowAll}},[e._v("\n              "+e._s(e.showAll?"Se færre":"Se alle")+"\n            ")]):e._e()]):n("div",[n("p",[e._v("Ingen forløb i denne uge")])])])})),0):e.hasErrors?e._e():n("div",[n("p",[e._v("Ingen forløb i denne uge")])])])])])}),[],!1,null,null,null);t.a=u.exports},818:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],props:{widgetIdentifier:{type:String,default:"studentWeekPlan-"}},methods:{addReadmore:function(){var e=this.$refs.containers;e&&e.forEach((function(e){e.querySelector(".js-content").scrollHeight>51&&e.querySelector(".js-button").classList.add("show")}))},handleClick:function(e){var t=e.currentTarget,n=t.querySelector(".js-content"),i=t.querySelector(".js-button"),s=n.getBoundingClientRect().height;n.classList.contains("open")&&s>51?(n.style.height="51px",n.classList.remove("open"),i.innerHTML=i.getAttribute("data-more")):(n.style.height=s+"px",n.style.height=n.scrollHeight+"px",n.classList.add("open"),i.innerHTML=i.getAttribute("data-less"))}
1,getBackgroundStyle:function(e){var t={task:"assignment",note:"comment"}[e]||e;return"background-image: url(".concat(this.meebookImgBaseUrl,"task-").concat(t,"-2x.png);")},getLinkIcon:function(){return"background-image: url(".concat(this.meebookImgBaseUrl,"link-2x.png)")},getDate:function(e){return this.moment(e)},getDayOfWeek:function(e){return e.substr(0,2)},getDateOfMonth:function(e){return e.match(/\d+/)[0]},formatAulaYearWeek:function(){return this.moment.locale("da"),this.moment(this.getCurrentWeekNumberPatchFormated()).format("GGGG-[W]WW")},getFormatedActiveWeekNumber:function(e){return this.moment(this.getActiveWeekNumber()).format(e)},getActiveWeekNumber:function(){return null===this.activeWeekNumber?this.getCurrentWeekNumberPatchFormated():this.activeWeekNumber},getCurrentWeekNumberPatchFormated:function(){return this.currentWeekNumber.length>7?this.currentWeekNumber:this.currentWeekNumber.replace("W","W0")},checkDayForTasks:function(e){return this.data[0].weekPlan[e].tasks.length>=1},getNextWeekPlan:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getActiveWeekNumber(),e.moment.locale("da"),e.activeWeekNumber=e.moment(n).add(1,"w"),t.next=5,e.getWeekPlan(e.moment(e.activeWeekNumber).format("GGGG-[W]WW"));case 5:case"end":return t.stop()}}),t)})))()},getWeekday:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getActiveWeekNumber(),e.moment.locale("da"),e.activeWeekNumber=e.moment(n).add(1,"w"),t.next=5,e.getWeekPlan(e.moment(e.activeWeekNumber).format("GGGG-[W]WW"));case 5:case"end":return t.stop()}}),t)})))()},triggerGetNextWeekPlan:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("Enter"!==e.code&&"Space"!==e.code){n.next=3;break}return n.next=3,t.getNextWeekPlan();case 3:case"end":return n.stop()}}),n)})))()},getPreviousWeekPlan:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getActiveWeekNumber(),e.moment.locale("da"),e.activeWeekNumber=e.moment(n).subtract(1,"w"),t.next=5,e.getWeekPlan(e.moment(e.activeWeekNumber).format("GGGG-[W]WW"));case 5:case"end":return t.stop()}}),t)})))()},triggerGetPreviousWeekPlan:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("Enter"!==e.code&&"Space"!==e.code){n.next=3;break}return n.next=3,t.getPreviousWeekPlan();case 3:case"end":return n.stop()}}),n)})))()},getWeekPlan:function(e){var t=arguments,n=this;return s()(r.a.mark((function i(){var s,a,o;return r.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=t.length>1&&void 0!==t[1]&&t[1],n.errors=[],i.prev=2,i.next=5,n.getClient();case 5:return a=i.sent,i.next=8,a.get("studentweekplan/all",{params:{currentWeekNumber:e,userProfile:n.userProfile,institutionFilter:n.institutionFilter}});case 8:o=i.sent,n.loading=!1,n.data=o.data||[],i.next=31;break;case 13:if(i.prev=13,i.t0=i.catch(2),!i.t0.response||401!==i.t0.response.status||s){i.next=28;break}return n.loading=!0,n.errors.push("Din Aula-token fornyes.. Øjeblik"),i.prev=18,i.next=21,n.ensureAulaToken();case 21:return n.errors.pop(),i.abrupt("return",n.getWeekPlan(e,!0));case 25:i.prev=25,i.t1=i.catch(18),n.errors.pop();case 28:n.loading=!1,n.data=[],i.t0.response&&i.t0.response.data&&i.t0.response.data.exceptionMessage?n.errors.push(i.t0.response.data.exceptionMessage):n.errors.push("Ugens plan kunne ikke hentes.");case 31:case"end":return i.stop()}}),i,null,[[2,13],[18,25]])})))()},loadContent:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getWeekPlan(e.formatAulaYearWeek());case 2:case"end":return t.stop()}}),t)})))()}},data:function(){return{loading:!0,activeWeekNumber:null,dayIsActive:!1,activeItemId:0,data:{},errors:[],aulaToken:null}},created:function(){},mounted:function(){this.moment().isoWeekday()<=5?this.activeItemId=this.moment().isoWeekday()-1:this.activeItemId=0},updated:function(){this.addReadmore()}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0007V0001"},[n("div",{staticClass:"studentplan-widget",class:e.placement},[e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}
1),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])})),0)]):e._e(),e._v(" "),n("h2",{staticClass:"weekplan-title"},[e._v(" Ugeplan "+e._s(e.getFormatedActiveWeekNumber("[]GGGG[]"))+" ")]),e._v(" "),n("div",{staticClass:"widget-nav"},[n("span",{staticClass:"widget-nav__week-link",attrs:{title:"Se ugeplan for forrige uge",tabindex:"0"},on:{click:e.getPreviousWeekPlan,keypress:function(t){return e.triggerGetPreviousWeekPlan(t)}}},[e._v("◀")]),e._v(" "),n("span",{staticClass:"widget-nav__week-info"},[e._v("Uge "+e._s(e.getFormatedActiveWeekNumber("WW")))]),e._v(" "),n("span",{staticClass:"widget-nav__week-link",attrs:{title:"Se ugeplan for næste uge",tabindex:"0"},on:{click:e.getNextWeekPlan,keypress:function(t){return e.triggerGetNextWeekPlan(t)}}},[e._v("▶")])]),e._v(" "),e.loading||e.hasErrors?e._e():n("div",{staticClass:"weekplan-container"},e._l(e.data,(function(t){return e.loading||e.hasErrors?e._e():n("div",{staticClass:"weekplan-container"},[n("div",[n("div",{staticClass:"weekdays"},[e._l(t.weekPlan,(function(t,i){return n("div",{key:t.date,staticClass:"weekdays__day",class:e.activeItemId===i?"active":"",on:{click:function(t){e.activeItemId=i}}},[e._v("\n              "+e._s(e.getDayOfWeek(t.date))+"\n              "),n("br"),e._v("\n              "+e._s(e.getDateOfMonth(t.date))+"\n\n            ")])})),e._v(" "),e._l(t.weekPlan,(function(t,i){return n("span",{staticClass:"circle",class:e.checkDayForTasks(i)?"visible":""},[e._v("●")])}))],2),e._v(" "),n("div",{staticClass:"weekplan"},e._l(t.weekPlan,(function(i,s){return n("div",{key:i.date,staticClass:"weekplan__column",class:e.activeItemId===s?"active":""},[n("div",{staticClass:"weekplan__column__head"},[e._v("\n                "+e._s(i.date)+"\n              ")]),e._v(" "),n("div",{staticClass:"weekplan__column__tasks"},[e.checkDayForTasks(s)?e._e():n("span",{class:e.checkDayForTasks(s)?"":"no-tasks"},[e._v("Der er intet indhold for denne dag")]),e._v(" "),e._l(i.tasks,(function(i){return n("div",{key:i.id,class:"weekplan-task weekplan-task--"+i.type},[n("div",{staticClass:"weekplan-task__top"},[n("div",{staticClass:"pills-wrap"},e._l(i.pill?i.pill.split(","):[],(function(t){return n("div",{staticClass:"weekplan-task__pill"},[e._v(e._s(t)+"\n                      ")])})),0),e._v(" "),n("div",{staticClass:"event-icon",style:e.getBackgroundStyle(i.type)})]),e._v(" "),n("hr"),e._v(" "),i.title?n("p",{staticClass:"weekplan-task__title"},[e._v("\n                    "+e._s(i.title)+"\n                  ")]):e._e(),e._v(" "),n("div",{ref:"containers",refInFor:!0,staticClass:"weekplan-task__toggle-container",on:{click:function(t){return e.handleClick(t)}}},[n("p",{staticClass:"weekplan-task__toggle-container__content js-content"},[e._v("\n                      "+e._s(i.content)+"\n                    ")]),e._v(" "),n("div",{staticClass:"weekplan-task__toggle-container__button js-button",attrs:{"data-more":"Læs mere","data-less":"Læs mindre"}},[e._v("\n                      Læs mere\n                    ")])]),e._v(" "),i.linkText?n("hr",{staticClass:"link-hr"}):e._e(),e._v(" "),i.linkText?n("div",{staticClass:"weekplan-task--bottom"},[n("div",{staticClass:"link-icon",style:e.getLinkIcon()}),e._v(" "),n("form",{staticClass:"weekplan-task__form",attrs:{action:e.getApiBaseUrl()+"studentweekplan"+i.type+"linkauth",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"id"},domProps:{value:i.id}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.formatAulaYearWeek()}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter[]"},domProps:{value:t.unilogin}}),e._v(" "),n("button",{staticClass:"weekplan-task__link",attrs:{type:"submit",title:"Se "+i.title+" i Meebook"}}
1,[n("span",[e._v(e._s(i.linkText))])])])]):e._e()])}))],2)])})),0)])])})),0)])])}),[],!1,null,null,null);t.a=u.exports},819:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],props:{widgetIdentifier:{type:String,default:"teacherLastEditedAnnualPlans-"}},methods:{getThisYearWeek:function(){return this.moment.locale("da"),this.moment().format(this.moment.HTML5_FMT.WEEK)},getCalendarIcon:function(){return"background-image: url(".concat(this.meebookImgBaseUrl,"calendar-2x.png)")},loadContent:function(){var e=arguments,t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]&&e[0],t.errors=[],n.prev=2,n.next=5,t.getClient();case 5:return s=n.sent,n.next=8,s.get("teacherlasteditedannualplan/all",{params:{currentWeekNumber:t.getThisYearWeek(),institutionFilter:t.institutionFilter}});case 8:a=n.sent,t.loading=!1,t.items=a.data||[],n.next=31;break;case 13:if(n.prev=13,n.t0=n.catch(2),!n.t0.response||401!==n.t0.response.status||i){n.next=28;break}return t.loading=!0,t.errors.push("Din Aula-token fornyes.. Øjeblik"),n.prev=18,n.next=21,t.ensureAulaToken();case 21:return t.errors.pop(),n.abrupt("return",t.loadContent(!0));case 25:n.prev=25,n.t1=n.catch(18),t.errors.pop();case 28:t.loading=!1,t.items=[],n.t0.response&&n.t0.response.data&&n.t0.response.data.exceptionMessage?t.errors.push(n.t0.response.data.exceptionMessage):t.errors.push("Årsplaner kunne ikke hentes.");case 31:case"end":return n.stop()}}),n,null,[[2,13],[18,25]])})))()}}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0009V0001"},[n("div",{staticClass:"widget"},[n("h2",{staticClass:"widget-title"},[e._v("Seneste årsplaner")]),e._v(" "),e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}
1),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])})),0)]):e._e(),e._v(" "),e.loading?e._e():n("div",[e.items&&e.items.length?n("ul",{staticClass:"widget"},e._l(e.items,(function(t){return n("li",{key:t.id,staticClass:"widget__item"},[t.plans&&t.plans.length>0?n("div",[n("ul",{staticClass:"widgetlist"},e._l(t.plans.slice(0,e.maxShown),(function(t){return n("li",{key:t.id,staticClass:"widgetlist__item",style:e.getCalendarIcon()},[n("form",{staticClass:"widgetlist__item__form",attrs:{action:e.getApiBaseUrl()+"teacherlasteditedannualplanlinkauth",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"annualPlanId"},domProps:{value:t.id}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.getThisYearWeek()}}),e._v(" "),n("button",{staticClass:"widgetlist__item__link",attrs:{type:"submit",title:"Se årsplan "+t.schoolYearSpan+" ("+t.category+") i Meebook"}},[n("div",{staticClass:"widgetlist__item__title"},[n("span",[e._v(e._s(t.category))])]),e._v(" "),t.groupName?n("div",{staticClass:"widgetlist__item__subtitle"},[n("span",[e._v(e._s(t.groupName))])]):e._e(),e._v(" "),n("div",{staticClass:"widgetlist__item__subtitle"},[n("span",[e._v(e._s(t.schoolYearSpan))])])])])])})),0),e._v(" "),t.plans.length>3?n("button",{staticClass:"widgetlist__showall",on:{click:e.toggleShowAll}},[e._v("\n              "+e._s(e.showAll?"Se færre":"Se alle")+"\n            ")]):e._e()]):n("div",[n("p",[e._v("Ingen årsplaner at vise")])])])})),0):e.hasErrors?e._e():n("div",[n("p",[e._v("Ingen årsplaner at vise")])])])])])}),[],!1,null,null,null);t.a=u.exports},820:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],props:{widgetIdentifier:{type:String,default:"teacherLastEditedBooks-"}},methods:{getThisYearWeek:function(){return this.moment.locale("da"),this.moment().format(this.moment.HTML5_FMT.WEEK)},loadContent:function(){var e=arguments,t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]&&e[0],t.errors=[],n.prev=2,n.next=5,t.getClient();case 5:return s=n.sent,n.next=8,s.get("teacherlasteditedbook/all",{params:{currentWeekNumber:t.getThisYearWeek(),institutionFilter:t.institutionFilter}});case 8:a=n.sent,t.loading=!1,t.items=a.data||[],n.next=31;break;case 13:if(n.prev=13,n.t0=n.catch(2),!n.t0.response||401!==n.t0.response.status||i){n.next=28;break}return t.loading=!0,t.errors.push("Din Aula-token fornyes.. Øjeblik"),n.prev=18,n.next=21,t.ensureAulaToken();case 21:return t.errors.pop(),n.abrupt("return",t.loadContent(!0));case 25:n.prev=25,n.t1=n.catch(18),t.errors.pop();case 28:t.loading=!1,t.items=[],n.t0.response&&n.t0.response.data&&n.t0.response.data.exceptionMessage?t.errors.push(n.t0.response.data.exceptionMessage):t.errors.push("Forløb kunne ikke hentes.");case 31:case"end":return n.stop()}}),n,null,[[2,13],[18,25]])})))()}}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0010V0001"},[n("div",{staticClass:"widget"},[n("h2",{staticClass:"widget-title"},[e._v("Seneste forløb")]),e._v(" "),e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}
1),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])})),0)]):e._e(),e._v(" "),e.loading?e._e():n("div",[e.items&&e.items.length?n("ul",{staticClass:"widget"},e._l(e.items,(function(t){return n("li",{key:t.id,staticClass:"widget__item"},[t.books&&t.books.length>0?n("div",[n("ul",{staticClass:"widgetlist"},e._l(t.books.slice(0,e.maxShown),(function(t){return n("li",{key:t.id,staticClass:"widgetlist__item",style:e.getBookIcon()},[n("form",{staticClass:"widgetlist__item__form",attrs:{action:e.getApiBaseUrl()+"teacherlasteditedbooklinkauth",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"bookId"},domProps:{value:t.id}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.getThisYearWeek()}}),e._v(" "),n("button",{staticClass:"widgetlist__item__link",attrs:{type:"submit",title:"Se "+t.title+" ("+t.category+") i Meebook"}},[n("div",{staticClass:"widgetlist__item__title"},[n("span",[e._v(e._s(t.title))])]),e._v(" "),n("div",{staticClass:"widgetlist__item__subtitle"},[n("span",[e._v(e._s(t.category))])])])])])})),0),e._v(" "),t.books.length>3?n("button",{staticClass:"widgetlist__showall",on:{click:e.toggleShowAll}},[e._v("\n              "+e._s(e.showAll?"Se færre":"Se alle")+"\n            ")]):e._e()]):n("div",[n("p",[e._v("Ingen forløb at vise")])])])})),0):e.hasErrors?e._e():n("div",[n("p",[e._v("Ingen forløb at vise")])])])])])}),[],!1,null,null,null);t.a=u.exports},821:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],props:{userProfileManager:{type:String,default:"Manager"},widgetIdentifier:{type:String,default:"managementQuickLink-"}},methods:{getThisYearWeek:function(){return this.moment.locale("da"),this.moment().format(this.moment.HTML5_FMT.WEEK)},getIcon:function(e){return"background-image: url(".concat(this.meebookImgBaseUrl+e,")")},loadContent:function(){var e=arguments,t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]&&e[0],t.errors=[],n.prev=2,n.next=5,t.getClient();case 5:return s=n.sent,n.next=8,s.get("managementquicklink/all",{params:{currentWeekNumber:t.getThisYearWeek(),userProfile:t.userProfileManager,institutionFilter:t.institutionFilter}});case 8:a=n.sent,t.loading=!1,t.items=a.data||[],n.next=31;break;case 13:if(n.prev=13,n.t0=n.catch(2),!n.t0.response||401!==n.t0.response.status||i){n.next=28;break}return t.loading=!0,t.errors.push("Din Aula-token fornyes.. Øjeblik"),n.prev=18,n.next=21,t.ensureAulaToken();case 21:return t.errors.pop(),n.abrupt("return",t.loadContent(!0));case 25:n.prev=25,n.t1=n.catch(18),t.errors.pop();case 28:t.loading=!1,t.items=[],n.t0.response&&n.t0.response.data&&n.t0.response.data.exceptionMessage?t.errors.push(n.t0.response.data.exceptionMessage):t.errors.push("Ledelses info kunne ikke hentes.");case 31:case"end":return n.stop()}}),n,null,[[2,13],[18,25]])})))()}}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0011V0001"},[n("div",{staticClass:"widget"},[n("h2",{staticClass:"widget-title"},[e._v("Adgang til ledelsesinfo")]),e._v(" "),e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}
1),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])})),0)]):e._e(),e._v(" "),e.loading?e._e():n("div",[e.items&&e.items.length?n("ul",{staticClass:"widget"},e._l(e.items,(function(t,i){return n("li",{key:i,staticClass:"widget__item"},[t.links&&t.links.length>0?n("div",[n("ul",{staticClass:"widgetlist"},e._l(t.links,(function(t,i){return n("li",{key:i,staticClass:"widgetlist__item",style:e.getIcon(t.iconFileName)},[n("form",{staticClass:"widgetlist__item__form",attrs:{action:e.getApiBaseUrl()+t.aulaApiEndpoint,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.getThisYearWeek()}}),e._v(" "),e._l(e.institutionFilter,(function(e){return n("input",{key:e,attrs:{type:"hidden",name:"institutionFilter[]"},domProps:{value:e}})})),e._v(" "),n("button",{staticClass:"widgetlist__item__link",attrs:{type:"submit",title:"Se "+t.linkText+" i Meebook"}},[n("div",{staticClass:"widgetlist__item__title"},[n("span",[e._v(e._s(t.linkText))])])])],2)])})),0)]):n("div",[n("p",[e._v("Ingen info at vise")])])])})),0):e.hasErrors?e._e():n("div",[n("p",[e._v("Ingen info at vise")])])])])])}),[],!1,null,null,null);t.a=u.exports},822:function(e,t,n){"use strict";var i="https://www2.infoba.dk",s="https://www.infoba.dk";function a(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Laeselog?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var r={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,who:"Aula widget developers",aulaToken:null,domain:i,domainOld:s,fields:{},item:{Binder:{}}}},methods:{getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="LaeselogChildList",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/LaeselogChildListGet",{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.item=t.data,a(e),0==e.item.Binder.Laeselog.length&&(e.section="nodata",e.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(t){a(e)})).finally((function(){return e.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}},computed:{headerLinkC:function(){return{url:s+"/laeselog"}}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},o=n(3),l=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#eb7404"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-logbook"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          Læselog\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[e._l(e.item.Binder.Laeselog,(function(t){return[n("div",{staticClass:"infoba-accordeon-header"},[n("div",[e._v(e._s(t.Name)+" "+e._s(t.Subject))]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),e._l(t.ChildList,(function(i){return[n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"ll.Open"}],staticClass:"infoba-accordeon-row",staticStyle:{"padding-bottom":"20px"}},[n("div",{staticClass:"infoba-link",staticStyle:{"margin-left":"20px"},on:{click:function(t){return e.goto(e.domainOld+"/laeselog/laeselogCreate.aspx?studentId="+i.Id)}}},[e._v("\n                "+e._s(i.Name)+"\n              ")]),e._v(" "),n("div",{staticClass:"infoba-gray",staticStyle:{"margin-right":"10px"}},[e._v("\n                "+e._s(i.UpdatedDate)+"\n              ")])])])]}))]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"icon-rotator infoba-rotate"})])}],!1,null,"eb20d2cc",null);t.a=l.exports},823:function(e,t,n){"use strict";var i={directives:{tooltip:{bind:function(e){e.addEventListener("mouseover",(function(e){var t=e.target;t.offsetWidth<t.scrollWidth?"SPAN"==t.firstElementChild.tagName.toUpperCase()?t.setAttribute("title",e.target.textContent):t.setAttribute("title",e.target.textContent.substring(3)):t.hasAttribute("title")&&t.removeAttribute("title")}))}}},props:{axios:Function,sessionUUID:String,userProfile:String,placement:String,institutionFilter:Array},data:function(){return{posts:[]}},created:function(){var e=this;this.axios.get("https://api.ibkservices.dk/?institutionsnummer="+this.institutionFilter+"&userprofile="+this.userProfile).then((function(t){e.posts=t.data}
1)).catch((function(e){console.log(e)}))}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0013V0002"},[n("div",[n("div",{class:{"links-title-employee":"employee"==e.userProfile,"links-title-other":"employee"!=e.userProfile}},[e._v("\n      NYTTIGE LINKS\n    ")]),e._v(" "),e.posts&&e.posts.length?n("ul",e._l(e.posts,(function(t,i){return n("li",{directives:[{name:"tooltip",rawName:"v-tooltip"}],class:{first:0===i}},[null!=t.institutionsNavn?n("span",{staticClass:"institution-title"},[e._v(e._s(t.institutionsNavn))]):e._e(),e._v(" "),null!=t.linkText?n("a",{class:{"links-a-employee":"employee"==e.userProfile,"links-a-other":"employee"!=e.userProfile},attrs:{href:t.linkUrl,target:"_blank"}},[e._v("• "+e._s(t.linkText))]):e._e()])})),0):e._e()])])}),[],!1,null,null,null);t.a=a.exports},824:function(e,t,n){"use strict";var i={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,group:String,userProfile:String,institutionFilter:Array},data:function(){return{aulaToken:null,user:{},errors:[],weekPlanInfo:{},monthNames:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],shortMonthNames:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNames:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],baseApiAddress:"https://api.easyiqcloud.dk/api/aula/",selectedGroup:"",fetchingData:!1,selectedWeekNr:"",selectedChild:"",notificationListIsVisible:!1,planSort:function(e,t){return e.title>t.title?1:-1},countEvents:function(e){return this.weekPlanInfo.Events.filter((function(t){return t.itemType==e})).length},ssoLinkUrlParams:function(e){var t="?token="+this.aulaToken;return t+="&userProfile="+this.userProfile,t+="&institutionFilter="+this.institutionFilter.join(","),t+="&ssoLink="+e,t+="&selectedChild=".concat(this.displaySelectedChild)},eventsByType:function(e){new Array;return this.weekPlanInfo.Events.filter((function(t){return t.itemType==e}))},eventsByDateAndType:function(e,t){new Array;return this.weekPlanInfo.Events.filter((function(n){return n.itemType==t&&new Date(n.start).getDay()==e}))},dateToFormat:function(e){e.getFullYear(),e.getMonth();var t=e.getDate();return this.dayNames[e.getDay()]+" "+t+" "+this.shortMonthNames[e.getMonth()]},addDay:function(e,t){var n=new Date(e);return n.setDate(n.getDate()+t),n},dateOnlyCompare:function(e,t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),i=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n>i?1:n<i?-1:0},getNotificationStyle:function(e){return{"background-color":e.viewed?"#FFF":"aliceblue","font-size":"0.8em",margin:"1px 0",padding:"2px"}},getNotificationAgeText:function(e){var t=1440,n=10080,i=Math.round((new Date-new Date(e.timestamp)).valueOf()/6e4);if(i<3)return"Lige nu";if(i>=60&&i<t){var s=Math.round(i/60);return s+(s>1?" timer":" time")}if(i>=t&&i<n){var a=Math.round(i/t);return a+(a>1?" dage":" dag")}if(i>=n){var r=Math.round(i/n);return r+(r>1?" uger":" uge")}return i+" minutter"},getNotificationHeaderStyle:function(){return{"background-color":"transparent","font-size":"1em",padding:"5px 10px",color:"#12798c"}},getNotificationTopHeaderStyle:function(){return{"background-color":"#FFF","font-size":"1em",padding:"5px 10px",color:"#12798c"}},getNotificationContentStyle:function(){return{"background-color":"#EEE",padding:"2px"}},getNewNotifications:function(){if(this.hasNotifications){var e=new Date;return this.weekPlanInfo.notifications.notificationlist.filter((function(t){return(e-new Date(t.timestamp)).valueOf()<36e5}))}return null},getOldNotifications:function(){if(this.hasNotifications){var e=new Date;return this.weekPlanInfo.notifications.notificationlist.filter((function(t){return(e-new Date(t.timestamp)).valueOf()>36e5}))}return null},shadeBlendConvert:function(e,t,n){if("number"!=typeof e||e<-1||e>1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||n&&"string"!=typeof n)return null;this.sbcRip||(this.sbcRip=function(e){var t=e.length,n={};if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=i(e[0].split("(")[1]),n[1]=i(e[1]),n[2]=i(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=i(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=-1,9!=t&&5!=t||(n[3]=s(n[2]/255*1e4)/1e4,n[2]=n[1],n[1]=n[0],n[0]=e>>24&255)}return n});var i=parseInt,s=Math.round,a=t.length>9,r=(a="string"==typeof n?n.length>9||"c"==n&&!a:a,e<0),o=(e=r?-1*e:e,n=n&&"c"!=n?n:r?"#000000":"#FFFFFF",this.sbcRip(t)),l=this.sbcRip(n);return o&&l?a?"rgb"+(o[3]>-1||l[3]>-1?"a(":"(")+s((l[0]-o[0])*e+o[0])+","+s((l[1]-o[1])*e+o[1])+","+s((l[2]-o[2])*e+o[2])+(o[3]<0&&l[3]<0?")":","+(o[3]>-1&&l[3]>-1?s(1e4*((l[3]-o[3])*e+o[3]))/1e4:l[3]<0?o[3]:l[3])+")"):"#"+(4294967296+16777216*s((l[0]-o[0])*e+o[0])+65536*s((l[1]-o[1])*e+o[1])+256*s((l[2]-o[2])*e+o[2])+(o[3]>-1&&l[3]>-1?s(255*((l[3]-o[3])*e+o[3])):l[3]>-1?s(255*l[3]):o[3]>-1?s(255*o[3]):255)).toString(16).slice(1,o[3]>-1||l[3]>-1?void 0:-2):null},initWidget:function(){var e=this;this.errors.push({message:"henter data"}),this.fetchingData=!0,this.axios.post(this.baseApiAddress+"weekinfo",this.aulaFilter,{headers:{Authorization:"bearer "+this.aulaToken,"x-aula-userprofile":this.userProfile,"x-aula-institutionfilter":this.institutionFilter,"Content-Type":"application/json"}}).then((function(t){e.fetchingData=!1,e.weekPlanInfo=t.data}))},readNotifications:function(){var e=this;this.axios.post(this.baseApiAddress+"notifications/updateviewed",this.aulaFilter,{headers:{Authorization:"bearer "+this.aulaToken,"x-aula-userprofile":this.userProfile,"x-aula-institutionfilter":this.institutionFilter,"Content-Type":"application/json"}}).then((function(t){if(null!=e.weekPlanInfo&&null!=e.weekPlanInfo.notifications&&null!=e.weekPlanInfo.notifications.notificationlist&&e.weekPlanInfo.notifications.notificationlist.length>0){for(var n=0;n<e.weekPlanInfo.notifications.notificationlist.length;n++)e.weekPlanInfo.notifications.notificationlist[n]&&(e.weekPlanInfo.notifications.notificationlist[n].read=!0);e.$emit("updateUnread",e.notViewedNotifications)}}))},listNotifications:function(){var e=this;null!=this.weekPlanInfo&&this.axios.post(this.baseApiAddress+"notifications/list",this.aulaFilter,{headers:{Authorization:"bearer "+this.aulaToken,"x-aula-userprofile":this.userProfile,"x-aula-institutionfilter":this.institutionFilter,"Content-Type":"application/json"}}).then((function(t){e.weekPlanInfo.notifications=t.data,e.$emit("updateUnread",e.notViewedNotifications)}))}}},computed:{aulaFilter:function(){return{sessionId:this.sessionUUID,group:""!=this.selectedGroup?this.selectedGroup:this.group,currentWeekNr:""!=this.selectedWeekNr?this.selectedWeekNr:this.currentWeekNumber,userProfile:this.userProfile,institutionFilter:this.institutionFilter,childFilter:""!=this.selectedChild?[this.selectedChild.trim()]:this.childFilter}},selectedGroupName:function(){var e=this;return this.group&&null!=this.weekPlanInfo.groups?this.weekPlanInfo.groups.filter((function(t){return t.GroupId==e.group})).Name:""},displaySelectedChild:function(){return""!=this.selectedChild?this.selectedChild.trim():this.childFilter[0]},isWidgetTest:function(){if(window.origin){if(window.origin.includes("widget-test"))return!0}else{if(!window.location.origin)return!1;if(window.location.origin.includes("widget-test"))return!0}},baseSchoolPortalUrl:function(){try{return this.isWidgetTest?"Https://skoleportal-udv.easyiqcloud.dk/":"Https://skoleportal.easyiqcloud.dk/"}catch(e){return"Https://skoleportal.easyiqcloud.dk/"}},notViewedNotifications:function(){return!this.fetchingData&&null!=this.weekPlanInfo&&null!=this.weekPlanInfo.notifications&&null!=this.weekPlanInfo.notifications.notificationlist&&this.weekPlanInfo.notifications.notificationlist.length>0?this.weekPlanInfo.notifications.notificationlist.filter((function(e){return 0==e.viewed})).length:0},hasNotifications:function(){return!this.fetchingData&&null!=this.weekPlanInfo&&null!=this.weekPlanInfo.notifications&&null!=this.weekPlanInfo.notifications.notificationlist&&this.weekPlanInfo.notifications.notificationlist.length>0},hasNewNotifications:function(){if(this.hasNotifications){var e=this.getNewNotifications();return null!=e&&e.length>0}},hasOldNotifications:function(){if(this.hasNotifications){var e=this.getOldNotifications();return null!=e&&e.length>0}},useHtmlWidgets:function(){return null!=this.weekPlanInfo&&null!=this.weekPlanInfo.weekplanconfiguration&&this.weekPlanInfo.weekplanconfiguration.usehtmlwidget}},watch:{aulaToken:function(){void 0!==this.aulaToken&&this.initWidget()},aulaFilter:function(){this.aulaToken=this.getAulaToken()}},created:function(){try{this.isWidgetTest&&(this.baseApiAddress="https://test-api.easyiqcloud.dk/api/aula/")}catch(e){}this.aulaToken=this.getAulaToken()}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0014V0001"},[n("div",{attrs:{"data-widgetversion":"1.4.5"}},[n("div",{staticClass:"p-2 d-flex align-items-center easyiq-wp-widgetheader"},[n("div",[e._v("Vigtig information "),null!=e.weekPlanInfo&&null!=e.weekPlanInfo.group?n("span",{staticClass:"pl-1"}
1,[e._v(e._s(e.weekPlanInfo.group.Name))]):e._e()]),e._v(" "),n("div",{staticClass:"pl-2"},[e.hasNotifications?n("div",{staticClass:"easyiq-wp-notificationbrand"},[n("b-button",{ref:"button",attrs:{variant:"outlined",id:"btnNotification"}},[n("b-img",{attrs:{id:"imgNotification",src:e.baseSchoolPortalUrl+"/Images/24/notification.png"},on:{click:function(t){return e.readNotifications()}}})],1),e._v(" "),e.notViewedNotifications>0?n("b-badge",{staticClass:"easyiq-wp-notificationbadge",attrs:{variant:"danger"}},[e._v("\n            "+e._s(e.notViewedNotifications)+"\n          ")]):e._e(),e._v(" "),e.hasNotifications?n("b-popover",{attrs:{target:"btnNotification",placement:"bottomleft",triggers:"focus"}},[n("div",{staticClass:"container",style:e.getNotificationContentStyle()},[n("div",{staticClass:"row"},[n("div",{staticClass:"col no-gutter"},[n("div",{style:e.getNotificationTopHeaderStyle()},[n("strong",[e._v("Notifikationer")])])])]),e._v(" "),e.hasNewNotifications?n("div",{staticClass:"row",style:e.getNotificationHeaderStyle()},[n("div",{staticClass:"col"},[e._v("\n                  Nye\n                ")])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},e._l(e.getNewNotifications(),(function(t){return n("div",[1==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("p",[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har oprettet et "),n("strong",[e._v("overblik")]),e._v(" til "),n("strong",[e._v(e._s(t.target.fullname))]),e._v(".")])]),n("br")],1)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("p",{staticStyle:{margin:"0",display:"inline"}},[n("i",{staticClass:"far fa-history"}),e._v(" "+e._s(e.getNotificationAgeText(t)))])])])])]):e._e(),e._v(" "),6==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("p",{staticStyle:{margin:"0"}},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har kommenteret "),n("strong",[e._v(e._s(t.target.fullname))]),e._v("'s "),n("strong",[e._v("elevplan")]),e._v(".")])])],1)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("p",{staticStyle:{margin:"0",display:"inline"}},[n("i",{staticClass:"far fa-history"}),e._v(" "+e._s(e.getNotificationAgeText(t)))])])])])]):2==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har oprettet en "),n("strong",[e._v("ugeplan")]),e._v(" for uge "+e._s(t.data[1])+" til "),n("strong",[e._v(e._s(t.target.fullname))]),e._v(".\n                          ")])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col text-left"},[n("p",{staticStyle:{margin:"0",display:"inline"}},[n("i",{staticClass:"far fa-history"}),e._v(" "+e._s(e.getNotificationAgeText(t)))])]),e._v(" "),n("div",{staticClass:"col text-right"},[n("div",{attrs:{role:"link"},on:{click:function(n){e.selectedWeekNr=t.data[0]+"-W"+t.data[1]}}},[e._v("GÃ¥ til uge "+e._s(t.data[1]))])])])])]):e._e()])})),0)]),e._v(" "),e.hasNewNotifications&&e.hasOldNotifications?n("div",{staticClass:"row",style:e.getNotificationHeaderStyle()},[n("div",{staticClass:"col"},[e._v("\n                  Tidligere\n                ")])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},e._l(e.getOldNotifications(),(function(t){return n("div",[1==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har oprettet et "),n("strong",[e._v("overblik")]),e._v(" til "+e._s(t.target.fullname)+".\n                            ")])],1)])])]):e._e(
1),e._v(" "),2==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har oprettet en "),n("strong",[e._v("ugeplan")]),e._v(" for uge "+e._s(t.data[1])+" til "),n("strong",[e._v(e._s(t.target.fullname))]),e._v(".\n\n                          ")])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col text-left"},[n("p",{staticStyle:{margin:"0",display:"inline"}},[n("i",{staticClass:"far fa-history"}),e._v(" "+e._s(e.getNotificationAgeText(t)))])]),e._v(" "),n("div",{staticClass:"col text-right"},[n("div",{attrs:{role:"link"},on:{click:function(n){e.selectedWeekNr=t.data[0]+"-W"+t.data[1]}}},[e._v("GÃ¥ til uge "+e._s(t.data[1]))])])])])]):e._e(),e._v(" "),3==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("p",{staticStyle:{margin:"0"}},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har kommenteret en "),n("strong",[e._v("elevplan")]),e._v(".")])])],1)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("p",{staticStyle:{margin:"0",display:"inline"}},[n("i",{staticClass:"far fa-history"}),e._v(" "+e._s(e.getNotificationAgeText(t)))])])])])]):e._e(),e._v(" "),6==t.notificationtypeid?n("div",{style:e.getNotificationStyle(t)},[n("div",{staticClass:"container text-left"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("b-link",{attrs:{target:"_blank",href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(e.baseSchoolPortalUrl+t.url)}},[n("p",{staticStyle:{margin:"0"}},[n("strong",[e._v(e._s(t.sender.fullname))]),e._v(" har kommenteret "),n("strong",[e._v(e._s(t.target.fullname))]),e._v("'s "),n("strong",[e._v("elevplan")]),e._v(".")])])],1)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("p",{staticStyle:{margin:"0",display:"inline"}},[n("i",{staticClass:"far fa-history"}),e._v(" "+e._s(e.getNotificationAgeText(t)))])])])])]):e._e()])})),0)])])]):e._e()],1):e._e()]),e._v(" "),n("div",{staticClass:"ml-auto easyiq-wp-classesDropdown"},[null!=e.weekPlanInfo.groups&&"employee"==e.userProfile.toLowerCase()?n("b-dropdown",{attrs:{text:"Klasser",right:"","toggle-class":"p-1 m-0 ",size:"sm",variant:"outline"}},e._l(e.weekPlanInfo.groups,(function(t){return n("b-dropdown-item",{key:t.Name,attrs:{value:t.GroupId,active:t.GroupId==t},on:{click:function(n){e.selectedGroup=t.GroupId}}},[e._v(e._s(t.Name))])})),1):e._e(),e._v(" "),"parent"==e.userProfile.toLowerCase()||"guardian"==e.userProfile.toLowerCase()?n("b-dropdown",{attrs:{text:"Barn","toggle-class":"p-1 m-0 easyiq-wp-classesDropdown",size:"sm",variant:"outline",right:""}},e._l(e.childFilter,(function(t){return n("b-dropdown-item",{key:t,attrs:{value:t},on:{click:function(n){e.selectedChild=t}}},[e._v(e._s(t))])})),1):e._e()],1)]),e._v(" "),n("div",{staticClass:"easyiq-wp-widgetsubheader"},["narrow"!=e.placement?n("div",[e._l(e.weekPlanInfo.links,(function(t){return null!=e.weekPlanInfo.links?[t.ssoenable?n("b-link",{staticClass:"p-2 widget-toplink",attrs:{href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(t.address),target:"_blank"}},[e._v(e._s(t.name))]):n("b-link",{staticClass:"p-2 widget-toplink",attrs:{href:t.address,target:"_blank"}},[e._v(e._s(t.name))])]:e._e()}))],2):n("div",[null!=e.weekPlanInfo.links?n("b-dropdown",{attrs:{text:"Links","toggle-class":"p-1 m-0 easyiq-wp-classesDropdown",size:"sm",variant:"outline"}},[e._l(e.weekPlanInfo.links,(function(t){return null!=e.weekPlanInfo.links?[t.ssoenable?n("b-dropdown-item",{staticClass:"p-2 widget-toplink",attrs:{href:e.baseSchoolPortalUrl+"aula/authuser/"+e.ssoLinkUrlParams(t.address),target:"_blank"}},[e._v(e._s(t.name))]):n("b-dropdown-item",{staticClass:"p-2 widget-toplink",attrs:{href:t.address,target:"_blank"}},[e._v(e._s(t.name))])]:e._e()}))],2):e._e()],1)])]),e._v(" "),null!=e.weekPlanInfo.ErrorCode?n("div",[n("b-alert",{attrs:{show:"",variant:"warning"}}
1,[e._v(e._s(e.weekPlanInfo.ErrorDescription))])],1):n("div",[e.fetchingData?n("div",{staticClass:"lds-css",staticStyle:{"align-content":"center",height:"5em",width:"5em"}},[e._m(0)]):e._e(),e._v(" "),e.fetchingData?e._e():n("div",[n("div",{staticClass:"easyiq-wp-weekinfocontainer"},[n("div",{staticClass:"easyiq-wp-weekinfocontaineruser"},["guardian"==e.userProfile.toLowerCase()?n("span",[e._v(e._s(e.displaySelectedChild))]):e._e()]),e._v(" "),n("div",{staticClass:"easyiq-wp-weekinfocontainerlinks"},[n("div",{staticClass:"easyiq-wp-todayweekcontainer"},[n("div",{attrs:{role:"link"},on:{click:function(t){e.selectedWeekNr=e.weekPlanInfo.weekinfo.todaysweeknr}}},[e._v("I dag")])]),e._v(" "),n("div",[n("div",{attrs:{role:"link"},on:{click:function(t){e.selectedWeekNr=e.weekPlanInfo.weekinfo.prevweeknr}}},[n("i",{staticClass:"fal fa-chevron-circle-left easyiq-wp-arrowcirle"})])]),e._v(" "),n("div",{staticClass:"easyiq-wp-currentweekcontainer"},[null!=e.weekPlanInfo.weekinfo?n("span",[e._v(e._s(e.weekPlanInfo.weekinfo.currentweeknr))]):e._e()]),e._v(" "),n("div",[n("div",{attrs:{role:"link"},on:{click:function(t){e.selectedWeekNr=e.weekPlanInfo.weekinfo.nextweeknr}}},[n("i",{staticClass:"fal fa-chevron-circle-right easyiq-wp-arrowcirle"})])])])]),e._v(" "),n("div",{staticClass:"easyiq-wp-events"},[n("div",{staticClass:"easyiq-wp-eventContainer"},[n("table",{staticClass:"easyiq-wp-weekcontainer",attrs:{"data-wptype":"8"}},[e._l(5,(function(t){return[n("tr",[n("td",{staticClass:"sm easyiq-wp-dayevent-header"},[n("p",[e._v(e._s(e.dateToFormat(e.addDay(e.weekPlanInfo.fromDate,t-1))))])])]),e._v(" "),null!=e.weekPlanInfo.Events&&e.weekPlanInfo.Events.length>0?n("tr",[n("td",{staticClass:"easyiq-wp-weekday"},[e._l(e.eventsByDateAndType(t,8),(function(t){return[n("div",{key:t.itemid,staticClass:"easyiq-wp-dayinformationevent",style:{backgroundColor:"#fff",borderRadius:"4px",border:"1px solid "+e.shadeBlendConvert(-.15,t.color)},attrs:{"data-itemeventype":"8"}},[n("div",{style:{textAlign:"right",padding:"0.4em",fontWeight:"bold"}},[e._v(e._s(t.activities))]),e._v(" "),n("p"),e.useHtmlWidgets?n("div",[n("widget-html",{staticClass:"p-1",staticStyle:{"white-space":"pre-wrap"},attrs:{html:t.description}})],1):n("div",{staticClass:"p-1",staticStyle:{"white-space":"pre-wrap","overflow-wrap":"break-word"}},[e._v(e._s(t.description))]),e._v(" "),n("p"),e._v(" "),n("div",{style:{height:"10px",borderRadius:"0 0 3px 3px",backgroundColor:t.color}})])]}))],2)]):e._e()]}))],2)])])])]),e._v(" "),n("div",{staticClass:"bg-info",staticStyle:{"min-height":"20px"}})])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"lds-ring"},[t("div"),t("div"),t("div"),t("div"),t("div")])}],!1,null,null,null);t.a=a.exports},825:function(e,t,n){"use strict";var i=n(87),s=n.n(i),a=n(17),r=n.n(a),o=n(47),l=n.n(o),c=n(7),u=n.n(c);function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var m,p,v,f,g,_={WidgetHeader:{name:"WidgetHeader",props:{widgetName:{type:String,required:!0}},render:function(e){var t;return e("div",[e("div",{class:"widget-header d-flex align-items-end"},[e("h2",[null===(t=this.widgetName)||void 0===t?void 0:t.toString()]),e("p",{class:"ml-auto"},["Educa Personale"])]),e("div",{class:"widget-header-separator"},[])])}}}
1,E=function(){function e(i,s){if(i>23||i<0)throw"Hour must be between 0 and 23";if(s>59||s<0)throw"Minute must be between 0 and 59";return i=Math.floor(i),s=Math.floor(s),{hour:i,minute:s,addHours:function(t){var n=i+t;return n>23?e(23,59):n<0?e(0,0):e(n,s)},addDuration:function(t){var n=60*i+s+t.totalMinutes;return n<0?e(0,0):n>=1440?e(23,59):e(Math.floor(n/60),n%60)},addMinutes:function(e){return this.addDuration(t(e))},compare:function(e){return this.isBefore(e)?-1:this.isSame(e)?0:1},durationTo:function(e){if(this.isAfter(e))throw"The other time point must be after or same as this time point";return e.hour===i?t(e.minute-s):t(60*(e.hour-i-1)+(60-s)+e.minute)},format:function(e){if("input"===e)return n(i)+":"+n(s);throw new Error('Unknown time point format "'+e+'"')},isAfter:function(e){return e.hour<i||e.hour===i&&e.minute<s},isBefore:function(e){return e.hour>i||e.hour===i&&e.minute>s},isSame:function(e){return e.hour===i&&e.minute===s},startOfHour:function(){return e(i,0)},toJSON:function(){return n(i)+":"+n(s)},toString:function(){return i.toString()+":"+n(s)}}}function t(e){return{totalMinutes:e,isSame:function(t){return e===t.totalMinutes},toString:function(t){var i=Math.floor(e/60),s=e%60;return"human"===t?(i>0||0==s?i+" "+(1==i?"time":"timer"):"")+(s>0?" "+(s+" "+(1==s?"minut":"minutter")):""):i+":"+n(s)}}}function n(e){return e<10?"0"+e.toString():e.toString()}return{parsePoint:function(t){var n=t.match(/([0-9]?[0-9]):([0-9][0-9])/);if(n&&n[0]===t){var i=l()(n,3),s=i[1],a=i[2];return e(Number.parseInt(s,10),Number.parseInt(a,10))}return null},point:e,duration:t,parseDuration:function(e){var n=e.match(/([0-9]+):([0-9][0-9])/);if(n&&n[0]===e){var i=l()(n,3),s=i[1],a=i[2],r=Number.parseInt(a,10);if(r>59||r<0)throw"Minute must be between 0 and 59";var o=Number.parseInt(s,10);if(o<0)throw"Hours must be greater than or equal to 0";return t(60*o+r)}return null}}}(),A=function(){var e=0,t=1,n=2,i=0,s=1;function a(e){if(!e||!e.fallback)throw new Error('Fallback value is not set in "options", or "options" is not an object.');this._actualItems=[e.fallback],this._actualValue=e.fallback.value,this._desiredItems=[],this._desiredValue=e.initial,this._options={change:e.change||function(){},preselectFirst:!!e.preselectFirst,fallback:e.fallback}}return a.prototype={get value(){return this._actualValue},get items(){return this._actualItems},select:function(e){this._desiredValue=e,this._synchronize(!1)},reset:function(e){this._desiredValue=e,this._synchronize(!0)},update:function(e){this._desiredItems=e.filter((function(e){return void 0!==e.value})),this._synchronize(!0)},_synchronize:function(a){var o,l,c,u=this,d=this._actualValue,h=(o=this._desiredItems,l=this._desiredValue,c=this._options.preselectFirst,0===o.length?{items:s,value:t}:void 0!==l&&o.some((function(e){return!e.disabled&&e.value===l}))?{items:i,value:e}:c&&void 0!==o.find((function(e){return!e.disabled}))?{items:i,value:n}:{items:s,value:t}),m=h.value,p=h.items,v=m===e?this._desiredValue:m===t?this._options.fallback.value:m===n?this._desiredItems.find((function(e){return!e.disabled})).value:void 0,f=p===i?this._desiredItems:p===s?[this._options.fallback].concat(r()(this._desiredItems)):[];this._actualValue=v,this._actualItems=f,(a||d!==v)&&setTimeout((function(){return u._options.change(v,a)}))}},{SingleSelection:a}}(),T=function(){function e(e,t){t=void 0===t||!!t,this.isSuccess=t,this.value=t?e:void 0,this.error=t?void 0:e}return e.prototype.then=function(t,n){return this.isSuccess?t?e.from(t(this.value)):this:n?e.from(n(this.error)):this},e.prototype.catch=function(e){return this.then(void 0,e)},e.success=function(t){return new e(t,!0)},e.error=function(t){return new e(t,!1)},e.from=function(t){return t instanceof e?t:e.success(t)},{Result:e}}(),b=function(e){var t=e.Result;function n(e){this._isAvailable=!!e.isAvailable,this._initialTextValue=e.initialTextValue||"",this._change=e.change||function(){},this._validate=e.validate||function(e){return t.from(e)},this.textValue=this._initialTextValue}return n.prototype={get availableValue(){return this._isAvailable?this.value:null}
1,get value(){return this._validate(this.textValue)},set:function(e){this._isAvailable=!0,this.textValue=e,this._change(this.value,!1)},reset:function(e){this._isAvailable=!1,this.textValue=void 0===e?this._initialTextValue:e,this._change(this.value,!0)},validate:function(){return this._isAvailable=!0,this.value}},{ValidatedValue:n}}(T),C=function(e,t,n){var i=t,s=e.Result,a=n.ValidatedValue;function r(e){var t,n,i=this;this.input=new a({change:function(e,t){return i._change(e,t)},initialTextValue:null===(t=e.initialValue)||void 0===t?void 0:t.format("input"),isAvailable:e.isAvailable,validate:function(t){return o(t).then((function(t){var n,i;return null!==(n=null===(i=e.validate)||void 0===i?void 0:i.call(e,t))&&void 0!==n?n:t}))}}),this._change=null!==(n=e.change)&&void 0!==n?n:function(){}}function o(e){var t=(e||"").trim();if(0==t.length)return s.error("Vælg et tidspunkt");var n=i.parsePoint(t);return n?s.success(n):s.error("Vælg et tidspunkt")}return r.prototype={get availableValue(){return this.input.availableValue},get textValue(){return this.input.textValue},set textValue(e){this.input.textValue=e},get value(){return this.input.value},set:function(e){this.input.set(null==e?void 0:e.format("input"))},reset:function(e){var t;this.input.reset(void 0!==e?null!==(t=null==e?void 0:e.format("input"))&&void 0!==t?t:null:void 0)},validate:function(){return this.input.validate()}},{ValidatedTime:r,validTime:o}}(T,E,b),k=function(e,t){var n=e.Result,i=t.SingleSelection;function s(e){var t=this;this.input=new i({initial:e.initial,fallback:e.fallback,preselectFirst:e.preselectFirst,change:function(n,i){var s;i||(t._isAvailable=!0),null===(s=e.change)||void 0===s||s.call(e,t._validate(n),i)}}),this._isAvailable=!!e.isAvailable,this._isReset=!1,this._validate=function(t){var i,s;return void 0===t||void 0!==e.fallback&&t===e.fallback.value?n.error("Vælg en værdi"):null!==(i=null===(s=e.validate)||void 0===s?void 0:s.call(e,t))&&void 0!==i?i:n.from(t)}}return s.prototype={get availableValue(){return this._isAvailable?this.value:null},get value(){return this._validate(this.input.value)},set:function(e){this._isAvailable=!0,this.input.select(e)},reset:function(e){this._isAvailable=!1,this.input.reset(e)},update:function(e){this.input.update(e)},validate:function(){return this._isAvailable=!0,this.value}},{ValidatedSingleSelection:s}}(T,A),y=function(){var e;function t(){}t.prototype.toString=function(){return"Canceled"};var n={errorCaptured:function(e){return!l(e)}};var i=/["&'<>]/g;var a=/[\$\(-\+\.\?\[-\^\{-\}]/g,o=new RegExp(a.source,"u");function l(e){return e instanceof t}function c(e){return e&&"function"==typeof e}function u(e,t){return e===t}return e={areArraysEqual:function(e,t,n){var i;if(n=null!==(i=n)&&void 0!==i?i:u,e.length!==t.length)return!1;for(var s=0;s<e.length;++s)if(!n(e[s],t[s]))return!1;return!0},areSetsEqual:function(e,t,n){var i,a,o;if(n=null!==(i=n)&&void 0!==i?i:u,(null!==(a=e.length)&&void 0!==a?a:e.size)!==(null!==(o=t.length)&&void 0!==o?o:t.size))return!1;var l,c=r()(t),h=d(e);try{var m=function(){var e=l.value,t=c.findIndex((function(t){return n(t,e)}));if(-1===t)return{v:!1};c.splice(t,1)};for(h.s();!(l=h.n()).done;){var p=m();if("object"===s()(p))return p.v}}catch(e){h.e(e)}finally{h.f()}return 0===c.length},canceled:function(){return new t},escapeHtml:function(e){var t;return(e=null===(t=e)||void 0===t?void 0:t.toString())&&e.replace(i,(function(e){switch(e){case"&":return"&amp;";case'"':return"&quot;";case"'":return"&#39;";case"<":return"&lt;";case">":return"&gt;"}}))},escapeRegExp:function(e){var t;return(e=null===(t=e)||void 0===t?void 0:t.toString())&&o.test(e)?e.replace(a,"\\$&"):e},IgnoreCanceledMixin:n,isCanceled:l,isPromise:function(e){return e&&c(e.then)},isFunction:c,isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},strictEqual:u,toPromise:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return c(e)?new Promise((function(n){return n(e.apply(t,i))})):Promise.resolve(e)}},e}(),I=function(e){var t=e.isString,n=e.toPromise;function i(){this.items=[]}return i.prototype={get empty(){return 0===this.items.length},get top(){return 0==this.items.length?null:this.items[this.items.length-1]},add:function(e,t){var n=this.items.findIndex((function(t){return t.id===e}));-1!==n&&this.items.splice(n,1),this.items.push({id:e,message:t})},remove:function(e){var t=this.items.findIndex((function(t){return t.id===e}));-1!==t&&this.items.splice(t,1)},track:function(e,i){var s=this,a=t(e)?{id:"default",message:e}:{id:e.id,message:e.message},r=a.id,o=a.message;this.add(r,o);var l=n(i);return l.then((function(){return setTimeout((function(){return s.remove(r)}),0)}),(function(e){return setTimeout((function(){return s.remove(r)}),0),Promise.reject(e)})),l}},{ProgressList:i}}(y),S=function(e){var t=e.ProgressList;return{ProgressIndicator:{name:"ProgressIndicator",props:{establishBfc:{type:Boolean,default:!0},small:{type:Boolean,default:!1},viewModel:{type:t,required:!0}},computed:{message:function(){var e=this.viewModel.top;return e?e.message:null},visible:function(){return!this.viewModel.empty}},render:function(e){var t;return e("div",{class:{"progress-indicator-root":this.establishBfc}},[this.visible?e("div",{class:"progress-indicator-status"},[e("div",[e("b-spinner",{props:{small:this.small}},[])]),e("div",{class:"ml-1"},[null===(t=this.message)||void 0===t?void 0:t.toString()])]):e("div",[]),e("div",{class:"progress-indicator-content",attrs:{"data-obscured":this.visible}},this.$slots.default)])}}}}
1(I),D=(v=(m=y).canceled,f=m.isString,g=m.toPromise,p={combine:function(e,t){return function(n){var i=e(n);return t(i)}},debounce:function(e,t){var n,i;return function(){var s=arguments,a=this,o=new Promise((function(o,l){var c;null===(c=n)||void 0===c||c(v()),n=l,clearTimeout(i),i=setTimeout((function(){g.apply(void 0,[e,a].concat(r()(s))).then((function(e){n=void 0,i=void 0,o(e)}),(function(e){n=void 0,i=void 0,l(e)}))}),t)}));return o}},last:function(e){var t,n=(t=0,{is:function(e){return e===t},increment:function(){return++t}});return function(){var t=arguments,i=this;return new Promise((function(s,a){var o=n.increment();g.apply(void 0,[e,i].concat(r()(t))).then((function(e){n.is(o)?s(e):a(v())}),(function(e){n.is(o)?a(e):a(v())}))}))}},once:function(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}},withFocusRestore:function(e,t){return function(){var i=document.activeElement;return g(e.apply(this,arguments)).then((function(e){return setTimeout((function(){return n(t,i)}),0),e}),(function(e){return setTimeout((function(){return n(t,i)}),0),Promise.reject(e)}))};function n(e,t){var n,i=d(e=Array.isArray(e)?e:[e]);try{for(i.s();!(n=i.n()).done;){var s=n.value,a="activeElement"===s?t:f(s)?document.querySelector(s):s;if(a&&(a.focus(),a===document.activeElement))break}}catch(e){i.e(e)}finally{i.f()}}},retry:function(e,t,n){return function(){var i=arguments,s=this,a=0,r=[],o=new Promise((function(o,l){(function i(){var s=arguments,c=this;g.apply(void 0,[e,this].concat(Array.prototype.slice.call(arguments))).then(o,(function(e){r.push(e),a<t?(++a,setTimeout((function(){return i.apply(c,s)}),n||0)):l(r)}))}).apply(s,i)}));return o}},throttle:function(e,t){var n=!1,i={};return function(){if(i.arguments=arguments,i.this=this,n)return Promise.resolve(null);n=!0;var s=new Promise((function(s,a){setTimeout((function(){var t=i.this,o=i.arguments;i.this=void 0,i.arguments=void 0,g.apply(void 0,[e,t].concat(r()(o))).then((function(e){s(e),n=!1}),(function(e){a(e),n=!1}))}),t)}));return s}}},p),w=function(e){return{ValidatedValueInput:{name:"ValidatedValueInput",inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},type:{type:String,default:"text"},viewModel:{type:Object,required:!0},showSuccessStateOnInput:{type:Boolean,required:!1,default:!0}},computed:{invalidFeedback:function(){var e=this.viewModel.availableValue;return e&&!e.isSuccess?e.error:null},state:function(){var e=this.viewModel.availableValue;return e?e.isSuccess:null}},methods:{set:e.debounce((function(e){this.viewModel.set(e)}),200)},render:function(e){return e("b-form-group",{props:{invalidFeedback:this.invalidFeedback,label:this.label,labelFor:this.id,state:this.state}},[e("b-form-input",{attrs:this.$attrs,props:{id:this.id,state:this.showSuccessStateOnInput||!0!==this.state?this.state:null,type:this.type,value:this.viewModel.textValue},on:{input:this.set.bind(this)}},[])])}}}}(D),N=function(e){return{ValidatedTimeInput:{name:"ValidatedTimeInput",components:{"validated-value-input":e.ValidatedValueInput},inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},showSuccessStateOnInput:{type:Boolean,required:!1,default:!0},viewModel:{type:Object,required:!0}},render:function(e){return e("validated-value-input",{attrs:this.$attrs,props:{id:this.id,label:this.label,showSuccessStateOnInput:this.showSuccessStateOnInput,type:"time",viewModel:this.viewModel.input}},[])}}}}(w),R=function(e){return{ValidatedDateInput:{name:"ValidatedDateInput",components:{"validated-value-input":e.ValidatedValueInput},inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},showSuccessStateOnInput:{type:Boolean,required:!1,default:!0},viewModel:{type:Object,required:!0}},render:function(e){return e("validated-value-input",{attrs:this.$attrs,props:{id:this.id,label:this.label,showSuccessStateOnInput:this.showSuccessStateOnInput,type:"date",viewModel:this.viewModel.input}},[])}}}}(w),O=function(e,t){var n=t.SingleSelection;return{SingleSelectionInput:{name:"SingleSelectionInput",inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},viewModel:{type:n,required:!0}},methods:{select:e.debounce((function(e){this.viewModel.select(e)}),200)},render:function(e){return e("b-form-group",{props:{label:this.label,labelFor:this.id}},[e("b-form-select",{attrs:this.$attrs,props:{id:this.id,options:this.viewModel.items,plain:!0,value:this.viewModel.value},on:{change:this.select.bind(this)}},[])])}}}}(D,A),L=function(e){return{ValidatedSingleSelectionInput:{name:"ValidatedSingleSelectionInput",components:{"single-selection-input":e.SingleSelectionInput},inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},showSuccessStateOnInput:{type:Boolean,required:!1,default:!0},viewModel:{type:Object,required:!0}},computed:{invalidFeedback:function(){var e=this.viewModel.availableValue;return e&&!e.isSuccess?e.error:null},state:function(){var e=this.viewModel.availableValue;return e?e.isSuccess:null}},render:function(e){return e("b-form-group",{props:{invalidFeedback:this.invalidFeedback,label:this.label,labelFor:this.id,state:this.state}},[e("b-form-select",{attrs:this.$attrs,props:{id:this.id,options:this.viewModel.input.items,plain:!0,state:this.showSuccessStateOnInput||!0!==this.state?this.state:null,value:this.viewModel.input.value},on:{change:this.viewModel.input.select.bind(this.viewModel.input)}},[])])}}}}(O),x=function(e,t){var n=e.isCanceled,i=e.isPromise,s=e.toPromise,a=t.Result;function r(){this.items=[]}return r.prototype={get empty(){return 0==this.items.length},add:function(e){var t,n=this,i=e.id,s=e.message,a=e.details,r=e.retryCallback,o=e.dismissible;i=null!==(t=i)&&void 0!==t?t:"default";var l=this.items.findIndex((function(e){return e.id===i}));if(-1===l)this.items.push({id:i,dismissible:o,message:u(s,a),dism
1iss:function(){n.remove(i)},retry:r});else{var c=this.items[l];c.message=u(s,a),c.dismissible=o,c.retry=r}function u(e,t){return null==t||""===t?e:e+" ("+t+")"}},clear:function(){this.items.splice(0)},has:function(e){return-1!==this.items.findIndex((function(t){return t.id===e}))},remove:function(e){var t=this.items.findIndex((function(t){return t.id===e}));-1!==t&&this.items.splice(t,1)},retryAll:function(){this.items.map((function(e){return e.retry})).filter((function(e){return e})).forEach((function(e){return e()}))},track:function(e,t){var r=this,o=e.id||"default",l=e.message||e,c=e.retry,u=void 0===e.dismissible||!!e.dismissible,d=void 0===c||!1===c?a.from(null):!0===c?i(t)?a.error('Cannot retry a promise. Assign a retry function to "options.retry" are use a function instead of a promise.'):a.from((function(){return r.track(e,t)})):a.from(c);return d.isSuccess?(this.remove(o),s(t).catch((function(e){if(!n(e))return r.add({id:o,message:l,details:e,retryCallback:d.value,dismissible:u}),Promise.reject(e)}))):Promise.reject(new Error(d.error))}},{ErrorList:r}}
1(y,T),P={ErrorIndicator:{name:"ErrorIndicator",props:{viewModel:{type:x.ErrorList,required:!0}},computed:{showRetryAll:function(){return this.viewModel.items.reduce((function(e,t){return e+(t.retry?1:0)}),0)>1}},render:function(e){var t=this;return e("div",[].concat(r()(this.viewModel.items.map((function(t){var n;return e("b-alert",{class:"d-flex flex-wrap",props:{dismissible:t.dismissible,dismissLabel:"Luk",show:!0,variant:"danger"},on:{dismissed:function(){t.dismiss()}},key:t.id},[null===(n=t.message)||void 0===n?void 0:n.toString()].concat(r()(t.retry?[e("b-link",{class:"ml-auto",on:{click:function(){t.retry()}}},"Prøv igen")]:[])))}))),[this.showRetryAll?e("div",{class:"d-flex flex-row-reverse mx-3"},[e("b-link",{on:{click:function(){t.viewModel.retryAll()}}},"Prøv alle igen")]):""]))}}},M=function(){function e(i,s){if(s.isBefore(i))throw"End must be after start";return i.isSame(s)?t():{start:i,end:s,empty:!1,contains:function(e){return s.isAfter(e)&&!i.isAfter(e)},duration:function(){return i.durationTo(s)},intersect:function(n){if(!this.intersectsWith(n))return t();var a=i.compare(n.start),r=s.compare(n.end);return e(a>0?i:n.start,r<0?s:n.end)},intersectsWith:function(e){return!e.empty&&(i.isBefore(e.end)&&s.isAfter(e.start))},isSame:function(e){return!e.empty&&(i.isSame(e.start)&&s.isSame(e.end))},iterate:u.a.mark((function e(t){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.start;case 1:return e.next=3,n;case 3:n=t(n);case 4:if(n.isBefore(this.end)){e.next=1;break}case 5:case"end":return e.stop()}}),e,this)})),map:function(n,a){var r=n(i),o=(null!=a?a:n)(s);return o.isBefore(r)?t():e(r,o)},span:function(t){return t.empty?this:e(t.start.isBefore(i)?t.start:i,t.end.isBefore(s)?s:t.end)},split:function(t){var i=this,s=[];do{var a=t(i.start);if(!a.isBefore(i.end)||!a.isAfter(i.start))return s.push(i),n(s);s.push(e(i.start,a)),i=e(a,i.end)}while(!i.empty);return n(s)},subtract:function(t){if(t.empty)return n([this]);if(i.compare(t.end)>=0)return n([this]);if(s.compare(t.start)<=0)return n([this]);var a=i.compare(t.start),r=s.compare(t.end);return a>0?r<=0?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n([e(t.end,s)]):0==a?r>0?n([e(t.end,s)]):{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n(r>0?[e(i,t.start),e(t.end,s)]:[e(i,t.start)])},subtractSum:function(e){var t=this;return e.empty?n([this]):e.periods.map((function(e){return t.subtract(e)})).reduce((function(e,t){return e.intersect(t)}))},toString:function(){return i.toString()+" - "+s.toString()}}}function t(){return{empty:!0,contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},isSame:function(e){return e.empty},iterate:u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})),map:function(){return this},span:function(e){return e},split:function(){return this},subtract:function(){return this},subtractSum:function(){return{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}},toString:function(){return""}}}function n(t){return 0===(t=t.filter((function(e){return!e.empty}))).length?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:((t=function(e){return e.reduce((function(e,t){return function(e,t){var n=(c=e,u=function(e){return e.intersectsWith(t)},c.reduce((function(e,t){var n=l()(e,2),i=n[0],s=n[1];return(u(t)?i:s).push(t),[i,s]}),[[],[]])),i=l()(n,2),s=i[0],a=i[1],o=s.reduce((function(e,t){return e.span(t)}),t);var c,u;return[o].concat(r()(a))}(e,t)}),[])}(t)).sort((function(e,t){return e.start.compare(t.start)})),{empty:!1,periods:t,contains:function(e){return t.some((function(t){return t.contains(e)}))},intersect:function(e){return n(t.map((function(t){return e.periods.map((function(e){return t.intersect(e)}))})).reduce((function(e,t){return e.concat(t)}),[]))},intersectsWith:function(e){return t.some((function(t){return e.periods.some((function(e){return t.intersectsWith(e)}))}))},joinAdjacent:function(i){return 0===t.length?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n(t.reduce((function(t,n){if(0===t.result.length)return{result:[n],lastJoinable:i(n)};var s=t.result[t.result.length-1],a=i(n);if(s.end.isSame(n.start)&&t.lastJoinable&&a){var r=e(s.start,n.end);return t.result[t.result.length-1]=r,{result:t.result,lastJoinable:!0}}return t.result.push(n),{result:t.result,lastJoinable:a}}),{result:[]}).result)},split:function(e){return n(t.map((function(t){return t.split(e).periods})).reduce((function(e,t){return e.concat(t)}),[]))},toString:function(){return t.map((function(e){return e.toString()})).join(", ")},union:function(e){return e.empty?this:n([].concat(r()(t),r()(e.periods)))}})}return{empty:t,nonEmpty:e,sum:n}}(),F=function(e,t,n){var i=e,s=t.Result,a=n.ValidatedTime,r=n.validTime;function o(e){var t,n,i,s=this;this.start=new a({initialValue:null===(t=e.initialValue)||void 0===t?void 0:t.start,isAvailable:!!e.isAvailable,change:function(e,t){return s._changeOfStart(e,t)},validate:function(e){return s._validStart(e)}}),this.end=new a({initialValue:null===(n=e.initialValue)||void 0===n?void 0:n.end.addMinutes(-1).format("input"),isAvailable:!!e.isAvailable,change:function(e,t){return s._changeOfEnd(e,t)},validate:function(e){return s._validEnd(e)}}),this._change=null!==(i=e.change)&&void 0!==i?i:function(){},this._isAvailable=!!e.isAvailable,this._isSynchronizingStartAndEnd=!1}return o.prototype={get availableValue(){return this._isAvailable?this.value:null}
1,get value(){return this._validPeriod(this.start.value,this.end.value)},set:function(e){this._isAvailable=!0,this._isSynchronizingStartAndEnd=!0;try{var t;this.start.set(e.start),this.end.set(null===(t=e.end)||void 0===t?void 0:t.addMinutes(-1))}finally{this._isSynchronizingStartAndEnd=!1}this._change(this.value,!1)},reset:function(e){this._isAvailable=!1,this._isSynchronizingStartAndEnd=!0;try{var t,n,i;this.start.reset(void 0===e?void 0:null!==(t=null==e?void 0:e.start)&&void 0!==t?t:null),this.end.reset(void 0===e?void 0:null!==(n=null==e||null===(i=e.end)||void 0===i?void 0:i.addMinutes(-1))&&void 0!==n?n:null)}finally{this._isSynchronizingStartAndEnd=!1}this._change(this.value,!0)},validate:function(){this._isAvailable=!0;var e=this.start.validate(),t=this.end.validate();return this._validPeriod(e,t)},_changeOfStart:function(e,t){this._isSynchronizingStartAndEnd||this._change(this._validPeriod(e,this.end.value),t)},_changeOfEnd:function(e,t){this._isSynchronizingStartAndEnd||this._change(this._validPeriod(this.start.value,e),t)},_validPeriod:function(e,t){return e.then((function(e){return t.then((function(t){return i.nonEmpty(e,t.addMinutes(1))}))}))},_validStart:function(e){return r(this.end.textValue,this._bounds,this._moment).then((function(t){return e.compare(t)>=0?s.error("Starttid skal være inden sluttid"):s.success(e)}),(function(){return e}))},_validEnd:function(e){return r(this.start.textValue,this._bounds,this._moment).then((function(t){return t.compare(e)>=0?s.error("Sluttid skal være efter starttid"):s.success(e)}),(function(){return e}))}},{ValidatedTimePeriod:o}}(M,T,C),U=function(e){var t=e.Future;return{AulaTokenMixin:{data:function(){return{aulaToken:void 0,aulaTokenFuture:new t}},computed:{token:function(){return this.aulaTokenFuture.promise}},watch:{aulaToken:function(e){null!=e&&(this.aulaTokenFuture.resolve(e),this.aulaTokenFuture=new t,this.aulaTokenFuture.resolve(e))}},mounted:function(){this.aulaToken=this.getAulaToken()}}}}(function(){function e(){var e=this;this.promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return e.prototype.reject=function(e){this._reject(e)},e.prototype.resolve=function(e){this._resolve(e)},{Future:e}}()),B=function(){function e(e,n,i,s){return t(s()().year(e).month(n-1).date(i).hour(0).minute(0).second(0).millisecond(0))}function t(e){if(!e.isValid()){var n=function(e){switch(e.invalidAt()){case 0:return"Year value ".concat(e.year()," is invalid");case 1:return"Month value ".concat(e.month()," is invalid");case 2:return"Day value ".concat(e.date()," is invalid");default:return null}}(e);throw new Error("Invalid date".concat(n?". "+n:"","."))}return{_value:e,get year(){return this._value.year()},get month(){return this._value.month()+1},get day(){return this._value.date()},get dayOfWeek(){var e=this._value.day();return 0==e?6:e-1},addDays:function(e){return t(this._value.clone().add(e,"days"))},compare:function(e){return this._value.diff(e._value,"days")},format:function(e){switch(e){case"dayofweek":return this._value.format("dddd");case"input":return this._value.format("YYYY-MM-DD");default:throw new Error('Unknown date point format "'.concat(e,'"'))}},isAfter:function(e){return this._value.isAfter(e._value)},isBefore:function(e){return this._value.isBefore(e._value)},isSame:function(e){return this._value.isSame(e._value)},toJSON:function(){return this._value.format("YYYY-MM-DD")},toString:function(){return this._value.format("L")}}}return{parsePoint:function(t,n){var i=t.match(/([0-9]{1,5})\x2D([0-9]{1,2})\x2D([0-9]{1,2})/);if(i&&i[0]===t){var s=l()(i,4),a=s[1],r=s[2],o=s[3];return e(Number.parseInt(a,10),Number.parseInt(r,10),Number.parseInt(o,10),n)}return null},point:e,wrapMoment:function(e){return t(e.clone().hour(0).minute(0).second(0).millisecond(0))}}}(),V=function(e,t,n){var i=e,s=t.Result,a=n.ValidatedValue;function r(e,t){var n,i,s=this;this.input=new a({change:function(e,t){return s._change(e,t)},initialTextValue:null===(n=e.initialValue)||void 0===n?void 0:n.format("input"),isAvailable:e.isAvailable,validate:function(n){return o(n,s._bounds,t).then((function(t){var n,i;return null!==(n=null===(i=e.validate)||void 0===i?void 0:i.call(e,t))&&void 0!==n?n:t}))}}),this._bounds=e.bounds,this._change=null!==(i=e.change)&&void 0!==i?i:function(){}}function o(e,t,n){if(""===(null!=e?e:""))return s.error("Indtast dato");var a=i.parsePoint(e,n);return a?!1===(null==t?void 0:t.contains(a))?s.error("Datoen skal være inden for perioden (".concat(t.start.toString()," - ").concat(t.end.addDays(-1).toString(),")")):s.success(a):s.error("Ugyldig dato")}return r.prototype={get availableValue(){return this.input.availableValue},get textValue(){return this.input.textValue},set textValue(e){this.input.textValue=e},get value(){return this.input.value},set:function(e,t){void 0!==t&&(this._bounds=t),this.input.set(null==e?void 0:e.format("input"))},reset:function(e,t){var n;void 0!==t&&(this._bounds=t),this.input.reset(void 0!==e?null!==(n=null==e?void 0:e.format("input"))&&void 0!==n?n:null:void 0)},validate:function(){return this.input.validate()}},{ValidatedDate:r,validDate:o}}(B,T,b),W=function(e,t,n){var i=e,s=t,a=n;function r(e,t,n){this._moment=n,this._axios=function(){return t().then((function(t){return e().create({headers:{Authorization:t}})}))}}return r.prototype={addAbsence:function(e){return this._axios().then((function(t){var n,i;return t.post("https://personale.api.kmd.dk/aula/api/v2/absences/",{description:e.description,endTime:null===(n=e.timePeriod)||void 0===n?void 0:n.end.addMinutes(-1),reasonId:e.reasonId,schoolCode:e.schoolCode,showInAulaAndWeb:e.showInAulaAndWeb,startDate:e.startDate,
1startTime:null===(i=e.timePeriod)||void 0===i?void 0:i.start},{responseType:"json"})})).then((function(e){return e.data}),i.responseError)},schools:function(e){var t=this;return this._axios().then((function(t){return t.get("https://personale.api.kmd.dk/aula/api/v2/absences/schools?".concat(i.arrayToQueryString("schoolCodes",e)),{responseType:"json"})})).then((function(e){return e.data.map((function(e){return{code:e.code,name:e.name,schoolYears:e.schoolYears.map((function(n){return{absenceReasons:n.absenceReasons,name:n.name,period:a.nonEmpty(s.parsePoint(n.period.start,t._moment),s.parsePoint(n.period.end,t._moment).addDays(1)),schoolAbsencePolicy:e.schoolAbsencePolicy}}))}}))}),i.mapError)}},{Api:r}}({arrayToQueryString:function(e,t){return t.map((function(t){var n,i;return"".concat(e,"=").concat(null!==(n=null==t||null===(i=t.toJSON)||void 0===i?void 0:i.call(t))&&void 0!==n?n:t)})).join("&")},responseError:function(e){var t,n,i,s,a,r,o;return Promise.reject(null!==(t=null!==(n=null==e||null===(i=e.response)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.Message)&&void 0!==n?n:null==e||null===(a=e.response)||void 0===a||null===(r=a.data)||void 0===r||null===(o=r.Error)||void 0===o?void 0:o.Message)&&void 0!==t?t:e.message)}},B,M),G=U.AulaTokenMixin,H=P.ErrorIndicator,j=x.ErrorList,Y=S.ProgressIndicator,$=I.ProgressList,z=T.Result,q=A.SingleSelection,K=O.SingleSelectionInput,Q=V.ValidatedDate,J=R.ValidatedDateInput,Z=k.ValidatedSingleSelection,X=L.ValidatedSingleSelectionInput,ee=N.ValidatedTimeInput,te=F.ValidatedTimePeriod,ne=b.ValidatedValue,ie=w.ValidatedValueInput,se=_.WidgetHeader,ae=W.Api,re={name:"CreationOfAbsence",components:{"error-indicator":H,"progress-indicator":Y,"single-selection-input":K,"validated-date-input":J,"validated-single-selection-input":X,"validated-time-input":ee,"validated-value-input":ie,"widget-header":se},mixins:[G],props:{axios:{type:Function,required:!0},placement:{type:String,required:!0},getAulaToken:{type:Function,required:!0},institutionFilter:{type:Array,required:!0},moment:{type:Function,required:!0}},data:function(){var e=this,t=new ae((function(){return e.axios}),(function(){return e.token}),(function(){return e.moment}));return{absence:{timePeriod:new te({}),description:new ne({validate:function(t){return e.validDescription(t)}}),reasonId:new Z({fallback:{text:"Vælg en fraværsårsag",value:"fallback"}}),showInAulaAndWeb:!1,startDate:new Q({},(function(){return e.moment})),useTimePeriod:!1},api:t,errors:new j,progress:new $,school:new q({change:function(t){return e.selectSchool(t)},fallback:{value:null,text:"Vælg skole"},preselectFirst:!0}),schools:[],schoolYear:new q({change:function(t){return e.selectSchoolYear(t)},fallback:{value:null,text:"Vælg skoleår"},preselectFirst:!0}),successfulSaveCountdown:0}},watch:{institutionFilter:function(){this.refresh()}},mounted:function(){this.moment.locale("da"),this.refresh()},methods:{refresh:function(){var e=this;"NoticeBoard"!==this.placement&&this.errors.track({id:"schools",message:"Kunne ikke indlæse skoler",retry:!0,dismissible:!1},(function(){return e.progress.track({message:"Indlæser skoler..."},(function(){var t;return e.schools=[],e.api.schools(null!==(t=e.institutionFilter)&&void 0!==t?t:[]).then((function(t){e.schools=t,e.school.update(t.map((function(e){return{text:e.name,value:e}})))}))}))}))},selectSchool:function(e){this.schoolYear.update(e.schoolYears.map((function(e){return{text:e.name,value:e}})))},selectSchoolYear:function(e){this.absence.reasonId.update(e.absenceReasons.map((function(e){return{text:e.description,value:e.id}}))),this.absence.startDate.reset(void 0,e.period)},save:function(){var e=this,t=this.absence.description.validate(),n=this.absence.useTimePeriod?this.absence.timePeriod.validate():z.success(null),i=this.absence.startDate.validate(),s=this.absence.reasonId.validate();t.isSuccess&&n.isSuccess&&i.isSuccess&&s.isSuccess&&this.school.value&&this.schoolYear.value&&this.errors.track("Kunne ikke gemme fravær",(function(){return e.progress.track("Gemmer...",(function(){return e.api.addAbsence({description:t.value,reasonId:s.value,schoolCode:e.school.value.code,showInAulaAndWeb:e.absence.showInAulaAndWeb,startDate:i.value,timePeriod:n.value})}))})).then((function(){e.successfulSaveCountdown=5,e.absence.description.reset(),e.absence.reasonId.reset(),e.absence.showInAulaAndWeb=!1,e.absence.startDate.reset(),e.absence.timePeriod.reset(),e.absence.useTimePeriod=!1}))},validDescription:function(e){var t=(e||"").trim();return 0==t.length?z.error("Indtast et beskrivelse"):t.length>50?z.error("Indtast et beskrivelse, der er kortere end 50 tegn"):z.success(t)}}},oe=n(3),le=Object(oe.a)(re,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-container",{staticClass:"root"},[n("b-row",[n("b-col",[n("widget-header",{attrs:{"widget-name":"Indberet fravær"}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("progress-indicator",{attrs:{"view-model":e.progress}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("error-indicator",{attrs:{"view-model":e.errors}}
1)],1)],1),e._v(" "),"NoticeBoard"===e.placement?n("b-row",[n("b-col",[e._v("Denne widget kan ikke placeres på dashboards")])],1):e.progress.empty&&!e.errors.has("schools")?[0===e.schools.length?n("b-row",[n("b-col",[e._v("\n        Der er ingen skoler som du har adgang til.\n      ")])],1):[n("b-row",[n("b-col",[n("b-alert",{attrs:{variant:"success",fade:"",dismissible:"","dismiss-label":"Luk"},model:{value:e.successfulSaveCountdown,callback:function(t){e.successfulSaveCountdown=t},expression:"successfulSaveCountdown"}},[e._v("\n            Fraværet blev gemt\n          ")])],1)],1),e._v(" "),n("b-row",[e.schools.length>1?n("b-col",{attrs:{cols:"narrow"===e.placement?12:4}},[n("single-selection-input",{attrs:{id:"kmd-educa-personale-creation-of-absence-school-select",label:"Skoler","view-model":e.school}})],1):e._e(),e._v(" "),e.school.value&&e.school.value.schoolYears.length>1?n("b-col",{attrs:{cols:"narrow"===e.placement?12:2}},[n("single-selection-input",{attrs:{id:"kmd-educa-personale-creation-of-absence-school-year-select",label:"Skoleår","view-model":e.schoolYear}})],1):e._e(),e._v(" "),n("b-col",[n("validated-single-selection-input",{attrs:{id:"kmd-educa-personale-creation-of-absence-reason-input",label:"Fraværsårsag","view-model":e.absence.reasonId}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("validated-value-input",{attrs:{id:"kmd-educa-personale-creation-of-absence-description-input",label:"Beskrivelse","view-model":e.absence.description}})],1),e._v(" "),n("b-col",[n("validated-date-input",{attrs:{id:"kmd-educa-personale-creation-of-absence-startdate-select",label:"Start dato","view-model":e.absence.startDate}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("b-form-checkbox",{attrs:{id:"kmd-educa-personale-creation-of-absence-usetimeperiod-input"},model:{value:e.absence.useTimePeriod,callback:function(t){e.$set(e.absence,"useTimePeriod",t)},expression:"absence.useTimePeriod"}},[e._v("\n            Indstil start- og sluttider\n          ")])],1)],1),e._v(" "),e.absence.useTimePeriod?n("b-row",[n("b-col",[n("validated-time-input",{attrs:{id:"kmd-educa-personale-creation-of-absence-starttime-input",label:"Starttid","view-model":e.absence.timePeriod.start}})],1),e._v(" "),n("b-col",[n("validated-time-input",{attrs:{id:"kmd-educa-personale-creation-of-absence-endtime-input",label:"Sluttid","view-model":e.absence.timePeriod.end}})],1)],1):e._e(),e._v(" "),n("b-row",[n("b-col",[n("b-form-checkbox",{attrs:{id:"kmd-educa-personale-creation-of-absence-showinaulaandweb-input"},model:{value:e.absence.showInAulaAndWeb,callback:function(t){e.$set(e.absence,"showInAulaAndWeb",t)},expression:"absence.showInAulaAndWeb"}},[e._v("\n            Vis på web og i Aula\n            "),e._v(" "),n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip"}],staticClass:"fa fa-question-circle",attrs:{tabindex:"0",title:"Betyder at dine lektioner vil blive vist på kmd.puls.dk web udgaven og i Aula widgeten - Fraværsoverblikket. Beskrivelse, tid fra og til vises ikke de pågældende steder."}})])],1)],1),e._v(" "),n("b-row",[n("b-col",[n("b-button",{on:{click:function(t){return e.save()}}},[e._v("Gem")])],1)],1)]]:e._e()],2)}),[],!1,null,"f1d3db10",null);t.a=le.exports},826:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,getAulaToken:Function,userProfile:String},data:function(){return{urlToCheckApi:"https://aulawidgetfunction.nordiccloud.dk/api/LinkCollection?code=9AKluwwbadOKCvtuZYXm2y/q6mODObQ7VJwTF4DWGGaHnU5CMPGePw==",aulaToken:null,title:"",linkCollection:[],activeCollectionId:null,activeCollectionIdLevelOne:null}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){this.aulaToken&&this.loadLinkCollectionFromApi()}},methods:{loadLinkCollectionFromApi:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.axios.get("".concat(e.urlToCheckApi),{headers:{Authorization:"Bearer ".concat(e.aulaToken)}});case 2:n=t.sent,e.title=n.data.title,e.linkCollection=n.data.links,e.linkCollection.forEach((function(e){return e.useAulaToken=e.ur
1i.includes("##aulatoken##")}));case 6:case"end":return t.stop()}}),t)})))()},collection:function(e){return[].concat(this.folders(e),this.links(e))},folders:function(e){return this.linkCollection.filter((function(t){return t.isFolder&&t.parentId===e})).sort((function(e,t){return e.sort-t.sort}))},links:function(e){return this.linkCollection.filter((function(t){return!t.isFolder&&t.parentId===e})).sort((function(e,t){return e.sort-t.sort}))},linkReference:function(e){return"linkCollection"+e.linkId},toggleFolder:function(e){this.activeCollectionId===e?this.activeCollectionId=null:this.activeCollectionId=e,this.activeCollectionIdLevelOne=null},toggleFolderLevelOne:function(e){this.activeCollectionIdLevelOne===e?this.activeCollectionIdLevelOne=null:this.activeCollectionIdLevelOne=e},onOpenFolder:function(e){e.style.visibility="hidden",e.style.maxHeight="auto";var t=e.scrollHeight;if(e.parentNode&&e.parentNode.parentNode&&e.parentNode.parentNode.parentNode&&e.parentNode.parentNode.parentNode.classList.contains("nctFolderLinkCollection")){var n=e.parentNode.parentNode.parentNode,i=e.parentNode.parentNode.parentNode.scrollHeight;n.style.maxHeight=t+i+"px"}e.style.maxHeight="0px",e.style.visibility="visible",e.style.maxHeight=t+"px"},onCloseFolder:function(e){e.style.maxHeight="0px"},openLinkWithAulatoken:function(e){e.useAulaToken&&window.open(e.uri.replace("##aulatoken##",this.aulaToken),"_blank")},cleanLink:function(e){var t=/([^?]+).*/gm.exec(e);return t.length>1?t[1]:""}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"shortcuts"},[n("span",{staticClass:"nctHeader"},[e._v(e._s(e.title))]),e._v(" "),n("div",{staticClass:"nctContent"},[n("ul",{staticClass:"nctLinks"},e._l(e.collection(null),(function(t,i){return n("li",{key:i},[t.isFolder?n("span",{class:{nctActive:e.activeCollectionId===t.linkId}},[n("i",{staticClass:"fal fa-angle-down"}),e._v(" "),n("span",{staticClass:"nctFolder",on:{click:function(n){return e.toggleFolder(t.linkId)}}},[e._v(e._s(t.displayName))]),e._v(" "),n("transition",{on:{enter:e.onOpenFolder,leave:e.onCloseFolder}},[e.activeCollectionId===t.linkId?n("ul",{staticClass:"nctFolderLinkCollection"},e._l(e.collection(t.linkId),(function(i,s){return n("li",{key:s},[i.isFolder?n("span",{class:{nctActive:e.activeCollectionIdLevelOne===i.linkId}},[n("i",{staticClass:"fal fa-angle-down"}),e._v(" "),n("span",{staticClass:"nctFolder",on:{click:function(t){return e.toggleFolderLevelOne(i.linkId)}}},[e._v(e._s(i.displayName))]),e._v(" "),n("transition",{on:{enter:e.onOpenFolder,leave:e.onCloseFolder}},[e.activeCollectionIdLevelOne===i.linkId?n("ul",{staticClass:"nctFolderLinkCollection"},e._l(e.collection(i.linkId),(function(i,s){return n("li",{key:s},[i.isFolder?e._e():n("span",[i.useAulaToken?n("a",{staticClass:"nctLink",attrs:{href:e.cleanLink(i.uri),title:i.description},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.openLinkWithAulatoken(i)}}},[e._v(e._s(t.displayName))]):n("a",{staticClass:"nctLink",attrs:{href:i.uri,title:i.description,target:"_blank"}},[e._v(e._s(i.displayName))])])])})),0):e._e()])],1):n("span",[i.useAulaToken?n("a",{staticClass:"nctLink",attrs:{href:e.cleanLink(i.uri),title:i.description},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.openLinkWithAulatoken(i)}}},[e._v(e._s(t.displayName))]):n("a",{staticClass:"nctLink",attrs:{href:i.uri,title:i.description,target:"_blank"}},[e._v(e._s(i.displayName))])])])})),0):e._e()])],1):n("span",[t.useAulaToken?n("a",{staticClass:"nctLink",attrs:{href:e.cleanLink(t.uri),title:t.description},on:{click:function(n){return n.preventDefault(),n.stopPropagation(),e.openLinkWithAulatoken(t)}}},[e._v(e._s(t.displayName))]):n("a",{staticClass:"nctLink",attrs:{href:t.uri,title:t.description,target:"_blank"}},[e._v(e._s(t.displayName))])])])})),0)])])}),[],!1,null,"7a804b1d",null);t.a=c.exports},827:function(e,t,n){"use strict";var i={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,group:String,userProfile:String,institutionFilter:Array},data:function(){return{aulaToken:null,user:{},errors:[],widgetData:{},baseApiAddress:"https://api.easyiqcloud.dk/api/aula/",fetchingData:!1,selectedWeekNr:"",selectedChild:"",searchFilter:"",countEvents:function(e){return this.widgetData.Events.filter((function(t){return t.itemType==e})).length},ssoLinkUrlParams:function(e){var t="?token="+this.aulaToken;return t+="&userProfile="+this.userProfile,t+="&institutionFilter="+this.institutionFilter.join(","),t+="&ssoLink="+e,t+="&selectedChild=".concat(null!=this.selectedChild?this.selectedChild:"")},shadeBlendConvert:function(e,t,n){if("number"!=typeof e||e<-1||e>1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||n&&"string"!=typeof n)return null;this.sbcRip||(this.sbcRip=function(e){var t=e.length,n={};if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=i(e[0].split("(")[1]),n[1]=i(e[1]),n[2]=i(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=i(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=-1,9!=t&&5!=t||(n[3]=s(n[2]/255*1e4)/1e4,n[2]=n[1],n[1]=n[0],n[0]=e>>24&255)}return n});var i=parseInt,s=Math.round,a=t.length>9,r=(a="string"==typeof n?n.length>9||"c"==n&&!a:a,e<0),o=(e=r?-1*e:e,n=n&&"c"!=n?n:r?"#000000":"#FFFFFF",this.sbcRip(t)),l=this.sbcRip(n);return o&&l?a?"rgb"+(o[3]>-1||l[3]>-1?"a(":"(")+s((l[0]-o[0])*e+o[0])+","+s((l[1]-o[1])*e+o[1])+","+s((l[2]-o[2])*e+o[2])+(o[3]<0&&l[3]<0?")":","+(o[3]>-1&&l[3]>-1?s(1e4*((l[3]-o[3])*e+o[3]))/1e4:l[3]<0?o[3]:l[3])+")"):"#"+(4294967296+16777216*s((l[0]-o[0])*e+o[0])+65536*s((l[1]-o[1])*e+o[1])+256*s((l[2]-o[2])*e+o[2])+(o[3]>-1&&l[3]>-1?s(255*((l[3]-o[3])*e+o[3])):l[3]>-1?s(255*l[3]):o[3]>-1?s(255*o[3]):255)).toString(16).slice(1,o[3]>-1||l[3]>-1?void 0:-2):null},initWidget:function(){var e=this;this.errors.push({message:"henter data"}),this.fetchingData=!0,this.axios.post(this.baseApiAddress+"links",this.aulaFilter,{headers:{Authorization:"bearer "+this.aulaToken,"x-aula-userprofile":this.userProfile,"x-aula-institutionfilter":this.institutionFilter,"Content-Type":"application/json"}}).then((function(t){e.fetchingData=!1,e.widgetData=t.data,e.childFilter.length>0&&(e.selectedChild=e.childFilter[0])}))},isPanelExpanded:function(e,t){return"narrow"===t?e.expandednarrow:e.expanded},expandPanel:function(e,t){"narrow"===t&&(e.expandednarrow=!e.expandednarrow),e.expanded=!e.expanded},getLinkSmartUrl:function(e){return 1==e.ssoaulatoschoolportal?this.baseSchoolPortalUrl+"aula/authuser/"+this.ssoLinkUrlParams(this.baseSchoolPortalUrl+e.url):e.url}}},computed:{aulaFilter:function(){return{sessionId:this.sessionUUID,group:""!=this.selectedGroup?this.selectedGroup:this.group,currentWeekNr:""!=this.selectedWeekNr?this.selectedWeekNr:this.currentWeekNumber,userProfile:this.userProfile,institutionFilter:this.institutionFilter,childFilter:""!=this.selectedChild?[this.selectedChild.trim()]:this.childFilter}},displaySelectedChild:function(){return""!=this.selectedChild?this.selectedChild.trim():this.childFilter[0]},filteredPanels:function(){var e=this;if(null!=this.widgetData&&null!=this.widgetData.panels){if(""!=this.searchFilter){for(var t=JSON.parse(JSON.stringify(this.widgetData.panels)),n=0;n<t.length;n++){var i=t[n];i.links=i.links.filter((function(t){return t.name.toLowerCase().includes(e.searchFilter.toLowerCase())})),i.links.length>0&&(i.expanded=!0,i.expandednarrow=!0)}return t}return this.widgetData.panels}},isWidgetTest:function(){if(window.origin){if(window.origin.includes("widget-test"))return!0}else{if(!window.location.origin)return!1;if(window.location.origin.includes("widget-test"))return!0}},baseSchoolPortalUrl:function(){try{return this.isWidgetTest?"Https://skoleportal-udv.easyiqcloud.dk/":"Https://skoleportal.easyiqcloud.dk/"}catch(e){return"Https://skoleportal.easyiqcloud.dk/"}}},watch:{aulaToken:function(){void 0!==this.aulaToken&&this.initWidget()},aulaFilter:function(){this.aulaToken=this.getAulaToken()}},created:function(){try{this.isWidgetTest&&(this.baseApiAddress="https://test-api.easyiqcloud.dk/api/aula/")}catch(e){}this.aulaToken=this.getAulaToken()}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0018V0001"},[n("div",{staticClass:"bg-white"},[n("b-navbar",{attrs:{toggleable:"md",type:"dark",variant:"info"}},[n("b-navbar-brand",{staticStyle:{padding:"0.2em"},attrs:{href:"#","data-widgetversion":"1.2.3"}},[e._v("\n        Links "),"parent"==e.userProfile.toLowerCase()?n("span",[e._v("("+e._s(e.displaySelectedChild)+")")]):e._e(
1)]),e._v(" "),n("b-navbar-toggle",{attrs:{target:"nav_collapse"}}),e._v(" "),n("b-collapse",{attrs:{"is-nav":"",id:"nav_collapse"}},[n("b-navbar-nav",{staticClass:"ml-auto"},["employee"==e.userProfile.toLowerCase()&&null!=e.widgetData?n("b-nav-item",{staticClass:"widget-toplink hidden-sm-down",attrs:{href:e.widgetData.administration,target:"_blank"}},[e._v("Administration")]):e._e(),e._v(" "),"parent"==e.userProfile.toLowerCase()||"guardian"==e.userProfile.toLowerCase()?n("b-nav-item-dropdown",{attrs:{text:"Barn",right:""}},e._l(e.childFilter,(function(t){return n("b-dropdown-item",{key:t,attrs:{value:t},on:{click:function(n){e.selectedChild=t}}},[e._v(e._s(t))])})),1):e._e()],1)],1)],1),e._v(" "),null!=e.widgetData.ErrorCode?n("div",[n("b-alert",{attrs:{show:"",variant:"warning"}},[e._v(e._s(e.widgetData.ErrorDescription))])],1):n("div",[e.fetchingData?n("div",{staticClass:"lds-css",staticStyle:{"align-content":"center",height:"5em",width:"5em"}}):e._e(),e._v(" "),e.fetchingData?e._e():n("div",[n("div",{staticClass:"easyiq-link-searchcontainer"},[n("b-form-input",{attrs:{type:"text",variant:"outline",placeholder:"Søg i links"},model:{value:e.searchFilter,callback:function(t){e.searchFilter=t},expression:"searchFilter"}})],1),e._v(" "),n("div",{staticClass:"easyiq-link-links"},[n("div",{staticClass:"easyiq-link-panels",attrs:{"data-placement":e.placement}},[n("div",{attrs:{role:"tablist"}},[e._l(e.filteredPanels,(function(t){return[t.links.length>0?n("b-card",{staticClass:"m-1",attrs:{"no-body":""}},[n("b-card-header",{staticClass:"p-1 m-0 bg-white",attrs:{"header-tag":"header",role:"tab"}},[n("div",{staticClass:"easyiq-link-panelheader text-info",attrs:{"data-placement":e.placement},on:{click:function(n){return e.expandPanel(t,e.placement)}}},[n("div",{staticClass:"d-flex align-items-center"},[n("div",[n("b-img",{attrs:{src:t.iconpath,"data-placement":e.placement}})],1),e._v(" "),n("div",[n("span",[e._v("\n                                                        "+e._s(t.name)+"\n                                                    ")])]),e._v(" "),n("div",{staticStyle:{"margin-left":"auto","margin-right":"10px"}},[e.isPanelExpanded(t,e.placement)?e._e():n("span",{staticClass:"easyiq-panel-openicon"},[n("i",{staticClass:"fas fa-angle-down"})]),e._v(" "),e.isPanelExpanded(t,e.placement)?n("span",{staticClass:"easyiq-panel-openicon"},[n("i",{staticClass:"fas fa-angle-up"})]):e._e()])])])]),e._v(" "),"narrow"==e.placement?n("div",[null!=t&&null!=t.links&&t.links.length>0?n("b-collapse",{attrs:{id:"accordion-panel"+t.panelid,accordion:"accordion-panel"+t.panelid,role:"tabpanel"},model:{value:t.expandednarrow,callback:function(n){e.$set(t,"expandednarrow",n)},expression:"panel.expandednarrow"}},[n("b-card-body",{staticClass:"p-1 m-0"},[n("div",{staticClass:"easyiq-link-panelcontainer",attrs:{"data-placement":e.placement}},e._l(t.links,(function(t){return n("a",{staticClass:"easyiq-link-panel",attrs:{href:e.getLinkSmartUrl(t),"data-placement":e.placement,target:"_blank"}},[n("div",{staticClass:"d-flex justify-content-center",attrs:{"data-img":""}},[n("b-img",{attrs:{src:t.iconpath}})],1),e._v(" "),n("div",{attrs:{"data-title":""}},[n("p",[e._v(e._s(t.name))])])])})),0)])],1):e._e()],1):n("div",[null!=t&&null!=t.links&&t.links.length>0?n("b-collapse",{attrs:{id:"accordion-panel"+t.panelid,accordion:"accordion-panel"+t.panelid,role:"tabpanel"},model:{value:t.expanded,callback:function(n){e.$set(t,"expanded",n)},expression:"panel.expanded"}},[n("b-card-body",{staticClass:"p-1 m-0"},[n("div",{staticClass:"easyiq-link-panelcontainer",attrs:{"data-placement":e.placement}},e._l(t.links,(function(t){return n("a",{staticClass:"easyiq-link-panel",attrs:{href:e.getLinkSmartUrl(t),"data-placement":e.placement,target:"_blank"}},[n("div",{staticClass:"d-flex justify-content-center",attrs:{"data-img":""}},[n("b-img",{attrs:{src:t.iconpath}})],1),e._v(" "),n("div",{attrs:{"data-title":""}},[n("p",[e._v(e._s(t.name))])])])})),0)])],1):e._e()],1),e._v(" "),n("div",{staticClass:"easyiq-link-ListItemColoredBar",attrs:{"data-placement":e.placement}}
1)],1):e._e()]}))],2)])])])])],1)])}),[],!1,null,null,null);t.a=a.exports},828:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,sessionUUID:String,placement:{type:String,default:"narrow"},moment:Function},data:function(){return{isLoading:!1,showErrorText:!1,errorText:"",date:this.moment(),substitution:null,users:{},aulaToken:null,showLessons:!0,showUserLessons:[]}},computed:{dayDate:function(){return this.moment(this.date).locale("da").format("dddd, DD. MMMM YYYY")},classPlacement:function(){return"aula-"+this.placement},serverDate:function(){return this.moment(this.date).format("YYYY-MM-DD")},isDateToday:function(){return this.moment(this.date).format("YYYY-MM-DD")===this.moment().format("YYYY-MM-DD")}},watch:{date:function(){null!=this.aulaToken&&this.getSubstitution()},aulaToken:function(){null!=this.aulaToken&&this.getSubstitution()}},methods:{isUserInshowUserLessons:function(e){return this.showUserLessons.indexOf(e)>-1},setShowUserLessons:function(e){var t=this.showUserLessons.indexOf(e.user_id);t<0?this.showUserLessons.push(e.user_id):this.showUserLessons.splice(t,1)},showLocaleTime:function(e){return this.moment(e).locale("da").format("LT")},setToday:function(){this.date=this.moment()},setPrevDay:function(){this.date=this.moment(this.date).subtract(1,"days")},setNextDay:function(){this.date=this.moment(this.date).add(1,"days")},getSubstitution:function(){var e=this;this.isLoading=!0;var t=this;this.axios.get("https://app.docendo.dk/aula/substitutes?date="+this.serverDate,{headers:{Authorization:t.aulaToken,AulaSessionUuid:t.sessionUUID},responseType:"json"}).then((function(n){e.isLoading=!1,"error"===n.data.response?(e.showErrorText=!0,e.errorText=n.data.message):(e.showErrorText=!1,e.moment(n.data.date).format("YYYY-MM-DD")===e.moment(e.date).format("YYYY-MM-DD")&&(t.users=n.data))})).catch((function(t){e.isLoading=!1,e.showErrorText=!0,e.errorText="Der kan ikke skabes forbindelse til docendo"}))}},created:function(){"narrow"===this.placement&&(this.showLessons=!1),this.aulaToken=this.getAulaToken()}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0020V0001"},[n("div",{staticClass:"subs",class:e.classPlacement},[n("div",{staticClass:"subs-header"},[n("h2",[e._v("Dagens fraværende")]),e._v(" "),n("div",{staticClass:"subs-day-changer"},[n("div",{staticClass:"subs-day-changer__button"},[n("button",{staticClass:"subs-btn--white",class:{"subs-btn--inactive":e.isDateToday},on:{click:e.setToday}},[e._v("I\n            dag\n          ")]),e._v(" "),n("button",{staticClass:"subs-btn--white",on:{click:e.setPrevDay}},[e._v("<")]),e._v(" "),n("button",{staticClass:"subs-btn--white",on:{click:e.setNextDay}},[e._v(">")])]),e._v(" "),n("p",[e._v(e._s(e.dayDate))])])]),e._v(" "),e.showErrorText?n("div",[n("h5",{staticClass:"text--warning"},[e._v(e._s(e.errorText))])]):e._e(),e._v(" "),e.showErrorText||e.isLoading||"narrow"!==e.placement||null===e.users.subs?e._e():n("div",{staticClass:"toogle-menu"},[n("p",[e._v("Vis lektioner og vikarer")]),e._v(" "),n("label",{staticClass:"switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.showLessons,expression:"showLessons"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.showLessons)?e._i(e.showLessons,null)>-1:e.showLessons},on:{change:function(t){var n=e.showLessons,i=t.target,s=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.showLessons=n.concat([null])):a>-1&&(e.showLessons=n.slice(0,a).concat(n.slice(a+1)))}else e.showLessons=s}}}),e._v(" "),n("span",{staticClass:"slider round"})])]),e._v(" "),e.isLoading?n("div",{staticClass:"subs-is-loading"},[e._m(0)]):n("div",{staticClass:"subs-flex"},[null===e.users.subs?n("h2",[e._v("Ingen fraværende")]):e._l(e.users.subs,(function(t){return n("div",{key:t.user_id,staticClass:"sub"},[n("div",{staticClass:"sub-header"},[n("div",{staticClass:"sub-header__img"},[n("img",{attrs:{src:t.img}})]),e._v(" "),n("div",{staticClass:"sub-header__content"},[n("h5",[e._v(e._s(t.name))]),e._v(" "),e._l(t.absence,(function(t){return n("p",[e._v(e._s(t.title)+",\n              "+e._s(e.showLocaleTime(t.event_time_from))+" -\n              "+e._s(e.showLocaleTime(t.event_time_to)))])}))],2)]),e._v(" "),e.showLessons?e._e():n("div",{staticClass:"text--link user-select-none",on:{click:function(n){return e.setShowUserLessons(t)}}},[e.isUserInshowUserLessons(t.user_id)?n("span",[e._v("Luk")]):n("span",[e._v("Se")]),e._v(" lektioner og\n          vikarer\n        ")]),e._v(" "),(e.showLessons||e.isUserInshowUserLessons(t.user_id))&&t&&t.substitution&&t.substitution.length>0?n("div",{staticClass:"sub-body"},[n("table",{staticClass:"sub-body__table"},[e._m(1,!0),e._v(" "),n("tbody",e._l(t.substitution,(function(t){return n("tr",{key:t.id},[n("td",{staticClass:"subs-event__title"},[n("span",[e._v(e._s(t.title))]),e._v(" "),n("div",{staticClass:"small-font"},[e._v(e._s(e.showLocaleTime(t.event_time_from))+" - "+e._s(e.showLocaleTime(t.event_time_to))+"\n                ")])]),e._v(" "),n("td",e._l(t.klasses,(function(t,i){return n("span",{key:i},[e._v(e._s(t))])})),0),e._v(" "),n("td",[n("p",[e._v(e._s(t.substitute))])])])}
1)),0)])]):e._e()])}))],2)])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"spinner"},[n("div",{staticClass:"bounce1"}),e._v(" "),n("div",{staticClass:"bounce2"}),e._v(" "),n("div",{staticClass:"bounce3"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("thead",[n("tr",[n("td",[e._v("Fag")]),e._v(" "),n("td",[e._v("Klasse")]),e._v(" "),n("td",[e._v("Vikar")])])])}],!1,null,null,null);t.a=a.exports},829:function(e,t,n){"use strict";var i,s,a,r,o=n(12),l=n.n(o),c=n(7),u=n.n(c),d={props:{getAulaToken:Function,axios:Function,moment:Function},data:function(){return{loading:!0,selectedDate:this.moment(),today:null,absences:[],teachers:[],aulaToken:null,absenceReasons:new Map}},computed:{showConfirmedAbsences:function(){return this.absences.filter((function(e){return!1!==e.is_confirmed}))}},mounted:function(){this.today=this.moment(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&Object.keys(this.aulaToken).length>0&&this.initRender()}},methods:{initRender:function(){var e=this;return l()(u.a.mark((function t(){var n,i,s,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.axios.defaults.baseURL="https://api.subit.dk",e.axios.defaults.headers.common["x-client"]="Aula teacher-absences",n=!1;try{i=localStorage.getItem("subit_token"),s=localStorage.getItem("subit_token_expires"),(!i||new Date(s).getTime()<(new Date).getTime())&&(n=!0)}catch(e){n=!0}if(!n){t.next=10;break}return t.next=7,e.axios.post("/v2/auth/aula",{jwt_token:e.aulaToken});case 7:a=t.sent,localStorage.setItem("subit_token",a.data.data.access_token),localStorage.setItem("subit_token_expires",a.data.data.expires_at);case 10:return e.axios.defaults.headers.common.Authorization="Bearer "+localStorage.getItem("subit_token"),t.prev=11,t.next=14,e.fetchTeachers();case 14:if(e.teachers=t.sent,!e.teachers){t.next=21;break}return t.next=18,e.fetchAbsenceReasons();case 18:return t.next=20,e.fetchAbsences();case 20:e.absences=t.sent;case 21:t.next=26;break;case 23:t.prev=23,t.t0=t.catch(11),console.log(t.t0);case 26:e.loading=!1;case 27:case"end":return t.stop()}}),t,null,[[11,23]])})))()},getTeacher:function(e){return this.teachers.find((function(t){return t.id===e}))},getInitials:function(e){var t,n,i=this.getTeacher(e);return i?i.schools.length>0?(null===(n=i.schools.filter((function(e){return!e.is_hidden}))[0])||void 0===n?void 0:n.initials)||i.schools[0].initials:(null===(t=i.name)||void 0===t?void 0:t.initials)||"":""},getAbsenceCoverage:function(e){var t=this;if(!e.counters)return"absence-item__teacher-initials--covered";var n=e.counters.find((function(e){return e.date===t.formatDate(t.selectedDate)}));if(n){var i=n.uncovered_count-n.cancelled_count;return i>0&&i==n.total_count?"absence-item__teacher-initials--not-covered":i>0?"absence-item__teacher-initials--partly-covered":"absence-item__teacher-initials--covered"}},getAbsenceReason:function(e){return this.absenceReasons.get(e)||"Fraværende"},formatDate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD";return this.moment(e).format(t)},fetchTeachers:(r=l()(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get("/v2/teachers");case 2:if(t=e.sent,!(n=t.data)){e.next=6;break}return e.abrupt("return",n.data);case 6:return e.abrupt("return",[]);case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)}),fetchAbsenceReasons:(a=l()(u.a.mark((function e(){var t,n,i=this;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get("/v2/teachers/absences/reasons");case 2:t=e.sent,(n=t.data)&&n.data.forEach((function(e){i.absenceReasons.set(e.id,e.value)}));case 5:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)}),fetchAbsences:(s=l()(u.a.mark((function e(){var t,n,i,s=this;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading=!0,e.next=3,this.axios.get("/v2/teachers/absences?period="+this.formatDate(this.selectedDate));case 3:if(t=e.sent,n=t.data,this.loading=!1,!n){e.next=9;break}return i=n.data.filter((function(e){var t=e.counters.find((function(e){return e.date===s.formatDate(s.selectedDate)}));return t&&!1===t.exempted})),e.abrupt("return",i.sort((function(e,t){var n=s.getInitials(e.teacher_id),i=s.getInitials(t.teacher_id);return n>i?1:n<i?-1:0})));case 9:return e.abrupt("return",[]);case 10:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)}),changeDate:(i=l()(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.selectedDate=this.moment(this.selectedDate).add(t,"days"),e.next=3,this.fetchAbsences();case 3:this.absences=e.sent;case 4:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)}),isPartially:function(e){return!0===e.inverted_exemptions&&e.exempt_periods&&e.exempt_periods.length>0},minutesOfDay:function(e){return e.minutes()+60*e.hours()},isAllDay:function(e){var t=this.selectedDate.clone().set({hour:8,minute:1});if(!this.moment(e.starts_at).isBefore(t))return!1;if(!(e.ends_at||e.inverted_exemptions||e.exempt_periods&&0!=e.exempt_periods.length))return!0;
1if(this.selectedDate.isBefore(e.ends_at,"date")){var n=this.selectedDate.clone().set({hour:17,minute:0});return!e.ends_at||this.minutesOfDay(n)<this.minutesOfDay(this.moment(e.ends_at))}if(this.selectedDate.isSame(e.ends_at,"date")){var i=this.selectedDate.clone().set({hour:17,minute:0});return this.moment(e.ends_at).isAfter(i,"hour")}return!1}}},h=d,m=n(3),p=Object(m.a)(h,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0021V0001"},[n("div",{staticClass:"subit-widget-container"},[n("div",{staticClass:"absence-header"},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"calendar-left",on:{click:function(t){return e.changeDate(-1)}}},[n("i",{staticClass:"calendar-arrow-left"})]),e._v(" "),n("div",{staticClass:"absence-header-content cut-text"},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 486 494",fill:"none"}},[n("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M283.314 493.388H201.759C185.411 493.388 172.109 480.534 172.109 464.737V402.928C172.109 395.722 165.832 391.256 160.021 391.256C157.785 391.256 155.646 391.869 153.657 393.068L88.7046 432.395C83.9772 435.253 78.5366 436.767 72.9817 436.767C62.6904 436.767 53.2883 431.74 47.8302 423.327L4.53476 356.541C0.326702 350.059 -1.01142 342.377 0.766876 334.917C2.53637 327.456 7.21981 321.11 13.9192 317.053L92.1556 269.687C95.7474 267.518 97.8162 263.92 97.8162 259.828C97.8162 255.728 95.7474 252.138 92.1644 249.969L13.9192 202.604C7.21981 198.538 2.53637 192.2 0.766876 184.74C-1.01142 177.279 0.326702 169.598 4.53476 163.116L47.8302 96.3382C53.2883 87.9166 62.6904 82.8891 72.9817 82.8891C78.5454 82.8891 83.9772 84.4033 88.7046 87.2616L153.665 126.588C155.646 127.787 157.785 128.4 160.021 128.4C165.832 128.4 172.109 123.934 172.109 116.729V28.6505C172.109 12.8536 185.411 0 201.759 0H283.314C299.662 0 312.964 12.8536 312.964 28.6505V116.244C312.964 120.378 314.954 123.075 316.617 124.614C320.561 128.247 326.75 128.987 331.513 126.035L396.218 85.9005C401.007 82.9232 406.545 81.3494 412.214 81.3494C422.505 81.3494 431.916 86.3769 437.366 94.7985L480.538 161.389C489.218 174.778 485.001 192.489 471.153 200.885L390.065 249.969C386.473 252.138 384.413 255.728 384.413 259.828C384.413 263.92 386.473 267.518 390.065 269.696L471.153 318.779C485.001 327.167 489.218 344.878 480.538 358.268L437.418 424.773C431.96 433.194 422.558 438.213 412.267 438.213C406.545 438.213 400.972 436.623 396.148 433.603L331.566 393.111C329.55 391.843 327.358 391.197 325.06 391.197C319.25 391.197 312.964 395.663 312.964 402.877V464.737C312.964 480.534 299.662 493.388 283.314 493.388Z",fill:"white"}})]),e._v(" "),n("span",[e._v("Dagens fravær")]),e._v(" "),n("span",[e._v(e._s(e.formatDate(e.selectedDate,"D. MMM")))])]),e._v(" "),n("div",{staticClass:"calendar-right",on:{click:function(t){return e.changeDate(1)}}},[n("i",{staticClass:"calendar-arrow-right"})])]),e._v(" "),e._m(0)]),e._v(" "),n("div",{staticClass:"absence-content"},[e.loading?n("div",{staticClass:"loading"},[n("i",{staticClass:"fa fa-spinner"})]):e._e(),e._v(" "),e.loading?e._e():n("div",e._l(e.showConfirmedAbsences,(function(t){return n("div",{key:t.id},[n("div",{staticClass:"absence-item-main"},[n("div",{staticClass:"absence-item__teacher-initials",class:[e.getAbsenceCoverage(t)],attrs:{title:e.getTeacher(t.teacher_id).name.full}},[n("span",{staticClass:"absence-item__teacher-initial-text"},[e._v(e._s(e.getInitials(t.teacher_id)))])]),e._v(" "),e.isPartially(t)?n("div",{staticClass:"absence-item__absence-period"},[n("span",[e._v("Delvis fravær")])]):e._e(),e._v(" "),e.isAllDay(t)?n("div",{staticClass:"absence-item__absence-period"},[n("span",[e._v("Hele dagen")])]):e.isAllDay(t)||e.isPartially(t)?e._e():n("div",{staticClass:"absence-item__absence-period"},[n("div",{staticClass:"absence-item__absence-period-start"},[e._v(e._s(e.formatDate(t.starts_at,"HH:mm")))]),e._v(" "),n("div",{staticClass:"absence-item__absence-period-spacing"},[e._v("-")]),e._v(" "),n("div",{staticClass:"absence-item__absence-period-end"},[e._v("\n                "+e._s(t.ends_at&&e.formatDate(t.ends_at,"HH:mm"))+"\n              ")])]),e._v(" "),t.reason_
1id?n("div",{staticClass:"absence-item__lessons cut-text"},[n("div",[e._v(e._s(e.getAbsenceReason(t.reason_id)))])]):e._e()])])})),0)]),e._v(" "),n("div",{staticClass:"footer"},[n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("mail")]),e._v(" "),n("path",{attrs:{d:"M0 4v18c0 3.314 2.686 6 6 6v0h20c3.314 0 6-2.686 6-6v0-18h-32zM30.667 22c0 2.577-2.089 4.667-4.667 4.667v0h-20c-2.577 0-4.667-2.089-4.667-4.667v0-16.667h29.333v16.667zM28.32 9.113l-0.893-0.987-11.427 10.307-11.36-10.293-0.893 0.987 12.253 11.107 12.32-11.12z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("[email protected]")])]),e._v(" "),n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("smart-phone")]),e._v(" "),n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("70 60 51 02")])])])])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"absence-header-status-content"},[n("div",{staticClass:"absence-header-status-indicator"},[n("div",{staticClass:"absence-header-status-circle absence-item__teacher-initials--covered"}),e._v(" "),n("span",[e._v("Dækket")])]),e._v(" "),n("div",{staticClass:"absence-header-status-indicator"},[n("div",{staticClass:"absence-header-status-circle absence-item__teacher-initials--partly-covered"}),e._v("\n          Delvis dækket\n        ")]),e._v(" "),n("div",{staticClass:"absence-header-status-indicator"},[n("div",{staticClass:"absence-header-status-circle"}),e._v("\n          Ikke dækket\n        ")])])}],!1,null,null,null);t.a=p.exports},830:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{getAulaToken:Function,axios:Function},data:function(){return{isLoaded:!1,subitUrl:"",aulaToken:null}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&Object.keys(this.aulaToken).length>0&&this.initRender()}},methods:{initRender:function(){var e=this;return s()(r.a.mark((function t(){var n,i,s,a,o,l;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.axios.defaults.baseURL="https://api.subit.dk",e.axios.defaults.headers.common["x-client"]="Aula login-button",n=!1;try{i=localStorage.getItem("subit_token"),s=localStorage.getItem("subit_token_expires"),(!i||new Date(s).getTime()<(new Date).getTime())&&(n=!0)}catch(e){n=!0}if(n||(a=e.parseJwt(localStorage.getItem("subit_token")),(o=e.parseJwt(e.aulaToken))&&a&&a.uni&&o.sub&&a.uni!==o.sub&&(n=!0)),!n){t.next=11;break}return t.next=8,e.axios.post("/v2/auth/aula",{jwt_token:e.aulaToken});case 8:l=t.sent,localStorage.setItem("subit_token",l.data.data.access_token),localStorage.setItem("subit_token_expires",l.data.data.expires_at);case 11:e.axios.defaults.headers.common.Authorization="Bearer "+localStorage.getItem("subit_token"),e.subitUrl="https://login.subit.dk/auth/token?token="+localStorage.getItem("subit_token"),e.isLoaded=!0;case 14:case"end":return t.stop()}}),t)})))()},parseJwt:function(e){if(!e)return{};try{var t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(window.atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(n)}catch(e){return{}}}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("a",{class:{loaded:e.isLoaded},attrs:{target:"_blank",href:e.subitUrl}},[n("div",{staticClass:"box"},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 31 31",fill:"none"}},[n("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.1068 31H12.8945C11.8497 31 10.9996 30.1924 10.9996 29.1999V25.3163C10.9996 24.8636 10.5984 24.583 10.2271 24.583C10.0842 24.583 9.94744 24.6215 9.82028 24.6968L5.66917 27.16
178C5.36703 27.3473 5.01932 27.4425 4.6643 27.4425C4.00658 27.4425 3.40569 27.1266 3.05685 26.598L0.289819 22.4018C0.0208797 21.9945 -0.0646407 21.5119 0.0490115 21.0431C0.162101 20.5744 0.461422 20.1757 0.889587 19.9207L5.88972 16.9447C6.11927 16.8084 6.25149 16.5823 6.25149 16.3252C6.25149 16.0676 6.11927 15.8421 5.89028 15.7058L0.889587 12.7298C0.461422 12.4743 0.162101 12.0761 0.0490115 11.6074C-0.0646407 11.1386 0.0208797 10.656 0.289819 10.2487L3.05685 6.05302C3.40569 5.52388 4.00658 5.208 4.6643 5.208C5.01989 5.208 5.36703 5.30314 5.66917 5.48272L9.82084 7.95364C9.94744 8.029 10.0842 8.06748 10.2271 8.06748C10.5984 8.06748 10.9996 7.78688 10.9996 7.33417V1.80014C10.9996 0.807603 11.8497 0 12.8945 0H18.1068C19.1516 0 20.0017 0.807603 20.0017 1.80014V7.30371C20.0017 7.56347 20.1289 7.7329 20.2352 7.82964C20.4873 8.05786 20.8828 8.10436 21.1872 7.9189L25.3225 5.39721C25.6286 5.21014 25.9825 5.11126 26.3449 5.11126C27.0026 5.11126 27.604 5.42714 27.9523 5.95628L30.7115 10.1402C31.2662 10.9815 30.9967 12.0943 30.1117 12.6218L24.9293 15.7058C24.6997 15.8421 24.5681 16.0676 24.5681 16.3252C24.5681 16.5823 24.6997 16.8084 24.9293 16.9452L30.1117 20.0292C30.9967 20.5562 31.2662 21.669 30.7115 22.5103L27.9557 26.6889C27.6068 27.218 27.0059 27.5333 26.3482 27.5333C25.9825 27.5333 25.6264 27.4334 25.318 27.2437L21.1906 24.6995C21.0617 24.6199 20.9216 24.5793 20.7748 24.5793C20.4034 24.5793 20.0017 24.8599 20.0017 25.3131V29.1999C20.0017 30.1924 19.1516 31 18.1068 31Z",fill:"#4D88FF"}})]),e._v(" "),n("div",{staticClass:"separator"}),e._v(" "),n("div",{staticClass:"sign-in-icon"}),e._v(" "),n("div",{staticClass:"text"},[e._v("\n        Åbn Subit\n      ")])])]),e._v(" "),n("div",{staticClass:"footer"},[n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("mail")]),e._v(" "),n("path",{attrs:{d:"M0 4v18c0 3.314 2.686 6 6 6v0h20c3.314 0 6-2.686 6-6v0-18h-32zM30.667 22c0 2.577-2.089 4.667-4.667 4.667v0h-20c-2.577 0-4.667-2.089-4.667-4.667v0-16.667h29.333v16.667zM28.32 9.113l-0.893-0.987-11.427 10.307-11.36-10.293-0.893 0.987 12.253 11.107 12.32-11.12z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("[email protected]")])]),e._v(" "),n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("smart-phone")]),e._v(" "),n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("70 60 51 02")])])])])}),[],!1,null,"523b54cb",null);t.a=c.exports},831:function(e,t,n){"use strict";var i={props:{assuranceLevel:Number,axios:Function,childFilter:[String,Array],currentWeekNumber:String,getAulaToken:Function,group:String,institutionFilter:[String,Array],isMobileApp:Boolean,placement:String,sessionUUID:String,userProfile:String},data:function(){return{link:new URL("https://api.minuddannelse.net/aula/redirect?redirectUrl=https://www.minuddannelse.net/"),aulaToken:null,showLink:!1,tempAulaToken:""}},watch:{aulaToken:function(){void 0!==this.aulaToken&&(this.showLink=!0)}},computed:{getTempAulaToken:function(){return this.tempAulaToken}},methods:{addAulaTokenOnSubmit:function(e){var t=this;e.preventDefault(),this.tempAulaToken=this.aulaToken,setTimeout((function(){Array.isArray(t.$refs.muSSOForm)?t.$refs.muSSOForm[0].submit():t.$refs.muSSOForm.submit(),setTimeout((function(){t.tempAulaToken=""}),500)}),500)}},mounted:function(){this.showLink=!1,this.link.searchParams.append("userProfile",this.userProfile.toLowerCase()),this.aulaToken=this.getAulaToken()}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0023V0001"},[n("div",[n("form",{ref:"muSSOForm",attrs:{method:"GET",target:"_blank",action:e.link},on:{submit:e.addAulaTokenOnSubmit}},[n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),e.showLink?n("b-button",{staticClass:"muSSOButton",attrs:{role:"link",title:"https://www.minuddannelse.net",type:"submit"}},[n("b-img",{attrs:{src:"https://www.minuddannelse.net/Content/Graphics/Frontpage/frontpage_logo.svg",alt:"MinUddannelse logo",fluid:""}}
1)],1):e._e()],1)])])}),[],!1,null,null,null);t.a=a.exports},832:function(e,t,n){"use strict";var i={data:function(){return{aulaToken:void 0,error:void 0,announcements:void 0}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(e){null!=e&&(this.aulaToken=e,this.fetchData())}},props:{axios:Function,sessionUUID:String,placement:String,getAulaToken:Function},methods:{fetchData:function(){var e=this;this.error=void 0,this.axios.post("https://mit.hjernenhjertet.dk/aula/announcements",{aulaToken:this.aulaToken,sessionUUID:this.sessionUUID}).then((function(t){e.announcements=t.data})).catch((function(t){t.response?e.error={code:t.response.status,text:t.response.statusText}:(console.log(t),e.error={code:0,text:"Hjernen & Hjertet kunne ikke kontaktes. Prøv igen senere."})}))},ssoSubmit:function(){this.$refs.ssoform.submit()}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0025V0002"},[n("div",[n("form",{ref:"ssoform",attrs:{type:"POST",target:"_blank",action:"https://mit.hjernenhjertet.dk/aula/announcements/login"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.aulaToken,expression:"aulaToken"}],attrs:{name:"aulaToken",type:"hidden"},domProps:{value:e.aulaToken},on:{input:function(t){t.target.composing||(e.aulaToken=t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.sessionUUID,expression:"sessionUUID"}],attrs:{name:"sessionUUID",type:"hidden"},domProps:{value:e.sessionUUID},on:{input:function(t){t.target.composing||(e.sessionUUID=t.target.value)}}}),e._v(" "),n("div",{staticClass:"widget-title",on:{click:e.ssoSubmit}},[n("svg",{staticClass:"hh-icon",staticStyle:{"enable-background":"new 0 0 203.4 193.2"},attrs:{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 203.4 193.2","xml:space":"preserve"}},[n("linearGradient",{attrs:{id:"SVGID_1_",gradientUnits:"userSpaceOnUse",x1:"-200.0678",y1:"519.1269",x2:"-199.3607",y2:"518.4198"}},[n("stop",{staticStyle:{"stop-color":"#20AC4B"},attrs:{offset:"0"}}),e._v(" "),n("stop",{staticStyle:{"stop-color":"#19361A"},attrs:{offset:"0.9831"}})],1),e._v(" "),n("g",[n("g",[n("path",{staticClass:"st0",attrs:{d:"M172.8,33.1c-4.1-2.8-10.5-5.5-16.9-8c2.6,3.9,5.9,10.8,5.7,26.6c4,1,7.4,2.5,9,4.4c2.3,2.3,2.9,5.2,1.8,9.2\n              c-1.2,5-4.7,10.6-8.8,15.7c-1.4,2-3,4.1-4.8,6.4c-18.2,23.3-44.1,17.9-69.6,7.8c-7.9,10.2-15.8,23.8-9.5,42.1\n              c6,6.2,13.4,12.3,21.1,17.4c9.2,5.6,21.5,11.7,32.1,11.7c0.3,0,0.5,0,0.8,0c20.8-3,35.9-28.6,43.8-58.3c3.1-10,6.1-22.4,8-36.2\n              C188.7,48.2,182.6,39.2,172.8,33.1z"}}),e._v(" "),n("path",{staticClass:"st1",attrs:{d:"M103.8,160.8c-13.8,14.5-20.3,0.2-29.3-24.4c-9.9-27.1,16-49.5,27.4-59.4c0-0.2-0.1-0.5-0.2-0.7\n              c-3.9-13.6-21.6-28.6-27.4-29.7c-6.7,1.9-19,5.8-31.3,10.6c-12.3,4.9-20.8,17.6-23.7,23c-12.4,29.2,21,62.6,52.2,86.2\n              c31.7,23.9,41.9,15.7,53,6.7c1.4-1.1,2.6-2.2,3.7-3.3C120,169.1,109.8,164,103.8,160.8z"}})]),e._v(" "),n("path",{staticClass:"st2",attrs:{d:"M151.4,23.3c-1.6-2-3.4-3.8-5.5-5.4c-0.1-0.1-0.3-0.2-0.5-0.3c-13.1-9.4-29.8,6.4-39.6,12\n          c-26.1-15.7-46.9-9.2-65.6,0.1c-25.9,14-25,30.6-21.6,44.6c3.8-6.5,10.2-13.6,18.9-18.3c-6.7-13.4,14.9-23.6,39.7-12.6\n          C103.6,55,109.8,83.5,111.5,98c0,0.1,0,0.1,0,0.1c0,0,0,0,0,0c0,0,0,0,0,0c0.1,0,0.1,0,0.2,0c8.9,2,26.2,2.2,35.6-6\n          c2.8-2.2,4.1-4.5,4.8-6.5c0.1-0.2,0.2-0.5,0.3-0.8c0.1-0.2,0.1-0.3,0.2-0.5c0,0,0,0,0,0c1.5-4.9,3.6-15.5,4.9-24.4\n          C158.8,46,158.1,32.7,151.4,23.3z"}})])],1),e._v(" "),"narrow"!==e.placement?n("h1",[e._v("\n          Hjernen&Hjertet\n        ")]):n("div",[e._v("\n          HJERNEN&HJERTET\n        ")])])]),e._v(" "),e._l(e.announcements,(function(t,i){return e.announcements&&"narrow"===e.placement?n("b-card",{directives:[{name:"b-toggle",rawName:"v-b-toggle",value:"accordion"+i,expression:"'accordion' + index"}],staticClass:"clickable",attrs:{title:t.title,"sub-title":t.date}},[n("b-collapse",{staticClass:"news-collapse",attrs:{id:"accordion"+i,accordion:"news-accordion",role:"tabpanel"}},[n("b-card-text",[n("widget-html",{attrs:{html:t.description}}
1)],1)],1)],1):e._e()})),e._v(" "),e._l(e.announcements,(function(t,i){return e.announcements&&"narrow"!==e.placement?n("b-card",{directives:[{name:"b-toggle",rawName:"v-b-toggle",value:"accordion"+i,expression:"'accordion' + index"}],attrs:{title:t.title,"sub-title":t.date}},[n("b-card-text",[n("widget-html",{attrs:{html:t.description}})],1)],1):e._e()})),e._v(" "),e.error?n("b-alert",{attrs:{show:"",variant:"danger"}},[n("h2",{staticClass:"error-title"},[e._v("Der opstod en fejl")]),e._v(" "),n("p",[e.error.code>0?n("span",[e._v("Kode "+e._s(e.error.code)+":")]):e._e(),e._v(" "+e._s(e.error.text)+"\n        ")]),e._v(" "),n("b-button",{staticClass:"float-right",attrs:{variant:"secondary"},on:{click:e.fetchData}},[e._v("\n        Prøv igen "),n("i",{staticClass:"far fa-sync"})])],1):e._e(),e._v(" "),e.announcements||e.error?e._e():n("div",{staticStyle:{position:"relative",height:"200px"}},[n("i",{staticClass:"far fa-spin fa-spinner"})])],2)])}),[],!1,null,null,null);t.a=a.exports},833:function(e,t,n){"use strict";var i=n(47),s=n.n(i),a={name:"CourseList",props:{assuranceLevel:Number,axios:Function,childFilter:[String,Array],currentWeekNumber:String,getAulaToken:Function,group:String,institutionFilter:[String,Array],isMobileApp:Boolean,moment:Function,placement:String,sessionUUID:String,userProfile:String},data:function(){return{aulaToken:null,error:"",isLoading:!1,link:new URL("https://api.minuddannelse.net/aula/redirect?redirectUrl=https://www.minuddannelse.net/"),persons:[],week:null,year:null,yearLocale:parseInt(this.moment().format("YYYY")),aulaTokenInputIdLogoForm:"logo-form",aulaTokenInputIdCourseForm:"course-form",tempAulaToken:""}},watch:{aulaToken:function(){if(void 0!==this.aulaToken){var e=this.extractWeekAndYear(this.currentWeekNumber),t=e.week,n=e.year;this.getCourses(t,n)}}},computed:{getTempAulaToken:function(){return this.tempAulaToken}},filters:{convertDate:function(e){return this.moment(e).locale("da").format("d/M")}},methods:{extractWeekAndYear:function(e){if(!/^(\d){4}-W(\d){1,2}$/.test(e))return{week:this.moment().week(),year:this.moment().year()};var t=e.split("-W"),n=s()(t,2),i=n[0],a=n[1];return{week:parseInt(a,10),year:parseInt(i,10)}},contrastIsBlack:function(e){return e=e.replace("#",""),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128},getCourses:function(e,t){var n=this;this.week=e,this.year=t;var i={},s=["axios","getaulatoken","moment","currentWeekNumber"];Object.keys(this.$props).forEach((function(e){s.includes(e.toLowerCase())||(i[e]=n.$props[e]?n.$props[e].toString():n.$props[e])})),i.currentWeekNumber="".concat(t,"-W").concat(e);var a={method:"get",headers:{Authorization:"Bearer ".concat(this.aulaToken),Accept:"application/json"},params:i,url:"https://api.minuddannelse.net/aula/forloeb"};this.axios(a).then((function(e){n.persons=e.data.personer,n.error="",n.isLoading=!1})).catch((function(e){n.isLoading=!1;var t="licenserequired"===e.response.data.responseStatus.errorCode.toLowerCase();n.error=t?"licenseError":"error"}))},handlePreviousWeek:function(){this.isLoading=!0;var e=this.week-1,t=this.moment({year:this.year-1}).isoWeeksInYear(),n=e<1?t:e,i=e<1?this.year-1:this.year;this.getCourses(n,i)},handleNextWeek:function(){this.isLoading=!0;var e=this.week+1,t=this.moment({year:this.year}).isoWeeksInYear(),n=e<=t?e:1,i=e<=t?this.year:this.year+1;this.getCourses(n,i)},addAulaTokenOnSubmit:function(e,t){var n=this;e.preventDefault(),this.tempAulaToken=this.aulaToken,setTimeout((function(){Array.isArray(n.$refs[t])?n.$refs[t][0].submit():n.$refs[t].submit(),setTimeout((function(){n.tempAulaToken=""}),500)}),500)}},created:function(){this.isLoading=!0,this.aulaToken=this.getAulaToken(),this.moment().locale("da"),this.link.searchParams.append("userProfile",this.userProfile.toLowerCase())}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0028V0001"},[n("div",{staticClass:"course-list"},[n("b-container",{attrs:{fluid:""}},[n("b-row",{staticClass:"course-list-header align-items-baseline"},[n("b-col",{staticClass:"d-flex"},[n("div",{staticClass:"d-flex align-items-center"},["narrow"===e.placement?n("span",{staticClass:"course-list-header-small"},[e._v("Forløb")]):n("h1",{staticClass:"course-list-header-large"},[e._v("Forløb")])]),e._v(" "),e.week&&e.year?n("div",{class:["d-flex","narrow"===e.placement?"align-items-center":"align-items-baseline"]},[n("b-button",{staticClass:"course-list-header-week-picker d-flex justify-content-center",attrs:{title:"Gå til forrige uge"},on:{click:e.handlePreviousWeek}},[n("i",{class:["fa fa-caret-left","narrow"===e.placement?"fa-lg":"fa-2x"]})]),e._v(" "),"narrow"===e.placement?n("span",{staticClass:"course-list-header-week-label"},[e._v("\nuge "+e._s(e.week)+" "),e.year!==e.yearLocale?n("span",[e._v("("+e._s(e.
1year)+")")]):e._e()]):n("h1",[e._v("\n              uge "+e._s(e.week)+" "),e.year!==e.yearLocale?n("span",[e._v("("+e._s(e.year)+")")]):e._e()]),e._v(" "),n("b-button",{staticClass:"course-list-header-week-picker d-flex justify-content-center",attrs:{title:"GÃ¥ til næste uge"},on:{click:e.handleNextWeek}},[n("i",{class:["fa fa-caret-right","narrow"===e.placement?"fa-lg":"fa-2x"]})])],1):e._e()])],1)],1),e._v(" "),e.isLoading?n("div",{staticClass:"spinner-wrapper"},[n("i",{staticClass:"fa fa-spinner fa-spin"}),e._v("\n      henter forløb...\n    ")]):e.error||!e.persons.length?n("div",{staticClass:"message-container"},["licenseError"===e.error?n("span",[n("p",[e._v("Du har ikke adgang til widgets fra MinUddannelse.")]),e._v("\nKontakt "),n("a",{attrs:{href:"mailto:[email protected]?subject=Ingen adgang til Aula-widgets fra MinUddannelse (reference-id: "+e.sessionUUID+")"}},[e._v("[email protected]")]),e._v(" for adgang.\n"),n("p",{staticClass:"text-muted info-text"},[e._v("\nVed henvendelse kan følgende reference-id hjælpe med at spore fejlen: "+e._s(e.sessionUUID)+"\n")])]):"error"===e.error?n("span",{staticClass:"error-message"},[e._v("\nNoget gik galt med at hente forløb. Prøv evt. at logge ud og ind igen.\n")]):n("span",{staticClass:"text-muted"},[e._v("\nDer er ingen forløb i denne uge.\n")])]):n("div",[e.persons&&e.persons.length?n("b-container",{staticClass:"course-list-container",class:{narrow:"narrow"===e.placement},attrs:{fluid:""}},e._l(e.persons,(function(t){return n("b-row",{key:t.navn+"-"+t.id},[n("b-col",[e.persons.length>1&&("guardian"===e.userProfile.toLowerCase()||"parent"===e.userProfile.toLowerCase()||"otp"===e.userProfile.toLowerCase())?n("b-row",[n("b-col",{staticClass:"course-person"},["narrow"===e.placement?n("strong",[e._v(e._s(t.navn))]):n("h2",{staticClass:"course-person-header"},[e._v(e._s(t.navn))])])],1):e._e(),e._v(" "),e._l(t.institutioner,(function(i){return n("b-row",{key:i.kode},[n("b-col",{staticClass:"course-institution-container"},[t.institutioner.length>1?n("b-row",[n("b-col",{staticClass:"course-institution"},[e._v("\n                    "+e._s(i.navn)+"\n                  ")])],1):e._e(),e._v(" "),i.forloeb&&i.forloeb.length?n("ul",{staticClass:"list-inline",class:{narrow:"narrow"===e.placement}},e._l(i.forloeb,(function(t){return n("li",{key:t.id,staticClass:"list-inline-item course-item col",class:"narrow"===e.placement?"narrow":"col-xl-4"},[n("form",{ref:e.aulaTokenInputIdCourseForm+t.id,refInFor:!0,attrs:{method:"GET",target:"_blank",action:t.url},on:{submit:function(n){return e.addAulaTokenOnSubmit(n,e.aulaTokenInputIdCourseForm+t.id)}}},[n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("b-row",{staticClass:"align-items-center"},[n("div",{staticClass:"course-source"},[n("b-button",{staticClass:"course-icon-url",attrs:{variant:"link",role:"link",title:"GÃ¥ til forløb: "+t.navn,type:"submit"}},[n("div",{staticClass:"course-icon-circle",style:{"background-color":t.farve}},[n("img",{staticClass:"course-icon",attrs:{src:"https://res.uvdata.net/icons/icons/"+t.ikon+"-32"+(e.contrastIsBlack(t.farve)?"":"-w")+".png",alt:"GÃ¥ til forløb"}})])])],1),e._v(" "),n("b-col",{staticClass:"course-material"},[n("b-button",{staticClass:"course-material-url",attrs:{variant:"link",role:"link",title:"GÃ¥ til forløb: "+t.navn,type:"submit"}},[n("strong",[e._v(e._s(t.navn))])]),e._v(" "),n("div",{staticClass:"course-group-list",class:{narrow:"narrow"===e.placement}},e._l(t.hold,(function(i,s){return n("span",{key:i.id,staticClass:"course-group",attrs:{title:"Hold: "+i.navn}}
1,[e._v("\n"+e._s(i.navn)),t.hold.length-1>s?n("span",[e._v(",")]):e._e()])})),0)],1)],1)],1)])})),0):e._e()],1)],1)}))],2)],1)})),1):e._e()],1),e._v(" "),e.error?e._e():n("div",{staticClass:"mu-provider",class:{narrow:"narrow"===e.placement}},[n("form",{ref:e.aulaTokenInputIdLogoForm,attrs:{method:"GET",target:"_blank",action:e.link},on:{submit:function(t){return e.addAulaTokenOnSubmit(t,e.aulaTokenInputIdLogoForm)}}},[n("span",{staticClass:"mu-provider-text"},[e._v("Fra alle os på")]),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("b-button",{staticClass:"mu-provider-btn",attrs:{role:"link",title:"https://www.minuddannelse.net",type:"submit"}},[n("b-img",{staticClass:"mu-provider-img",attrs:{src:"https://www.minuddannelse.net/Content/Graphics/Frontpage/frontpage_logo.svg",alt:"MinUddannelse",fluid:""}})],1)],1)])],1)])}),[],!1,null,null,null);t.a=o.exports},834:function(e,t,n){"use strict";var i=n(47),s=n.n(i),a={name:"NoteList",props:{assuranceLevel:Number,axios:Function,childFilter:[String,Array],currentWeekNumber:String,getAulaToken:Function,group:String,institutionFilter:[String,Array],isMobileApp:Boolean,moment:Function,placement:String,sessionUUID:String,userProfile:String},data:function(){return{aulaToken:null,error:"",isLoading:!1,link:new URL("https://api.minuddannelse.net/aula/redirect?redirectUrl=https://www.minuddannelse.net/"),persons:[],week:null,year:null,yearLocale:parseInt(this.moment().format("YYYY")),htmlWrapperStyleObject:{maxWidth:""},tempAulaToken:""}},watch:{aulaToken:function(){if(void 0!==this.aulaToken){var e=this.extractWeekAndYear(this.currentWeekNumber),t=e.week,n=e.year;this.getNotes(t,n)}}},computed:{getTempAulaToken:function(){return this.tempAulaToken}},methods:{sortedNotes:function(e){return e.slice().sort((function(e,t){return e.sortOrder-t.sortOrder}))},extractWeekAndYear:function(e){if(!/^(\d){4}-W(\d){1,2}$/.test(e))return{week:this.moment().week(),year:this.moment().year()};var t=e.split("-W"),n=s()(t,2),i=n[0],a=n[1];return{week:parseInt(a,10),year:parseInt(i,10)}},getNotes:function(e,t){var n=this;this.week=e,this.year=t;var i={},s=["axios","getaulatoken","moment","currentWeekNumber"];Object.keys(this.$props).forEach((function(e){s.includes(e.toLowerCase())||(i[e]=n.$props[e]?n.$props[e].toString():n.$props[e])})),i.currentWeekNumber="".concat(t,"-W").concat(e);var a={method:"get",headers:{Authorization:"Bearer ".concat(this.aulaToken),Accept:"application/json"},params:i,url:"https://api.minuddannelse.net/aula/ugebrev"};this.axios(a).then((function(e){n.persons=e.data.personer,n.error="",n.isLoading=!1})).catch((function(e){n.isLoading=!1;var t="licenserequired"===e.response.data.responseStatus.errorCode.toLowerCase();n.error=t?"licenseError":"error"}))},resizeEventHandler:function(){this.noteListWidth=this.$refs.noteListRef.clientWidth,this.htmlWrapperStyleObject.maxWidth="narrow"===this.placement?"":this.noteListWidth-30+"px"},handlePreviousWeek:function(){this.isLoading=!0;var e=this.week-1,t=this.moment({year:this.year-1}).isoWeeksInYear(),n=e<1?t:e,i=e<1?this.year-1:this.year;this.getNotes(n,i)},handleNextWeek:function(){this.isLoading=!0;var e=this.week+1,t=this.moment({year:this.year}).isoWeeksInYear(),n=e<=t?e:1,i=e<=t?this.year:this.year+1;this.getNotes(n,i)},addAulaTokenOnSubmit:function(e){var t=this;e.preventDefault(),this.tempAulaToken=this.aulaToken,setTimeout((function(){Array.isArray(t.$refs.muNoteListForm)?t.$refs.muNoteListForm[0].submit():t.$refs.muNoteListForm.submit(),setTimeout((function(){t.tempAulaToken=""}),500)}),500)}},created:function(){this.isLoading=!0,this.aulaToken=this.getAulaToken(),this.moment.locale("da"),this.link.searchParams.append("userProfile",this.userProfile.toLowerCase())},mounted:function(){window.addEventListener("resize",this.resizeEventHandler),this.resizeEventHandler()},beforeDestroy:function(){window.removeEventListener("resize",this.resizeEventHandler)}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0029V0001"},[n("div",{ref:"noteListRef",staticClass:"note-list"},[n("b-container",{attrs:{fluid:""}},[n("b-row",{staticClass:"note-list-header align-items-baseline"},[n("b-col",{staticClass:"d-flex"},[n("div",{staticClass:"d-flex align-items-center"},["narrow"===e.placement?n("span",{staticClass:"note-list-header-small"},[e._v("Ugenoter")]):n("h1",{staticClass:"note-list-header-large"},[e._v("Ugenoter")])]),e._v(" "),e.week&&e.year?n("div",{class:["d-flex","narrow"===e.placement?"align-items-center":"align-items-baseline"]},[n("b-button",{staticClass:"note-list-header-week-picker d-flex justify-content-center",attrs:{title:"Gå til forrige uge"},on:{click:e.handlePreviousWeek}},[n("i",{class:["fa fa-caret-left","narrow"===e.placement?"fa-lg":"fa-2x"]})]),e._v(" "),"narrow"===e.placement?n("span",{staticClass:"note-list-header-week-label"},[e._v("\nuge "+e._s(e.week)+" "),e.year!==e.yearLocale?n("span",[e._v("("+e._s(e.
1year)+")")]):e._e()]):n("h1",[e._v("\n              uge "+e._s(e.week)+" "),e.year!==e.yearLocale?n("span",[e._v("("+e._s(e.year)+")")]):e._e()]),e._v(" "),n("b-button",{staticClass:"note-list-header-week-picker d-flex justify-content-center",attrs:{title:"GÃ¥ til næste uge"},on:{click:e.handleNextWeek}},[n("i",{class:["fa fa-caret-right","narrow"===e.placement?"fa-lg":"fa-2x"]})])],1):e._e()])],1)],1),e._v(" "),e.isLoading?n("div",{staticClass:"spinner-wrapper"},[n("i",{staticClass:"fa fa-spinner fa-spin"}),e._v("\n      henter ugenoter...\n    ")]):e.error||!e.persons.length?n("div",{staticClass:"message-container"},["licenseError"===e.error?n("span",[n("p",[e._v("Du har ikke adgang til widgets fra MinUddannelse.")]),e._v("\nKontakt "),n("a",{attrs:{href:"mailto:[email protected]?subject=Ingen adgang til Aula-widgets fra MinUddannelse (reference-id: "+e.sessionUUID+")"}},[e._v("[email protected]")]),e._v(" for adgang.\n"),n("p",{staticClass:"text-muted info-text"},[e._v("\nVed henvendelse kan følgende reference-id hjælpe med at spore fejlen: "+e._s(e.sessionUUID)+"\n")])]):"error"===e.error?n("span",{staticClass:"error-message"},[e._v("\nNoget gik galt med at hente ugenoter. Prøv evt. at logge ud og ind igen.\n")]):n("span",{staticClass:"text-muted"},[e._v("\nDer er ingen ugenoter i denne uge.\n")])]):n("div",[e.persons&&e.persons.length?n("b-container",{staticClass:"notes-list-container",attrs:{fluid:""}},e._l(e.persons,(function(t){return n("b-row",{key:t.navn+"-"+t.id},[n("b-col",{class:["note-person-wrapper",{narrow:"narrow"===e.placement}]},[e.persons.length>1&&("guardian"===e.userProfile.toLowerCase()||"parent"===e.userProfile.toLowerCase()||"otp"===e.userProfile.toLowerCase())?n("b-row",[n("b-col",{staticClass:"note-person"},["narrow"===e.placement?n("strong",[e._v(e._s(t.navn))]):n("h2",{staticClass:"note-person-header"},[e._v(e._s(t.navn))])])],1):e._e(),e._v(" "),e._l(t.institutioner,(function(i){return n("b-row",{key:i.kode},[n("b-col",{staticClass:"note-institution-container",style:e.htmlWrapperStyleObject},[t.institutioner.length>1?n("b-row",[n("b-col",{staticClass:"note-institution"},[e._v("\n                    "+e._s(i.navn)+"\n                  ")])],1):e._e(),e._v(" "),e._l(e.sortedNotes(i.ugebreve),(function(t,i){return n("b-row",{key:i},[n("b-col",{staticClass:"note-container"},[n("b-row",[n("b-col",[n("div",{staticClass:"note-class-name"},[e._v("\n                          "+e._s(t.tilknytningNavn)+"\n                        ")])])],1),e._v(" "),n("b-row",[n("b-col",{class:["note-text",{narrowView:"narrow"===e.placement}]},[n("div",{staticClass:"note-item"},[n("widget-html",{attrs:{html:t.indhold}})],1)])],1)],1)],1)}))],2)],1)}))],2)],1)})),1):e._e()],1),e._v(" "),e.error?e._e():n("div",{staticClass:"mu-provider",class:{narrow:"narrow"===e.placement}},[n("form",{ref:"muNoteListForm",attrs:{method:"GET",target:"_blank",action:e.link},on:{submit:e.addAulaTokenOnSubmit}},[n("span",{staticClass:"mu-provider-text"},[e._v("Fra alle os pÃ¥")]),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("b-button",{staticClass:"mu-provider-btn",attrs:{role:"link",title:"https://www.minuddannelse.net",type:"submit"}},[n("b-img",{staticClass:"mu-provider-img",attrs:{src:"https://www.minuddannelse.net/Content/Graphics/Frontpage/frontpage_logo.svg",alt:"MinUddannelse",fluid:""}})],1)],1)])],1)])}),[],!1,null,null,null);t.a=o.exports},835:function(e,t,n){"use strict";var i=n(47),s=n.n(i),a=n(1),r=n.n(a),o=n(17),l=n.n(o),c=n(754),u=n.n(c),d=["unilogin","assignee"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?h(Object(n),!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p={name:"AssignmentList",props:{assuranceLevel:Number,axios:Function,childFilter:[String,Array],currentWeekNumber:String,getAulaToken:Function,group:String,institutionFilter:[String,Array],isMobileApp:Boolean,moment:Function,placement:String,sessionUUID:String,userProfile:String},data:function(){return{aulaToken:null,days:[],error:"",isLoading:!1,link:new URL("https://api.minuddannelse.net/aula/redirect?redirectUrl=https://www.minuddannelse.net/"),week:null,year:null,yearLocale:parseInt(this.moment().format("YYYY")),aulaTokenInputIdLogoForm:"logo-form",aulaTokenInputIdAssignmentForm:"assignment-form",aulaTokenInputIdAssignmentMobileForm:"assignment-narrow-form",tempAulaToken:""}},watch:{aulaToken:function(){if(void 0!==this.aulaToken){var e=this.extractWeekAndYear(this.currentWeekNumber),t=e.week,n=e.year;this.setDays(t,n),this.fetchAssignments(t,n)}}},computed:{getTempAulaToken:function(){return this.tempAulaToken}},methods:{filterAssignmentsByPerson:function(e){return e.reduce((function(e,t){var n=t.unilogin,i=t.assignee,s=u()(t,d);return e=e.find((function(e){return e.unilogin===n}))?e.map((function(e){return e.unilogin!==n?e:m(m({},e),{},{assignments:[].concat(l()(e.assignments),[s])})})):[].concat(l()(e),[{unilogin:n,assignee:i,assignments:[s]}])}),[])},isPresentDay:function(e){var t=this.moment().locale("da");return this.moment(e.isoDate).format("YYYY-MM-DD")===this.moment(t).format("YYYY-MM-DD")},fetchAssignments:function(e,t){var n=this;this.week=e,this.year=t;var i={method:"get",headers:{Authorization:"Bearer ".concat(this.aulaToken),Accept:"application/json"},params:{placement:this.placement,sessionUUID:this.sessionUUID,userProfile:this.userProfile,currentWeekNumber:"".concat(t,"-W").concat(e),childFilter:this.childFilter,isMobileApp:this.isMobileApp,institutionFilter:this.institutionFilter},url:"https://api.minuddannelse.net/aula/opgaveliste"};this.axios(i).then((function(e){var t=e.data;n.days=t.opgaver.reduce((function(e,t){var i=e.find((function(e){return e.name===t.ugedag.toLowerCase()})),s=e.indexOf(i);return e[s].assignments.push({name:t.title,id:t.id,assignmentType:t.opgaveType,placementTimestamp:t.placeringTidspunkt?n.moment(t.placeringTidspunkt).format("HH:mm"):void 0,isCompleted:t.erFaerdig,dueDate:t.afleveringsdato,url:t.url,unilogin:t.unilogin,assignee:t.kuvertnavn,groups:t.hold?t.hold.map((function(e){return{id:e.id,name:e.navn}})):[],courseName:t.forloeb?t.forloeb.navn:void 0}),e}),n.days),n.error="",n.isLoading=!1})).catch((function(e){n.isLoading=!1;var t="licenserequired"===e.response.data.responseStatus.errorCode.toLowerCase();n.error=t?"licenseError":"error"}))},extractWeekAndYear:function(e){if(!/^(\d){4}-W(\d){1,2}$/.test(e))return{week:this.moment().week(),year:this.moment().year()};var t=e.split("-W"),n=s()(t,2),i=n[0],a=n[1];return{week:parseInt(a,10),year:parseInt(i,10)}},makeDate:function(e,t,n){return this.moment().startOf("week").isoWeekday(1).year(n).week(t).day(e).format("D. MMMM")},setDays:function(e,t){var n=this,i=this.moment.weekdays(!0);this.days=i.map((function(i){return{assignments:[],name:i,isoDate:n.moment().locale("da").isoWeek(e).year(t).isoWeekday(i).format(),date:n.makeDate(i,e,t)}})).filter((function(e){return"lørdag"!==e.name&&"søndag"!==e.name}))},handlePreviousWeek:function(){this.isLoading=!0;var e=this.week-1,t=this.moment({year:this.year-1}).isoWeeksInYear(),n=e<1?t:e,i=e<1?this.year-1:this.year;this.setDays(n,i),this.fetchAssignments(n,i)},handleNextWeek:function(){this.isLoading=!0;var e=this.week+1,t=this.moment({year:this.year}).isoWeeksInYear(),n=e<=t?e:1,i=e<=t?this.year:this.year+1;this.setDays(n,i),this.fetchAssignments(n,i)},addAulaTokenOnSubmit:function(e,t){var n=this;e.preventDefault(),this.tempAulaToken=this.aulaToken,setTimeout((function(){Array.isArray(n.$refs[t])?n.$refs[t][0].submit():n.$refs[t].submit(),setTimeout((function(){n.tempAulaToken=""}),500)}),500)}},created:function(){this.isLoading=!0,this.moment.locale("da"),this.aulaToken=this.getAulaToken(),this.link.searchParams.append("userProfile",this.userProfile.toLowerCase())}},v=n(3),f=Object(v.a)(p,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0030V0001"},[n("div",{staticClass:"assignment-list"},[n("b-container",{attrs:{fluid:""}},[n("b-row",{staticClass:"assignment-list-header-container align-items-baseline"},[n("b-col",{staticClass:"d-flex"},[n("div",{staticClass:"d-flex align-items-center"},["narrow"===e.placement?n("span",{staticClass:"assignment-list-header-small"},[e._v("Opgaver")]):n("h1",{staticClass:"assignment-list-header-large"},[e._v("Opgaver")])]),e._v(" "),e.week&&e.year?n("div",{class:["d-flex","narrow"===e.placement?"align-items-center":"align-items-baseline"]},[n("b-button",{staticClass:"assignment-list-header-week-picker d-flex justify-content-center",attrs:{title:"Gå til forrige uge"},on:{click:e.handlePreviousWeek}},[n("i",{class:["fa fa-caret-left","narrow"===e.placement?"fa-lg":"fa-2x"]})]),e._v(" "),"narrow"===e.placement?n("span",{staticClass:"assignment-list-header-week-label"},[e._v("\nuge "+e._s(e.week)+" "),e.year!==e.yearLocale?n("span",[e._v("("+e._s(e.
1year)+")")]):e._e()]):n("h1",[e._v("\n              uge "+e._s(e.week)+" "),e.year!==e.yearLocale?n("span",[e._v("("+e._s(e.year)+")")]):e._e()]),e._v(" "),n("b-button",{staticClass:"assignment-list-header-week-picker d-flex justify-content-center",attrs:{title:"GÃ¥ til næste uge"},on:{click:e.handleNextWeek}},[n("i",{class:["fa fa-caret-right","narrow"===e.placement?"fa-lg":"fa-2x"]})])],1):e._e()])],1)],1),e._v(" "),e.isLoading?n("div",[n("i",{staticClass:"fa fa-spinner fa-spin"}),e._v("\n      henter opgaver...\n    ")]):e.error?n("div",["licenseError"===e.error?n("span",[e._v("\nDu har ikke adgang til widgets fra MinUddannelse.\n"),n("br"),e._v("Kontakt\n"),n("a",{attrs:{href:"mailto:[email protected]?subject=Ingen adgang til Aula-widgets fra MinUddannelse (reference-id: "+e.sessionUUID+")"}},[e._v("\[email protected]\n")]),e._v("\nfor adgang.\n"),n("p",{staticClass:"text-muted info-text"},[e._v("\nVed henvendelse kan følgende reference-id hjælpe med at spore fejlen: "+e._s(e.sessionUUID)+"\n")])]):n("span",{staticClass:"error-message"},[e._v("\nNoget gik galt med at hente opgaver. Prøv evt. at logge ud og ind igen.\n")])]):n("div",[n("div",{class:["assignment-list-narrow",{"d-block d-lg-none":"narrow"!==e.placement}]},[n("b-card",{attrs:{"no-body":""}},[n("b-tabs",{attrs:{pills:"",card:""}},e._l(e.days,(function(t){return n("b-tab",{key:t.name,attrs:{active:e.isPresentDay(t)}},[n("div",{staticClass:"assignment-tab",attrs:{slot:"title"},slot:"title"},[n("div",[n("small",[e._v(e._s(t.name.slice(0,1).toUpperCase()))])]),e._v(" "),n("small",[e._v(e._s(t.date.split(".").shift()))]),e._v(" "),n("div",{staticClass:"assignment-indicator"},[e._v(e._s(t.assignments.map((function(e){return"•"})).slice(0,3).join("")))]),e._v(" "),t.assignments.length?e._e():n("span",[e._v(" ")])]),e._v(" "),n("div",{staticClass:"assignment-list-container"},[e.filterAssignmentsByPerson(t.assignments).length?n("div",e._l(e.filterAssignmentsByPerson(t.assignments),(function(t,i){return n("div",{key:i},["parent"===e.userProfile.toLowerCase()||"guardian"===e.userProfile.toLowerCase()||"otp"===e.userProfile.toLowerCase()?n("strong",[n("span",{staticClass:"assignment-assignee"},[e._v(e._s(t.assignee))])]):e._e(),e._v(" "),n("ul",{staticClass:"assignments"},e._l(t.assignments,(function(t){return n("li",{key:t.id,staticClass:"assignment-list"},[n("div",{staticClass:"assignment"},[n("div",{staticClass:"assignment-link-btn-wrapper"},[n("form",{ref:e.aulaTokenInputIdAssignmentMobileForm+t.id,refInFor:!0,attrs:{method:"GET",target:"_blank",action:t.url},on:{submit:function(n){return e.addAulaTokenOnSubmit(n,e.aulaTokenInputIdAssignmentMobileForm+t.id)}}},[n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("b-button",{class:["assignment-link-btn",{complete:t.isCompleted}],attrs:{variant:"link",role:"link",title:t.name,type:"submit"}},[e._v(e._s(t.name))])],1)]),e._v(" "),n("div",[t.placementTimestamp?n("small",{staticClass:"assignment-timestamp-tag"},[n("i",{staticClass:"far fa-clock"}),e._v(" "),n("span",{staticClass:"assignment-timestamp"},[e._v(e._s(t.placementTimestamp))])]):e._e(),e._v(" "),n("ul",{staticClass:"groups"},e._l(t.groups,(function(i,s){return n("li",{key:i.id,staticClass:"group-name"},[n("small",[e._v("\n                                  "+e._s(i.name)+"\n                                  "),t.groups.length-1!==s?n("span",[e._v(",")]):e._e(
1)])])})),0),e._v(" "),t.courseName?n("small",{staticClass:"course-name"},[e._v(e._s(t.courseName))]):e._e()])])])})),0)])})),0):n("div",{staticClass:"text-muted default no-assignments"},[e._v("Der er ingen opgaver for denne dag")])])])})),1)],1)],1),e._v(" "),"narrow"!==e.placement?n("div",{staticClass:"assignment-list-medium d-none d-lg-block"},[n("div",{staticClass:"days"},e._l(e.days,(function(t){return n("div",{key:t.name,staticClass:"day-container"},[n("div",{class:["day-title",e.isPresentDay(t)?"today":""]},[e._v(e._s(t.name)+" "+e._s(t.date))]),e._v(" "),n("div",{staticClass:"assignment-list-container"},[e.filterAssignmentsByPerson(t.assignments).length?n("div",e._l(e.filterAssignmentsByPerson(t.assignments),(function(t,i){return n("div",{key:i},["parent"===e.userProfile.toLowerCase()||"guardian"===e.userProfile.toLowerCase()||"otp"===e.userProfile.toLowerCase()?n("strong",[n("span",{staticClass:"assignment-assignee"},[e._v(e._s(t.assignee))])]):e._e(),e._v(" "),n("ul",{staticClass:"assignments"},e._l(t.assignments,(function(t){return n("li",{key:t.id,staticClass:"assignment-list"},[n("div",{staticClass:"assignment"},[n("div",{staticClass:"assignment-link-btn-wrapper"},[n("form",{ref:e.aulaTokenInputIdAssignmentForm+t.id,refInFor:!0,attrs:{method:"GET",target:"_blank",action:t.url},on:{submit:function(n){return e.addAulaTokenOnSubmit(n,e.aulaTokenInputIdAssignmentForm+t.id)}}},[n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("b-button",{class:["assignment-link-btn",{complete:t.isCompleted}],attrs:{variant:"link",role:"link",title:t.name,type:"submit"}},[e._v(e._s(t.name))])],1)]),e._v(" "),n("div",[t.placementTimestamp?n("small",{staticClass:"assignment-timestamp-tag"},[n("i",{staticClass:"far fa-clock"}),e._v(" "),n("span",{staticClass:"assignment-timestamp"},[e._v(e._s(t.placementTimestamp))])]):e._e(),e._v(" "),n("ul",{staticClass:"groups"},e._l(t.groups,(function(i,s){return n("li",{key:i.id,staticClass:"group-name"},[n("small",[e._v("\n                                "+e._s(i.name)+"\n                                "),t.groups.length-1!==s?n("span",[e._v(",")]):e._e()])])})),0),e._v(" "),t.courseName?n("small",{staticClass:"course-name"},[e._v(e._s(t.courseName))]):e._e()])])])})),0)])})),0):e._e()])])})),0)]):e._e(),e._v(" "),n("div",{class:{"mu-provider-narrow":"narrow"===e.placement}},[n("form",{ref:e.aulaTokenInputIdLogoForm,attrs:{method:"GET",target:"_blank",action:e.link},on:{submit:function(t){return e.addAulaTokenOnSubmit(t,e.aulaTokenInputIdLogoForm)}}},[n("span",{staticClass:"mu-provider-text"},[e._v("Fra alle os på")]),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("b-button",{staticClass:"mu-provider-btn",attrs:{role:"link",title:"https://www.minuddannelse.net",type:"submit"}},[n("b-img",{staticClass:"mu-provider-img",attrs:{src:"https://www.minuddannelse.net/Content/Graphics/Frontpage/frontpage_logo.svg",alt:"MinUddannelse",fluid:""}}
1)],1)],1)])])],1)])}),[],!1,null,null,null);t.a=f.exports},836:function(e,t,n){"use strict";var i=n(87),s=n.n(i),a=n(17),r=n.n(a),o=n(47),l=n.n(o),c=n(7),u=n.n(c);function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var m,p,v,f,g,_=function(){function e(e){this.activities={},this.idsOfPreselectedPersonnelTypes={},this.personnelTypes={},this.schools=[],this._vueSet=e}return e.prototype={clear:function(){this.activities={},this.personnelTypes={},this.schools=[]},setActivities:function(e,t,n,i){var s,a,r=null!==(s=this.activities[e])&&void 0!==s?s:this._vueSet(this.activities,e,{}),o=null!==(a=r[n.toJSON()])&&void 0!==a?a:this._vueSet(r,n.toJSON(),{});this._vueSet(o,t,i)},setPersonnelTypes:function(e,t,n){this._vueSet(this.idsOfPreselectedPersonnelTypes,e,n),this._vueSet(this.personnelTypes,e,t)},updateSchools:function(e){var t=this;e.forEach((function(e){var n=t.schools.findIndex((function(t){return t.code===e.code}));-1===n?t.schools.push(e):t.schools.splice(n,1,e)})),this.schools.sort((function(e,t){return e.name.localeCompare(t.name)}))},updateNotes:function(e,t,n,i,s){var a=this.activities[t];if(a)for(var r=0,o=Object.keys(a);r<o.length;r++)for(var l=a[o[r]],c=0,u=Object.keys(l);c<u.length;c++){var d=l[u[c]].find((function(t){return t.id===e}));if(d)return d.notes.internal=n,d.notes.lesson=i,void(d.notes.substitute=s)}}},{Store:e}}(),E=function(e){var t,n=e.makeNote;function i(e,t,n,i){return[s("",t),s("Lokaler",n),s("",i),s("Vikar for",e)].filter((function(e){return!e.empty})).map((function(e){return e.toString()}));function s(e,t){return{empty:!t,toString:function(){return(e?e+": ":"")+t}}}}function s(e){if(!e)return"";var t=e.slice();return t.sort(),t.join(", ")}function a(e,t,n,i,s,a,r){return[o("Beskrivelse",i),o("Fag",e),o("Klasser",n),o("Lærer",t),o("Lokaler",a),o("Periode",s),o("Vikar",r)].filter((function(e){return!e.empty})).map((function(e){return e.toString()})).join("\n");function o(e,t){return{empty:!t,toString:function(){return e+": "+t}}}}return t={makeActivity:function(e){var t,r,o=function(e,t,n){return e.toString()+i(t,n);function i(e,t){return e&&t?e==t?" (lek. "+e+")":" (lek. "+e+" - "+t+")":""}}(e.period,e.startLesson,e.endLesson),l=s(e.classes),c=s(e.rooms),u=(t=e.abbreviationOfSubject,e.description+(t?" ("+t+")":"")+((r=l)?" - "+r:"")),d=e.substitution?e.substitution.isPersonal?"Vikar: "+e.substitution.description:e.substitution.description:"";return{absentee:e.absentee?"Vikar for: "+e.absentee:null,activityId:e.id,classes:l,description:function(t){return function(e,t,n,i,s,a){return n+(e?" ("+e+")":"")+(!s&&t?" "+t:"")+(!a&&i?" ("+i+")":"")}(e.abbreviationOfSubject,l,e.description,this.substitution,this.showClasses(t),this.showSubstitution(t))},id:e.id+(e.absentee?" "+e.absentee:""),panelDescription:u,panelInformation:i(e.absentee,o,c,d),period:e.period,periodDescription:o,notes:n(e.notes),rooms:c,substitution:d,tooltip:a(e.abbreviationOfSubject,e.absentee,l,e.description,o,c,e.substitution?e.substitution.description:null),left:function(e){return e[this.id].left},lines:function(e){return e[this.id]},height:function(e){return e[this.id].height}
1,showAbsentee:function(t){return e.absentee&&t[this.id]>=4},showClasses:function(e){return l&&e[this.id]>=4},showNote:function(){return!this.notes.empty()},showRooms:function(e){return c&&e[this.id]>=4},showPeriod:function(e){return e[this.id]>=2},showSubstitution:function(t){return e.substitution&&t[this.id]>=4},top:function(e){return e[this.id].top},width:function(e){return e[this.id].width}}}},t}({makeNote:function(e){return{internal:e.internal||"",lesson:e.lesson||"",substitute:e.substitute||"",empty:function(){return!this.internal&&!this.lesson&&!this.substitute},tooltip:function(){return[["Vikarnote",this.lesson],["Intern note",this.internal],["Note til lærer",this.substitute]].map((function(e){return e[0]+": "+e[1]})).join("\n")},update:function(e,t,n){this.internal=e||"",this.lesson=t||"",this.substitute=n||""}}}}),A=function(){function e(e,t){this._api=e,this._store=t}return e.prototype={loadActivities:function(e,t,n){var i,s,a=this;return null!==(i=this._store.activities[e])&&void 0!==i&&null!==(s=i[n.toJSON()])&&void 0!==s&&s[t]?Promise.resolve():this._api.activities(e,t,n).then((function(i){a._store.setActivities(e,t,n,i)}))},loadPersonnelTypes:function(e){var t=this;return this._store.personnelTypes[e]?Promise.resolve():this._api.personnelTypes(e).then((function(n){return t._store.setPersonnelTypes(e,n.personnelTypes,n.idOfPreselectedPersonnelType)}))},loadSchools:function(e){var t=this,n=this._store.schools.map((function(e){return e.code})),i=e.filter((function(e){return!n.includes(e)}));return 0===i.length?Promise.resolve():this._api.schools(i).then((function(e){return t._store.updateSchools(e)}))},setNotes:function(e,t,n,i,s){var a=this;return this._api.setNotes(e,t,n,i,s).then((function(){return a._store.updateNotes(e,t,n,i,s)}))}},{Actions:e}}(),T=function(){function e(i,s){if(i>23||i<0)throw"Hour must be between 0 and 23";if(s>59||s<0)throw"Minute must be between 0 and 59";return i=Math.floor(i),s=Math.floor(s),{hour:i,minute:s,addHours:function(t){var n=i+t;return n>23?e(23,59):n<0?e(0,0):e(n,s)},addDuration:function(t){var n=60*i+s+t.totalMinutes;return n<0?e(0,0):n>=1440?e(23,59):e(Math.floor(n/60),n%60)},compare:function(e){return this.isBefore(e)?-1:this.isSame(e)?0:1},durationTo:function(e){if(this.isAfter(e))throw"The other time point must be after or same as this time point";return e.hour===i?t(e.minute-s):t(60*(e.hour-i-1)+(60-s)+e.minute)},format:function(e){if("input"===e)return n(i)+":"+n(s);throw new Error('Unknown time point format "'+e+'"')},isAfter:function(e){return e.hour<i||e.hour===i&&e.minute<s},isBefore:function(e){return e.hour>i||e.hour===i&&e.minute>s},isSame:function(e){return e.hour===i&&e.minute===s},startOfHour:function(){return e(i,0)},toJSON:function(){return n(i)+":"+n(s)},toString:function(){return i.toString()+":"+n(s)}}}function t(e){return{totalMinutes:e,isSame:function(t){return e===t.totalMinutes},toString:function(t){var i=Math.floor(e/60),s=e%60;return"human"===t?(i>0||0==s?i+" "+(1==i?"time":"timer"):"")+(s>0?" "+(s+" "+(1==s?"minut":"minutter")):""):i+":"+n(s)}}}function n(e){return e<10?"0"+e.toString():e.toString()}return{parsePoint:function(t){var n=t.match(/([0-9]?[0-9]):([0-9][0-9])/);if(n&&n[0]===t){var i=l()(n,3),s=i[1],a=i[2];return e(Number.parseInt(s,10),Number.parseInt(a,10))}return null},point:e,duration:t,parseDuration:function(e){var n=e.match(/([0-9]+):([0-9][0-9])/);if(n&&n[0]===e){var i=l()(n,3),s=i[1],a=i[2],r=Number.parseInt(a,10);if(r>59||r<0)throw"Minute must be between 0 and 59";var o=Number.parseInt(s,10);if(o<0)throw"Hours must be greater than or equal to 0";return t(60*o+r)}return null}}}(),b={browserSession:function(e,t,n,i){var s="kmd-"+e+"-widget-"+t+"-settings";return{read:function(){try{var e=window.sessionStorage.getItem(s);if(null===e)return null;var t=JSON.parse(e),a=t.value,r=t.writtenAt;return t.sessionUUID!==n||0===i||i&&Date.now()-new Date(r)>i?null:a||{}}catch(e){return null}},write:function(e){try{window.sessionStorage.setItem(s,JSON.stringify({value:e,writtenAt:(new Date).toJSON(),sessionUUID:n}))}catch(e){return}}}},database:function(e,t,n,i,s){return{read:function(){var a={widgetName:n};return i&&s&&(a.institutionCode=s),t.get("https://personale.api.kmd.dk/aula/api/v2/settings",{headers:{Authorization:e},params:a}).then((function(e){return e.data}),(function(){return null}))},write:function(a){var r={widgetName:n};return i&&s&&(r.institutionCode=s),t.post("https://personale.api.kmd.dk/aula/api/v2/settings",a,{headers:{Authorization:e},params:r})}}}},C={selectingItem:function(e){var t,n,i=e.items,s=e.initialItem,a=e.itemCompare;if(!i.length)throw"Items array cannot be empty";return{min:0,max:i.length-1,value:(t=a||function(e,t){return e===t},n=i.findIndex((function(e){return t(e,s)})),Math.max(0,n)),item:function(){return i[Math.max(0,Math.min(this.value,i.length-1))]}}}},k=function(){var e;function t(){}t.prototype.toString=function(){return"Canceled"};var n={errorCaptured:function(e){return!l(e)}};var i=/["&'<>]/g;var a=/[\$\(-\+\.\?\[-\^\{-\}]/g,o=new RegExp(a.source,"u");function l(e){return e instanceof t}function c(e){return e&&"function"==typeof e}function u(e,t){return e===t}return e={areArraysEqual:function(e,t,n){var i;if(n=null!==(i=n)&&void 0!==i?i:u,e.length!==t.length)return!1;for(var s=0;s<e.length;++s)if(!n(e[s],t[s]))return!1;return!0},areSetsEqual:function(e,t,n){var i,a,o;if(n=null!==(i=n)&&void 0!==i?i:u,(null!==(a=e.length)&&void 0!==a?a:e.size)!==(null!==(o=t.length)&&void 0!==o?o:t.size))return!1;var l,c=r()(t),h=d(e);try{var m=function(){var e=l.value,t=c.findIndex((function(t){return n(t,e)}));if(-1===t)return{v:!1};c.splice(t,1)};for(h.s();!(l=h.n()).done;){var p=m();if("object"===s()(p))return p.v}}catch(e){h.e(e)}finally{h.f()}return 0===c.length},canceled:function(){return new t},escapeHtml:function(e){var t;return(e=null===(t=e)||void 0===t?void 0:t.toString())&&e.replace(i,(function(e){switch(e){case"&":return"&amp;";case'"':return"&quot;";case"'":return"&#39;";case"<":return"&lt;";case">":return"&gt;"}}))},escapeRegExp:function(e){var t;return(e=null===(t=e)||void 0===t?void 0:t.toString())&&o.test(e)?e.replace(a,"\\$&"):e},IgnoreCanceledMixin:n,isCanceled:l,isPromise:function(e){return e&&c(e.then)},isFunction:c,isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},strictEqual:u,toPromise:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return c(e)?new Promise((function(n){return n(e.apply(t,i))})):Promise.resolve(e)}},e}
1(),y=(v=(m=k).canceled,f=m.isString,g=m.toPromise,p={combine:function(e,t){return function(n){var i=e(n);return t(i)}},debounce:function(e,t){var n,i;return function(){var s=arguments,a=this,o=new Promise((function(o,l){var c;null===(c=n)||void 0===c||c(v()),n=l,clearTimeout(i),i=setTimeout((function(){g.apply(void 0,[e,a].concat(r()(s))).then((function(e){n=void 0,i=void 0,o(e)}),(function(e){n=void 0,i=void 0,l(e)}))}),t)}));return o}},last:function(e){var t,n=(t=0,{is:function(e){return e===t},increment:function(){return++t}});return function(){var t=arguments,i=this;return new Promise((function(s,a){var o=n.increment();g.apply(void 0,[e,i].concat(r()(t))).then((function(e){n.is(o)?s(e):a(v())}),(function(e){n.is(o)?a(e):a(v())}))}))}},once:function(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}},withFocusRestore:function(e,t){return function(){var i=document.activeElement;return g(e.apply(this,arguments)).then((function(e){return setTimeout((function(){return n(t,i)}),0),e}),(function(e){return setTimeout((function(){return n(t,i)}),0),Promise.reject(e)}))};function n(e,t){var n,i=d(e=Array.isArray(e)?e:[e]);try{for(i.s();!(n=i.n()).done;){var s=n.value,a="activeElement"===s?t:f(s)?document.querySelector(s):s;if(a&&(a.focus(),a===document.activeElement))break}}catch(e){i.e(e)}finally{i.f()}}},retry:function(e,t,n){return function(){var i=arguments,s=this,a=0,r=[],o=new Promise((function(o,l){(function i(){var s=arguments,c=this;g.apply(void 0,[e,this].concat(Array.prototype.slice.call(arguments))).then(o,(function(e){r.push(e),a<t?(++a,setTimeout((function(){return i.apply(c,s)}),n||0)):l(r)}))}).apply(s,i)}));return o}},throttle:function(e,t){var n=!1,i={};return function(){if(i.arguments=arguments,i.this=this,n)return Promise.resolve(null);n=!0;var s=new Promise((function(s,a){setTimeout((function(){var t=i.this,o=i.arguments;i.this=void 0,i.arguments=void 0,g.apply(void 0,[e,t].concat(r()(o))).then((function(e){s(e),n=!1}),(function(e){a(e),n=!1}))}),t)}));return s}}},p),I=function(e,t,n){var i,s=e,a=t.isFunction,r=n;return i=function(e,t,n,i,o,c){var u=r.browserSession(c,"session",n),d=r.database(t,e,c,i,o),h=r.browserSession(c,"database",n,288e5);return new Promise((function(e){var t=u.read()||{},n=h.read();null===n?d.read().then((function(e){return e||{}}),(function(){return{}})).then((function(n){h.write(n),e({browserSessionSettings:t,databaseSettings:n})})):e({browserSessionSettings:t,databaseSettings:n})})).then((function(e){var t=e.browserSessionSettings,n=e.databaseSettings,i=s.throttle((function(){return u.write(t)}),1e3),r=s.combine((function(e){return s.retry(e,5,5e3)}),(function(e){return s.throttle(e,1e4)}))((function(){return d.write(n)})),o=s.throttle((function(){return h.write(n)}),1e3);function c(e,t,n,i){var s=i[e];return void 0===s||!1===(n||function(){return!0})(s)?a(t)?t():t:s}function m(e,t,n){if(2===e.length){var i=l()(e,2),s=i[0],a=i[1];t[s]=a}else{if(1!==e.length)return;l()(e,1)[0].forEach((function(e){var n=e.key,i=e.value;return t[n]=i}))}n.forEach((function(e){return e()}))}return{getLocal:function(e,n,i){return c(e,n,i,t)},getPersistent:function(e,t,i){return c(e,t,i,n)},setLocal:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];m(n,t,[i])},setPersistent:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];m(t,n,[o,r])}}}))},i}(y,k,b),S=function(){function e(i,s){if(s.isBefore(i))throw"End must be after start";return i.isSame(s)?t():{start:i,end:s,empty:!1,contains:function(e){return s.isAfter(e)&&!i.isAfter(e)},duration:function(){return i.durationTo(s)},intersect:function(n){if(!this.intersectsWith(n))return t();var a=i.compare(n.start),r=s.compare(n.end);return e(a>0?i:n.start,r<0?s:n.end)},intersectsWith:function(e){return!e.empty&&(i.isBefore(e.end)&&s.isAfter(e.start))},isSame:function(e){return!e.empty&&(i.isSame(e.start)&&s.isSame(e.end))},iterate:u.a.mark((function e(t){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.start;case 1:return e.next=3,n;case 3:n=t(n);case 4:if(n.isBefore(this.end)){e.next=1;break}case 5:case"end":return e.stop()}}),e,this)})),map:function(n,a){var r=n(i),o=(null!=a?a:n)(s);return o.isBefore(r)?t():e(r,o)},span:function(t){return t.empty?this:e(t.start.isBefore(i)?t.start:i,t.end.isBefore(s)?s:t.end)},split:function(t){var i=this,s=[];do{var a=t(i.start);if(!a.isBefore(i.end)||!a.isAfter(i.start))return s.push(i),n(s);s.push(e(i.start,a)),i=e(a,i.end)}while(!i.empty);return n(s)},subtract:function(t){if(t.empty)return n([this]);if(i.compare(t.end)>=0)return n([this]);if(s.compare(t.start)<=0)return n([this]);var a=i.compare(t.start),r=s.compare(t.end);return a>0?r<=0?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n([e(t.end,s)]):0==a?r>0?n([e(t.end,s)]):{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n(r>0?[e(i,t.start),e(t.end,s)]:[e(i,t.start)])},subtractSum:function(e){var t=this;return e.empty?n([this]):e.periods.map((function(e){return t.subtract(e)})).reduce((function(e,t){return e.intersect(t)}))},toString:function(){return i.toString()+" - "+s.toString()}}}function t(){return{empty:!0,contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},isSame:function(e){return e.empty},iterate:u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})),map:function(){return this},span:function(e){return e},split:function(){return this},subtract:function(){return this},subtractSum:function(){return{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}},toString:function(){return""}}}function n(t){return 0===(t=t.filter((function(e){return!e.empty}))).length?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:((t=function(e){return e.reduce((function(e,t){return function(e,t){var n=(c=e,u=function(e){return e.intersectsWith(t)},c.reduce((function(e,t){var n=l()(e,2),i=n[0],s=n[1];return(u(t)?i:s).push(t),[i,s]}),[[],[]])),i=l()(n,2),s=i[0],a=i[1],o=s.reduce((function(e,t){return e.span(t)}),t);var c,u;return[o].concat(r()(a))}(e,t)}),[])}(t)).sort((function(e,t){return e.start.compare(t.start)})),{empty:!1,periods:t,contains:function(e){return t.some((function(t){return t.contains(e)}))},intersect:function(e){return n(t.map((function(t){return e.periods.map((function(e){return t.intersect(e)}))})).reduce((function(e,t){return e.concat(t)}),[]))},intersectsWith:function(e){return t.some((function(t){return e.periods.some((function(e){return t.intersectsWith(e)}))}))},joinAdjacent:function(i){return 0===t.length?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n(t.reduce((function(t,n){if(0===t.result.length)return{result:[n],lastJoinable:i(n)};var s=t.result[t.result.length-1],a=i(n);if(s.end.isSame(n.start)&&t.lastJoinable&&a){var r=e(s.start,n.end);return t.result[t.result.length-1]=r,{result:t.result,lastJoinable:!0}}return t.result.push(n),{result:t.result,lastJoinable:a}}),{result:[]}).result)},split:function(e){return n(t.map((function(t){return t.split(e).periods})).reduce((function(e,t){return e.concat(t)}),[]))},toString:function(){return t.map((function(e){return e.toString()})).join(", ")},union:function(e){return e.empty?this:n([].concat(r()(t),r()(e.periods)))}})}return{empty:t,nonEmpty:e,sum:n}}(),D=function(e){var t,n=e;return t={defaultBreakDurations:function(e){return{durations:[e.duration(180),e.duration(120),e.duration(60),e.duration(30)],initial:e.duration(60)}},makeTextLines:function(e){var t=e.breakDuration,n=e.minutesPerLineAtOneHourBreak,i=60/t.totalMinutes/n;return function(e){var t=e.duration().totalMinutes*i;return Math.round(t)}},makeHorizontal:function(e){var t=r()(e);t.sort((function(e,t){return function(e,t){var n=e.start.compare(t.start);return 0!=n?n:-e.end.compare(t.end)}(e.period,t.period)}));var i=function(e){var t=e.reduce((function(e,t){return e.some((function(e){return e.tryAdd(t)}))||e.push(function(e){var t=n.sum([e.period]),i=[e];return{dump:function(){return{coverage:t.toString(),items:i.map((function(e){return{period:e.period.toString(),id:e.id}}))}},layout:function(e,t,n){return i.reduce((function(e,i){return e[i.id]=n(t,1),e}),e)}
1,tryAdd:function(e){var s=n.sum([e.period]);return!t.intersectsWith(s)&&(t=t.union(s),i.push(e),!0)}}}(t)),e}),[]);return{dump:function(){return t.map((function(e){return e.dump()}))},layout:function(){var e=t.length;return{cssPercents:function(t,i){return n(function(t,n){var i=t/n*100,s=(n-t)/n/e*100;return function(e,t){return{left:i+e*s+"%",width:t*s+"%"}}}(t,i))},cssPixels:function(t,i){return n(function(t,n){var i=n/e;return function(e,n){return{left:t+e*i+"px",width:n*i+"px"}}}(t,i))}};function n(e){return t.reduce((function(t,n,i){return n.layout(t,i,e)}),{})}}}}(t);return i.layout()},makeVertical:function(e){if(0===(e=e.filter((function(e){return!e.empty})).map((function(e,t){return{period:e,index:t}}))).length)throw"The periods contain no non-empty intervals";function t(t){var n=e.find((function(e){return e.period.contains(t)}))||e[e.length-1],i=n.period,s=n.index;if(!i.contains(t)&&!i.end.isSame(t))throw"The point + "+t.toString()+" is outside of all periods";return(s+i.start.durationTo(t).totalMinutes/i.start.durationTo(i.end).totalMinutes)/e.length}function n(e){if(e.empty)throw"Empty intervals are not supported";var n=t(e.start);return{start:n,duration:t(e.end)-n}}return e.sort((function(e,t){var n=e.period,i=t.period;return n.start.compare(i.start)})),{cssHeight:function(e,t){return n(e).duration*t+"px"},toCssPercents:function(e){function t(e){return(100*e).toFixed(5)+"%"}var i=n(e),s=i.start,a=i.duration;return{top:t(s),height:t(a)}}}},makePeriods:function(e,t,n){var i=n.breakDuration;if(!e.length)return[];var s=function(e){var n=[],s=t.nonEmpty(e.start.startOfHour(),e.end),a=t.nonEmpty(s.start,s.start.addDuration(i));for(;a.intersectsWith(s);)n.push(a),a=a.map((function(e){return e.addDuration(i)}));return t.sum(n)}(e.reduce((function(e,t){return e.span(t)}))),a=s.periods.map((function(e){return{description:r(e),isBreak:!0,number:"",period:e}}));return a.sort((function(e,t){var n=e.period,i=t.period;return n.start.compare(i.start)})),a;function r(e){return 0===e.start.minute&&0===e.end.minute&&e.end.hour-e.start.hour==1?e.start.toString():e.toString()}}},t}(S),w=function(e){var t=e.Future;return{AulaTokenMixin:{data:function(){return{aulaToken:void 0,aulaTokenFuture:new t}},computed:{token:function(){return this.aulaTokenFuture.promise}},watch:{aulaToken:function(e){null!=e&&(this.aulaTokenFuture.resolve(e),this.aulaTokenFuture=new t,this.aulaTokenFuture.resolve(e))}},mounted:function(){this.aulaToken=this.getAulaToken()}}}}(function(){function e(){var e=this;this.promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return e.prototype.reject=function(e){this._reject(e)},e.prototype.resolve=function(e){this._resolve(e)},{Future:e}}()),N=function(){function e(e,n,i,s){return t(s()().year(e).month(n-1).date(i).hour(0).minute(0).second(0).millisecond(0))}function t(e){if(!e.isValid()){var n=function(e){switch(e.invalidAt()){case 0:return"Year value ".concat(e.year()," is invalid");case 1:return"Month value ".concat(e.month()," is invalid");case 2:return"Day value ".concat(e.date()," is invalid");default:return null}}(e);throw new Error("Invalid date".concat(n?". "+n:"","."))}return{_value:e,get year(){return this._value.year()},get month(){return this._value.month()+1},get day(){return this._value.date()},get dayOfWeek(){var e=this._value.day();return 0==e?6:e-1},addDays:function(e){return t(this._value.clone().add(e,"days"))},compare:function(e){return this._value.diff(e._value,"days")},format:function(e){switch(e){case"dayofweek":return this._value.format("dddd");case"input":return this._value.format("YYYY-MM-DD");default:throw new Error('Unknown date point format "'.concat(e,'"'))}},isAfter:function(e){return this._value.isAfter(e._value)},isBefore:function(e){return this._value.isBefore(e._value)},isSame:function(e){return this._value.isSame(e._value)},toJSON:function(){return this._value.format("YYYY-MM-DD")},toString:function(){return this._value.format("L")}}}return{parsePoint:function(t,n){var i=t.match(/([0-9]{1,5})\x2D([0-9]{1,2})\x2D([0-9]{1,2})/);if(i&&i[0]===t){var s=l()(i,4),a=s[1],r=s[2],o=s[3];return e(Number.parseInt(a,10),Number.parseInt(r,10),Number.parseInt(o,10),n)}return null},point:e,wrapMoment:function(e){return t(e.clone().hour(0).minute(0).second(0).millisecond(0))}}}(),R=function(e,t,n){var i=t,s=n,a=e;function r(e,t,n){this._moment=n,this._axios=function(){return t().then((function(t){return e().create({headers:{Authorization:t}})}))},this.apiUrl="https://personale.api.kmd.dk/aula/api/v1/SubstituteNotes",this.apiUrlV2="https://personale.api.kmd.dk/aula/api/v2/SubstituteNotes"}return r.prototype={activities:function(e,t,n){var r=this;return this._axios().then((function(i){return i.get(r.apiUrl+"/activities",{headers:{Accept:"application/json"},params:{date:n.toJSON(),personnelType:t,schoolCode:e}})})).then((function(e){return e.data.map((function(e){return{abbreviationOfSubject:e.abbreviationOfSubject,absentee:e.absentee,endLesson:e.endLesson,classes:e.classes,description:e.description,id:e.id,notes:e.notes,period:i.nonEmpty(s.parsePoint(e.start),s.parsePoint(e.end)),rooms:e.rooms,startLesson:e.startLesson,substitution:e.substitution}}))}),a.responseError)},personnelTypes:function(e){var t=this;return this._axios().then((function(n){return n.get(t.apiUrlV2+"/personnelTypes",{headers:{Accept:"application/json"},params:{schoolCode:e}})})).then((function(e){return e.data}),a.responseError)},schools:function(e){var t=this;return this._axios().then((function(n){return n.get(t.apiUrl+"/schools?".concat(a.arrayToQueryString("schoolCodes",null!=e?e:[])),{headers:{Accept:"application/json"}})})).then((function(e){return e.data}),a.responseError)},setNotes:function(e,t,n,i,s){var r=this,o={activity:e,notes:[{type:0,contents:n},{type:1,contents:i},{type:2,contents:s}],schoolCode:t};return this._axios().then((function(e){return e.post(r.apiUrl,o)})).then((function(e){return e.data}),a.responseError)}},{Api:r}}({arrayToQueryString:function(e,t){return t.map((function(t){var n,i;return"".concat(e,"=").concat(null!==(n=null==t||null===(i=t.toJSON)||void 0===i?void 0:i.call(t))&&void 0!==n?n:t)})).join("&")},responseError:function(e){var t,n,i,s,a,r,o;return Promise.reject(null!==(t=null!==(n=null==e||null===(i=e.response)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.Message)&&void 0!==n?n:null==e||null===(a=e.response)||void 0===a||null===(r=a.data)||void 0===r||null===(o=r.Error)||void 0===o?void 0:o.Message)&&void 0!==t?t:e.message)}},S,T),O=w.AulaTokenMixin,L=N,x=T,P=S,M=I,F=D,U=C,B=A.Actions,V=E.makeActivity,W=R.Api,G=_.Store;var H={name:"SubstituteNotes",mixins:[O],props:{axios:{type:Function,required:!0},currentWeekNumber:{type:String,default:null},moment:{type:Function,required:!0},placement:{type:String,required:!0},getAulaToken:{type:Function,required:!0},institutionFilter:{type:Array,required:!0},sessionUUID:{type:String,required:!0}},data:function(){var e,t,n,i=this,s=new W((function(){return i.axios}),(function(){return i.token}),(function(){return i.moment})),a=new G(this.$set.bind(this));return{actions:new B(s,a),activityTableColClientWidth:200,breakDurationInput:(e
1=F.defaultBreakDurations(x),t=e.durations,n=e.initial,U.selectingItem({items:t,initialItem:n,itemCompare:function(e,t){return e.isSame(t)}})),loading:!1,notesLoading:!1,personnelTypes:[],activities:[],schools:[],selectedDate:null,selectedInstitution:null,selectedPersonnelType:0,settings:null,internalNote:null,lessonNote:null,substituteNote:null,selectedActivity:null,showAlert:!1,store:a,alertMessage:"",alertType:"success",alertCountdown:5,windowWidth:window.innerWidth,apiUrl:"https://personale.api.kmd.dk/aula/api/v1/SubstituteNotes",apiUrlV2:"https://personale.api.kmd.dk/aula/api/v2/SubstituteNotes"}},computed:{activityHorizontalLayout:function(){if(!this.activities||!this.activityTableColClientWidth)return{};var e=this.activityTableColClientWidth-50,t=this.isNarrow?50:120;return F.makeHorizontal(this.activities).cssPercents(t,e)},activityTextLines:function(){if(!this.activities)return{};var e=F.makeTextLines({breakDuration:this.breakDurationInput.item(),minutesPerLineAtOneHourBreak:15});return this.activities.reduce((function(t,n){return t[n.id]=e(n.period),t}),{})},activityVerticalLayout:function(){if(!this.activities||!this.periods)return{};var e=F.makeVertical(this.periods.map((function(e){return e.period})));return this.activities.reduce((function(t,n){return t[n.id]=e.toCssPercents(n.period),t}),{})},numberOfColsInPickers:function(){return this.isNarrow?12:this.hasMultipleSchools&&this.hasMultiplePersonnelTypes?4:6},hasMultipleSchools:function(){return this.schools.length>1},hasMultiplePersonnelTypes:function(){return this.personnelTypes.length>1},inputSelected:function(){return null!=this.selectedDate&&this.selectedDate.length>0&&this.selectedPersonnelType>0},isNarrow:function(){return"narrow"==this.placement.toLowerCase()||this.isMobile},isMobile:function(){return this.windowWidth<576},periods:function(){return this.activities?F.makePeriods(this.activities.map((function(e){return e.period})),P,{breakDuration:this.breakDurationInput.item()}):[]},hasSelectedActivity:function(){return null!=this.selectedActivity&&this.selectedActivity.id.length>0}},watch:{currentWeekNumber:function(e,t){"NoticeBoard"!==this.placement&&e&&e.toLowerCase()!==t.toLowerCase()&&(this.week=this.extractWeekNumber(e),this.selectedDate=this.extractSelectedDate(),this.loadActivities())},institutionFilter:function(){"NoticeBoard"!==this.placement&&(this.institutionFilter.includes(this.selectedInstitution)||(this.selectedInstitution=this.institutionFilter[0]),this.loadSchools())},activities:function(){this.$nextTick((function(){this.resizeEventHandler()}))}},created:function(){this.moment.locale("da"),this.week=this.extractWeekNumber(this.currentWeekNumber),this.selectedDate=this.extractSelectedDate(),this.selectedInstitution=this.institutionFilter[0]},mounted:function(){window.addEventListener("resize",this.resizeEventHandler),"NoticeBoard"!==this.placement&&this.loadSettings()},beforeDestroy:function(){window.removeEventListener("resize",this.resizeEventHandler)},methods:{dismissAlert:function(){this.showAlert=!1},extractWeekNumber:function(e){if(!/^([0-9]){4}\x2DW([0-9]){1,2}$/.test(e))return this.moment().week();var t=e.split("-W"),n=l()(t,2),i=n[0],s=n[1],a=parseInt(s,10);return this.year=parseInt(i,10),a},extractSelectedDate:function(){var e=this.moment().year(this.year).week(this.week),t=this.moment();return(t.isSame(e,"week")?t:e.weekday(0)).format("YYYY-MM-DD")},handleDateChange:function(e){e&&this.loadActivities()},handleInstitutionChanged:function(e){this.settings.setPersistent("selectedInstitution",e),this.loadPersonnelTypes()},showAlertMessage:function(e,t){this.showAlert=!1,this.alertMessage=e,this.alertType=t?"danger":"success",this.showAlert=!0},selectActivity:function(e){this.selectedActivity=this.activities.find((function(t){return t.id===e})),this.internalNote=this.selectedActivity.notes.internal,this.lessonNote=this.selectedActivity.notes.lesson,this.substituteNote=this.selectedActivity.notes.substitute,this.isNarrow&&this.$refs["notes-modal"].show()},loadSchools:function(){var e,t,n,i=this,s=null!==(e=null===(t=this.institutionFilter)||void 0===t?void 0:t.map((function(e){return{text:e,value:e}})))&&void 0!==e?e:[];s.version=1,this.schools.version||(this.schools=s);var a=this.schools.version;this.actions.loadSchools(null!==(n=this.institutionFilter)&&void 0!==n?n:[]).then((function(){i.schools.version===a&&(i.schools=i.store.schools.map((function(e){return{text:e.name,value:e.code}})),i.schools.version=a+1,i.schools.length>0&&!i.schools.some((function(e){return e.code===i.selectedInstitution}))&&(i.selectedInstitution=i.schools[0].value,i.handleInstitutionChanged()))})).catch((function(e){i.showError(e),i.schools.version===a&&(i.schools=s)}))},loadSettings:function(){var e=this;this.token.then((function(t){return M(e.axios,t,e.sessionUUID,"NoticeBoard"===e.placement,e.institutionCode,"substitute-notes").then((function(t){e.settings=t,e.breakDurationInput.value=t.getPersistent
1("breakDurationInputValue",e.breakDurationInput.value),e.$watch("breakDurationInput.value",(function(e){t.setPersistent("breakDurationInputValue",e)})),e.selectedInstitution=e.settings.getPersistent("selectedInstitution",e.selectedInstitution,(function(t){return e.institutionFilter.includes(t)})),e.loadSchools()}))}))},loadPersonnelTypes:function(){var e=this;this.loading=!0,this.selectedActivity=null;var t=this.selectedInstitution;this.actions.loadPersonnelTypes(t).then((function(){var n=e.store.personnelTypes[t],i=e.store.idsOfPreselectedPersonnelTypes[t];e.selectedPersonnelType=i,e.personnelTypes=n,e.loading=!1,e.loadActivities()})).catch((function(t){e.loading=!1,e.showError(t)}))},loadActivities:function(){var e=this;if(null===this.selectedPersonnelType||this.selectedPersonnelType<1||null===this.selectedDate||""===this.selectedDate)return this.activities=[],void(this.selectedActivity=null);this.loading=!0,this.selectedActivity=null;var t=this.selectedInstitution,n=this.selectedPersonnelType,i=L.parsePoint(this.selectedDate,(function(){return e.moment}));this.actions.loadActivities(t,n,i).then((function(){var s,a,r,o=null!==(s=null===(a=e.store.activities[t])||void 0===a||null===(r=a[i.toJSON()])||void 0===r?void 0:r[n])&&void 0!==s?s:[];e.activities=o.map((function(e){return V(e)})),e.loading=!1})).catch((function(t){e.loading=!1,e.showError(t)}))},showError:function(e){var t="Der skete en fejl";t=void 0===e.response?e.message||"Ukendt fejl":e.response.data.message,this.showAlertMessage(t,!0)},saveNotes:function(){var e=this;null!==this.selectedActivity&&(this.notesLoading=!0,this.actions.setNotes(this.selectedActivity.activityId,this.selectedInstitution,this.internalNote,this.lessonNote,this.substituteNote).then((function(){e.activities.filter((function(t){return t.activityId===e.selectedActivity.activityId})).forEach((function(t){t.notes.update(e.internalNote,e.lessonNote,e.substituteNote)})),e.notesLoading=!1,e.showAlertMessage("Noterne blev gemt",!1)}),(function(){e.notesLoading=!1,e.showAlertMessage("Kunne ikke gemme noterne",!0)})),this.isNarrow&&this.$refs["notes-modal"].hide())},resizeEventHandler:function(){this.$refs.activityTableColRef&&0!==this.$refs.activityTableColRef.clientWidth&&(this.activityTableColClientWidth=this.$refs.activityTableColRef.clientWidth),this.windowWidth=window.innerWidth}}},j=n(3),Y=Object(j.a)(H,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-container",{class:["root",{mobile:e.isMobile}],attrs:{id:"widget-content"}},[n("b-row",[n("b-col",[n("div",{staticClass:"widget-header"},[n("h2",[e._v("Vikarnoter")]),e._v(" "),n("h4",[e._v("Educa Personale")])])])],1),e._v(" "),"NoticeBoard"===e.placement?n("b-row",[n("b-col",[e._v("Denne widget kan ikke placeres på dashboards")])],1):[e.showAlert?n("b-row",[n("b-col",[n("b-alert",{attrs:{variant:e.alertType,show:e.alertCountdown,fade:"","dismiss-label":"Luk"},on:{dismissed:e.dismissAlert}},[e._v("\n          "+e._s(e.alertMessage)+"\n        ")])],1)],1):e._e(),e._v(" "),n("b-row",[n("b-col",{attrs:{cols:e.numberOfColsInPickers}},[n("div",{staticClass:"input-header"},[e._v("Dato")]),e._v(" "),n("b-form-input",{staticClass:"form-control",attrs:{id:"type-date",type:"date"},on:{change:e.handleDateChange},model:{value:e.selectedDate,callback:function(t){e.selectedDate=t},expression:"selectedDate"}})],1),e._v(" "),e.hasMultipleSchools?n("b-col",{attrs:{cols:e.numberOfColsInPickers}},[n("div",{staticClass:"input-header"},[e._v("Institution")]),e._v(" "),n("b-form-select",{attrs:{options:e.schools},on:{change:e.handleInstitutionChanged},model:{value:e.selectedInstitution,callback:function(t){e.selectedInstitution=t},expression:"selectedInstitution"}})],1):e._e(),e._v(" "),e.hasMultiplePersonnelTypes?n("b-col",{attrs:{cols:e.numberOfColsInPickers}},[n("div",{staticClass:"input-header"},[e._v("Ansættelse")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedPersonnelType,expression:"selectedPersonnelType"}],attrs:{name:"PersonnelType"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,
1(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedPersonnelType=t.target.multiple?n:n[0]},function(t){return e.loadActivities()}]}},[n("option",{attrs:{disabled:"",value:"0"}},[e._v("\n            Vælg ansættelse\n          ")]),e._v(" "),e._l(e.personnelTypes,(function(t){return n("option",{key:t.id,domProps:{value:t.id}},[e._v("\n            "+e._s(t.description)+"\n          ")])}))],2)]):e._e()],1),e._v(" "),n("div",{staticClass:"splitter"}),e._v(" "),n("b-row",[n("b-col",{ref:"activityTableColRef",attrs:{cols:e.isNarrow?12:6}},[e.loading?n("div",{staticClass:"loader"},[n("i",{staticClass:"fa fa-spinner fa-spin"})]):e._e(),e._v(" "),e.activities.length>0?n("div",[n("div",{staticClass:"d-flex flex-row justify-content-end mb-2"},[n("span",{staticClass:"mr-2"},[e._v("Tidsakse:")]),e._v(" "),n("b-input",{staticClass:"activity-table-timeaxis-input",attrs:{id:"kmd-substitute-notes-timeaxis-input",min:e.breakDurationInput.min,max:e.breakDurationInput.max,type:"range"},model:{value:e.breakDurationInput.value,callback:function(t){e.$set(e.breakDurationInput,"value",t)},expression:"breakDurationInput.value"}}),e._v(" "),n("b-popover",{attrs:{target:"kmd-substitute-notes-timeaxis-input",triggers:"hover",placement:"top"}},[e._v("\n              "+e._s(e.breakDurationInput.item().toString("human"))+"\n            ")])],1),e._v(" "),n("div",{staticClass:"activity-table-container"},[n("div",{ref:"activityTableContainerRef",staticClass:"position-relative"},[n("table",{class:["activity-table table b-table table-striped",{busy:e.loading}]},[n("tbody",e._l(e.periods,(function(t,i){return n("tr",{key:i},[n("th",{class:["period-column",{narrow:e.isNarrow}]},[n("p",[e._v(e._s(t.number))]),e._v(" "),n("p",[e._v(e._s(t.description))])]),e._v(" "),n("td",{class:"activity-column"},[0===i?e._l(e.activities,(function(t){return n("div",{key:t.id},[n("div",{class:["activity","clickable",{narrow:e.isNarrow,selected:e.selectedActivity&&t.id===e.selectedActivity.id}],style:{height:t.height(e.activityVerticalLayout),top:t.top(e.activityVerticalLayout),left:t.left(e.activityHorizontalLayout),width:t.width(e.activityHorizontalLayout)},attrs:{title:t.tooltip},on:{click:function(n){return e.selectActivity(t.id)}}},[n("div",{staticClass:"activity-content"},[n("div",{class:["activity-description",{"without-period":!t.showPeriod(e.activityTextLines)}]},[n("span",[e._v(e._s(t.description(e.activityTextLines)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showPeriod(e.activityTextLines),expression:"\n                                  activity.showPeriod(activityTextLines)\n                                "}],staticClass:"activity-period"},[n("span",[e._v(e._s(t.periodDescription))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showNote(),expression:"activity.showNote()"}],staticClass:"activity-note"},[n("i",{staticClass:"fas fa-sticky-note",attrs:{title:t.notes.tooltip()}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showAbsentee(e.activityTextLines),expression:"\n                                  activity.showAbsentee(activityTextLines)\n                                "}],class:["activity-absentee",{"with-note":t.showNote(),"with-substitution":t.showSubstitution(e.activityTextLines)}]},[n("span",[e._v(e._s(t.absentee))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showSubstitution(e.activityTextLines),expression:"\n                                  activity.showSubstitution(activityTextLines)\n                                "}],class:["activity-substitution",{"with-note":t.showNote()&&!t.showAbsentee(e.activityTextLines),"with-absentee":t.showAbsentee(e.activityTextLines)}]},[n("span",[e._v(e._s(t.substitution))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showClasses(e.activityTextLines),expression:"\n                                  activity.showClasses(activityTextLines)\n                                "}],class:["activity-classes",{"with-rooms":t.showRooms(e.activityTextLines)}]},[n("span",[e._v(e._s(t.classes))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showRooms(e.activityTextLines),expression:"activity.showRooms(activityTextLines)"}],class:["activity-rooms",{"with-classes":t.showClasses(e.activityTextLines)}]},[n("span",[e._v(e._s(t.rooms))])])])])])}
1)):e._e()],2)])})),0)])])])]):!e.loading&&e.selectedDate&&e.selectedPersonnelType>0?n("span",{staticClass:"text-muted"},[e._v("Der er ikke registret noget aktivitet i den valgte periode.")]):e.loading||!e.selectedDate||e.selectedPersonnelType?e._e():n("span",{staticClass:"text-muted"},[e._v("Der er ingen aktive ansættelser i den valgte period.")])]),e._v(" "),e.isNarrow?e._e():n("b-col",{attrs:{cols:e.isNarrow?12:6}},[n("div",{attrs:{id:"notes"}},[e.notesLoading?n("div",{staticClass:"loader"},[n("i",{staticClass:"fa fa-spinner fa-spin"})]):e._e(),e._v(" "),e.loading||e.notesLoading||!e.hasSelectedActivity?e._e():n("div",{class:{narrow:e.isNarrow},attrs:{id:"notes-content"}},[n("div",{attrs:{id:"notes-header"}},[e._v("Vikarnote")]),e._v(" "),n("div",{staticClass:"notes-description"},[e._v("\n              "+e._s(e.selectedActivity.panelDescription)+"\n            ")]),e._v(" "),e._l(e.selectedActivity.panelInformation,(function(t){return n("div",{key:t,staticClass:"text-center"},[n("span",[e._v(e._s(t))])])})),e._v(" "),n("div",{staticClass:"note-header"},[e._v("\n              Vikarnote\n              "),n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"info fa fa-question-circle",attrs:{title:'Vil blive vist for vikaren på Aula i noten "note til vikar" yderligt vises noten på widgten "skolens fraværsoverblik"'}})]),e._v(" "),n("div",{staticClass:"note-container"},[n("div",{staticClass:"note-textarea"},[n("b-form-textarea",{attrs:{id:"substituteNote",placeholder:"Indtast note",rows:"3"},model:{value:e.lessonNote,callback:function(t){e.lessonNote=t},expression:"lessonNote"}},[e._v("\n                  "+e._s(e.lessonNote)+"\n                ")])],1)]),e._v(" "),n("div",{staticClass:"note-header"},[e._v("\n              Intern note\n              "),n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"info fa fa-question-circle",attrs:{title:"Vil kun blive vist ved intern brug."}})]),e._v(" "),n("div",{staticClass:"note-container"},[n("div",{staticClass:"note-textarea"},[n("b-form-textarea",{attrs:{id:"internalNote",placeholder:"Indtast note",rows:"3"},model:{value:e.internalNote,callback:function(t){e.internalNote=t},expression:"internalNote"}},[e._v("\n                  "+e._s(e.internalNote)+"\n                ")])],1)]),e._v(" "),n("div",{staticClass:"note-header"},[e._v("\n              Note til lærer\n              "),n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"info fa fa-question-circle",attrs:{title:"Denne note bliver tilgængelig for læreren for den time der vikardækkes."}})]),e._v(" "),n("div",{staticClass:"note-container"},[n("div",{staticClass:"note-textarea"},[n("b-form-textarea",{attrs:{id:"substituteNote",placeholder:"Indtast note til læreren",rows:"3"},model:{value:e.substituteNote,callback:function(t){e.substituteNote=t},expression:"substituteNote"}},[e._v("\n                  "+e._s(e.substituteNote)+"\n                ")])],1)]),e._v(" "),n("div",{staticClass:"text-right"},[n("b-button",{staticClass:"save-button",class:{fullwidth:e.isNarrow},attrs:{type:"submit",variant:"primary"},on:{click:e.saveNotes}},[e._v("\n                Gem\n              ")])],1)],2)])])],1),e._v(" "),n("b-modal",{ref:"notes-modal",attrs:{title:e.selectedActivity?"Vikarnote: "+e.selectedActivity.panelDescription:"","hide-footer":"","no-close-on-backdrop":""}},[n("div",{attrs:{id:"notes"}},[e.loading||e.notesLoading?n("div",{staticClass:"loader"},[n("i",{staticClass:"fa fa-spinner fa-spin"})]):e._e(),e._v(" "),e.loading||e.notesLoading||!e.hasSelectedActivity?e._e():n("div",{class:{narrow:e.isNarrow},attrs:{id:"notes-content"}},[n("div",{attrs:{id:"notes-header"}},[e._v("Vikarnote")]),e._v(" "),n("div",{staticClass:"notes-description"},[e._v("\n            "+e._s(e.selectedActivity.panelDescription)+"\n          ")]),e._v(" "),e._l(e.selectedActivity.panelInformation,(function(t){return n("div",{key:t,staticClass:"text-center"},[n("span",[e._v(e._s(t))])])})),e._v(" "),n("div",{staticClass:"note-header"},[e._v("\n            Vikarnote\n            "),n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"info fa fa-question-circle",attrs:{title:'Vil blive vist for vikaren på Aula 
1i noten "note til vikar" yderligt vises noten på widgten "skolens fraværsoverblik"'}})]),e._v(" "),n("div",{staticClass:"note-container"},[n("div",{staticClass:"note-textarea"},[n("b-form-textarea",{attrs:{id:"substituteNote",placeholder:"Indtast note",rows:"3"},model:{value:e.lessonNote,callback:function(t){e.lessonNote=t},expression:"lessonNote"}},[e._v("\n                "+e._s(e.lessonNote)+"\n              ")])],1)]),e._v(" "),n("div",{staticClass:"note-header"},[e._v("\n            Intern note\n            "),n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"info fa fa-question-circle",attrs:{title:"Vil kun blive vist ved intern brug."}})]),e._v(" "),n("div",{staticClass:"note-container"},[n("div",{staticClass:"note-textarea"},[n("b-form-textarea",{attrs:{id:"internalNote",placeholder:"Indtast note",rows:"3"},model:{value:e.internalNote,callback:function(t){e.internalNote=t},expression:"internalNote"}},[e._v("\n                "+e._s(e.internalNote)+"\n              ")])],1)]),e._v(" "),n("div",{staticClass:"note-header"},[e._v("\n            Note til lærer\n            "),n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"info fa fa-question-circle",attrs:{title:"Denne note bliver tilgængelig for læreren for den time der vikardækkes."}})]),e._v(" "),n("div",{staticClass:"note-container"},[n("div",{staticClass:"note-textarea"},[n("b-form-textarea",{attrs:{id:"substituteNote",placeholder:"Indtast note til læreren",rows:"3"},model:{value:e.substituteNote,callback:function(t){e.substituteNote=t},expression:"substituteNote"}},[e._v("\n                "+e._s(e.substituteNote)+"\n              ")])],1)]),e._v(" "),n("b-button",{staticClass:"save-button",class:{fullwidth:e.isNarrow},attrs:{type:"submit",variant:"primary"},on:{click:e.saveNotes}},[e._v("\n            Gem\n          ")])],2)])])]],2)}),[],!1,null,"5e74acf6",null);t.a=Y.exports},837:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Person?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,moment:Function,assuranceLevel:Number,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,who:"Aula widget developers",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,domain:i,domainOld:"https://www.infoba.dk",fields:{},item:{Binder:{}}}},methods:{getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="ParentChildrenSummary",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/ParentChildrenSummaryGet",{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.moment.locale("da"),t.item=e.data,s(t),0==t.item.Binder.Person.ChildInfoSuitcaseList.length&&0==t.item.Binder.Person.ChildInfoPTCMeetingList.length&&0==t.item.Binder.Person.ChildInfoFocusChildList.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},getSuitcaseLink:function(e){return i+"/FO/INFOBACloud/DownloadFile/"+e},getPTCMeetingLink:function(e){return i+"/FO/PTCMeeting/Index/"+e+"?Type=PtcMeeting"},getFocusChildDate:function(e){return 1==this.moment(e).isSame(this.moment().startOf("day"),"d")?"I dag ":this.moment(e).format("DD-MM-YYYY")}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0037V0001"},[n("div",{key:e.section},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[e._m(0),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(1)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[e._m(2),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{directives:[{name:"show",rawName:"v-show",value:0!=this.item.Binder.Person.ChildInfoSuitcaseList.length,expression:"this.item.Binder.Person.ChildInfoSuitcaseList.length != 0"}],staticClass:"component"},[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#eb7404"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-briefcase"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain+"/FO")}}},[e._v("Digital skolekuffert")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item",staticStyle:{height:"auto"}},[n("div",{staticClass:"infoba-content"},e._l(this.item.Binder.Person.ChildInfoSuitcaseList,(function(t){return n("div",{staticClass:"infoba-row",staticStyle:{"align-content":"center","margin-top":"5px"}},[n("div",{staticStyle:{"padding-top":"5px"}},[e._v(e._s(t.ChildName)+" ")]),e._v(" "),n("div",{staticStyle:{display:"flex"},on:{click:function(n){e.goto(e.getSuitcaseLink(t.DocumentId))}}},[n("div",{staticClass:"icon-download",staticStyle:{cursor:"pointer"}})])])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0!=this.item.Binder.Person.ChildInfoPTCMeetingList.length,expression:"this.item.Binder.Person.ChildInfoPTCMeetingList.length != 0"}],staticClass:"component"},[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#96be2c"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-chat"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain+"/FO/PTCMeeting/MeetingList")}}},[e._v(e._s(e.item.Binder.Tile.Header))])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item",staticStyle:{height:"auto"}},[n("div",{staticClass:"infoba-content"},e._l(this.item.Binder.Person.ChildInfoPTCMeetingList,(function(t){return n("div",{staticClass:"infoba-row"},[n("div",[n("div",{staticClass:"infoba-link",on:{click:function(n){e.goto(e.getPTCMeetingLink(t.ChildId
1))}}},[e._v(e._s(t.ChildName))]),e._v(" "),n("div",[e._v(" "+e._s(t.Type))])]),e._v(" "),n("div",{staticClass:"infoba-gray"},[n("div",[e._v(e._s(e.moment(t.Date).format("DD-MM-YYYY")))]),e._v(" "),n("div",{staticStyle:{float:"right"}},[e._v(" kl. "+e._s(e.moment(t.Date).format("HH:mm")))])])])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0!=this.item.Binder.Person.ChildInfoFocusChildList.length,expression:"this.item.Binder.Person.ChildInfoFocusChildList.length != 0"}],staticClass:"component"},[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-eye"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain+"/FO/Report/IndexFocusChild")}}},[e._v("Fokusbarnskema")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item",staticStyle:{height:"auto"}},[n("div",{staticClass:"infoba-content"},e._l(this.item.Binder.Person.ChildInfoFocusChildList,(function(t){return n("div",{staticClass:"infoba-row"},[n("div",[n("div",{staticClass:"infoba-link",on:{click:function(t){return e.goto(e.domain+"/FO/Report/IndexFocusChild?Type=focuschild")}}},[e._v(e._s(t.ChildName))]),e._v(" "),t.IsFirst?n("div",[e._v("Læs mere om fokusbarnsskemaer "),n("a",{attrs:{href:t.ParentUrl}},[e._v("her")])]):n("div",[e._v("Har været fokusbarn ")])]),e._v(" "),n("div",{staticClass:"infoba-gray"},[e._v(e._s(e.getFocusChildDate(t.Date)))])])})),0)])])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{width:"24px"}},[t("i",{staticClass:"fal fa-home"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{width:"24px"}},[t("i",{staticClass:"fal fa-home"})])}],!1,null,null,null);t.a=o.exports},838:function(e,t,n){"use strict";var i={name:"WeekPlan",props:{moment:Function,currentWeekNumber:{default:"2019-W35"},placement:{type:String,default:"narrow"},userProfile:{type:String,default:"Parent"},getAulaToken:Function,group:String,axios:Function,sessionUUID:String},data:function(){return{aulaToken:null,isLoading:!1,showErrorText:!1,weekplans:[],errorText:"",lessonsWithNotesCounter:0,weekYear:this.currentWeekNumber.substring(0,4),weekNum:this.currentWeekNumber.replace(this.weekYear+"-W",""),localeDate:this.moment().isoWeekday(1)}},computed:{classPlacement:function(){return"aula-"+this.placement},localeYear:function(){return this.moment(this.localeDate).isoWeekYear()},localeWeekNum:function(){return this.localeYear+"-W"+this.localeDate.format("W")},localeWeekNumView:function(){return this.moment(this.localeDate).format("MMM")+" "+this.moment(this.localeDate).format("DD")+" - "+this.moment(this.localeDate).isoWeekday(7).format("DD")+", Uge "+this.localeDate.format("W")},weekPlansReady:function(){var e=this,t=[];return this.weekplans&&this.weekplans.forEach((function(n){var i={name:n.name?n.name:"",note:n.note?n.note:"",days:n.events?e.eventsWithNotes(n.events):[],lessonsWithNotesCounter:e.lessonsWithNotesCounter};t.push(i)})),this.lessonsWithNotesCounter=0,t}},watch:{currentWeekNumber:function(e,t){this.setLocalDateFromProp()},localeDate:function(){null!=this.aulaToken&&this.getWeekNotes()},aulaToken:function(){null!=this.aulaToken&&this.getWeekNotes()}},methods:{setLocalDateFromProp:function(){if(this.currentWeekNumber){this.weekYear=this.currentWeekNumber.substring(0,4),this.weekNum=this.currentWeekNumber.replace(this.weekYear+"-W","");var e=this.moment().set({year:this.weekYear,isoWeek:this.weekNum});this.localeDate=this.moment(e).isoWeekday(1)}},nextWeek:function(){this.localeDate=this.moment(this.localeDate).add(1,"weeks")},prevWeek:function(){this.localeDate=this.moment(this.localeDate).subtract(1,"weeks")},eventsWithNotes:function(e){for(var t=[],n=1;n<8;n++){var i=this.moment(this.localeDate).isoWeekday(n).format("YYYY-MM-DD"),s=this.lessonsFilteredByDay(n,e);s.sort((function(e,t){return new Date(e.startTime)-new Date(t.startTime)})),t.push({date:i,lessons:s})}return t},lessonsFilteredByDay:function(e,t){var n=this;return this.lessonsWithNotesCounter=0,t.filter((function(t){var i=!1;(t.learningGoal.length>0||t.notesForStudents.length>0||t.description.length>0)&&(i=!0,n.lessonsWithNotesCounter++);var s=n.moment(t.startTime).format("YYYY-MM-DD"),a=n.moment(n.localeDate).isoWeekday(e).format("YYYY-MM-DD");return n.moment(s).isSame(a)&&i}))},timeStamp:function(e){return this.moment.locale("da"),this.moment(e).format("LT")},dayDate:function(e){return this.moment.locale("da"),this.moment(e).format("dddd, DD. MMMM YYYY")},getWeekNotes:function(){var e=this;this.isLoading=!0;this.axios.get("https://app.docendo.dk/aula/v2/weekplan?group="+this.group+"&currentWeekNumber="+this.localeWeekNum+"&userProfile="+this.userProfile,{headers:{Authorization:"Baerer "+this.aulaToken,AulaSessionUuid:this.sessionUUID},responseType:"json"}).then((function(t){e.isLoading=!1,"error"===t.data.response?(e.showErrorText=!0,e.errorText=t.data.message,"Signature has expired"===t.data.message&&(e.aulaToken=e.getAulaToken(),e.showErrorText=!1)):(e.showErrorText=!1,e.weekplans=t.data.data.weekPlans)})).catch((function(t){e.isLoading=!1,e.showErrorText=!0,e.errorText="Der kan ikke skabes forbindelse til docendo ("+t.message+")"}))}},created:function(){this.aulaToken=this.getAulaToken(),this.setLocalDateFromProp()}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0057V0001"},[n("div",{staticClass:"d-weekplans"},[e.showErrorText?n("div",[n("p",{staticClass:"text--warning"}
1,[e._v(e._s(e.errorText))])]):e._e(),e._v(" "),e.showErrorText?e._e():n("div",{staticClass:"week-navigation"},[n("button",{staticClass:"small-btn",on:{click:e.prevWeek}},[n("i",{staticClass:"fas fa-chevron-left"})]),e._v(" "),n("div",{staticClass:"week-navigation__date"},[e._v(e._s(e.localeWeekNumView))]),e._v(" "),n("button",{staticClass:"small-btn",on:{click:e.nextWeek}},[n("i",{staticClass:"fas fa-chevron-right"})])]),e._v(" "),e.isLoading?n("div",{staticClass:"isLoading"},[e._m(0)]):e._e(),e._v(" "),e.isLoading||e.showErrorText||0!==e.weekPlansReady.length?e._e():n("div",{staticClass:"isLoading"},[n("p",[e._v("Der er ingen ugeplan at vise")])]),e._v(" "),e._l(e.weekPlansReady,(function(t){return n("div",{staticClass:"d-weekplan",class:e.classPlacement},[n("div",{staticClass:"box"},[n("h2",{staticClass:"marg-20-bottom"},[e._v("Ugeplan"),n("span",{directives:[{name:"show",rawName:"v-show",value:t.name.length>0,expression:"weekplan.name.length > 0"}]},[e._v(" for "+e._s(t.name))])]),e._v(" "),!e.isLoading&&t.note.length>0?n("div",{staticClass:"week_note note_content"},[e._m(1,!0),e._v(" "),n("widget-html",{attrs:{html:t.note}})],1):e._e(),e._v(" "),e.isLoading||e.showErrorText||0!==t.lessonsWithNotesCounter?e._e():n("div",[n("h5",[e._v("Ingen noter til lektioner i denne uge")])]),e._v(" "),n("ul",e._l(t.days,(function(t){return 0!==t.lessons.length?n("li",{key:t.date,staticClass:"day-change"},[n("div",{staticClass:"day-change__header"},[n("h3",[e._v(e._s(e.dayDate(t.date)))])]),e._v(" "),n("ul",e._l(t.lessons,(function(t){return n("li",{key:t.uuid},[n("div",{staticClass:"do-col week_notes_lesson_note",style:{borderColor:t.color}},[n("div",{staticClass:"do-col-1"},[n("div",{staticClass:"subject-info"},[n("div",{staticClass:"subject-title",style:{color:t.color}},[e._v(e._s(t.title)+"\n                      ")]),e._v(" "),n("div",{staticClass:"subject-time"},[n("i",{staticClass:"far fa-clock marg-5-right"}),e._v("\n                        "+e._s(e.timeStamp(t.startTime))+" - "+e._s(e.timeStamp(t.endTime))+"\n                      ")])])]),e._v(" "),n("div",{staticClass:"do-col-1 week-plan__day__notes note_content"},[t.learningGoal.length>0?n("div",{staticClass:"do-col__col",class:{hasNotes:t.learningGoal&&t.learningGoal.length>7}},[n("h4",{style:{color:t.color}},[e._v("Læringsmål")]),e._v(" "),n("widget-html",{attrs:{html:t.learningGoal}})],1):e._e(),e._v(" "),t.description.length>0?n("div",{staticClass:"do-col__col"},[n("h4",{style:{color:t.color}},[e._v("Indhold")]),e._v(" "),n("widget-html",{attrs:{html:t.description}})],1):e._e(),e._v(" "),t.notesForStudents.length>0?n("div",{staticClass:"do-col__col"},[n("h4",{style:{color:t.color}},[e._v("Elevforberedelse")]),e._v(" "),n("widget-html",{attrs:{html:t.notesForStudents}})],1):e._e(),e._v(" "),"employee"===e.userProfile&&t.teacherNotes.length>0?n("div",{staticClass:"do-col__col"},[n("h4",{style:{color:t.color}},[e._v("Vikarnoter")]),e._v(" "),n("widget-html",{attrs:{html:t.teacherNotes}})],1):e._e()])])])})),0)]):e._e()})),0)])])})),e._v(" "),e._m(2)],2)])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"spinner"},[n("div",{staticClass:"bounce1"}),e._v(" "),n("div",{staticClass:"bounce2"}),e._v(" "),n("div",{staticClass:"bounce3"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"week_note__headline"},[n("b",[e._v("Note til ugen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"footer-logo"},[t("a",{attrs:{href:"https://app.docendo.dk",target:"_blank"}},[t("img",{attrs:{src:"https://app.docendo.dk/static/img/aula-assets/docendo-logo-grey.png"}})])])}],!1,null,null,null);t.a=a.exports},839:function(e,t,n){"use strict";var i=n(87),s=n.n(i),a=n(17),r=n.n(a),o=n(47),l=n.n(o),c=n(7),u=n.n(c);function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var m,p,v,f,g,_=function(){function e(e){this.absenceReasons={},this.periodOfDepartments=null,this.personnel={},this.schools=[],this.timelines={},this._vueSet=e}return e.prototype={clear:function(){this.absenceReasons={},this.periodOfDepartments=null,this.personnel={},this.schools=[],this.timelines={}},setAbsenceReasons:function(e){var t=this;e.forEach((function(e){t._vueSet(t.absenceReasons,e.id,e.description)}))},setSchools:function(e,t){var n,i=this;null!==(n=this.periodOfDepartments)&&void 0!==n&&n.isSame(t)||(this.periodOfDepartments=t,this.schools=[]),e.forEach((function(e){var t=i.schools.findIndex((function(t){return t.code===e.code}));-1===t?i.schools.push(e):i.schools.splice(t,1,e)})),this.schools.sort((function(e,t){return e.name.localeCompare(t.name)}))},setPersonnel:function(e,t){var n,i=null!==(n=this.personnel[e])&&void 0!==n?n:this._vueSet(this.personnel,e,[]);t.forEach((function(e){var t=i.findIndex((function(t){return t.id===e.id}));-1===t?i.push(e):i.splice(t,1,e)})),i.sort((function(e,t){return e.fullName.localeCompare(t.fullName)}))},setTimeline:function(e,t,n,i,s,a,r){var o,l,c=null!=t?t:e,u=null!==(o=this.timelines[c])&&void 0!==o?o:this._vueSet(this.timelines,c,{}),d=null!==(l=u[n.toJSON()])&&void 0!==l?l:this._vueSet(u,n.toJSON(),{});this._vueSet(d,r,{absences:i,activities:s,personAbsentPeriods:a})}},{Store:e}}(),E=function(e){var t=e.makeActivities;function n(e,t,n){var i,s=e.find((function(e){return e.personnel.includes(t)}));return s?6!==s.type?"Fraværende":null!==(i=n[s.reasonId])&&void 0!==i?i:"???":"Vikaropgave"}function i(e){return!e.length||1==e.length&&"00:00"!==e[0].start&&"23:59"!==e[0].end?"":e.map((function(e){return e.start+" - "+e.end})).join("\n")}function s(e){if(!e.length)return"";var t=e[0].start,n=e[e.length-1].end;return"00:00"===t&&"23:59"===n?"hele dagen":t+" - "+n}return{makePersonnel:function(e,a,r,o,l){var c=r.map((function(c){var u,d=t(a,r,c.id);return d.length?function(e,t,a,r,o){var l=e.initials+" - "+e.fullName;return{absentPeriods:{empty:!r.length,description:s(r),tooltip:i(r)},absenceDescription:n(t,e.id,o),activities:a,initials:e.initials,initialsAndFullName:l,fullName:e.fullName,id:e.id,compare:function(e){return l.localeCompare(e.initialsAndFullName)}}}(c,e,d,null!==(u=o[c.id])&&void 0!==u?u:[],l):null})).filter((function(e){return e}));return c.sort((function(e,t){return e.compare(t)})),c}}}(function(e){var t=e.alternateActions;function n(e,t){return t&&null===e}function i(e,t){return t&&null!==e}function s(e){if(!e)return"";var t=e.slice();return t.sort(),t.join(", ")}function a(e,t,n,i,s,a){return[r("Beskrivelse",n),r("Fag",e),r("Klasser",t),r("Lokaler",s),r("Periode",i),r("Vikar",a)].filter((function(e){return!e.empty})).map((function(e){return e.toString()})).join("\n");function r(e,t){return{empty:!t,toString:function(){return e+": "+t}}}}return{makeActivities:function(e,r,o){return e.filter((function(e){return function(e,t,n){return t===e||null===e&&n&&0==n.type&&n.id===t}(e.absentee,o,e.substitute)})).map((function(e){return function(e,r,o){var c=s(e.classes),u=function(e,t,n){return e.toString()+i(t,n);function i(e,t){return e&&t?e==t?" (lek. "+e+")":" (lek. "+e+" - "+t+")":""}}(e.period,e.startLesson,e.endLesson),d=s(e.rooms),h=(e.note||"").trim(),m=function(e,n,i){if(!i)return null;switch(i.type){case 0:if(i.id===n)return null;var s=e.filter((function(e){return e.id===i.id})),a=l()(s,1)[0];return a?a.initials+" "+a.fullName:null;case 1:return t[i.id]||i.id;default:return null}}(r,o,e.substitute);return{absentee:e.absentee,classes:c,description:function(t){return function(e,t,n,i,s){return t+(!i&&e?" "+e:"")+(!s&&n?" ("+n+")":"")}(c,e.description,m,this.showClasses(t),this.showSubstitution(t))},height:function(t){return t[e.id].height},id:e.id,isManualSubstitution:n(e.absentee,e.substitute),isSubstitutedAbsence:i(e.absentee,e.substitute),left:function(t){return t[e.id].left},note:h,noteOverlapsDescription:function(t,n){return function(e,t,n,i){return i&&t&&n<=2&&e.length>15}(this.description(n),!!h,n[e.id],t)},noteOverlapsSubstitution:function(t,n){return function(e,t,n){return n&&e&&t>2}(!!h,n[e.id],t)},period:e.period,periodDescription:u,rooms:d,showClasses:function(t){return n=!!c,i=t[e.id],n&&i>=3;var n,i},showNote:function(e){return function(e,t){return t&&e}(!!h,e)},showPeriod:function(t){return n=t[e.id],i=this.showSubstitution(t),n>=(i?3:2);var n,i},showRooms:function(t){return n=!!d,i=t[e.id],n&&i>=3;var n,i},showSubstitution:function(t){return n=!!m,i=t[e.id],n&&i>=3;var n,i},substitutionDescription:e.substitute&&0==e.substitute.type?"Vikar: "+m:m,tooltip:a(e.abbreviationOfSubject,c,e.description,u,d,m),top:function(t){return t[e.id].top},width:function(t){return t[e.id].width}}}(e,r,o)}))}}}({alternateActions:{A:"Arbjeder alene",F:"Fri",I:"Ingen vikar",K:"Tilbage i klassen",V:"Vikardækket i team"}})),A=function(){function e(e,t){this._api=e,this._store=t}return e.prototype={loadAbsenceReasons:function(){var e=this;return Object.keys(this._store.absenceReasons).length>0?Promise.resolve():this._api.absenceReasons().then((function(t){return e._store.setAbsenceReasons(t)}))},loadSchools:function(e,t){var n,i=this,s=!0!==(null===(n=this._store.periodOfDepartments)||void 0===n?void 0:n.contains(t)),a=this._store.schools.map((function(e){return e.code})),r=s?e:e.filter((function(e){return!a.includes(e)}));return s||0!==r.length?this._api.schools(r,t).then((function(e){return i._store.setSchools(e.schools,e.periodOfDepartments)})):Promise.resolve()},loadTimeline:function(e,t,n,i){var s,a,r=this,o=null!=t?t:e;return(null===(s=this._store.timelines[o])||void 0===s||null===(a=s[n.toJSON()])||void 0===a?void 0:a[i])?Promise.resolve():this._api.timeline(e,t,n,i).then((function(s){r._store.setPersonnel(e,s.personnel.map((function(e){return{fullName:e.fullName,id:e.id,initials:e.initials}}))),r._store.setTimeline(e,t,n,s.absences,s.activities,s.personnel.reduce((function(e,t){return e[t.id]=t.absentPeriods,e}),{}),i)}))}},{Actions:e}}(),T={absenceTypes:[{id:0,description:"Lejrskole"},{id:1,description:"Klassefravær"},{id:2,description:"Kursus"},{id:3,description:"Fraværende"},{id:4,description:"Andre opgaver"},{id:5,description:"Anden undervisning"},{id:6,description:"Fravær"}]},b=function(e){var t=e.absenceTypes;function n(e,t){var n=[];return e.forEach((function(e){t.forEach((function(t){t.id===e&&n.push(t.initials)}))})),n.sort(),n.join(", ")}function i(e,n,i){var s,a,r=6===e?null!==(s=i[n])&&void 0!==s?s:"???":null===(a=t.find((function(t){return t.id===e})))||void 0===a?void 0:a.description;if(!r)return"";var o="";return 2===e?o="Opgave: ":6===e&&19===n&&(o="Fravær: "),o+r}return{makeAbsence:function(e,t,s){return{classes:e.classes,description:e.description,endDate:e.endDate,endTime:e.endTime,initials:n(e.personnel,t),startDate:e.startDate,
1startTime:e.startTime,type:i(e.type,e.reasonId,s),typeId:e.type}}}}(T),C=function(){function e(i,s){if(i>23||i<0)throw"Hour must be between 0 and 23";if(s>59||s<0)throw"Minute must be between 0 and 59";return i=Math.floor(i),s=Math.floor(s),{hour:i,minute:s,addHours:function(t){var n=i+t;return n>23?e(23,59):n<0?e(0,0):e(n,s)},addDuration:function(t){var n=60*i+s+t.totalMinutes;return n<0?e(0,0):n>=1440?e(23,59):e(Math.floor(n/60),n%60)},compare:function(e){return this.isBefore(e)?-1:this.isSame(e)?0:1},durationTo:function(e){if(this.isAfter(e))throw"The other time point must be after or same as this time point";return e.hour===i?t(e.minute-s):t(60*(e.hour-i-1)+(60-s)+e.minute)},format:function(e){if("input"===e)return n(i)+":"+n(s);throw new Error('Unknown time point format "'+e+'"')},isAfter:function(e){return e.hour<i||e.hour===i&&e.minute<s},isBefore:function(e){return e.hour>i||e.hour===i&&e.minute>s},isSame:function(e){return e.hour===i&&e.minute===s},startOfHour:function(){return e(i,0)},toJSON:function(){return n(i)+":"+n(s)},toString:function(){return i.toString()+":"+n(s)}}}function t(e){return{totalMinutes:e,isSame:function(t){return e===t.totalMinutes},toString:function(t){var i=Math.floor(e/60),s=e%60;return"human"===t?(i>0||0==s?i+" "+(1==i?"time":"timer"):"")+(s>0?" "+(s+" "+(1==s?"minut":"minutter")):""):i+":"+n(s)}}}function n(e){return e<10?"0"+e.toString():e.toString()}return{parsePoint:function(t){var n=t.match(/([0-9]?[0-9]):([0-9][0-9])/);if(n&&n[0]===t){var i=l()(n,3),s=i[1],a=i[2];return e(Number.parseInt(s,10),Number.parseInt(a,10))}return null},point:e,duration:t,parseDuration:function(e){var n=e.match(/([0-9]+):([0-9][0-9])/);if(n&&n[0]===e){var i=l()(n,3),s=i[1],a=i[2],r=Number.parseInt(a,10);if(r>59||r<0)throw"Minute must be between 0 and 59";var o=Number.parseInt(s,10);if(o<0)throw"Hours must be greater than or equal to 0";return t(60*o+r)}return null}}}(),k={browserSession:function(e,t,n,i){var s="kmd-"+e+"-widget-"+t+"-settings";return{read:function(){try{var e=window.sessionStorage.getItem(s);if(null===e)return null;var t=JSON.parse(e),a=t.value,r=t.writtenAt;return t.sessionUUID!==n||0===i||i&&Date.now()-new Date(r)>i?null:a||{}}catch(e){return null}},write:function(e){try{window.sessionStorage.setItem(s,JSON.stringify({value:e,writtenAt:(new Date).toJSON(),sessionUUID:n}))}catch(e){return}}}},database:function(e,t,n,i,s){return{read:function(){var a={widgetName:n};return i&&s&&(a.institutionCode=s),t.get("https://personale.api.kmd.dk/aula/api/v2/settings",{headers:{Authorization:e},params:a}).then((function(e){return e.data}),(function(){return null}))},write:function(a){var r={widgetName:n};return i&&s&&(r.institutionCode=s),t.post("https://personale.api.kmd.dk/aula/api/v2/settings",a,{headers:{Authorization:e},params:r})}}}},y={selectingItem:function(e){var t,n,i=e.items,s=e.initialItem,a=e.itemCompare;if(!i.length)throw"Items array cannot be empty";return{min:0,max:i.length-1,value:(t=a||function(e,t){return e===t},n=i.findIndex((function(e){return t(e,s)})),Math.max(0,n)),item:function(){return i[Math.max(0,Math.min(this.value,i.length-1))]}}}},I=function(){var e;function t(){}t.prototype.toString=function(){return"Canceled"};var n={errorCaptured:function(e){return!l(e)}};var i=/["&'<>]/g;var a=/[\$\(-\+\.\?\[-\^\{-\}]/g,o=new RegExp(a.source,"u");function l(e){return e instanceof t}function c(e){return e&&"function"==typeof e}function u(e,t){return e===t}return e={areArraysEqual:function(e,t,n){var i;if(n=null!==(i=n)&&void 0!==i?i:u,e.length!==t.length)return!1;for(var s=0;s<e.length;++s)if(!n(e[s],t[s]))return!1;return!0},areSetsEqual:function(e,t,n){var i,a,o;if(n=null!==(i=n)&&void 0!==i?i:u,(null!==(a=e.length)&&void 0!==a?a:e.size)!==(null!==(o=t.length)&&void 0!==o?o:t.size))return!1;var l,c=r()(t),h=d(e);try{var m=function(){var e=l.value,t=c.findIndex((function(t){return n(t,e)}));if(-1===t)return{v:!1};c.splice(t,1)};for(h.s();!(l=h.n()).done;){var p=m();if("object"===s()(p))return p.v}}catch(e){h.e(e)}finally{h.f()}return 0===c.length},canceled:function(){return new t},escapeHtml:function(e){var t;return(e=null===(t=e)||void 0===t?void 0:t.toString())&&e.replace(i,(function(e){switch(e){case"&":return"&amp;";case'"':return"&quot;";case"'":return"&#39;";case"<":return"&lt;";case">":return"&gt;"}}))},escapeRegExp:function(e){var t;return(e=null===(t=e)||void 0===t?void 0:t.toString())&&o.test(e)?e.replace(a,"\\$&"):e},IgnoreCanceledMixin:n,isCanceled:l,isPromise:function(e){return e&&c(e.then)},isFunction:c,isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},strictEqual:u,toPromise:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return c(e)?new Promise((function(n){return n(e.apply(t,i))})):Promise.resolve(e)}},e}
1(),S=(v=(m=I).canceled,f=m.isString,g=m.toPromise,p={combine:function(e,t){return function(n){var i=e(n);return t(i)}},debounce:function(e,t){var n,i;return function(){var s=arguments,a=this,o=new Promise((function(o,l){var c;null===(c=n)||void 0===c||c(v()),n=l,clearTimeout(i),i=setTimeout((function(){g.apply(void 0,[e,a].concat(r()(s))).then((function(e){n=void 0,i=void 0,o(e)}),(function(e){n=void 0,i=void 0,l(e)}))}),t)}));return o}},last:function(e){var t,n=(t=0,{is:function(e){return e===t},increment:function(){return++t}});return function(){var t=arguments,i=this;return new Promise((function(s,a){var o=n.increment();g.apply(void 0,[e,i].concat(r()(t))).then((function(e){n.is(o)?s(e):a(v())}),(function(e){n.is(o)?a(e):a(v())}))}))}},once:function(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}},withFocusRestore:function(e,t){return function(){var i=document.activeElement;return g(e.apply(this,arguments)).then((function(e){return setTimeout((function(){return n(t,i)}),0),e}),(function(e){return setTimeout((function(){return n(t,i)}),0),Promise.reject(e)}))};function n(e,t){var n,i=d(e=Array.isArray(e)?e:[e]);try{for(i.s();!(n=i.n()).done;){var s=n.value,a="activeElement"===s?t:f(s)?document.querySelector(s):s;if(a&&(a.focus(),a===document.activeElement))break}}catch(e){i.e(e)}finally{i.f()}}},retry:function(e,t,n){return function(){var i=arguments,s=this,a=0,r=[],o=new Promise((function(o,l){(function i(){var s=arguments,c=this;g.apply(void 0,[e,this].concat(Array.prototype.slice.call(arguments))).then(o,(function(e){r.push(e),a<t?(++a,setTimeout((function(){return i.apply(c,s)}),n||0)):l(r)}))}).apply(s,i)}));return o}},throttle:function(e,t){var n=!1,i={};return function(){if(i.arguments=arguments,i.this=this,n)return Promise.resolve(null);n=!0;var s=new Promise((function(s,a){setTimeout((function(){var t=i.this,o=i.arguments;i.this=void 0,i.arguments=void 0,g.apply(void 0,[e,t].concat(r()(o))).then((function(e){s(e),n=!1}),(function(e){a(e),n=!1}))}),t)}));return s}}},p),D=function(e,t,n){var i,s=e,a=t.isFunction,r=n;return i=function(e,t,n,i,o,c){var u=r.browserSession(c,"session",n),d=r.database(t,e,c,i,o),h=r.browserSession(c,"database",n,288e5);return new Promise((function(e){var t=u.read()||{},n=h.read();null===n?d.read().then((function(e){return e||{}}),(function(){return{}})).then((function(n){h.write(n),e({browserSessionSettings:t,databaseSettings:n})})):e({browserSessionSettings:t,databaseSettings:n})})).then((function(e){var t=e.browserSessionSettings,n=e.databaseSettings,i=s.throttle((function(){return u.write(t)}),1e3),r=s.combine((function(e){return s.retry(e,5,5e3)}),(function(e){return s.throttle(e,1e4)}))((function(){return d.write(n)})),o=s.throttle((function(){return h.write(n)}),1e3);function c(e,t,n,i){var s=i[e];return void 0===s||!1===(n||function(){return!0})(s)?a(t)?t():t:s}function m(e,t,n){if(2===e.length){var i=l()(e,2),s=i[0],a=i[1];t[s]=a}else{if(1!==e.length)return;l()(e,1)[0].forEach((function(e){var n=e.key,i=e.value;return t[n]=i}))}n.forEach((function(e){return e()}))}return{getLocal:function(e,n,i){return c(e,n,i,t)},getPersistent:function(e,t,i){return c(e,t,i,n)},setLocal:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];m(n,t,[i])},setPersistent:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];m(t,n,[o,r])}}}))},i}(S,I,k),w=function(){function e(i,s){if(s.isBefore(i))throw"End must be after start";return i.isSame(s)?t():{start:i,end:s,empty:!1,contains:function(e){return s.isAfter(e)&&!i.isAfter(e)},duration:function(){return i.durationTo(s)},intersect:function(n){if(!this.intersectsWith(n))return t();var a=i.compare(n.start),r=s.compare(n.end);return e(a>0?i:n.start,r<0?s:n.end)},intersectsWith:function(e){return!e.empty&&(i.isBefore(e.end)&&s.isAfter(e.start))},isSame:function(e){return!e.empty&&(i.isSame(e.start)&&s.isSame(e.end))},iterate:u.a.mark((function e(t){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.start;case 1:return e.next=3,n;case 3:n=t(n);case 4:if(n.isBefore(this.end)){e.next=1;break}case 5:case"end":return e.stop()}}),e,this)})),map:function(n,a){var r=n(i),o=(null!=a?a:n)(s);return o.isBefore(r)?t():e(r,o)},span:function(t){return t.empty?this:e(t.start.isBefore(i)?t.start:i,t.end.isBefore(s)?s:t.end)},split:function(t){var i=this,s=[];do{var a=t(i.start);if(!a.isBefore(i.end)||!a.isAfter(i.start))return s.push(i),n(s);s.push(e(i.start,a)),i=e(a,i.end)}while(!i.empty);return n(s)},subtract:function(t){if(t.empty)return n([this]);if(i.compare(t.end)>=0)return n([this]);if(s.compare(t.start)<=0)return n([this]);var a=i.compare(t.start),r=s.compare(t.end);return a>0?r<=0?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n([e(t.end,s)]):0==a?r>0?n([e(t.end,s)]):{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n(r>0?[e(i,t.start),e(t.end,s)]:[e(i,t.start)])},subtractSum:function(e){var t=this;return e.empty?n([this]):e.periods.map((function(e){return t.subtract(e)})).reduce((function(e,t){return e.intersect(t)}))},toString:function(){return i.toString()+" - "+s.toString()}}}function t(){return{empty:!0,contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},isSame:function(e){return e.empty},iterate:u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})),map:function(){return this},span:function(e){return e},split:function(){return this},subtract:function(){return this},subtractSum:function(){return{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}},toString:function(){return""}}}function n(t){return 0===(t=t.filter((function(e){return!e.empty}))).length?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:((t=function(e){return e.reduce((function(e,t){return function(e,t){var n=(c=e,u=function(e){return e.intersectsWith(t)},c.reduce((function(e,t){var n=l()(e,2),i=n[0],s=n[1];return(u(t)?i:s).push(t),[i,s]}),[[],[]])),i=l()(n,2),s=i[0],a=i[1],o=s.reduce((function(e,t){return e.span(t)}),t);var c,u;return[o].concat(r()(a))}(e,t)}),[])}(t)).sort((function(e,t){return e.start.compare(t.start)})),{empty:!1,periods:t,contains:function(e){return t.some((function(t){return t.contains(e)}))},intersect:function(e){return n(t.map((function(t){return e.periods.map((function(e){return t.intersect(e)}))})).reduce((function(e,t){return e.concat(t)}),[]))},intersectsWith:function(e){return t.some((function(t){return e.periods.some((function(e){return t.intersectsWith(e)}))}))},joinAdjacent:function(i){return 0===t.length?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n(t.reduce((function(t,n){if(0===t.result.length)return{result:[n],lastJoinable:i(n)};var s=t.result[t.result.length-1],a=i(n);if(s.end.isSame(n.start)&&t.lastJoinable&&a){var r=e(s.start,n.end);return t.result[t.result.length-1]=r,{result:t.result,lastJoinable:!0}}return t.result.push(n),{result:t.result,lastJoinable:a}}),{result:[]}).result)},split:function(e){return n(t.map((function(t){return t.split(e).periods})).reduce((function(e,t){return e.concat(t)}),[]))},toString:function(){return t.map((function(e){return e.toString()})).join(", ")},union:function(e){return e.empty?this:n([].concat(r()(t),r()(e.periods)))}})}return{empty:t,nonEmpty:e,sum:n}}(),N=function(e){var t,n=e;return t={defaultBreakDurations:function(e){return{durations:[e.duration(180),e.duration(120),e.duration(60),e.duration(30)],initial:e.duration(60)}},makeTextLines:function(e){var t=e.breakDuration,n=e.minutesPerLineAtOneHourBreak,i=60/t.totalMinutes/n;return function(e){var t=e.duration().totalMinutes*i;return Math.round(t)}},makeHorizontal:function(e){var t=r()(e);t.sort((function(e,t){return function(e,t){var n=e.start.compare(t.start);return 0!=n?n:-e.end.compare(t.end)}(e.period,t.period)}));var i=function(e){var t=e.reduce((function(e,t){return e.some((function(e){return e.tryAdd(t)}))||e.push(function(e){var t=n.sum([e.period]),i=[e];return{dump:function(){return{coverage:t.toString(),items:i.map((function(e){return{period:e.period.toString(),id:e.id}}))}},layout:function(e,t,n){return i.reduce((function(e,i){return e[i.id]=n(t,1),e}),e)}
1,tryAdd:function(e){var s=n.sum([e.period]);return!t.intersectsWith(s)&&(t=t.union(s),i.push(e),!0)}}}(t)),e}),[]);return{dump:function(){return t.map((function(e){return e.dump()}))},layout:function(){var e=t.length;return{cssPercents:function(t,i){return n(function(t,n){var i=t/n*100,s=(n-t)/n/e*100;return function(e,t){return{left:i+e*s+"%",width:t*s+"%"}}}(t,i))},cssPixels:function(t,i){return n(function(t,n){var i=n/e;return function(e,n){return{left:t+e*i+"px",width:n*i+"px"}}}(t,i))}};function n(e){return t.reduce((function(t,n,i){return n.layout(t,i,e)}),{})}}}}(t);return i.layout()},makeVertical:function(e){if(0===(e=e.filter((function(e){return!e.empty})).map((function(e,t){return{period:e,index:t}}))).length)throw"The periods contain no non-empty intervals";function t(t){var n=e.find((function(e){return e.period.contains(t)}))||e[e.length-1],i=n.period,s=n.index;if(!i.contains(t)&&!i.end.isSame(t))throw"The point + "+t.toString()+" is outside of all periods";return(s+i.start.durationTo(t).totalMinutes/i.start.durationTo(i.end).totalMinutes)/e.length}function n(e){if(e.empty)throw"Empty intervals are not supported";var n=t(e.start);return{start:n,duration:t(e.end)-n}}return e.sort((function(e,t){var n=e.period,i=t.period;return n.start.compare(i.start)})),{cssHeight:function(e,t){return n(e).duration*t+"px"},toCssPercents:function(e){function t(e){return(100*e).toFixed(5)+"%"}var i=n(e),s=i.start,a=i.duration;return{top:t(s),height:t(a)}}}},makePeriods:function(e,t,n){var i=n.breakDuration;if(!e.length)return[];var s=function(e){var n=[],s=t.nonEmpty(e.start.startOfHour(),e.end),a=t.nonEmpty(s.start,s.start.addDuration(i));for(;a.intersectsWith(s);)n.push(a),a=a.map((function(e){return e.addDuration(i)}));return t.sum(n)}(e.reduce((function(e,t){return e.span(t)}))),a=s.periods.map((function(e){return{description:r(e),isBreak:!0,number:"",period:e}}));return a.sort((function(e,t){var n=e.period,i=t.period;return n.start.compare(i.start)})),a;function r(e){return 0===e.start.minute&&0===e.end.minute&&e.end.hour-e.start.hour==1?e.start.toString():e.toString()}}},t}(w),R=function(e){var t=e.Future;return{AulaTokenMixin:{data:function(){return{aulaToken:void 0,aulaTokenFuture:new t}},computed:{token:function(){return this.aulaTokenFuture.promise}},watch:{aulaToken:function(e){null!=e&&(this.aulaTokenFuture.resolve(e),this.aulaTokenFuture=new t,this.aulaTokenFuture.resolve(e))}},mounted:function(){this.aulaToken=this.getAulaToken()}}}}(function(){function e(){var e=this;this.promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return e.prototype.reject=function(e){this._reject(e)},e.prototype.resolve=function(e){this._resolve(e)},{Future:e}}()),O=function(){function e(e,n,i,s){return t(s()().year(e).month(n-1).date(i).hour(0).minute(0).second(0).millisecond(0))}function t(e){if(!e.isValid()){var n=function(e){switch(e.invalidAt()){case 0:return"Year value ".concat(e.year()," is invalid");case 1:return"Month value ".concat(e.month()," is invalid");case 2:return"Day value ".concat(e.date()," is invalid");default:return null}}(e);throw new Error("Invalid date".concat(n?". "+n:"","."))}return{_value:e,get year(){return this._value.year()},get month(){return this._value.month()+1},get day(){return this._value.date()},get dayOfWeek(){var e=this._value.day();return 0==e?6:e-1},addDays:function(e){return t(this._value.clone().add(e,"days"))},compare:function(e){return this._value.diff(e._value,"days")},format:function(e){switch(e){case"dayofweek":return this._value.format("dddd");case"input":return this._value.format("YYYY-MM-DD");default:throw new Error('Unknown date point format "'.concat(e,'"'))}},isAfter:function(e){return this._value.isAfter(e._value)},isBefore:function(e){return this._value.isBefore(e._value)},isSame:function(e){return this._value.isSame(e._value)},toJSON:function(){return this._value.format("YYYY-MM-DD")},toString:function(){return this._value.format("L")}}}return{parsePoint:function(t,n){var i=t.match(/([0-9]{1,5})\x2D([0-9]{1,2})\x2D([0-9]{1,2})/);if(i&&i[0]===t){var s=l()(i,4),a=s[1],r=s[2],o=s[3];return e(Number.parseInt(a,10),Number.parseInt(r,10),Number.parseInt(o,10),n)}return null},point:e,wrapMoment:function(e){return t(e.clone().hour(0).minute(0).second(0).millisecond(0))}}}(),L=function(e,t,n,i){var s=e,a=t,r=n,o=i;function l(e,t,n){this._moment=n,this._axios=function(){return t().then((function(t){return e().create({headers:{Authorization:t}})}))}}return l.prototype={absenceReasons:function(){return this._axios().then((function(e){return e.get("https://personale.api.kmd.dk/aula/api/v1/absenceOverview/absenceReasons",{headers:{Accept:"application/json"}})})).then((function(e){return e.data}),s.responseError)},schools:function(e,t){var n=this;return this._axios().then((function(n){return n.get("https://personale.api.kmd.dk/aula/api/v1/absenceOverview/
1departments",{headers:{Accept:"application/json"},params:{schoolCodes:e.map((function(e){return e.trim()})).join(","),referenceDate:t.toJSON()}})})).then((function(e){return{periodOfDepartments:r.nonEmpty(a.parsePoint(e.data.periodOfDepartments.start,n._moment),a.parsePoint(e.data.periodOfDepartments.end,n._moment).addDays(1)),schools:e.data.schools}}),s.responseError)},timeline:function(e,t,n,i){return this._axios().then((function(s){return s.get("https://personale.api.kmd.dk/aula/api/v1/absenceOverview/timeline",{headers:{Accept:"application/json"},params:{date:n.toJSON(),departmentId:t,includeSfo:i,schoolCode:e}})})).then((function(e){return{absences:e.data.absences,activities:e.data.activities.map((function(e,t){return{abbreviationOfSubject:e.abbreviationOfSubject,absentee:e.absentee,classes:e.classes,description:e.description,endLesson:e.endLesson,id:t,period:r.nonEmpty(o.parsePoint(e.start),o.parsePoint(e.end)),note:e.note,rooms:e.rooms,startLesson:e.startLesson,status:e.status,substitute:e.substitute}})),personnel:e.data.personnel}}),s.responseError)}},{Api:l}}({arrayToQueryString:function(e,t){return t.map((function(t){var n,i;return"".concat(e,"=").concat(null!==(n=null==t||null===(i=t.toJSON)||void 0===i?void 0:i.call(t))&&void 0!==n?n:t)})).join("&")},responseError:function(e){var t,n,i,s,a,r,o;return Promise.reject(null!==(t=null!==(n=null==e||null===(i=e.response)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.Message)&&void 0!==n?n:null==e||null===(a=e.response)||void 0===a||null===(r=a.data)||void 0===r||null===(o=r.Error)||void 0===o?void 0:o.Message)&&void 0!==t?t:e.message)}},O,w,C),x=R.AulaTokenMixin,P=O,M=w,F=y,U=I.escapeHtml,B=D,V=C,W=N,G=b.makeAbsence,H=T.absenceTypes,j=A.Actions,Y=L.Api,$=E.makePersonnel,z=_.Store,q=H.length;var K={name:"SchoolsAbsenceOverview",mixins:[x],props:{axios:{type:Function,required:!0},currentWeekNumber:{type:String,default:null},getAulaToken:{type:Function,required:!0},institutionCode:{type:String,default:null},institutionFilter:{type:Array,default:null},isMobileApp:{type:Boolean,required:!0},moment:{type:Function,required:!0},placement:{type:String,required:!0},sessionUUID:{type:String,required:!0}},data:function(){var e,t,n,i=this,s=new Y((function(){return i.axios}),(function(){return i.token}),(function(){return i.moment})),a=new z(this.$set.bind(this));return{actions:new j(s,a),absenceOverviewWidth:0,activityWidthInput:F.selectingItem({items:function(){for(var e=[],t=50;t<=200;t+=10)e.push(t);return e}(),initialItem:180}),busy:!1,breakDurationInput:(e=W.defaultBreakDurations(V),t=e.durations,n=e.initial,F.selectingItem({items:t,initialItem:n,itemCompare:function(e,t){return e.isSame(t)}})),error:null,overViewFiltersSelected:["vikarnoter",""],overViewFilters:[{text:"Vikarnoter",value:"vikarnoter"},{text:"SFO-opgaver",value:"sfo"}],listFiltersSelectedLeftColumn:["lejrskole","klassefravaer","kursus"],listFiltersLeftColumn:[{text:"Lejrskole",value:"lejrskole"},{text:"Klassefravær",value:"klassefravaer"},{text:"Kursus",value:"kursus"}],listFiltersSelectedRightColumn:["fravaerende","andreopgaver","andenundervisning"],listFiltersRightColumn:[{text:"Fraværende",value:"fravaerende"},{text:"Andre opgaver",value:"andreopgaver"},{text:"Anden undervisning",value:"andenundervisning"}],currentSort:"startDate",currentSortDir:"asc",filterActivityNotes:!0,filterSfoActivities:!1,inputSelectedDate:null,isLoading:!1,note:null,tableWrapperStyleObject:{maxWidth:""},selectedInstitution:null,selectedSchool:null,selectedPerson:null,selectedDepartment:null,settings:null,showFravaerende:!0,showKlassefravaer:!0,showKursus:!0,showLejrSkole:!0,showModal:!1,showOtherActivities:!0,showOtherLessons:!0,store:a,week:null,year:null,mobileThreshold:991,isMobileView:!1,listColumns:[{label:"Start dato",value:"startDate"},{label:"Slut dato",value:"endDate"},{label:"Type",value:"type"},{label:"Beskrivelse",value:"description"},{label:"Initialer",value:"initials"},{label:"Klasser",value:"classes"},{label:"Fra kl.",value:"startTime"},{label:"Til kl.",value:"endTime"}]}},computed:{absences:function(){var e=this,t=this.timeline.absences.map((function(t){var n;return G(t,null!==(n=e.store.personnel[e.selectedSchool])&&void 0!==n?n:[],e.store.absenceReasons)}));return t},activityCellStyle:function(){var e=this;return this.periods.map((function(t,n){var i="height: "+e.periodVerticalLayout[n].height+";";return e.isNarrow?i:"min-width: "+e.activityWidthInput.item()+"px;"+" "+("max-width: "+e.activityWidthInput.item()+"px;")+" "+i}))},activityHeaderCellStyle:function(){return this.isNarrow?"":"min-width: "+this.activityWidthInput.item()+"px;"+" "+("max-width: "+this.activityWidthInput.item()+"px;")},activityTextLines:function(){if(!this.personnel.length)return{};var e=W.makeTextLines({breakDuration:this.breakDurationInput.item(),minutesPerLineAtOneHourBreak:15});return this.personnel.reduce((function(t,n){return n.activities.reduce((function(t,n){return t[n.id]=e(n.peri
1od),t}),t)}),{})},activityHorizontalLayout:function(){if(!this.shownPersonnel.length)return{};var e=this.isNarrow||this.isMobileView?230:this.activityWidthInput.item();return this.shownPersonnel.reduce((function(t,n,i){var s=60+e*i,a=W.makeHorizontal(n.activities).cssPixels(s,e);return t[i]=a,t}),{})},activityLayoutSpan:function(){var e=this.shownPersonnel.reduce((function(e,t){return t.activities.reduce((function(e,t){return e.span(t.period)}),e)}),M.empty());if(e.empty)return e;var t=e.start.startOfHour(),n=function(e,t){var n=V.duration(60),i=e.startOfHour();for(;i.isBefore(t);)i=i.addDuration(n);return i}(e.start,e.end);return M.nonEmpty(t,n)},activityLayoutHeight:function(){var e=this.activityLayoutSpan;if(e.empty)return 0;var t=this.breakDurationInput.item();return e.duration().totalMinutes/t.totalMinutes*110},activityVerticalLayout:function(){if(!this.shownPersonnel.length||this.activityLayoutSpan.empty)return{};var e=W.makeVertical([this.activityLayoutSpan]);return this.shownPersonnel.reduce((function(t,n){return n.activities.reduce((function(t,n){return t[n.id]=e.toCssPercents(n.period),t}),t)}),{})},isNarrow:function(){return"narrow"===this.placement.toLowerCase()},periods:function(){return!this.personnel.length||this.activityLayoutSpan.empty?[]:W.makePeriods([this.activityLayoutSpan],M,{breakDuration:V.duration(60)})},periodVerticalLayout:function(){var e=this.periods,t=this.activityLayoutSpan,n=this.activityLayoutHeight;if(!e.length||t.empty||0==n)return{};var i=W.makeVertical([t]);return e.reduce((function(e,t,s){return e[s]={height:i.cssHeight(t.period,n)},e}),{})},personAbsentPeriods:function(){var e=this.timeline.personAbsentPeriods;return e},personnel:function(){var e,t=null!==(e=this.store.personnel[this.selectedSchool])&&void 0!==e?e:[],n=this.timeline;return $(n.absences,n.activities,t,n.personAbsentPeriods,this.store.absenceReasons)},schoolCodes:function(){var e;return"NoticeBoard"===this.placement&&this.institutionCode?[this.institutionCode]:null!==(e=this.institutionFilter)&&void 0!==e?e:[]},shownPersonnel:function(){return this.isNarrow||this.isMobileView?this.selectedPerson?[this.selectedPerson]:[]:this.personnel},schoolsAndDepartmentsSelectList:function(){var e="&nbsp;&nbsp;";return this.store.schools.map((function(i){return[{value:n(null,i.code),html:i.name}].concat(r()(t(i.topDepartments,i.code,e)))})).reduce((function(e,t){return e.concat(t)}),[]);function t(i,s,a){return i.map((function(i){return[{value:n(i.id,s),html:a+U(i.name)}].concat(r()(t(i.children,s,a+e)))})).reduce((function(e,t){return e.concat(t)}),[])}function n(e,t){return(e||"")+";"+t}},selectedDate:function(){var e=this;return P.parsePoint(this.inputSelectedDate,(function(){return e.moment}))},selectedSchoolCodeOrDepartmentId:function(){return this.selectedDepartment||this.selectedSchool||null},filteredAbsences:function(){var e=[];return this.showLejrSkole&&e.push(0),this.showKlassefravaer&&e.push(1),this.showKursus&&e.push(2),this.showFravaerende&&e.push(3,6),this.showOtherActivities&&e.push(4),this.showOtherLessons&&e.push(5),e.length?e.length===q?this.sortedAbsences:this.sortedAbsences.filter((function(t){return e.includes(t.typeId)})):[]},sortedAbsences:function(){var e=this,t=this.absences.slice(0),n="desc"===this.currentSortDir?-1:1;return t.sort((function(t,i){return t[e.currentSort]<i[e.currentSort]?-1*n:t[e.currentSort]>i[e.currentSort]?1*n:0}))},timeline:function(){var e,t,n,i=null===(e=this.store.timelines[this.selectedSchoolCodeOrDepartmentId])||void 0===e||null===(t=e[null===(n=this.selectedDate)||void 0===n?void 0:n.toJSON()])||void 0===t?void 0:t[this.filterSfoActivities];return null!=i?i:{absences:[],activities:[],personAbsentPeriods:{}}}},watch:{currentWeekNumber:function(e,t){e&&e.toLowerCase()!==t.toLowerCase()&&(this.isLoading=!0,this.week=this.extractWeekNumber(e),this.inputSelectedDate=this.extractSelectedDate(),this.loadTimeline())},institutionCode:function(){this.isLoading=!0,this.loadSettings()},institutionFilter:function(){this.isLoading=!0,this.loadSchoolsAndDepartments()}},created:function(){this.isLoading=!0,this.moment.locale("da"),this.week=this.extractWeekNumber(this.currentWeekNumber),this.inputSelectedDate=this.extractSelectedDate(
1)},mounted:function(){window.addEventListener("resize",this.resizeEventHandler),this.resizeEventHandler(),this.isLoading=!0,this.loadSettings()},beforeDestroy:function(){window.removeEventListener("resize",this.resizeEventHandler)},methods:{handleInstitutionChanged:function(e){var t=this.selectedSchool,n=this.selectedDepartment;this.selectedInstitution=e,this.settings.setPersistent("selectedInstitution",e);var i=e.split(";"),s=l()(i,2);this.selectedDepartment=s[0],this.selectedSchool=s[1],this.selectedDepartment=this.selectedDepartment||null,t===this.selectedSchool&&n===this.selectedDepartment||(this.isLoading=!0,this.loadTimeline())},handleOverviewFilter:function(e){this.settings.setPersistent("showActivityNotes",e.includes("vikarnoter")),this.settings.setPersistent("showSfoActivities",e.includes("sfo")),e.includes("vikarnoter")&&!this.filterActivityNotes?this.filterActivityNotes=!0:!e.includes("vikarnoter")&&this.filterActivityNotes&&(this.filterActivityNotes=!1),e.includes("sfo")&&!this.filterSfoActivities?(this.busy=!0,this.filterSfoActivities=!0,this.loadTimeline()):!e.includes("sfo")&&this.filterSfoActivities&&(this.busy=!0,this.filterSfoActivities=!1,this.loadTimeline())},handleListFilterLeftColumn:function(e){e.includes("lejrskole")&&!this.showLejrSkole?this.showLejrSkole=!0:!e.includes("lejrskole")&&this.showLejrSkole&&(this.showLejrSkole=!1),e.includes("klassefravaer")&&!this.showKlassefravaer?this.showKlassefravaer=!0:!e.includes("klassefravaer")&&this.showKlassefravaer&&(this.showKlassefravaer=!1),e.includes("kursus")&&!this.showKursus?this.showKursus=!0:!e.includes("kursus")&&this.showKursus&&(this.showKursus=!1),this.updateListFilterSettings()},handleListFilterRightColumn:function(e){e.includes("fravaerende")&&!this.showFravaerende?this.showFravaerende=!0:!e.includes("fravaerende")&&this.showFravaerende&&(this.show
1Fravaerende=!1),e.includes("andreopgaver")&&!this.showOtherActivities?this.showOtherActivities=!0:!e.includes("andreopgaver")&&this.showOtherActivities&&(this.showOtherActivities=!1),e.includes("andenundervisning")&&!this.showOtherLessons?this.showOtherLessons=!0:!e.includes("andenundervisning")&&this.showOtherLessons&&(this.showOtherLessons=!1),this.updateListFilterSettings()},updateListFilterSettings:function(){var e=[];this.showLejrSkole&&e.push(0),this.showKlassefravaer&&e.push(1),this.showKursus&&e.push(2),this.showFravaerende&&e.push(3),this.showOtherActivities&&e.push(4),this.showOtherLessons&&e.push(5),this.settings.setPersistent("shownAbsenceTypes",e)},checkForNotes:function(e){return!(!this.filterActivityNotes||!e.note)&&(this.note=e.note,!0)},handleDateChange:function(){var e=this,t=P.parsePoint(this.inputSelectedDate,(function(){return e.moment}));t&&(this.busy=!0,this.store.periodOfDepartments&&this.store.periodOfDepartments.contains(t)?this.loadTimeline():this.loadSchoolsAndDepartments())},extractWeekNumber:function(e){if(!/^([0-9]){4}\x2DW([0-9]){1,2}$/.test(e))return this.moment().week();var t=e.split("-W"),n=l()(t,2),i=n[0],s=n[1],a=parseInt(s,10);return this.year=parseInt(i,10),a},extractSelectedDate:function(){var e=this.moment().year(this.year).week(this.week),t=this.moment();return(t.isSame(e,"week")?t:e.weekday(0)).format("YYYY-MM-DD")},handleErrorResponse:function(e){this.isLoading=!1,this.busy=!1,this.error=e.response?e.response.data.Message:e.message||"Ukendt fejl"},loadAbsenceReasons:function(){var e=this;this.actions.loadAbsenceReasons().then((function(){e.loadSchoolsAndDepartments()})).catch((function(t){e.handleErrorResponse(t)}))},getWeekFromLocale:function(){return this.moment().week()},loadSchoolsAndDepartments:function(){var e=this;if(!this.schoolCodes.length||""===this.schoolCodes[0])return this.selectedInstitution=null,this.selectedSchool=null,void(this.selectedDepartment=null);var t=this.selectedDate;t&&this.actions.loadSchools(this.schoolCodes,t).then((function(){var t=l()(e.store.schools,1)[0];e.selectedInstitution=e.settings.getPersistent("selectedInstitution",";"+t.code,(function(t){return e.schoolsAndDepartmentsSelectList.some((function(e){return e.value===t}))}));var n=e.selectedInstitution.split(";"),i=l()(n,2);e.selectedDepartment=i[0],e.selectedSchool=i[1],e.selectedDepartment=e.selectedDepartment||null,e.loadTimeline()})).catch((function(t){e.selectedInstitution=null,e.selectedSchool=null,e.selectedDepartment=null,e.handleErrorResponse(t)}))},loadSettings:function(){var e=this;this.token.then((function(t){return B(e.axios,t,e.sessionUUID,"NoticeBoard"===e.placement,e.institutionCode,"schools-absence-overview").then((function(t){e.settings=t,e.filterActivityNotes=t.getPersistent("showActivityNotes",!0),e.filterSfoActivities=t.getPersistent("showSfoActivities",!0),e.breakDurationInput.value=t.getPersistent("breakDurationInputValue",e.breakDurationInput.value),e.$watch("breakDurationInput.value",(function(e){t.setPersistent("breakDurationInputValue",e)})),e.activityWidthInput.value=t.getPersistent("activityWidthInputValue",e.activityWidthInput.value),e.$watch("activityWidthInput.value",(function(e){t.setPersistent("activityWidthInputValue",e)}));var n=t.getPersistent("shownAbsenceTypes",[0,1,2,3,4,5]);e.showLejrSkole=n.includes(0),e.showKlassefravaer=n.includes(1),e.showKursus=n.includes(2),e.showFravaerende=n.includes(3),e.showOtherActivities=n.includes(4),e.showOtherLessons=n.includes(5);var i=[];e.filterActivityNotes&&i.push("vikarnoter"),e.filterSfoActivities&&i.push("sfo"),e.overViewFiltersSelected=i;var s=[];e.showLejrSkole&&s.push("lejrskole"),e.showKlassefravaer&&s.push("klassefravaer"),e.showKursus&&s.push("kursus"),e.listFiltersSelectedLeftColumn=s;var a=[];e.showFravaerende&&a.push("fravaerende"),e.showOtherActivities&&a.push("andreopgaver"),e.showOtherLessons&&a.push("andenundervisning"),e.listFiltersSelectedRightColumn=a,e.loadAbsenceReasons()}))}))},loadTimeline:function(){var e=this;if(!this.selectedSchool)return this.selectedPerson=null,this.error=null,this.isLoading=!1,void(this.busy=!1);var t=P.parsePoint(this.inputSelectedDate,(function(){return e.moment}));t&&this.actions.loadTimeline(this.selectedSchool,this.selectedDepartment,t,this.filterSfoActivities).then((function(){var t=e.personnel;e.selectedPerson=e.personnel.length?e.selectedPerson&&t.some((function(t){return t.id==e.selectedPerson.id}))?e.selectedPerson:t[0]:null,e.error=null,e.isLoading=!1,e.busy=!1}
1)).catch((function(t){e.handleErrorResponse(t)}))},refresh:function(){this.store.clear(),this.loadAbsenceReasons()},resizeEventHandler:function(){this.absenceOverviewWidth=this.$refs.absenceOverviewRef.clientWidth,this.tableWrapperStyleObject.maxWidth=this.isNarrow?"":this.absenceOverviewWidth-50+"px",this.isMobileView=window.innerWidth<=this.mobileThreshold||!1},sortBy:function(e){e!==this.currentSort?this.currentSortDir:this.currentSortDir="asc"===this.currentSortDir?"desc":"asc",this.currentSort=e}}},Q=n(3),J=Object(Q.a)(K,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"absenceOverviewRef",staticClass:"absence-overview"},[e._m(0),e._v(" "),e.isLoading?n("div",{staticClass:"absence-overview-loading"},[n("i",{staticClass:"fa fa-spinner fa-spin"}),e._v(" "),n("span",[e._v("Danner et overblik over skolens fravær...")])]):e.error?n("div",{staticClass:"message-container"},[n("span",{staticClass:"error-message"},[e._v("Noget gik galt med at hente dit overblik.")]),e._v(" "),n("span",{staticClass:"error-message"},[e._v(e._s(e.error))])]):n("b-container",{class:{"px-0":e.isNarrow},attrs:{fluid:""}},[n("b-row",{staticClass:"absence-controls position-relative align-items-center mb-2"},[n("b-col",{attrs:{cols:"12"}},[n("b-row",{staticClass:"align-items-center justify-content-between pl-3"},[n("b-col",{class:["my-1 pl-0",{"col-lg-4":!e.isNarrow}],attrs:{cols:"12"}},[n("div",{staticClass:"font-weight-bold"},[e._v("Dato")]),e._v(" "),n("b-form-input",{ref:"calendarInput",staticClass:"my-0 date-picker-input",attrs:{id:"calendarInput",type:"date"},on:{change:e.handleDateChange},model:{value:e.inputSelectedDate,callback:function(t){e.inputSelectedDate=t},expression:"inputSelectedDate"}})],1),e._v(" "),e.schoolsAndDepartmentsSelectList.length>1?n("b-col",{class:["my-1 pl-0",{"col-lg-4":!e.isNarrow}],attrs:{cols:"12"}},[n("div",{staticClass:"font-weight-bold"},[e._v("Afdeling")]),e._v(" "),n("b-form-select",{attrs:{options:e.schoolsAndDepartmentsSelectList},on:{change:e.handleInstitutionChanged},model:{value:e.selectedInstitution,callback:function(t){e.selectedInstitution=t},expression:"selectedInstitution"}})],1):e._e(),e._v(" "),(e.isNarrow||e.isMobileView)&&e.personnel.length?n("b-col",{staticClass:"my-1 pl-0",attrs:{cols:"12"}},[n("div",{staticClass:"font-weight-bold"},[e._v("Lærer")]),e._v(" "),n("b-form-select",{attrs:{options:e.personnel.map((function(e){return{text:e.fullName,value:e}}))},model:{value:e.selectedPerson,callback:function(t){e.selectedPerson=t},expression:"selectedPerson"}})],1):e._e(),e._v(" "),n("b-col",{class:["my-1 pl-0",{"col-lg-4":!e.isNarrow}],attrs:{cols:"12"}},[n("b-button",{staticClass:"updateButton",attrs:{variant:"outline-primary"},on:{click:function(t){e.busy=!0,e.refresh()}}},[e._v("\n              Opdater overblik\n            ")])],1)],1)],1),e._v(" "),n("b-col",{staticClass:"d-flex align-items-center my-1",attrs:{md:e.isNarrow?12:6,cols:"12"}},[n("span",{staticClass:"m-0 mr-2"},[e._v("Vis:")]),e._v(" "),n("b-form-group",{staticClass:"overview-filters flex-fill"},[n("b-form-checkbox-group",{attrs:{options:e.overViewFilters,switches:""},on:{change:e.handleOverviewFilter},model:{value:e.overViewFiltersSelected,callback:function(t){e.overViewFiltersSelected=t},expression:"overViewFiltersSelected"}})],1)],1),e._v(" "),e.isNarrow?e._e():n("b-col",{staticClass:"d-flex align-items-center justify-content-end my-1",attrs:{md:"3",cols:"12"}},[n("span",{staticClass:"m-0 mr-2"},[e._v("Bredde:")]),e._v(" "),n("b-input",{staticClass:"absence-overview-width-input",attrs:{id:"kmd-absence-overview-width-input",min:e.activityWidthInput.min,max:e.activityWidthInput.max,type:"range"},model:{value:e.activityWidthInput.value,callback:function(t){e.$set(e.activityWidthInput,"value",t)},expression:"activityWidthInput.value"}}),e._v(" "),n("b-popover",{attrs:{target:"kmd-absence-overview-width-input",triggers:"hover",placement:"top"}},[e._v("\n          "+e._s(e.activityWidthInput.item())+"\n        ")])],1),e._v(" "),n("b-col",{staticClass:"d-flex align-items-center justify-content-end my-1",attrs:{md:e.isNarrow?12:3,cols:"12"}},[n("span",{staticClass:"m-0 mr-2"}
1,[e._v("Tidsakse:")]),e._v(" "),n("b-input",{staticClass:"absence-overview-timeaxis-input",attrs:{id:"kmd-absence-overview-timeaxis-input",min:e.breakDurationInput.min,max:e.breakDurationInput.max,type:"range"},model:{value:e.breakDurationInput.value,callback:function(t){e.$set(e.breakDurationInput,"value",t)},expression:"breakDurationInput.value"}}),e._v(" "),n("b-popover",{attrs:{target:"kmd-absence-overview-timeaxis-input",triggers:"hover",placement:"top"}},[e._v("\n          "+e._s(e.breakDurationInput.item().toString("human"))+"\n        ")])],1)],1),e._v(" "),e.personnel.length?n("div",{class:["table-wrapper","overflow-auto",e.isNarrow||e.isMobileView?"narrow-table-overview":""],style:e.tableWrapperStyleObject},[e.busy?n("div",{staticClass:"text-center loadingOverlay my-2"},[n("span",{staticClass:"align-middle spinner-border",attrs:{"aria-hidden":"true"}}),e._v(" "),n("strong",[e._v("Opdaterer dit overblik...")])]):e._e(),e._v(" "),n("div",{staticClass:"table-header"},[n("table",{class:["header-table table b-table table-striped sticky-col",{tableBusy:e.busy,narrowColumn:e.isNarrow||e.isMobileView}]},[n("thead",[n("tr",[n("th",{class:["periodColumn",{narrowColumn:e.isNarrow||e.isMobileView}]}),e._v(" "),e._l(e.shownPersonnel,(function(t){return n("th",{key:t.id,class:["activityColumn",{narrowColumn:e.isNarrow||e.isMobileView}],style:e.activityHeaderCellStyle},[n("div",[e._v(e._s(t.initialsAndFullName))]),e._v(" "),n("div",[n("small",[e._v(e._s(t.absenceDescription))])]),e._v(" "),t.absentPeriods.empty?e._e():n("div",[n("small",[e._v("("+e._s(t.absentPeriods.description)+"\n                  "),t.absentPeriods.tooltip?n("i",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"fas fa-info-circle",attrs:{title:t.absentPeriods.tooltip}}):e._e(),e._v("\n                  )\n                ")])])])}))],2)])])]),e._v(" "),n("div",{staticClass:"position-relative"},[n("table",{class:["overview-table table b-table table-striped sticky-col",{tableBusy:e.busy,narrowColumn:e.isNarrow||e.isMobileView}]},[n("tbody",e._l(e.periods,(function(t,i){return n("tr",{key:i},[n("th",{class:["periodColumn",{narrowColumn:e.isNarrow||e.isMobileView}],style:"height: "+e.periodVerticalLayout[i].height+";"},[e._v("\n              "+e._s(t.description)+"\n            ")]),e._v(" "),e._l(e.shownPersonnel,(function(t,s){return n("td",{key:t.id,class:["activityColumn",{narrowColumn:e.isNarrow||e.isMobileView}],style:e.activityCellStyle[i]},[0===i?e._l(t.activities,(function(t,i){return n("div",{key:i},[n("div",{class:["absence-activity",{"absent-and-substitute":t.isSubstitutedAbsence,substitute:t.isManualSubstitution,clickable:t.showNote(e.filterActivityNotes)}],style:{height:t.height(e.activityVerticalLayout),top:t.top(e.activityVerticalLayout),left:t.left(e.activityHorizontalLayout[s]),width:t.width(e.activityHorizontalLayout[s])},attrs:{title:t.tooltip},on:{click:function(n){e.checkForNotes(t)?e.showModal=!0:e.showModal=!1}}},[n("div",{staticClass:"activity-container"},[n("div",{class:["activity-description",{"with-period":t.showPeriod(e.activityTextLines),"overlaps-note":t.noteOverlapsDescription(e.filterActivityNotes,e.activityTextLines)}]},[n("span",[e._v(e._s(t.description(e.activityTextLines)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showPeriod(e.activityTextLines),expression:"activity.showPeriod(activityTextLines)"}],staticClass:"activity-period"},[n("span",[e._v(e._s(t.periodDescription))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showSubstitution(e.activityTextLines),expression:"\n                            activity.showSubstitution(activityTextLines)\n                          "}],class:["activity-substitution",{"overlaps-note":t.noteOverlapsSubstitution(e.filterActivityNotes,e.activityTextLines)}]},[n("span",[e._v(e._s(t.substitutionDescription))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showNote(e.filterActivityNotes),expression:"activity.showNote(filterActivityNotes)"}],staticClass:"activity-note",attrs:{title:""}},[n("transition",{attrs:{name:"fade"}},[n("i",{staticClass:"fas fa-sticky-note",attrs:{id:"activity-note-"+t.id}})]),e._v(" "),"narrow"!==e.placement.toLowerCase()?n("b-tooltip",{attrs:{target:"activity-note-"+t.id,title:t.note}}
1):e._e()],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showClasses(e.activityTextLines),expression:"activity.showClasses(activityTextLines)"}],class:["activity-classes",{"without-rooms":!t.showRooms(e.activityTextLines)}]},[n("span",[e._v(e._s(t.classes))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showRooms(e.activityTextLines),expression:"activity.showRooms(activityTextLines)"}],class:["activity-rooms",{"without-classes":!t.showClasses(e.activityTextLines)}]},[n("span",[e._v(e._s(t.rooms))])])])])])})):e._e()],2)}))],2)})),0)])])]):e.isLoading||e.shownPersonnel.length?e._e():n("span",{staticClass:"text-muted"},[e._v("Der er ikke registret noget fravær i den valgte periode.")]),e._v(" "),n("div",[n("div",{staticClass:"absence-list-header"},[n("h2",[e._v("Fravær for skolen")])]),e._v(" "),e.absences.length?n("div",[n("b-row",{class:["absence-list",{"px-3":e.isNarrow||e.isMobileView}]},[n("b-col",{staticClass:"d-flex align-items-center",attrs:{cols:e.isNarrow||e.isMobileView?12:"auto"}},[n("span",[e._v("Vis:")])]),e._v(" "),n("b-col",{attrs:{cols:"11"}},[n("b-row",{class:["d-flex",{"flex-column, align-items-center":e.isNarrow||e.isMobileView}]},[n("b-col",{attrs:{xl:e.isNarrow?9:"auto",cols:e.isMobileView?11:4}},[n("b-row",[n("b-form-group",{staticClass:"absence-filters"},[n("b-form-checkbox-group",{attrs:{options:e.listFiltersLeftColumn,switches:""},on:{change:e.handleListFilterLeftColumn},model:{value:e.listFiltersSelectedLeftColumn,callback:function(t){e.listFiltersSelectedLeftColumn=t},expression:"listFiltersSelectedLeftColumn"}})],1)],1)],1),e._v(" "),n("b-col",{attrs:{xl:e.isNarrow?9:"auto",cols:e.isMobileView?12:4}},[n("b-row",[n("b-form-group",{staticClass:"absence-filters"},[n("b-form-checkbox-group",{attrs:{options:e.listFiltersRightColumn,switches:""},on:{change:e.handleListFilterRightColumn},model:{value:e.listFiltersSelectedRightColumn,callback:function(t){e.listFiltersSelectedRightColumn=t},expression:"listFiltersSelectedRightColumn"}})],1)],1)],1)],1)],1)],1),e._v(" "),n("div",{class:["table-wrapper overflow-auto list-table-wrapper",{"narrow-table-list":e.isNarrow}],style:e.tableWrapperStyleObject},[n("table",{class:["list-table table b-table table-striped responsive",{tableBusy:e.busy}]},[n("thead",[n("tr",e._l(e.listColumns,(function(t){return n("th",{key:t.value,class:t.value===e.currentSort?"font-weight-bold":"font-weight-normal",on:{click:function(n){return e.sortBy(t.value)}}},[e._v("\n                "+e._s(t.label)+"\n                "),t.value===e.currentSort?n("i",{class:["fas fa-sort-down",{rotated:"desc"===e.currentSortDir}]}):e._e()])})),0)]),e._v(" "),n("transition-group",{tag:"tbody",attrs:{name:"list"}},e._l(e.filteredAbsences,(function(t,i){return n("tr",{key:i},e._l(e.listColumns,(function(i){return n("td",{key:i.value},[e._v("\n                "+e._s(t[i.value])+"\n              ")])})),0)})),0)],1)])],1):n("span",{staticClass:"text-muted"},[e._v("\n        Der er ikke registret noget fravær.\n      ")])])],1),e._v(" "),n("b-modal",{attrs:{id:"noteModal",size:"sm","ok-only":"","ok-title":"Luk",centered:""},scopedSlots:e._u([{key:"modal-header",fn:function(){return[n("div",{staticClass:"w-100"},[e._v("Vikarnoter")])]},proxy:!0}]),model:{value:e.showModal,callback:function(t){e.showModal=t},expression:"showModal"}},[e._v("\n    "+e._s(e.note)+"\n  ")])],1)}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"col"},[n("h1",[e._v("Fraværsoverblik")])])}],!1,null,"26aaa727",null);t.a=J.exports},840:function(e,t,n){"use strict";var i={props:{axios:Function,moment:Function,sessionUUID:String,placement:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String,language:String,systematic:Object},data:function(){var e=this.systematic&&this.systematic.moMoFrontendUrl?this.systematic.moMoFrontendUrl:"https://systematic-momo.dk",t=this.systematic&&this.systematic.moMoFrontendUrl?this.systematic.moMoFrontendUrl:"https://systematic-momo.dk",n="v1";return{widgetVersion:"1.10",aulaToken:null,urls:{moMoBackendReminders:e+"/api/aula/reminders/"+n,moMoBackendTeamReminders:e+"/api/aula/reminders/team/"+n,moMoBackendTeams:e+"/api/aula/teams/"+"v1?",moMoBackendFavouriteTeams:e+"/api/aula/teams/favourites/"+"v1?",moMoBackendSubjects:e+"/api/aula/subjects/"+"v1?",teamReminderIcon:t+"/assets/images/aula/team-reminder.svg",editTeamReminderIcon:t+"/assets/images/aula/pen.svg",assignmentIcon:t+"/assets/images/aula/assignment.svg",defaultCourseImage:t+"/assets/images/aula/default-course-image.svg",addTeamReminderIcon:t+"/assets/images/aula/plus.svg",editFavouriteTeamsIcon:t+"/assets/images/aula/funnel.svg",goToCourseIcon:t+"/assets/images/aula/chevron-right.svg",successIcon:t+"/assets/images/aula/check-mark-in-circle.svg",failureIcon:t+"/assets/images/aula/exclamation-mark-in-circle.svg",moMoCoursePageRootUrl:t+"#/course/",moMoCoursePageRootUrlWithQueryParameter:t+"?",moMoCoursePageFragment:"#/course/",moMoAssignmentTabPath:"/assignments"},states:{loading:0,displaying:1,addingTeamReminder:2,editingTeamReminder:3,editingFavouriteTeams:4,failed:5},userProfileTypes:{child:"child",employee:"employee",guardian:"guardian"},reminderTypes:{team:0,course:1,assignment:2},model:{remindersFetchedFromBackend:[],reminders:[],teams:[],hasTeamsFromMultipleInstitutions:!1,favouriteTeams:[],unfavouriteTeams:[],subjects:[],error:"",state:0,newTeamReminder:null,favouriteTeamsBeingEdited:null,teamReminderBeingEdited:null,statusBanner:{doDisplay:!1,text:null,icon:null,success:!0}},dateInputFieldDateFormat:"YYYY-MM-DD",backendInputShortDateFormat:"YYYY-MM-DD",TEXT:{DA:{HEADING:"Huskeliste",FAVOURITE_TEAMS:"Yndlingshold",ADD_TEAM_REMINDER:"Tilføj",FILTER_BY_TEAM:"Filtrer efter hold",REMEMBER:"Husk",TEAMS:"Hold",SUBJECT:"Fag (valgfrit)",CANCEL:"Annuller",RESET:"Nulstil",EDIT:"Ret",LAST_EDIT_BY:"Sidst opdateret af",DELET
1E:"Slet",SEE_MORE:"Se flere",APPLY_FILTER:"Filtrer",SAVE:"Gem",UNKNOWN_DATE:"Ukendt dato",YESTERDAY:"I går",TODAY:"I dag",TOMORROW:"I morgen",WRONG_AULA_ASSURANCE_LEVEL:"Du skal være logget ind for at se påmindelser.",GENERIC_ERROR_MESSAGE:"Noget gik galt. Prøv igen senere.",UNKNOWN_PERSON:"Ukendt person",YOU_HAVE_NO_REMINDERS:"Du har ingen påmindelser",HAS_NO_REMINDERS:"har ingen påmindelser",REMINDER_ADDED_FOR:"Påmindelse tilføjet for",AN_ERROR_OCCURRED:"Der er desværre opstået en fejl"},EN:{HEADING:"Reminders",FAVOURITE_TEAMS:"Favourite teams",ADD_TEAM_REMINDER:"Add",FILTER_BY_TEAM:"Filter by team",REMEMBER:"Remember",TEAMS:"Teams",SUBJECT:"Subject (optional)",CANCEL:"Cancel",RESET:"Reset",EDIT:"Edit",LAST_EDIT_BY:"Last update by",DELETE:"Delete",SEE_MORE:"See more",APPLY_FILTER:"Filter",SAVE:"Save",UNKNOWN_DATE:"Unknown date",YESTERDAY:"Yesterday",TODAY:"Today",TOMORROW:"Tomorrow",WRONG_AULA_ASSURANCE_LEVEL:"You need to be logged in to see reminders.",GENERIC_ERROR_MESSAGE:"Something went wrong. Try again later.",UNKNOWN_PERSON:"Unknown person",YOU_HAVE_NO_REMINDERS:"You have no reminders",HAS_NO_REMINDERS:"has no reminders",REMINDER_ADDED_FOR:"Reminder added for",AN_ERROR_OCCURRED:"An error occurred"}}}},computed:{LANG:function(){return this.language&&"EN"===this.language.toUpperCase()?this.language.toUpperCase():"DA"}},methods:{load:function(){this.model.remindersFetchedFromBackend=[],this.model.reminders=[],this.model.teams=[],this.model.hasTeamsFromMultipleInstitutions=!1,this.model.favouriteTeams=[],this.model.unfavouriteTeams=[],this.model.error="",[2,3].includes(this.assuranceLevel)?(this.model.state=this.states.loading,this.fetchRemindersAndFavouriteTeams()):(this.model.state=this.states.failed,this.model.error=this.TEXT[this.LANG].WRONG_AULA_ASSURANCE_LEVEL)},openCreateTeamReminderPane:function(){this.fetchTeams(),this.fetchSubjects(),this.model.state===this.states.displaying&&(this.model.newTeamReminder={reminderText:"",teamName:"",subjectName:"",dueDate:this.moment().add(1,"days").format(this.dateInputFieldDateFormat)},this.model.state=this.states.addingTeamReminder)},isDisplayingReminders:function(){return[this.states.displaying,this.states.addingTeamReminder,this.states.editingTeamReminder,this.states.editingFavouriteTeams].includes(this.model.state)},isEditingTeamReminder:function(e){return this.model.state===this.states.editingTeamReminder&&this.model.teamReminderBeingEdited.original.id===e.id},openEditTeamReminderPane:function(e){this.model.state===this.states.displaying&&(this.fetchSubjects(),this.model.teamReminderBeingEdited={original:e,edited:{reminderText:e.reminderText,dueDate:e.dueDate.format(this.dateInputFieldDateFormat),subjectName:e.subjectName}},this.model.state=this.states.editingTeamReminder)},canAddTeamReminder:function(){return this.model.state===this.states.displaying&&[this.userProfileTypes.child,this.userProfileTypes.employee].includes(this.userProfile)},canEditTeamReminder:function(e){return this.canAddTeamReminder()&&(this.userProfile===this.userProfileTypes.employee||e.lastEditBy===this.model.reminders[0].userName)},canEditFavouriteTeams:function(){return this.model.state===this.states.displaying&&this.userProfile===this.userProfileTypes.employee},abortCreateTeamReminderPane:function(){this.model.editingTeamReminder=null,this.model.state=this.states.displaying},submitCreateTeamReminderPane:function(){this.createTeamReminder()},abortEditTeamReminderPane:function(){this.model.editingTeamReminder=null,this.model.state=this.states.displaying},submitEditTeamReminderPane:function(){this.updateTeamReminder()},openEditFavouriteTeamsPane:function(){this.model.favouriteTeamsBeingEdited=this.model.favouriteTeams.map((function(e){return e.id})),this.fetchTeams(),this.model.state===this.states.displaying&&(this.model.state=this.states.editingFavouriteTeams)},abortEditFavouriteTeamsPane:function(){this.model.favouriteTeamsBeingEdited=null,this.model.state=this.states.displaying},submitEditFavouriteTeamsPane:function(){this.updateFavouriteTeams()},fetchRemindersAndFavouriteTeams:function(){var e=this;this.axios.get(this.urls.moMoBackendReminders+"?"+this.createChildrenParameter(this.childFilter,this.userProfile)+"&from="+this.moment().format(this.backendInputShortDateFormat)+"&dueNoLaterThan="+this.moment().add(6,"months").format(this.backendInputShortDateFormat)+"&"+this.createTraceParameters(),this.createHeaders()).then((function(t){e.model.remindersFetchedFromBackend=t.data,e.model.favouriteTeams=[],e.userProfile===e.userProfileTypes.employee?e.axios.get(e.urls.moMoBackendFavouriteTeams+e.createTraceParameters(),e.createHeaders()).then((function(t){e.model.hasTeam
1sFromMultipleInstitutions=e.hasTeamsFromMultipleInstitutions(t.data),e.model.favouriteTeams=e.sortTeams(e.enrichWithDisplayNames(t.data)),e.processRemindersFetchedFromBackend()})).catch((function(){})):e.processRemindersFetchedFromBackend()})).catch((function(){e.model.error=e.TEXT[e.LANG].GENERIC_ERROR_MESSAGE,e.model.state=e.states.failed}))},fetchTeams:function(){var e=this;0===this.model.teams.length&&(this.model.unfavouriteTeams=[],this.axios.get(this.urls.moMoBackendTeams+"&"+this.createTraceParameters(),this.createHeaders()).then((function(t){e.model.hasTeamsFromMultipleInstitutions=e.hasTeamsFromMultipleInstitutions(t.data),e.model.teams=e.sortTeams(e.enrichWithDisplayNames(t.data)),e.updateUnfavouriteTeams()})).catch((function(){})))},fetchSubjects:function(){var e=this;0===this.model.subjects.length&&this.axios.get(this.urls.moMoBackendSubjects+this.createTraceParameters(),this.createHeaders()).then((function(t){e.model.subjects=t.data})).catch((function(){}))},createTeamReminder:function(){var e=this,t=this.model.teams.find((function(t){return t.displayName===e.model.newTeamReminder.teamDisplayName}));if(t){var n={teamId:t.id,teamName:t.displayName,dueDate:this.dateInputFieldDateFormatToBackendInputLongDateFormat(this.model.newTeamReminder.dueDate),reminderText:this.model.newTeamReminder.reminderText};this.model.newTeamReminder.subjectName&&(n.subjectName=this.model.newTeamReminder.subjectName),this.axios.post(this.urls.moMoBackendTeamReminders+"?"+this.createTraceParameters(),n,this.createHeaders()).then((function(t){[200,201].includes(t.status)?(e.teamReminderCreated(t.data),e.displayTeamReminderAddedBanner(!0,e.moment(t.data.dueDate))):e.displayTeamReminderAddedBanner(!1),e.processRemindersFetchedFromBackend()})).catch((function(){e.displayTeamReminderAddedBanner(!1),e.model.state=e.states.displaying}))}},updateTeamReminder:function(){var e=this,t={dueDate:this.dateInputFieldDateFormatToBackendInputLongDateFormat(this.model.teamReminderBeingEdited.edited.dueDate),teamName:this.model.teamReminderBeingEdited.edited.displayName,reminderText:this.model.teamReminderBeingEdited.edited.reminderText};this.model.teamReminderBeingEdited.edited.subjectName&&(t.subjectName=this.model.teamReminderBeingEdited.edited.subjectName),this.axios.put(this.urls.moMoBackendTeamReminders+"/"+this.model.teamReminderBeingEdited.original.id+"?"+this.createTraceParameters(),t,this.createHeaders()).then((function(t){200===t.status&&e.teamReminderEdited(t.data),e.processRemindersFetchedFromBackend()})).catch((function(){e.model.state=e.states.displaying}))},deleteTeamReminder:function(){var e=this,t=this.model.teamReminderBeingEdited.original.id;this.axios.delete(this.urls.moMoBackendTeamReminders+"/"+t+"?"+this.createTraceParameters(),this.createHeaders()).then((function(n){204===n.status&&e.teamReminderDeleted(t),e.processRemindersFetchedFromBackend()})).catch((function(){e.model.state=e.states.displaying}))},updateFavouriteTeams:function(){var e=this;this.axios.put(this.urls.moMoBackendFavouriteTeams+this.createTraceParameters(),this.model.favouriteTeamsBeingEdited,this.createHeaders()).then((function(t){e.model.favouriteTeamsBeingEdited=[],e.model.favouriteTeams=e.sortTeams(e.enrichWithDisplayNames(t.data)),e.updateUnfavouriteTeams(),e.processRemindersFetchedFromBackend()})).catch((function(){e.model.state=e.states.displaying}))},createQueryParameter:function(e,t){if(t){var n=t.map((function(e){return e.trim()})).filter((function(e){return!!e}));if(n.length>0)return e+"="+n.join("&"+e+"=")}return""},createChildrenParameter:function(e,t){return t===this.userProfileTypes.guardian?this.createQueryParameter("children",e):""},createTraceParameters:function(){return"widgetVersion="+this.widgetVersion+"&userProfile="+this.userProfile+"&sessionId="+this.sessionUUID+"&"+this.createQueryParameter("institutions",this.institutionFilter)},createHeaders:function(){return{headers:{"Aula-Authorization":"Bearer "+this.aulaToken,zone:Intl.DateTimeFormat().resolvedOptions().timeZone}}},dateInputFieldDateFormatToBackendInputLongDateFormat:function(e){return this.moment(e).toISOString()},formatDate:function(e){var t=this.moment().subtract(1,"day"),n=this.moment(),i=this.moment().add(1,"day");if(e.isValid()){if(e.isSame(t,"day"))return this.TEXT[this.LANG].YESTERDAY;if(e.isSame(n,"day"))return this.TEXT[this.LANG].TODAY;if(e.isSame(i,"day"))return this.TEXT[this.LANG].TOMORROW;e.locale(this.LANG.toLowerCase());
1var s=e.format("EN"===this.LANG?"dddd MMMM Do":"dddd Do MMMM");return s.charAt(0).toUpperCase()+s.slice(1)}return this.TEXT[this.LANG].UNKNOWN_DATE},formatPersonName:function(e){return e?e.split(" ")[0]:this.TEXT[this.LANG].UNKNOWN_PERSON},formatNoticeOfNoReminders:function(e){return this.model.reminders.length>1?this.formatPersonName(e)+" "+this.TEXT[this.LANG].HAS_NO_REMINDERS:this.TEXT[this.LANG].YOU_HAVE_NO_REMINDERS},join:function(e){return e.join(", ")},formatTeamDisplayNames:function(e){return this.join(e.map((function(e){return e.name})))},formatTeamAndSubject:function(e){return e.teamName+(e.subjectName?", "+e.subjectName:"")},formatTeamsAndSubjects:function(e){return this.join(e.teamNames)+(e.courseSubjects.length>0?", "+this.join(e.courseSubjects):"")},enrichWithDisplayNames:function(e){var t=this;return e.forEach((function(e){e.displayName=t.model.hasTeamsFromMultipleInstitutions?e.name+" ("+e.institutionName+")":e.name})),e},updateUnfavouriteTeams:function(){var e=this.model.favouriteTeams.map((function(e){return e.id}));this.model.unfavouriteTeams=this.sortTeams(this.model.teams.filter((function(t){return!e.includes(t.id)})))},sortTeams:function(e){return e.sort((function(e,t){var n=e.institutionName.localeCompare(t.institutionName);return 0!==n?n:e.name.localeCompare(t.name)}))},resetFavouriteTeams:function(){this.model.favouriteTeamsBeingEdited=[],this.updateFavouriteTeams()},processRemindersFetchedFromBackend:function(){var e=this;this.model.reminders=this.model.remindersFetchedFromBackend.map((function(t){var n=[];e.setTypeAndDueDate(t.teamReminders,e.reminderTypes.team,n),e.setTypeAndDueDate(t.courseReminders,e.reminderTypes.course,n),e.setTypeAndDueDate(t.assignmentReminders,e.reminderTypes.assignment,n),(n=e.filterAccordingToFavourites(n)).sort((function(e,t){return e.dueDate.isValid()||t.dueDate.isValid()?e.dueDate.isValid()?t.dueDate.isValid()?e.dueDate.diff(t.dueDate):-1:1:0}));var i=[];if(n.length>0){var s=n[0].dueDate,a=[];n.forEach((function(e){e.dueDate.isSame(s,"day")?a.push(e):(a.length>0&&i.push({dueDate:s,remindersForDueDate:a}),s=e.dueDate,a=[e])})),a.length>0&&i.push({dueDate:s,remindersForDueDate:a})}return{userName:t.userName,userId:t.userId,undisplayedRemindersGroupedByDueDate:i,displayedRemindersGroupedByDueDate:[]}})),this.displayMoreReminders(),this.model.state=this.states.displaying},setTypeAndDueDate:function(e,t,n){var i=this;e&&e.forEach((function(e){e.type=t,e.dueDate=i.moment(e.dueDate),n.push(e)}))},filterAccordingToFavourites:function(e){var t=this;if(this.model.favouriteTeams.length>0){var n=this.model.favouriteTeams.map((function(e){return e.id}));return e.filter((function(e){switch(e.type){case t.reminderTypes.team:return n.includes(+e.teamId);case t.reminderTypes.assignment:case t.reminderTypes.course:return e.teamIds.some((function(e){return n.includes(+e)}));default:return!1}}))}return e},displayMoreReminders:function(){this.model.reminders.forEach((function(e){for(var t=0;e.undisplayedRemindersGroupedByDueDate.length>0&&t<3;){var n=e.undisplayedRemindersGroupedByDueDate[0];e.undisplayedRemindersGroupedByDueDate=e.undisplayedRemindersGroupedByDueDate.slice(1),e.displayedRemindersGroupedByDueDate.push(n),t++}}))},thereAreMoreRemindersToDisplay:function(){return this.model.reminders.find((function(e){return e.undisplayedRemindersGroupedByDueDate.length>0}))},teamReminderCreated:function(e){this.model.remindersFetchedFromBackend[0].teamReminders.push(e)},teamReminderEdited:function(e){var t=this.model.remindersFetchedFromBackend[0].teamReminders.find((function(t){return t.id===e.id}));t&&(t.dueDate=e.dueDate,t.lastEditBy=e.lastEditBy,t.reminderText=e.reminderText,t.subjectName=e.subjectName)},teamReminderDeleted:function(e){this.model.remindersFetchedFromBackend[0].teamReminders=this.model.remindersFetchedFromBackend[0].teamReminders.filter((function(t){return t.id!==e}))},mustDisplayStatusBanner:function(){return this.model.statusBanner.doDisplay},displayTeamReminderAddedBanner:function(e,t){var n=this;this.model.statusBanner.text=e?this.TEXT[this.LANG].REMINDER_ADDED_FOR+" "+t.format("D/M-YY"):this.TEXT[this.LANG].AN_ERROR_OCCURRED,this.model.statusBanner.icon=e?this.urls.successIcon:this.urls.failureIcon,this.model.statusBanner.success=e,this.model.statusBanner.doDisplay=!0,setTimeout((function(){n.model.statusBanner.doDisplay=!1}),3e3)},arraysDiffer:function(e,t){if(null===e&&null!==t||null===t&&null!==e)return!0;
1if(null===e&&null===t)return!1;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1},isValidCreateTeamReminderInput:function(){return this.isValidTeamReminderInput(this.model.newTeamReminder,!0)},isValidEditTeamReminderInput:function(){return this.isValidTeamReminderInput(this.model.teamReminderBeingEdited.edited,!1)&&(this.textChanged(this.model.teamReminderBeingEdited.edited.reminderText,this.model.teamReminderBeingEdited.original.reminderText)||!this.moment(this.model.teamReminderBeingEdited.edited.dueDate,this.dateInputFieldDateFormat).isSame(this.model.teamReminderBeingEdited.original.dueDate)||this.textChanged(this.model.teamReminderBeingEdited.edited.subjectName,this.model.teamReminderBeingEdited.original.subjectName))},textChanged:function(e,t){return 0!==(e||"").localeCompare(t||"")},isValidTeamReminderInput:function(e,t){var n=this.moment(),i=this.moment(e.dueDate,this.dateInputFieldDateFormat);return i.isValid()&&i.isSameOrAfter(n,"day")&&e.reminderText&&e.reminderText.length>=1&&(!t||this.model.teams.find((function(t){return 0===t.displayName.localeCompare(e.teamDisplayName)})))&&(!e.subjectName||this.model.subjects.find((function(t){return 0===t.name.localeCompare(e.subjectName)})))},momoCoursePageUrl:function(e){return this.urls.moMoCoursePageRootUrl+e.courseId+this.courseTab(e)},getCourseLinkId:function(e,t){return e.type===this.reminderTypes.assignment?"momo_reminder_link_"+e.type+"_"+e.courseId+"_"+e.assignmentId+"_"+t:"momo_reminder_link_"+e.type+"_"+e.courseId+"_"+e.id+"_"+t},setMomoCoursePageUrl:function(e,t){if(!this.systematic){var n="aulaToken="+this.aulaToken+"&momoUserId="+t+"&momoInstitutionId="+e.institutionId+"&userProfile="+this.userProfile,i=this.urls.moMoCoursePageRootUrlWithQueryParameter+n+this.urls.moMoCoursePageFragment+e.courseId+this.courseTab(e);document.getElementById(this.getCourseLinkId(e,t)).href=i}},courseTab:function(e){return this.userProfile===this.userProfileTypes.employee&&e.type===this.reminderTypes.assignment?this.urls.moMoAssignmentTabPath:""},onCourseImageLoadError:function(e){e.courseImage=null},getReminderText:function(e){return e.type===this.reminderTypes.course?e.reminderText:e.type===this.reminderTypes.assignment?e.assignmentText:""},hasTeamsFromMultipleInstitutions:function(e){return e.length>1&&e.some((function(t){return t.institutionName!==e[0].institutionName}))},courseLinkTarget:function(){return this.systematic?"_parent":"_blank"}},watch:{childFilter:function(e,t){this.arraysDiffer(e,t)&&void 0!==this.aulaToken&&this.load()},institutionFilter:function(e,t){this.arraysDiffer(e,t)&&void 0!==this.aulaToken&&this.load()},assuranceLevel:function(e,t){e!==t&&void 0!==this.aulaToken&&this.load()},aulaToken:function(){void 0!==this.aulaToken&&this.load()}},created:function(){this.moment.locale("da"),this.aulaToken=this.getAulaToken()},updated:function(){}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0062V0001"},[n("div",{staticClass:"momo-reminders"},[n("datalist",{attrs:{id:"subjects"}},e._l(e.model.subjects,(function(t){return n("option",{key:t.id,attrs:{id:t.id}},[e._v("\n        "+e._s(t.name)+"\n      ")])})),0),e._v(" "),n("div",{staticClass:"momo-top"},[n("div",{staticClass:"momo-heading"},[n("span",{staticClass:"momo-heading-text"},[e._v(e._s(e.TEXT[e.LANG].HEADING))]),e._v(" "),n("div",[e.canEditFavouriteTeams()?n("img",{staticClass:"momo-icon-button",attrs:{src:e.urls.editFavouriteTeamsIcon,alt:e.TEXT[e.LANG].FAVOURITE_TEAMS},on:{click:function(t){return e.openEditFavouriteTeamsPane()}}}):e._e(),e._v(" "),n("span",{staticClass:"momo-icon-spacer"}),e._v(" "),e.canAddTeamReminder()?n("img",{staticClass:"momo-icon-button",attrs:{src:e.urls.addTeamReminderIcon,alt:e.TEXT[e.LANG].ADD_TEAM_REMINDER},on:{click:function(t){return e.openCreateTeamReminderPane()}}}):e._e()])]),e._v(" "),e.model.state===e.states.editingFavouriteTeams?n("div",{staticClass:"momo-pane"},[n("div",{staticClass:"momo-favourite-teams-heading"},[e._v(e._s(e.TEXT[e.LANG].FILTER_BY_TEAM))]),e._v(" "),n("div",{staticClass:"momo-team-checkboxes"},e._l(e.model.teams,(function(t){return n("div",{key:t.id,staticClass:"momo-team-checkbox"},[n("label",{staticClass:"momo-team-checkbox-text",attrs:{for:t.id}},[e._v(e._s(t.displayName))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.favouriteTeamsBeingEdited,expression:"model.favouriteTeamsBeingEdited"}
1],attrs:{type:"checkbox",id:t.id},domProps:{value:t.id,checked:Array.isArray(e.model.favouriteTeamsBeingEdited)?e._i(e.model.favouriteTeamsBeingEdited,t.id)>-1:e.model.favouriteTeamsBeingEdited},on:{change:function(n){var i=e.model.favouriteTeamsBeingEdited,s=n.target,a=!!s.checked;if(Array.isArray(i)){var r=t.id,o=e._i(i,r);s.checked?o<0&&e.$set(e.model,"favouriteTeamsBeingEdited",i.concat([r])):o>-1&&e.$set(e.model,"favouriteTeamsBeingEdited",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(e.model,"favouriteTeamsBeingEdited",a)}}})])})),0),e._v(" "),n("div",{staticClass:"momo-button-group"},[n("button",{on:{click:function(t){return e.abortEditFavouriteTeamsPane()}}},[e._v(e._s(e.TEXT[e.LANG].CANCEL))]),e._v(" "),n("button",{on:{click:function(t){return e.submitEditFavouriteTeamsPane()}}},[e._v(e._s(e.TEXT[e.LANG].APPLY_FILTER))])])]):e._e(),e._v(" "),e.model.state===e.states.addingTeamReminder?n("div",{staticClass:"momo-pane"},[n("img",{staticClass:"momo-reminder-icon",class:{"momo-team-reminder-icon-in-momo":!!e.systematic,"momo-team-reminder-icon-in-aula":!e.systematic},attrs:{src:e.urls.teamReminderIcon}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.newTeamReminder.reminderText,expression:"model.newTeamReminder.reminderText"}],attrs:{type:"text",minlength:"1",maxlength:"120",placeholder:e.TEXT[e.LANG].REMEMBER+"...",autofocus:""},domProps:{value:e.model.newTeamReminder.reminderText},on:{input:function(t){t.target.composing||e.$set(e.model.newTeamReminder,"reminderText",t.target.value)}}}),e._v(" "),n("datalist",{attrs:{id:"teams"}},[e._l(e.model.favouriteTeams,(function(t){return n("option",{key:t.id,attrs:{id:t.id}},[e._v("\n            "+e._s(t.displayName)+"\n          ")])})),e._v(" "),e._l(e.model.unfavouriteTeams,(function(t){return n("option",{key:t.id,attrs:{id:t.id}},[e._v("\n            "+e._s(t.displayName)+"\n          ")])}))],2),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.newTeamReminder.teamDisplayName,expression:"model.newTeamReminder.teamDisplayName"}],attrs:{list:"teams",placeholder:e.TEXT[e.LANG].TEAMS+"..."},domProps:{value:e.model.newTeamReminder.teamDisplayName},on:{input:function(t){t.target.composing||e.$set(e.model.newTeamReminder,"teamDisplayName",t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.newTeamReminder.subjectName,expression:"model.newTeamReminder.subjectName"}],attrs:{list:"subjects",placeholder:e.TEXT[e.LANG].SUBJECT},domProps:{value:e.model.newTeamReminder.subjectName},on:{input:function(t){t.target.composing||e.$set(e.model.newTeamReminder,"subjectName",t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.newTeamReminder.dueDate,expression:"model.newTeamReminder.dueDate"}],attrs:{type:"date",placeholder:e.TEXT[e.LANG].DATE_TEMPLATE},domProps:{value:e.model.newTeamReminder.dueDate},on:{input:function(t){t.target.composing||e.$set(e.model.newTeamReminder,"dueDate",t.target.value)}}}),e._v(" "),n("div",{staticClass:"momo-button-group"},[n("button",{on:{click:function(t){return e.abortCreateTeamReminderPane()}}},[e._v(e._s(e.TEXT[e.LANG].CANCEL))]),e._v(" "),n("button",{attrs:{disabled:!e.isValidCreateTeamReminderInput()},on:{click:function(t){return e.submitCreateTeamReminderPane()}}},[e._v("\n            "+e._s(e.TEXT[e.LANG].SAVE)+"\n          ")])])]):e._e()]),e._v(" "),e.model.state===e.states.failed?n("div",{},[n("div",{staticClass:"momo-message"},[e._v(e._s(e.model.error))])]):e._e(),e._v(" "),n("div",{staticClass:"momo-containing-block"},[n("transition",{attrs:{name:"fade"}},[e.model.statusBanner.doDisplay?n("div",{staticClass:"momo-status-banner",class:{"momo-status-banner-success":e.model.statusBanner.success,"momo-status-banner-failure":!e.model.statusBanner.success}},[n("div",{staticClass:"momo-status-banner-text"},[e._v(e._s(e.model.statusBanner.text))]),e._v(" "),n("img",{attrs:{height:"26",src:e.model.statusBanner.icon,alt:"!"}})]):e._e()]),e._v(" "),e.model.favouriteTeams.length>0&&e.model.state===e.states.displaying?n("div",{staticClass:"momo-favourite-teams-display"},[n("span",{staticClass:"momo-reminder-additional-text"},[e._v(e._s(e.formatTeamDisplayNames(e.model.favouriteTeams)))]),e._v(" "),n("button",{on:{click:function(t){return e.resetFavouriteTeams()}}}
1,[e._v(e._s(e.TEXT[e.LANG].RESET))])]):e._e(),e._v(" "),e._l(e.model.reminders,(function(t){return e.isDisplayingReminders()?n("div",{key:t.userName,staticClass:"momo-user-reminders",class:{"momo-user-reminders-no-more-to-see":!e.thereAreMoreRemindersToDisplay()}},[e.model.reminders.length>1?n("div",{staticClass:"momo-child-name"},[e._v("\n          "+e._s(e.formatPersonName(t.userName))+"\n        ")]):e._e(),e._v(" "),e._l(t.displayedRemindersGroupedByDueDate,(function(i){return t.displayedRemindersGroupedByDueDate.length>0?n("div",{key:i.dueDate.dayOfYear(),staticClass:"momo-user-reminders-for-date"},[i.remindersForDueDate.length>0?n("div",{staticClass:"momo-date-heading"},[e._v("\n            "+e._s(e.formatDate(i.dueDate))+"\n          ")]):e._e(),e._v(" "),e._l(i.remindersForDueDate,(function(i){return n("div",{key:i.id,staticClass:"momo_user-reminder-for-due-date"},[i.type===e.reminderTypes.team?n("div",[e.isEditingTeamReminder(i)?e._e():n("div",{staticClass:"momo-reminder"},[n("img",{staticClass:"momo-reminder-icon",class:{"momo-team-reminder-icon-in-momo":!!e.systematic,"momo-team-reminder-icon-in-aula":!e.systematic},attrs:{src:e.urls.teamReminderIcon,alt:""}}),e._v(" "),n("div",{staticClass:"momo-reminder-text-container"},[n("div",{staticClass:"momo-reminder-text"},[e._v(e._s(i.reminderText))]),e._v(" "),n("div",{staticClass:"momo-reminder-additional-text"},[e._v("\n                    "+e._s(e.formatTeamAndSubject(i))+"\n                  ")])]),e._v(" "),e.canEditTeamReminder(i)?n("img",{staticClass:"momo-icon-button",attrs:{src:e.urls.editTeamReminderIcon,alt:e.TEXT[e.LANG].EDIT},on:{click:function(t){return e.openEditTeamReminderPane(i)}}}):e._e()]),e._v(" "),e.isEditingTeamReminder(i)?n("div",{staticClass:"momo-pane"},[n("img",{staticClass:"momo-reminder-icon",class:{"momo-team-reminder-icon-in-momo":!!e.systematic,"momo-team-reminder-icon-in-aula":!e.systematic},attrs:{src:e.urls.teamReminderIcon,alt:""}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.teamReminderBeingEdited.edited.reminderText,expression:"model.teamReminderBeingEdited.edited.reminderText"}],attrs:{type:"text",minlength:"1",maxlength:"120",placeholder:e.TEXT[e.LANG].REMEMBER+"...",autofocus:""},domProps:{value:e.model.teamReminderBeingEdited.edited.reminderText},on:{input:function(t){t.target.composing||e.$set(e.model.teamReminderBeingEdited.edited,"reminderText",t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.teamReminderBeingEdited.edited.subjectName,expression:"model.teamReminderBeingEdited.edited.subjectName"}],attrs:{list:"subjects",placeholder:e.TEXT[e.LANG].SUBJECT},domProps:{value:e.model.teamReminderBeingEdited.edited.subjectName},on:{input:function(t){t.target.composing||e.$set(e.model.teamReminderBeingEdited.edited,"subjectName",t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.teamReminderBeingEdited.edited.dueDate,expression:"model.teamReminderBeingEdited.edited.dueDate"}],attrs:{type:"date"},domProps:{value:e.model.teamReminderBeingEdited.edited.dueDate},on:{input:function(t){t.target.composing||e.$set(e.model.teamReminderBeingEdited.edited,"dueDate",t.target.value)}}}),e._v(" "),n("div",{staticClass:"momo-reminder-additional-text"},[e._v(e._s(e.TEXT[e.LANG].LAST_EDIT_BY+" "+e.model.teamReminderBeingEdited.original.lastEditBy)+"\n                ")]),e._v(" "),n("div",{staticClass:"momo-button-group"},[n("div",{staticClass:"momo-delete-button-container"},[n("button",{staticClass:"momo-delete-button",on:{click:function(t){return e.deleteTeamReminder()}}},[e._v("\n                      "+e._s(e.TEXT[e.LANG].DELETE)+"\n                    ")])]),e._v(" "),n("button",{on:{click:function(t){return e.abortEditTeamReminderPane()}}},[e._v(e._s(e.TEXT[e.LANG].CANCEL))]),e._v(" "),n("button",{attrs:{disabled:!e.isValidEditTeamReminderInput()},on:{click:function(t){return e.submitEditTeamReminderPane()}}},[e._v("\n                    "+e._s(e.TEXT[e.LANG].SAVE)+"\n                  ")])])]):e._e()]):e._e(
1),e._v(" "),i.type===e.reminderTypes.course||i.type===e.reminderTypes.assignment?n("div",{staticClass:"momo-reminder"},[n("div",{staticClass:"momo-containing-block"},[n("img",{staticClass:"momo-reminder-icon",attrs:{src:i.courseImage||e.urls.defaultCourseImage,alt:""},on:{error:function(t){return e.onCourseImageLoadError(i)}}}),e._v(" "),i.type===e.reminderTypes.assignment?n("img",{staticClass:"momo-assignment-icon",class:{"momo-assignment-icon-in-momo":!!e.systematic,"momo-assignment-icon-in-aula":!e.systematic},attrs:{src:e.urls.assignmentIcon,alt:""}}):e._e()]),e._v(" "),n("div",{staticClass:"momo-reminder-text-container"},[n("div",{staticClass:"momo-reminder-text"},[e._v(e._s(e.getReminderText(i)))]),e._v(" "),n("div",{staticClass:"momo-reminder-additional-text"},[e._v("\n                  "+e._s(e.formatTeamsAndSubjects(i))+"\n                ")])]),e._v(" "),n("a",{staticClass:"momo-icon-button",attrs:{href:e.momoCoursePageUrl(i),target:e.courseLinkTarget(),id:e.getCourseLinkId(i,t.userId)},on:{click:function(n){return e.setMomoCoursePageUrl(i,t.userId)}}}
1,[n("img",{attrs:{height:"25",src:e.urls.goToCourseIcon,alt:">"}})])]):e._e()])}))],2):e._e()})),e._v(" "),0===t.displayedRemindersGroupedByDueDate.length?n("div",{staticClass:"momo-no-reminders-for-user"},[e._v("\n          "+e._s(e.formatNoticeOfNoReminders(t.userName))+"\n        ")]):e._e()],2):e._e()})),e._v(" "),e.isDisplayingReminders()&&e.thereAreMoreRemindersToDisplay()?n("div",{staticClass:"momo-view-more-button",on:{click:function(t){return e.displayMoreReminders()}}},[e._v("\n        "+e._s(e.TEXT[e.LANG].SEE_MORE)+"\n      ")]):e._e()],2)])])}),[],!1,null,null,null);t.a=a.exports},841:function(e,t,n){"use strict";var i={},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"skolebordet"},[t("a",{attrs:{href:"https://kviklogin.dk",target:"_blank"}},[t("img",{attrs:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAA+CAMAAABtETKdAAADAFBMVEUAAAAJBAMAAAAAAAD07OsAAAAAAAAFBgYAAAAAAADx7+0AAAAAAAAAAAAAAAACAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAACAgL+//4AAAAAAAAAAAAAAAAAAAAAAAAAAAAODAvs6usAAADxSwAAAAAAAAC7AAAAVgD12tjEAAC/AAEAAAD58PAAAAAAAAAATgDP0d3+/fz///8AZgP77+3wu7UjbUPzVwC9y7z49fL////3ycHyWSn////wPgD0ZQD53tnZ39vxWSr////zWSoxNJO/v9X////0WSzBABLwNQD////GFBwAYSfxWSrsy8nNzt8EcSDit7jb3eTxWCr//v7xWSn////yWSjyVxvxWSr////yWCokK5PxWSrxWSo0hGXy8fD////xWCm3AAD////wWCkAAAD////0eC/0cC0AAInJytzDLjfKLS71fzb8+vpFiUPyaSz1Wyupuq4AApEAGpXPNTEANp02PZbGJy369vP0wrrRQz0heTzJNTjyXzTMAQAxZK7hm5rzbTbCIi/1dAD8qZ00RpwsPJfbdXYtfj00TJ8qQJqvss2NmMOlw6YAQKL2hTz0dzfyYSr87+sfW6oBKZgzgEI4hD0viwHe4eyYocctWKcCTKb/inBSkUkVdDv2hQHr7fPU2Ob65+LyzsswUaKYtpgreUQIcTcBegH84NTJ2MdARpp+pIb82MjtxsL8zrj5wbEtMpMCajj1fhuxu9fVydGEjrz/rqIsSJ4tN5UWHZP5r4j6qEb6pToXgQjX49Olr892jL9daa4CW645Wab6vZ3kkI8AAHz8m3jLVFhjc7DIaG75qWs+hUkmdUQ3iCbQLSDTAgDj6+BLYKcVOpsUJ5XdhIBql3NMgl8gcUL5myb5mQfp7eh2gbbgrq/psKz/uaiitaf8oI97qmIcbD5sfrWPsYnXbGj2lFRmn1D4akX/e1baWlRTly/e3+FMfb07a7I1dUsXaj3THADwDwDH1PhRAAAAb3RSTlMABPz4A/5tCIAeAa3zg7EO7Wkl5hMpdzC2zopf2DqPOAmlWnI/4ca+GK1E/Z9L/v7+/vuYimRT/tt0Vv6Z/v7895FS+5Ee/v7IxkU0If78ExP+/Cb+/PHj4f3543VoZkc4/r9aUP7eqP7EXVz3XFepYu8LAAARs0lEQVR42uza3UtTYRwH8AVe+T8I3Y7BXkQwXbqp2JQgsZSwiJBuKggeF+6cMwNhZ2qiTkgomRtsEjQnG3ttc2MSQtMtgpnifL3IfClfMbUMevs955y5ZUZ1vfO9OBfn8sPv4Xl+v+cR/H9yBcLrwrKie3lXatI/c5jk5gr4/DVnBMJ3X5cDrgdKZXV1WdHdm1dqctKQPOE/AUrqJZJCidzzDkM+UJ6rPl9wg4PkBX9NbnptZgDW737bLV1Z8Xga5DieWYDcwpDCSkGOgE+GXxqSleQAv0UiQ3Nut8VimZ21WNoBEpdkRK7M4wEzAhg3hEW3MrcLgGQqMLLigdLzNvRZrUDY1+d2z5XulhZu8YAnAM/3TvVu6q9WVZ1PQwq/Ftbvyj0B115g2WaNeb3W2b6+9iFPpLTwAQ94EvDT5QuXL4haPj3b7t0MVwBkQfGdwO3bDYF1hEPS6/F+ap6yYEEe8BTAZ6KHEFOjAkelxpBjYf3ICzNCfle/0h8HyKUDEGxvH1rhAU8DbGlpMWm13d0DELVWpVCIRKLGw8PDsMs7iLNHo/ggZYUSnOMBTwcEP7W6qWmAIIgBnG6tqbHxx3b/4MHRzs7OYD9CgXkQHJqT8ICnLWHOjzBAmoimJrVaazI9vNALgH6aHl5fIpHLa4MS5AH/AMj5RaPRKaOBE8SAXj/ismSjqL52Nw94KiDjZzQkEGlG5qjdCIJaLQY8IlEqyhhl4QFzcdP2G6BWi/1Go8AUJJHPMEpgwW4A3EHH8fOAqb7tDNe0pQAVuAAJwm4GP7sPkcF9EGQAXTzgCb+avMqzv8z4WEDwGyWiCdKxag8hREftuAS7Rb1+P0IkyS1hLw+YI7glvXa1Coal5RdTkBgQDoDGoA/5ksnVNVjHPruRIDDg9jBsv0vx+FIcAF0xfhPJERRPims7ph9Ndn1gIYvzaoRTCpVKZTBD5a2ujk9MBMlQChB2YReNIPCJz1P8MQYAu8TNdbX5YrFY1tn6GSA3ro2M6PXhRAiYEmvjE+MTqwkfCHKAg/MHTDeH/PMUxXciLGBPT3NzB0RXJ2PSMz3zFipSGrRD/QEhjej9UQ4wZjsahMT29mJMK5flw4QUYI+uVlanaW1j0qGpk4kh02H76sT4+PiaD2rRYOSWsI3NvJWy8tOYY0Bd3fTHtoVONnUaTTOkdsaXSE6sra3ZowgFDWwFuuQUZaNwGL+hbJ8HcoC6DtkIMpulzpGNrrcgqdHoepprp0lEJ0OOUDLpIBMcoH/Z5vXGrMBnAT9+oHoM2OlEqZC0tE2n0QEgjcwh5gfNFKAWAMuKqpX9gVmvvKHd7V7xRHhADKjTYECSPCacXgBA8UwwFE7S+C+d6kTGbgoEleVlGNEil8gjpaXZCMhdWmYCtjIVOLKhd0odJDK3aQAwfyasGrXvm30h35SBYIcJY8UYi0PcWl6RFNZnIWDGpeXZFOCiFDmcTjgAlpTQyLHQ2qppls2ER41G45TdALMEdpx1eayc7fYYxGKMGJBk363cjZsXa1JtGwDmwwmw7bsUSUv0kBInYgE7ABD6kSZAJAYYPwaQxcpE/JJ1gMNPH1+CBwUFAFkpKO8Sy2SdnYscYIUeA35nAaUVmzBNVanUzETf1JIGhOSmEK/UZNvbjktv7t9/+fz1+yevAPL6i2sfuiYffXYgp74CopciJF1sA8D8RwVny8uqAJFQiBSmh5BMQA4xG9/G/GzfbGLbKKIAPGtjr13bWcd2/BMbm8S/mAQBUSKQyAUihApFBaSCBFSIX/EjZqUECSmysQUIEUBKUELkA/EhPxwS6AVV/FRKQ8upaaMiekJq6YmChFQhIQQc4L2Z2d3xdkNNOMKjbXZmd2befPNm3puZMDV5tHng6fokSO3C7PnLW2CRx39bv+nOOz//4vVxGaDwFwjxnbseuAGciAAoQ/zv/XbW1GTz2LFjJ5uzs7PzJxYu1Gsg7e+OngOQ3985/pGuf2wCvA5wCYivf/nhL3/+dMd/bb3bDaDgN38CZH5+fnZu7mkwyK+Pf4oAPzMBXtPhL+4e/+TJ/wFygM1mrVav1xtHmMzPLyzMNZtH68dfH3+lEyCIogBDDvH5B1mWwoWYcmXSehBiLybn2kXKlcvYi8k/nWvbLb8LDRRnEQCb39W3ppaX77vUWG21G416/QTY4MkDk8c/+PimD/TxtyCSflkA5N3RNBWed3MYSmeKJbWYporUvxWHalhKgTb4Q5el7C/27kTq5zd0HTdpUy0EubHYaMzOnWxObnxw8ce33/7521dxJ4IAUbe+eE+qGC2WRnKoKv5N5L1eb75qdWY435vPa6ZqEe9AqRiNZsojgzFeRio2TDpEHfWi9FqSzxEFahTZ8E+66pcoiceCD7QKR1PJ/qoivcRyQgYLMbNYzGvK6FiuYlHHn7m8TQVvWlHSRpq9MxN+BvDY0XV96tL584vLU1P8kmj5fHt2rjm5/NG4ro8DPwOgQioDHmpI0k+Ysj6W6iHG8IcwmTb6Vk26qCnhkQgxvsvzSjpRxFzULlmikiSVxV2C4VEkfr0p6W0mrxJFvCnLxcI9w4Rr3Ec78kv9YAxmmX56hagadZZhogDA2pT+fq2xttZa29A3tv+YuTylr5+/sAAAb/rsg4tvvQoGaFhgIkxdNJhNj/UGoHgQjQNJuF1uOiDskQxQN40mDCABykoMJ3KD8AiJkGG4XlYsYAMYhVyXuxzoERIoD0J2AHNd0UymGKQUGReHLVMuZDAvEy8kCt4UPOFL8aqHlQtHo6JYD4BHgJALrQSDQbcgkRo0BzbE9MpYGiSHVHUoydKBFHsZDYg3CQT49Tl9o3ZkdXVmbVPf2Fw6s7RWP6VP1WebteNn33uD83uXASSxMIWqIwSlGvTQYATnaBx0c3GACtFK8EmqYszuKIX2Sn7Ci2BxWoZOCIBQzA4QRshD3VhAzg6wJvJEU/1jZQp9pxS5ioGATtF+wiVO8aVPlEuycr1KrDIapsCMplRmgS7qccEo+yORXG8ZyntALb/QOQQl3FCfowyyCgNS4AsAT+mL9Z2lpaWZV9Y39e0zMzOr7WX9XLvZPg743mD8BMAsqjpMVOaAhmkQJiCRAKJqRQpWpRj83FggJZwYpqF72AnlKgAjktuzAHoJkyzrYRA6LFYCF/LjJRhBllYsgINQCNv2eBCMYgAsipbHwminNAzmZAHMEgcvrJI0q7AHKzG98Nf36Zcbq0ura9v6JrA8M7M001jRV2oQxlx86+ab73/5TbwmQYBqhrq44mJ+UDpGVAugAmbJBk/w04o4tp4EfIMCP/JMuQEB0LU7QClXBgjooa4MqyXOaqkCPz5GhtNCC0VoigkwTVQo1s+ei5plgZqA7i/yIYFWZYAO3toCiLaHfw4zgJcA4MwaUBMAW8CydrT2yPUP/Xj217duvOUWboGVIPYuYQDMpcqpuAyQjFKQXmM1QYMVuAxRi/gtYFf2BFAMzAjr4hAzmIxRofltgeWEY0QxLVCgBmyUJmSAYlwT+MaNw9A1wJcAH/CbOAQAF8GH7ADARf3Uhv47A7gFWbPf3Uquu/a26x/64ew3N9/44s8MoAe7bOtdXJBgY+weNt1ZBNSC76uyw+xn8zajkH8DMGQANNaBokokSfFFzA4QKUEiZweIBH3oYtzYQJcAyaMTaIAT049jHPjaazuNnZkz2+vgRYDf0kz7Pn2rDgDZOeF19yDEi2fBC6dY8SE2U+wAh9BV0mKf5R1DkOYThXSYB2Xr6N+ugVCLkCsBqpgSUxhhSUYuDN9s126BHvRPMkC5WT6wFkBVEeJogYzgs8APw5gVffl0u9VaW3nlld/P/DEz0zinr19YmEOA/Je00BKfu42wPkP5VA4R2gAmk/CyJNEiHHe5YwQrYabeCFH34IW9rFMk4sbueyJoVRSZ0HwHwEFjkOQ1UCFD2DLGnRJAIfiSZRWI6uyF7QBBHn10YvpesRO5DzYhp96H7cjm4lqr1bi8Dn55lgHcx84PFH5jQlhchRAHIohQAgh/kIsc0fthwoulyhKxZqWuMoWr/r4Ikz5NAjhKUBIZ/ASh4aIrWMkAc9SDyoSIKnvhNHPCnoQzQKwIRwI
1B8glVMTTwOwJUDuL8Ve49iHvhhfrKug6yvL2uL29uAshT9dmFua8QoPWLl1heCWDQhF1kWwoJIMXcUUjJ/UCAoc7FpERdfH7tDhArEwIxHFFMgKWRoZGhsgv5hXvN1RBw5ToA9gEn4dWSAnwlNwSg4RlROwEscGWzCNCmQUpxAAiz99Ch6UPT04fQAudm6xcurSyeW1vb3mAgt+rzC3MnGUD7pt0bRE1wuLLg52SAOO4+aa87zAfV10mozH1k5W8BetxBN5MgHTUB4h8UtCPWEPpjy7Mawqc49lIApDRcDFMkRsu4QjsCTFA+XUyALlMDZ4D7D7/w1P79+5/aD154sr0wP99oN1qrq63W6e2t0402Hmgd4ADtBCtZA2F4ULZAvoiMWHvK6lUB7r4GFmJ+IdYU9tBMslwuFSlzBimA1h1ASCA+cBE5fNsVQOiI5hdScZzCuKbB/AV55P3F0+1a7cLOzg5E06trjUbrCPI7aQK0I/Rn3UAQDIFmJYCQhwY/gDmyTv1OU7goTeHunUgvJrRCklHzFIzwA9d+GSDiwVXMnMLxXsqyclDCGSCONlO2WyeikIPPwv9/9Mx+jFIeu/7h91fONWrt1pGdVTxQPYH8jjkDJAoixBUF15SQtBfu51STOLWEw/WIEMMSlTuR0lXjwN3DGCIC6XCMb03NOFoOlTDMMZ3IGB5wiODaGaDwRuivuwtjyL5npideOPwExjEi1EOIrVq9cQJO9oGfI0BeHf6tRjnBnLQTyYJWGMoYp0klwQpFds1cvT0H0ipRsXFcHPhsFSGhHUZBCmM0tvsTU2/XMIa6+ojaZSB9+Bn2/tEnxGWkgAjTuQF3SnCgf0AGaBdr/5iVAMIDy8tU+FIdl4Zd9izYub0DxOSAacZleyXoWfhuR5UPE3KUPeWdnQjRokbM2u1OZOIpchBuN8gTZpQiQ6zDVfGB5tN2gJVEX8IvpiJbNaAq+14YG4/2MRdZCcr7VLlzJbL3rZy8IeRBsxgkeZXgzssCqJI8K0JzDmGM6AJXtWuA9/KsCf7DAWJtcrIToMKUSJlJMEHA1nkaM8YJipNWn+ln5ZH2sMD3XwBUyZAYBpAUe0wTpcPIkU7nXhg3muIwxg5QhZVA7FL+gQUefpxFMdwCnSFuPWIDmKAgVaLySQwDzVdq+Tyw4Kb4n6sKX/De4air1qbdLTYnEkBJ7HthFPtWjq+B3L8znTBCsaInUoIMbvcSQIVovFCgA6BolNtstELse2EhTgCnuRwidtlnbX9v7wDI9AnicSiDk/BgXREZICJKhNlI89kQgQSG8lwZleRcAB3TMkBZughjIIkpN36ksC5hG1nzQNWH/Nj+RwZobTZ6iWo7UC0U2Tl9mEfZXe6FD97L5CALBZ0hWiJvkqD/OdZqBvWO24704W+kyAn2sgJFJFaqCE0RLj9wMAEmYxG/KZoZSFfM3IhmAvRpEX+kEM/wM/20aHDU4Ug/xJ5lgMaKgrthwwL7oPrEaJKVpyXpSB+jSFkvpzhQli4hYrzJ2KR6elIUHlBr26US+g5Ei3AxoQ3gh+FQIdI3PMR2e1n5UglvdkwJg9lWoixXzvThAZb1LeVXGOExc9LmmDKp0YQ/kS5TtkWSL5XcDCBKkqVSMK7wU1Tn4TuVqNe6VLLr5c5oEkBxE7ZP2ceFdC3cvqQLxtQwIfZrTUyr4jJxQMWsKk8BUfw3kJDOIK6QNKl0ca0JkgnBeiVt0DO8DYoSDcVs15qwnxYeSmjaRzsk2pPW/u5a062ZL0dZRhnTexJc+3yBUiZT6gkVDFMq9PtCvn60CINgPAQ5vpGcWC3jPRncG2QC3gixvspBMRCfJf0JokFRW2YVj/j6rdxQPJ3DdVhWSqlmy1F2xTsypknvsBxWq1hNQjqmYcOivvxgLtZxsV612hIN5lXLj7IKByUkfwG5Yiz+MoNNoQAAAABJRU5ErkJggg==",alt:"Gå til Skolebordet"}})])])}],!1,null,"7785d264",null);t.a=a.exports},842:function(e,t,n){"use strict";var i={props:{axios:Function,moment:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{aulaToken:null,ready:!1}},methods:{loadUrlsForIntitutions:function(){var e=this,t={headers:{Authorization:this.getAulaToken()}};if(this.institutionFilter.length>0){var n=[];"111111"===this.institutionFilter[0]?(n.push({key:111111,url:"https://demo.eprotokol.dk/iframe_frontend.php?mode=protokol&submode=comp_protokol_parent_interface_report_pupil_absent"}),1===n.length&&window.open(n[0].url,"_blank","height=480,width=480")):this.institutionFilter.forEach((function(i,s){e.axios.get("https://apricore.com/gatekeeper.php/REST/getProtocolAulaData/UrlFromInstNumv2/"+i,t).then((function(t){if("error"===t.data.status)console.log("Noget gik galt, prøv at logge ud og ind igen");else{var a=t.data.data;null!==a?(n.push({key:i,url:"https://"+a+"/iframe_frontend.php?mode=protokol&submode=comp_protokol_parent_interface_report_pupil_absent"}),1===n.length&&window.open(n[0].url,"_blank","height=480,width=480")):(console.log(s),s===e.institutionFilter.length-1&&console.log("E-protokol er ikke i brug på denne skole (skolekode: "+i+")"))}})).catch((function(e){console.log(e)}))}))}else this.axios.get("https://apricore.com/gatekeeper.php/REST/getProtocolAulaData/UrlFromInstNumv2/"+this.institutionFilter[0],t).then((function(e){var t=e.data.data;window.open("https://"+t+"/iframe_frontend.php?mode=protokol&submode=comp_protokol_parent_interface_report_pupil_absent","_blank","height=480,width=480")})).catch((function(e){console.log(e)}))}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){this.ready=void 0!==this.aulaToken}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0065V0001"},[n("div",{attrs:{id:"eProtokol"}},["guardian"===e.userProfile&&e.ready?n("div",[""!==e.institutionFilter[0]?n("div",[n("input",{attrs:{type:"button",value:"Sygemeld barn i E-protokol"},on:{click:e.loadUrlsForIntitutions}})]):n("div",[e._v("E-protokol kan ikke se hvilke skole du eller dit barn er tilknyttet")])]):e._e(
1)])])}),[],!1,null,null,null);t.a=a.exports},843:function(e,t,n){"use strict";var i={props:{axios:Function,moment:Function,sessionUUID:String,placement:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String},data:function(){var e="https://systematic-momo.dk";return{widgetVersion:"1.3",aulaToken:null,urls:{moMoBackendCourses:"https://systematic-momo.dk/api/aula/courses/v1",defaultCourseImage:e+"/assets/images/aula/default-course-image.svg",goToCourseIcon:e+"/assets/images/aula/chevron-right.svg",moMoCoursePageFragment:"#/course/",moMoCoursePageRootUrl:e+"#/course/",moMoCoursePageRootUrlWithQueryParameter:e+"?"},states:{loading:0,displaying:1,failed:2},userProfileTypes:{child:"child",employee:"employee",guardian:"guardian"},model:{usersWithCourses:[],error:"",state:0,hoveringOn:{goToCourseIcon:null}}}},computed:{},methods:{load:function(){this.model.usersWithCourses=[],this.model.error="",[2,3].includes(this.assuranceLevel)?(this.model.state=this.states.loading,this.fetchCourses()):(this.model.state=this.states.failed,this.model.error="Du skal være logget ind for at se forløb.")},isDisplayingCourses:function(){return this.model.state===this.states.displaying},fetchCourses:function(){var e=this;this.axios.get(this.urls.moMoBackendCourses+"?"+this.createChildrenParameter(this.childFilter,this.userProfile)+"&"+this.createTraceParameters(),this.createHeaders()).then((function(t){e.model.usersWithCourses=t.data,e.model.state=e.states.displaying})).catch((function(){e.model.error="Noget gik galt. Prøv igen senere.",e.model.state=e.states.failed}))},createQueryParameter:function(e,t){if(t){var n=t.map((function(e){return e.trim()})).filter((function(e){return!!e}));if(n.length>0)return e+"="+n.join("&"+e+"=")}return""},createChildrenParameter:function(e,t){return t===this.userProfileTypes.guardian?this.createQueryParameter("children",e):""},createTraceParameters:function(){return"widgetVersion="+this.widgetVersion+"&userProfile="+this.userProfile+"&sessionId="+this.sessionUUID+"&"+this.createQueryParameter("institutions",this.institutionFilter)},createHeaders:function(){return{headers:{"Aula-Authorization":"Bearer "+this.aulaToken}}},formatPersonName:function(e){return e?e.split(" ")[0]:"Ukendt person"},formatNames:function(e){return e.join(", ")},arraysDiffer:function(e,t){if(null===e&&null!==t||null===t&&null!==e)return!0;if(null===e&&null===t)return!1;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1},momoCoursePageUrl:function(e){return this.urls.moMoCoursePageRootUrl+e},getCourseLinkId:function(e,t){return"momo_course_link_"+e+"_"+t},setMomoCoursePageUrl:function(e,t){var n="aulaToken="+this.aulaToken+"&momoUserId="+t+"&momoInstitutionId="+e.institutionId+"&userProfile="+this.userProfile,i=this.urls.moMoCoursePageRootUrlWithQueryParameter+n+this.urls.moMoCoursePageFragment+e.id;document.getElementById(this.getCourseLinkId(e.id,t)).href=i},onCourseImageLoadError:function(e){e.image=null}},watch:{childFilter:function(e,t){this.arraysDiffer(e,t)&&void 0!==this.aulaToken&&this.load()},institutionFilter:function(e,t){this.arraysDiffer(e,t)&&void 0!==this.aulaToken&&this.load()},assuranceLevel:function(e,t){e!==t&&void 0!==this.aulaToken&&this.load()},aulaToken:function(){void 0!==this.aulaToken&&this.load()}},created:function(){this.moment.locale("da"),this.aulaToken=this.getAulaToken()},updated:function(){}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"momo-courses"},[e._m(0),e._v(" "),e.model.state===e.states.failed?n("div",[n("div",{staticClass:"momo-message"},[e._v(e._s(e.model.error))])]):e._e(),e._v(" "),n("div",e._l(e.model.usersWithCourses,(function(t){return e.isDisplayingCourses()&&e.model.usersWithCourses.length>0?n("div",{key:t.userName,staticClass:"momo-user-courses"},[e.model.usersWithCourses.length>1?n("div",{staticClass:"momo-child-name"},[e._v("\n        "+e._s(e.formatPersonName(t.userName))+"\n      ")]):e._e(),e._v(" "),e._l(t.courses,(function(i){return n("div",{key:i.id,staticClass:"momo-course"},[n("img",{staticClass:"momo-course-icon",attrs:{src:i.image||e.urls.defaultCourseImage},on:{error:function(t){return e.onCourseImageLoadError(i)}}}),e._v(" "),n("div",{staticClass:"momo-course-text-container"},[n("div",{staticClass:"momo-course-text"},[e._v(e._s(i.title))]),e._v(" "),i.subjects.length>0?n("div",{staticClass:"momo-course-additional-text"},[e._v("\n            "+e._s(e.formatNames(i.subjects))+"\n          ")]):e._e(
1),e._v(" "),n("div",{staticClass:"momo-course-additional-text"},[e._v("\n            "+e._s(e.formatNames(i.teamNames))+"\n          ")])]),e._v(" "),n("a",{staticClass:"momo-icon-button",attrs:{href:e.momoCoursePageUrl(i.id),target:"_blank",id:e.getCourseLinkId(i.id,t.userId)},on:{click:function(n){return e.setMomoCoursePageUrl(i,t.userId)}}},[n("img",{attrs:{height:"25",src:e.urls.goToCourseIcon,alt:">"}})])])})),e._v(" "),0===t.courses.length&&e.userProfile!==e.userProfileTypes.guardian?n("div",[n("div",{staticClass:"momo-message"},[e._v("Du har ingen aktuelle forløb i MoMo.")])]):e._e(),e._v(" "),0===t.courses.length&&e.userProfile===e.userProfileTypes.guardian?n("div",{staticClass:"momo-no-courses-for-user"},[e._v("\n        "+e._s(e.formatPersonName(t.userName))+" har ingen forløb\n      ")]):e._e()],2):e._e()})),0)])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"momo-heading"},[n("div",{staticClass:"momo-heading-text"},[e._v("Forløb")])])}],!1,null,"73198794",null);t.a=a.exports},844:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var c={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:0,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String,moment:Function},data:function(){return{env:"",aulaToken:null,fravaersInfo:[],loading:!1,errorLoading:!1,cachedData:!1,cachedTime:this.moment(new Date),unknownPerson:!1,timeout:!1,collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),fravaerDate:new Date}},methods:{getVikarData:function(e){var t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("string"==typeof e){n.next=2;break}return n.abrupt("return");case 2:i=o(t.institutionFilter);try{for(a=function(){for(var n=s.value,i=-1,a=0;a<t.fravaersInfo.length;a++){if(t.fravaersInfo[a].skoleId===n){i=a;break}}-1!==i&&t.fravaersInfo.splice(i,1),t.fravaersInfo.push({skoleId:n,loading:!0,error:!1}),t.fetchFravaersData(n,e).then((function(e){t.fravaersInfo=t.fravaersInfo.map((function(i){return i.skoleId==n&&(t.sortLists(e),i.navn=e.institutionNavn,i.loading=!1,i.data=e),i}))}),(function(e){t.fravaersInfo=t.fravaersInfo.map((function(t){return t.skoleId==n&&(t.data=null,t.loading=!1,t.error=!0,t.errorMessage=e.response&&e.response.data,e.request&&e.request.status&&"500"==e.request.status&&(t.errorMessage="Noget gik galt da der skulle hentes informationer på denne institution.")),t}))}))},i.s();!(s=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}case 4:case"end":return n.stop()}}),n)})))()},fetchFravaersData:function(e,t){var n=this;return new Promise(function(){var i=s()(r.a.mark((function i(s,a){var o,l;return r.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,o=n.moment(n.fravaerDate).toISOString(),i.next=4,n.axios.get("https://api.ist.dk/tjenestetid/aula/widget/api/v2/institution/".concat(e,"/fraverInfo?date=").concat(o),{headers:{Authorization:"Bearer "+t}});case 4:l=i.sent,s(l.data.data),i.next=11;break;case 8:i.prev=8,i.t0=i.catch(0),a(i.t0);case 11:case"end":return i.stop()}}),i,null,[[0,8]])})));return function(e,t){return i.apply(this,arguments)}}())},formatDateToHours:function(e){return this.moment(e).locale("da").format("H:mm")},backDate:function(){this.fravaerDate=this.addDays(this.fravaerDate,-1)},forwardDate:function(){this.fravaerDate=this.addDays(this.fravaerDate,1)},addDays:function(e,t){var n=new Date(e);return n.setDate(n.getDate()+t),n},sortLists:function(e){var t=this;e&&(e.fravaerendeLaeerere&&(e.fravaerendeLaeerer=e.fravaerendeLaeerere),e.fravaerendeLaeerer.sort((function(e,n){return t.collator.compare(e.betegnelse,n.betegnelse)})),e.laerereMedAendringer.sort((function(e,n){return t.collator.compare(e.betegnelse,n.betegnelse)})),e.klasserMedAku.sort((function(e,n){return t.collator.compare(e.betegnelse,n.betegnelse)})))}},computed:{displayDate:function(){return this.moment(this.fravaerDate).format("Do MMMM")},disableNextDay:function(){return"31. juli"===this.moment(this.fravaerDate).format("Do MMMM")},disablePreviousDay:function(){return"1. august"===this.moment(this.fravaerDate).format("Do MMMM")||this.moment(this.fravaerDate).isSame(this.moment(new Date).subtract(29,"days"),"day")},disableDateSelection:function(){return this.fravaersInfo.some((function(e){return e.loading}))}},created:function(){this.moment.locale("da")},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),setInterval((function(){e.aulaToken=e.getAulaToken()}),275e3)},watch:{fravaerDate:function(){this.getVikarData(this.aulaToken)},aulaToken:function(){this.aulaToken&&this.getVikarData(this.aulaToken)},institutionFilter:function(){var e=this;this.fravaersInfo&&this.fravaersInfo.length&&(this.fravaersInfo=this.fravaersInfo.filter((function(t){return e.institutionFilter.find((function(e){return t.skoleId===e}))}))),this.getVikarData(this.aulaToken)}}},u=c,d=n(3),h=Object(d.a)(u,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0067V0001"},[n("div",[n("h5",[e._v("Dagens fravær")]),e._v(" "),n("div",{staticClass:"df-datepicker"},[n("div",{staticClass:"df-date-button date-back"},[n("b-button",{staticClass:"btn btn-link navbar-btn navbar-link",attrs:{disabled:e.disablePreviousDay||e.disableDateSelection},on:{click:e.backDate}},[n("i",{staticClass:"fas fa-chevron-left"})])],1),e._v(" "),n("div",{staticClass:"df-date"},[e._v("\n        "+e._s(e.displayDate)+"\n      ")]),e._v(" "),n("div",{staticClass:"df-date-button date-forward"},[n("b-button",{staticClass:"btn btn-link navbar-btn navbar-link",attrs:{disabled:e.disableNextDay||e.disableDateSelection},on:{click:e.forwardDate}},[n("i",{staticClass:"fas fa-chevron-right"})])],1)]),e._v(" "),e._l(e.fravaersInfo,(function(t){return n("div",{key:t.skoleId,staticClass:"fravaersWidget"},[n("div",{staticClass:"fravaer-title",class:{titleloading:t.loading,oneSchool:1===e.institutionFilter.length}},[n("h5",[t.loading?n("span",{class:{loading:1===e.institutionFilter.length}}
1,[e._v("Indlæser")]):e._e(),e._v(" "),!t.navn&&e.institutionFilter.length>1?n("span",{class:{loading:t.loading}},[e._v(e._s(t.skoleId))]):e.institutionFilter.length>1?n("span",{class:{loading:t.loading}},[e._v(e._s(t.navn))]):e._e()])]),e._v(" "),!t.error&&t.data?n("div",[n("div",{staticClass:"fravaer-top"},[0!==t.data.fravaerendeLaeerer.length?n("h6",{staticClass:"fat"},[e._v("\n            Fraværende personale\n          ")]):n("span",[e._v("Intet fraværende personale")]),e._v(" "),e._l(t.data.fravaerendeLaeerer,(function(t){return n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.focus:title",value:t.aarsager.join(", "),expression:"info.aarsager.join(', ')",modifiers:{hover:!0,"focus:title":!0}}],key:t.betegnelse,staticClass:"badge badge-pill laererColor",class:{laererTidColor:t.tider.length===t.aarsager.length}},[e._v("\n            "+e._s(t.betegnelse)+"\n            "),t.tider.length===t.aarsager.length?n("span",e._l(t.tider,(function(t){return n("span",{key:t.from+t.to},[e._v("("+e._s(e.formatDateToHours(t.from))+" - "+e._s(e.formatDateToHours(t.to))+")")])})),0):e._e()])}))],2),e._v(" "),n("div",{staticClass:"fravaer-middle"},[0!==t.data.klasserMedAku.length?n("h6",{staticClass:"fat"},[e._v("Anden klasseundervisning")]):n("span",[e._v("Ingen klasser med anden klasseundervisning")]),e._v(" "),e._l(t.data.klasserMedAku,(function(t){return n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.focus",modifiers:{hover:!0,focus:!0}}],key:t.betegnelse,staticClass:"badge badge-pill akuBadge",class:{klasseMedTid:t.tider.length},attrs:{id:"aku-"+t.betegnelse,tabindex:"0",title:t.titler.join("; ")}},[e._v("\n            "+e._s(t.betegnelse)+"\n            "),e._l(t.tider,(function(t){return n("span",{key:t.from},[e._v("("+e._s(e.formatDateToHours(t.from))+" - "+e._s(e.formatDateToHours(t.to))+")")])}))],2)}))],2),e._v(" "),n("div",{staticClass:"fravaer-bottom"},[0!==t.data.laerereMedAendringer.length?n("h6",{staticClass:"fat"},[e._v("\n            Personale med skemaændringer\n          ")]):n("span",[e._v("Intet personale med skemaændringer")]),e._v(" "),e._l(t.data.laerereMedAendringer,(function(t){return n("span",{key:t.name,staticClass:"badge badge-pill changesColor"},[e._v(e._s(t.name||t))])})),e._v(" "),t.data&&t.data.cachedDate?n("div",{staticClass:"cachedTime"},[e._v("\n            Opdateret "+e._s(e.formatDateToHours(t.data.cachedDate))+"\n          ")]):e._e()],2)]):e._e(),e._v(" "),t.errorMessage?n("div",{staticClass:"fravaer-bottom"},[n("span",[e._v("Fejl ved henting af dagens fravær. Besked:")]),e._v("\n        "+e._s(t.errorMessage)+"\n      ")]):e._e()])}))],2)])}),[],!1,null,null,null);t.a=h.exports},845:function(e,t,n){"use strict";var i=n(17),s=n.n(i),a={props:{axios:Function,moment:Function,sessionUUID:String,placement:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String,language:String,systematic:Object},data:function(){var e=this.systematic&&this.systematic.moMoFrontendUrl?this.systematic.moMoFrontendUrl:"https://systematic-momo.dk",t=this.systematic&&this.systematic.moMoFrontendUrl?this.systematic.moMoFrontendUrl:"https://systematic-momo.dk",n="".concat(e,"/api/aula/links/").concat("v3");return{widgetVersion:"1.12",aulaToken:null,urls:{categoriesForDisplayUrl:"".concat(n,"/categories"),editableContentUrl:"".concat(n,"/editable-content"),categoryUrl:"".concat(n,"/category"),linkMetadataUrl:"".concat(n,"/link-metadata"),moMoBackendRootUrl:e,editIcon:t+"/assets/images/aula/pen-no-opacity.svg",closeIcon:t+"/assets/images/aula/cross.svg",successIcon:t+"/assets/images/aula/check-mark-in-circle.svg",failureIcon:t+"/assets/images/aula/exclamation-mark-in-circle.svg",addLinkIcon:t+"/assets/images/aula/plus-in-square.svg",removeLinkIcon:t+"/assets/images/aula/cross-in-red-circle.svg",editLinkIcon:t+"/assets/images/aula/pencil-in-blue-circle.svg",searchFieldIcon:t+"/assets/images/aula/search.svg",placeHolderImageIcon:t+"/assets/images/aula/placeholder-image-on-grey-background.svg",placeHolderImageOnWhiteBackgroun
1dIcon:t+"/assets/images/aula/placeholder-image-on-white-background.svg"},states:{loading:0,displaying:1,failed:2,listingEditableCategories:3,creatingCategory:4,editingCategory:5,creatingLink:6,editingLink:7},userProfileTypes:{child:"child",employee:"employee",guardian:"guardian"},organisationalUnitTypes:{administrativeUnit:0,institution:1,team:2},audienceTypes:{EMPLOYEES:"EMPLOYEES",STUDENTS:"STUDENTS",PARENTS:"PARENTS"},model:{categoryToAddLinkTo:null,categoryForm:null,linkForm:null,categoriesForDisplay:[],categoriesForEdit:[],error:"",state:0,stackedState:null,organisationalUnits:{administrativeUnits:{label:"",items:[]},institutions:[]},statusBanner:{doDisplay:!1,text:"",icon:null,success:!0}},TEXT:{DA:{CREATE_CATEGORY:"Opret kategori",EDIT_CATEGORY:"Rediger kategori",LINKS:"Links",CATEGORIES:"Kategorier",CREATE_LINK:"Opret link",EDIT_LINK:"Rediger link",GENERAL_ERROR_BANNER_TEXT:"Der er desværre opstået en fejl",LOGGED_IN_REQUIRED:"Du skal være logget ind for at se links.",SOMETHING_WENT_WRONG:"Noget gik galt. Prøv igen senere.",ADDED:"er tilføjet",UPDATED:"er opdateret",REMOVED:"fjernet",ADDED_TO:"tilføjet til",NEW_CATEGORY:"Opret ny kategori",SAVE:"Gem",CANCEL:"Annuller",EXAMPLE:"Eksempel",SSO_LINK:"Single sign-on link",SSO_CHECK_MESSAGE:"Skal som udgangspunkt ikke markeres. Marker kun, hvis linket understøtter single sign-on.",INSERT_PICTURE_MESSAGE:"Indsæt evt. webadresse på billede...",LINK_ELLIPSIS:"Link...",NAME_ELLIPSIS:"Titel...",SEARCH_LINK_ELLIPSIS:"Søg efter link...",CREATE_NEW_LINK:"Opret nyt link",CREATE:"Opret",UPDATE:"Opdater",DELETE:"Slet",TARGET_GROUP:"Målgruppe",PARENTS:"Forældre",STUDENTS:"Elever",EMPLOYEES:"Medarbejdere",RECIPIENTS:"Modtagere",PENCIL:"Tryk på blyanten oppe i højre hjørne for at tilføje links eller kategorier",NO_LINKS:"Ingen links..",ADMINISTRATIVE_UNITS:"Kommuner",ALL_OF:"Hele",YOU_DO_NOT_HAVE_THE_RIGHT_TO_REMOVE:"Du har ikke ret til at fjerne",DELETE_LINK:"Fjern link",EDIT_CATEGORIES:"Rediger kategorier",CLOSE:"Afslut redigering",EXAMPLE_LINK_ICON:"Link ikon"},EN:{CREATE_CATEGORY:"Create category",EDIT_CATEGORY:"Edit category",LINKS:"Links",CATEGORIES:"Categories",CREATE_LINK:"Create link",EDIT_LINK:"Edit link",GENERAL_ERROR_BANNER_TEXT:"Unfortunately, an error has occurred",LOGGED_IN_REQUIRED:"You need to be logged in to see links.",SOMETHING_WENT_WRONG:"Something went wrong. Try again later.",ADDED:"has been added",UPDATED:"has been updated",REMOVED:"removed",ADDED_TO:"added to",NEW_CATEGORY:"Create new category",SAVE:"Save",CANCEL:"Cancel",EXAMPLE:"Example",SSO_LINK:"Single sign-on link",SSO_CHECK_MESSAGE:"Should not be checked by default. Check only if the link supports single sign-on.",INSERT_PICTURE_MESSAGE:"Optionally insert a web address to a picture...",LINK_ELLIPSIS:"Link...",NAME_ELLIPSIS:"Title...",SEARCH_LINK_ELLIPSIS:"Search for link...",CREATE_NEW_LINK:"Create new link",CREATE:"Create",UPDATE:"Update",DELETE:"Delete",TARGET_GROUP:"Target audience",PARENTS:"Parents",STUDENTS:"Students",EMPLOYEES:"Employees",RECIPIENTS:"Recipients",PENCIL:"Press the pencil in the upper right corner to add links or categories",NO_LINKS:"No links...",ADMINISTRATIVE_UNITS:"Municipalities",ALL_OF:"All of",YOU_DO_NOT_HAVE_THE_RIGHT_TO_REMOVE:"You do not have the right to remove",DELETE_LINK:"Remove link",EDIT_CATEGORIES:"Edit categories",CLOSE:"Close edit mode",EXAMPLE_LINK_ICON:"Link icon"}}}},computed:{LANG:function(){return this.language&&"EN"===this.language.toUpperCase()?this.language.toUpperCase():"DA"}},methods:{load:function(){this.model.categoriesForDisplay=[],this.model.categoriesForEdit=[],this.resetTargetOrganisationalUnits(),this.model.error="",[2,3].includes(this.assuranceLevel)?(this.model.state=this.states.loading,this.fetchCategoriesForDisplay(this.states.displaying),this.userProfile===this.userProfileTypes.employee&&this.fetchEditableContent(this.states.displaying)):(this.model.state=this.states.failed,this.model.error=this.TEXT[this.LANG].LOGGED_IN_REQUIRED)},openListingEditableCategoriesView:function(){this.model.state=this.states.listingEditableCategories},openEditCategoryView:function(e){this.model.categoryForm={category:e,name:e.name,audienceEmployees:e.audience.includes(this.audienceTypes.EMPLOYEES),audienceStudents:e.audience.includes(this.audienceTypes.STUDENTS),audienceParents:e.audience.includes(this.audienceTypes.PARENTS),associatedOrganisationalUnits:this.getAssociatedOrganisationalUnits(e.administrationIds,e.institutionIds,e.teamIds)},this.model.state=this.states.editingCategory},resetCategoryForm:function(){this.model.categoryForm={category:{id:null,name:"",audience:[],administrationIds:[],institutionIds:[],teamIds:[],links:[]},name:"",audienceEmployees:!1,audienceStudents:!1,audienceParents:!1,associatedOrganisationalUnits:[]}},openCreateCategoryView:function(){this.resetCategoryForm(),this.model.state=this.states.creatingCategory},closeCurrentView:function(){this.resetCategoryForm(),this.model.state===this.states.listingEditableCategories?this.load():this.openListingEditableCategoriesView()},openCreateLinkView:function(e){this.model.categoryToAddLinkTo=e,this.model.linkForm={url:"",name:"",imageUrl:"",sso:!1},this.model.stackedState=this.model.state,this.model.state=this.states.creatingLink},openEditLinkView:function(e,t){this.model.categoryToAddLinkTo=e,this.model.linkForm={id:t.
1id,url:t.url,name:t.name,imageUrl:t.imageUrl,sso:t.sso},this.model.stackedState=this.model.state,this.model.state=this.states.editingLink},cancelCreatingLink:function(){this.model.linkForm=null,this.model.state=this.model.stackedState,this.model.stackedState=null},fetchCategoriesForDisplay:function(e){var t=this;this.axios.get(this.urls.categoriesForDisplayUrl+"?"+this.createTraceParameters(),this.createHeaders()).then((function(n){t.model.categoriesForDisplay=n.data,t.model.state=e})).catch((function(){t.model.error=t.TEXT[t.LANG].SOMETHING_WENT_WRONG,t.model.state=t.states.failed}))},fetchEditableContent:function(e){var t=this;this.axios.get(this.urls.editableContentUrl+"?"+this.createTraceParameters(),this.createHeaders()).then((function(n){t.setCategoriesForEdit(n.data.categories),t.setOrganisationalUnits(n.data.targetOrganisationalUnits,n.data.nonTargetOrganisationalUnits),t.model.state=e})).catch((function(){t.model.error=t.TEXT[t.LANG].SOMETHING_WENT_WRONG,t.model.state=t.states.failed}))},createQueryParameter:function(e,t){if(t){var n=t.map((function(e){return e.trim()})).filter((function(e){return!!e}));if(n.length>0)return e+"="+n.join("&"+e+"=")}return""},createTraceParameters:function(){return"widgetVersion="+this.widgetVersion+"&userProfile="+this.userProfile+"&sessionId="+this.sessionUUID+"&"+this.createQueryParameter("institutions",this.institutionFilter)},createHeaders:function(){return{headers:{"Aula-Authorization":"Bearer "+this.aulaToken}}},submitCategoryForm:function(){var e=this;this.model.state===this.states.creatingCategory?this.axios.post(this.urls.categoryUrl+"?"+this.createTraceParameters(),this.createCategoryPayload(),this.createHeaders()).then((function(t){e.model.categoriesForEdit.push(t.data),e.model.categoriesForEdit=e.sortByName(e.model.categoriesForEdit),e.openEditCategoryView(t.data),e.displayBanner(!0,"".concat(t.data.name," ").concat(e.TEXT[e.LANG].ADDED))})).catch((function(){e.displayBanner(!1,e.TEXT[e.LANG].GENERAL_ERROR_BANNER_TEXT)})):this.model.state===this.states.editingCategory&&this.axios.put(this.urls.categoryUrl+"/"+this.model.categoryForm.category.id+"?"+this.createTraceParameters(),this.createCategoryPayload(),this.createHeaders()).then((function(t){e.model.categoriesForEdit=e.model.categoriesForEdit.filter((function(e){return e.id!==t.data.id})),e.model.categoriesForEdit.push(t.data),e.model.categoriesForEdit=e.sortByName(e.model.categoriesForEdit),e.model.state=e.states.listingEditableCategories,e.resetCategoryForm(),e.displayBanner(!0,"".concat(t.data.name," ").concat(e.TEXT[e.LANG].UPDATED))}
1)).catch((function(){e.displayBanner(!1,e.TEXT[e.LANG].GENERAL_ERROR_BANNER_TEXT)}))},deleteCategory:function(){var e=this;if(this.model.state===this.states.editingCategory){var t=this.model.categoryForm.category.id,n=this.model.categoryForm.name;this.axios.delete(this.urls.categoryUrl+"/"+t+"?"+this.createTraceParameters(),this.createHeaders()).then((function(){e.model.categoriesForDisplay=e.model.categoriesForDisplay.filter((function(e){return e.id!==t})),e.model.categoriesForEdit=e.model.categoriesForEdit.filter((function(e){return e.id!==t})),e.model.state=e.states.listingEditableCategories,e.resetCategoryForm(),e.displayBanner(!0,"".concat(n," ").concat(e.TEXT[e.LANG].REMOVED))})).catch((function(){e.displayBanner(!1,e.TEXT[e.LANG].GENERAL_ERROR_BANNER_TEXT)}))}},submitLinkForm:function(){var e=this;this.model.state===this.states.creatingLink?this.axios.post(this.urls.categoryUrl+"/"+this.model.categoryToAddLinkTo.id+"/link?"+this.createTraceParameters(),this.createPostPutBodyForALink(),this.createHeaders()).then((function(t){var n=e.model.categoriesForEdit.find((function(t){return t.id===e.model.categoryToAddLinkTo.id})),i=e.model.categoriesForDisplay.find((function(t){return t.id===e.model.categoryToAddLinkTo.id}));n.links.push(t.data),n.links=e.sortByName(n.links),i&&(i.links.push(t.data),i.links=e.sortByName(i.links)),e.model.state=e.model.stackedState,e.model.stackedState=null,e.displayBanner(!0,"".concat(t.data.name," ").concat(e.TEXT[e.LANG].ADDED_TO," ").concat(e.model.categoryToAddLinkTo.name))})).catch((function(t){e.displayBanner(!1,e.TEXT[e.LANG].GENERAL_ERROR_BANNER_TEXT)})):this.model.state===this.states.editingLink&&this.axios.put(this.urls.categoryUrl+"/"+this.model.categoryToAddLinkTo.id+"/link/"+this.model.linkForm.id+"?"+this.createTraceParameters(),this.createPostPutBodyForALink(),this.createHeaders()).then((function(t){var n=e.model.categoriesForEdit.find((function(t){return t.id===e.model.categoryToAddLinkTo.id})),i=e.model.categoriesForDisplay.find((function(t){return t.id===e.model.categoryToAddLinkTo.id}));e.updateLink(n,e.model.linkForm.id,t.data),i&&e.updateLink(i,e.model.linkForm.id,t.data),e.model.state=e.model.stackedState,e.model.stackedState=null,e.displayBanner(!0,"".concat(t.data.name," ").concat(e.TEXT[e.LANG].UPDATED))}
1)).catch((function(t){e.displayBanner(!1,e.TEXT[e.LANG].GENERAL_ERROR_BANNER_TEXT)}))},updateLink:function(e,t,n){var i=e.links.find((function(e){return e.id===t}));i.name=n.name,i.url=n.url,i.imageUrl=n.imageUrl,i.sso=n.sso,e.links=this.sortByName(e.links)},removeLinkFromCategory:function(e,t){var n=this;this.axios.delete(this.urls.categoryUrl+"/"+e.id+"/link/"+t.id+"?"+this.createTraceParameters(),this.createHeaders()).then((function(){var i=n.model.categoriesForEdit.find((function(t){return t.id===e.id})),s=n.model.categoriesForDisplay.find((function(t){return t.id===e.id}));i.links=i.links.filter((function(e){return e.id!==t.id})),s&&(s.links=s.links.filter((function(e){return e.id!==t.id}))),n.displayBanner(!0,"".concat(t.name," ").concat(n.TEXT[n.LANG].REMOVED))})).catch((function(){n.displayBanner(!1,n.TEXT[n.LANG].GENERAL_ERROR_BANNER_TEXT)}))},createPostPutBodyForALink:function(){return{name:this.model.linkForm.name,url:this.addHypertextProtocolPrefix(this.model.linkForm.url),imageUrl:this.model.linkForm.imageUrl,sso:this.model.linkForm.sso}},addHypertextProtocolPrefix:function(e){return e.startsWith("http://")||e.startsWith("https://")||!e.startsWith("www.")&&-1===e.search("\\.")||(e="https://"+e),e},createCategoryPayload:function(){var e=[];return this.model.categoryForm.audienceEmployees&&e.push(this.audienceTypes.EMPLOYEES),this.model.categoryForm.audienceStudents&&e.push(this.audienceTypes.STUDENTS),this.model.categoryForm.audienceParents&&e.push(this.audienceTypes.PARENTS),{name:this.model.categoryForm.name,audience:e,administrationIds:this.getAssociatedAdministrationIds(),institutionIds:this.getAssociatedInstitutionIds(),teamIds:this.getAssociatedTeamIds()}},getAssociatedAdministrationIds:function(){var e=this;return this.model.categoryForm.associatedOrganisationalUnits.filter((function(t){return t.type===e.organisationalUnitTypes.administrativeUnit})).map((function(e){return e.id}))},getAssociatedInstitutionIds:function(){var e=this;return this.model.categoryForm.associatedOrganisationalUnits.filter((function(t){return t.type===e.organisationalUnitTypes.institution})).map((function(e){return e.id}))},getAssociatedTeamIds:function(){var e=this;return this.model.categoryForm.associatedOrganisationalUnits.filter((function(t){return t.type===e.organisationalUnitTypes.team})).map((function(e){return e.id}))},getLinkMetadata:function(){var e=this;this.axios.get(this.urls.linkMetadataUrl+"?"+this.createTraceParameters()+"&link="+encodeURIComponent(this.addHypertextProtocolPrefix(this.model.linkForm.url)),this.createHeaders()).then((function(t){200===t.status&&(e.model.linkForm.name=e.model.linkForm.name&&e.model.linkForm.name.length>0?e.model.linkForm.name:t.data.title,!t.data.image.optimizedUrl||!t.data.image.url||e.model.linkForm.imageUrl&&e.model.linkForm.imageUrl.length>0||(t.data.image.optimizedUrl===t.data.image.url?e.model.linkForm.imageUrl=t.data.image.optimizedUrl:e.model.linkForm.imageUrl="".concat(e.urls.moMoBackendRootUrl).concat(t.data.image.optimizedUrl)))}))},setCategoriesForEdit:function(e){this.model.categoriesForEdit=e},resetTargetOrganisationalUnits:function(){var e={targetAdministrativeUnits:[],targetInstitutions:[],targetTeams:[]};this.setOrganisationalUnits(e,e)},setOrganisationalUnits:function(e,t){this.model.organisationalUnits.administrativeUnits=this.targetAdministrativeUnits(e.targetAdministrativeUnits,t.targetAdministrativeUnits),this.model.organisationalUnits.institutions=this.targetInstitutions(e.targetInstitutions,t.targetInstitutions,e.targetTeams,t.targetTeams)},targetAdministrativeUnits:function(e,t){var n=this;return{label:this.TEXT[this.LANG].ADMINISTRATIVE_UNITS,items:[].concat(s()(e.map((function(e){return n.makeAdministrativeUnitItem(e,!1)}))),s()(t.map((function(e){return n.makeAdministrativeUnitItem(e,!0)}))))}},makeAdministrativeUnitItem:function(e,t){return{id:e.id,key:this.uniqueKey(this.organisationalUnitTypes.administrativeUnit,e.id),name:e.name,type:this.organisationalUnitTypes.administrativeUnit,disabled:t}},targetInstitutions:function(e,t,n,i){var a=this,r=this.removeDuplicates([].concat(s()(e.map((function(e){return a.makeInstitutionGroupFromInstitution(e)}))),s()(t.map((function(e){return a.makeInstitutionGroupFromInstitution(e)}))),s()(n.map((function(e){return a.makeInstitutionGroupFromTeam(e)}))),s()(i.map((function(e){return a.makeInstitutionGroupFromTeam(e)})))));return r.forEach((function(s){a.addInstitutionItem(s,e,!1),a.addInstitutionItem(s,t,!0),a.addTeamItems(s,n,!1),a.addTeamItems(s,i,!0)})),r},makeInstitutionGroupFromInstitution:function(e){return{id:e.id,key:this.uniqueKey(this.organisationalUnitTypes.institution,e.id),name:e.name,items:[]}},makeInstitutionGroupFromTeam:function(e){return{id:e.institutionId,key:this.uniqueKey(this.organisationalUnitTypes.institution,e.institutionId),name:e.institutionName,items:[]}},addInstitutionItem:function(e,t,n){t.find((function(t){return t.id===e.id}))&&e.items.push({id:e.id,key:this.uniqueKey(this.organisationalUnitTypes.institution,e.id),name:"".concat(this.TEXT[this.LANG].ALL_OF," ").concat(e.name),type:this.organisationalUnitTypes.institution,disabled:n})},addTeamItems:function(e,t,n){var i=this;t.forEach((function(t){t.institutionId===e.id&&e.items.push({id:t.id,key:i.uniqueKey(i.organisationalUnitTypes.team,t.id),name:t.name,type:i.organisationalUnitTypes.team,disabled:n})}))},uniqueKey:function(e,t){return"".concat(e,":").concat(t)},removeDuplicates:function(e){var t=[];return e.forEach((function(e){t.find((function(t){return t.id===e.id}
1))||t.push(e)})),t},getAssociatedOrganisationalUnits:function(e,t,n){var i=this;return[].concat(s()(this.model.organisationalUnits.administrativeUnits.items.filter((function(t){return e.includes(t.id)}))),s()(this.model.organisationalUnits.institutions.flatMap((function(e){return e.items})).filter((function(e){return e.type===i.organisationalUnitTypes.institution&&t.includes(e.id)||e.type===i.organisationalUnitTypes.team&&n.includes(e.id)}))))},getSsoAulaTokenParameterElementId:function(e,t){return"moMoSsoAulaTokenParameterElement-".concat(e,"-").concat(t)},setSsoAulaTokenParameterValue:function(e,t){document.getElementById(this.getSsoAulaTokenParameterElementId(e,t)).value=this.aulaToken},sortByName:function(e){return e.sort((function(e,t){return e.name.localeCompare(t.name)}))},associatedOrganisationalUnitRemoved:function(e){var t=this.getAssociatedAdministrationIds(),n=this.getAssociatedInstitutionIds(),i=this.getAssociatedTeamIds();if(e.disabled)switch(this.displayBanner(!1,"".concat(this.TEXT[this.LANG].YOU_DO_NOT_HAVE_THE_RIGHT_TO_REMOVE," ").concat(e.name)),e.type){case this.organisationalUnitTypes.administrativeUnit:t.push(e.id);break;case this.organisationalUnitTypes.institution:n.push(e.id);break;case this.organisationalUnitTypes.team:i.push(e.id)}this.model.categoryForm.associatedOrganisationalUnits=this.getAssociatedOrganisationalUnits(t,n,i)},administrativeUnitItemsForSelector:function(e,t){return e.filter((function(e){return!e.disabled||t.administrationIds.includes(e.id)}
1))},institutionsWithItemsForSelector:function(e,t){var n=this;return e.filter((function(e){return n.institutionOrTeamItemsForSelector(e.items,t).length>0}))},institutionOrTeamItemsForSelector:function(e,t){var n=this;return e.filter((function(e){return!e.disabled||e.type===n.organisationalUnitTypes.institution&&t.institutionIds.includes(e.id)||e.type===n.organisationalUnitTypes.team&&t.teamIds.includes(e.id)}))},displayHeaderText:function(){switch(this.model.state){case this.states.displaying:case this.states.failed:case this.states.loading:return this.TEXT[this.LANG].LINKS;case this.states.listingEditableCategories:return this.TEXT[this.LANG].CATEGORIES;case this.states.creatingCategory:return this.TEXT[this.LANG].CREATE_CATEGORY;case this.states.editingCategory:return this.TEXT[this.LANG].EDIT_CATEGORY;case this.states.creatingLink:return this.TEXT[this.LANG].CREATE_LINK;case this.states.editingLink:return this.TEXT[this.LANG].EDIT_LINK}},categoryFormHasValidInput:function(){return""!==this.model.categoryForm.name&&this.model.categoryForm.associatedOrganisationalUnits.length>0&&(this.model.categoryForm.audienceEmployees||this.model.categoryForm.audienceStudents||this.model.categoryForm.audienceParents)},linkFormHasValidInput:function(){return""!==this.model.linkForm.url&&""!==this.model.linkForm.name},canEdit:function(){return this.hasTargetAdministrativeUnits()||this.hasTargetInstitutionsOrTeams()},canDeleteCategory:function(){var e=this;return this.model.state===this.states.editingCategory&&this.model.categoryForm.category.administrationIds.every((function(t){return e.model.organisationalUnits.administrativeUnits.items.find((function(e){return e.id===t&&!e.disabled}))}))&&this.model.categoryForm.category.institutionIds.every((function(t){return e.model.organisationalUnits.institutions.flatMap((function(e){return e.items})).find((function(n){return n.type===e.organisationalUnitTypes.institution&&n.id===t&&!n.disabled}))}))&&this.model.categoryForm.category.teamIds.every((function(t){return e.model.organisationalUnits.institutions.flatMap((function(e){return e.items})).find((function(n){return n.type===e.organisationalUnitTypes.team&&n.id===t&&!n.disabled}))}))},isEditing:function(){return[this.states.listingEditableCategories,this.states.creatingCategory,this.states.editingCategory,this.states.creatingLink,this.states.editingLink].includes(this.model.state)},isDisplaying:function(){return[this.states.displaying,this.states.failed,this.states.loading].includes(this.model.state)},displayImageOrPlaceholderImage:function(e){return e||this.urls.placeHolderImageIcon},displayImageOrPlaceholderImageOnWhitebackground:function(e){return e||this.urls.placeHolderImageOnWhiteBackgroundIcon},displayPlaceholderImageOnWhitebackground:function(e){e.target.src=this.urls.placeHolderImageOnWhiteBackgroundIcon},displayPlaceholderImageOnError:function(e){e.target.src=this.urls.placeHolderImageIcon},hasCategoriesForDisplay:function(){return this.model.categoriesForDisplay.filter((function(e){return e.links.length>0})).length>0},displayBanner:function(e,t){this.model.statusBanner.text=t,this.changeBannerState(e)},changeBannerState:function(e){var t=this;this.model.statusBanner.icon=e?this.urls.successIcon:this.urls.failureIcon,this.model.statusBanner.success=e,this.model.statusBanner.doDisplay=!0,setTimeout((function(){t.model.statusBanner.doDisplay=!1}),3e3)},hasTargetAdministrativeUnits:function(){return this.model.organisationalUnits.administrativeUnits.items.length>0},hasTargetInstitutionsOrTeams:function(){return this.model.organisationalUnits.institutions.length>0},formatAudience:function(e){var t=this;return e.audience.map((function(e){return t.TEXT[t.LANG][e]})).join(", ")},formatOrganisationalUnits:function(e){return this.getAssociatedOrganisationalUnits(e.administrationIds,e.institutionIds,e.teamIds).map((function(e){return e.name})).join(", ")},arraysDiffer:function(e,t){if(null===e&&null!==t||null===t&&null!==e)return!0;if(null===e&&null===t)return!1;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}},watch:{childFilter:function(e,t){this.arraysDiffer(e,t)&&void 0!==this.aulaToken&&this.load()},institutionFilter:function(e,t){this.arraysDiffer(e,t)&&void 0!==this.aulaToken&&this.load()},assuranceLevel:function(e,t){e!==t&&void 0!==this.aulaToken&&this.load()},aulaToken:function(){void 0!==this.aulaToken&&this.load()}},created:function(){this.moment.locale("da"),this.aulaToken=this.getAulaToken()},updated:function(){}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"momo-links momo-containing-block"},[n("div",{staticClass:"momo-links-heading"},[n("div",{staticClass:"momo-links-heading-text"},[e._v(e._s(e.displayHeaderText()))]),e._v(" "),e.isDisplaying()&&e.canEdit()?n("img",{staticClass:"momo-links-edit-button",attrs:{src:e.urls.editIcon,alt:e.TEXT[e.LANG].EDIT_CATEGORIES},on:{click:function(t){return e.openListingEditableCategoriesView()}}}
1):e._e(),e._v(" "),e.isEditing()?n("img",{staticClass:"momo-links-edit-button",attrs:{src:e.urls.closeIcon,alt:e.TEXT[e.LANG].CLOSE},on:{click:function(t){return e.closeCurrentView()}}}):e._e()]),e._v(" "),n("transition",{attrs:{name:"fade"}},[n("div",{staticClass:"banner-container-centered"},[e.model.statusBanner.doDisplay?n("div",{staticClass:"momo-links-status-banner",class:{"momo-links-status-banner-success":e.model.statusBanner.success,"momo-links-status-banner-failure":!e.model.statusBanner.success}},[n("div",{staticClass:"momo-links-status-banner-text"},[e._v(e._s(e.model.statusBanner.text))]),e._v(" "),n("img",{attrs:{height:"26",src:e.model.statusBanner.icon,alt:e.model.statusBanner.text}})]):e._e()])]),e._v(" "),e.model.state===e.states.failed?n("div",[n("div",{staticClass:"momo-links-error-message"},[e._v(e._s(e.model.error))])]):e._e(),e._v(" "),e.model.state!==e.states.displaying||e.hasCategoriesForDisplay()?e._e():n("div",{staticClass:"momo-links-no-categories"},[n("div",[e._v(e._s(e.TEXT[e.LANG].NO_LINKS))]),e._v(" "),e.userProfile===e.userProfileTypes.employee?n("div",{staticClass:"momo-links-employee-text"},[e._v("\n      "+e._s(e.TEXT[e.LANG].PENCIL)+"\n    ")]):e._e()]),e._v(" "),e.model.state===e.states.displaying&&e.hasCategoriesForDisplay()?n("div",e._l(e.model.categoriesForDisplay.filter((function(e){return e.links.length>0})),(function(t,i){return n("div",{key:t.id,class:{"momo-links-category-container-top-border":0!==i}},[n("div",{staticClass:"momo-links-category-title"},[e._v(e._s(t.name))]),e._v(" "),n("div",{staticClass:"momo-links-links-grid"},e._l(t.links,(function(t){return n("div",{key:t.id,staticClass:"momo-links-link"},[e.systematic||!t.sso?n("a",{staticClass:"momo-links-icon-and-text",attrs:{href:t.url,target:"_blank"}},[n("img",{staticClass:"momo-links-icon",attrs:{src:e.displayImageOrPlaceholderImage(t.imageUrl),alt:t.name},on:{error:e.displayPlaceholderImageOnError}}),e._v(" "),n("div",{staticClass:"momo-tooltip"},[n("span",{staticClass:"momo-tooltiptext momo-link-tooltiptext"},[e._v(e._s(t.name))]),e._v(" "),n("div",{staticClass:"momo-links-icon-text"},[e._v(e._s(t.name))])])]):e._e(),e._v(" "),!e.systematic&&t.sso?n("form",{attrs:{action:t.url,target:"_blank",method:"post"}},[n("input",{attrs:{hidden:"",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{hidden:"",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{hidden:"",name:"aulaToken",id:e.getSsoAulaTokenParameterElementId(e.model.state,t.id)}}),e._v(" "),n("button",{staticClass:"momo-links-sso-button momo-links-icon-and-text",attrs:{type:"submit"},on:{click:function(n){return e.setSsoAulaTokenParameterValue(e.model.state,t.id)}}},[n("img",{staticClass:"momo-links-icon",attrs:{src:e.displayImageOrPlaceholderImage(t.imageUrl),alt:t.name},on:{error:e.displayPlaceholderImageOnError}}),e._v(" "),n("div",{staticClass:"momo-tooltip"},[n("span",{staticClass:"momo-tooltiptext momo-link-tooltiptext"},[e._v(e._s(t.name))]),e._v(" "),n("div",{staticClass:"momo-links-icon-text"},[e._v(e._s(t.name))])])])]):e._e()])})),0)])})),0):e._e(),e._v(" "),e.model.state===e.states.listingEditableCategories?n("div",[n("div",{staticClass:"momo-links-create-category-button-container"},[n("button",{staticClass:"momo-links-create-category-button",on:{click:function(t){return e.openCreateCategoryView()}}},[e._v(e._s(e.TEXT[e.LANG].NEW_CATEGORY)+"\n      ")])]),e._v(" "),e._l(e.model.categoriesForEdit,(function(t){return n("div",{key:t.id,staticClass:"momo-category-for-edit-block",on:{click:function(n){return e.openEditCategoryView(t)}}},[n("div",{staticClass:"momo-category-for-edit-container"},[n("div",[n("p",{staticClass:"momo-category-for-edit-heading"},[e._v(e._s(t.name))]),e._v(" "),n("p",{staticClass:"momo-category-for-edit-text"},[e._v(e._s(e.formatAudience(t)))]),e._v(" "),n("p",{staticClass:"momo-category-for-edit-text"},[e._v(e._s(e.formatOrganisationalUnits(t)))])]),e._v(" "),n("img",{staticClass:"momo-links-edit-button",attrs:{src:e.urls.editIcon,alt:e.TEXT[e.LANG].EDIT_CATEGORY},on:{click:function(n){return e.openEditCategoryView(t)}}})])])}))],2):e._e(),e._v(" "),e.model.state===e.states.creatingCategory||e.model.state===e.states.editingCategory?n("div",{staticClass:"momo-links-category-form"},[n("div",{staticClass:"momo-links-wrapper-with-padding"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.categoryForm.name,expression:"model.categoryForm.name"}],staticClass:"momo-links-input",attrs:{type:"text",minlength:"1",placeholder:e.TEXT[e.LANG].NAME_ELLIPSIS},domProps:{value:e.model.categoryForm.name},on:{input:function(t){t.target.composing||e.$set(e.model.categoryForm,"name",t.target.value)}}})]),e._v(" "),n("p",{staticClass:"momo-links-target-group-header"},[e._v(e._s(e.TEXT[e.LANG].RECIPIENTS))]),e._v(" "),n("div",{staticClass:"momo-links-form-button-container"},[n("button",{staticClass:"momo-audience-button",class:{active:e.model.categoryForm.audienceEmployees},on:{click:function(t){e.model.categoryForm.audienceEmployees=!e.model.categoryForm.audienceEmployees}}},[e._v(e._s(e.TEXT[e.LANG].EMPLOYEES)+"\n      ")]),e._v(" "),n("button",{staticClass:"momo-audience-button",class:{active:e.model.categoryForm.audienceStudents},on:{click:function(t){e.model.categoryForm.audienceStudents=!e.model.categoryForm.audienceStudents}}},[e._v(e._s(e.TEXT[e.LANG].STUDENTS)+"\n      ")]),e._v(" "),n("button",{staticClass:"momo-audience-button",class:{active:e.model.categoryForm.audienceParents},on:{click:function(t){e.model.categoryForm.audienceParents=!e.model.categoryForm.audienceParents}}},[e._v(e._s(e.TEXT[e.LANG].PARENTS)+"\n      ")])]),e._v(" "),n("div",{staticClass:"momo-links-wrapper-with-padding"},[n("el-select",{attrs:{multiple:"","value-key":"key",placeholder:e.TEXT[e.LANG].TARGET_GROUP,"popper-append-to-body":!1,"popper-class":"momo-links-select-target-groups-dropdown"},on:{"remove-tag":e.associatedOrganisationalUnitRemoved},model:{value:e.model.categoryForm.associatedOrganisationalUnits,callback:function(t){e.$set(e.model.categoryForm,"associatedOrganisationalUnits",t)},expression:"model.categoryForm.associatedOrganisationalUnits"}},[e.administrativeUnitItemsForSelector(e.model.organisationalUnits.administrativeUnits.items,e.model.categoryForm.category).length>0?n("el-option-group",{attrs:{label:e.model.organisationalUnits.administrativeUnits.label}},e._l(e.administrativeUnitItemsForSelector(e.model.organisationalUnits.administrativeUnits.items,e.model.categoryForm.category),(function(e){return n("el-option",{key:e.key,attrs:{label:e.name,value:e,disabled:e.disabled}})}
1)),1):e._e(),e._v(" "),e._l(e.institutionsWithItemsForSelector(e.model.organisationalUnits.institutions,e.model.categoryForm.category),(function(t){return n("el-option-group",{key:t.key,attrs:{label:t.name}},e._l(e.institutionOrTeamItemsForSelector(t.items,e.model.categoryForm.category),(function(e){return n("el-option",{key:e.key,attrs:{label:e.name,value:e,disabled:e.disabled}})})),1)}))],2)],1),e._v(" "),n("div",{staticClass:"momo-category-form-submit-button-container"},[e.canDeleteCategory()?n("button",{staticClass:"momo-category-form-delete-button",on:{click:function(t){return e.deleteCategory()}}},[e._v("\n        "+e._s(e.TEXT[e.LANG].DELETE)+"\n      ")]):e._e(),e._v(" "),n("button",{staticClass:"momo-links-form-save-button",attrs:{disabled:!e.categoryFormHasValidInput()},on:{click:function(t){return e.submitCategoryForm()}}},[e._v("\n        "+e._s(e.model.state===e.states.creatingCategory?e.TEXT[e.LANG].CREATE:e.TEXT[e.LANG].UPDATE)+"\n      ")])]),e._v(" "),e.model.state===e.states.editingCategory?n("div",{staticClass:"momo-links-category-links-containing-block"},[n("p",{staticClass:"momo-links-target-group-header"},[e._v(e._s(e.TEXT[e.LANG].LINKS))]),e._v(" "),n("div",{staticClass:"momo-links-links-grid"},[e._l(e.model.categoryForm.category.links,(function(t){return n("div",{key:t.id,staticClass:"momo-links-link momo-containing-block"},[n("img",{staticClass:"momo-links-link-icon momo-links-link-delete-icon",attrs:{src:e.urls.removeLinkIcon,alt:e.TEXT[e.LANG].DELETE_LINK},on:{click:function(n){return e.removeLinkFromCategory(e.model.categoryForm.category,t)}}}),e._v(" "),n("img",{staticClass:"momo-links-link-icon momo-links-link-edit-icon",attrs:{src:e.urls.editLinkIcon,alt:e.TEXT[e.LANG].EDIT_LINK},on:{click:function(n){return e.openEditLinkView(e.model.categoryForm.category,t)}}}),e._v(" "),e.systematic||!t.sso?n("a",{staticClass:"momo-links-icon-and-text",attrs:{href:t.url,target:"_blank"}},[n("img",{staticClass:"momo-links-icon",attrs:{src:e.displayImageOrPlaceholderImage(t.imageUrl),alt:t.name},on:{error:e.displayPlaceholderImageOnError}}),e._v(" "),n("div",{staticClass:"momo-tooltip"},[n("div",{staticClass:"momo-links-icon-text"},[e._v(e._s(t.name))])])]):e._e(),e._v(" "),!e.systematic&&t.sso?n("form",{attrs:{action:t.url,target:"_blank",method:"post"}},[n("input",{attrs:{hidden:"",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{hidden:"",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{hidden:"",name:"aulaToken",id:e.getSsoAulaTokenParameterElementId(e.model.state,t.id)}}),e._v(" "),n("button",{staticClass:"momo-links-sso-button momo-links-icon-and-text",attrs:{type:"submit"},on:{click:function(n){return e.setSsoAulaTokenParameterValue(e.model.state,t.id)}}},[n("img",{staticClass:"momo-links-icon",attrs:{src:e.displayImageOrPlaceholderImage(t.imageUrl),alt:t.name},on:{error:e.displayPlaceholderImageOnError}}),e._v(" "),n("div",{staticClass:"momo-tooltip"},[n("div",{staticClass:"momo-links-icon-text"},[e._v(e._s(t.name))])])])]):e._e()])})),e._v(" "),n("div",{staticClass:"momo-links-link"},[n("img",{staticClass:"momo-links-icon",attrs:{src:e.urls.addLinkIcon,alt:e.TEXT[e.LANG].CREATE_LINK},on:{click:function(t){return e.openCreateLinkView(e.model.categoryForm.category)}}}),e._v(" "),n("div",{staticClass:"momo-links-icon-text"},[e._v(e._s(e.TEXT[e.LANG].CREATE_LINK))])])],2)]):e._e(),e._v(" "),e.model.state===e.states.creatingCategory?n("div",{staticClass:"momo-links-category-create-spacer"}):e._e()]):e._e(),e._v(" "),e.model.state===e.states.creatingLink||e.model.state===e.states.editingLink?n("div",{staticClass:"momo-links-link-form"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.linkForm.url,expression:"model.linkForm.url"}],staticClass:"momo-links-input",attrs:{type:"text",minlength:"1",placeholder:e.TEXT[e.LANG].LINK_ELLIPSIS},domProps:{value:e.model.linkForm.url},on:{change:function(t){return e.getLinkMetadata()},input:function(t){t.target.composing||e.$set(e.model.linkForm,"url",t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.linkForm.name,expression:"model.linkForm.name"}],staticClass:"momo-links-input",attrs:{type:"text",minlength:"1",placeholder:e.TEXT[e.LANG].NAME_ELLIPSIS},domProps:{value:e.model.linkForm.name},on:{input:function(t){t.target.composing||e.$set(e.model.linkForm,"name",t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.linkForm.imageUrl,expression:"model.linkForm.imageUrl"}],staticClass:"momo-links-input",attrs:{type:"text",minlength:"1",placeholder:e.TEXT[e.LANG].INSERT_PICTURE_MESSAGE},domProps:{value:e.model.linkForm.imageUrl},on:{input:function(t){t.target.composing||e.$set(e.model.linkForm,"imageUrl",t.target.value)}}}),e._v(" "),n("div",{staticClass:"momo-links-sso-link-checkbox"},[n("div",{staticClass:"momo-tooltip"},[n("span",{staticClass:"momo-tooltiptext momo-sso-tooltiptext"},[e._v("\n                  "+e._s(e.TEXT[e.LANG].SSO_CHECK_MESSAGE)+"\n                ")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model.linkForm.sso,expression:"model.linkForm.sso"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.model.linkForm.sso)?e._i(e.model.linkForm.sso,null)>-1:e.model.linkForm.sso},on:{change:function(t){var n=e.model.linkForm.sso,i=t.target,s=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);
1i.checked?a<0&&e.$set(e.model.linkForm,"sso",n.concat([null])):a>-1&&e.$set(e.model.linkForm,"sso",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.model.linkForm,"sso",s)}}})]),e._v(" "),n("p",{staticClass:"momo-links-sso-link-text"},[e._v(e._s(e.TEXT[e.LANG].SSO_LINK))])]),e._v(" "),n("div",{staticClass:"momo-links-example-container"},[n("div",{staticClass:"momo-links-example"},[n("p",{staticClass:"momo-links-example-text"},[e._v(e._s(e.TEXT[e.LANG].EXAMPLE))]),e._v(" "),n("img",{staticClass:"momo-links-example-image",attrs:{src:e.displayImageOrPlaceholderImageOnWhitebackground(e.model.linkForm.imageUrl),alt:e.TEXT[e.LANG].EXAMPLE_LINK_ICON},on:{error:e.displayPlaceholderImageOnWhitebackground}}),e._v(" "),n("div",{staticClass:"momo-tooltip"},[n("span",{staticClass:"momo-tooltiptext momo-link-tooltiptext"},[e._v(e._s(e.model.linkForm.name))]),e._v(" "),n("div",{staticClass:"momo-links-example-text"},[e._v(e._s(e.model.linkForm.name))])])])]),e._v(" "),n("div",{staticClass:"momo-links-form-submit-button-container"},[n("button",{staticClass:"momo-links-form-cancel-button",on:{click:function(t){return e.cancelCreatingLink()}}},[e._v(e._s(e.TEXT[e.LANG].CANCEL)+"\n      ")]),e._v(" "),n("button",{staticClass:"momo-links-form-save-button",attrs:{disabled:!e.linkFormHasValidInput()},on:{click:function(t){return e.submitLinkForm()}}},[e._v("\n        "+e._s(e.TEXT[e.LANG].SAVE)+"\n      ")])])]):e._e()],1)}),[],!1,null,"c4575230",null);t.a=o.exports},846:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,childFilter:Array,placement:String},data:function(){return{api:"https://api.laererservices.dk/api/kontaktoplysninger",ContainerWidth:null,FontSize:0,ButtonsWrapped:!1,message:"",status:"",changed:!1,valid:!0,aulaToken:null,family:null,oldFamily:null,changeHemmelig:!1,errorFields:[],communicationError:"",busy:!1,changeHemmeligTimer:null,showModalHemmelig:!1,showModalAlias:!1,tokenFunction:null,saveCounter:0,tracker:null,hideContact:!0,photoOptions:[{text:"Mit barn må fotograferes, og foto må offentliggøres",value:4},{text:"Mit barn må fotograferes, men foto må IKKE offentliggøres",value:3},{text:"Mit barn må ikke fotograferes",value:0}]}},beforeDestroy:function(){window.removeEventListener("resize",this.handleWindowResize)},created:function(){this.tokenFunction=this.LoadData,this.aulaToken=this.getAulaToken(),window.addEventListener("resize",this.handleWindowResize)},mounted:function(){},updated:function(){this.getFontSize(),this.ContainerWidth||this.handleWindowResize()},watch:{family:{handler:function(e,t){var n=this;t&&(this.oldFamily.hemmeligt!==this.family.hemmeligt&&(this.changeHemmelig=!0,clearTimeout(this.changeHemmeligTimer),this.changeHemmeligTimer=setTimeout((function(){n.changeHemmelig=!1}),500)),this.validateDelayed(),this.changed=!0,this.oldFamily=JSON.parse(JSON.stringify(this.family)))},deep:!0},aulaToken:function(){this.aulaToken?this.tokenFunction&&(this.tokenFunction.apply(this),this.tokenFunction=null):this.communicationError="Vi kunne ikke modtage Login-data fra Aula, prøv evt. at genopfriske browseren."}},computed:{Children:function(){return this.family&&this.family.children?this.family.children:{}}},methods:{checkboxHemmeligt:function(e){this.family.hemmeligt=!this.family.hemmeligt,e.preventDefault(),e.stopPropagation()},debounce:function(e,t){var n=this;clearTimeout(this.tracker),this.tracker=setTimeout((function(){return e.apply(n)}),t)},OpenKMD:function(){window.open("https://kmd.dk/","_blank")},SaveData:function(){var e=this;if(this.busy=!0,this.message="",!this.validateForm())return this.status="red",void(this.busy=!1);var t={method:"post",headers:{Authorization:this.aulaToken,Accept:"application/json, text/plain"},data:this.mapSaveData(),url:this.api};this.axios(t).then((function(t){if(!t.data.Status)return e.message="Fejl i kommunikationen.",void(e.status="red");var n=!1;t.data.Status.forEach((function(t){0!==t.kode&&(e.message+=t.tekst+"\n",n=!0)})),n?e.status="red":(e.status="green",e.message="Ændringer gemt.",setTimeout((function(){e.status=""}),1500),e.changed=!1),e.saveCounter=0})).catch((function(t){if(e.status="red",t.response&&t.response.data&&t.response.data.ExceptionMessage)e.message=t.response.data.ExceptionMessage;else if(t.response&&401===t.response.status){if(0===e.saveCounter)return e.saveCounter++,e.tokenFunction=e.SaveData,e.aulaToken=e.getAulaToken(),void(e.message="Dit Aula-login er udløbet. Vi forsøger at forny det, prøver at gemme igen.");e.message="Uautoriseret adgang."}else t&&t.message?e.message=t.message:e.message="Noget er gået galt.";e.saveCounter=0})).finally((function(){0===e.saveCounter&&(e.busy=!1)}))},LoadData:function(){var e=this;this.busy=!0;var t={method:"get",headers:{Authorization:this.aulaToken,Accept:"application/json, text/plain"},url:this.api};this.axios(t).then((function(t){e.family=e.mapLoadData(t.data),e.oldFamily=JSON.parse(JSON.stringify(e.family)),e.busy=!1}
1)).catch((function(t){t.response&&t.response.data&&t.response.data.Message?e.communicationError=t.response.data.Message:t.response&&401===t.response.status?e.communicationError="Uautoriseret adgang.":t&&t.message?e.communicationError=t.message:e.communicationError="Noget er gået galt",e.busy=!1}))},mapLoadData:function(e){var t={};t.parent=e.kontaktperson,Array.isArray(e.elev)?t.children=e.elev:t.children=[e.elev];var n=!0;return t.children.forEach((function(e){e.samboende&&(e.samboende="X"===e.samboende,n&&(t.telefon=e.telefon,t.hemmeligt="X"===e.hemmeligt_nummer,n=!1))})),t},mapSaveData:function(){var e=this,t={};return t.kontaktpersoner=[this.family.parent],t.elev=JSON.parse(JSON.stringify(this.Children)),t.elev.forEach((function(t){t.samboende&&(t.samboende="X",t.telefon=e.family.telefon,t.hemmeligt_nummer=e.family.hemmeligt?"X":""),t.aendret_af_id=e.family.parent.id})),t},validateDelayed:function(){this.debounce((function(){this.validateForm()}),500)},validateForm:function(){var e=this;this.valid=!0,this.errorFields=[],this.message="";var t="";return this.Children.forEach((function(n){(t=e.validatePerson(n))&&(e.message+=t)})),(t=this.validatePerson(this.family.parent))&&(this.message+=t),this.valid?this.status="":this.status="red",this.valid},validatePerson:function(e){var t=!0,n=[],i=e.fornavn+" har fejl i ",s=/^[ -\xFF]*$|^$/;if(this.hideContact||void 0===e.email||(s.test(e.email)?this.validEmail(e.email)||(n.push("email"),this.errorFields.push("Mail"+e.id),t=!1):(n.push("email (ugyldigt tegn)"),this.errorFields.push("Mail"+e.id),t=!1)),null!==e.alias_fornavn&&(0===e.alias_fornavn.length?(n.push("alias fornavn"),this.errorFields.push("AliasFirst"+e.id),t=!1):s.test(e.alias_fornavn)||(n.push("alias fornavn (ugyldigt tegn)"),this.errorFields.push("AliasFirst"+e.id),t=!1),0===e.alias_efternavn.length?(n.push("alias efternavn"),this.errorFields.push("AliasLast"+e.id),t=!1):s.test(e.alias_efternavn)||(n.push("alias efternavn (ugyldigt tegn)"),this.errorFields.push("AliasLast"+e.id),t=!1)),!this.hideContact&&e.mobil&&0!==e.mobil.length&&(s.test(e.mobil)||(n.push("mobil (ugyldigt tegn)"),this.errorFields.push("Mobil"+e.id),t=!1)),e.arbejdssted&&0!==e.arbejdssted.length&&(s.test(e.arbejdssted)||(n.push("arbejdssted (ugyldigt tegn)"),this.errorFields.push("Arbejdssted"+e.id),t=!1)),!this.hideContact&&e.arbejdstelefon&&0!==e.arbejdstelefon.length&&(s.test(e.arbejdstelefon)||(n.push("arbejdstlf. (ugyldigt tegn)"),this.errorFields.push("Arbejde"+e.id),t=!1)),!this.hideContact&&e.samboende&&(s.test(this.family.telefon)||(n.push("telefon (ugyldigt tegn)"),this.errorFields.push("Tlf"+e.id),t=!1)),!t)return n.length>1?i+=[n.slice(0,-1).join(", "),n.slice(-1)[0]].join(n.length<2?"":" og "):i+=n[0],this.valid=!1,i+"\n"},validEmail:function(e){if(!e)return!0;return/^(((?:(?![\t-\r "\(\),\.:-<>@\[-\]\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])+(\.(?:(?![\t-\r "\(\),\.:-<>@\[-\]\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])+)*)|("(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([\x2D0-9A-Za-z]+\.)+[A-Za-z]{2,}))$/.test(e)},handleWindowResize:function(e){this.debounce(this.WindowResize,50)},WindowResize:function(){this.$refs.Content&&this.$refs.Content.clientWidth&&(this.ContainerWidth=this.$refs.Content.clientWidth),this.$refs.Buttons&&this.$refs.Buttons.offsetTop?this.ButtonsWrapped=this.$refs.Buttons.offsetTop>0:this.ButtonsWrapped=!1},getFontSize:function(){var e=this.$refs.Content;if(e){var t=window.getComputedStyle(e,null).getPropertyValue("font-size"),n=parseFloat(t);this.FontSize=n/16*(1/.75)}}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.family?n("div",{ref:"Content",staticClass:"Content"},[n("div",{staticClass:"Persons"},[e._m(0),e._v(" "),e.Children.length?n("div",{staticClass:"Header"},[e.Children.length>1?n("span",[e._v("Mine børn")]):n("span",[e._v("Mit barn")])]):e._e(
1),e._v(" "),e._l(e.Children,(function(t){return n("div",{staticClass:"Child"},[n("span",{staticClass:"NameWrapper"},[n("span",[e._v(e._s(t.fornavn))]),e._v(" "),n("span",[e._v(e._s(t.efternavn))])]),e._v(" "),n("div",[e.hideContact?e._e():n("div",{staticClass:"Line",class:{narrow:"narrow"==e.placement||e.ContainerWidth<(t.samboende?36.8:25.5)*e.FontSize*16}},[n("span",{staticClass:"_50 Email"},[n("label",{attrs:{for:"Mail"+t.id}},[e._v("Email:")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"child.email"}],class:{inputError:e.errorFields.includes("Mail"+t.id)},attrs:{type:"text",id:"Mail"+t.id,maxlength:"60"},domProps:{value:t.email},on:{input:function(n){n.target.composing||e.$set(t,"email",n.target.value)}}})]),e._v(" "),t.samboende?n("span",{staticClass:"_25 PhoneMulti HomePhone"},[n("label",{class:{red:1==e.changeHemmelig},attrs:{for:"Tlf"+t.id}},[e.family.hemmeligt?n("span",[e._v("Hemmeligt")]):n("span",[e._v("Hjemmets")]),e._v(" tlf.nr.:\n                "),n("a",{staticClass:"modalHelp",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.showModalHemmelig=!0}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("span",{staticClass:"input-group"},[n("span",{staticClass:"input-group-text",attrs:{title:"Hemmeligt telefonummer"},on:{click:e.checkboxHemmeligt}},[e.family.hemmeligt?n("i",{staticClass:"far fa-phone-slash hemmelig"}):n("i",{staticClass:"far fa-phone hemmelig"}),e._v(" "),n("b-form-checkbox",{attrs:{switch:""},on:{change:e.checkboxHemmeligt},model:{value:e.family.hemmeligt,callback:function(t){e.$set(e.family,"hemmeligt",t)},expression:"family.hemmeligt"}})],1),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.family.telefon,expression:"family.telefon"}],staticClass:"form-control",class:{inputError:e.errorFields.includes("Tlf"+t.id)},attrs:{type:"text",id:"Tlf"+t.id,maxlength:"14"},domProps:{value:e.family.telefon},on:{input:function(t){t.target.composing||e.$set(e.family,"telefon",t.target.value)}}})])]):e._e(),e._v(" "),n("span",{staticClass:"_25 PhoneMulti"},[n("label",{attrs:{for:"Mobil"+t.id}},[e._v("Mobil nummer:")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.mobil,expression:"child.mobil"}],class:{inputError:e.errorFields.includes("Mobil"+t.id)},attrs:{type:"text",id:"Mobil"+t.id,maxlength:"14"},domProps:{value:t.mobil},on:{input:function(n){n.target.composing||e.$set(t,"mobil",n.target.value)}}})])]),e._v(" "),null!==t.alias_fornavn?n("div",{staticClass:"Line",class:{narrow:"narrow"==e.placement||e.ContainerWidth<31*e.FontSize*16}},[n("span",{staticClass:"_50 Name"},[n("label",{attrs:{for:"AliasFirst"+t.id}},[e._v("Alias fornavn:\n                "),n("a",{staticClass:"modalHelp",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.showModalAlias=!0}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.alias_fornavn,expression:"child.alias_fornavn"}],class:{inputError:e.errorFields.includes("AliasFirst"+t.id)},attrs:{type:"text",id:"AliasFirst"+t.id,maxlength:"25"},domProps:{value:t.alias_fornavn},on:{input:function(n){n.target.composing||e.$set(t,"alias_fornavn",n.target.value)}}})]),e._v(" "),n("span",{staticClass:"_50 Name"},[n("label",{attrs:{for:"AliasLast"+t.id}},[e._v("Alias efternavn:\n                "),n("a",{staticClass:"modalHelp",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.showModalAlias=!0}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.alias_efternavn,expression:"child.alias_efternavn"}],class:{inputError:e.errorFields.includes("AliasLast"+t.id)},attrs:{type:"text",id:"AliasLast"+t.id,maxlength:"25"},domProps:{value:t.alias_efternavn},on:{input:function(n){n.target.composing||e.$set(t,"alias_efternavn",n.target.value)}}})])]):e._e(),e._v(" "),t.samboende?n("div",{staticClass:"Line",class:{narrow:"narrow"==e.placement||e.ContainerWidth<31*e.FontSize*16}},[n("span",{staticClass:"_50 Photo"},[n("label",{attrs:{for:"Photo"+t.id}},[e._v("\n                Må barnet blive fotograferet af skolefotograf og må barnets\n                foto offentliggøres?"),n("br"),e._v("\n                At barnets foto offentliggøres betyder, at barnets foto vises\n                på klassegalleri i skolens elevadministrative system, og at\n                foto’et kan ses i Aula som barnets profilbillede.\n              ")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.fototilladelse,expression:"child.fototilladelse"}],attrs:{id:"Photo"+t.id},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,
1(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"fototilladelse",n.target.multiple?i:i[0])}}},e._l(e.photoOptions,(function(t){return n("option",{domProps:{value:t.value}},[e._v("\n                  "+e._s(t.text)+"\n                ")])})),0)])]):e._e()])])})),e._v(" "),e.family.parent?n("div",{staticClass:"Parent"},[n("span",{staticClass:"Header"},[e._v("Forælder")]),e._v(" "),n("div",[n("span",{staticClass:"NameWrapper"},[n("span",[e._v(e._s(e.family.parent.fornavn))]),e._v(" "),n("span",[e._v(e._s(e.family.parent.efternavn))])]),e._v(" "),e.hideContact?e._e():n("div",{staticClass:"Line",class:{narrow:"narrow"==e.placement||e.ContainerWidth<23.5*e.FontSize*16}},[n("span",{staticClass:"_50 Email"},[n("label",{attrs:{for:"Mail"+e.family.parent.id}},[e._v("Email:")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.family.parent.email,expression:"family.parent.email"}],class:{inputError:e.errorFields.includes("Mail"+e.family.parent.id)},attrs:{type:"text",id:"Mail"+e.family.parent.id,maxlength:"60"},domProps:{value:e.family.parent.email},on:{input:function(t){t.target.composing||e.$set(e.family.parent,"email",t.target.value)}}})]),e._v(" "),n("span",{staticClass:"_25 PhoneMulti"},[n("label",{attrs:{for:"Mobil"+e.family.parent.id}},[e._v("Mobil nummer:")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.family.parent.mobil,expression:"family.parent.mobil"}],class:{inputError:e.errorFields.includes("Mobil"+e.family.parent.id)},attrs:{type:"text",id:"Mobil"+e.family.parent.id,maxlength:"14"},domProps:{value:e.family.parent.mobil},on:{input:function(t){t.target.composing||e.$set(e.family.parent,"mobil",t.target.value)}}})])]),e._v(" "),n("div",{staticClass:"Line",class:{narrow:"narrow"==e.placement||e.ContainerWidth<(e.hideContact?31:23.5)*e.FontSize*16}},[n("span",{staticClass:"_50 Work"},[n("label",{attrs:{for:"Arbejdssted"+e.family.parent.id}},[e._v("Arbejdssted:")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.family.parent.arbejdssted,expression:"family.parent.arbejdssted"}],class:{inputError:e.errorFields.includes("Arbejdssted"+e.family.parent.id)},attrs:{type:"text",id:"Arbejdssted"+e.family.parent.id,maxlength:"60"},domProps:{value:e.family.parent.arbejdssted},on:{input:function(t){t.target.composing||e.$set(e.family.parent,"arbejdssted",t.target.value)}}})]),e._v(" "),e.hideContact?e._e():n("span",{staticClass:"_25 PhoneMulti"},[n("label",{attrs:{for:"Arbejde"+e.family.parent.id}},[e._v("Arbejdstlf.:")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.family.parent.arbejdstelefon,expression:"family.parent.arbejdstelefon"}],class:{inputError:e.errorFields.includes("Arbejde"+e.family.parent.id)},attrs:{type:"text",id:"Arbejde"+e.family.parent.id,maxlength:"14"},domProps:{value:e.family.parent.arbejdstelefon},on:{input:function(t){t.target.composing||e.$set(e.family.parent,"arbejdstelefon",t.target.value)}}})])]),e._v(" "),null!==e.family.parent.alias_fornavn?n("div",{staticClass:"Line",class:{narrow:"narrow"==e.placement||e.ContainerWidth<31*e.FontSize*16}},[n("span",{staticClass:"_50 Name"},[n("label",{attrs:{for:"AliasFirst"+e.family.parent.id}},[e._v("Alias fornavn:\n                "),n("a",{staticClass:"modalHelp",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.showModalAlias=!0}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.family.parent.alias_fornavn,expression:"family.parent.alias_fornavn"}],class:{inputError:e.errorFields.includes("AliasFirst"+e.family.parent.id)},attrs:{type:"text",id:"AliasFirst"+e.family.parent.id,maxlength:"25"},domProps:{value:e.family.parent.alias_fornavn},on:{input:function(t){t.target.composing||e.$set(e.family.parent,"alias_fornavn",t.target.value)}}})]),e._v(" "),n("span",{staticClass:"_50 Name"},[n("label",{attrs:{for:"AliasLast"+e.family.parent.id}},[e._v("Alias efternavn:\n                "),n("a",{staticClass:"modalHelp",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.showModalAlias=!0}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.family.parent.alias_efternavn,expression:"family.parent.alias_efternavn"}],class:{inputError:e.errorFields.includes("AliasLast"+e.family.parent.id)},attrs:{type:"text",id:"AliasLast"+e.family.parent.id,maxlength:"25"},domProps:{value:e.family.parent.alias_efternavn},on:{input:function(t){t.target.composing||e.$set(e.family.parent,"alias_efternavn",t.target.value)}}}
1)])]):e._e()])]):e._e()],2),e._v(" "),n("div",{ref:"Buttons",staticClass:"Buttons",class:{Reverse:!0===e.ButtonsWrapped}},[n("div",[n("button",{class:e.status,attrs:{type:"button",disabled:!e.changed||e.busy},on:{click:function(t){return e.SaveData()}}},[e.busy?n("i",{staticClass:"fa fa-spinner fa-spin"}):e._e(),e._v("Gem\n        ")]),e._v(" "),e.message?n("div",{staticClass:"message",class:e.status},[e._v("\n          "+e._s(e.message)+"\n        ")]):e._e()]),e._v(" "),n("div",{staticClass:"Logo"},[n("svg",{attrs:{id:"KMD_Logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 756.6 253.4"},on:{click:function(t){return e.OpenKMD()}}},[n("path",{attrs:{fill:"#101820",d:"M323.9 84.9c-.6-.7-.6-2.5 0-3.2l55.3-72.4c2.4-2.9 1.7-5.3 1.2-6.2-.4-.9-1.8-3.1-5.5-3.1h-41.5c-3.6 0-8.1 2.2-10.3 5.1 0 0-33 43-42.9 56v-53c0-4.5-3.7-8.2-8.1-8.2h-32.7c-4.5 0-8.2 3.7-8.2 8.2v153.3c0 4.5 3.7 8.2 8.2 8.2h32.7c4.5 0 8.1-3.7 8.1-8.2v-56.3c10.3 13.3 45.3 59.6 45.3 59.6 2.2 2.9 7.1 4.9 10.8 4.9h40.9c3.7 0 5.1-2.1 5.6-3.1.4-.9 1.2-3.4-1.2-6.2l-57.7-75.4z"}}),e._v(" "),n("path",{attrs:{fill:"#37A539",d:"M0 0h168.7v169.7H0z"}}),e._v(" "),n("path",{attrs:{fill:"#101820",d:"M670.9 0h-52.3c-4.5 0-8.2 3.7-8.2 8.2v26.4c0 4.5 3.7 8.2 8.2 8.2h44.5c26.4 0 42.8 16.1 42.8 42.1 0 26.4-16.1 42.1-43.2 42.1h-63.4c-.9 0-1.9-.9-2-1.8L577.6 7.6c-.6-4.2-4.5-7.6-8.8-7.6l-32 .1c-4 0-8.2 2.7-9.7 6.4 0 0-23.9 59.4-30.2 74.9-5.9-15.6-30.1-74.7-30.1-74.7-1.4-3.8-5.5-6.7-9.6-6.6l-29.6.1c-4.3-.2-8.5 3.2-9.4 7.6l-25.9 153.5c-.1 2 .4 4.2 1.8 5.9 1.4 1.7 3.5 2.6 5.7 2.6h32.5c4.3 0 8.3-4.2 8.9-8.4 0 0 8.1-55.9 11-76.3 7.9 20 31.5 78.1 31.5 78.1 1.5 3.8 5.6 6.6 9.7 6.6h7.3c4 0 8.2-2.8 9.7-6.5 0 0 23.6-58.2 31.9-78.2 2.6 20.5 9.7 77 9.7 77 .5 4.3 4.4 7.7 8.7 7.7h110.2c47.3 0 85.7-38.1 85.7-84.9 0-46.8-38.5-84.9-85.7-84.9"}}),e._v(" "),n("g",{attrs:{fill:"#101820"}},[n("path",{attrs:{d:"M422 243.8h-2.9c-.4 0-.7-.3-.8-.7l-3.2-11.2h-12.7l-3.1 11.2c-.1.4-.5.7-.9.7h-2.9c-.5 0-.8-.3-.8-.8v-.3l9-31.8c.8-3 3.1-3.7 5-3.7 1.8 0 4.1.7 4.9 3.7l9 31.9v.3c.3.4 0 .7-.6.7zm-12.2-31.9c-.1-.5-.4-.9-.9-.9s-.8.3-1 .9l-4.5 16.1h10.8l-4.4-16.1zM447.2 243.8h-2.3c-.5 0-1-.4-1-1v-16.1c0-4.9-1.7-6.5-5.4-6.5-2.1 0-4.4.8-6.6 1.9v20.6c0 .5-.4 1-1 1h-2.4c-.5 0-.9-.4-.9-1v-24.9c0-.5.4-1 .9-1h2.4c.5 0 .9.4.9 1v.9c2.7-1.5 4.9-2.2 7.8-2.2 5.9 0 8.5 3.7 8.5 10.2v16.1c.1.6-.3 1-.9 1zM491.6 243.8h-3c-.8 0-1.3-.3-1.6-.8l-15.1-28.7c0-.1-.1-.1-.1-.1V242.9c0 .5-.4.9-.9.9h-2.5c-.5 0-.9-.1-.9-.6v-34.4c0-.8.6-1.4 1.4-1.4h2.7c1.4 0 1.6.2 2 1l15 28.6.1.1V208.4c0-.5.4-.9.9-.9h2.6c.5 0 .9.4.9.9v34c-.1.8-.7 1.4-1.5 1.4zM520.6 243.9c-1.9.2-6.7.2-9.5.2-6.8 0-10.4-2.6-10.4-9.1v-18.8c0-6.5 3.6-9.1 10.4-9.1 2.9 0 7.5.1 9.5.3.3.1.5.4.5.7v2.4c0 .3-.2.6-.5.6h-9.4c-5.2 0-6 1.4-6 5.1v6.8h15c.5 0 1 .4 1 1v1.9c0 .5-.4 1-1 1h-15v8.2c0 3.7.8 5.1 6 5.1h9.4c.3 0 .5.2.5.6v2.5c0 .2-.2.6-.5.6zM547.8 243.5c-2.1.4-4 .6-8.1.6-6 0-12.9-3.2-12.9-15.1v-6.8c0-12 6.9-15.1 12.9-15.1 3.1 0 6.1.4 8.2.8.4 0 .8.2.8.6v2.5c0 .3-.1.5-.6.5h-.1c-1.8-.1-5.4-.4-8.2-.4-4.8 0-8.5 2.8-8.5 11.1v6.8c0 8.2 3.7 11.1 8.5 11.1 2.8 0 6.3-.2 8.1-.4h.2c.5 0 .8.2.8.8v2c-.2.6-.6.9-1.1 1zM586.5 243.5c-2.1.4-4 .6-8.1.6-6 0-12.9-3.2-12.9-15.1v-6.8c0-12 6.9-15.1 12.9-15.1 3.1 0 6.1.4 8.2.8.4 0 .8.2.8.6v2.5c0 .3-.1.5-.6.5h-.1c-1.8-.1-5.4-.4-8.2-.4-4.8 0-8.5 2.8-8.5 11.1v6.8c0 8.2 3.7 11.1 8.5 11.1 2.8 0 6.3-.2 8.1-.4h.2c.5 0 .8.2.8.8v2c-.1.6-.6.9-1.1 1zM602 244.2c-7.2 0-10.9-4.7-10.9-11.9v-3.7c0-7.2 3.7-11.9 10.9-11.9s10.9 4.7 10.9 11.9v3.7c0 7.1-3.7 11.9-10.9 11.9zm6.6-15.7c0-5-2-8.2-6.6-8.2-4.5 0-6.6 3.1-6.6 8.2v3.7c0 5 2 8.2 6.6 8.2 4.5 0 6.6-3.1 6.6-8.2v-3.7zM650.1 243.8h-2.3c-.5 0-1-.4-1-1v-17.3c0-4.1-1.9-5.2-4.5-5.2-1.8 0-3.8.6-5.7 1.3.3 1.1.4 2.3.4 3.8v17.4c0 .5-.3 1-.9 1h-2.6c-.5 0-.8-.4-.8-1v-17.4c0-4.3-1.2-5.1-3.8-5.1-1.8 0-3.9.9-6 1.9v20.6c0 .5-.3 1-.9 1h-2.6c-.5 0-.8-.4-.8-1v-24.9c0-.5.4-1 .9-1h2.4c.5 0 .9.4.9 1v.9c2-1.2 4.5-2.3 7.1-2.3 2.1 0 3.7.6 4.9 2 2.7-1.3 5.6-2 8.1-2 4.4 0 7.9 2.2 7.9 9v17.3c.2.6-.2 1-.7 1zM667.7 244.2c-1.5 0-3.8-.2-5.7-.5v8.9c0 .5-.4.9-.9.9h-2.5c-.5 0-.9-.4-.9-.9v-33.7c0-.6.1-.9 1-1.1 2.6-.6 6-1.1 9-1.1 7.3 0 10.7 4.7 10.7 12.1v3.5c0 7.6-3.5 11.9-10.7 11.9zm6.4-15.5c0-5.1-1.5-8.5-6.4-8.5-2.1 0-4.4.2-5.7.5v19.4c1.6.3 4.2.5 5.7.5 4.8 0 6.4-3.1 6.4-8.4v-3.5zM701.9 243.8h-2.2c-.5 0-1-.4-1-1v-1.1c-2.3 1.4-4.8 2.4-7.5 2.4-4.2 0-8-1.8-8-7.9v-.6c0-5.3 3.1-7.9 11.8-7.9h3.6v-2c0-4.1-1.4-5.5-5.2-5.5-3.2 0-5.5.2-7.5.4h-.2c-.4 0-.9-.1-.9-.8v-1.7c0-.5.3-.8 1-.9 2-.3 4.3-.6 7.6-.6 6.8 0 9.5 3.4 9.5 9.2v17.1c0 .5-.5.9-1 .9zm-3.3-13H695c-5.9 0-7.5 1.3-7.5 4.8v.6c0 3.5 1.7 4.5 4.5 4.5 2.2 0 4.3-.7 6.6-2v-7.9zM729.1 243.8h-2.3c-.5 0-1-.4-1-1v-16.1c0-4.9-1.7-6.5-5.4-6.5-2.1 0-4.4.8-6.6 1.9v20.6c0 .5-.4 1-1 1h-2.4c-.5 0-.9-.4-.9-1v-24.9c0-.5.4-1 .9-1h2.4c.5 0 .9.4.9 1v.9c2.7-1.5 4.9-2.2 7.8-2.2 5.9 0 8.5 3.7 8.5 10.2v16.1c.1.6-.3 1-.9 1zM756.5 218.1l-8.1 28.2c-1.5 5.3-3.3 7.2-8.9 7.2-1.4 0-3.1-.2-4.1-.4-.6-.1-1-.3-1-.8v-1.8c0-.5.4-.8.9-.8h.1c1.1.1 3.3.3 4.4.3 2.8 0 4-.7 4.8-4.2l.5-2h-.7c-1.5 0-2.7-.3-3.6-3.4l-6.5-22.4c-.1-.1-.1-.2-.1-.3 0-.5.3-.8.9-.8h2.7c.4 0 .7.4.8.8l5.8 21.2c.2 1 .6 1.1.9 1.1h.8l6-22.4c.1-.4.5-.7.9-.7h2.7c.5 0 .8.3.8.8.1.2.1.3 0 .4z"}})])])])])]):e.communicationError&&e.communicationError.length?n("div",[e._v("\n    "+e._s(e.communicationError)+"\n  ")]):n("div",[e._v("Henter data "),n("i",{staticClass:"fa fa-spinner fa-spin"})]),e._v(" "),n("b-modal",{attrs:{id:"HemmeligModal",title:"Hemmeligt telefonnummer",size:"md","ok-only":"","ok-title":"Luk",centered:""},model:{value:e.showModalHemmelig,callback:function(t){e.showModalHemmelig=t},expression:"showModalHemmelig"}},[e._v("\n    Du har mulighed for at angive om der er tale om hemmeligt telefonnummer,\n    ved at anvende ikonet\n    "),n("span",[n("b-form-checkbox",{staticClass:"help-toggle",attrs:{switch:""}})],1),e._v(", før feltet.\n  ")]),e._v(" "),n("b-modal",{attrs:{id:"AliasModal",title:"Alias navne",size:"md","ok-only":"","ok-title":"Luk",centered:""},model:{value:e.showModalAlias,callback:function(t){e.showModalAlias=t},expression:"showModalAlias"}},[e._v("\n    Hvis en person har adresse- eller navnebeskyttelse i folkeregisteret,\n    vises personens navn ikke i Aula."),n("br"),e._v("\n    I stedet vises et aliasnavn (F i fornavn og E i efternavn). Aliasnavnene\n    kan rettes her.\n  ")])],1)}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"nb-text"},[n("div",{staticClass:"Header"},[e._v("NB:")]),e._v("\n        Her kan du ændre i nedenstående oplysninger, der er registreret om dig\n        og dit barn/dine børn i skolens elevadministrationssystem."),n("br")])}],!1,null,"52dbb86e",null);t.a=a.exports},847:function(e,t,n){"use strict";var i=n(1),s=n.n(i),a=n(12),r=n.n(a),o=n(7),l=n.n(o);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?c(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d,h,m,p,v,f,g={props:{getAulaToken:Function,axios:Function,moment:Function},data:function(){return{loading:!0,user:null,selectedDate:this.moment(),activities:{},aulaToken:null,lessonCancelled:!1,currentSelectedActivity:"",cancellationReasons:[],currentSelectedActivityId:null,showDropdown:!1,teachers:[],selectedTeacher:null}},computed:{showCurrentSelectedActivity:function(){var e=this;if(null!==this.currentSelectedActivityId&&this.activities&&this.activities.activities){var t=this.activities.activities.filter((function(t){return t.id===e.currentSelectedActivityId}));if(1===t.length)return t[0]}return""},showActivitiesList:function(){return this.getActivities()},showTeacherList:function(){if(this.teachers&&this.teachers.length>0){var e=this.teachers.map((function(e){return e.schools})).flat(),t=this.teachers.map((function(e){return{id:e.id,full:e.name.full.length>0?e.name.full:""}}));return e.map((function(e,n){return Object.assign({},e,t[n])}))}},showSelectedTeacher:function(){if(this.selectedTeacher&&this.selectedTeacher.schools.length>0){var e=this.selectedTeacher.schools.map((function(e){return{color:e.hex_color,is_hidden:e.is_hidden,initials:void 0===e.initials?"":e.initials}}))[0];return{id:this.selectedTeacher.id,schools:e,full:""===this.selectedTeacher.name.full?this.selectedTeacher.name.full:""}}}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&Object.keys(this.aulaToken).length>0&&this.initRender()}},methods:{initRender:function(){var e=this;return r()(l.a.mark((function t(){var n,i,s,a;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.axios.defaults.baseURL="https://api.subit.dk",e.axios.defaults.headers.common["x-client"]="Aula teacher-details",n=!1;try{i=localStorage.getItem("subit_token"),s=localStorage.getItem("subit_token_expires"),(!i||new Date(s).getTime()<(new Date).getTime())&&(n=!0)}catch(e){n=!0}if(!n){t.next=10;break}return t.next=7,e.axios.post("/v2/auth/aula",{jwt_token:e.aulaToken});case 7:a=t.sent,localStorage.setItem("subit_token",a.data.data.access_token),localStorage.setItem("subit_token_expires",a.data.data.expires_at);case 10:return e.axios.defaults.headers.common.Authorization="Bearer "+localStorage.getItem("subit_token"),t.prev=11,t.next=14,e.fetchUser();case 14:return e.user=t.sent,t.next=17,e.fetchTeachers();case 17:if(e.teachers=t.sent,e.selectedTeacher=e.teachers.find((function(t){return t.id===e.user.teacher_id})),!e.user){t.next=26;break}return t.next=22,e.fetchActivities(e.formatDate(e.selectedDate),e.selectedTeacher.user_id);case 22:return e.activities=t.sent,t.next=25,e.fetchCancellationReasons();case 25:e.cancellationReasons=t.sent;case 26:t.next=30;break;case 28:t.prev=28,t.t0=t.catch(11);case 30:return t.prev=30,e.loading=!1,t.finish(30);case 33:case"end":return t.stop()}}),t,null,[[11,28,30,33]])})))()},handleOnClick:function(e){this.currentSelectedActivityId=e},hasProperty:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},toggleLesson:function(){this.lessonCancelled=!this.lessonCancelled},formatDate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD";return this.moment(e).format(t)},selectedColor:function(e){if(this.activities&&this.activities.teachers){var t=this.activities.teachers.map((function(e){return{teacherId:e.id,color:e.schools[0].hex_color}})).find((function(t){return t.teacherId===e}));return t&&t.color?t.color:"#464D66"}},getCancellationReasons:function(){var e=this.cancellationReasons;if(this.activities&&this.activities.activities){var t=this.activities.activities.reduce((function(e,t){return t.cancellation_reason_id?e.concat(t.cancellation_reason_id):e}),[]),n=e.filter((function(e){return t.some((function(t){return e.id===t}))})).find((function(e){return e.value}));if(n)return n.value}},getSubject:function(e){var t=this.activities.subjects.find((function(t){return t.id===e}));return t?t.abbreviation:""},getTutor:function(e){var t=this.activities.tutors.find((function(t){return t.id===e}));return t||""},getTeacherInitial:function(e){if(this.activities&&this.activities.teachers){var t=this.activities.teachers.find((function(t){return t.id===e}));return t&&t.schools.length>0?t.schools[0].initials:""}},getClass:function(e){var t=this.activities.classes.find((function(t){return t.id===e}));return t?t.name:""},getActivities:function(){return this.activities&&this.activities.activities?this.activities.activities:[]},fetchUser:(f=r()(l.a.mark((function e(){var t,n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get("/v2/me");case 2:return t=e.sent,n=t.data,e.abrupt("return",n?n.data:{});case 5:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)}),fetchTeachers:(v=r()(l.a.mark((function e(){var t,n,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get("/v2/teachers");case 2:if(t=e.sent,n=t.data,this.loading=!1,!n){e.next=9;break}return i=n.data.sort((function(e,t){var n=e.name.initials.toUpperCase(),i=t.name.initials.toUpperCase();return""===n?1:""===i?-1:n>i?1:-1})),this.teachers=i.filter((function(e){return e.schools.some((function(e){return!1===e.is_hidden}))})),e.abrupt("return",this.teachers);case 9:return e.abrupt("return",[]);case 10:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)}),fetchActivities:(p=r()(l.a.mark((function e(t,n){var i,s,a;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get("/v2/activities?period=".concat(this.formatDate(this.selectedDate),"&users=").concat(n,"&changed=1&only=teachers,tutors,subjects,classes"));case 2:if(i=e.sent,s=i.data,this.loading=!1,!s){e.next=15;break}if(!s.data){e.next=15;break}if(!(s.data.periods&&s.data.periods.length>0&&s.data.periods[0].activities.length>0)){e.next=13;break}a=s.data.periods[0].activities.filter((function(e){return e.substitute||e.is_cancelled})).sort((function(e,t){return e.starts_at<t.starts_at||e.starts_at==t.starts_at&&e.ends_at>t.ends_at?-1:e.starts_at>t.starts_at||e.starts_at==t.starts_at&&e.ends_at<t.ends_at?1:0})),this.currentSelectedActivityId=a[0].id,this.activities=u(u({},s.data),{},{activities:a}),e.next=14;break;case 13:return e.abrupt("return",this.activities={});case 14:return e.abrupt("return",this.activities);case 15:return e.abrupt("return",{});case 16:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)}),fetchCancellationReasons:(m=r()(l.a.mark((function e(){var t,n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get("/v2/cancellation-reasons");case 2:return t=e.sent,n=t.data,e.abrupt("return",n?n.data:[]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)}),changeDate:(h=r()(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.selectedDate=this.moment(this.selectedDate).add(t,"days"),e.next=3,this.fetchActivities(this.formatDate(this.selectedDate),this.selectedTeacher.user_id);case 3:return this.activities=e.sent,e.next=6,this.fetchCancellationReasons();case 6:this.cancellationReasons=e.sent;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)}),teacherClicked:(d=r()(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.selectedTeacher=this.teachers.find((function(e){return e.id===t})),e.next=3,this.fetchActivities(this.formatDate(this.selectedDate),this.selectedTeacher.user_id);case 3:return this.activities=e.sent,this.showDropdown=!1,e.next=7,this.fetchCancellationReasons();case 7:this.cancellationReasons=e.sent;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})}},_=g,E=n(3),A=Object(E.a)(_,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0070V0001"},[n("div",{staticClass:"subit-widget-container"},[n("div",{staticClass:"details-header"},[n("div",{staticClass:"header-top"},[e.selectedTeacher?n("div",[n("div",{style:{background:"#464d66",color:"white",borderRadius:"50%"}},[n("div",{staticClass:"initial"},[n("span",[e._v(e._s(e.showSelectedTeacher.schools.initials))])])])]):e._e(
1),e._v(" "),e.selectedTeacher&&e.selectedTeacher.name?n("div",{staticClass:"full-name",on:{click:function(t){e.showDropdown=!e.showDropdown}}},[e._v("\n          "+e._s(e.selectedTeacher.name.full.length>0?e.selectedTeacher.name.full:"")+"\n          "),n("i",{staticClass:"fas fa-chevron-down"})]):e._e(),e._v(" "),n("div",{staticClass:"dropdown-wrapper"},[e.showDropdown?n("div",{staticClass:"dropdownMenu"},[n("ul",{staticClass:"dropdown-item"},[e.user?n("li",{staticClass:"list-item currentSelected",on:{click:function(t){return e.teacherClicked(e.user.teacher_id)}}},[n("span",{style:{background:"#2DCC70",color:"white",padding:"5px",borderRadius:"50px",fontSize:"12px",marginRight:"10px"}},[e._v("\n                                  "+e._s(e.user.name.initials)+"\n                              ")]),e._v(" "),n("span",[e._v(e._s(e.user.name.full))])]):e._e(),e._v(" "),e._l(e.showTeacherList,(function(t){return n("li",{key:t.id,staticClass:"list-item",on:{click:function(n){return e.teacherClicked(t.id)}}},[n("span",{style:{background:"#464d66",color:"white",padding:"5px",borderRadius:"50px",fontSize:"12px",marginRight:"10px"}},[e._v("\n                                  "+e._s(t.initials&&t.initials.length>0?t.initials:"")+"\n                              ")]),e._v(" "),n("span",[e._v(e._s(t.full))])])}))],2)]):e._e()]),e._v(" "),n("div",{staticClass:"date"},[n("div",{staticClass:"calendar-left",on:{click:function(t){return e.changeDate(-1)}}},[n("i",{staticClass:"calendar-arrow-left"})]),e._v(" "),n("span",[e._v("\n                      "+e._s(e.formatDate(this.selectedDate,"D MMM"))+"\n                  ")]),e._v(" "),n("div",{staticClass:"calendar-right",on:{click:function(t){return e.changeDate(1)}}},[n("i",{staticClass:"calendar-arrow-right"})])])])]),e._v(" "),n("div",{staticClass:"details-content"},[e.loading?n("div",{staticClass:"loading"},[n("i",{staticClass:"fa fa-spinner"})]):e._e(),e._v(" "),e.loading?e._e():n("div",[this.showActivitiesList&&0===this.showActivitiesList.length?n("div",{staticClass:"no-lesson-container"},[n("p",[e._v("ingen skemaændringer i dag")])]):n("div",{staticClass:"header-bottom"},[n("div",{staticClass:"lessob-box-container"},[n("div",{staticClass:"lesson-box"},e._l(e.showActivitiesList,(function(t){return n("div",{key:t.id,class:{active:t.id===e.currentSelectedActivityId}},[n("div",{class:{grey:t.is_cancelled}},[n("span",{staticClass:"content-wrap",on:{click:function(n){return e.handleOnClick(t.id)}}},[n("span",{staticClass:"relative-content"},[n("span",[n("span",{class:{grey:t.is_cancelled}},[e._v("\n                                                  "+e._s(e.getSubject(t.subject_id))+"\n                                              ")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.id===e.currentSelectedActivityId,expression:"activity.id === currentSelectedActivityId"}],class:{grey:t.is_cancelled}},[e._v("\n                                                  "+e._s(e.getClass(t.class_id))+"\n                                              ")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.id===e.currentSelectedActivityId,expression:"activity.id === currentSelectedActivityId"}],class:{grey:t.is_cancelled}},[e._v("\n                                          "+e._s(e.formatDate(t.starts_at,"HH:mm"))+"\n                                          - "+e._s(e.formatDate(t.ends_at,"HH:mm"))+"\n                                      ")])])])])})),0)])]),e._v(" "),n("div",{staticClass:"teacher-assin-row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showCurrentSelectedActivity&&!e.showCurrentSelectedActivity.is_cancelled,expression:"showCurrentSelectedActivity && !showCurrentSelectedActivity.is_cancelled"}]},[n("div",{staticClass:"teacher-assign"},[e.hasProperty(e.showCurrentSelectedActivity,"substitute")?n("div",[e.activities.tutors.length>0&&"tutor"===e.showCurrentSelectedActivity.substitute.type?n("div",{staticClass:"initial",style:{background:e.selectedColor(e.showCurrentSelectedActivity.teacher_id),color:"white",borderRadius:"50%"}},[e._v("\n                  "+e._s(e.getTutor(e.showCurrentSelectedActivity.substitute.id).name.initials)+"\n                ")]):e._e(
1)]):e._e(),e._v(" "),e.hasProperty(e.showCurrentSelectedActivity,"substitute")?n("div",["teacher"===e.showCurrentSelectedActivity.substitute.type?n("div",{staticClass:"initial",style:{background:e.selectedColor(e.showCurrentSelectedActivity.teacher_id),color:"white",borderRadius:"50%"}},[e._v("\n                  "+e._s(e.getTeacherInitial(e.showCurrentSelectedActivity.substitute.id))+"\n                ")]):e._e()]):e._e(),e._v(" "),n("div",{staticClass:"space"},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"}},[n("path",{attrs:{fill:"none",stroke:"#000",d:"M10 7H2v6h8v5l8-8-8-8v5z"}})])]),e._v(" "),e.selectedTeacher?n("div",{staticClass:"initial",style:{background:e.selectedColor(e.showCurrentSelectedActivity.teacher_id),color:"white",borderRadius:"50%"}},[e._v("\n                "+e._s(e.showSelectedTeacher.schools.initials)+"\n              ")]):e._e(),e._v(" "),e.hasProperty(e.showCurrentSelectedActivity,"substitute")&&e.showCurrentSelectedActivity.substitute.id===e.user.teacher_id?n("span",{staticClass:"title-padding"},[e._v("Lektionen blev tildelt dig")]):e._e(),e._v(" "),e.hasProperty(e.showCurrentSelectedActivity,"substitute")&&e.showCurrentSelectedActivity.substitute.id!==e.user.teacher_id?n("span",{staticClass:"title-padding"},[e._v("Du blev frameldt lektionen")]):e._e()]),e._v(" "),n("div",{staticClass:"line"}),e._v(" "),n("div",{staticClass:"teacher-notes"},[n("div",{staticClass:"note-icon"},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"}},[n("path",{attrs:{fill:"#4d88ff",d:"M0 0v20.667a6 6 0 006 6h4.393L16 32l5.607-5.333H26a6 6 0 006-6V0H0zm30.667 20.667A4.667 4.667 0 0126 25.334h-4.94L16 30.114l-5.06-4.78H6a4.667 4.667 0 01-4.667-4.667V1.334h29.333v19.333zm-23.334-14h17.333V8H7.333V6.667zm0 5.333h17.333v1.333H7.333V12zm0 5.333h13.333v1.333H7.333v-1.333z"}})])]),e._v(" "),n("div",{staticClass:"note-message"},[e.showCurrentSelectedActivity&&e.showCurrentSelectedActivity.notes>1?n("span",[e._v("\n                                  "+e._s(e.showCurrentSelectedActivity&&e.showCurrentSelectedActivity.notes)+" noter tilføjet\n                              ")]):e.showCurrentSelectedActivity&&1===e.showCurrentSelectedActivity.notes?n("span",[e._v("\n                                  "+e._s(e.showCurrentSelectedActivity&&e.showCurrentSelectedActivity.notes)+" note tilføjet\n                              ")]):n("span",[e._v("\n                                  Ingen noter tilføjet\n                              ")])])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showCurrentSelectedActivity&&e.showCurrentSelectedActivity.is_cancelled,expression:"showCurrentSelectedActivity && showCurrentSelectedActivity.is_cancelled"}],staticClass:"cancel-section",on:{click:e.toggleLesson}},[n("div",{staticClass:"lesson-cancel-message"},[n("div",{staticClass:"cancel-icon"},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"}},[n("g",{attrs:{"data-name":"Group 1119"}},[n("g",{attrs:{"data-name":"Group 955"}},[n("g",{attrs:{"data-name":"Ellipse 4"}},[n("path",{attrs:{"data-name":"Path 134",d:"M12 0a12 12 0 016.675 21.974A11.711 11.711 0 0112 24a12 12 0 010-24z",fill:"#c0c5d0"}})]),e._v(" "),n("path",{attrs:{"data-name":"Path 133",d:"M12 4.875a6.812 6.812 0 00-2.721.547 7 7 0 00-2.235 1.5 7 7 0 00-1.5 2.235A6.812 6.812 0 005 11.875a6.812 6.812 0 00.547 2.725 7 7 0 001.5 2.235 7 7 0 002.232 1.493 6.812 6.812 0 002.721.547 6.812 6.812 0 002.721-.547 7 7 0 002.235-1.5 7 7 0 001.5-2.235A6.812 6.812 0 0019 11.875a6.812 6.812 0 00-.547-2.721 7 7 0 00-1.5-2.235 7 7 0 00-2.235-1.5A6.812 6.812 0 0012 4.875zm0 .588a6.489 6.489 0 011.189.109 6.429 6.429 0 011.107.314 6.491 6.491 0 011.012.492 5.784 5.784 0 01.9.67v-.014l-9.103 8.984a5.58 5.58 0 01-.629-.889 6.188 6.188 0 01-.485-1 5.888 5.888 0 01-.291-1.092 6.2 6.2 0 01-.112-1.162 6.263 6.263 0 01.506-2.5 6.523 6.523 0 011.374-2.03A6.523 6.523 0 019.5 5.969a6.263 6.263 0 012.5-.506zm0 12.824a6.678 6.678 0 01-1.285-.123 6.294 6.294 0 01-1.19-.364 6.145 6.145 0 01-1.08-.581 6.4 6.4 0 01-.945-.778v.014l9.133-9.01a6.128 6.128 0 01.738.93 6.6 6.6 0 01.561 1.066 6.274 6.274 0 01.355 1.176 6.4 6.4 0 01.123 1.258 6.263 6.263 0 01-.506 2.5 6.523 6.523 0 01-1.374 2.03 6.523 6.523 0 01-2.03 1.376 6.263 6.263 0 01-2.5.506z",fill:"#fff"}})])])]),e._v(" "),n("span",{staticClass:"grey"},[e._v("Lektionen blev annulleret")])]),e._v(" "),e.lessonCancelled?n("div",{staticClass:"cancel-reason"},[n("span",{staticClass:"circle-with-content"},[n("span",{staticClass:"circle-line"}),e._v(" "),n("span",{staticClass:"para grey"}
1,[e._v(e._s(e.getCancellationReasons()))])])]):e._e()]),e._v(" "),n("div",{staticClass:"arrow-down"},[e.lessonCancelled?e._e():n("i",{staticClass:"fas fa-chevron-down"}),e._v(" "),e.lessonCancelled?n("i",{staticClass:"fas fa-chevron-up"}):e._e()])])])])]),e._v(" "),n("div",{staticClass:"footer"},[n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("mail")]),e._v(" "),n("path",{attrs:{d:"M0 4v18c0 3.314 2.686 6 6 6v0h20c3.314 0 6-2.686 6-6v0-18h-32zM30.667 22c0 2.577-2.089 4.667-4.667 4.667v0h-20c-2.577 0-4.667-2.089-4.667-4.667v0-16.667h29.333v16.667zM28.32 9.113l-0.893-0.987-11.427 10.307-11.36-10.293-0.893 0.987 12.253 11.107 12.32-11.12z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("[email protected]")])]),e._v(" "),n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("smart-phone")]),e._v(" "),n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("70 60 51 02")])])])])])}),[],!1,null,null,null);t.a=A.exports},848:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var c={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:0,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String,moment:Function},data:function(){return{env:"",aulaToken:null,fravaersInfo:[],loading:!1,errorLoading:!1,cachedData:!1,cachedTime:this.moment(new Date),collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),specialStatuses:["Aflyst","Fri","Bortfalder","ArbejderAlene","Opsyn","TilKlassen"],fravaerDate:new Date}},methods:{getVikarData:function(e){var t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=o(t.institutionFilter);try{for(a=function(){for(var n=s.value,i=-1,a=0;a<t.fravaersInfo.length;a++){if(t.fravaersInfo[a].skoleId===n){i=a;break}}-1!==i&&t.fravaersInfo.splice(i,1),t.fravaersInfo.push({skoleId:n,loading:!0,error:!1}),t.fetchFravaersData(n,e).then((function(e){t.fravaersInfo=t.fravaersInfo.map((function(t){return t.skoleId==n&&(t.navn=e.institutionNavn,t.loading=!1,t.data=e),t}))}),(function(e){t.fravaersInfo=t.fravaersInfo.map((function(t){return t.skoleId==n&&(t.data=null,t.loading=!1,t.error=!0,t.errorMessage=e.response&&e.response.data,e.request&&e.request.status&&"500"==e.request.status&&(t.errorMessage="Noget gik galt da der skulle hentes informationer pÃ¥ denne institution.")),t}))}))},i.s();!(s=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}case 2:case"end":return n.stop()}}),n)})))()},fetchFravaersData:function(e,t){var n=this;return new Promise(function(){var i=s()(r.a.mark((function i(s,a){var o,l;return r.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,o=n.moment(n.fravaerDate).toISOString(),i.next=4,n.axios.get("https://api.ist.dk/tjenestetid/aula/widget/api/v2/institution/".concat(e,"/fraverInfo?date=").concat(o),{headers:{Authorization:"Bearer "+t}});case 4:l=i.sent,s(l.data.data),i.next=11;break;case 8:i.prev=8,i.t0=i.catch(0),a(i.t0);case 11:case"end":return i.stop()}}),i,null,[[0,8]])})));return function(e,t){return i.apply(this,arguments)}}())},formatDateToHours:function(e){return this.moment(e).locale("da").format("H:mm")},backDate:function(){this.fravaerDate=this.addDays(this.fravaerDate,-1)},forwardDate:function(){this.fravaerDate=this.addDays(this.fravaerDate,1)},addDays:function(e,t){var n=new Date(e);return n.setDate(n.getDate()+t),n},sortAndFilterActivities:function(e){return e&&e.length>0&&e.sort((function(e,t){return new Date(e.fraTidspunkt).getTime()===new Date(t.fraTidspunkt).getTime()?"AndenKlasseundervisning"===t.type?1:"AndenKlasseundervisning"===e.type?-1:0:new Date(e.fraTidspunkt)-new Date(t.fraTidspunkt)})),e.filter((function(e){return"Pause"!==e.type}))},containsSpecialStatus:function(e){return this.specialStatuses.includes(e.status)},formatStatus:function(e){return"TilKlassen"===e||"ArbejderAlene"===e?"TilKlassen"===e?"Til klassen":"Arbejder alene":e}},computed:{displayDate:function(){return this.moment(this.fravaerDate).format("Do MMMM")},disableNextDay:function(){return"31. juli"===this.moment(this.fravaerDate).format("Do MMMM")},disablePreviousDay:function(){return"1. august"===this.moment(this.fravaerDate).format("Do MMMM")||this.moment(this.fravaerDate).isSame(this.moment(new Date).subtract(29,"days"),"day")},disableDateSelection:function(){return this.fravaersInfo.some((function(e){return e.loading}))}},created:function(){this.moment.locale("da")},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{fravaerDate:function(){this.getVikarData(this.aulaToken)},aulaToken:function(){this.aulaToken&&this.getVikarData(this.aulaToken)},institutionFilter:function(){var e=this;this.fravaersInfo&&this.fravaersInfo.length&&(this.fravaersInfo=this.fravaersInfo.filter((function(t){return e.institutionFilter.find((function(e){return t.skoleId===e}))}))),this.getVikarData(this.aulaToken)}}},u=c,d=n(3),h=Object(d.a)(u,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0071V0001"},[n("div",{staticClass:"widget-container"},[n("div",{staticClass:"df-datepicker"},[n("div",{staticClass:"df-date-button date-back"},[n("b-button",{staticClass:"btn btn-link navbar-btn navbar-link",attrs:{disabled:e.disablePreviousDay||e.disableDateSelection},on:{click:e.backDate}},[n("i",{staticClass:"fas fa-chevron-left"})])],1),e._v(" "),n("div",{staticClass:"df-date"},[e._v("\n        "+e._s(e.displayDate)+"\n      ")]),e._v(" "),n("div",{staticClass:"df-date-button date-forward"},[n("b-button",{staticClass:"btn btn-link navbar-btn navbar-link",attrs:{disabled:e.disableNextDay||e.disableDateSelection},on:{click:e.forwardDate}},[n("i",{staticClass:"fas fa-chevron-right"})])],1)]),e._v(" "),n("div",{staticClass:"fravaer-skemaer"},e._l(e.fravaersInfo,(function(t){return n("div",{key:t.skoleId,staticClass:"ist-skema"},[t.error?e._e():n("div",{staticClass:"top-bar"},[n("span",[t.data?n("h2",{attrs:{align:"center"}},[e._v("\n              Skemaændringer for "+e._s(t.data.institutionNavn)+"\n            ")]):n("span",{staticClass:"title-card"},[n("h2",{staticClass:"loading",attrs:{align:"center"}},[e._v("Henter skemaændringer for "+e._s(t.skoleId))])])]),e._v(" "),n("span",[t.data&&t.data.cachedDate?n("h6",{staticClass:"text-muted",attrs:{align:"center"}},[e._v("\n              - Sidst opdateret "+e._s(e.formatDateToHours(t.data.cachedDate))+"\n            ")]):e._e(
1)])]),e._v(" "),t.errorMessage?n("div",{staticClass:"fravaer-bottom"},[n("span",[n("h5",[e._v(e._s(t.skoleId)+":")])]),e._v(" "),n("span",[e._v("Fejl ved henting af dagens skemaændringer. Besked:")]),e._v("\n          "+e._s(t.errorMessage)+"\n        ")]):e._e(),e._v(" "),t.data?n("div",[t.data.fravaerendeLaeerer&&t.data.fravaerendeLaeerer.length>0?n("div",[n("b-card",{staticClass:"title-card"},[n("h5",{attrs:{align:"center"}},[e._v("Fraværende personale")])]),e._v(" "),n("b-card-group",{attrs:{columns:""}},e._l(t.data.fravaerendeLaeerer,(function(t){return n("div",{key:t.betegnelse},[n("b-card",{staticClass:"kort"},[n("div",{staticClass:"nameContainer"},[e._v("\n                    "+e._s(t.personNavn)+" ("+e._s(t.betegnelse)+")\n                    "),e._l(t.tider,(function(t){return n("span",{key:t.from,staticStyle:{"white-space":"nowrap"}},[e._v("("+e._s(e.formatDateToHours(t.from))+" - "+e._s(e.formatDateToHours(t.to))+")")])})),e._v("\n                    -\n                    "),n("span",{staticStyle:{"white-space":"nowrap"}},[e._v("("+e._s(t.aarsager.join(", "))+")")])],2),e._v(" "),n("table",{staticClass:"table"},[n("tbody",e._l(e.sortAndFilterActivities(t.aktiviteter),(function(i){return n("tr",{key:i.id,class:{changedRow:i.personaleDeltagerInitialer&&-1===i.personaleDeltagerInitialer.indexOf(t.betegnelse)||e.containsSpecialStatus(i),akuRow:"AndenKlasseundervisning"===i.type}},[n("td",{staticClass:"periodTd"},[e._v("\n                        "+e._s(e.formatDateToHours(i.fraTidspunkt))+" -\n                        "+e._s(e.formatDateToHours(i.tilTidspunkt))+"\n                      ")]),e._v(" "),n("td",{staticClass:"leftBorderTd"},[i.gruppeDeltagerNavne&&i.gruppeDeltagerNavne.length>0?n("span",[e._v(e._s(i.gruppeDeltagerNavne.join(", "))+" -")]):e._e(),e._v("\n                        "+e._s(i.emne.kortBeskrivelse||i.emne.beskrivelse||i.bemaerkning)+"\n                      ")]),e._v(" "),n("td",{staticClass:"leftBorderTd"},[e.containsSpecialStatus(i)?n("div",[e._v("\n                          "+e._s(e.formatStatus(i.status))+"\n                        ")]):i.personaleDeltagerInitialer&&i.personaleDeltagerInitialer.length>0?n("div",[e._v("\n                          "+e._s(i.personaleDeltagerInitialer.join(", "))+"\n                        ")]):"AndenKlasseundervisning"===i.type?n("div",[e._v("\n                          "+e._s(t.betegnelse)+"\n                        ")]):e._e()])])})),0)])])],1)})),0)],1):n("div",[n("b-card",{staticClass:"title-card"},[n("h5",{attrs:{align:"center"}},[e._v("Intet fraværende personale i dag")])])],1),e._v(" "),t.data.laerereMedAendringer.length>0?n("div",[n("b-card",{staticClass:"title-card"},[n("h5",{staticClass:"title-card",attrs:{align:"center"}},[e._v("Personale med skemaændringer")])]),e._v(" "),n("b-card-group",{attrs:{columns:""}},e._l(t.data.laerereMedAendringer,(function(t){return n("b-card",{key:t.betegnelse,staticClass:"kort"},[n("div",{staticClass:"nameContainer"},[e._v(e._s(t.personNavn)+" ("+e._s(t.name)+")")]),e._v(" "),n("table",{staticClass:"table"},[n("tbody",e._l(e.sortAndFilterActivities(t.aktiviteter),(function(i){return n("tr",{key:i.id,class:{changedRow:i.personaleDeltagerInitialer||"AndenKlasseundervisningFri"===i.status||"Timebyt"===i.type}},[n("td",{staticClass:"periodTd"},[e._v("\n                      "+e._s(e.formatDateToHours(i.fraTidspunkt))+" -\n                      "+e._s(e.formatDateToHours(i.tilTidspunkt))+"\n                    ")]),e._v(" "),n("td",{staticClass:"leftBorderTd"},[i.gruppeDeltagerNavne&&i.gruppeDeltagerNavne.length>0?n("span",[e._v(e._s(i.gruppeDeltagerNavne.join(", "))+" -")]):e._e(),e._v("\n                      "+e._s(i.emne.kortBeskrivelse||i.bemaerkning||i.emne.beskrivelse)+"\n                    ")]),e._v(" "),n("td",{staticClass:"leftBorderTd"},[e.containsSpecialStatus(i)?n("div",[e._v("\n                        "+e._s(e.formatStatus(i.status))+"\n                      ")]):"AndenKlasseundervisningFri"===i.status||"AKUFriBrugtTilVikardaekning"===i.status?n("div",[e._v("\n                        "+e._s(i.bemaerkning)+"\n                        ")]):i.personaleDeltagerInitialer?n("div",[e._v("\n                        "+e._s(i.personaleDeltagerInitialer.join(", "))+"\n                      ")]):n("div",[e._v(e._s(t.name))])])])})),0)])])})),1)],1):n("div",[n("b-card",{staticClass:"title-card"},[n("h5",{attrs:{align:"center"}}
1,[e._v("Intet personale med skemaændringer")])])],1)]):e._e()])})),0)])])}),[],!1,null,null,null);t.a=h.exports},849:function(e,t,n){"use strict";var i={props:{assuranceLevel:Number,axios:Function,childFilter:[String,Array],currentWeekNumber:String,getAulaToken:Function,group:String,institutionFilter:[String,Array],isMobileApp:Boolean,placement:String,sessionUUID:String,userProfile:String},data:function(){return{link:"https://api.minuddannelse.net/aula/redirect",aulaToken:null,showLink:!1,tempAulaToken:"",widgetName:"AbsenceRegistration"}},watch:{aulaToken:function(){void 0!==this.aulaToken&&(this.showLink=!0)}},computed:{getTempAulaToken:function(){return this.tempAulaToken}},methods:{addAulaTokenOnSubmit:function(e){var t=this;e.preventDefault(),this.tempAulaToken=this.aulaToken,setTimeout((function(){Array.isArray(t.$refs.muAbsenceRegistrationForm)?t.$refs.muAbsenceRegistrationForm[0].submit():t.$refs.muAbsenceRegistrationForm.submit(),setTimeout((function(){t.tempAulaToken=""}),500)}),500)}},mounted:function(){this.showLink=!1,this.aulaToken=this.getAulaToken()}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0072V0001"},[n("div",[n("form",{ref:"muAbsenceRegistrationForm",attrs:{method:"GET",target:"_blank",action:e.link},on:{submit:e.addAulaTokenOnSubmit}},[n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"widgetName"},domProps:{value:e.widgetName}}),e._v(" "),e.showLink?n("b-button",{staticClass:"absenceRegistrationButton",attrs:{role:"link",title:"https://www.minuddannelse.net",type:"submit"}},[n("b-row",{staticClass:"button-logo"},[n("div",{staticClass:"logo"},[n("b-img",{attrs:{src:"https://www.minuddannelse.net/Content/Graphics/Frontpage/frontpage_logo_elev.svg",alt:"MU Elev logo"}})],1),e._v(" "),n("div",[e._v("\n            Indmeld fravær\n          ")])])],1):e._e()],1)])])}),[],!1,null,null,null);t.a=a.exports},85:function(e,t,n){"use strict";var i,s=n(0),a=n(6),r=n(63),o=n(10),l=n(26),c=n(229),u=n(450),d=n(5),h=n.n(d),m=n(177),p=n(163),v=n(8),f=n(14),g=n(30),_=n(44),E=n(36),A=n(92),T=n(748),b=n.n(T),C=n(142),k=n.n(C),y=n(48),I=n.n(y),S=n(451),D=n(447),w=n(253),N=n(25),R=n(27),O=n(51),L=n(249),x=n(32),P=n(52),M=n(132),F=n(133),U=function(e){return e.institutionRoles.includes(l.a.EARLY_STUDENT)};!function(e){e.ALL="all",e.UNREAD="unread",e.MARKED="marked",e.EMPLOYEES="employees",e.STAFFS="staffs",e.PARENTS="parents",e.STUDENTS="students",e.OWN_POST="ownPost",e.BOOKMARKED="bookmarked"}(i||(i={}));var B=n(4),V=n(305),W=n(168),G=n.n(W),H=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))};var j=n(18),Y=n(477),$=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},z={components:{Post:V.a},props:{posts:{type:Array,required:!0},notifications:{type:Array,default:()=>[]}},emits:["edit","delete","report","post-marked-read"],setup(e,{emit:t}){const{proxy:n}=Object(B.getCurrentInstance)(),i=Object(B.toRef)(e,"posts"),a=Object(B.toRef)(e,"notifications"),{posts:r,assignPosts:o,toggleBookmark:l}=Object(Y.a)(),{itemRefs:c}=((e,t)=>{const n={},i=Object(B.reactive)({});let s=null,a=null;const r=()=>{s||(s=new IntersectionObserver((e=>{e.forEach((e=>{const n=parseInt(e.target.dataset.id);e.isIntersecting&&G()(n)&&(i[n]=!0,null==t||t(n),null==s||s.unobserve(e.target))}))}),{rootMargin:"-60px 0px 0px 0px"}),e.value.forEach((e=>{const t=n[e.id];t&&(null==s||s.observe(t))})))},o=()=>{a&&(clearTimeout(a),a=null),window.removeEventListener("scroll",l)},l=()=>{o(),r()};return Object(B.onMounted)((()=>{window.addEventListener("scroll",l,{passive:!0}),a=setTimeout((()=>{o(),r()}),3e3)})),Object(B.onUnmounted)((()=>{null==s||s.disconnect(),o()})),Object(B.watch)(e,(e=>H(void 0,void 0,void 0,(function*(){yield Object(B.nextTick)(),e.forEach((e=>{const t=n[e.id];t&&!i[e.id]&&(null==s||s.observe(t))}))}))),{deep:!0,immediate:!0}),{itemRefs:n,readStates:i}})(i,(e=>{const i=(e=>a.value.filter((t=>t.notificationArea===O.a.POSTS&&t.postId==e&&t.notificationEventType===j.a.POST_SHARED_WITH_ME)).map((e=>({notificationId:e.notificationId,institutionProfileId:e.institutionProfileId}))))(e);i.length>0&&(n.$store.dispatch(s.a.DELETE_NOTIFICATIONS,{notifications:i}),t("post-marked-read",e))}));return Object(B.watch)((()=>e.posts),(()=>{o(e.posts)}),{immediate:!0}),{postRefs:c,displayedPosts:r,emitEdit:e=>{t("edit",e)},emitDelete:e=>{t("delete",e)}
1,emitReport:e=>{t("report",e)},handleToggleBookmark:e=>$(this,void 0,void 0,(function*(){yield l(e);const t=(e.isBookmarked?n.$t("post.post_bookmarked"):n.$t("post.post_unbookmarked")).toString();n.$showToast(t)}))}}},q=n(3),K=Object(q.a)(z,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition-group",{staticClass:"post-list",attrs:{name:"list",tag:"div"}},e._l(e.displayedPosts,(function(t){return n("Post",{key:t.id,attrs:{post:t,notifications:e.notifications},on:{edit:e.emitEdit,delete:e.emitDelete,report:e.emitReport,toggleBookmark:e.handleToggleBookmark},scopedSlots:e._u([{key:"footer",fn:function(){return[n("div",{ref:function(n){return e.postRefs[t.id]=n},refInFor:!0,staticClass:"sentinel",attrs:{"data-id":t.id}})]},proxy:!0}],null,!0)})})),1)}),[],!1,null,"278bcf44",null).exports,Q=n(13),J=n(246),Z=function(e,t,n,i){return new(n||(n=Promise))((function(s,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},X={components:{PostList:K,ObservedTarget:F.a,ObservingContainer:M.a,AulaButtons:P.a,AulaButton:x.a,AulaNavigationToolbar:L.a,DailyOverview:D.a,ImportantDateOverview:S.a,alerts:m.a,NewPost:c.a,Birthdays:u.a,MultiButtonMobile:p.a,WidgetPlaceholder:w.a},provide(){return{[R.a.onRemoveMediaFromAlbum]:e=>{const t=this.posts[this.parent].find((e=>e.id==this.$route.params.postId));this.removeAttachmentFromPost({parent:this.parent,post:t,attachment:e})}}},beforeRouteLeave(e,t,n){this.writingComment?(this.nextRoute=n,this.$refs.cancelCommentModal.show()):n()},props:{parent:{type:String,default:f.a.PROFILE}},data:function(){return{loading:!1,editPostId:void 0,loadingMore:!1,moment:h.a,permissionEnum:o.a,institutionRole:l.a,portalRoles:v.a,parentTypes:f.a,moduleTypes:g.a,drawerShow:!1,title:"Seneste",newPostTitle:"",newPostText:"",newPostSharedWith:"",showUsersToShareWith:!1,chosenFilter:i.ALL,reportedContentReason:"",nextRoute:"",showWarningReasonLength:!1,warningReasonLength:null,postIdToDelete:"",postIndex:0,postPageComponent:"overview",cachedUnreadPosts:[],cachedNotifications:[]}},computed:Object.assign(Object.assign({},Object(a.c)({date:s.a.GET_DATE,time:s.a.GET_TIME,posts:s.a.GET_POSTS,morePostsExist:s.a.GET_MORE_POSTS_EXIST,children:s.a.GET_CHILDREN,activeChildren:s.a.GET_ACTIVE_CHILDREN,activeInstitutions:s.a.GET_ACTIVE_INSTITUTIONS,institutions:s.a.GET_INSTITUTIONS,userGroups:s.a.GET_USER_GROUPS,hasPermission:s.a.HAS_PERMISSION,group:s.a.GET_ACTIVE_GROUP,hasPermissionGroup:s.a.HAS_PERMISSION_ON_GROUP,hasPermissionOnInstitution:s.a.HAS_PERMISSION_ON_INSTITUTION,isSteppedUp:s.a.GET_GLOBAL_STEPPED_UP,isPreviewMode:s.a.GET_IS_PREVIEW_MODE,moduleWidgetConfig:s.a.GET_PAGE_CONFIGURATION,menuItems:s.a.GET_MENU_ITEMS,isMobile:s.a.GET_IS_MOBILE,writingComment:s.a.GET_WRITING_COMMENT,notifications:s.a.GET_NOTIFICATIONS,hasNonBlockingProfiles:s.a.GET_HAS_NON_BLOCKING_PROFILES})),{notificationStore:()=>Object(J.a)(),userProfileStore:()=>Object(Q.a)(),profile(){return this.userProfileStore.institutionProfile},isVisibleBookmarkInfo(){return this.chosenFilter===i.BOOKMARKED&&this.currentPosts.length>0},isProfileLoaded(){return!1===this.userProfileStore.isLoading},isLoadingNotifications(){return this.notificationStore.isLoading},showCreateButton(){if(this.parent===f.a.PROFILE){return!(this.profile.communicationBlock&&!this.hasNonBlockingProfiles)&&!this.isPreviewMode&&this.hasCreateOptions}if(this.parent===f.a.GROUP){return!Object(A.a)(this.institutions,this.group).every((e=>e.communicationBlock))&&null!=this.group&&(this.hasPermissionGroup(o.a.WRITE_POST,this.group.id)||this.hasPermissionOnInstitution(o.a.USE_GROUPS_AS_DISTRIBUTION_LISTS,this.group.institutionCode))}return!1},hasCreateOptions(){return this.multiButtonItems.some((e=>this.hasOneOfTheFollowingPermissions(e.permissions)&&this.hasModule(e.module)))},notificationAreas:()=>[O.a.POSTS,O.a.CALENDAR,O.a.PRESENCE,O.a.MESSAGES,O.a.FILE_SCANNING],observerOptions:()=>({rootMargin:"50%"}),currentPosts(){const e=this.posts[this.parent]||[];if(this.chosenFilter===i.UNREAD){const t=new Set(e.map((e=>e.id))),n=this.cachedUnreadPosts.filter((e=>!t.has(e.id)));return[...e,...n]}return this.chosenFilter===i.BOOKMARKED?e.filter((e=>!0===e.isBookmarked)):e},isOnNoticeBoard(){return"notice-board"===this.$route.name},postPageLayout(){return this.parent===f.a.GROUP?"":"posts"},configSections(){return[{name:"POSTS_FILTER_ALL",filter:i.ALL,portalRoles:[v.a.EMPLOYEE,v.a.CHILD,v.a.GUARDIAN,v.a.OTP]},{name:"POSTS_FILTER_UNREAD",filter:i.UNREAD,portalRoles:[v.a.EMPLOYEE,v.a.CHILD,v.a.GUARDIAN,v.a.OTP]},{name:"POSTS_FILTER_MARKED",filter:i.MARKED,portalRoles:[v.a.EMPLOYEE,v.a.CHILD,v.a.GUARDIAN,v.a.OTP]},{name:"POSTS_FILTER_EMPLOYEES",filter:i.EMPLOYEES,portalRoles:[v.a.EMPLOYEE]},{name:"POSTS_FILTER_STAFFS",filter:i.STAFFS,portalRoles:[v.a.CHILD,v.a.GUARDIAN,v.a.OTP]},{name:"POSTS_FILTER_PARENTS",filter:i.PARENTS,portalRoles:[v.a.GUARDIAN,v.a.OTP]},{name:"POSTS_FILTER_STUDENTS",filter:i.STUDENTS,portalRoles:[v.a.CHILD]},{name:"POSTS_FILTER_OWN",filter:i.OWN_POST,portalRoles:[v.a.EMPLOYEE,v.a.CHILD,v.a.GUARDIAN]},{name:"POSTS_FILTER_BOOKMARK",filter:i.BOOKMARKED,portalRoles:[v.a.EMPLOYEE,v.a.CHILD,v.a.GUARDIAN,v.a.OTP]}].filter((e=>e.portalRoles.includes(this.profile.role)))},noPosts(){const e="all"===this.chosenFilter?"":"_"+b()(this.chosenFilter);return this.$getText("NO_POSTS"+e)},multiButtonItems(){return[{icon:"icon-Aula_home",text:"POSTS_MENU_LABEL_HOME",label:"POSTS_MENU_LABEL_CREATE_POST",action:"newPost",permissions:[o.a.WRITE_POST,o.a.USE_GROUPS_AS_DISTRIBUTION_LISTS],module:g.a.OVERVIEW},{icon:"icon-Aula_calendar",text:"POSTS_MENU_LABEL_CALENDARPOST",label:"POSTS_MENU_LABEL_CREATE_CALENDARPOST",action:"newEvent",permissions:[o.a.HANDLE_EVENTS],module:g.a.CALENDAR},{icon:"icon-Aula_calendar",text:"POSTS_CREATE_LABEL_MEETING",label:"POSTS_MENU_LABEL_CREATE_PARENT_MEETING_POST",action:"newMeetingEvent",permissions:[o.a.HANDLE_PARENTAL_MEETING_SCHOOL,o.a.HANDLE_PARENTAL_MEETING_DAYCARE,o.a.HANDLE_PERFORMANCE_MEETING],module:g.a.CALENDAR},{icon:U(this.profile)?"icon-Aula_write":"icon-Aula_conversation",text:"POSTS_MENU_LABEL_NEW_MESSAGE",label:"POSTS_MENU_LABEL_CREATE_MESSAGE",action:"newMessage",permissions:[o.a.WRITE_MESSAGE],module:g.a.MESSAGES},{icon:"icon-Aula_picture",text:"POSTS_MENU_LABEL_ALBUM",label:"POSTS_MENU_LABEL_CREATE_ALBUM",action:"newAlbum",permissions:[o.a.HANDLE_MEDIA],module:g.a.GALLERY},{icon:"icon-Aula_paper",text:"POSTS_MENU_LABEL_SECURE_FILE_SHARING",label:"POSTS_MENU_LABEL_SECURE_FILE_SHARING",action:"checkStepUp",permissions:[o.a.HANDLE_SECURE_FILES],module:g.a.DOCUMENTS},{icon:"icon-Aula_paper",text:"POSTS_MENU_LABEL_SECURE_FILE_NOTE",label:"POSTS_MENU_LABEL_SECURE_FILE_NOTE",action:"checkStepUpForNote",permissions:[o.a.HANDLE_SECURE_FILES],module:g.a.DOCUMENTS}]},multiButtonGroupItems:()=>[{icon:"icon-Aula_home",text:"POSTS_MENU_LABEL_HOME",label:"POSTS_MENU_LABEL_CREATE_POST",action:"newPost"}],getListWidgets(){return null!=this.menuItems?this.menuItems[r.a.RIGHT_OF_OVERVIEW]:[]}}),watch:{activeChildren(){this.profile.role!==v.a.GUARDIAN&&this.profile.role!==v.a.OTP||this.reload()},activeInstitutions(){this.institutions.length>1&&this.activeInstitutions.length>0&&this.profile.role===v.a.EMPLOYEE&&this.reload()},profile(e,t){I()(e,t)||this.loading||!this.isProfileLoaded||this.reload()},userGroups(e){e.length&&!this.loading&&this.isProfileLoaded&&this.reload()},group(e){k()(e)&&this.reload()},isLoadingNotifications:{immediate:!0,handler(e){!1===e&&(this.cachedNotifications=[...this.notifications])}}},mounted(){this.parent!==f.a.PROFILE&&this.$router.currentRoute.query.filter&&(this.chosenFilter=this.$router.currentRoute.query.filter),this.loading||this.getPosts(),this.isMobile||this.parent!=f.a.PROFILE||setTimeout((()=>{const e=this.$el.querySelector(".post-header-container .posts-title");e&&e.focus()}),500)},destroyed(){this.resetPosts()},methods:Object.assign(Object.assign({isEarlyStudent:U,onBottomReached(){!this.loading&&this.morePostsExist&&this.getPosts()},onTabItemClicked(e){this.chosenFilter=e.filter,this.reload()},hasOneOfTheFollowingPermissions(e){if(!e)return!0;for(const t of e)if(this.hasPermission(t))return!0;return!1},hasModule(e){if(!e)return!0;
1if(null!=this.moduleWidgetConfig.moduleConfigurations)for(const t of this.moduleWidgetConfig.moduleConfigurations)if(t.module.type==e&&t.aggregatedDisplayMode==_.a.SHOWN)return!0;return!1},executeMethodDynamically(e){this[e]()},getFilterAriaLabel(e){return this.$getText("ARIA_LABEL_SHOW_POSTS_FROM")+this.$getText(e)},checkStepUp(){this.isSteppedUp?this.$router.push({name:"documentsSecureNew",params:{institutionCode:this.profile.institutionCode}}):this.setStepUpNotification({showStepUpNotification:!0,redirectedUrl:window.location.href})},checkStepUpForNote(){this.isSteppedUp?this.$router.push({name:"createDocumentNote",params:{institutionCode:this.profile.institutionCode}}):this.setStepUpNotification({showStepUpNotification:!0,redirectedUrl:window.location.href})},newAlbum(){this.$router.push({name:"createAlbum"})},newEvent(){this.$router.push("/kalender/opretbegivenhed")},newPost(){this.editPostId=void 0,this.isPreviewMode||(this.hasPermission(o.a.WRITE_POST)||this.hasPermission(o.a.USE_GROUPS_AS_DISTRIBUTION_LISTS)?this.drawerShow=!0:this.$refs.warningPreventModal.show())},newMessage(){this.$router.push({name:"newMessage"})},newMeetingEvent(){this.$router.push({name:"createMeetingEvent"})},editPost(e){this.parent===f.a.PROFILE?this.isPreviewMode||(this.hasPermission(o.a.WRITE_POST)||this.hasPermission(o.a.USE_GROUPS_AS_DISTRIBUTION_LISTS)?(this.editPostId=e,this.drawerShow=!0):this.$refs.warningPreventModal.show()):this.$router.push({name:"group-edit-post",params:{id:e},query:{filter:this.chosenFilter}})},reportPostClicked(e){this.profile.communicationBlock&&!this.hasNonBlockingProfiles?this.$refs.blockedCommunicationModal.show():(this.postIdToDelete=e,this.reportedContentReason="",this.resetCommentForm(
1),this.$refs.reportContentModal.show())},resetCommentForm(){this.showWarningReasonLength=!1,this.warningReasonLength=null},saveReportPost(){this.reportedContentReason.length<10||this.reportedContentReason.length>255?(this.showWarningReasonLength=!0,this.warningReasonLength=this.reportedContentReason.length<10?"REPORTED_CONTENT_REASON_LENGTH_WARNING_TOO_SHORT":"REPORTED_CONTENT_REASON_LENGTH_WARNING_TOO_LONG"):(this.resetCommentForm(),this.reportPost({id:this.postIdToDelete,reportReason:this.reportedContentReason}).then((()=>{this.$refs.reportContentModal.hide(),this.reportedContentReason="",this.mutateRemovePostById({id:this.postIdToDelete,parent:this.parent})})))},changeDrawerShow(){this.drawerShow=!this.drawerShow},closeDrawer(){this.drawerShow=!1,this.editPostId=void 0},postSubmitted(){this.closeDrawer(),this.reload(),this.scrollTop()},scrollTop(){window.scrollTo(0,0)},newInlinePost(){this.isPreviewMode||(this.hasPermission(o.a.WRITE_POST)||this.hasPermission(o.a.USE_GROUPS_AS_DISTRIBUTION_LISTS)?this.$router.push({name:"group-create-post",query:{filter:this.chosenFilter}}):this.$refs.warningDialogVisible.show())},getPosts(){var e,t,n,s;return Z(this,void 0,void 0,(function*(){const a=this.parent;let r=[],o=null,l=null,c=null,u=null,d=null,h=null;switch((null===(e=this.profile)||void 0===e?void 0:e.role)==v.a.EMPLOYEE?r=this.institutions.filter((e=>this.activeInstitutions.includes(e.institutionCode))).map((e=>e.institutionProfileId)):(null===(t=this.profile)||void 0===t?void 0:t.role)==v.a.GUARDIAN?(r=this.institutions.map((e=>e.institutionProfileId)),r=r.concat(this.children.filter((e=>this.activeChildren.includes(e.id))).map((e=>e.id)))):(null===(n=this.profile)||void 0===n?void 0:n.role)==v.a.CHILD?r=this.institutions.map((e=>e.institutionProfileId)):(null===(s=this.profile)||void 0===s?void 0:s.role)==v.a.OTP&&(r=this.activeChildren,r=r.concat(this.institutions.filter((e=>e.children.filter((e=>this.activeChildren.includes(e.id))).length>0)).map((e=>e.institutionProfileId)))),this.parent===f.a.GROUP&&(o=this.$route.params.groupId),this.loading=!0,this.chosenFilter){case i.MARKED:l=!0;break;case i.UNREAD:d=!0;break;case i.STAFFS:case i.EMPLOYEES:h=v.a.EMPLOYEE;break;case i.STUDENTS:h=v.a.CHILD;break;case i.PARENTS:h=v.a.GUARDIAN;break;case i.OWN_POST:c=!0;break;case i.BOOKMARKED:u=!0}const m={groupId:o,parent:a,index:this.postIndex,isImportant:l,isUnread:d,ownPost:c,isBookmarked:u,creatorPortalRole:h,institutionProfileIds:r,limit:10};E.a.Read("fromAdminGroup")&&this.parent==f.a.GROUP&&null!=o?(this.hasPermissionOnInstitution(this.permissionEnum.SEARCH_ACCESS_GROUPS,this.group.institutionCode)||this.hasPermission(this.permissionEnum.SEARCH_ACCESS_GROUPS)&&this.institutions.find((e=>e.institutionType==N.a.MUNICIPALITY)))&&(yield this.loadAdminPosts(m)):this.parent===f.a.NOTICE_BOARDS?yield this.loadNoticeBoardPosts(m):yield this.loadPosts(m),this.loading=!1,this.postIndex+=10}))},deleteThisPost(){this.deletePost({id:this.postIdToDelete}).then((()=>{this.$refs.deleteModal.hide(),this.mutateRemovePostById({id:this.postIdToDelete,parent:this.parent})}))},showDeleteModal(e){this.postIdToDelete=e,this.$refs.deleteModal.show()},reload(){this.postIndex=0,this.resetPosts(),this.getPosts()},addPostToUnreadCache(e){if(!this.cachedUnreadPosts.some((t=>t.id===e))){const t=this.currentPosts.find((t=>t.id===e));t&&this.cachedUnreadPosts.push(t)}}},Object(a.b)({toggleEventForm:s.a.TOGGLE_EVENT_FORM,loadPosts:s.a.ACTION_GET_POSTS,loadAdminPosts:s.a.ACTION_GET_POSTS_ADMIN,loadNoticeBoardPosts:s.a.LOAD_NOTICE_BOARD_POSTS,deletePost:s.a.ACTIONS_DELETE_POST,reportPost:s.a.REPORT_POST,removeAttachmentFromPost:s.a.SLICE_ATTACHMENT_FROM_POST,loadNotifications:s.a.LOAD_NOTIFICATIONS})),Object(a.d)({setStepUpNotification:s.a.MUTATE_SET_NOTIFICATION_STEP_UP,updateWritingComment:s.a.MUTATE_WRITING_COMMENT,mutateRemovePostById:s.a.MUTATE_REMOVE_POST_BY_ID,resetPosts:s.a.MUTATE_EMPTY_POSTS}))},ee=Object(q.a)(X,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-layout-padding",attrs:{id:"aula-posts","data-layout":e.postPageLayout}},[e.parent!==e.parentTypes.GROUP?n("alerts",{staticClass:"mb-4",class:{"p-2":e.isMobile},attrs:{parent:e.parent,"filtered-areas":e.notificationAreas},on:{updated:function(t){return e.loadNotifications({activeChildrenIds:e.activeChildren,activeInstitutionCodes:e.activeInstitutions})}}}
1):e._e(),e._v(" "),e.isMobile?e._e():n("div",{staticClass:"pb-2"},[e.parent!==e.parentTypes.NOTICE_BOARDS?n("div",{staticClass:"post-header-container"},[n("div",{staticClass:"posts-header"},[n("h1",{staticClass:"posts-title",attrs:{"data-testid":"post-title",tabindex:"-1","aria-label":e.$getText("ARIA_LABEL_POSTS")}},[e._v("\n          "+e._s(e.$getText("POSTS_PAGETITLE"))+"\n        ")]),e._v(" "),e.parent===e.parentTypes.PROFILE&&e.showCreateButton?n("b-nav",[n("b-nav-item-dropdown",{staticClass:"dropdown-select",attrs:{right:"","no-caret":""}},[n("template",{slot:"button-content"},[n("b-btn",{attrs:{size:"lg"}},[e._v("\n                "+e._s(e.$getText("POSTS_CREATE"))+"\n                "),n("span",{staticClass:"small-icon icon-Aula_close m-4",attrs:{"aria-hidden":"true"}}),e._v(" "),n("span",{staticClass:"small-icon icon-Aula_down-arrow m-4"})])],1),e._v(" "),e._l(e.multiButtonItems,(function(t,i){return[e.hasOneOfTheFollowingPermissions(t.permissions)&&e.hasModule(t.module)?n("b-dropdown-item",{key:i,attrs:{role:"button"},on:{click:function(n){return e.executeMethodDynamically(t.action)}}},[e.isEarlyStudent(e.profile)?n("img",{staticClass:"menu-icon",attrs:{src:"static/icons/"+t.icon+"_child.svg"}}):n("i",{class:t.icon}),e._v(" "),n("span",[e._v(e._s(e.$getText(t.text)))])]):e._e()]}))],2)],1):e.parent===e.parentTypes.GROUP&&e.showCreateButton?n("b-btn",{staticClass:"tool-link",attrs:{variant:"link"},on:{click:e.newInlinePost}},[n("i",{staticClass:"icon icon-Aula_plus in-circle"}),e._v("\n          "+e._s(e.$getText("POSTS_CREATE"))+"\n        ")]):e._e()],1),e._v(" "),n("AulaNavigationToolbar",{staticClass:"tabs-nav config-sections"},[n("AulaButtons",{staticClass:"h-100 tabs-buttons"},e._l(e.configSections,(function(t,i){return n("AulaButton",{key:i,staticClass:"tab-item text-uppercase",class:{"active-tab":t.filter===e.chosenFilter},attrs:{fill:"clear","aria-selected":t.filter===e.chosenFilter},on:{click:function(n){return e.onTabItemClicked(t)}}},[t.icon?[n("i",{class:t.icon}
1),e._v(" - ")]:e._e(),e._v(" "),n("span",{staticClass:"sr-only",attrs:{"aria-label":e.getFilterAriaLabel(t.name)}}),e._v(" "),n("span",{attrs:{"aria-hidden":"true"}},[e._v(e._s(e.$getText(t.name)))])],2)})),1)],1)],1):e._e(),e._v(" "),e.isPreviewMode?e._e():n("ObservingContainer",{attrs:{options:e.observerOptions}},[e.isVisibleBookmarkInfo?n("p",{staticClass:"p-4 text-center"},[e._v("\n        "+e._s(e.$t("post.bookmark_post_info"))+"\n      ")]):e._e(),e._v(" "),n("PostList",{attrs:{posts:e.currentPosts,notifications:e.cachedNotifications},on:{edit:e.editPost,delete:e.showDeleteModal,report:e.reportPostClicked,"post-marked-read":e.addPostToUnreadCache}}),e._v(" "),e.loading?n("aula-spinner"):e._e(),e._v(" "),e.currentPosts.length>0?n("ObservedTarget",{on:{onIntersecting:e.onBottomReached}}):e._e()],1),e._v(" "),0!==e.currentPosts.length||e.loading||e.isPreviewMode?e._e():[e._v("\n      "+e._s(e.noPosts)+"\n    ")]],2),e._v(" "),e.isMobile?n("div",[n("transition",{attrs:{name:"slide-only",appear:""}},[e.parent!=e.parentTypes.PROFILE||e.isPreviewMode?e._e():n("b-navbar",{staticClass:"mobile-page-navbar",attrs:{toggleable:!1}},[n("b-navbar-nav",[n("b-nav-item",{class:"overview"==e.postPageComponent?"active":"",attrs:{"aria-selected":"overview"==e.postPageComponent},on:{click:function(t){e.postPageComponent="overview"}}},[e._v("\n            "+e._s(e.$getText("POSTS_TAB_OVERVIEW"))+"\n          ")]),e._v(" "),n("b-nav-item",{class:"myday"==e.postPageComponent?"active":"",attrs:{"aria-selected":"myday"==e.postPageComponent},on:{click:function(t){e.postPageComponent="myday"}}},[e._v("\n            "+e._s(e.$getText("POSTS_TAB_MYDAY"))+"\n          ")]),e._v(" "),n("b-nav-item",{class:"planning"==e.postPageComponent?"active":"",attrs:{"aria-selected":"planning"==e.postPageComponent},on:{click:function(t){e.postPageComponent="planning"}}},[e._v("\n            "+e._s(e.$getText("POSTS_TAB_PLANNING"))+"\n          ")]),e._v(" "),n("b-nav-item",{class:"birthdays"==e.postPageComponent?"active":"",attrs:{"aria-selected":"birthdays"==e.postPageComponent},on:{click:function(t){e.postPageComponent="birthdays"}}},[e._v("\n            "+e._s(e.$getText("POSTS_TAB_BIRTHDAY"))+"\n          ")]),e._v(" "),n("b-nav-item",{class:"widgets"==e.postPageComponent?"active":"",attrs:{"aria-selected":"widgets"==e.postPageComponent},on:{click:function(t){e.postPageComponent="widgets"}}},[e._v("\n            "+e._s(e.$getText("POSTS_TAB_WIDGETS"))+"\n          ")])],1)],1)],1),e._v(" "),n("div",{staticClass:"post-item-area"},[e.parent===e.parentTypes.PROFILE&&e.showCreateButton?n("multi-button-mobile",{attrs:{items:e.multiButtonItems},on:{newPost:function(t){return e.newPost()},newEvent:function(t){return e.newEvent()},newMessage:function(t){return e.newMessage()},newMeetingEvent:function(t){return e.newMeetingEvent()},checkStepUp:function(t){return e.checkStepUp()},checkStepUpForNote:function(t){return e.checkStepUpForNote()},newAlbum:function(t){return e.newAlbum()}}}):e._e(),e._v(" "),e.parent===e.parentTypes.GROUP&&null!=e.group&&(e.hasPermissionGroup(e.permissionEnum.WRITE_POST,e.group.id)||e.hasPermission(e.permissionEnum.USE_GROUPS_AS_DISTRIBUTION_LISTS))?n("multi-button-mobile",{attrs:{items:e.multiButtonGroupItems},on:{newPost:function(t){return e.newInlinePost()}}}):e._e(),e._v(" "),"overview"==e.postPageComponent?n("div",[e.isOnNoticeBoard?e._e():n("div",{staticClass:"config-sections",class:{"group-page":e.parent===e.parentTypes.GROUP}},[n("b-dropdown",{staticClass:"dropdown-select",attrs:{right:"","popper-opts":{positionFixed:!0},boundary:"window","no-flip":""}},[n("template",{slot:"button-content"},[e._v("\n              "+e._s(e.$getText("POSTS_FILTER_BUTTON"))+"\n              "),n("i",{staticClass:"icon icon-Aula_down-arrow"})]),e._v(" "),e._l(e.configSections,(function(t,i){return n("b-dropdown-item",{key:i,attrs:{active:t.filter==e.chosenFilter,"aria-selected":t.filter==e.chosenFilter},on:{click:function(n){return e.onTabItemClicked(t)}}},[t.icon?n("span",{class:t.icon}
1):e._e(),e._v(" "),t.icon?[e._v(" - ")]:e._e(),e._v("\n              "+e._s(e.$getText(t.name))+"\n            ")],2)}))],2)],1),e._v(" "),n("ObservingContainer",{attrs:{options:e.observerOptions}},[e.isVisibleBookmarkInfo?n("p",{staticClass:"p-4 text-center"},[e._v("\n            "+e._s(e.$t("post.bookmark_post_info"))+"\n          ")]):e._e(),e._v(" "),n("PostList",{attrs:{posts:e.currentPosts,notifications:e.cachedNotifications},on:{edit:e.editPost,delete:e.showDeleteModal,report:e.reportPostClicked,"post-marked-read":e.addPostToUnreadCache}}),e._v(" "),e.loading?n("aula-spinner"):e._e(),e._v(" "),e.currentPosts.length>0?n("ObservedTarget",{on:{onIntersecting:e.onBottomReached}}):e._e()],1),e._v(" "),0!==e.currentPosts.length||e.loading?e._e():[n("div",{staticClass:"m-3"},[e._v("\n            "+e._s(e.noPosts)+"\n          ")])]],2):e._e(),e._v(" "),"planning"==e.postPageComponent?n("important-date-overview",{attrs:{"is-aside":!1}}):e._e(),e._v(" "),"myday"==e.postPageComponent?n("daily-overview",{attrs:{"is-aside":!1}}):e._e(),e._v(" "),"birthdays"==e.postPageComponent?n("birthdays",{staticClass:"m-3"}):e._e(),e._v(" "),"widgets"==e.postPageComponent?n("widget-placeholder",{attrs:{"list-of-widgets":e.getListWidgets,placement:"full"}}):e._e()],1)],1):e._e(),e._v(" "),n("aula-modal",{ref:"warningPreventModal",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.warningPreventModal.hide()}}},[e._v("\n    "+e._s(e.$getText("POST_CREATE_CONTENT_WARNING_POST"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"warningDialogVisible",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.warningDialogVisible.hide()}}},[e._v("\n    "+e._s(e.$getText("POST_CREATE_CONTENT_WARNING_POST"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"deleteModal",attrs:{"ok-text":"BUTTON_YES"},on:{cancelClicked:function(t){return e.$refs.deleteModal.hide()},okClicked:function(t){return e.deleteThisPost()}}},[e._v("\n    "+e._s(e.$getText("POST_DELETE_POST_INFO"))),n("br"),e._v("\n    "+e._s(e.$getText("POST_DELETE_POST_INFO_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"blockedCommunicationModal",attrs:{"show-cancel":!1},on:{okClicked:function(t){return e.$refs.blockedCommunicationModal.hide()}}},[e._v("\n    "+e._s(e.$getText("CALENDAR_BLOCK_COMMUNICATION_BODY"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"reportContentModal",attrs:{"ok-text":"REPORTED_CONTENT_SEND","header-text":"REPORTED_CONTENT_HEADER"},on:{okClicked:function(t){return e.saveReportPost()},cancelClicked:function(t){e.$refs.reportContentModal.hide(),e.$refs.cancelReportModal.show()}}},[e._v("\n    "+e._s(e.$getText("REPORTED_CONTENT_WRITE_A_REASON"))+"\n    "),n("span",{staticClass:"mandatory"},[e._v("*")]),e._v(" "),n("b-form-textarea",{staticClass:"report-textarea",attrs:{placeholder:e.$getText("REPORTED_CONTENT_FIELDS_REASON")},on:{input:function(t){e.showWarningReasonLength=!1}},model:{value:e.reportedContentReason,callback:function(t){e.reportedContentReason=t},expression:"reportedContentReason"}}),e._v(" "),n("b-alert",{attrs:{variant:"danger",show:e.showWarningReasonLength}},[e._v("\n      "+e._s(e.$getText(e.warningReasonLength))+"\n    ")]),e._v("\n    "+e._s(e.$getText("REPORTED_CONTENT_NOTE"))+"\n  ")],1),e._v(" "),n("aula-modal",{ref:"cancelReportModal",on:{okClicked:function(t){return e.$refs.cancelReportModal.hide()},cancelClicked:function(t){e.$refs.cancelReportModal.hide(),e.$refs.reportContentModal.show()}}},[e._v("\n    "+e._s(e.$getText("REPORTED_CONTENT_CANCEL_REPORT_1"))),n("br"),e._v("\n    "+e._s(e.$getText("REPORTED_CONTENT_CANCEL_REPORT_2"))+"\n  ")]),e._v(" "),n("aula-modal",{ref:"cancelCommentModal",attrs:{"ok-text":"YES"},on:{okClicked:function(t){e.updateWritingComment(!1),e.nextRoute()},cancelClicked:function(t){return e.$refs.cancelCommentModal.hide()}}},[e._v("\n    "+e._s(e.$getText("COMMENTS_CONFIRM_CANCEL_COMMENT"))),n("br"),e._v("\n    "+e._s(e.$getText("COMMENTS_CONFIRM_CANCEL_COMMENT_2"))+"\n  ")]),e._v(" "),n("drawer",{attrs:{show:e.drawerShow},on:{"change-show":e.changeDrawerShow}},[n("template",{slot:"drawer-title"},[n("div",{staticClass:"title"},[n("i",{staticClass:"icon-Aula_calendar hide-tablet-down mr-3",staticStyle:{"font-size":"1.3em"},attrs:{"aria-hidden":"true"}}),e._v(" "),e.editPostId?[e._v("\n          "+e._s(e.$getText("POSTS_EDIT_DRAWER_TITLE"))+"\n        ")]:[e._v("\n          "+e._s(e.$getText("POSTS_NEW_DRAWER_TITLE"))+"\n        ")]],2)]),e._v(" "),n("template",{slot:"drawer-content"},[e.drawerShow?n("new-post",{attrs:{id:e.editPostId,parent:e.parent},on:{cancel:e.closeDrawer,postSubmitted:e.postSubmitted}}
1):e._e()],1)],2)],1)}),[],!1,null,"15e38e6c",null);t.a=ee.exports},850:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,moment:Function,assuranceLevel:Number,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,domain:i,domainOld:"https://www.infoba.dk",fields:{},item:{Binder:{Tile:{FocusChildList:[]}}},headers:[]}},methods:{getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/INTileGet/56",{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.moment.locale("da"),e.item=t.data,s(e),null!=e.item.Binder.Tile&&(e.groupByDates(),0==e.item.Binder.Tile.FocusChildList.length&&(e.section="nodata",e.message="Vi har ikke noget relevant data at vise dig."))})).catch((function(t){s(e)})).finally((function(){return e.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},groupByDates:function(){for(var e=this,t=[],n=0;n<this.item.Binder.Tile.FocusChildList.length;n++)-1===t.indexOf(this.item.Binder.Tile.FocusChildList[n].ScheduledDate)&&t.push(this.item.Binder.Tile.FocusChildList[n].ScheduledDate);for(var i=function(n){e.headers.push({Open:!1,ScheduledDate:t[n],ChildList:e.item.Binder.Tile.FocusChildList.filter((function(i){return e.moment(i.ScheduledDate).format("DD-MM-YYYY")==e.moment(t[n]).format("DD-MM-YYYY")}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url,style:"cursor:pointer;"}}},filters:{firstLetter:function(e){return e.charAt(0)}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{directives:[{name:"show",rawName:"v-show",value:0!=this.headers.length,expression:"this.headers.length != 0"}]},[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-eye"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n            Fokusbarnskema\n          ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[n("div",{staticClass:"infoba-content"},[e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header"},[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n                  "+e._s(t.ChildList.length)+"\n                ")]),e._v(" "),n("b",[e._v(e._s(e.moment(t.ScheduledDate).format("DD. MMM ")))]),e._v(" "+e._s(e.moment(t.ScheduledDate).format("YYYY"))+"\n              ")]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{up:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),e._l(t.ChildList,(function(i){return[n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"dd.Open"}],staticClass:"infoba-accordeon-row",staticStyle:{"margin-top":"0px","padding-top":"10px","padding-bottom":"20px"}},[n("div",{staticStyle:{display:"flex","align-items":"center",width:"100%","padding-right":"10px"}},[n("div",{staticClass:"theme-circle-big",style:{backgroundColor:"#"+i.ThemeColor}},[n("widget-html",{attrs:{html:e._f("firstLetter")(i.ThemeName)}})],1),e._v(" "),n("div",{staticClass:"ellipsis",staticStyle:{"margin-left":"3px",cursor:"pointer"},on:{click:function(t){return e.goto(e.domain+"/IN/FocusChild?rtmip=56&rid=0&tid="+i.ThemeId+"&gid="+i.GoalId+"&cid="+i.FocusChild.ChildId)}}},[n("div",{staticClass:"infoba-link ellipsis"},[n("widget-html",{attrs:{html:i.FocusChild.Name}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:i.DAPSchema2Name.length>0,expression:"focusChildSchema.DAPSchema2Name.length>0"}
1],staticStyle:{"border-bottom":"solid 1px #ccc","padding-bottom":"5px","font-size":"15px","font-weight":"bold"}},[n("widget-html",{staticClass:"ellipsis",attrs:{html:i.DAPSchema2Name}})],1),e._v(" "),n("widget-html",{attrs:{html:i.GoalName}})],1)])])])]}))]}))],2)])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])}],!1,null,"6d76ebb4",null);t.a=o.exports},851:function(e,t,n){"use strict";var i=n(87),s=n.n(i),a=n(17),r=n.n(a),o=n(47),l=n.n(o),c=n(7),u=n.n(c);function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var m,p,v,f,g,_,E,A={SubstitutedInStmIcon:{name:"SubstitutedInStmIcon",render:function(e){var t="Vikardækket i vikarmodulet",n="Kan ikke slettes",i="Kan ikke ændres til bagvagt";return e("div",{},[e("span",{class:["fa","fa-retweet"],attrs:{"aria-hidden":!0},directives:[{name:"b-tooltip",modifiers:{hover:!0,html:!0}}],domProps:{title:'<div class="text-left">'.concat(t,"<ul><li>").concat(n,"</li><li>").concat(i,"</li></ul></div>")}},[]),e("div",{class:"sr-only"},[t,e("ul",{},[e("li",{},n),e("li",{},i)])])])}}},T={fullNameAndEmployment:function(e,t){var n,i,s,a;return"".concat(null!==(n=null==e?void 0:e.initials)&&void 0!==n?n:"???"," ").concat(null!==(i=null==e?void 0:e.firstName)&&void 0!==i?i:"???"," ").concat(null!==(s=null==e?void 0:e.lastName)&&void 0!==s?s:"???"," (").concat(null!==(a=null==t?void 0:t.description)&&void 0!==a?a:"???",")")}}
1,b={PersonWithTypePill:{name:"PersonWithTypePill",props:{viewModel:{type:Object,required:!0}},computed:{isCurrentUser:function(){return!!this.viewModel.personIsCurrentUser},shortDescription:function(){var e,t,n=this.viewModel.personHasMultipleEmployments?" (".concat(null!==(e=this.viewModel.personnelTypeAbbreviation)&&void 0!==e?e:"???",")"):"";return"".concat(null!==(t=this.viewModel.personInitials)&&void 0!==t?t:"???").concat(n)},longDescription:function(){var e,t,n;return"".concat(null!==(e=this.viewModel.personFirstName)&&void 0!==e?e:"???"," ").concat(null!==(t=this.viewModel.personLastName)&&void 0!==t?t:"???"," (").concat(null!==(n=this.viewModel.personnelTypeDescription)&&void 0!==n?n:"???",")")},srDescription:function(){var e;return"".concat(null!==(e=this.viewModel.personInitials)&&void 0!==e?e:"???"," ").concat(this.longDescription)}},render:function(e){var t,n;return e("div",{class:["person-with-type-pill",{"current-user":this.isCurrentUser}],attrs:{title:this.longDescription}},[e("span",{attrs:{"aria-hidden":!0}},[null===(t=this.shortDescription)||void 0===t?void 0:t.toString()]),e("span",{class:"sr-only"},[null===(n=this.srDescription)||void 0===n?void 0:n.toString()])])}}},C={PersonPlannedAbsentOverlay:{name:"PersonPlannedAbsentOverlay",props:{viewM
1odel:{type:Object,required:!0}},data:function(){return{dragInsideCount:0,hover:!1}},methods:{dragDrop:function(){this.dragInsideCount=0,this.hover=!1},dragEnter:function(){++this.dragInsideCount,this.hover=!0},dragLeave:function(){this.hover&&(--this.dragInsideCount,this.dragInsideCount<=0&&(this.dragInsideCount=0,this.hover=!1))}},render:function(e){return this.viewModel.available?e("div",{class:"person-planned-absent-overlay",on:{dragenter:this.dragEnter.bind(this),dragleave:this.dragLeave.bind(this),drop:this.dragDrop.bind(this)}},[e("div",{class:"overlay",attrs:{"aria-hidden":!0,"data-contents-hidden":this.hover,"data-visible":this.viewModel.visible}},[e("div",{class:["planned-absences","no-text-overflow"]},[this.viewModel.plannedAbsences])]),this.$scopedSlots.default()]):this.$scopedSlots.default()}}},k={AssignmentsDetailsButton:{name:"AssignmentsDetailsButton",props:{assignments:{type:Object,required:!0},isPersonWithTypeDragged:{type:Boolean,required:!0},placement:{type:String,required:!0},planDragDropAvailable:{type:Boolean,required:!0},planGridLayout:{type:Boolean,required:!0}},computed:{icon:function(){return this.assignments.areEditable?"fa-edit":"fa-list"},label:function(){return this.assignments.areEditable?"Rediger vagter":"Vis faktiske vagter"},invisible:function(){return"break"!==this.placement&&this.planDragDropAvailable&&this.isPersonWithTypeDragged},enabled:function(){return this.placement===this.expectedPlacement},expectedPlacement:function(){var e=!this.assignments.primary.empty,t=!this.assignments.backup.empty,n=this.assignments.areEditable;return this.planGridLayout?e||t?this.planDragDropAvailable||t?"assignments-backup":e?"assignments-primary":null:n?"assignments-empty":null:e||t||n?"break":null}},render:function(e){var t,n=this;return this.enabled?e("b-button",{class:["assignments-details-button",{invisible:this.invisible}],attrs:{"data-placement":this.placement},props:{size:"sm",title:this.label,variant:"outline-secondary"},on:{click:function(){return n.assignments.showDetails()}}},[e("span",{class:["fal",this.icon]},[]),e("span",{class:"sr-only"},[null===(t=this.label)||void 0===t?void 0:t.toString()])]):null}}},y=function(){function e(e,t){this._status=e,this._backupAssignment=t}function t(e){this._status=e}function n(e){return!e}function i(){return!0}return e.replaced=function(t){return new e("replaced",t)},e.substituted=function(){return new e("substituted")},e.unavailable=function(){return new e("unavailable")},e.valid=function(){return new e("valid")},e.prototype.match=function(e){var t;return null===(t=e[this._status])||void 0===t?void 0:t.call(e,this._backupAssignment)},t.substituted=function(){return new t("substituted")},t.unavailable=function(){return new t("unavailable")},t.unused=function(){return new t("unused")},t.used=function(){return new t("used")},t.prototype.match=function(e){var t;return null===(t=e[this._status])||void 0===t?void 0:t.call(e)},{assignmentStatuses:function(n,i,s,a,r){var o=n.primary.map((function(e){return{isPersonAbsent:h(e),isPersonSubstituted:r.includes(e.personId),person:s.find((function(t){return t.id===e.personId})),personId:e.personId}})).sort((function(e,t){var n,i,s,a,r,o;return(null===(n=e.person)||void 0===n?void 0:n.initials.localeCompare(null===(i=t.person)||void 0===i?void 0:i.initials))||(null===(s=e.person)||void 0===s?void 0:s.firstName.localeCompare(null===(a=t.person)||void 0===a?void 0:a.firstName))||(null===(r=e.person)||void 0===r?void 0:r.lastName.localeCompare(null===(o=t.person)||void 0===o?void 0:o.lastName))||e.personId-t.personId})),l=n.backup.map((function(e,t){return{isPersonAbsent:h(e),isPersonSubstituted:r.includes(e.personId),personId:e.personId,personnelType:e.personnelType,priority:t+1}})),c=o.reduce((function(t,n){var i=t.primaryStatuses,s=t.usableBackupAssignments;return n.isPersonSubstituted?{primaryStatuses:i.set(n.personId,e.substituted()),usableBackupAssignments:s}:n.isPersonAbsent?{primaryStatuses:i.set(n.personId,0===s.length?e.unavailable():e.replaced({personId:s[0].personId,personnelType:s[0].personnelType,priority:s[0].priority})),usableBackupAssignments:s.slice(1)}:{primaryStatuses:i.set(n.personId,e.valid()),usableBackupAssignments:s}}),{primaryStatuses:new Map,usableBackupAssignments:l.filter((function(e){return!e.isPersonAbsent}))}),u=c.primaryStatuses,d=c.usableBackupAssignments;return{primary:u,backup:l.reduce((function(e,n){return e.set(n.personId,n.isPersonSubstituted?t.substituted():n.isPersonAbsent?t.unavailable():d.some((function(e){return e.personId===n.personId}))?t.unused():t.used())}),new Map)};function h(e){var t,n,s,r,o=a[e.personId];return null!==(t=null==o||null===(n=o.null)||void 0===n?void 0:n.intersectsWith(i))&&void 0!==t&&t||null!==(s=null==o||null===(r=o[e.personnelType])||void 0===r?void 0:r.intersectsWith(i))&&void 0!==s&&s}},canDeleteAssignment:function(e){return!e},canPersonHaveAssignment:function(e,t){return!e||n(t)},canPersonHavePrimaryAssignment:i,canPersonHaveBackupAssignment:n}}(),I=function(e){var t=e.canDeleteAssignment,n=e.canPersonHaveAssignment;function i(e){this.primary=[],this.backup=[],this._change=null!=e?e:function(){},this._originalBackupPersonnel=[]}return i.prototype.assignPersonAsBackup=function(e,t){var n=this.primary.findIndex((function(t){return t.personId===e.id}));-1!==n&&this.primary.splice(n,1);var i=this.backup.findIndex((function(t){return t.personId===e.id}));null!==t&&i===t&&this.backup[i].personnelType===e.personnelType||(this.backup.splice(null!==t?Math.max(0,t):this.backup.length,0,{personId:e.id,personnelType:e.personnelType}),-1!==i&&this.backup.splice(null!==t&&t<=i?i+1:i,1),this._change("assignment"))},i.prototype.assignPersonAsPrimary=function(e){var t=this.backup.findIndex((function(t){return t.personId===e.id}));-1!==t&&this.backup.splice(t,1);var n=this.primary.findIndex((function(t){return t.personId===e.id}));this.primary.splice(-1===n?this.primary.length:n,-1===n?0:1,{personId:e.id,personnelType:e.personnelType}),this._change("assignment")},i.prototype.canDelete=function(e){return t(e)},i.prototype.canToggleBackup=function(e,t){return this._originalBackupPersonnel.includes(e)||n(this.primary.some((function(t){return t.personId===e})),t)},i.prototype.canMoveDown=function(e){var t=this.backup.findIndex((function(t){return t.personId===e}));return-1!==t&&t!==this.backup.length-1},i.prototype.canMoveUp=function(e){var t=this.backup.findIndex((function(t){return t.personId===e}));return-1!==t&&0!==t},i.prototype.delete=function(e){var t=this.primary.findIndex((function(t){return t.personId===e}));if(-1!==t)this.primary.splice(t,1),this._change("delete");else{var n=this.backup.findIndex((function(t){return t.personId===e}));-1!==n&&(this.backup.splice(n,1),this._change("delete"))}},i.prototype.moveDown=function(e){var t=this.backup.findIndex((function(t){return t.personId===e}));switch(t){case-1:case this.backup.length-1:break;default:var n=this.backup[t],i=this.backup[t+1];this.backup.splice(t,2,i,n),this._change("move")}},i.prototype.moveUp=function(e){var t=this.backup.findIndex((function(t){return t.personId===e}));switch(t){case-1:case 0:break;default:var n=this.backup[t],i=this.backup[t-1];this.backup.splice(t-1,2,n,i),this._change("move")}},i.prototype.toggleBackup=function(e){var t=this.primary.findIndex((function(t){return t.personId===e}));if(-1!==t){var n=this.primary.splice(t,1),i=l()(n,1)[0];this.backup.unshift(i),this._change("toggleBackup")}else{var s=this.backup.findIndex((function(t){return t.personId===e}));if(-1!==s){var a=this.backup.splice(s,1),r=l()(a,1)[0];this.primary.push(r),this._change("toggleBackup")}}},i.prototype.update=function(e,t){var n,i,s;(n=this.primary).splice.apply(n,[0,this.primary.length].concat(r()(e))),(i=this.backup).splice.apply(i,[0,this.backup.length].concat(r()(t))),(s=this._originalBackupPersonnel).splice.apply(s,[0,this._originalBackupPersonnel.length].concat(r()(this.backup.map((function(e){return e.personId}))))),this._change("update")},{EditableAssignments:i}}(y),S={AssignmentPlaceholder:{name:"AssignmentPlaceholder",props:{viewM
1odel:{type:Object,required:!0},placement:{type:String,required:!0}},data:function(){return{hover:!1}},computed:{containerStyle:function(){return this.viewModel.order?"--order: ".concat(this.viewModel.order,";"):""},label:function(){switch(this.placement){case"assignments-empty-primary":return"Forvagt";case"assignments-empty-backup":return"Bagvagt";default:return null}}},methods:{dragDrop:function(){this.hover=!1,this.viewModel.visible&&this.viewModel.addAssignment()},dragEnter:function(){this.hover=!0},dragOver:function(e){this.viewModel.visible&&e.preventDefault()},dragLeave:function(){this.hover=!1}},render:function(e){var t;return this.viewModel.available?e("div",{class:"assignment-placeholder-container",style:this.containerStyle,attrs:{"data-placement":this.placement}},[e("div",{class:"assignment-placeholder no-text-overflow",attrs:{"aria-hidden":!0,"data-hover":this.hover,"data-placement":this.placement,"data-visible":this.viewModel.visible},on:{dragenter:this.dragEnter.bind(this),dragleave:this.dragLeave.bind(this),dragover:this.dragOver.bind(this),drop:this.dragDrop.bind(this)}},[null===(t=this.label)||void 0===t?void 0:t.toString()])]):null}}}
1,D={AssignmentPill:{name:"AssignmentPill",props:{viewModel:{type:Object,required:!0}},computed:{isCurrentUser:function(){return!!this.viewModel.personIsCurrentUser},shortDescription:function(){var e,t=this.viewModel.personHasMultipleEmployments?" (".concat(this.viewModel.personnelTypeAbbreviation,")"):"";return"".concat(null!==(e=this.viewModel.personInitials)&&void 0!==e?e:"???").concat(t)},longDescription:function(){var e,t,n,i,s=null===(e=this.viewModel.status)||void 0===e?void 0:e.match({unavailable:function(){return"fraværende "},replaced:function(){return"fraværende, dækket af bagvagt"},substituted:function(){return"fraværende, vikardækket i vikarmodulet"},used:function(){return"vikar for en fraværende forvagt"}}),a=s?",\n".concat(s):"";return"".concat(null!==(t=this.viewModel.personFirstName)&&void 0!==t?t:"???"," ").concat(null!==(n=this.viewModel.personLastName)&&void 0!==n?n:"???"," (").concat(null!==(i=this.viewModel.personnelTypeDescription)&&void 0!==i?i:"???",")").concat(a)},srDescription:function(){return"".concat(this.viewModel.personInitials," ").concat(this.longDescription)},status:function(){var e,t;return null!==(e=null===(t=this.viewModel.status)||void 0===t?void 0:t.match({replaced:function(){return"replaced"},substituted:function(){return"replaced"},unavailable:function(){return"unavailable"},used:function(){return"used"}}))&&void 0!==e?e:"normal"},statusIcon:function(){var e,t=this.isCurrentUser?"fa":"fal";return null===(e=this.viewModel.status)||void 0===e?void 0:e.match({replaced:function(){return"".concat(t," fa-times-circle")},substituted:function(){return"".concat(t," fa-retweet")},unavailable:function(){return"".concat(t," fa-times-circle")},used:function(){return"".concat(t," fa-arrow-circle-up")}})}},render:function(e){var t,n;return e("div",{class:["assignment-pill",{"current-user":this.isCurrentUser}],attrs:{"data-status":this.status},domProps:{title:this.longDescription}},[this.statusIcon?e("span",{class:[this.statusIcon,"mr-1"],attrs:{"aria-hidden":!0}},[]):"",e("span",{attrs:{"aria-hidden":!0}},[null===(t=this.shortDescription)||void 0===t?void 0:t.toString()]),e("span",{class:"sr-only"},[null===(n=this.srDescription)||void 0===n?void 0:n.toString()])])}}},w={WidgetToolbar:{name:"WidgetToolbar",props:{placement:{type:String,required:!0}},computed:{narrow:function(){return"narrow"===this.placement}},render:function(e){return e("div",{class:["widget-toolbar",{narrow:this.narrow}]},this.$slots.default)}}},N={WidgetHeader:{name:"WidgetHeader",props:{widgetName:{type:String,required:!0}},render:function(e){var t;return e("div",[e("div",{class:"widget-header d-flex align-items-end"},[e("h2",[null===(t=this.widgetName)||void 0===t?void 0:t.toString()]),e("p",{class:"ml-auto"},["Educa Personale"])]),e("div",{class:"widget-header-separator"},[])])}}},R=function(){var e={_values:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},_checkBreakpoint:function(e){if(!(e in this._values))throw new Error('Unknown breakpoint "'.concat(e,'"'))},min:function(e){return this._checkBreakpoint(e),this._values[e]},max:function(e){this._checkBreakpoint(e);var t=this._values[e];return t&&t>0?t-.02:null},next:function(e){switch(this._checkBreakpoint(e),e){case"xs":return"sm";case"sm":return"md";case"md":return"lg";case"lg":return"xl";case"xl":return"xxl";default:return null}}};function t(){var e=["sm","md","lg","xl","xxl"].reduce((function(e,t){return e[t]=new n({min:t}),e}),{}),t=["sm","md","lg","xl","xxl"].reduce((function(e,t){return e[t]=new n({max:t}),e}),{});this._minQueries=e,this._maxQueries=t}function n(t){var n=this,i=function(t){var n=t.min?e.min(t.min):null,i=t.max?e.max(t.max):null;return n&&i?"(min-width: ".concat(n,"px) and (max-width: ").concat(i,"px)"):n?"(min-width: ".concat(n,"px)"):i?"(max-width: ".concat(i,"px)"):""}(t),s=window.matchMedia(i),a=function(){return n._updateMatches()};this.matches=null,this._query=s,this._listener=a,s.addEventListener("change",a),this._updateMatches()}return t.prototype.isAfter=function(e){return"xs"===e||this._minQueries[e].matches},t.prototype.isAfterBeforeNext=function(t){switch(t){case"xs":return this.isBefore("sm");case"xxl":return this.isAfter("xxl");default:return this.isAfter(t)&&this.isBefore(e.next(t))}},t.prototype.isBefore=function(e){return"xs"!==e&&this._maxQueries[e].matches},t.prototype.isBetween=function(e,t){return this.isAfter(e)&&this.isBefore(t)}
1,t.prototype.destroy=function(){this._minQueries.forEach((function(e){return e.destroy()})),this._maxQueries.forEach((function(e){return e.destroy()}))},n.prototype._updateMatches=function(){var e;this.matches=null===(e=this._query)||void 0===e?void 0:e.matches},n.prototype.destroy=function(){this._query.removeEventListener("change",this._listener),this._query=null,this.matches=null},{ViewportWidth:t}}(),O=function(){function e(i,s){if(i>23||i<0)throw"Hour must be between 0 and 23";if(s>59||s<0)throw"Minute must be between 0 and 59";return i=Math.floor(i),s=Math.floor(s),{hour:i,minute:s,addHours:function(t){var n=i+t;return n>23?e(23,59):n<0?e(0,0):e(n,s)},addDuration:function(t){var n=60*i+s+t.totalMinutes;return n<0?e(0,0):n>=1440?e(23,59):e(Math.floor(n/60),n%60)},compare:function(e){return this.isBefore(e)?-1:this.isSame(e)?0:1},durationTo:function(e){if(this.isAfter(e))throw"The other time point must be after or same as this time point";return e.hour===i?t(e.minute-s):t(60*(e.hour-i-1)+(60-s)+e.minute)},format:function(e){if("input"===e)return n(i)+":"+n(s);throw new Error('Unknown time point format "'+e+'"')},isAfter:function(e){return e.hour<i||e.hour===i&&e.minute<s},isBefore:function(e){return e.hour>i||e.hour===i&&e.minute>s},isSame:function(e){return e.hour===i&&e.minute===s},startOfHour:function(){return e(i,0)},toJSON:function(){return n(i)+":"+n(s)},toString:function(){return i.toString()+":"+n(s)}}}function t(e){return{totalMinutes:e,isSame:function(t){return e===t.totalMinutes},toString:function(t){var i=Math.floor(e/60),s=e%60;return"human"===t?(i>0||0==s?i+" "+(1==i?"time":"timer"):"")+(s>0?" "+(s+" "+(1==s?"minut":"minutter")):""):i+":"+n(s)}}}function n(e){return e<10?"0"+e.toString():e.toString()}return{parsePoint:function(t){var n=t.match(/([0-9]?[0-9]):([0-9][0-9])/);if(n&&n[0]===t){var i=l()(n,3),s=i[1],a=i[2];return e(Number.parseInt(s,10),Number.parseInt(a,10))}return null},point:e,duration:t,parseDuration:function(e){var n=e.match(/([0-9]+):([0-9][0-9])/);if(n&&n[0]===e){var i=l()(n,3),s=i[1],a=i[2],r=Number.parseInt(a,10);if(r>59||r<0)throw"Minute must be between 0 and 59";var o=Number.parseInt(s,10);if(o<0)throw"Hours must be greater than or equal to 0";return t(60*o+r)}return null}}}(),L={TableRowToolbar:{name:"TableRowToolbar",props:{actions:{type:Array,required:!0}},render:function(e){return e("div",{class:"table-row-toolbar"},this.actions.map((function(t,n){var i,s;return e("b-link",{props:{disabled:!1===t.enabled},on:{click:function(){return t.call()}},key:n},[e("span",{class:["fa","fa-lg","fa-fw",t.icon],domProps:{title:null===(i=t.label)||void 0===i?void 0:i.toString()}}),e("span",{class:"sr-only"},[null===(s=t.label)||void 0===s?void 0:s.toString()])])})))}}},x=function(){var e=0,t=1,n=2,i=0,s=1;function a(e){if(!e||!e.fallback)throw new Error('Fallback value is not set in "options", or "options" is not an object.');this._actualItems=[e.fallback],this._actualValue=e.fallback.value,this._desiredItems=[],this._desiredValue=e.initial,this._options={change:e.change||function(){},preselectFirst:!!e.preselectFirst,fallback:e.fallback}}return a.prototype={get value(){return this._actualValue},get items(){return this._actualItems},select:function(e){this._desiredValue=e,this._synchronize(!1)},reset:function(e){this._desiredValue=e,this._synchronize(!0)},update:function(e){this._desiredItems=e.filter((function(e){return void 0!==e.value})),this._synchronize(!0)},_synchronize:function(a){var o,l,c,u=this,d=this._actualValue,h=(o=this._desiredItems,l=this._desiredValue,c=this._options.preselectFirst,0===o.length?{items:s,value:t}:void 0!==l&&o.some((function(e){return!e.disabled&&e.value===l}))?{items:i,value:e}:c&&void 0!==o.find((function(e){return!e.disabled}))?{items:i,value:n}:{items:s,value:t}),m=h.value,p=h.items,v=m===e?this._desiredValue:m===t?this._options.fallback.value:m===n?this._desiredItems.find((function(e){return!e.disabled})).value:void 0,f=p===i?this._desiredItems:p===s?[this._options.fallback].concat(r()(this._desiredItems)):[];this._actualValue=v,this._actualItems=f,(a||d!==v)&&setTimeout((function(){return u._options.change(v,a)}))}},{SingleSelection:a}}(),P={browserSession:function(e,t,n,i){var s="kmd-"+e+"-widget-"+t+"-settings";return{read:function(){try{var e=window.sessionStorage.getItem(s);if(null===e)return null;var t=JSON.parse(e),a=t.value,r=t.writtenAt;return t.sessionUUID!==n||0===i||i&&Date.now()-new Date(r)>i?null:a||{}}catch(e){return null}},write:function(e){try{window.sessionStorage.setItem(s,JSON.stringify({value:e,writtenAt:(new Date).toJSON(),sessionUUID:n}))}catch(e){return}}}},database:function(e,t,n,i,s){return{read:function(){var a={widgetName:n};return i&&s&&(a.institutionCode=s),t.get("https://personale.api.kmd.dk/aula/api/v2/settings",{headers:{Authorization:e},params:a}).then((function(e){return e.data}),(function(){return null}))},write:function(a){var r={widgetName:n};return i&&s&&(r.institutionCode=s),t.post("https://personale.api.kmd.dk/aula/api/v2/settings",a,{headers:{Authorization:e},params:r})}}}},M=function(){var e=new WeakMap;function t(){var e=this;setTimeout((function(){var t;return null===(t=e.$el.querySelector("[data-set-focus]"))||void 0===t?void 0:t.focus()}),0)}return{SetFocus:{bind:function(n,i,s){var a,o=null!==(a=e.get(n))&&void 0!==a?a:[],l=Object.keys(i.modifiers).filter((function(e){return!o.includes(e)})),c=s.componentInstance;l.forEach((function(e){return c.$on(e,t)})),e.set(n,[].concat(r()(o),r()(l)))},unbind:function(n,i,s){var a,r=s.componentInstance,o=null!==(a=e.get(n))&&void 0!==a?a:[];e.delete(n),o.forEach((function(e){return r.$off(e,t)}))}}}}(),F=function(){function e(e,t){t=void 0===t||!!t,this.isSuccess=t,this.value=t?e:void 0,this.error=t?void 0:e}return e.prototype.then=function(t,n){return this.isSuccess?t?e.from(t(this.value)):this:n?e.from(n(this.error)):this},e.prototype.catch=function(e){return this.then(void 0,e)},e.success=function(t){return new e(t,!0)},e.error=function(t){return new e(t,!1)},e.from=function(t){return t instanceof e?t:e.success(t)},{Result:e}}
1(),U=function(e){var t=e.Result;function n(e){this._isAvailable=!!e.isAvailable,this._initialTextValue=e.initialTextValue||"",this._change=e.change||function(){},this._validate=e.validate||function(e){return t.from(e)},this.textValue=this._initialTextValue}return n.prototype={get availableValue(){return this._isAvailable?this.value:null},get value(){return this._validate(this.textValue)},set:function(e){this._isAvailable=!0,this.textValue=e,this._change(this.value,!1)},reset:function(e){this._isAvailable=!1,this.textValue=void 0===e?this._initialTextValue:e,this._change(this.value,!0)},validate:function(){return this._isAvailable=!0,this.value}},{ValidatedValue:n}}(F),B=function(e,t,n){var i=t,s=e.Result,a=n.ValidatedValue;function r(e){var t,n,i=this;this.input=new a({change:function(e,t){return i._change(e,t)},initialTextValue:null===(t=e.initialValue)||void 0===t?void 0:t.format("input"),isAvailable:e.isAvailable,validate:function(t){return o(t).then((function(t){var n,i;return null!==(n=null===(i=e.validate)||void 0===i?void 0:i.call(e,t))&&void 0!==n?n:t}))}}),this._change=null!==(n=e.change)&&void 0!==n?n:function(){}}function o(e){var t=(e||"").trim();if(0==t.length)return s.error("Vælg et tidspunkt");var n=i.parsePoint(t);return n?s.success(n):s.error("Vælg et tidspunkt")}return r.prototype={get availableValue(){return this.input.availableValue},get textValue(){return this.input.textValue},set textValue(e){this.input.textValue=e},get value(){return this.input.value},set:function(e){this.input.set(null==e?void 0:e.format("input"))},reset:function(e){var t;this.input.reset(void 0!==e?null!==(t=null==e?void 0:e.format("input"))&&void 0!==t?t:null:void 0)},validate:function(){return this.input.validate()}},{ValidatedTime:r,validTime:o}}(F,O,U),V=function(){var e;function t(){}t.prototype.toString=function(){return"Canceled"};var n={errorCaptured:function(e){return!l(e)}};var i=/["&'<>]/g;var a=/[\$\(-\+\.\?\[-\^\{-\}]/g,o=new RegExp(a.source,"u");function l(e){return e instanceof t}function c(e){return e&&"function"==typeof e}function u(e,t){return e===t}return e={areArraysEqual:function(e,t,n){var i;if(n=null!==(i=n)&&void 0!==i?i:u,e.length!==t.length)return!1;for(var s=0;s<e.length;++s)if(!n(e[s],t[s]))return!1;return!0},areSetsEqual:function(e,t,n){var i,a,o;if(n=null!==(i=n)&&void 0!==i?i:u,(null!==(a=e.length)&&void 0!==a?a:e.size)!==(null!==(o=t.length)&&void 0!==o?o:t.size))return!1;var l,c=r()(t),h=d(e);try{var m=function(){var e=l.value,t=c.findIndex((function(t){return n(t,e)}));if(-1===t)return{v:!1};c.splice(t,1)};for(h.s();!(l=h.n()).done;){var p=m();if("object"===s()(p))return p.v}}catch(e){h.e(e)}finally{h.f()}return 0===c.length},canceled:function(){return new t},escapeHtml:function(e){var t;return(e=null===(t=e)||void 0===t?void 0:t.toString())&&e.replace(i,(function(e){switch(e){case"&":return"&amp;";case'"':return"&quot;";case"'":return"&#39;";case"<":return"&lt;";case">":return"&gt;"}}))},escapeRegExp:function(e){var t;return(e=null===(t=e)||void 0===t?void 0:t.toString())&&o.test(e)?e.replace(a,"\\$&"):e},IgnoreCanceledMixin:n,isCanceled:l,isPromise:function(e){return e&&c(e.then)},isFunction:c,isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},strictEqual:u,toPromise:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return c(e)?new Promise((function(n){return n(e.apply(t,i))})):Promise.resolve(e)}},e}(),W=function(e){var t=e.isString,n=e.toPromise;function i(){this.items=[]}return i.prototype={get empty(){return 0===this.items.length},get top(){return 0==this.items.length?null:this.items[this.items.length-1]},add:function(e,t){var n=this.items.findIndex((function(t){return t.id===e}));-1!==n&&this.items.splice(n,1),this.items.push({id:e,message:t})},remove:function(e){var t=this.items.findIndex((function(t){return t.id===e}));-1!==t&&this.items.splice(t,1)},track:function(e,i){var s=this,a=t(e)?{id:"default",message:e}:{id:e.id,message:e.message},r=a.id,o=a.message;this.add(r,o);var l=n(i);return l.then((function(){return setTimeout((function(){return s.remove(r)}),0)}),(function(e){return setTimeout((function(){return s.remove(r)}),0),Promise.reject(e)})),l}},{ProgressList:i}}(V),G=(m=W.ProgressList,{ProgressIndicator:{name:"ProgressIndicator",props:{establishBfc:{type:Boolean,default:!0},small:{type:Boolean,default:!1},viewModel:{type:m,required:!0}},computed:{message:function(){var e=this.viewModel.top;return e?e.message:null},visible:function(){return!this.viewModel.empty}},render:function(e){var t;return e("div",{class:{"progress-indicator-root":this.establishBfc}},[this.visible?e("div",{class:"progress-indicator-status"},[e("div",[e("b-spinner",{props:{small:this.small}},[])]),e("div",{class:"ml-1"},[null===(t=this.message)||void 0===t?void 0:t.toString()])]):e("div",[]),e("div",{class:"progress-indicator-content",attrs:{"data-obscured":this.visible}},this.$slots.default)])}}}),H=function(e){return{CountsTable:{name:"CountsTable",components:{"progress-indicator":e.ProgressIndicator},props:{placement:{type:String,required:!0},progress:{type:Object,required:!0},store:{type:Object,required:!0}},data:function(){return{caption:this._caption([],null,null,null),emptyText:this._emptyText([],null),fields:[{key:"name",class:"no-text-overflow",label:"Navn",sortable:!0},{key:"initials",class:"no-text-overflow",label:"Initialer",sortable:!0},{key:"area",class:"no-text-overflow",label:"Område",sortable:!0}
1,{key:"primaryAssignmentCount",label:"Forvagter",sortable:!0},{key:"primaryAssignmentDuration",label:"Planlagt tid forvagt",formatter:function(e){return e.toString("human")},sortable:!0},{key:"backupAssignmentCount",label:"Bagvagter",sortable:!0},{key:"backupAssignmentDuration",label:"Planlagt tid bagvagt",formatter:function(e){return e.toString("human")},sortable:!0}],items:this._items(null,null)}},methods:{update:function(e,t,n,i,s){this.caption=this._caption(e,t,n,i,s),this.emptyText=this._emptyText(e,t),this.items=this._items(t,s)},_caption:function(e,t,n,i,s){var a,r,o,l,c=this;if(!(t&&n&&s&&i))return"";var u=this.store.schools.length>1?" i skolen ".concat(null!==(a=null===(r=this.store.schools.find((function(e){return(null==e?void 0:e.code)===i})))||void 0===r?void 0:r.name)&&void 0!==a?a:"???",","):"",d=0===e.length?"(ingen)":e.map((function(e){var t,n,i;return null!==(t=null===(n=c.store.areas[s])||void 0===n||null===(i=n.find((function(t){return t.id===e})))||void 0===i?void 0:i.name)&&void 0!==t?t:"???"})).sort().join(", "),h="".concat(null!==(o=null==n?void 0:n.start.toString())&&void 0!==o?o:"???"," - ").concat(null!==(l=null==n?void 0:n.end.addDays(-1).toString())&&void 0!==l?l:"???");return"Optælling af vagter på".concat(u," for områderne ").concat(d," i perioden ").concat(h)},_emptyText:function(e,t){return null===t?"Tryk på vis for at indlæse optællingen":0===e.length?"Intet område valgt":"Der er ingen tilgængelige vagter"},_items:function(e,t){var n=this;return null==e?void 0:e.map((function(e){var i,s,a,r,o,l,c=null===(i=n.store.personnel[t])||void 0===i?void 0:i.find((function(t){return t.id===e.personId})),u=null===(s=n.store.areas[t])||void 0===s?void 0:s.find((function(t){return t.id===e.areaId}));return{id:"".concat(e.personId,"_").concat(e.areaId),name:"".concat(null!==(a=null==c?void 0:c.firstName)&&void 0!==a?a:"???"," ").concat(null!==(r=null==c?void 0:c.lastName)&&void 0!==r?r:"???"),initials:null!==(o=null==c?void 0:c.initials)&&void 0!==o?o:"???",area:null!==(l=null==u?void 0:u.name)&&void 0!==l?l:"???",primaryAssignmentCount:e.primaryAssignmentCount,primaryAssignmentDuration:e.primaryAssignmentDuration,backupAssignmentCount:e.backupAssignmentCount,backupAssignmentDuration:e.backupAssignmentDuration}}))}},render:function(e){var t;return e("b-table",{props:{borderless:!0,busy:!this.progress.empty,caption:this.caption,emptyText:this.emptyText,fields:this.fields,primaryKey:"id",items:null!==(t=this.items)&&void 0!==t?t:[],showEmpty:!0,sortBy:"name",sortDesc:!1,stacked:"narrow"===this.placement||"md"}
1,scopedSlots:{tableBusy:e("progress-indicator",{props:{viewModel:this.progress}},[])}},[])}}}}(G),j=(f=(p=V).canceled,g=p.isString,_=p.toPromise,v={combine:function(e,t){return function(n){var i=e(n);return t(i)}},debounce:function(e,t){var n,i;return function(){var s=arguments,a=this,o=new Promise((function(o,l){var c;null===(c=n)||void 0===c||c(f()),n=l,clearTimeout(i),i=setTimeout((function(){_.apply(void 0,[e,a].concat(r()(s))).then((function(e){n=void 0,i=void 0,o(e)}),(function(e){n=void 0,i=void 0,l(e)}))}),t)}));return o}},last:function(e){var t,n=(t=0,{is:function(e){return e===t},increment:function(){return++t}});return function(){var t=arguments,i=this;return new Promise((function(s,a){var o=n.increment();_.apply(void 0,[e,i].concat(r()(t))).then((function(e){n.is(o)?s(e):a(f())}),(function(e){n.is(o)?a(e):a(f())}))}))}},once:function(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}},withFocusRestore:function(e,t){return function(){var i=document.activeElement;return _(e.apply(this,arguments)).then((function(e){return setTimeout((function(){return n(t,i)}),0),e}),(function(e){return setTimeout((function(){return n(t,i)}),0),Promise.reject(e)}))};function n(e,t){var n,i=d(e=Array.isArray(e)?e:[e]);try{for(i.s();!(n=i.n()).done;){var s=n.value,a="activeElement"===s?t:g(s)?document.querySelector(s):s;if(a&&(a.focus(),a===document.activeElement))break}}catch(e){i.e(e)}finally{i.f()}}},retry:function(e,t,n){return function(){var i=arguments,s=this,a=0,r=[],o=new Promise((function(o,l){(function i(){var s=arguments,c=this;_.apply(void 0,[e,this].concat(Array.prototype.slice.call(arguments))).then(o,(function(e){r.push(e),a<t?(++a,setTimeout((function(){return i.apply(c,s)}),n||0)):l(r)}))}).apply(s,i)}));return o}},throttle:function(e,t){var n=!1,i={};return function(){if(i.arguments=arguments,i.this=this,n)return Promise.resolve(null);n=!0;var s=new Promise((function(s,a){setTimeout((function(){var t=i.this,o=i.arguments;i.this=void 0,i.arguments=void 0,_.apply(void 0,[e,t].concat(r()(o))).then((function(e){s(e),n=!1}),(function(e){a(e),n=!1}))}),t)}));return s}}},v),Y=function(e,t){var n=e,i=t.escapeRegExp;function s(){this.value="",this._parts=[]}return s.prototype.change=function(e){this.value=e,this._updateParts()},s.prototype.matches=function(e){var t,n=d(this._parts);try{for(n.s();!(t=n.n()).done;){var i=t.value,s=e.search(i.regExp);if(-1===s)return!1;e=e.slice(s+i.length)}}catch(e){n.e(e)}finally{n.f()}return!0},s.prototype._updateParts=n.debounce((function(){this._parts=this.value.split(" ").filter((function(e){return e.length>0})).map((function(e){return{length:e.length,regExp:new RegExp(i(e),"iu")}}))}),200),{IncrementalSearch:s}}(j,V),$=function(e){var t=e;function n(e,t,n){this._areaId=void 0,this._deleteBreak=e,this._editBreak=t,this._store=n}return n.prototype={get fields(){return[{key:"name",class:"no-text-overflow",label:"Navn",sortable:!0},{key:"start",label:"Starttid",sortable:!0},{key:"end",label:"Sluttid",sortable:!0},{key:"actions",label:""}]},get items(){var e,n=this;return(null!==(e=this._store.breaks[this._areaId])&&void 0!==e?e:[]).map((function(e){return function(e,n,i){return{_break:e,get id(){return this._break.id},get name(){return this._break.name},get start(){return this._break.start.toString()},get end(){return this._break.end.toString()},actions:function(){var e=this;
1return[{icon:"fa-edit",label:"Rediger",call:t.withFocusRestore((function(){return i(e._break)}),"activeElement")},{icon:"fa-trash",label:"Slet",call:t.withFocusRestore((function(){return n(e._break.id,e._break.name)}),["activeElement","#kmd-educa-personale-playground-duty-breaks-add-button"])}]}}}(e,n._deleteBreak,n._editBreak)}))},selectArea:function(e){this._areaId=e}},{BreakTable:n}}(j),z={ValidatedValueInput:{name:"ValidatedValueInput",inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},type:{type:String,default:"text"},viewModel:{type:Object,required:!0},showSuccessStateOnInput:{type:Boolean,required:!1,default:!0}},computed:{invalidFeedback:function(){var e=this.viewModel.availableValue;return e&&!e.isSuccess?e.error:null},state:function(){var e=this.viewModel.availableValue;return e?e.isSuccess:null}},methods:{set:j.debounce((function(e){this.viewModel.set(e)}),200)},render:function(e){return e("b-form-group",{props:{invalidFeedback:this.invalidFeedback,label:this.label,labelFor:this.id,state:this.state}},[e("b-form-input",{attrs:this.$attrs,props:{id:this.id,state:this.showSuccessStateOnInput||!0!==this.state?this.state:null,type:this.type,value:this.viewModel.textValue},on:{input:this.set.bind(this)}},[])])}}},q=function(e){return{ValidatedTimeInput:{name:"ValidatedTimeInput",components:{"validated-value-input":e.ValidatedValueInput},inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},showSuccessStateOnInput:{type:Boolean,required:!1,default:!0},viewModel:{type:Object,required:!0}},render:function(e){return e("validated-value-input",{attrs:this.$attrs,props:{id:this.id,label:this.label,showSuccessStateOnInput:this.showSuccessStateOnInput,type:"time",viewModel:this.viewModel.input}},[])}}}}(z),K=function(e){return{ValidatedDateInput:{name:"ValidatedDateInput",components:{"validated-value-input":e.ValidatedValueInput},inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},showSuccessStateOnInput:{type:Boolean,required:!1,default:!0},viewModel:{type:Object,required:!0}},render:function(e){return e("validated-value-input",{attrs:this.$attrs,props:{id:this.id,label:this.label,showSuccessStateOnInput:this.showSuccessStateOnInput,type:"date",viewModel:this.viewModel.input}},[])}}}}(z),Q=function(e,t){var n=t.SingleSelection;return{SingleSelectionInput:{name:"SingleSelectionInput",inheritAttrs:!1,props:{id:{type:String,required:!0},label:{type:String,required:!0},viewModel:{type:n,required:!0}},methods:{select:e.debounce((function(e){this.viewModel.select(e)}),200)},render:function(e){return e("b-form-group",{props:{label:this.label,labelFor:this.id}},[e("b-form-select",{attrs:this.$attrs,props:{id:this.id,options:this.viewModel.items,plain:!0,value:this.viewModel.value},on:{change:this.select.bind(this)}},[])])}}}}(j,x),J=function(e,t,n){var i,s=e,a=t.isFunction,r=n;return i=function(e,t,n,i,o,c){var u=r.browserSession(c,"session",n),d=r.database(t,e,c,i,o),h=r.browserSession(c,"database",n,288e5);return new Promise((function(e){var t=u.read()||{},n=h.read();null===n?d.read().then((function(e){return e||{}}),(function(){return{}})).then((function(n){h.write(n),e({browserSessionSettings:t,databaseSettings:n})})):e({browserSessionSettings:t,databaseSettings:n})})).then((function(e){var t=e.browserSessionSettings,n=e.databaseSettings,i=s.throttle((function(){return u.write(t)}),1e3),r=s.combine((function(e){return s.retry(e,5,5e3)}),(function(e){return s.throttle(e,1e4)}))((function(){return d.write(n)})),o=s.throttle((function(){return h.write(n)}),1e3);function c(e,t,n,i){var s=i[e];return void 0===s||!1===(n||function(){return!0})(s)?a(t)?t():t:s}function m(e,t,n){if(2===e.length){var i=l()(e,2),s=i[0],a=i[1];t[s]=a}else{if(1!==e.length)return;l()(e,1)[0].forEach((function(e){var n=e.key,i=e.value;return t[n]=i}))}n.forEach((function(e){return e()}))}return{getLocal:function(e,n,i){return c(e,n,i,t)},getPersistent:function(e,t,i){return c(e,t,i,n)},setLocal:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];m(n,t,[i])},setPersistent:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];m(t,n,[o,r])}}}))},i}
1(j,V,P),Z=function(e){var t=e.withFocusRestore,n={_listeners:new Map,emit:function(){var e,t=d(this._listeners.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.apply(void 0,arguments)}}catch(e){t.e(e)}finally{t.f()}},addListener:function(e,t){this._listeners.set(e,t)},removeListener:function(e){this._listeners.delete(e)}},i={data:function(){return{confirmationModal:{show:this.showConfirmationModal}}},methods:{showConfirmationModal:t((function(e){return new Promise((function(t){n.emit({options:e,resolve:t})}))}),["activeElement"])}};return{ConfirmationModal:{name:"ConfirmationModal",props:{id:{type:String,required:!0}},data:function(){return{title:"",okTitle:"",okVariant:"",cancelTitle:"",message:"",isVisible:!1}},created:function(){var e=this;n.addListener(this.id,(function(t){var n=t.options,i=t.resolve;e.show(i,n)}))},destroyed:function(){n.removeListener(this.id)},methods:{show:function(e,t){this.okTitle=t.okTitle||"Ja",this.cancelTitle=t.cancelTitle||"Nej",this.title=t.title,this.message=t.message,this.okVariant=t.okVariant||"primary",this.$refs.modal.$once("hide",(function(t){e("ok"===t.trigger)})),this.$refs.modal.show()},shown:function(){var e=this;setTimeout((function(){var t;return null===(t=e.$el.querySelector("footer button"))||void 0===t?void 0:t.focus()}),0)}},render:function(e){var t;return e("b-modal",{attrs:{id:this.id},props:{cancelTitle:this.cancelTitle,centered:!0,okTitle:this.okTitle,okVariant:this.okVariant,title:this.title},on:{shown:this.shown.bind(this)},ref:"modal"},[null===(t=this.message)||void 0===t?void 0:t.toString()])}},ConfirmationModalMixin:i}}(j),X=function(e,t){var n=e.isCanceled,i=e.isPromise,s=e.toPromise,a=t.Result;function o(){this.items=[]}return o.prototype={get empty(){return 0==this.items.length},add:function(e){var t,n,i=this,s=null!==(t=e.id)&&void 0!==t?t:"default",a=!!e.dismissible,r=function(e,t){return null==t||""===t?e:e+" ("+t+")"}(e.message,e.details),o=e.retryCallback,l=null!==(n=e.actions)&&void 0!==n?n:[],c=this.items.findIndex((function(e){return e.id===s}));if(-1===c)this.items.push({id:s,dismissible:a,message:r,dismiss:function(){i.remove(s)},actions:l});else{var u=this.items[c];u.message=r,u.dismissible=a,u.retry=o,u.actions=l}},clear:function(){this.items.splice(0)},has:function(e){return-1!==this.items.findIndex((function(t){return t.id===e}))},remove:function(e){var t=this.items.findIndex((function(t){return t.id===e}));-1!==t&&this.items.splice(t,1)},retryAll:function(){this.items.slice().forEach((function(e){var t;return null===(t=e.actions.find((function(e){return e.isRetry})))||void 0===t?void 0:t.call()}))},track:function(e,t){var o,l,c,u=this,d=e.id||"default",h=e.message||e,m=void 0===e.dismissible||!!e.dismissible,p=null===(o=e.actions)||void 0===o?void 0:o.find((function(e){return e.isRetry})),v=p?p.call?a.from(p.call):i(t)?a.error("Cannot retry a promise. Pass a retry callback to retry action or use a function instead of a promise."):a.from((function(){return u.track(e,t)})):a.from(null);if(!v.isSuccess)return Promise.reject(new Error(v.error));this.remove(d);var f=[].concat(r()(null!==(l=null===(c=e.actions)||void 0===c?void 0:c.filter((function(e){return!e.isRetry})))&&void 0!==l?l:[]),r()(v.value?[{label:p.label,call:v.value,available:p.available,isRetry:!0}]:[]));return s(t).catch((function(e){var t;if(!n(e)){var i=f.filter((function(t){var n,i;return null===(n=null===(i=t.available)||void 0===i?void 0:i.call(t,e))||void 0===n||n})),s=null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e;return u.add({id:d,message:h,details:s,dismissible:m,actions:i}),Promise.reject(e)}}))}},{ErrorList:o,actionTemplate:function(e,t,n){return{label:e,available:n,call:t}},retryActionTemplate:function(e,t){return{label:"Prøv igen",available:t,call:e,isRetry:!0}}}}(V,F),ee=function(e,t,n){var i=n.EditableAssignments,s=t.canPersonHaveAssignment,a=e.actionTemplate,o=e.retryActionTemplate;function l(e,t,n,i,s){this.isEnabled=t,this._actions=e,this._draggedPersonWithType=null,this._isMobileApp=n,this._schoolCode=null,this._schoolYearId=null,this._state=i,this._store=s,this._week=null}function c(e,t,n,i,s){this._addAssignment=e,this._areaIsEditable=t,this._draggedPersonWithType=n,this._isEnabled=i,this._isMobileApp=s}function u(e,t,n,i,s,a,r){this.__addAssignment=r,this._assignments=e,this._breakPeriod=t,this._draggedPersonWithType=n,this._personnelPlannedAbsences=i,this._substitutedPersonnel=s,this._isAvailable=a,this._isSaving=!1}function d(e,t,n,i,s,a,r){this._addAssignment=r,this._assignments=e,this._areAssignmentsPrimary=t,this._draggedPersonWithType=n,this._substitutedPersonnel=i,this._isAvailable=s,this._isSaving=a}function h(e,t){return e&&e.personId===t.id&&e.personnelType===t.personnelType}return l.prototype={get availablePersonnelWithTypes(){var e,t=this,n=this._store.schools.find((function(e){return e.code===t._schoolCode})),i=null!==(e=this._store.personnel[this._schoolYearId])&&void 0!==e?e:[],s=this._store.personnelTypes;return i.map((function(e){return e.employments.map((function(t){var i=s[t.personnelType];return{id:e.id,personnelType:t.personnelType,personInitials:e.initials,personFirstName:e.firstName,personHasMultipleEmployments:e.employments.length>1,personLastName:e.lastName,personIsCurrentUser:e.id===(null==n?void 0:n.personId),personnelTypeAbbreviation:null==i?void 0:i.abbreviation,personnelTypeDescription:null==i?void 0:i.description}}))})).reduce((function(e,t){return e.concat(t)}),[]).sort((function(e,t){var n,i,s;return(null===(n=e.personInitials)||void 0===n?void 0:n.localeCompare(t.personInitials))||(null===(i=e.personFirstName)||void 0===i?void 0:i.localeCompare(t.personFirstName))||(null===(s=e.personLastName)||void 0===s?void 0:s.localeCompare(t.personLastName))}))},get departments(){var e;return null!==(e=this._store.departments[this._schoolYearId])&&void 0!==e?e:[]},get teams(){var e;return null!==(e=this._store.teams[this._schoolYearId])&&void 0!==e?e:[]},dragEnd:function(){this._draggedPersonWithType=null},dragStart:function(e){var t=e.event,n=e.personWithType;this._draggedPersonWithType={id:n.id,personnelType:n.personnelType},t.dataTransfer.dropEffect="link"},ofArea:function(e,t){var n=this;return new c(this._addAssignment.bind(this,e),t,(function(){return n._draggedPersonWithType}),(function(){return n.isEnabled}),this._isMobileApp)},selectSchoolYear:function(e,t){this._schoolYearId=e,this._schoolCode=t},selectWeek:function(e){this._week=e},_addAssignment:function(e,t,n,s){var r,l,c,u,d,h,m=this,p=null===(r=this._store.personnel[this._schoolYearId])||void 0===r?void 0:r.find((function(e){return e.id===s.personId})),v=null===(l=this._store.breaks[e])||void 0===l?void 0:l.find((function(e){return e.id===t})),f=this._week.toDate(n),g=this._state.areaErrorList(e),_=this._state.dayBreakProgressList(e,t,this._week,n),E="assign-person-".concat(e,"-").concat(t,"-").concat(n);return g.track({id:E,message:"Kunne ikke sætte ".concat(null!==(c=null==p?void 0:p.initials)&&void 0!==c?c:"???"," ").concat(null!==(u=null==p?void 0:p.firstName)&&void 0!==u?u:"???"," ").concat(null!==(d=null==p?void 0:p.lastName)&&void 0!==d?d:"???"," pausen ").concat(null!==(h=null==v?void 0:v.name)&&void 0!==h?h:"???"," den ").concat(f),actions:[a("Genindlæs",(function(){g.track({id:E,message:"Kunne ikke indlæse vagter",actions:[o()]},(function(){return _.track("Indlæser vagter...",(function(){return m._actions.reloadAssignments(e,m._week)}))}))}),(function(e){return 409==e.status})),o(null,(function(e){return 409!=e.status}))]},(function(){return _.track("Påsætter person",(function(){var a,r,o,l=null!==(a=null===(r=m._store.assignments[e])||void 0===r||null===(o=r[m._week])||void 0===o?void 0:o.find((function(e){return e.breakId===t&&e.dayIndex===n})))&&void 0!==a?a:{primary:[],backup:[],timestamp:null},c=new i;return c.update(l.primary,l.backup),null!==s.priority?c.assignPersonAsBackup({id:s.personId,personnelType:s.personnelType},s.priority):c.assignPersonAsPrimary({id:s.personId,personnelType:s.personnelType}),m._actions.saveAssignments({breakId:t,date:m._week.toDate(n),primary:c.primary,backup:c.backup,timestamp:l.timestamp})}))}))}},c.prototype={get isAvailable(){return this._isEnabled()&&this.isToggleAvailable},get isPersonWithTypeDragged(){return this.isAvailable&&!!this._draggedPersonWithType()},get isToggleAvailable(){return!this._isMobileApp()&&this._areaIsEditable},ofBreakAndDay:function(e,t,n,i,s,a){var r=this;return new u(e,n,this._draggedPersonWithType,s,a,(function(){return r.isAvailable}),this._addAssignment.bind(null,t,i))}},u.prototype={noAssignmentsPlaceholder:function(e){var t=this;return{get available(){return t._isAvailable()},get visible(){return!t._isSaving&&!!t._draggedPersonWithType()},addAssignment:function(){return t._addAssignment(e?null:t._assignments.backup.length)}}},ofGroup:function(e){var t=this;return new d(e?this._assignments.primary:this._assignments.backup,e,this._draggedPersonWithType,this._substitutedPersonnel,this._isAvailable,(function(){return t._isSaving}),this._addAssignment.bind(this))},personPlannedAbsentOverlay:function(){var e=this;return{get available(){return e._isAvailable()},get plannedAbsences(){var t,n,i;if(!e._isAvailable())return null;var s=e._draggedPersonWithType(),a=e._breakPeriod;if(!s||!a)return null;var r=null!==(t=e._personnelPlannedAbsences[s.id])&&void 0!==t?t:[],o=(null!==(n=r.null)&&void 0!==n?n:[]).concat(null!==(i=r[s.personnelType])&&void 0!==i?i:[]).filter((function(e){return e.period.intersectsWith(a)})).map((function(e){return e.description}));return o.length>0?o.join(", "):null},get visible(){return!e._isSaving&&!!e._draggedPersonWithType()&&null!==this.plannedAbsences}}},_addAssignment:function(e){var t=this,n=this._draggedPersonWithType();return n?(this._isSaving=!0,this.__addAssignment({personId:n.id,personnelType:n.personnelType,priority:e}).then((function(){t._isSaving=!1}),(function(){t._isSaving=!1}))):Promise.resolve()}},d.prototype={get isAvailable(){var e;return this._isAvailable()&&s(!this._areAssignmentsPrimary,this._substitutedPersonnel.includes(null===(e=this._draggedPersonWithType())||void 0===e?void 0:e.id))},groupPlaceholder:function(){var e=this;return{get available(){return e.isAvailable&&(e._areAssignmentsPrimary||0===e._assignments.length)},get visible(){if(e._isSaving())return!1;var t=e._draggedPersonWithType();return!!t&&!e._assignments.some((function(e){return h(e,t)}))},addAssignment:function(){return e._addAssignment(e._areAssignmentsPrimary?null:e._assignments.length)}}},inlinePlaceholders:function(){var e=this;return!this.isAvailable||this._areAssignmentsPrimary||0===this._assignments.length?[]:[this._inlinePlaceholder(this._assignments,-1)].concat(r()(this._assignments.map((function(t,n){return e._inlinePlaceholder(e._assignments,n)}))))},_inlinePlaceholder:function(e,t){var n=this;return{get available(){return!0},get visible(){if(n._isSaving())return!1;var i=n._draggedPersonWithType(),s=i&&!h(e[t],i)&&!h(e[t+1],i);return null!=s&&s},key:"placeholder-".concat(t+1),order:t,addAssignment:function(){return n._addAssignment(n._areAssignmentsPrimary?null:t+1)}}}},{PlansDragDrop:l}}
1(X,y,I),te={ErrorIndicator:{name:"ErrorIndicator",props:{viewModel:{type:X.ErrorList,required:!0}},computed:{showRetryAll:function(){return this.viewModel.items.reduce((function(e,t){return e+(t.actions.some((function(e){return e.isRetry}))?1:0)}),0)>1}},render:function(e){var t=this;return e("div",[].concat(r()(this.viewModel.items.map((function(t){var n;return e("b-alert",{class:"d-flex flex-wrap",props:{dismissible:t.dismissible,dismissLabel:"Luk",show:!0,variant:"danger"},on:{dismissed:function(){t.dismiss()}},key:t.id},[null===(n=t.message)||void 0===n?void 0:n.toString()].concat(r()(t.actions.map((function(t,n){return e("b-link",{class:0==n?"ml-auto":"ml-3",on:{click:function(){t.call()}}},t.label)})))))}))),[this.showRetryAll?e("div",{class:"d-flex flex-row-reverse mx-3"},[e("b-link",{on:{click:function(){t.viewModel.retryAll()}}},"Prøv alle igen")]):""]))}}},ne=function(){function e(e){var t,n;this.items=[],this._actualValues=[],this._desiredValues=e.initial,this._options={preselectAll:null!==(t=e.preselectAll)&&void 0!==t&&t,change:null!==(n=e.change)&&void 0!==n?n:function(){}}}return e.prototype={get values(){return this._actualValues},select:function(e){this._desiredValues=r()(e),this._synchronize({forceChange:!1})},update:function(e){this.items=e,this._synchronize({forceChange:!0})},_synchronize:function(e){var t,n,i=this,s=e.forceChange,a=null===(n=this._desiredValues)||void 0===n?void 0:n.filter((function(e){return i.items.some((function(t){return e===t.value&&!t.disabled}))})),o=(null==a?void 0:a.length)>0?a:this._options.preselectAll?this.items.map((function(e){return e.value})):[],l=o.filter((function(e){return!i._actualValues.includes(e)})),c=this._actualValues.filter((function(e){return!o.includes(e)}));(t=this._actualValues).splice.apply(t,[0,this._actualValues.length].concat(r()(o))),(s||l.length>0||c.length>0)&&this._options.change(o,s)}},{MultipleSelection:e}}(),ie=function(e,t,n,i){var s=t.escapeHtml,a=e.MultipleSelection,o=n.IncrementalSearch;return{PersonnelWithTypesBar:{name:"PersonnelWithTypesBar",components:{"person-with-type-pill":i.PersonWithTypePill},props:{areaSettings:{type:Object,required:!0},departments:{type:Array,required:!0},personnelWithTypes:{type:Array,required:!0},teams:{type:Array,required:!0}},data:function(){return{departmentSelection:new a({initial:this.areaSettings.planAssignmentSelectedDepartments,change:this.onDepartmentSelectionChange.bind(this)}),search:new o,teamSelection:new a({initial:this.areaSettings.planAssignmentSelectedTeams,change:this.onTeamSelectionChange.bind(this)})}},computed:{filterIcon:function(){return 0===this.departmentSelection.values.length&&0===this.teamSelection.values.length?"far fa-filter":"fa fa-filter"},filteredPersonnelWithTypes:function(){var e=this,t=this.teamSelection.values.map((function(t){return e.teams.find((function(e){return e.id===t}))})),n=this.departmentSelection.values.map((function(t){return e.departments.find((function(e){return e.id===t}))}));return 0===t.length&&0===n.length?this.personnelWithTypes:this.personnelWithTypes.filter((function(e){return t.some((function(t){return t.members.includes(e.id)}
1))||n.some((function(t){return t.members.includes(e.id)}))}))},searchedPersonnelWithTypes:function(){var e=this;return this.filteredPersonnelWithTypes.filter((function(t){return e.search.matches(t.personInitials)}))}},watch:{departments:{immediate:!0,handler:function(e){var t=u.a.mark(i),n=r()(e).sort((function(e,t){return e.name.localeCompare(t.name)}));function i(e,n,a){var r,o,l;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=d(e),t.prev=1,r.s();case 3:if((o=r.n()).done){t.next=12;break}if((l=o.value).parentId==n){t.next=7;break}return t.abrupt("continue",10);case 7:return t.next=9,{html:"".concat(a).concat(s(l.name)),value:l.id};case 9:return t.delegateYield(i(e,l.id,a+"&nbsp;&nbsp;"),"t0",10);case 10:t.next=3;break;case 12:t.next=17;break;case 14:t.prev=14,t.t1=t.catch(1),r.e(t.t1);case 17:return t.prev=17,r.f(),t.finish(17);case 20:case"end":return t.stop()}}),t,null,[[1,14,17,20]])}this.departmentSelection.update(r()(i(n,null,"")))}},teams:{immediate:!0,handler:function(e){this.teamSelection.update(e.map((function(e){return{text:e.name,value:e.id}})).sort((function(e,t){return e.text.localeCompare(t.text)})))}}},methods:{personWithTypeKey:function(e){return"".concat(e.id,"-").concat(e.personnelType)},personWithTypeDragStart:function(e,t){this.$emit("person-with-type-drag-start",{event:e,personWithType:{id:t.id,personnelType:t.personnelType}})},personWithTypeDragEnd:function(e){this.$emit("person-with-type-drag-end",e)},onDepartmentSelectionChange:function(e,t){t||(this.areaSettings.planAssignmentSelectedDepartments=e)},onTeamSelectionChange:function(e,t){t||(this.areaSettings.planAssignmentSelectedTeams=e)},onDropdownSelectKeydown:function(e){switch(e.code){case"Escape":case"Tab":break;default:e.stopPropagation()}}},render:function(e){var t=this,n=e("b-dropdown",{class:"filter-dropdown",props:{boundary:"window",size:"sm",variant:"outline-secondary"}},[].concat(r()(i("Afdelinger",this.departmentSelection,this)),r()(i("Teams",this.teamSelection,this)),[e("template",{slot:"button-content"},[e("span",{class:this.filterIcon},[])])]));return e("div",{class:"personnel-with-types-bar"},[e("b-form-input",{class:"search-input",props:{placeholder:"Søg",value:this.search.value},on:{update:function(e){return t.search.change(e)}}},[]),n].concat(r()(this.searchedPersonnelWithTypes.map((function(n){return function(t,n){return e("person-with-type-pill",{attrs:{draggable:!0,tabIndex:"0"}
1,props:{viewModel:t},nativeOn:{dragstart:function(e){return n.personWithTypeDragStart(e,t)},dragend:function(e){return n.personWithTypeDragEnd(e)}},directives:[{name:"b-tooltip",modifiers:{blur:!0,click:!0,window:!0}}],key:n.personWithTypeKey(t)},[])}(n,t)})))));function i(t,n,i){return[e("b-dropdown-header",{class:"d-flex"},[e("span",[t]),e("b-link",{class:"ml-auto",on:{click:function(){return n.select([])}}},"Ryd")]),e("b-dropdown-form",[e("b-form-select",{props:{multiple:!0,options:n.items,plain:!0,selectSize:5,value:n.values},on:{change:function(e){return n.select(e)}},nativeOn:{keydown:i.onDropdownSelectKeydown.bind(i)}},[])])]}}}}}(ne,V,Y,b),se=function(e,t,n){var i=t.MultipleSelection;return{MultipleSelectionInput:{name:"MultipleSelectionInput",directives:{setFocus:n.SetFocus},inheritAttrs:!1,props:{id:{type:String,required:!0},dropdown:{type:Boolean,default:!1},label:{type:String,required:!0},viewModel:{type:i,required:!0}},computed:{text:function(){var e=this;return this.viewModel.values.map((function(t){return e.viewModel.items.find((function(e){return e.value===t}))})).map((function(e){return e.text})).join(", ")}},methods:{onSelectKeydown:function(e){switch(e.code){case"Escape":case"Tab":break;default:e.stopPropagation()}},select:e.debounce((function(e){this.viewModel.select(e)}),200)},render:function(e){var t,n=e("b-form-select",{class:"select",attrs:Object.assign({"data-set-focus":!0},this.$attrs),props:{id:this.id,options:this.viewModel.items,multiple:!0,plain:!0,selectSize:8,value:this.viewModel.values},on:{change:this.select.bind(this)},nativeOn:{keydown:this.onSelectKeydown.bind(this)}},[]);return e("b-form-group",{class:"multiple-selection-input-dropdown",props:{label:this.label,labelFor:this.id}},[this.dropdown?e("b-dropdown",{props:{text:this.text,variant:"input"},directives:[{name:"setFocus",modifiers:{shown:!0}}]},[n,e("template",{slot:"button-content"},[e("span",{class:"text"},[null===(t=this.text)||void 0===t?void 0:t.toString()])])]):n])}}}}(j,ne,M),ae=function(){function e(i,s){if(s.isBefore(i))throw"End must be after start";return i.isSame(s)?t():{start:i,end:s,empty:!1,contains:function(e){return s.isAfter(e)&&!i.isAfter(e)},duration:function(){return i.durationTo(s)},intersect:function(n){if(!this.intersectsWith(n))return t();var a=i.compare(n.start),r=s.compare(n.end);return e(a>0?i:n.start,r<0?s:n.end)},intersectsWith:function(e){return!e.empty&&(i.isBefore(e.end)&&s.isAfter(e.start))},isSame:function(e){return!e.empty&&(i.isSame(e.start)&&s.isSame(e.end))},iterate:u.a.mark((function e(t){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.start;case 1:return e.next=3,n;case 3:n=t(n);case 4:if(n.isBefore(this.end)){e.next=1;break}case 5:case"end":return e.stop()}}),e,this)})),map:function(n,a){var r=n(i),o=(null!=a?a:n)(s);return o.isBefore(r)?t():e(r,o)},span:function(t){return t.empty?this:e(t.start.isBefore(i)?t.start:i,t.end.isBefore(s)?s:t.end)},split:function(t){var i=this,s=[];do{var a=t(i.start);if(!a.isBefore(i.end)||!a.isAfter(i.start))return s.push(i),n(s);s.push(e(i.start,a)),i=e(a,i.end)}while(!i.empty);return n(s)},subtract:function(t){if(t.empty)return n([this]);if(i.compare(t.end)>=0)return n([this]);if(s.compare(t.start)<=0)return n([this]);var a=i.compare(t.start),r=s.compare(t.end);return a>0?r<=0?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n([e(t.end,s)]):0==a?r>0?n([e(t.end,s)]):{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n(r>0?[e(i,t.start),e(t.end,s)]:[e(i,t.start)])},subtractSum:function(e){var t=this;return e.empty?n([this]):e.periods.map((function(e){return t.subtract(e)})).reduce((function(e,t){return e.intersect(t)}))},toString:function(){return i.toString()+" - "+s.toString()}}}function t(){return{empty:!0,contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},isSame:function(e){return e.empty},iterate:u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})),map:function(){return this},span:function(e){return e},split:function(){return this},subtract:function(){return this},subtractSum:function(){return{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}},toString:function(){return""}}}function n(t){return 0===(t=t.filter((function(e){return!e.empty}))).length?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:((t=function(e){return e.reduce((function(e,t){return function(e,t){var n=(c=e,u=function(e){return e.intersectsWith(t)},c.reduce((function(e,t){var n=l()(e,2),i=n[0],s=n[1];return(u(t)?i:s).push(t),[i,s]}),[[],[]])),i=l()(n,2),s=i[0],a=i[1],o=s.reduce((function(e,t){return e.span(t)}),t);var c,u;return[o].concat(r()(a))}(e,t)}),[])}(t)).sort((function(e,t){return e.start.compare(t.start)})),{empty:!1,periods:t,contains:function(e){return t.some((function(t){return t.contains(e)}))},intersect:function(e){return n(t.map((function(t){return e.periods.map((function(e){return t.intersect(e)}))})).reduce((function(e,t){return e.concat(t)}),[]))},intersectsWith:function(e){return t.some((function(t){return e.periods.some((function(e){return t.intersectsWith(e)}))}))},joinAdjacent:function(i){return 0===t.length?{empty:!0,periods:[],contains:function(){return!1},intersect:function(){return this},intersectsWith:function(){return!1},joinAdjacent:function(){return this},split:function(){return this},toString:function(){return""},union:function(e){return e}}:n(t.reduce((function(t,n){if(0===t.result.length)return{result:[n],lastJoinable:i(n)};var s=t.result[t.result.length-1],a=i(n);if(s.end.isSame(n.start)&&t.lastJoinable&&a){var r=e(s.start,n.end);return t.result[t.result.length-1]=r,{result:t.result,lastJoinable:!0}}return t.result.push(n),{result:t.result,lastJoinable:a}}),{result:[]}).result)},split:function(e){return n(t.map((function(t){return t.split(e).periods})).reduce((function(e,t){return e.concat(t)}),[]))},toString:function(){return t.map((function(e){return e.toString()})).join(", ")},union:function(e){return e.empty?this:n([].concat(r()(t),r()(e.periods)))}})}return{empty:t,nonEmpty:e,sum:n}}(),re=function(e,t,n){var i=e,s=t.Result,a=n.ValidatedTime,r=n.validTime;function o(e){var t,n,i,s=this;this.start=new a({initialValue:null===(t=e.initialValue)||void 0===t?void 0:t.start,isAvailable:!!e.isAvailable,change:function(e,t){return s._changeOfStart(e,t)},validate:function(e){return s._validStart(e)}}),this.end=new a({initialValue:null===(n=e.initialValue)||void 0===n?void 0:n.end,isAvailable:!!e.isAvailable,change:function(e,t){return s._changeOfEnd(e,t)},validate:function(e){return s._validEnd(e)}}),this._change=null!==(i=e.change)&&void 0!==i?i:function(){},this._isAvailable=!!e.isAvailable,this._isSynchronizingStartAndEnd=!1}return o.prototype={get availableValue(){return this._isAvailable?this.value:null}
1,get value(){return this._validPeriod(this.start.value,this.end.value)},set:function(e){this._isAvailable=!0,this._isSynchronizingStartAndEnd=!0;try{this.start.set(e.start),this.end.set(e.end)}finally{this._isSynchronizingStartAndEnd=!1}this._change(this.value,!1)},reset:function(e){this._isAvailable=!1,this._isSynchronizingStartAndEnd=!0;try{var t,n;this.start.reset(void 0===e?void 0:null!==(t=null==e?void 0:e.start)&&void 0!==t?t:null),this.end.reset(void 0===e?void 0:null!==(n=null==e?void 0:e.end)&&void 0!==n?n:null)}finally{this._isSynchronizingStartAndEnd=!1}this._change(this.value,!0)},validate:function(){this._isAvailable=!0;var e=this.start.validate(),t=this.end.validate();return this._validPeriod(e,t)},_changeOfStart:function(e,t){this._isSynchronizingStartAndEnd||this._change(this._validPeriod(e,this.end.value),t)},_changeOfEnd:function(e,t){this._isSynchronizingStartAndEnd||this._change(this._validPeriod(this.start.value,e),t)},_validPeriod:function(e,t){return e.then((function(e){return t.then((function(t){return i.nonEmpty(e,t)}))}))},_validStart:function(e){return r(this.end.textValue,this._bounds,this._moment).then((function(t){return e.compare(t)>=0?s.error("Starttid skal være inden sluttid"):s.success(e)}),(function(){return e}))},_validEnd:function(e){return r(this.start.textValue,this._bounds,this._moment).then((function(t){return t.compare(e)>=0?s.error("Sluttid skal være efter starttid"):s.success(e)}),(function(){return e}))}},{ValidatedTimePeriod:o}}(ae,F,B),oe=function(e,t,n,i,s,a,r){var o=e.ErrorList,l=n.canceled,c=i.ProgressList,u=s.Result,d=a.ValidatedTimePeriod,h=r.ValidatedValue,m=t;function p(e,t){this.name=new h({validate:v}),this.period=new d({}),this.title="",this.errors=new o,this.progress=new c,this._actions=e,this._modalRef=t}function v(e){var t=(e||"").trim();return 0==t.length?u.error("Indtast et navn"):t.length>100?u.error("Indtast et navn, der er kortere end 100 tegn"):u.success(t)}return p.prototype={show:function(e){this.title=e.isEdit?"Rediger pause":"Tilføj pause",this.name.reset(e.break?e.break.name:null),this.period.reset(e.break?m.nonEmpty(e.break.start,e.break.end):null),this.errors.clear();var t=this._modalRef(),n=this,i=new Promise((function(i,s){function a(s){s.preventDefault(),n._save(e).then((function(){t.hide("saved"),i()}))}t.$on("ok",a),t.$on("hide",(function e(n){"ok"!==n.trigger&&(t.$off("ok",a),t.$off("hide",e),"saved"!==n.trigger&&s(l()))}))}));return t.show(),i},_save:function(e){var t=this,n=this.name.validate(),i=this.period.validate();return n.isSuccess&&i.isSuccess?this.errors.track("Kunne ikke gemme pausen",(function(){return t.progress.track("Gemmer...",(function(){return e.isEdit?t._actions.updateBreak(e.break.id,n.value,i.value.start,i.value.end,e.break.timestamp):t._actions.addBreak(e.areaId,n.value,i.value.start,i.value.end)}))})):Promise.reject()}},{BreakEdition:p}}(X,ae,V,W,F,re,U),le=function(e,t,n,i,s,a){var r=e.ErrorList,o=e.retryActionTemplate,l=t,c=n.ProgressList,u=i.SingleSelection,d=a.BreakTable,h=s.BreakEdition;function m(e,t,n,i,s){var a=this;this.area=new u({change:function(e,t){return a._selectArea(e,t)},initial:i.breaksAreaId,fallback:{value:null,text:"Vælg område"},preselectFirst:!0}),this.edition=new h(e,n),this.errors=new r,this.noBreaksPrompt=new p(s),this.progress=new c,this.table=new d(this._delete.bind(this),this._edit.bind(this),s),this._actions=e,this._confirmationModal=t,this._settings=i,this._store=s}function p(e){this._areaId=void 0,this._schoolYearId=void 0,this._store=e}return m.prototype={addNew:l.withFocusRestore((function(){return this.edition.show({isEdit:!1,areaId:this.area.value})}),"activeElement"),selectSchoolYear:function(e){var t=this;this.noBreaksPrompt.selectSchoolYear(e),this.errors.track({message:"Kunne ikke indlæse områder",id:"areas",actions:[o()]},(function(){return t.progress.track({id:"areas",message:"Indlæser områder..."},(function(){return t._actions.loadAreas(e).then((function(){return t.area.update(t._areas(e))}),(function(n){return t.area.update(t._areas(e)),Promise.reject(n)}))}))}))},_areas:function(e){var t;return(null!==(t=this._store.areas[e])&&void 0!==t?t:[]).filter((function(e){return e.isEditable})).map((function(e){return{value:e.id,text:e.name}}))},_delete:function(e,t){var n=this;return this._confirmationModal().show({message:"Er du sikker på, at du vil slette?",title:"Slet pause",okVariant:"danger"}).then((function(i){i&&n.errors.track({message:'Kunne ikke slette pausen "'+t+'"',id:"delete-"+e,actions:[o()]},(function(){return n.progress.track({id:"delete-"+e,message:"Sletning..."},(function(){return n._actions.deleteBreak(e)}))}))}))},_edit:function(e){return this.edition.show({isEdit:!0,break:e})},_selectArea:function(e,t){var n=this;t||(this._settings.breaksAreaId=e),this.noBreaksPrompt.selectArea(e),this.table.selectArea(e),e&&this.errors.track({message:"Kunne ikke indlæse pauser",id:"breaks",actions:[o()]},(function(){return n.progress.track({id:"breaks",message:"Indlæser pauser..."},(function(){return n._actions.loadBreaks([e])}))}))}},p.prototype={get value(){var e,t,n;return null!==(e=this._store.areas[this._schoolYearId])&&void 0!==e&&e.some((function(e){return e.isEditable}))?0===(null!==(t=null===(n=this._store.breaks[this._areaId])||void 0===n?void 0:n.length)&&void 0!==t?t:0)?"Der er ingen pauser i området.":null:"Der er ingen områder, hvor du kan redigere pauser."},selectArea:function(e){this._areaId=e},selectSchoolYear:function(e){this._schoolYearId=e}},{Breaks:m}}(X,j,W,x,oe,$),ce=function(){function e(){var e=this;this.promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return e.prototype.reject=function(e){this._reject(e)},e.prototype.resolve=function(e){this._resolve(e)},{Future:e}}(),ue=(E=ce.Future,{AulaTokenMixin:{data:function(){return{aulaToken:void 0,aulaTokenFuture:new E}},computed:{token:function(){return this.aulaTokenFuture.promise}},watch:{aulaToken:function(e){null!=e&&(this.aulaTokenFuture.resolve(e),this.aulaTokenFuture=new E,this.aulaTokenFuture.resolve(e))}},mounted:function(){this.aulaToken=this.getAulaToken()}}}),de=function(){function e(e,n,i,s,a,r){return t(r()().year(e).month(n-1).date(i).hour(s).minute(a).second(0).millisecond(0))}function t(e){if(!e.isValid()){var t=function(e){switch(e.invalidAt()){case 0:return"Year value ".concat(e.year()," is invali
1d");case 1:return"Month value ".concat(e.month()," is invalid");case 2:return"Day value ".concat(e.date()," is invalid");case 3:return"Hours value ".concat(e.hour()," is invalid");case 4:return"Minute value ".concat(e.minute()," is invalid");default:return null}}(e);throw new Error("Invalid date and minute time".concat(t?". "+t:"","."))}return{_value:e,get year(){return this._value.year()},get month(){return this._value.month()+1},get day(){return this._value.date()},get hour(){return this._value.hour()},get minute(){return this._value.minute()},get dayOfWeek(){var e=this._value.day();return 0==e?6:e-1},compare:function(e){return this._value.diff(e._value,"minutes")},isAfter:function(e){return this._value.isAfter(e._value)},isBefore:function(e){return this._value.isBefore(e._value)},isSame:function(e){return this._value.isSame(e._value)},toJSON:function(){return this._value.format("YYYY-MM-DD[T]")+this._value.format("HH[:]mm")},toString:function(){return this._value.format("L LT")}}}return{fromDateAndTime:function(e,n){return t(e._value.clone().hour(n.hour).minute(n.minute))},parsePoint:function(t,n){var i=t.match(/([0-9]{1,5})\x2D([0-9]{1,2})\x2D([0-9]{1,2})T([0-9]{1,2}):([0-9]{1,2})/);if(i&&i[0]===t){var s=l()(i,6),a=s[1],r=s[2],o=s[3],c=s[4],u=s[5];return e(Number.parseInt(a,10),Number.parseInt(r,10),Number.parseInt(o,10),Number.parseInt(c,10),Number.parseInt(u,10),n)}return null},point:e,wrapMoment:function(e){return t(e.clone().second(0).millisecond(0))}}}(),he=function(){function e(e,n,i,s){return t(s()().year(e).month(n-1).date(i).hour(0).minute(0).second(0).millisecond(0))}function t(e){if(!e.isValid()){var n=function(e){switch(e.invalidAt()){case 0:return"Year value ".concat(e.year()," is invalid");case 1:return"Month value ".concat(e.month()," is invalid");case 2:return"Day value ".concat(e.date()," is invalid");default:return null}}(e);throw new Error("Invalid date".concat(n?". "+n:"","."))}return{_value:e,get year(){return this._value.year()},get month(){return this._value.month()+1},get day(){return this._value.date()},get dayOfWeek(){var e=this._value.day();return 0==e?6:e-1},addDays:function(e){return t(this._value.clone().add(e,"days"))},compare:function(e){return this._value.diff(e._value,"days")},format:function(e){switch(e){case"dayofweek":return this._value.format("dddd");case"input":return this._value.format("YYYY-MM-DD");default:throw new Error('Unknown date point format "'.concat(e,'"'))}},isAfter:function(e){return this._value.isAfter(e._value)},isBefore:function(e){return this._value.isBefore(e._value)},isSame:function(e){return this._value.isSame(e._value)},toJSON:function(){return this._value.format("YYYY-MM-DD")},toString:function(){return this._value.format("L")}}}return{parsePoint:function(t,n){var i=t.match(/([0-9]{1,5})\x2D([0-9]{1,2})\x2D([0-9]{1,2})/);if(i&&i[0]===t){var s=l()(i,4),a=s[1],r=s[2],o=s[3];return e(Number.parseInt(a,10),Number.parseInt(r,10),Number.parseInt(o,10),n)}return null},point:e,wrapMoment:function(e){return t(e.clone().hour(0).minute(0).second(0).millisecond(0))}}}(),me=function(e){var t,n=e;function i(e,t,n){return s(n()().isoWeekYear(e).isoWeek(t).day(1).hour(0).minute(0).second(0).millisecond(0))}function s(e){if(!e.isValid()){var t=function(e){switch(e.invalidAt()){case 0:return"Year value ".concat(e.year()," is invalid");case 1:return"Month value ".concat(e.month()," is invalid");case 2:return"Day value ".concat(e.date()," is invalid");default:return null}}(e);throw new Error("Invalid week".concat(t?". "+t:"","."))}return{_value:e,get year(){return this._value.isoWeekYear()},get number(){return this._value.isoWeek()},addWeeks:function(e){return s(this._value.clone().add(e,"weeks"))},compare:function(e){return this._value.diff(e._value,"days")},endOfWeek:function(){var e=this._value.clone().day(7);return n.wrapMoment(e)},isAfter:function(e){return this._value.isAfter(e._value)},isBefore:function(e){return this._value.isBefore(e._value)},isSame:function(e){return this._value.isSame(e._value)},startOfWeek:function(){return n.wrapMoment(this._value.clone())},toDate:function(e){var t=this._value.clone().day(e+1);return n.wrapMoment(t)},toJSON:function(){return this.toString()},toString:function(){return this._value.format("GGGG[-W]WW")}}}return t={fromDate:function(e){return s(e._value.clone().day(0===e._value.day()?-6:1))},parsePoint:function(e,t){var n=e.match(/([0-9]{1,5})\x2DW([0-9]{1,2})/);if(n&&n[0]===e){var s=l()(n,3),a=s[1],r=s[2];return i(Number.parseInt(a,10),Number.parseInt(r,10),t)}return null},point:i},t}(he),pe=function(e){var t=u.a.mark(i),n=e;function i(e){var i,s,a,r,o,l,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=e.map((function(e){return n.fromDate(e)}
1),(function(e){return n.fromDate(e.addDays(-1)).addWeeks(1)})),s=i.iterate((function(e){return e.addWeeks(1)})),a=d(s),t.prev=3,a.s();case 5:if((r=a.n()).done){t.next=13;break}return o=r.value,l=o.startOfWeek(),c=o.endOfWeek(),t.next=11,{text:"Uge ".concat(o.number," (").concat(l," - ").concat(c,")"),value:o.toString()};case 11:t.next=5;break;case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(3),a.e(t.t0);case 18:return t.prev=18,a.f(),t.finish(18);case 21:case"end":return t.stop()}}),t,null,[[3,15,18,21]])}return{weeksOfSchoolYear:i}}(me),ve=function(e,t,n,i,s,a,o,l,c){var u=e.ErrorList,d=t.Future,h=n,m=a.ProgressList,p=s.canceled,v=o.SingleSelection,f=i.MultipleSelection,g=l,_=c.weeksOfSchoolYear;function E(e,t,n,i,s){this.progress=new m,this.errors=new u,this.sourceWeek=new v({fallback:{text:"Vælg uge",value:null}}),this.targetWeeks=new f({}),this._actions=t,this._confirmationModal=n,this._modalRef=e,this._moment=i,this._store=s}return E.prototype={show:function(e,t,n,i){var s,a,o,l=this,c=null!==(s=null===(a=this._store.schools.find((function(e){return e.code===n})))||void 0===a||null===(o=a.schoolYears.find((function(e){return e.id===t})))||void 0===o?void 0:o.period)&&void 0!==s?s:h.empty();this.sourceWeek.select(i.toString());var u=r()(_(c));this.sourceWeek.update(u),this.targetWeeks.update(u);var m=new d,v={value:!1,update:function(e){this.value=this.value||e.some((function(e){return i.isSame(e)}))}};return new Promise((function(t,n){m.promise.then((function(){l._modalRef().hide("copied"),t(v.value)}));l._modalRef().$on("hide",(function t(i){"ok"===i.trigger?(i.preventDefault(),l._confirmationModal().show({message:"Er du sikker på, at du vil fortsætte? Alle vagter i valgte uger overskrives.",title:"Kopier vagter",okVariant:"danger"}).then((function(t){t&&l._copy(e,m,v)}))):("copied"!==i.trigger&&(null==m||m.reject(p()),n(p())),l._modalRef().$off("hide",t),l.sourceWeek.select(null),l.sourceWeek.update([]),l.targetWeeks.select([]),l.targetWeeks.update([]))})),l._modalRef().show()}))},_copy:function(e,t,n){var i=this,s=g.parsePoint(this.sourceWeek.value,this._moment),a=this.targetWeeks.values.map((function(e){return g.parsePoint(e,i._moment)}));return function e(i,s,a){var r=this;return this.errors.track("Kunne ikke kopiere uger",(function(){return r.progress.track("Kopierer uger...",(function(){return r._actions.copyAssignments(i,s,a).then((function(a){n.update(a.successfulWeeks),a.failedWeeks.length>0?r.errors.add({message:"Kunne ikke kopiere følgende uger (".concat(a.failedWeeks.sort((function(e,t){return e.compare(t)})).map((function(e){return"Uge ".concat(e.number)})).join(", "),")"),retryCallback:function(){return e.call(r,i,s,a.failedWeeks)}}):t.resolve()}))}))}))}.call(this,e,s,a)}},{CopyWeek:E}}(X,ce,ae,ne,V,W,x,me,pe),fe=function(e){var t=e;function n(e){this.areas={},this.assignments={},this.breaks={},this.departments={},this.personnel={},this.personnelAbsences={},this.personnelSubstitutions={},this.personnelTypes={},this.plannedPersonnelAbsences={},this.schools=[],this.teams={},this._vueSet=e}return n.prototype={clear:function(){this.areas={},this.assignments={},this.breaks={},this.departments={},this.personnel={},this.personnelAbsences={},this.personnelSubstitutions={},this.personnelTypes={},this.plannedPersonnelAbsences={},this.schools=[],this.teams={}},clearAssignments:function(e,t){var n=this.assignments[e];if(n){var i,s=d(t);try{for(s.s();!(i=s.n()).done;){delete n[i.value]}}catch(e){s.e(e)}finally{s.f()}}},addBreak:function(e,t){var n,i=null!==(n=this.breaks[e])&&void 0!==n?n:this._vueSet(this.breaks,e,[]);i.splice(i.length,0,t)},addSchools:function(e){var t,n=this,i=d(e);try{var s=function(){var e=t.value,i=n.schools.findIndex((function(t){return t.code===e.code}));-1!==i?n.schools.splice(i,1,e):n.schools.splice(n.schools.length,0,e)};for(i.s();!(t=i.n()).done;)s()}catch(e){i.e(e)}finally{i.f()}this.schools.sort((function(e,t){return e.name.localeCompare(t.name)}))},deleteBreak:function(e){for(var t=0,n=Object.keys(this.breaks);t<n.length;t++){var i,s,a=n[t],r=null!==(i=null===(s=this.breaks[a])||void 0===s?void 0:s.findIndex((function(t){return t.id===e})))&&void 0!==i?i:-1;if(-1!==r){this.breaks[a].splice(r,1);break}}},setAreas:function(e,t){var n=r()(t);n.sort((function(e,t){return e.name.localeCompare(t.name)})),this._vueSet(this.areas,e,n)},setAssignments:function(e,t,n){var i;this._vueSet(null!==(i=this.assignments[e])&&void 0!==i?i:this._vueSet(this.assignments,e,{}),t,n)},setBreaks:function(e,t){this._vueSet(this.breaks,e,t)},setDepartments:function(e,t){this._vueSet(this.departments,e,t)},setPersonnel:function(e,t){this._vueSet(this.personnel,e,t)}
1,setPersonnelAbsences:function(e,t,n){var i,s;this._vueSet(null!==(i=this.personnelAbsences[e])&&void 0!==i?i:this._vueSet(this.personnelAbsences,e,{}),t,n.reduce((function(e,t){var n=e[t.id];if(n){var i;n[null!==(i=t.personnelType)&&void 0!==i?i:null]=t.periods}else{var s,a={};a[null!==(s=t.personnelType)&&void 0!==s?s:null]=t.periods,e[t.id]=a}return e}),{})),this._vueSet(null!==(s=this.plannedPersonnelAbsences[e])&&void 0!==s?s:this._vueSet(this.plannedPersonnelAbsences,e,{}),t,n.reduce((function(e,t){var n=e[t.id];if(n){var i;n[null!==(i=t.personnelType)&&void 0!==i?i:null]=t.planned}else{var s,a={};a[null!==(s=t.personnelType)&&void 0!==s?s:null]=t.planned,e[t.id]=a}return e}),{}))},setPersonnelSubstitutions:function(e,t,n){var i=this;e.forEach((function(e){var s,a,r;return i._vueSet(null!==(s=i.personnelSubstitutions[e])&&void 0!==s?s:i._vueSet(i.personnelSubstitutions,e,{}),t,null!==(a=null===(r=n.find((function(t){return t.areaId===e})))||void 0===r?void 0:r.substitutions)&&void 0!==a?a:[])}))},setPersonnelTypes:function(e){this.personnelTypes=e.reduce((function(e,t){return e[t.id]={description:t.description,abbreviation:t.abbreviation},e}),{})},setTeams:function(e,t){this._vueSet(this.teams,e,t)},updateAssignments:function(e,n,i,s,a){var r=this,o=t.fromDate(n).toString(),l=Object.keys(this.assignments).map((function(t){var i=r.assignments[t];return Object.keys(i).filter((function(e){return e===o})).map((function(t){return i[t].find((function(t){return t.breakId===e&&t.dayIndex===n.dayOfWeek}))})).find((function(e){return e}))})).find((function(e){return e}));if(l)l.primary=i.map((function(e){return{personId:e.personId,personnelType:e.personnelType}})),l.backup=s.map((function(e){return{personId:e.personId,personnelType:e.personnelType}})),l.timestamp=a;else{var c,u,d=Object.keys(this.breaks).find((function(t){return r.breaks[t].some((function(t){return t.id===e}))})),h=null!==(c=this.assignments[d])&&void 0!==c?c:this._vueSet(this.assignments,d,{});(null!==(u=h[o])&&void 0!==u?u:this._vueSet(h,o,[])).push({breakId:e,dayIndex:n.dayOfWeek,primary:i.map((function(e){return{personId:e.personId,personnelType:e.personnelType}})),backup:s.map((function(e){return{personId:e.personId,personnelType:e.personnelType}})),timestamp:a})}},updateBreak:function(e){for(var t=0,n=Object.keys(this.breaks);t<n.length;t++){var i,s,a=n[t],r=null!==(i=null===(s=this.breaks[a])||void 0===s?void 0:s.findIndex((function(t){return t.id===e.id})))&&void 0!==i?i:-1;if(-1!==r){this.breaks[a].splice(r,1,e);break}}}},{Store:n}}(me),ge=function(e,t,n,i){var s=e,a=t,r=n,o=i;function l(e,t){this._moment=e,this._settings=t}function c(e,t){this._areaId=e,this._nameSuffix="_".concat(e),this._settings=t}return l.prototype={get activeTab(){var e;return null===(e=this._settings)||void 0===e?void 0:e.getLocal("activeTab")},set activeTab(e){var t;null===(t=this._settings)||void 0===t||t.setLocal("activeTab",e)},get breaksAreaId(){var e;return null===(e=this._settings)||void 0===e?void 0:e.getLocal("breaksAreaId")},set breaksAreaId(e){var t;null===(t=this._settings)||void 0===t||t.setLocal("breaksAreaId",e)},get countsAreaIds(){var e;return null===(e=this._settings)||void 0===e?void 0:e.getLocal("countsAreaIds")},set countsAreaIds(e){var t;null===(t=this._settings)||void 0===t||t.setLocal("countsAreaIds",e)},get countsPeriod(){var e,t,n=null===(e=this._settings)||void 0===e?void 0:e.getLocal("countsPeriodStart"),i=null===(t=this._settings)||void 0===t?void 0:t.getLocal("countsPeriodEnd");if(!n||!i)return null;var r=s.parsePoint(n,this._moment),o=s.parsePoint(i,this._moment);return!r||!o||o.isBefore(r)||r.isSame(o)?null:a.nonEmpty(r,o)},set countsPeriod(e){var t,n,i,s;null===(t=this._settings)||void 0===t||t.setLocal("countsPeriodStart",null==e||null===(n=e.start)||void 0===n?void 0:n.toJSON()),null===(i=this._settings)||void 0===i||i.setLocal("countsPeriodEnd",null==e||null===(s=e.end)||void 0===s?void 0:s.toJSON())},get planAreaIds(){var e;return null===(e=this._settings)||void 0===e?void 0:e.getPersistent("planAreaIds")},set planAreaIds(e){var t;
1null===(t=this._settings)||void 0===t||t.setPersistent("planAreaIds",e)},get planDayOfWeek(){var e;return null===(e=this._settings)||void 0===e?void 0:e.getLocal("planDayOfWeek")},set planDayOfWeek(e){var t;null===(t=this._settings)||void 0===t||t.setLocal("planDayOfWeek",e)},get planAssignmentEnabled(){var e;return null===(e=this._settings)||void 0===e?void 0:e.getLocal("planAssignmentEnabled")},set planAssignmentEnabled(e){var t;null===(t=this._settings)||void 0===t||t.setLocal("planAssignmentEnabled",e)},get planWeek(){var e,t=null===(e=this._settings)||void 0===e?void 0:e.getLocal("planWeek");return t?o.parsePoint(t,this._moment):void 0},set planWeek(e){var t;null===(t=this._settings)||void 0===t||t.setLocal("planWeek",null==e?void 0:e.toString())},get schoolCode(){var e;return null===(e=this._settings)||void 0===e?void 0:e.getLocal("schoolCode")},set schoolCode(e){var t;null===(t=this._settings)||void 0===t||t.setLocal("schoolCode",e)},get schoolYearId(){var e;return null===(e=this._settings)||void 0===e?void 0:e.getLocal("schoolYearId")},set schoolYearId(e){var t;null===(t=this._settings)||void 0===t||t.setLocal("schoolYearId",e)},ofArea:function(e){return new c(e,this._settings)}},l.load=function(e,t,n,i,s,a){return t().then((function(t){return r(e,t,i,s,a,"playground-duty")})).catch((function(){return null})).then((function(e){return new l(n,e)}))},c.prototype={get planAssignmentSelectedDepartments(){var e;return this._isAvailable?null===(e=this._settings)||void 0===e?void 0:e.getLocal(this._settingName("planAssignmentSelectedDepartments")):void 0},set planAssignmentSelectedDepartments(e){var t;this._isAvailable&&(null===(t=this._settings)||void 0===t||t.setLocal(this._settingName("planAssignmentSelectedDepartments"),e))},get planAssignmentSelectedTeams(){var e;return this._isAvailable?null===(e=this._settings)||void 0===e?void 0:e.getLocal(this._settingName("planAssignmentSelectedTeams")):void 0},set planAssignmentSelectedTeams(e){var t;this._isAvailable&&(null===(t=this._settings)||void 0===t||t.setLocal(this._settingName("planAssignmentSelectedTeams"),e))},get _isAvailable(){return!!this._areaId},_settingName:function(e){return e+this._nameSuffix}},{Settings:l}}(he,ae,J,me),_e=function(e,t){var n=t.fullNameAndEmployment,i=e;function s(e,t){this._assignments=e,this._areaId=null,this._breakId=null,this._date=null,this._schoolYearId=null,this._store=t}return s.prototype={get items(){var e=this,t=this._personnel,i=this._personnelTypes,s=this._substitutedPersonnel,a=this._assignments.primary.map((function(n){return o(n,e._assignments,t,s,i,null)}));a.sort((function(e,t){return e.fullNameAndEmployment.localeCompare(t.fullNameAndEmployment)}));var r=this._assignments.backup.map((function(n,a){return o(n,e._assignments,t,s,i,a+1)}));return a.concat(r);function o(e,t,i,s,a,r){var o=i.find((function(t){return t.id===e.personId})),l=s.includes(e.personId),c=a[e.personnelType];return{assignment:null!==r?"Bagvagt prio ".concat(r):"Forvagt",fullNameAndEmployment:n(o,c),id:e.personId,isSubstituted:l,key:e.personId,actions:function(){return[{get enabled(){return t.canToggleBackup(e.personId,l)},get icon(){return null!==r?"fa-play-circle":"fa-pause-circle"},get label(){return null!==r?"Flyt til forvagt":"Flyt til bagvagt"},call:function(){t.toggleBackup(e.personId)}},{get enabled(){return t.canMoveDown(e.personId)},icon:"fa-chevron-circle-down",label:"Flyt ned",call:function(){t.moveDown(e.personId)}},{get enabled(){return t.canMoveUp(e.personId)},icon:"fa-chevron-circle-up",label:"Flyt op",call:function(){t.moveUp(e.personId)}},{get enabled(){return t.canDelete(l)},icon:"fa-trash",label:"Slet",call:function(){t.delete(e.personId)}}]}}}},get fields(){return[{key:"fullNameAndEmployment",class:"no-text-overflow",label:"Fulde navn og beskæftigelse"},{key:"assignment",label:"Opgave"},{key:"actions",label:""}]},update:function(e,t,n,i){this._areaId=t,this._breakId=n,this._date=i,this._schoolYearId=e},get _personnel(){var e;return null!==(e=this._store.personnel[this._schoolYearId])&&void 0!==e?e:[]},get _substitutedPersonnel(){var e,t,n=this;return(null!==(e=null===(t=this._store.personnelSubstitutions[this._areaId])||void 0===t?void 0:t[i.fromDate(this._date)])&&void 0!==e?e:[]).filter((function(e){return e.breakId===n._breakId&&e.date.isSame(n._date)})).map((function(e){return e.personId}))},get _personnelTypes(){return this._store.personnelTypes}},{PlannedAssignments:s}}(me,T),Ee=function(e,t,n,i,s,a,r,o,l,c){var u=e,d=t.ErrorList,h=t.actionTemplate,m=t.retryActionTemplate,p=n,v=i.canceled,f=s.ProgressList,g=a.ActualAssignments,_=r.EditableAssignments,E=o.IncrementalSearch,A=l.fullNameAndEmployment,T=c.PlannedAssignments;function b(e,t,n){var i=new _;this.actualAssignments=new g(e,i,n),this.areaIdEditable=!1,this.errors=new d,this.plannedAssignments=new T(i,n),this.progress=new f,this._actions=e,this._assignments=i,this._breakId=void 0,this._dayIndex=void 0,this._modalRef=t,this._personnelSearch={primary:new E,backup:new E},this._schoolYearId=void 0,this._store=n,this._week=void 0}return b.prototype={get assignablePersonnel(){return[e(!1,this._assignablePersonnel({assignAsBackup:!1}),this._personnelSearch.primary),e(!0,this._assignablePersonnel({assignAsBackup:!0}),this._personnelSearch.backup)];function e(e,n,i){return{key:e?"backup":"primary",label:"Påsæt person som ".concat(e?"bagvagt":"forvagt"),id:"kmd-educa-personale-playground-duty-plans-edition-assign-as-".concat(e?"backup":"primary","-dropdown"),groups:[t("unassigned",n.unassigned,e),t("already-assigned-personnel-type",n.alreadyAssignedWithDifferentPersonnelType,e),t("already-assigned-assignment-type",n.alreadyAssignedWithOppositeAssignmentType,e),t("planned-absent",n.plannedAbsent,e),t("not-reassignable-due-to-substitution",n.notReassignableDueToSubstitution,e)],search:i,searchInputId:"kmd-educa-personale-playground-duty-plans-edition-".concat(e?"backup":"primary","-personnel-search-input")}}function t(e,t,n){return{id:"kmd-educa-personale-playground-duty-plans-edition-assign-as-primary-".concat(e,"-group"),items:t,key:e,label:function(){switch(e){case"unassigned":return"Ledig personale";case"already-assigned-personnel-type":return"Personale allerede påsat som ".concat(n?"bagvagt":"forvagt"," men med anden personale type");case"already-assigned-assignment-type":return"Personale allerede påsat som ".concat(n?"forvagt":"bagvagt");case"planned-absent":return"Fraværende personale";case"not-reassignable-due-to-substitution":return"Personer der ikke kan påsættes, da de er vikardækket"}}()}}},get breakAndDate(){var e=this._date,t=this._breakName;return e&&t?"".concat(t," — ").concat(e.format("dayofweek")," ").concat(e):""},get _date(){var e;return null===(e=this._week)||void 0===e?void 0:e.toDate(this._dayIndex)},get _break(){var e,t=this;return void 0===this._breakId?null:null===(e=this._store.breaks[this._areaId])||void 0===e?void 0:e.find((function(e){return e.id===t._breakId}))},get _breakName(){var e;return null===(e=this._break)||void 0===e?void 0:e.name},get _breakPeriod(){var e=this._break,t=this._date;return t&&null!=e&&e.start&&null!=e&&e.end?p.nonEmpty(u.fromDateAndTime(t,e.start),u.fromDateAndTime(t,e.end)):p.empty()},get _originalAssignments(){var e=this;if(void 0===this._breakId||void 0===this._dayIndex||!this._week)return null;for(var t=0,n=Object.keys(this._store.assignments);t<n.length;t++){var i,s=n[t],a=null===(i=this._store.assignments[s][this._week])||void 0===i?void 0:i.find((function(t){return t.breakId===e._breakId&&t.dayIndex===e._dayIndex}));if(a)return a}return null}
1,get _personnel(){var e;return null!==(e=this._store.personnel[this._schoolYearId])&&void 0!==e?e:[]},get _personnelTypes(){return this._store.personnelTypes},get _plannedPersonAbsences(){var e,t;return null!==(e=null===(t=this._store.plannedPersonnelAbsences[this._schoolYearId])||void 0===t?void 0:t[this._week])&&void 0!==e?e:{}},get _substitutedPersonnel(){var e,t,n=this;return(null!==(e=null===(t=this._store.personnelSubstitutions[this._areaId])||void 0===t?void 0:t[this._week])&&void 0!==e?e:[]).filter((function(e){return e.breakId===n._breakId&&e.date.isSame(n._date)})).map((function(e){return e.personId}))},show:function(e,t,n,i,s,a){var r,o,l=this;this._areaId=e,this.areaIsEditable=t,this._breakId=n,this._dayIndex=i,this._schoolYearId=s,this._week=a;var c=this._originalAssignments;return this._assignments.update(null!==(r=null==c?void 0:c.primary)&&void 0!==r?r:[],null!==(o=null==c?void 0:c.backup)&&void 0!==o?o:[]),this.actualAssignments.update(e,n,this._date,s),this.errors.clear(),this.plannedAssignments.update(s,e,n,this._date),new Promise((function(e,n){l._modalRef().$on("hide",(function i(s){"ok"===s.trigger&&t?(s.preventDefault(),l._save().then((function(){return l._modalRef().hide("saved")}))):("saved"===s.trigger?e():n(v()),l._modalRef().$off("hide",i),l.areaIdEditable=!1,l._breakId=null,l._dayIndex=null,l._schoolYearId=null,l._week=null,l._assignments.update([],[]))})),l._modalRef().show()}))},_assignablePersonnel:function(e){var t=this,n=e.assignAsBackup,i=this._date,s=this._substitutedPersonnel,a=this._personnelTypes,r=n?this._assignments.primary:this._assignments.backup,o=n?this._assignments.backup:this._assignments.primary,l=0,c=1,u=2,d=3,h=4,m=this._plannedPersonAbsences,p=this._breakPeriod,v=this._personnel.map((function(e){var n,v,f,g=null!==(n=null===(v=m[e.id])||void 0===v||null===(f=v.null)||void 0===f?void 0:f.filter((function(e){return e.period.intersectsWith(p)})))&&void 0!==n?n:[];return e.employments.filter((function(t){return!o.some((function(n){return e.id===n.personId&&t.personnelType===n.personnelType}))&&t.period.contains(i)})).map((function(n){var i,v,f,_=null!==(i=null===(v=m[e.id])||void 0===v||null===(f=v[n.personnelType])||void 0===f?void 0:f.filter((function(e){return e.period.intersectsWith(p)})))&&void 0!==i?i:[],E=g.concat(_).map((function(e){return e.description}));E.sort((function(e,t){return e.localeCompare(t)}));var T=E.length>0;return{fullNameAndEmployment:A(e,a[n.personnelType]),groupId:o.some((function(t){return t.personId===e.id&&t.personnelType!==n.personnelType}))?T?d:c:r.some((function(t){return t.personId===e.id}))?t._assignments.canToggleBackup(e.id,s.includes(e.id))?T?d:u:h:T?d:l,personWithType:{id:e.id,personnelType:n.personnelType},plannedAbsences:E}}))})).reduce((function(e,t){return t.map((function(t){return e[t.groupId].push(t)})),e}),[[],[],[],[],[]]).map((function(e){return e.sort((function(e,t){return e.fullNameAndEmployment.localeCompare(t.fullNameAndEmployment)})).map((function(e){return{key:"".concat(e.personWithType.id,"-").concat(e.personWithType.personnelType),disabled:e.groupId===h,label:e.plannedAbsences.length>0?"".concat(e.fullNameAndEmployment," — ").concat(e.plannedAbsences.join(", ")):e.fullNameAndEmployment,call:function(){n?t._assignments.assignPersonAsBackup(e.personWithType,null):t._assignments.assignPersonAsPrimary(e.personWithType)}}}))}));return{unassigned:v[l],alreadyAssignedWithDifferentPersonnelType:v[c],alreadyAssignedWithOppositeAssignmentType:v[u],plannedAbsent:v[d],notReassignableDueToSubstitution:v[h]}},_save:function(){var e=this;return this.errors.track({message:"Kunne ikke gemme vagter",actions:[h("Genindlæs",(function(){e.errors.track({message:"Kunne ikke indlæse vagter",actions:[m()]},(function(){return e.progress.track("Indlæser vagter...",(function(){return e._actions.reloadAssignments(e._areaId,e._week).then((function(){var t,n,i=e._originalAssignments;e._assignments.update(null!==(t=null==i?void 0:i.primary)&&void 0!==t?t:[],null!==(n=null==i?void 0:i.backup)&&void 0!==n?n:[])}))}))}))}),(function(e){return 409==e.status})),m(null,(function(e){return 409!=e.status}))]},(function(){return e.progress.track("Gemmer...",(function(){var t;return e._actions.saveAssignments({breakId:e._breakId,date:e._date,primary:e._assignments.primary.map((function(e){return{personId:e.personId,personnelType:e.personnelType}})),backup:e._assignments.backup.map((function(e){return{personId:e.personId,personnelType:e.personnelType}})),timestamp:null===(t=e._originalAssignments)||void 0===t?void 0:t.t
1imestamp})}))}))}},{AssignmentsDetails:b}}(de,X,ae,V,W,function(e,t,n,i,s){var a=e,o=t,l=n,c=i.assignmentStatuses,u=s.fullNameAndEmployment;function d(e,t,n){this._actions=e,this._assignments=t,this._areaId=null,this._breakId=null,this._date=null,this._schoolYearId=null,this._store=n}return d.prototype={get fields(){return[{key:"fullNameAndEmployment",class:"no-text-overflow",label:"Fulde navn og beskæftigelse"},{key:"actualAssignment",label:"Faktisk opgave"}]},get items(){var e=this;if(null===this._areaId||null===this._breakId||null===this._breakPeriod||null===this._date||null===this._schoolYearId)return[];var t=o.sum([this._breakPeriod.map((function(t){return a.fromDateAndTime(e._date,t)}))]),n=c(this._assignments,t,this._personnel,this._personnelAbsences,this._substitutedPersonnel),i=n.primary,s=n.backup,l=this._assignments.primary.map((function(t){return i.get(t.personId).match({replaced:function(t){return e._backupAsPrimaryPerson(t.personId,t.personnelType,t.priority)},substituted:function(){return e._primaryPerson(t.personId,t.personnelType,!0)},unavailable:function(){return{skip:!0}},valid:function(){return e._primaryPerson(t.personId,t.personnelType,!1)}})})).filter((function(e){return!e.skip})).sort((function(e,t){return e.fullNameAndEmployment.localeCompare(t.fullNameAndEmployment)})),u=this._assignments.primary.map((function(t){var n,s;return null!==(n=null===(s=i.get(t.personId))||void 0===s?void 0:s.match({replaced:function(){return e._absentPerson(t.personId,t.personnelType,null)},substituted:function(){return{skip:!0}},unavailable:function(){return e._absentPerson(t.personId,t.personnelType,null)},valid:function(){return{skip:!0}}}))&&void 0!==n?n:e._unknownPerson(t.personId,t.personnelType)})).filter((function(e){return!e.skip})).sort((function(e,t){return e.fullNameAndEmployment.localeCompare(t.fullNameAndEmployment)})),d=this._assignments.backup.map((function(t,n){var i,a;return null!==(i=null===(a=s.get(t.personId))||void 0===a?void 0:a.match({substituted:function(){return e._backupPerson(t.personId,t.personnelType,n+1,!0)},used:function(){return{skip:!0}},unavailable:function(){return e._absentPerson(t.personId,t.personnelType,n+1)},unused:function(){return e._backupPerson(t.personId,t.personnelType,n+1,!1)}}))&&void 0!==i?i:e._unknownPerson(t.personId,t.personnelType)})).filter((function(e){return!e.skip}));return[].concat(r()(l),r()(u),r()(d))},get _breakPeriod(){var e,t=this,n=null===(e=this._store.breaks[this._areaId])||void 0===e?void 0:e.find((function(e){return e.id===t._breakId}));return null!=n?o.nonEmpty(n.start,n.end):null},get _personnel(){var e;return null!==(e=this._store.personnel[this._schoolYearId])&&void 0!==e?e:[]},get _personnelAbsences(){var e;return null===(e=this._store.personnelAbsences[this._schoolYearId])||void 0===e?void 0:e[l.fromDate(this._date)]},get _substitutedPersonnel(){var e,t,n=this;return(null!==(e=null===(t=this._store.personnelSubstitutions[this._areaId])||void 0===t?void 0:t[l.fromDate(this._date)])&&void 0!==e?e:[]).filter((function(e){return e.breakId===n._breakId&&e.date.isSame(n._date)})).map((function(e){return e.personId}))},update:function(e,t,n,i){this._areaId=e,this._breakId=t,this._date=n,this._schoolYearId=i},_absentPerson:function(e,t,n){return{fullNameAndEmployment:this._personFullNameAndEmployment(e,t),key:e,actualAssignment:"Fraværende (var ".concat(n?"bagvagt prio ".concat(n):"forvagt",")"),isSubstituted:!1}},_backupAsPrimaryPerson:function(e,t,n){return{fullNameAndEmployment:this._personFullNameAndEmployment(e,t),key:e,actualAssignment:"Forvagt (var bagvagt prio ".concat(n,")"),isSubstituted:!1}},_backupPerson:function(e,t,n,i){return{fullNameAndEmployment:this._personFullNameAndEmployment(e,t),key:e,actualAssignment:"Bagvagt prio ".concat(n),isSubstituted:i}},_personFullNameAndEmployment:function(e,t){var n,i=null===(n=this._store.personnel[this._schoolYearId])||void 0===n?void 0:n.find((function(t){return t.id===e})),s=this._store.personnelTypes[t];return u(i,s)},_primaryPerson:function(e,t,n){return{fullNameAndEmployment:this._personFullNameAndEmployment(e,t),key:e,actualAssignment:"Forvagt",isSubstituted:n}},_unknownPerson:function(e,t){return{fullNameAndEmployment:this._personFullNameAndEmployment(e,t),key:e,actualAssignment:"???",isSubstituted:!1}}},{ActualAssignments:d}}(de,ae,me,y,T),I,Y,T,_e),Ae=function(e,t,n){var i=e,s=t.areArraysEqual,a=t.areSetsEqual,r=n;function o(e,t){this._api=e,this._store=t}return o.prototype={addBreak:function(e,t,n,i){var s=this;return this._api.addBreak({areaId:e,name:t,start:n,end:i}).then((function(a){var r=a.id,o=a.timestamp;return s._store.addBreak(e,{id:r,name:t,start:n,end:i,timestamp:o})}))},copyAssignments:function(e,t,n){var i=this;return 0===n.length||1===n.length&&n[0].isSame(t)?Promise.resolve({failedWeeks:[],successfulWeeks:[]}
1):this._api.copyAssignments(e,t,n).then((function(s){var a=n.filter((function(e){return!t.isSame(e)&&!s.some((function(t){return e.isSame(t)}))}));return i._store.clearAssignments(e,a),{failedWeeks:s,successfulWeeks:a}}))},deleteBreak:function(e){var t=this;return this._api.deleteBreak(e).then((function(){return t._store.deleteBreak(e)}))},loadAreas:function(e){var t=this;return void 0!==this._store.areas[e]?Promise.resolve():this._api.areas(e).then((function(n){return t._store.setAreas(e,n)}))},loadAssignments:function(e,t){var n=this;if(0===e.length||!t)return Promise.resolve();var i=e.filter((function(e){return!(e in n._store.assignments&&t in n._store.assignments[e])}));return 0===i.length?Promise.resolve():this._api.assignments(i,t).then((function(e){e.forEach((function(e){var i=e.areaId,s=e.assignments;return n._store.setAssignments(i,t,s)})),i.filter((function(t){return!e.some((function(e){return e.areaId===t}))})).forEach((function(e){return n._store.setAssignments(e,t,[])}))}))},loadBreaks:function(e){var t=this,n=e.filter((function(e){return!(e in t._store.breaks)}));return 0===n.length?Promise.resolve():this._api.breaks(n).then((function(e){e.forEach((function(e){var n=e.areaId,i=e.breaks;return t._store.setBreaks(n,i)})),n.filter((function(t){return!e.some((function(e){return e.areaId===t}))})).forEach((function(e){return t._store.setBreaks(e,[])}))}))},loadCounts:function(e,t){return this._api.counts(e,t)},loadPersonnel:function(e){var t=this;return void 0!==this._store.personnel[e]&&void 0!==this._store.teams[e]&&void 0!==this._store.departments[e]?Promise.resolve():this._api.personnel(e).then((function(n){t._store.setPersonnel(e,n.personnel),t._store.setTeams(e,n.teams),t._store.setDepartments(e,n.departments)}))},loadPersonnelAbsences:function(e,t){var n,i,s=this;return void 0!==(null===(n=this._store.personnelAbsences[e])||void 0===n?void 0:n[t])||void 0!==(null===(i=this._store.plannedPersonnelAbsences[e])||void 0===i?void 0:i[t])?Promise.resolve():this._api.personnelAbsences(e,t).then((function(n){return s._store.setPersonnelAbsences(e,t,n)}))},loadPersonnelSubstitutions:function(e,t){var n=this,i=e.filter((function(e){return!(e in n._store.personnelSubstitutions&&t in n._store.personnelSubstitutions[e])}));return 0===i.length?Promise.resolve():this._api.personnelSubstitutions(i,t).then((function(e){return n._store.setPersonnelSubstitutions(i,t,e)}))},loadPersonnelTypes:i.last((function(){var e=this;return Object.keys(this._store.personnelTypes).length>0?Promise.resolve():this._api.personnelTypes().then((function(t){return e._store.setPersonnelTypes(t)}))})),loadSchools:i.last((function(e){var t=this,n=Object.keys(this._store.schools),i=e.filter((function(e){return!n.includes(e)}));return 0===i.length?Promise.resolve():this._api.schools(i).then((function(e){return t._store.addSchools(e)}))})),reloadAssignments:function(e,t){var n=this;return t?(this._store.clearAssignments(e,[t]),this._api.assignments([e],t).then((function(e){e.forEach((function(e){var i=e.areaId,s=e.assignments;return n._store.setAssignments(i,t,s)}))}))):Promise.resolve()},saveAssignments:function(e){var t,n,i,o=this,l=Object.keys(this._store.breaks).find((function(t){return o._store.breaks[t].some((function(t){return t.id===e.breakId}))})),c=null!==(t=null===(n=this._store.assignments[l])||void 0===n||null===(i=n[r.fromDate(e.date)])||void 0===i?void 0:i.find((function(t){return t.breakId===e.breakId&&t.dayIndex===e.date.dayOfWeek})))&&void 0!==t?t:{primary:[],backup:[]};return a(e.primary,c.primary,u)&&s(e.backup,c.backup,u)?Promise.resolve():this._api.saveAssignments(e).then((function(t){return o._store.updateAssignments(e.breakId,e.date,e.primary,e.backup,t)}));function u(e,t){return e.personId===t.personId&&e.personnelType===t.personnelType}},updateBreak:function(e,t,n,i,s){var a=this,r=Object.keys(this._store.breaks).map((function(t){return a._store.breaks[t].find((function(t){return t.id===e}))})).find((function(e){return e}));return r&&r.name===t&&r.start.isSame(n)&&r.end.isSame(i)?Promise.resolve():this._api.updateBreak({id:e,name:t,start:n,end:i,timestamp:s}).then((function(s){a._store.updateBreak({id:e,name:t,start:n,end:i,timestamp:s})}))}},{Actions:o}}(j,V,me),Te=function(e,t,n){var i=e,s=t.Result,a=n.ValidatedValue;function r(e,t){var n,i,s=this;this.input=new a({change:function(e,t){return s._change(e,t)},initialTextValue:null===(n=e.initialValue)||void 0===n?void 0:n.format("input"),isAvailable:e.isAvailable,validate:function(n){return o(n,s._bounds,t).then((function(t){var n,i;return null!==(n=null===(i=e.validate)||void 0===i?void 0:i.call(e,t))&&void 0!==n?n:t}))}}),this._bounds=e.bounds,this._change=null!==(i=e.change)&&void 0!==i?i:function(){}}function o(e,t,n){if(""===(null!=e?e:""))return s.error("Indtast dato");var a=i.parsePoint(e,n);return a?!1===(null==t?void 0:t.contains(a))?s.error("Datoen skal være inden for perioden (".concat(t.start.toString()," - ").concat(t.end.addDays(-1).toString(),")")):s.success(a):s.error("Ugyldig dato")}return r.prototype={get availableValue(){return this.input.availableValue},get textValue(){return this.input.textValue},set textValue(e){this.input.textValue=e},get value(){return this.input.value},set:function(e,t){void 0!==t&&(this._bounds=t),this.input.set(null==e?void 0:e.format("input"))},reset:function(e,t){var n;void 0!==t&&(this._bounds=t),this.input.reset(void 0!==e?null!==(n=null==e?void 0:e.format("input"))&&void 0!==n?n:null:void 0)},validate:function(){return this.input.validate()}},{ValidatedDate:r,validDate:o}}(he,F,U),be=function(e,t,n,i,s,a,o,l,c,u,d,h,m,p){var v=e,f=t.ErrorList,g=t.retryActionTemplate,_=n,E=i,A=s.MultipleSelection,T=a.ProgressList,b=o.SingleSelection,C=l.ValidatedDate,k=c,y=u.assignmentStatuses,I=d.AssignmentsDetails,S=m.PlansDragDrop,D=h.CopyWeek,w=p.weeksOfSchoolYear;function N(e,t,n,i,s,a,r,o,l,c,u){var d,h,m,p=this;this.areas=new A({change:function(e,t){return p._selectAreas(t)},initial:r.planAreaIds,preselectAll:!0});var v=null!==(d=r.planWeek)&&void 0!==d?d:c,g=v.toDate(null!==(h=r.planDayOfWeek)&&void 0!==h?h:0),_=new C({initialValue:g,change:function(e){return e.then((function(e){return p._selectDate(e)}))},isAvailable:!0},a),E=new R;this.copyWeek=new D(i,e,n,a,o),this.details=new I(e,t,o),this.date=_,this.dragDrop=new S(e,null!==(m=r.planAssignmentEnabled)&&void 0!==m&&m,s,E,o),this.errors=new f,this.progress=new T,this.week=new b({change:function(e,t){return p._selectWeek(t)},initial:null==v?void 0:v.toString(),fallback:{value:null,text:"Vælg uge"},preselectFirst:!0}),this._actions=e,this._placement=u,this._moment=a,this._schoolCode=null,this._schoolYearId=null,this._settings=r,this._store=o,this._state=E,this._viewportWidth=l}function R(){this._areaErrors=[],this._dayBreakProgresses=[]}function O(e,t,n,i,s,a,r,o,l,c,u,d,h,m,p){var f,g=null!==(f=t.find((function(e){return e.dayIndex===s.dayIndex&&e.breakId===n.id})))&&void 0!==f?f:{primary:[],backup:[]},_=i.map((function(e){return v.fromDateAndTime(u.toDate(s.dayIndex),e)})),A=h.ofBreakAndDay(g,n.id,_,s.dayIndex,o,c),T=y(g,E.sum([_]),a,r,c),b=T.primary,C=T.backup,k=g.primary.map((function(e){return L(e,null,b,a,l,d)}));k.sort((function(e,t){var n,i,s;return(null===(n=e.personInitials)||void 0===n?void 0:n.localeCompare(t.personInitials))||(null===(i=e.personFirstName)||void 0===i?void 0:i.localeCompare(t.personFirstName))||(null===(s=e.personLastName)||void 0===s?void 0:s.localeCompare(t.personLastName))}));var I=g.backup.map((function(e,t){return L(e,t,C,a,l,d)}));return{areEditable:e.isEditable,breakId:n.id,dayIndex:s.dayIndex,dragDrop:A,key:"assignments-".concat(s.index,"-").concat(n.index),progress:m,style:"--day-index: ".concat(s.index,"; --break-index: ").concat(n.index,";"),timestamp:g.timestamp,primary:S(k,A.ofGroup(!0),!0),backup:S(I,A.ofGroup(!1),!1),showDetail
1s:function(){p(n.id,s.dayIndex,e.id,e.isEditable)}};function S(e,t,n){return{get available(){return e.length>0||t.isAvailable},detailsButtonPlacement:n?"assignments-primary":"assignments-backup",empty:0===e.length,dragDrop:t,icon:n?"fal fa-user-circle":"fal fa-pause-circle",items:e,label:n?"Forvagt":"Bagvagt",key:n?"primary":"backup"}}}function L(e,t,n,i,s,a){var r=i.find((function(t){return t.id===e.personId})),o=s[e.personnelType],l=n.get(e.personId);return{personId:null==r?void 0:r.id,personInitials:null==r?void 0:r.initials,personFirstName:null==r?void 0:r.firstName,personHasMultipleEmployments:(null==r?void 0:r.employments.length)>1,personLastName:null==r?void 0:r.lastName,personIsCurrentUser:(null==r?void 0:r.id)===a,personnelTypeAbbreviation:null==o?void 0:o.abbreviation,personnelTypeDescription:null==o?void 0:o.description,status:l,style:null!==t?"--order: ".concat(t,";"):null}}return N.prototype={get days(){var e=this._schoolYear,t=this._week,n=this._date,i=this.gridLayout;return e&&t&&n?function(e,t,n,i){if(!n)return i.contains(t)?[a(t,t.dayOfWeek)]:[];var s=E.nonEmpty(e.startOfWeek(),e.startOfWeek().addDays(5)).intersect(i);return r()(s.iterate((function(e){return e.addDays(1)}))).map((function(e,t){return a(e,t)}));function a(e,t){return{date:e.toString(),dayIndex:e.dayOfWeek,index:t,key:"day-".concat(t),name:e.format("dayofweek"),style:"--day-index: ".concat(t,";")}}}(t,n,i,e.period):[]},get items(){var e,t,n,i,s,a=this,o=this._store.assignments,l=(null!==(e=this._store.areas[this._schoolYearId])&&void 0!==e?e:[]).filter((function(e){return a._areaIds.includes(e.id)}
1)),c=this._store.breaks,u=this.days,d=null!==(t=this._store.personnel[this._schoolYearId])&&void 0!==t?t:[],h=null!==(n=this._store.personnelAbsences[this._schoolYearId])&&void 0!==n?n:{},m=null!==(i=this._store.plannedPersonnelAbsences[this._schoolYearId])&&void 0!==i?i:{},p=this._store.personnelSubstitutions,v=this._store.personnelTypes,f=this._week;return function(e,t,n,i,s,a,o,l,c,u,d,h,m,p,v){return n.map((function(n){var f,g,_,A,T,b,C,k,y=null!==(g=(null!==(f=e[n.id])&&void 0!==f?f:{})[h])&&void 0!==g?g:[],I=null!==(_=a[h])&&void 0!==_?_:{},S=null!==(A=o[h])&&void 0!==A?A:{},D=null!==(T=null===(b=l[n.id])||void 0===b?void 0:b[h])&&void 0!==T?T:[];return function(e,t,n,i,s,a,r,o,l,c,u,d,h,m,p,v){var f=d.areaErrorList(e.id);return{assignments:s.map((function(s){return{day:s,assignmentsByBreaks:n.map((function(n){var u,f=d.dayBreakProgressList(e.id,n.id,h,s.dayIndex),g=h.toDate(s.dayIndex),_=l.filter((function(e){return e.breakId===n.id&&e.date.isSame(g)})).map((function(e){return e.personId}));return{assignments:O(e,t,n,null!==(u=i.get(n.id))&&void 0!==u?u:E.empty(),s,a,r,o,c,_,h,m,p,f,v),break:n}}))}})),errors:f,id:e.id,isEditable:e.isEditable,dragDrop:p,key:"area-".concat(e.id),name:e.name,settings:u.ofArea(e.id)}}(n,y,function(e){return(e=r()(e)).sort((function(e,t){return e.start.compare(t.start)||e.end.compare(t.end)||e.name.localeCompare(t.name)})),e.map((function(e,t){return{id:e.id,index:t,name:e.name,period:"".concat(e.start," - ").concat(e.end),style:"--break-index: ".concat(t,";"),key:function(e){return"break-".concat(e,"-").concat(this.index)}}}))}(null!==(C=t[n.id])&&void 0!==C?C:[]),(null!==(k=t[n.id])&&void 0!==k?k:[]).reduce((function(e,t){return e.set(t.id,E.nonEmpty(t.start,t.end))}),new Map),i,s,I,S,D,c,u,d,h,m,p.ofArea(n.id,n.isEditable),v)}))}(o,c,l,u,d,h,m,p,v,this._settings,this._state,f,null===(s=this._school)||void 0===s?void 0:s.personId,this.dragDrop,this._showDetails.bind(this))},get gridLayout(){switch(this._placement()){case"narrow":return!1;case"medium":return this._viewportWidth.isAfterBeforeNext("md")||this._viewportWidth.isAfter("xxl");default:return this._viewportWidth.isAfter("lg")}},get _areas(){var e;return(null!==(e=this._store.areas[this._schoolYearId])&&void 0!==e?e:[]).map((function(e){return{value:e.id,text:e.name}}))},get _areaIds(){return this.areas.values},get _date(){return this.date.value.value},get _school(){var e=this;return this._store.schools.find((function(t){return t.code===e._schoolCode}))},get _schoolYear(){var e=this,t=this._school;return null==t?void 0:t.schoolYears.find((function(t){return t.id===e._schoolYearId}))},get _week(){return this.week.value?k.parsePoint(this.week.value,this._moment):null},get _weeks(){var e,t=this._schoolYear,n=null!==(e=null==t?void 0:t.period)&&void 0!==e?e:E.empty();return r()(w(n))},selectSchoolYear:function(e,t){var n,i,s=this;this._schoolCode=t,this._schoolYearId=e,this.dragDrop.selectSchoolYear(e,t),this.week.update(this._weeks),this._state.selectSchoolYear(),this.date.reset(this._date,null!==(n=null===(i=this._schoolYear)||void 0===i?void 0:i.period)&&void 0!==n?n:null),this.errors.track({message:"Kunne ikke indlæse områder",id:"areas",actions:[g()]},(function(){return s.progress.track({id:"areas",message:"Indlæser områder..."},(function(){return s._actions.loadAreas(s._schoolYearId).then((function(){return s.areas.update(s._areas)}),(function(e){return s.areas.update(s._areas),Promise.reject(e)}))}))})),this.errors.track({message:"Kunne ikke indlæse personale",id:"personnel",actions:[g()]},(function(){return s.progress.track({id:"personnel",message:"Indlæser personale..."},(function(){return s._actions.loadPersonnel(s._schoolYearId)}))}))},showCopyWeek:_.withFocusRestore((function(e){var t=this;return this.copyWeek.show(e,this._schoolYearId,this._schoolCode,this._week).then((function(n){if(n)return t._loadAssignments([e])}))}),"activeElement"),toggleDragDropEnabled:function(e){this._settings.planAssignmentEnabled=e,this.dragDrop.isEnabled=e},_loadAssignments:function(e){var t=this;this.errors.track({message:"Kunne ikke indlæse vagter",id:"assignments",actions:[g()]},(function(){return t.progress.track({id:"assignments",message:"Indlæser vagter..."},(function(){return t._actions.loadAssignments(null!=e?e:t._areaIds,t._week)}))}))},_loadPersonnelSubstitutions:function(){var e=this;this.errors.track({message:"Kunne ikke indlæse vikarer",id:"personnelSubstitutions",actions:[g()]},(function(){return e.progress.track({id:"personnelSubstitutions",message:"Indlæser vikarer..."},(function(){return e._actions.loadPersonnelSubstitutions(e._areaIds,e._week)}))}))},_selectAreas:function(e){var t=this;e||(this._settings.planAreaIds=this._areaIds),this._state.selectAreas(this._areaIds),this.errors.track({message:"Kunne ikke indlæse pauser",id:"breaks",actions:[g()]},(function(){return t.progress.track({id:"breaks",message:"Indlæser pauser..."},(function(){return t._actions.loadBreaks(t._areaIds)}))})),this._loadAssignments(),this._loadPersonnelSubstitutions()},_selectDate:function(e){var t;this._settings.planDayOfWeek=null!==(t=e.dayOfWeek)&&void 0!==t?t:null;var n=k.fromDate(e);this._week&&n.isSame(this._week)||this.week.select(n.toString())},_selectWeek:function(e){var t,n,i=this;e||(this._settings.planWeek=this._week),this.dragDrop.selectWeek(this._week),this._state.selectWeek(this._week);var s=function(e,t,n){var i;if(!n||!t)return null!==(i=null==n?void 0:n.startOfWeek())&&void 0!==i?i:null==t?void 0:t.start;var s=n.toDate(e);if(t.period.contains(s))return s;var a=t.period.intersect(E.nonEmpty(n.startOfWeek(),n.endOfWeek().addDays(1)));return s.isBefore(a.start)?a.start:a.end.addDays(-1)}(null!==(t=null===(n=this._date)||void 0===n?void 0:n.dayOfWeek)&&void 0!==t?t:0,this._schoolYear,this._week);this.date.set(s),this._loadAssignments(),this._loadPersonnelSubstitutions(),this.errors.track({message:"Kunne ikke indlæse fravær",id:"personnelAbsence
1s",actions:[g()]},(function(){return i.progress.track({id:"personnelAbsences",message:"Indlæser fravær..."},(function(){return i._actions.loadPersonnelAbsences(i._schoolYearId,i._week)}))}))},_showDetails:_.withFocusRestore((function(e,t,n,i){return this.details.show(n,i,e,t,this._schoolYearId,this._week)}),"activeElement")},R.prototype={areaErrorList:function(e){var t=this._areaErrors.find((function(t){return t.areaId===e}));if(t)return t.errors;var n=new f;return this._areaErrors.push({areaId:e,errors:n}),n},dayBreakProgressList:function(e,t,n,i){var s=this._dayBreakProgresses.find((function(s){return s.areaId===e&&s.breakId===t&&s.dayIndex===i&&s.week.isSame(n)}));if(s)return s.progress;var a=new T;return this._dayBreakProgresses.push({progress:a,areaId:e,breakId:t,dayIndex:i,week:n}),a},selectAreas:function(e){this._areaErrors=this._areaErrors.filter((function(t){return e.includes(t.areaId)})),this._dayBreakProgresses=this._dayBreakProgresses.filter((function(t){return e.includes(t.areaId)}))},selectSchoolYear:function(){this._areaErrors=[],this._dayBreakProgresses=[]},selectWeek:function(e){this._dayBreakProgresses=this._dayBreakProgresses.filter((function(t){return t.week.isSame(e)}))}},{Plans:N}}(de,X,j,ae,ne,W,x,Te,me,y,Ee,ve,ee,pe),Ce=function(e,t,n,i,s,a,r,o,l,c,u){var d=u.CountsTable,h=e.ErrorIndicator,m=t.ErrorList,p=t.retryActionTemplate,v=n,f=i.MultipleSelection,g=s.MultipleSelectionInput,_=a.ProgressList,E=r.SingleSelectionInput,A=l.ValidatedDatePeriod;return{Counts:{name:"Counts",components:{"counts-table":d,"error-indicator":h,"multiple-selection-input":g,"single-selection-input":E,"validated-date-input":o.ValidatedDateInput,"widget-toolbar":c.WidgetToolbar},props:{actions:{type:Object,required:!0},moment:{type:Function,required:!0},placement:{type:String,required:!0},schools:{type:Object,required:!0},schoolCode:{default:null,type:[String,Number]},schoolYears:{type:Object,required:!0},schoolYearId:{default:null,type:[String,Number]},settings:{type:Object,required:!0},store:{type:Object,required:!0}},data:function(){var e=this;return{areas:new f({change:function(t,n){n||(e.settings.countsAreaIds=t)},initial:this.settings.countsAreaIds,preselectAll:!0}),errors:new m,period:new A({change:function(t,n){n||null==t||t.then((function(t){e.settings.countsPeriod=t}))}},(function(){return e.moment})),progress:new _}},watch:{schoolCode:{immediate:!0,handler:function(){this.refresh()}},schoolYearId:{immediate:!0,handler:function(){this.refresh()}}},methods:{refresh:function(){var e,t,n=this,i=null===(e=this.store.schools.find((function(e){return e.code===n.schoolCode})))||void 0===e||null===(t=e.schoolYears.find((function(e){return e.id===n.schoolYearId})))||void 0===t?void 0:t.period,s=this.settings.countsPeriod,a=s&&null!=i&&i.intersectsWith(s)?i.intersect(s):i;this.period.reset(a,i),this.errors.track({message:"Kunne ikke indlæse områder",id:"areas",actions:[p()]},(function(){return n.progress.track({id:"areas",message:"Indlæser områder..."},(function(){return n.actions.loadAreas(n.schoolYearId).then((function(){return n.areas.update(n._areas())}),(function(e){return n.areas.update(n._areas()),Promise.reject(e)}))}))}))},show:function(){var e,t=this;null===(e=this.period.validate())||void 0===e||e.then((function(e){var n=t.areas.values,i=t.schoolCode,s=t.schoolYearId,a=t.errors.track({message:"Kunne ikke indlæse personale",id:"personnel"},(function(){return t.progress.track({id:"personnel",message:"Indlæser personale..."},(function(){return t.actions.loadPersonnel(s)}))}));t.errors.track({message:"Kunne ikke indlæse optælling",id:"counts"},(function(){return t.progress.track({id:"counts",message:"Indlæser optællingen..."},(function(){return t.actions.loadCounts(n,e).then((function(r){return a.then((function(){t.$refs.table.update(n,r,e,i,s)}))}))}))}))}))},_areas:function(){var e;return(null!==(e=this.store.areas[this.schoolYearId])&&void 0!==e?e:[]).map((function(e){return{value:e.id,text:e.name}}))}},render:function(e){return e("b-container",{},[e("b-row",{},[e("b-col",{},[e("widget-toolbar",{props:{placement:this.placement}},[this.schools.hasMultiple?e("single-selection-input",{props:{id:"kmd-educa-personale-playground-duty-counts-school-select",label:"Skoler",viewModel:this.schools.school}},[]):"",this.schoolYears.hasMultiple?e("single-selection-input",{class:["width-scale-35"],props:{id:"kmd-educa-personale-playground-duty-counts-school-year-select",label:"Skoleår",viewModel:this.schoolYears.schoolYear}},[]):"",e("multiple-selection-input",{props:{id:"kmd-educa-personale-playground-duty-counts-areas-select",dropdown:!0,label:"Områder",viewModel:this.areas}},[]),e("validated-date-input",{props:{id:"kmd-educa-personale-playground-duty-counts-start-date-select",label:"Start dato",showSuccessStateOnInput:!1,viewModel:this.period.start}},[]),e("validated-date-input",{props:{id:"kmd-educa-personale-playground-duty-counts-end-date-select",label:"Slut dato",showSuccessStateOnInput:!1,viewModel:this.period.end}},[]),e("b-button",{on:{click:v.throttle(this.show,100)}},"Vis")])])]),e("b-row",{},[e("b-col",{}
1,[e("error-indicator",{props:{viewModel:this.errors}},[])])]),e("b-row",{},[e("b-col",{},[e("counts-table",{ref:"table",props:{placement:this.placement,progress:this.progress,store:this.store}},[])])])])}}}}(te,X,j,ne,se,W,Q,K,function(e,t,n){var i=e,s=t.Result,a=n.ValidatedDate,r=n.validDate;function o(e,t){var n,i,s,r=this;this.start=new a({initialValue:null===(n=e.initialValue)||void 0===n?void 0:n.start,isAvailable:!!e.isAvailable,change:function(e,t){return r._changeOfStart(e,t)},validate:function(e){return r._validStart(e)}},t),this.end=new a({initialValue:null===(i=e.initialValue)||void 0===i?void 0:i.end.addDays(-1).format("input"),isAvailable:!!e.isAvailable,change:function(e,t){return r._changeOfEnd(e,t)},validate:function(e){return r._validEnd(e)}},t),this._bounds=e.bounds,this._change=null!==(s=e.change)&&void 0!==s?s:function(){},this._moment=t,this._isAvailable=!!e.isAvailable,this._isSynchronizingStartAndEnd=!1}return o.prototype={get availableValue(){return this._isAvailable?this.value:null},get value(){return this._validPeriod(this.start.value,this.end.value)},set:function(e,t){this._isAvailable=!0,void 0!==t&&(this._bounds=t),this._isSynchronizingStartAndEnd=!0;try{var n;this.start.set(e.start,this._bounds),this.end.set(null===(n=e.end)||void 0===n?void 0:n.addDays(-1),this._bounds)}finally{this._isSynchronizingStartAndEnd=!1}this._change(this.value,!1)},reset:function(e,t){this._isAvailable=!1,void 0!==t&&(this._bounds=t),this._isSynchronizingStartAndEnd=!0;try{var n,i,s;this.start.reset(void 0===e?void 0:null!==(n=null==e?void 0:e.start)&&void 0!==n?n:null,this._bounds),this.end.reset(void 0===e?void 0:null!==(i=null==e||null===(s=e.end)||void 0===s?void 0:s.addDays(-1))&&void 0!==i?i:null,this._bounds)}finally{this._isSynchronizingStartAndEnd=!1}this._change(this.value,!0)},validate:function(){this._isAvailable=!0;var e=this.start.validate(),t=this.end.validate();return this._validPeriod(e,t)},_changeOfStart:function(e,t){this._isSynchronizingStartAndEnd||this._change(this._validPeriod(e,this.end.value),t)},_changeOfEnd:function(e,t){this._isSynchronizingStartAndEnd||this._change(this._validPeriod(this.start.value,e),t)},_validPeriod:function(e,t){return e.then((function(e){return t.then((function(t){return i.nonEmpty(e,t.addDays(1))}))}))},_validStart:function(e){return r(this.end.textValue,this._bounds,this._moment).then((function(t){return e.compare(t)>0?s.error("Startdato skal være inden slutdato"):s.success(e)}),(function(){return e}))},_validEnd:function(e){return r(this.start.textValue,this._bounds,this._moment).then((function(t){return t.compare(e)>0?s.error("Slutdato skal være efter startdato"):s.success(e)}),(function(){return e}))}},{ValidatedDatePeriod:o}}(ae,F,Te),w,H),ke=function(e,t,n,i,s,a){var r=e,o=t,l=n,c=i,u=s,d=a;function h(e,t,n){this._moment=n,this._axios=function(){return t().then((function(t){return e().create({headers:{Authorization:t}})}))}}function m(e){return r.responseError(e).catch((function(t){var n;return Promise.reject({status:null==e||null===(n=e.response)||void 0===n?void 0:n.status,message:t})}))}return h.prototype={schools:function(e){var t=this;return this._axios().then((function(t){return t.get("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/schools?".concat(r.arrayToQueryString("schoolCodes",e)),{responseType:"json"})})).then((function(e){return e.data.map((function(e){return{name:e.name,code:e.code,personId:e.schoolPersonId,schoolYears:e.schoolYears.map((function(e){return{id:e.id,name:e.name,period:c.nonEmpty(o.parsePoint(e.period.start,t._moment),o.parsePoint(e.period.end,t._moment).addDays(1))}}))}}))}),m)},areas:function(e){return e?this._axios().then((function(t){return t.get("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/areas/"+e,{responseType:"json"})})).then((function(e){return e.data.map((function(e){return{name:e.name,isEditable:e.isEditable,id:e.id}}))}),m):Promise.resolve([])},breaks:function(e){return 0===e.length?Promise.resolve(new Map):this._axios().then((function(t){return t.get("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/breaks?".concat(r.arrayToQueryString("areaIds",e)),{responseType:"json"})})).then((function(e){return e.data.map((function(e){return{areaId:e.areaId,breaks:e.breaks.map((function(e){return{id:e.id,name:e.name,start:u.parsePoint(e.start),end:u.parsePoint(e.end),timestamp:e.timestamp}}))}}))}),m)},counts:function(e,t){return 0===e.length||!t||t.empty?Promise.resolve([]):this._axios().then((function(n){return n.get("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/counts?".concat(r.arrayToQueryString("areaIds",e)),{params:{startDate:t.start.toJSON(),endDate:t.end.addDays(-1).toJSON()},responseType:"json"}).then((function(e){return e.data.map((function(e){return{areaId:e.areaId,personId:e.personId,primaryAssignmentC
1ount:Number.parseInt(e.primaryAssignmentCount,10),primaryAssignmentDuration:u.parseDuration(e.primaryAssignmentDuration),backupAssignmentCount:Number.parseInt(e.backupAssignmentCount,10),backupAssignmentDuration:u.parseDuration(e.backupAssignmentDuration)}}))}),m)}))},personnel:function(e){var t=this;return e?this._axios().then((function(t){return t.get("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/personnel/",{params:{schoolYearId:e},responseType:"json"})})).then((function(e){return{teams:e.data.teams,departments:e.data.departments,personnel:e.data.personnel.map((function(e){return{id:e.id,initials:e.initials,firstName:e.firstName,lastName:e.lastName,employments:e.employments.map((function(e){return{personnelType:e.personnelType,period:c.sum(e.periods.map((function(e){return c.nonEmpty(o.parsePoint(e.start,t._moment),o.parsePoint(e.end,t._moment).addDays(1))})))}}))}}))}}),m):Promise.resolve([])},personnelAbsences:function(e,t){var n=this;return e&&t?this._axios().then((function(n){return n.get("https://personale.api.kmd.dk/aula/api/v1/playgroundDuty/personnelAbsences/",{params:{schoolYearId:e,weekNumber:t.number,year:t.year},responseType:"json"})})).then((function(e){return e.data.map((function(e){var t,i;return{id:e.schoolPersonId,personnelType:e.personnelType,periods:c.sum(e.absentPeriods.map((function(e){return c.nonEmpty(l.parsePoint(e.start,n._moment),l.parsePoint(e.end,n._moment))}))),planned:null!==(t=null===(i=e.planned)||void 0===i?void 0:i.map((function(e){return{description:e.description,period:c.nonEmpty(l.parsePoint(e.period.start,n._moment),l.parsePoint(e.period.end,n._moment))}})))&&void 0!==t?t:[]}}))}),m):Promise.resolve([])},personnelSubstitutions:function(e,t){return 0!==e.length&&t?this._axios().then((function(n){return n.get("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/personnelSubstitutions?".concat(r.arrayToQueryString("areaIds",e)),{params:{weekNumber:t.number,year:t.year},responseType:"json"})})).then((function(e){return e.data.map((function(e){return{areaId:e.areaId,substitutions:e.substitutions.map((function(e){return{breakId:e.playgroundBreakId,date:t.toDate(0==e.day?6:e.day-1),personId:e.schoolPersonId}}))}}),m)})):Promise.resolve([])},personnelTypes:function(){return this._axios().then((function(e){return e.get("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/personnelTypes/",{responseType:"json"})})).then((function(e){return e.data}),m)},assignments:function(e,t){return 0!==e.length&&t?this._axios().then((function(n){return n.get("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/assignments?".concat(r.arrayToQueryString("areaIds",e)),{params:{year:t.year,weekNumber:t.number},responseType:"json"})})).then((function(e){return e.data.map((function(e){return{areaId:e.areaId,assignments:e.assignments.map((function(e){return{breakId:e.breakId,dayIndex:e.dayIndex,primary:e.primaryPersonnel.map((function(e){return{personId:e.schoolPersonId,personnelType:e.personnelType}})),backup:e.backupPersonnel.map((function(e){return{personId:e.schoolPersonId,personnelType:e.personnelType}})),timestamp:e.timestamp}}))}}))}),m):Promise.resolve([])},deleteBreak:function(e){return this._axios().then((function(t){return t.delete("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/breaks/"+e,{responseType:"json"})})).then((function(){}),m)},addBreak:function(e){return this._axios().then((function(t){return t.put("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/breaks/",{areaId:e.areaId,name:e.name,start:e.start,end:e.end},{responseType:"json"})})).then((function(e){return e.data}),m)},copyAssignments:function(e,t,n){var i=this;return this._axios().then((function(i){return i.post("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/copyAssignments",{areaId:e,sourceWeek:t,targetWeeks:n})})).then((function(e){return e.data.failedWeeks.map((function(e){return d.parsePoint(e,i._moment)}))}),m)},saveAssignments:function(e){return this._axios().then((function(t){return t.post("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/assignments/",{breakId:e.breakId,date:e.date,primaryPersonnel:e.primary.map((function(e){return{schoolPersonId:e.personId,personnelType:e.personnelType}})),backupPersonnel:e.backup.map((function(e){return{schoolPersonId:e.personId,personnelType:e.personnelType}})),timestamp:e.timestamp},{responseType:"json"})})).then((function(e){return e.data}),m)},updateBreak:function(e){return this._axios().then((function(t){return t.post("https://personale.api.kmd.dk/aula/api/v2/playgroundDuty/breaks/",{id:e.id,name:e.name,start:e.start,end:e.end,timestamp:e.timestamp},{responseType:"json"})})).then((function(e){return e.data}),m)}},{Api:h}}({arrayToQueryString:function(e,t){return t.map((function(t){var n,i;return"".concat(e,"=").concat(null!==(n=null==t||null===(i=t.toJSON)||void 0===i?void 0:i.call(t))&&void 0!==n?n:t)})).join("&")},responseError:function(e){var t,n,i,s,a,r,o;return Promise.reject(null!==(t=null!==(n=null==e||null===(i=e.response)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.Message)&&void 0!==n?n:null==e||null===(a=e.response)||void 0===a||null===(r=a.data)||void 0===r||null===(o=r.Error)||void 0===o?void 0:o.Message)&&void 0!==t?t:e.message)}},he,de,ae,O,me),ye=ue.AulaTokenMixin,Ie=Z.ConfirmationModal,Se=Z.ConfirmationModalMixin,De=Ce.Counts,we=te.ErrorIndicator,Ne=X.ErrorList,Re=X.retryActionTemplate,Oe=ae,Le=V.IgnoreCanceledMixin,xe=M.SetFocus,Pe=se.MultipleSelectionInput,Me=G.ProgressIndicator,Fe=W.ProgressList,Ue=x.SingleSelection,Be=Q.SingleSelectionInput,Ve=L.TableRowToolbar,We=K.ValidatedDateInput,Ge=q.ValidatedTimeInput,He=z.ValidatedValueInput,je=me,Ye=R.ViewportWidth,$e=N.WidgetHeader,ze=w.WidgetToolbar,qe=ke.Api,Ke=D.AssignmentPill,Qe=S.AssignmentPlaceholder,Je=k.AssignmentsDetailsButton,Ze=Ae.Actions,Xe=le.Breaks,et=C.PersonPlannedAbsentOverlay,tt=ie.PersonnelWithTypesBar,nt=be.Plans,it=ge.Settings,st=fe.Store;var at={name:"PlaygroundDuty",components:{"assignments-details-button":Je,"assignment-pill":Ke,"assignment-placeholder":Qe,"confirmation-modal":Ie,counts:De,"error-indicator":we,"multiple-selection-input":Pe,"person-planned-absent-overlay":et,"personnel-with-types-bar":tt,"progress-indicator":Me,"single-selection-input":Be,"substituted-in-stm-icon":A.SubstitutedInStmIcon,"table-row-toolbar":Ve,"validated-date-input"
1:We,"validated-time-input":Ge,"validated-value-input":He,"widget-header":$e,"widget-toolbar":ze},directives:{setFocus:xe},mixins:[ye,Se,Le],props:{axios:{type:Function,required:!0},currentWeekNumber:{type:String,default:null},getAulaToken:{type:Function,required:!0},institutionCode:{type:String,default:null},institutionFilter:{type:Array,default:null},isMobileApp:{type:Boolean,required:!0},moment:{type:Function,required:!0},placement:{type:String,required:!0},sessionUUID:{type:String,required:!0}},data:function(){var e=this,t=new qe((function(){return e.axios}),(function(){return e.token}),(function(){return e.moment})),n=new st(this.$set.bind(this));return{actions:new Ze(t,n),api:t,breaks:null,schools:null,schoolYears:null,errors:new Ne,plans:null,progress:new Fe,settings:null,store:n,tabs:null,viewportWidth:new Ye}},computed:{isReadOnly:function(){return"NoticeBoard"===this.placement}},watch:{institutionCode:function(){this.initialize()},institutionFilter:function(){this.refresh()}},mounted:function(){this.moment.locale("da"),this.initialize()},destroyed:function(){this.viewportWidth.destroy()},methods:{initialize:function(){var e=this;this.progress.track({id:"settings",message:"Indlæser indstillinger..."},(function(){return it.load(e.axios,(function(){return e.token}),(function(){return e.moment}),e.sessionUUID,"NoticeBoard"===e.placement,e.institutionCode).then((function(t){var n=je.parsePoint(e.currentWeekNumber,(function(){return e.moment}));e.breaks=new Xe(e.actions,(function(){return e.confirmationModal}),(function(){return e.$refs.breakEditionModal}),t,e.store),e.plans=new nt(e.actions,(function(){return e.$refs.assignmentsDetailsModal}),(function(){return e.confirmationModal}),(function(){return e.$refs.copyWeekModal}),(function(){return e.isMobileApp}),(function(){return e.moment}),t,e.store,e.viewportWidth,n,(function(){return e.placement})),e.schoolYears=function(e,t,n,i){var s={schoolYear:new Ue({change:function(t,n){n||(e.schoolYearId=t),i(t,s._schoolCode)},fallback:{value:null,text:"Vælg skoleår"},initial:e.schoolYearId,preselectFirst:!0}),get hasNone(){var e,n=this;return 0==(null===(e=t.schools.find((function(e){return e.code===n._schoolCode})))||void 0===e?void 0:e.schoolYears.length)},get hasMultiple(){var e,n=this;return(null===(e=t.schools.find((function(e){return e.code===n._schoolCode})))||void 0===e?void 0:e.schoolYears.length)>1},selectSchool:function(e){var i=this;if(this._schoolCode=e,n){var s=Oe.nonEmpty(n.startOfWeek(),n.endOfWeek().addDays(1)),a=t.schools.find((function(t){return t.code===e}));if(!1===(null==a?void 0:a.schoolYears.some((function(e){return e.id===i.schoolYear.value})))){var r,o=null==a||null===(r=a.schoolYears.find((function(e){return e.period.intersectsWith(s)})))||void 0===r?void 0:r.id;o&&this.schoolYear.select(o)}}this.schoolYear.update(this._schoolYears())},_schoolCode:null,_schoolYears:function(){var e,n,i=this;return null!==(e=null===(n=t.schools.find((function(e){return e.code===i._schoolCode})))||void 0===n?void 0:n.schoolYears.map((function(e){return{value:e.id,text:e.name}})))&&void 0!==e?e:[]}};return s}(t,e.store,n,(function(t,n){var i;null===(i=e.tabs)||void 0===i||i.activeViewModel.selectSchoolYear(t,n)})),e.schools=function(e,t,n){return{school:new Ue({change:function(t,i){i||(e.schoolCode=t),n(t)},fallback:{value:null,text:"Vælg skole"},initial:e.schoolCode,preselectFirst:!0}),get hasNone(){return 0===t.schools.length},get hasMultiple(){return t.schools.length>1},updateSchools:function(){this.school.update(this._schools())},_schools:function(){return t.schools.map((function(e){return{value:e.code,text:e.name}}))}}}(t,e.store,(function(t){var n;null===(n=e.schoolYears)||void 0===n||n.selectSchool(t)})),e.tabs=function(e,t,n,i,s){var a;return{activeTab:null!==(a=i.activeTab)&&void 0!==a?a:0,get activeViewModel(){switch(this.activeTab){case 1:return t;case 2:return e;default:return n}},activateTab:function(e){e<0||e>2||(this.activeTab=e,i.activeTab=e,s(this.activeViewModel))}}}(e.breaks,{selectSchoolYear:function(){}},e.plans,t,(function(t){t.selectSchoolYear(e.schoolYears.schoolYear.value,e.schools.school.value)})),e.settings=t,e.refresh()}))}))},refresh:function(){var e=this;this.store.clear(),this.errors.track({id:"schools",message:"Kunne ikke indlæse skoler",dismissible:!1,actions:[Re()]},(function(){return e.progress.track({id:"schools",message:"Indlæser skoler..."},(function(){var t,n="NoticeBoard"===e.placement&&e.institutionCode?[e.institutionCode]:null!==(t=e.institutionFilter)&&void 0!==t?t:[];return e.actions.loadSchools(n).then((function(){return e.schools.updateSchools()}),(function(t){return e.schools.updateSchools(),Promise.reject(t)}))}
1))})),this.errors.track({id:"personnelTypes",message:"Kunne ikke indlæse personaletyper",dismissible:!1,actions:[Re()]},(function(){return e.progress.track({id:"personnelTypes",message:"Indlæser personaletyper..."},(function(){return e.actions.loadPersonnelTypes()}))}))}}},rt=n(3),ot=Object(rt.a)(at,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-container",{staticClass:"root",attrs:{fluid:""}},[n("b-row",[n("b-col",[n("widget-header",{attrs:{"widget-name":"Gårdvagt"}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("progress-indicator",{attrs:{"view-model":e.progress}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("error-indicator",{attrs:{"view-model":e.errors}})],1)],1),e._v(" "),e.progress.empty&&!e.errors.has("schools")&&e.schools&&e.breaks&&e.plans&&e.tabs?[e.schools.hasNone?n("b-row",[n("b-col",[e._v("\n        Der er ingen skoler med licens til gårdvagt, eller som du har adgang\n        til.\n      ")])],1):e.schoolYears.hasNone?n("b-row",[n("b-col",[e._v("\n        Der er ingen skoleår.\n      ")])],1):n("b-row",[n("b-col",[n("b-tabs",{attrs:{value:e.tabs.activeTab,"content-class":"mt-3"},on:{input:function(t){return e.tabs.activateTab(t)}}},[n("b-tab",{staticClass:"plans-tab",attrs:{title:"Planlægning"}},[n("b-container",{attrs:{fluid:""}},[n("b-row",[n("b-col",[n("widget-toolbar",{attrs:{placement:e.placement}},[e.schools.hasMultiple?n("single-selection-input",{attrs:{id:"kmd-educa-personale-playground-duty-plans-school-select",label:"Skoler","view-model":e.schools.school}}):e._e(),e._v(" "),e.schoolYears.hasMultiple?n("single-selection-input",{staticClass:"width-scale-35",attrs:{id:"kmd-educa-personale-playground-duty-plans-schoolyear-select",label:"Skoleår","view-model":e.schoolYears.schoolYear}}):e._e(),e._v(" "),n("multiple-selection-input",{attrs:{id:"kmd-educa-personale-playground-duty-plans-areas-select",dropdown:"",label:"Områder","view-model":e.plans.areas}}),e._v(" "),n("single-selection-input",{directives:[{name:"show",rawName:"v-show",value:e.plans.gridLayout,expression:"plans.gridLayout"}],attrs:{id:"kmd-educa-personale-playground-duty-plans-week-select",label:"Uge","view-model":e.plans.week}}),e._v(" "),n("validated-date-input",{directives:[{name:"show",rawName:"v-show",value:!e.plans.gridLayout,expression:"!plans.gridLayout"}],attrs:{id:"kmd-educa-personale-plaground-duty-plans-date-select",label:"Dato","show-success-state-on-input":!1,"view-model":e.plans.date}}),e._v(" "),n("b-button",{on:{click:function(t){return e.refresh()}}},[e._v("Opdater")])],1)],1)],1),e._v(" "),n("progress-indicator",{attrs:{"view-model":e.plans.progress}},[n("b-row",[n("b-col",[n("error-indicator",{attrs:{"view-model":e.plans.errors}})],1)],1),e._v(" "),0===e.plans.items.length?n("b-row",[n("b-col",[e._v("Der er ingen valgte områder")])],1):0===e.plans.days.length?n("b-row",[n("b-col",[e._v("Ingen arbejdsdage")])],1):e._l(e.plans.items,(function(t){return n("b-row",{key:t.key,staticClass:"plan"},[n("b-col",[n("div",{staticClass:"plan-header"},[n("h3",{staticClass:"no-text-overflow"},[e._v("\n                          "+e._s(t.name)+"\n                        ")]),e._v(" "),t.isEditable?n("b-link",{attrs:{size:"sm",variant:"secondary"},on:{click:function(n){return e.plans.showCopyWeek(t.id)}}},[e._v("\n                          Kopier uge\n                        ")]):e._e(),e._v(" "),t.dragDrop.isToggleAvailable?n("b-form-checkbox",{staticClass:"ml-auto",attrs:{"aria-hidden":"true",checked:e.plans.dragDrop.isEnabled,switch:""},on:{change:function(t){return e.plans.toggleDragDropEnabled(t)}}},[e._v("\n                          Påsæt personale\n                        ")]):e._e()],1),e._v(" "),t.assignments.every((function(e){return 0===e.assignmentsByBreaks.length}))?n("div",[e._v("\n                        Der er ingen pauser i området\n                      ")]):[n("error-indicator",{attrs:{"view-model":t.errors}}),e._v(" "),t.dragDrop.isAvailable?n("div",{staticClass:"personnel-with-types-bar-container",attrs:{"aria-hidden":"true"}},[n("personnel-with-types-bar",{attrs:{"area-settings":t.settings,departments:e.plans.dragDrop.departments,"personnel-with-types":e.plans.dragDrop.availablePersonnelWithTypes,teams:e.plans.dragDrop.teams},on:{"person-with-type-drag-start":function(t){return e.plans.dragDrop.dragStart(t)},"person-with-type-drag-end":function(t){return e.plans.dragDrop.dragEnd(t)}}}
1)],1):e._e(),e._v(" "),n("div",{class:["plan-contents",{grid:e.plans.gridLayout}]},[e._l(t.assignments,(function(i){var s=i.day,a=i.assignmentsByBreaks;return[n("div",{key:s.key,class:["plan-day",{grid:e.plans.gridLayout}],style:s.style},[n("h4",[e._v(e._s(s.name))]),e._v(" "),n("span",[e._v(e._s(s.date))])]),e._v(" "),e._l(a,(function(i){var a=i.break,r=i.assignments;return[n("div",{key:a.key(s.index),class:["plan-break",{grid:e.plans.gridLayout,"sr-only":e.plans.gridLayout&&s.index>0}],style:a.style},[n("h5",{staticClass:"no-text-overflow"},[e._v("\n                                  "+e._s(a.name)+"\n                                ")]),e._v(" "),n("span",[e._v(e._s(a.period))]),e._v(" "),n("assignments-details-button",{attrs:{assignments:r,"is-person-with-type-dragged":t.dragDrop.isPersonWithTypeDragged,placement:"break","plan-drag-drop-available":t.dragDrop.isAvailable,"plan-grid-layout":e.plans.gridLayout}})],1),e._v(" "),n("div",{key:r.key,class:["plan-day-break",{grid:e.plans.gridLayout,empty:r.primary.empty&&r.backup.empty}],style:r.style},[n("person-planned-absent-overlay",{attrs:{"view-model":r.dragDrop.personPlannedAbsentOverlay()}},[n("progress-indicator",{attrs:{"establish-bfc":!1,"view-model":r.progress}},[n("div",{class:["plan-day-break-contents",{empty:r.primary.empty&&r.backup.empty}]},[r.primary.empty&&r.backup.empty?[n("span",{class:{"sr-only":e.plans.gridLayout,invisible:t.dragDrop.isPersonWithTypeDragged}},[e._v("\n                                          Intet personale\n                                        ")]),e._v(" "),n("assignment-placeholder",{attrs:{placement:"assignments-empty-primary","view-model":r.dragDrop.noAssignmentsPlaceholder(!0)}}),e._v(" "),n("assignment-placeholder",{attrs:{placement:"assignments-empty-backup","view-model":r.dragDrop.noAssignmentsPlaceholder(!1)}}),e._v(" "),n("assignments-details-button",{attrs:{assignments:r,"is-person-with-type-dragged":t.dragDrop.isPersonWithTypeDragged,placement:"assignments-empty","plan-drag-drop-available":t.dragDrop.isAvailable,"plan-grid-layout":e.plans.gridLayout}})]:e._l([r.primary,r.backup].filter((function(e){return e.available})),(function(i){return n("div",{key:i.key,staticClass:"assignment-group"},[n("div",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.focus.hover",modifiers:{focus:!0,hover:!0}}],staticClass:"compact-header",staticStyle:{"--order":"-2"},attrs:{"aria-hidden":"true",tabindex:"0",title:i.label}},[n("span",{class:["fa-fw",i.icon,"compact-header-icon"]}),e._v(" "),n("span",[e._v(":")]),e._v(" "),i.empty?n("span",{staticClass:"ml-1"},[e._v("\n                                              Intet personale\n                                            ")]):e._e()]),e._v(" "),n("h6",{staticClass:"sr-only"},[n("span",[e._v(e._s(i.label))]),e._v(" "),i.empty?n("span",[e._v("Intet personale")]):e._e()]),e._v(" "),e._l(i.items,(function(e){return n("assignment-pill",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.focus.hover",modifiers:{focus:!0,hover:!0}}],key:e.personId,staticClass:"assignment",style:e.style,attrs:{tabindex:"0","view-model":e}})})),e._v(" "),n("assignment-placeholder",{attrs:{placement:"assignments-group","view-model":i.dragDrop.groupPlaceholder()}}),e._v(" "),e._l(i.dragDrop.inlinePlaceholders(),(function(e){return n("assignment-placeholder",{key:e.key,attrs:{placement:"assignments-inline","view-model":e}})})),e._v(" "),n("assignments-details-button",{style:"--order: "+i.items.length+";",attrs:{assignments:r,"is-person-with-type-dragged":t.dragDrop.isPersonWithTypeDragged,placement:i.detailsButtonPlacement,"plan-drag-drop-available":t.dragDrop.isAvailable,"plan-grid-layout":e.plans.gridLayout}})],2)}))],2)])],1)],1)]}))]}))],2)]],2)],1)}))],2),e._v(" "),n("b-modal",{directives:[{name:"set-focus",rawName:"v-set-focus.shown",modifiers:{shown:!0}}],ref:"assignmentsDetailsModal",staticClass:"assignments-details-modal",attrs:{id:"kmd-educa-personale-playground-duty-assignments-details-modal",busy:!e.plans.details.progress.empty,"cancel-title":"Annuller","body-bg-variant":"light","dialog-class":"modal-xl-wider","no-close-on-backdrop":"","ok-only":!e.plans.details.areaIsEditable,"ok-title":e.plans.details.areaIsEditable?"Gem":"Luk",size:e.plans.details.areaIsEditable?"xl"
1:"lg",static:"","title-tag":"div"},scopedSlots:e._u([{key:"modal-title",fn:function(){return[n("h5",[e.plans.details.areaIsEditable?[e._v("\n                      Rediger vagter\n                    ")]:[e._v("Vagter")]],2),e._v(" "),n("span",{staticClass:"no-text-overflow"},[e._v(e._s(e.plans.details.breakAndDate))])]},proxy:!0}],null,!1,914037922)},[e._v(" "),n("b-container",{attrs:{fluid:""}},[e.plans.details.areaIsEditable?n("b-row",e._l(e.plans.details.assignablePersonnel,(function(t){return n("b-col",{key:t.key,attrs:{cols:"auto"}},[n("b-dropdown",{directives:[{name:"set-focus",rawName:"v-set-focus.shown",modifiers:{shown:!0}}],staticClass:"mb-3",attrs:{id:t.id,boundary:"viewport","data-set-focus":"",text:t.label},on:{hidden:function(e){return t.search.change("")}}},[n("b-dropdown-form",[n("b-form-group",{attrs:{label:"Søg","label-for":t.searchInputId,"label-sr-only":""}},[n("b-form-input",{attrs:{id:t.searchInputId,"data-set-focus":"",placeholder:"Søg",size:"sm",type:"text",value:t.search.value},on:{update:function(e){return t.search.change(e)}}})],1)],1),e._v(" "),e._l(t.groups,(function(i){return[i.items.length>0?n("div",{key:i.key,attrs:{role:"group","aria-labelledby":i.id}},[n("b-dropdown-header",{staticClass:"no-text-overflow",attrs:{id:i.id}},[e._v("\n                              "+e._s(i.label)+"\n                            ")]),e._v(" "),e._l(i.items,(function(s){return n("b-dropdown-item-button",{directives:[{name:"show",rawName:"v-show",value:t.search.matches(s.label),expression:"group.search.matches(item.label)"}],key:s.key,staticClass:"no-text-overflow",attrs:{"aria-describedby":i.id,disabled:s.disabled},on:{click:function(e){return s.call()}}},[e._v("\n                              "+e._s(s.label)+"\n                            ")])}))],2):e._e()]}))],2)],1)})),1):e._e(),e._v(" "),n("b-row",[e.plans.details.areaIsEditable?n("b-col",{attrs:{sm:""}},[n("h6",[e._v("Planlagte vagter")]),e._v(" "),n("b-table",{attrs:{fields:e.plans.details.plannedAssignments.fields,items:e.plans.details.plannedAssignments.items,borderless:"","empty-text":"Der er ikke personale påsat","primary-key":"key","show-empty":"",stacked:"lg",striped:"","tbody-transition-props":{name:"flip-list"}},scopedSlots:e._u([{key:"cell(assignment)",fn:function(t){var i=t.item;return[n("div",{staticClass:"d-flex flex-wrap"},[e._v("\n                            "+e._s(i.assignment)+"\n                            "),i.isSubstituted?n("substituted-in-stm-icon",{staticClass:"ml-1"}):e._e()],1)]}},{key:"cell(actions)",fn:function(e){var t=e.item;return[n("table-row-toolbar",{attrs:{actions:t.actions()}})]}}],null,!1,45337652)})],1):e._e(),e._v(" "),n("b-col",{attrs:{sm:""}},[n("h6",[e._v("Faktiske vagter")]),e._v(" "),n("b-table",{attrs:{fields:e.plans.details.actualAssignments.fields,items:e.plans.details.actualAssignments.items,borderless:"","empty-text":"Der er ikke personale påsat","primary-key":"key","show-empty":"",stacked:"sm",striped:"","tbody-transition-props":{name:"flip-list"}},scopedSlots:e._u([{key:"cell(actualAssignment)",fn:function(t){var i=t.item;return[n("div",{staticClass:"d-flex flex-wrap"},[e._v("\n                            "+e._s(i.actualAssignment)+"\n                            "),i.isSubstituted?n("substituted-in-stm-icon",{staticClass:"ml-1"}):e._e()],1)]}}],null,!1,3345724299)})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("progress-indicator",{attrs:{"view-model":e.plans.details.progress}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("error-indicator",{attrs:{"view-model":e.plans.details.errors}})],1)],1)],1)],1),e._v(" "),n("b-modal",{directives:[{name:"set-focus",rawName:"v-set-focus.shown",modifiers:{shown:!0}}],ref:"copyWeekModal",attrs:{id:"kmd-educa-personale-playground-duty-assignments-copy-week-modal",busy:!e.plans.copyWeek.progress.empty,"body-bg-variant":"light","cancel-title":"Annuller","ok-title":"Kopiere","no-close-on-backdrop":"",static:"",title:"Kopier vagter"}},[n("b-container",{attrs:{fluid:""}},[n("b-row",[n("b-col",[n("single-selection-input",{attrs:{id:"kmd-educa-personale-playground-duty-assignments-copy-week-source-week-input",label:"Fra uge","view-model":e.plans.copyWeek.sourceWeek}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("multiple-selection-input",{attrs:{id:"kmd-educa-personale-playground-duty-assignments-copy-week-target-weeks-input","data-set-focus":"",label:"Til uge(r)","view-model":e.plans.copyWeek.targetWeeks}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("progress-indicator",{attrs:{"view-model":e.plans.copyWeek.progress}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("error-indicator",{attrs:{"view-model":e.plans.copyWeek.errors}}
1)],1)],1)],1)],1)],1)],1),e._v(" "),n("b-tab",{attrs:{title:"Optælling"}},[n("counts",{ref:"counts",attrs:{actions:e.actions,moment:e.moment,placement:e.placement,schools:e.schools,"school-code":e.schools.school.value,"school-year-id":e.schoolYears.schoolYear.value,"school-years":e.schoolYears,settings:e.settings,store:e.store}})],1),e._v(" "),n("b-tab",{attrs:{title:"Pauser"}},[n("b-container",[n("b-row",[n("b-col",[n("widget-toolbar",{attrs:{placement:e.placement}},[e.schools.hasMultiple?n("single-selection-input",{attrs:{id:"kmd-educa-personale-playground-duty-breaks-school-select",label:"Skoler","view-model":e.schools.school}}):e._e(),e._v(" "),e.schoolYears.hasMultiple?n("single-selection-input",{staticClass:"width-scale-35",attrs:{id:"kmd-educa-personale-playground-duty-breaks-schoolyear-select",label:"Skoleår","view-model":e.schoolYears.schoolYear}}):e._e(),e._v(" "),n("single-selection-input",{attrs:{id:"kmd-educa-personale-playground-duty-breaks-area-select",label:"Område","view-model":e.breaks.area}}),e._v(" "),n("b-button",{on:{click:function(t){return e.refresh()}}},[e._v("Opdater")]),e._v(" "),e.isReadOnly?e._e():n("b-button",{attrs:{id:"kmd-educa-personale-playground-duty-breaks-add-button",disabled:!e.breaks.area.value},on:{click:function(t){return e.breaks.addNew()}}},[e._v("\n                      Tilføj pause\n                    ")])],1)],1)],1),e._v(" "),n("b-row",[n("b-col",[n("error-indicator",{attrs:{"view-model":e.breaks.errors}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("b-table",{attrs:{borderless:"","show-empty":"","empty-text":e.breaks.noBreaksPrompt.value,busy:!e.breaks.progress.empty,stacked:"narrow"===e.placement||"sm",items:e.breaks.table.items,fields:e.breaks.table.fields,"primary-key":"id","sort-by":"start","sort-desc":!1},scopedSlots:e._u([{key:"cell(actions)",fn:function(e){var t=e.item;return[n("table-row-toolbar",{attrs:{actions:t.actions()}})]}},{key:"table-busy",fn:function(){return[n("progress-indicator",{attrs:{"view-model":e.breaks.progress}})]},proxy:!0}],null,!1,397216148)})],1)],1),e._v(" "),n("b-modal",{directives:[{name:"set-focus",rawName:"v-set-focus.shown",modifiers:{shown:!0}}],ref:"breakEditionModal",attrs:{id:"kmd-educa-personale-playground-duty-break-edition-modal",busy:!e.breaks.edition.progress.empty,title:e.breaks.edition.title,"cancel-title":"Annuller",centered:"","ok-title":"Gem","no-close-on-backdrop":"",static:"","body-bg-variant":"light"}},[n("b-container",{attrs:{fluid:""}},[n("b-row",[n("b-col",[n("validated-value-input",{attrs:{id:"kmd-educa-personale-playground-duty-break-edition-name-input","data-set-focus":"",label:"Navn","view-model":e.breaks.edition.name}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("validated-time-input",{attrs:{id:"kmd-educa-personale-playground-duty-break-edition-start-input",label:"Starttid","view-model":e.breaks.edition.period.start}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("validated-time-input",{attrs:{id:"kmd-educa-personale-playground-duty-break-edition-end-input",label:"Sluttid","view-model":e.breaks.edition.period.end}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("progress-indicator",{attrs:{"view-model":e.breaks.edition.progress}})],1)],1),e._v(" "),n("b-row",[n("b-col",[n("error-indicator",{attrs:{"view-model":e.breaks.edition.errors}})],1)],1)],1)],1)],1)],1)],1)],1)],1)]:e._e(),e._v(" "),n("confirmation-modal",{attrs:{id:"kmd-educa-personale-playground-duty-confirmation-modal"}})],2)}),[],!1,null,"e26f1eda",null);t.a=ot.exports},852:function(e,t,n){"use strict";var i=n(17),s=n.n(i),a=n(1),r=n.n(a);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={name:"go-aula-connector",props:{axios:Function,moment:Function,sessionUUID:String,placement:String,isMobileApp:Boolean,getAulaToken:Function,assuranceLevel:Number,userProfile:String,triggerStepUp:Function},data:function(){return{translations:{widgetTitle:"Digitale mapper",searchTitle:"Søg",myRecentDocumentsTitle:"Mine seneste dokumenter",createDocumentButtonText:"OPRET DOKUMENT",createDocumentTitleText:"Opret dokument",openUploadDocumentModeButtonText:"UPLOAD DOKUMENT",findPupilOrClassText:"Find elev eller klasse",refreshWidgetText:"Klik for at opdatere",studentsFromClassText:"Klasse: ",documentsFromClassText:"Dokumenter fra klasse
1: ",fileNameText:"Vælg navn:",documentPropertiesText:"Dokumentegenskaber:",saveAndOpenButtonText:"GEM OG ÅBN",saveButtonText:"GEM",goBackButtonText:"GÅ TILBAGE",pupilText:"Elev",documentTemplatesText:"Dokument skabeloner",openUploadDocumentModeText:"Upload dokument",uploadPlaceholderText:"Vælg en fil, eller slip den her...",uploadDropPlaceholderText:"Slip fil her...",selectedFileText:"Valgt fil:",selectedTemplateTypeText:"Vælg undermappe:",noFileSelectedText:"Ingen fil valgt",loadingText:"Indlæser ",pickMunicipalityText:"Vælg kommune",documentIsStreaming:"Dokumentet er under behandling...",errors:{generic:"Fejl",general:"Der skete en fejl under behandlingen af forespørgelsen. Prøv igen. Hvis fejlen bliver ved med at optræde så kontakt administrator.",documentSync:"Handlingen kan ikke udføres på dokumenter, der er tjekket ud.",membershipError:"Du er ikke tilmeldt nogen grupper i kommunens institutioner.",membershipNotPicked:"Vælg kommune",searchError:"Der skete en fejl under behandlingen af forespørgelsen. Hvis fejlen bliver ved med at optræde så kontakt administrator.",noTemplates:"Ingen skabeloner fundet",noOneDriveAccount:"OneDrive konto ikke fundet for din bruger",studentWithoutCase:"Denne person har ikke en tilsvarende mappe i GO. Kontakt systemadministrator.",noSubcasesPresent:"Personen har ingen undermapper i sagssystemet. Kontakt systemadministrator.",noMatchingSubcase:"Der kunne ikke findes en undermappe som passer til på denne person. Kontakt systemadministrator.",nameContainsIllegalCharacters:'Dokumentnavnet indeholder mellemrum eller ugyldige karakterer: \\/#%&*?{}:"<>|',updateDocumentPropertiesDocumentCheckedOut:" kan ikke opdateres, fordi dokumentet er tjekket ud. Prøv venligst igen senere.",updateDocumentPropertiesGeneralError:" kan ikke opdateres. Kontakt venligst administratoren.",updateDocumentPropertiesFieldDoesNotExist:" kan ikke opdateres, fordi feltet ikke findes i GetOrganized systemet. Kontakt venligst administratoren.",updateDocumentPropertiesDocumentFinalized:" kan ikke opdateres, da dokumentet er endeliggjort.",documentNameIsTooLong:"Dokumentnavnet er for langt"},successes:{documentCreationSuccess:"Bare rolig, dit dokument er oprettet og gemt. Der kan gå op til flere minutter før, at du kan se dokumentet."},noDocumentsFound:"Ingen dokumenter fundet",noStudentsInGroupFound:"Ingen elever fundet i klasse",uploadSuccess:"Dokument uploaded med succes",uploadFail:"Upload af dokument fejlet",creationSuccess:"Dokument oprettet",noSorting:"Ingen s
1ortering",noFiltering:"Ingen filtrering",documentSearchPhrasePlaceholder:"Find dokumenter",documentUploadTimeout:"Dette tager længere tid end forventet. Dokumentet bliver uploadet i baggrunden. Venligst check igen om et par minutter.",aliasText:"Barnet har navne- og adressebeskyttelse. Alias er ",assuranceLevelWarningText:"Du er ikke logget ind med et højt nok sikkerhedsniveau for at få adgang til denne widget. Klik på knappen nedenunder for at logge ind med forhøjet sikkerhed.",assuranceLevelLoginButtonText:"Log ind med forhøjet sikkerhed",serviceWindowMessage:"Vedligehold i gang"},azureFunctionAppHostUrl:"https://aulaconnectorapi.azurewebsites.net",municipalities:[],isServiceMode:!1,selectedMunicipalityId:null,municipalityLocalStorage:null,searchData:[],foundPerson:null,filteredStudents:[],current:-1,hoverStudentIndex:-1,hoverStudent:!1,documentsHeader:"",recentDocumentsItems:[],recentDocumentsFields:[],recentDocumentUpdatePropertyInProgress:[],createUploadDocumentPropertiesFields:[{key:"label",tdClass:"smallCellTable"},{key:"Value",tdClass:"smallCellTable"}],anyDocumentsPresent:!1,initialRecentDocumentsItems:[],loadingMyRecentDocuments:!1,recentDocumentsFail:!1,isPageLast:null,currentPage:null,sortOptions:[],selectedSortOption:null,sortColumn:null,sortMode:null,errorAlertMessage:null,showErrorAlert:!1,successAlertMessage:null,showSuccessAlert:!1,documentFilterOptions:[],documentFilterOption:null,documentSearchPhrase:null,documentNameContainsIllegalCharacter:!1,documentNameIsTooLong:!1,personSearchFields:[{key:"name",label:"Navn",formatter:function(e,t,n){return n.FullName}},{key:"group",label:"Klasse",formatter:function(e,t,n){return n.Group}},{key:"cpr",label:"CPR",formatter:function(e,t,n){return n.CPR}}],searchStatus:null,searchTerm:"",filteredSearchItems:[],foundGroup:null,currentMode:"search",loadingSearch:!1,aulaTemplateTypes:[],file:null,selectedTemplateType:null,pickedDocumentTemplate:null,currentTemplateIndex:-1,createDocumentNewTitle:"",loadingTemplates:!1,isUploadInProgress:!1,isUploadSuccess:null,isCreationInProgress:null,isCreationSuccess:null,aulaToken:void 0,documentLoading:!1,aulaErrorCodes:null,checkAssuranceLevel:!1,consts:{DOCUMENTUPLOAD_MAX_TIMEOUT:18e4,MUNICIPALITY_LOCAL_STORAGE_NAME:"CCMMunicipalityId",DOC_LOADING_FIELD_NAME:"IsLoading",ILLEGAL_CHARACTERS_REGEX:/[\x07\b\t\n\v\f\r\u0001\u0002\u0003\u0004\u0005\u0006\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\\#%&*?/{}:"<>|]/}}},methods:{getNewDocumentProperties:function(){var e=[],t=this.getEditableBoolRecentDocumentFields;return null==t||0===t.length||t.forEach((function(t){e.push({InternalName:t.key,Value:t.NewValue?"1":"0"})})),e},setNewValueForRecentDocumentField:function(e,t){e.NewValue=t},isRecentDocumentUpdatePropertyInProgress:function(e){var t,n;return null!==e&&null!==e.index&&null!==e.item&&null!==(null===(t=e.field)||void 0===t?void 0:t.key)&&(!!e.item[this.consts.DOC_LOADING_FIELD_NAME]||(null===(n=this.recentDocumentUpdatePropertyInProgress)||void 0===n?void 0:n.filter((function(t){return t.Index===e.index&&t.InternalName===e.field.key})).length)>0)},switchBoolDocumentProperty:function(e,t){var n,i,s;this.updateDocumentProperty(e.index,null===(n=e.item)||void 0===n?void 0:n.DocumentId,null===(i=e.field)||void 0===i?void 0:i.key,null===(s=e.field)||void 0===s?void 0:s.label,this.parseBoolToString(t))},parseBoolToString:function(e){return+e+""},recentDocumentsRowClass:function(e,t){return e&&"row"===t&&e[this.consts.DOC_LOADING_FIELD_NAME]?"recentDocumentsRowInactive":null},updateRecentDocumentItem:function(e,t,n){this.recentDocumentsItems[t][n]=e,this.$set(this.recentDocumentsItems,t,this.recentDocumentsItems[t])},showCustomSuccessMessage:function(e){this.successAlertMessage=e,this.showSuccessAlert=!0},showErrorMessage:function(e,t){switch(this.aulaErrorCodes||(this.aulaErrorCodes={AULA_CONNECTOR_ERROR_1000:this.translations.errors.general,AULA_CONNECTOR_ERROR_1001:this.translations.errors.documentSync,AULA_CONNECTOR_ERROR_1002:this.translations.errors.studentWithoutCase,AULA_CONNECTOR_ERROR_1003:this.translations.errors.noSubcasesPresent,AULA_CONNECTOR_ERROR_1004:this.translations.errors.noMatchingSubcase,AULA_CONNECTOR_ERROR_1005:this.translations.errors.nameContainsIllegalCharacters,AULA_CONNECTOR_ERROR_1006:this.translations.errors.updateDocumentPropertiesDocumentCheckedOut,AULA_CONNECTOR_ERROR_1007:this.translations.errors.updateDocumentPropertiesGeneralError,AULA_CONNECTOR_ERROR_1008:this.translations.errors.updateDocumentPropertiesFieldDoesNotExist,AULA_CONNECTOR_ERROR_1009:this.translations.errors.updateDocumentPropertiesDocumentFinalized}),e){case"AULA_CONNECTOR_ERROR_1006":case"AULA_CONNECTOR_ERROR_1007":case"AULA_CONNECTOR_ERROR_1008":case"AULA_CONNECTOR_ERROR_1009":t&&(this.errorAlertMessage=t+this.aulaErrorCodes[e]);break;default:this.errorAlertMessage=this.aulaErrorCodes[e]}this.errorAlertMessage&&e||(this.errorAlertMessage=this.translations.errors.general),this.showErrorAlert=!0},showCustomErrorMessage:function(e){this.errorAlertMessage=e,this.showErrorAlert=!0},getMembership:function(){var e=this,t=[];t.push({value:null,text:this.translations.pickMunicipalityText,isOneDriveAccountSet:!0,shouldCheckAssuranceLevel:!1});
1try{this.axios.get(this.azureFunctionAppHostUrl+"/api/Membership",this.getHeaders()).then((function(n){n.data&&n.data.Membership||(e.municipalities=t),e.isServiceMode=!!n&&!!n.data&&!!n.data.IsServiceMode;for(var i=n.data.Membership,s=0;s<i.length;s++){var a=i[s];t.push({value:a.AulaMunicipalityId,text:a.AulaMunicipalityName,isOneDriveAccountSet:a.IsOneDriveAccountSet,shouldCheckAssuranceLevel:a.ShouldCheckAssuranceLevel})}e.municipalities=t,e.municipalityLocalStorage||(e.municipalityLocalStorage=e.getMunicipalityLocalStorageValue()),e.selectedMunicipalityId!==e.municipalityLocalStorage&&(e.selectedMunicipalityId=e.municipalityLocalStorage)})).catch((function(n){console.log(n),e.municipalities=t}))}catch(e){console.log(e),this.municipalities=t}},loadSearchData:function(){var e=this;try{var t={AulaMunicipalityId:this.selectedMunicipalityId},n=[];this.loadingSearch=!0,this.axios.post(this.azureFunctionAppHostUrl+"/api/GroupsData",t,this.getHeaders()).then((function(t){(n=t.data?t.data.GroupsDatas:[]).forEach((function(e){var t;e.DisplayName=e.GroupName,e.StudentDatas=null===(t=e.StudentDatas)||void 0===t?void 0:t.sort((function(e,t){return e.FullName>t.FullName?1:-1}))})),e.loadingSearch=!1,e.searchData=n})).catch((function(t){e.loadingSearch=!1,console.log(t)}))}catch(e){console.log(e)}},findGroupOrStudent:function(e){if("create"!==this.currentMode&&"upload"!==this.currentMode||(this.aulaTemplateTypes=[],this.loadingTemplates=!0,this.showSuccessAlert=!1,this.currentMode="search"),this.filteredSearchItems.length>0&&-1!==this.current){var t=this.filteredSearchItems[this.current];t.FullName&&this.handleStudentFound(t),t.GroupName&&this.handleGroupFound(t),this.searchStatus=!0}else this.searchStatus=!1;this.filteredSearchItems=[],this.current=-1},createDocument:function(){this.currentMode="create",this.getTemplates()},openUploadDocumentMode:function(){this.currentMode="upload",this.getTemplates()},uploadDocument:function(){var e=this;try{if(null===this.file)return;this.isUploadSuccess=null,this.showSuccessAlert=!1;var t=this.file.name.substr(this.file.name.lastIndexOf(".")),n=this.createDocumentNewTitle?this.createDocumentNewTitle:this.file.name;this.createDocumentNewTitle=n=this.ensureExtension(t,n.trim());var i=new FileReader;i.onloadend=function(){var t=i.result.split(",")[1],s={AulaId:e.getAulaIdFromContext,DocumentType:e.getDocumentTypeFromContext,AulaTemplateType:e.selectedTemplateType,DocumentBinary:t,DocumentTitle:n,AulaMunicipalityId:e.selectedMunicipalityId,DocumentProperties:e.getNewDocumentProperties()};e.isUploadInProgress=!0;var a=l(l({},e.getHeaders()),{},{timeout:e.consts.DOCUMENTUPLOAD_MAX_TIMEOUT});e.axios.post(e.azureFunctionAppHostUrl+"/api/DocumentUpload",s,a).then((function(t){t&&t.data&&t.data.Message&&!t.data.Success?(e.isUploadSuccess=!1,e.showErrorMessage(t.data.Message)):(e.showCustomSuccessMessage(e.translations.successes.documentCreationSuccess),e.isUploadSuccess=!0),e.isUploadInProgress=!1})).catch((function(t){e.isUploadSuccess=!1,e.isUploadInProgress=!1,console.log(t),"ECONNABORTED"==t.code?e.showCustomErrorMessage(e.translations.documentUploadTimeout):e.showErrorMessage(t.headers.errorcode)}))},i.readAsDataURL(this.file)}catch(e){null!==this.isUploadSuccess&&(this.isUploadSuccess=!1),this.isUploadInProgress=!1,console.log(e)}},setActiveCssClass:function(e){return{active:this.current===e}},setActive:function(e){this.current=e},getStudentsAndGroups:function(){var e=this,t=this.searchTerm.toLowerCase();this.searchTerm.length<2?this.filteredSearchItems=[]:(this.filteredStudents=this.allStudents.filter((function(n){var i=n.FullName,s=e.groupNamesDictionary[n.MainGroupID];if(-1!==i.toLowerCase().indexOf(t)&&(!s||s===n.Group))return n})),this.filteredGroups=this.searchData.filter((function(e){if(-1!==e.GroupName.toLowerCase().indexOf(t))return e})),this.filteredSearchItems=[].concat(s()(this.filteredStudents),s()(this.filteredGroups)).sort((function(e,t){return e.DisplayName>
1t.DisplayName?1:-1})))},up:function(){this.current>0?this.current--:-1===this.current?this.current=this.filteredSearchItems.length-1:this.current=-1},down:function(){this.current<this.filteredSearchItems.length-1?this.current++:this.current=-1},handleStudentFound:function(e){this.foundGroup=null,this.searchTerm=e.FullName;var t=this.groupNamesDictionary[e.MainGroupID],n=t||e.Group;this.foundPerson={FullName:e.FullName,CPR:e.CPR,Group:n,AulaStudentId:e.AulaStudentId,InstitutionNumber:e.InstitutionNumber,AliasFullName:e.AliasFullName},this.clearSortFilterSearch(),this.getSortOptions(),this.getDocumentFilterOptions(),this.getTemplates(),this.documentsHeader=e.FullName+"s dokumenter",this.anyDocumentsPresent=!1,this.loadDocuments()},handleGroupFound:function(e){this.foundGroup={StudentDatas:e.StudentDatas,GroupId:e.GroupId,GroupName:e.GroupName,HasAulaClassCase:e.HasAulaClassCase,InstitutionNumber:e.InstitutionNumber},this.searchTerm=this.foundGroup.GroupName,this.foundPerson=null,this.foundGroup.HasAulaClassCase&&(this.clearSortFilterSearch(),this.getSortOptions(),this.getDocumentFilterOptions(),this.getTemplates(),this.documentsHeader=this.translations.documentsFromClassText+e.GroupName,this.anyDocumentsPresent=!1,this.loadDocuments())},handleSearchFocusOut:function(){this.filteredSearchItems=[],this.current=-1,this.searchStatus=null},setHoverStudentCssClass:function(e){return{hoverStudent:this.hoverStudentIndex===e}},resetHoverStudentCssClass:function(){this.hoverStudentIndex=-1},setActiveStudent:function(e,t){"create"!==this.currentMode&&"upload"!==this.currentMode||(this.aulaTemplateTypes=[],this.loadingTemplates=!0,this.showSuccessAlert=!1,this.currentMode="search"),this.hoverStudent=!1,this.hoverStudentIndex=-1,this.handleStudentFound(t)},setHoverStudent:function(e){this.hoverStudent=!0,this.hoverStudentIndex=e},goBackToSearch:function(e){this.currentMode="search",this.createDocumentNewTitle="",this.file=null,this.showSuccessAlert=!1,e&&this.reloadDocuments(1),this.currentTemplateIndex=-1,this.pickedDocumentTemplate=null,this.createDocumentNewTitle="",this.isUploadSuccess=null,this.isCreationSuccess=null,this.selectedTemplateType=this.aulaTemplateTypes.length>0?this.aulaTemplateTypes[0].value:null},activeTemplateCssClass:function(e){return{activePupil:this.currentTemplateIndex===e}},setActiveTemplate:function(e,t){this.isCreationSuccess=null,this.currentTemplateIndex=e,this.pickedDocumentTemplate=t,this.createDocumentNewTitle=this.ensureExtension(t.Extension,t.Name)},saveTemplateDocument:function(e){var t=this;try{this.isCreationSuccess=null,this.showSuccessAlert=!1;var n=this.createDocumentNewTitle?this.createDocumentNewTitle:this.pickedDocumentTemplate.Name;this.createDocumentNewTitle=n=this.ensureExtension(this.pickedDocumentTemplate.Extension,n.trim());var i={AulaId:this.getAulaIdFromContext,DocumentType:this.getDocumentTypeFromContext,TemplateId:this.pickedDocumentTemplate.TemplateId,DocumentTitle:n,AulaMunicipalityId:this.selectedMunicipalityId,DocumentProperties:this.getNewDocumentProperties()};this.isCreationInProgress=!0;var s=this.openDocumentOpeningWindow();this.axios.post(this.azureFunctionAppHostUrl+"/api/DocumentCreate",i,this.getHeaders()).then((function(e){e.data&&e.data.Url||(s.close(),t.handleSaveTemplateResponse(!1)),"create"===t.currentMode&&(s.location=e.data.Url),t.handleSaveTemplateResponse(!0),t.showCustomSuccessMessage(t.translations.successes.documentCreationSuccess)})).catch((function(e){s.close(),t.handleSaveTemplateResponse(!1),console.log(e),t.showErrorMessage(e.headers.errorcode)}))}catch(e){console.log(e),this.isCreationInProgress=!1}},handleSaveTemplateResponse:function(e){this.isCreationSuccess=e,this.isCreationInProgress=!1},ensureExtension:function(e,t){return t.endsWith(e)?t:t+e},refreshWidget:function(){this.current=-1,this.currentTemplateIndex=-1,this.hoverStudentIndex=-1,this.documentsHeader=this.translations.myRecentDocumentsTitle,this.file=null,this.recentDocumentsFields=[],this.recentDocumentsItems=[],null!==this.selectedMunicipalityId&&this.isUserAllowedToGetData&&this.loadMyRecentDocuments(),this.aulaTemplateTypes=[],this.searchStatus=null,this.foundPerson=null,this.foundGroup=null,this.searchTerm="",this.currentMode="search",this.isPageLast=null,this.currentPage=null,this.sortOptions=[],this.isUploadSuccess=null,this.isCreationSuccess=null},openLink:function(e,t,n){var i=this;if(!e[this.consts.DOC_LOADING_FIELD_NAME]){this.documentLoading=!0,this.updateRecentDocumentItem(!0,t,this.consts.DOC_LOADING_FIELD_NAME);var s={AulaMunicipalityId:this.selectedMunicipalityId,DocumentId:e.DocumentId},a=this.openDocumentOpeningWindow();
1this.axios.post(this.azureFunctionAppHostUrl+"/api/DocumentOpen",s,this.getHeaders()).then((function(e){e.data&&e.data.Link||(a.close(),i.showErrorMessage()),a.location=e.data.Link,i.updateRecentDocumentItem(!1,t,i.consts.DOC_LOADING_FIELD_NAME)})).catch((function(e){a.close(),i.updateRecentDocumentItem(!1,t,i.consts.DOC_LOADING_FIELD_NAME),i.showErrorMessage(e.headers.errorcode),console.log(e)}))}},openDocumentOpeningWindow:function(){var e=window.open("","_blank"),t=e.document.createElement("style");return t.innerHTML="body{font-family:'Lato',sans-serif;color:#222350;background-color:#f6f7f8}div.doc-streaming-containter{padding-top:5%}.doc-streaming-containter h1{text-align:center}.doc-streaming-containter img{top:50px;left:0;margin-left:auto;margin-right:auto;right:0;border:0;display:block}",e.document.body.innerHTML="<div class='doc-streaming-containter'><h1>"+this.translations.documentIsStreaming+"</h1><img src='data:image/gif;base64,R0lGODlhHgAeAIQAAAQCBISChMTCxOTi5GxqbCQmJPTy9NTS1BQSFKyqrMzKzOzq7Pz6/DQ2NNza3BwaHLy+vAwKDJyanMTGxOTm5Hx+fCwqLPT29BQWFLSytMzOzOzu7Pz+/Nze3P///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCQAeACwAAAAAHgAeAAAF/qAnjiOzOJrCHUhDZAYpzx7TCRAkCIwG/ABMZUOTcSgTnVLA8QF/mASn6OE4lFie8/mrUD0LXG7Z5EIPVWPnAsaJBRprIfLEoBcd2QIyie0hCgtsIkcSBUF3OgslSQJ9YAMMRRcViTgTkh4dSwKDXyJ/SgM1YmOjnyKbpZgbWSqohAo5OxAGV1iLsCIDWBAOsm48ui
1IXbxAHSWMKw4QTpQoM0dLMItLW0heZzAzZ3AylgNQcssoaSxDasMVYGrdKFMy8sxAdG246E1OwDM5LG99jdOSBdevNlBtjBMSAFSbgKYA7/HTQN8MGmz04oI3AeDHjgAv6OFwY4ExhGwi5REYM8ANOgAoG5MZMuHhqxp97OhgYmHXvUREOCBPq4LCzJYSaRRYA46lzng4BRFAxIElmp7JIzDicOADtgoIDDgykkxECACH5BAkJACgALAAAAAAeAB4AhQQCBISChMTCxERCROTi5BweHKyqrPTy9NTS1BQSFGxqbDQ2NLy6vJSSlMzKzOzq7CQmJPz6/HR2dAwKDLSytNza3BwaHHx+fAQGBISGhMTGxOTm5CQiJKyurPT29BQWFLy+vJyanMzOzOzu7CwqLPz+/Hx6fNze3P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb+QJRwOIw8KiJHCZFYKCgHonSKipwEIJBAEBEBvoDPZUSVljYarVpQ8oK/H0OpjCpV1FqGtv1+X+goD1hZa3x9YQh1ZicegVgCegIidhAYbx+JBhJSDyAaUZ0gDg+NQiUPDRCIKAaWHUVpAp+BBBFlHheZlgAWZCgnebJRgEOtbxlVg4QExEMSfQUeI2uic80oHhx9DHd5IA/XQw19Eg7BXOFCJ30DaYQO6aaqYAUR9vfxQiP7/PYe+PlK3LPnLgu8eCUKejL3CIStdB4agkBwZ5CADfEIZBlUYRoeJeEiaLAI4kAJi3qYXesGSZStK5EElGoWKo9KkVpkBjphbYpbFVCDHDwMpKVRJ1kEPFgr4YHASJ2CQPgaQgAUoUdKIpgj5AmUyilHSXI5sBESFg0zp5QAtlHPHrIt13wt82Dro7Eb84y6FsFpsBJk39VCOALJpAMORBAYMXRKEAAh+QQJCQAqACwAAAAAHgAeAIUEAgSEgoTEwsREQkTk4uQcHhysqqz08vTU0tQUEhS0trSUkpRsamw0NjTMyszs6uwkJiT8+vx0dnQMCgyMjoy0srTc2twcGhy8vrx8fnwEBgSEhoTExsTk5uQkIiSsrqz09vQUFhS8urycmpzMzszs7uwsKiz8/vx8enzc3tz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/kCVcDiMPCwkxwmRaDAqB6J0qoqkBBiMQBAhAb6AUKZElZ46HK1acPKCvyHDqaw6WdRakbb9fmfoKg9YWWt8fWEIdWYpIIFYAnoCJHYQGm8hiQYSUg8YHFGdGA4PjUInDwsQiCoGlh9FaQKfgQQRZSAZmZYAF2QqKXmyUYBDrW8bVYOEBMRDEn0FICVronPNKiAefSJ3eRgP10MLfRIOwVzhQil9A2mEDummqmAFEfb38UIl+/z2IPj5DvAT6C4LvHgntNEz9wiDrXTr3gy4M0hAh3gUyE3DoyTcgQt9MJyoqIfZNQbQbF2JJKBUMwN9KAiJEKtloBTWpliJYgyAXodhgbQ06iSLAAhrJ0AQ4LClkTEFUgiAIvRISQRzhDzx/EOFaEUtEQ5k2SICC4dGOYmcADZWzx6xkMZqMUnnAdZHXMSuETHqWoSlwU7oNVgLYQkkkw44IEGgxEMqQQAAIfkECQkALAAsAAAAAB4AHgCFBAIEhIKExMLEREJE5OLkrKqsHB4c9PL01NLUFBIUlJKUbGpstLa0NDY0jIqMzMrM7OrsJCYk/Pr8dHZ0DAoMtLK03NrcHBocvL68fH58BAYEhIaExMbEREZE5ObkrK6sJCIk9Pb0FBYUnJqcvLq8jI6MzM7M7O7sLCos/P78fHp83N7c////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv5AlnA4lEAspkcKkWgsKgeidMqSrAQYjEAgMQG+AFHmRJWmPBytWpDygr+iQqrMSlnUWpK2/X5n6CwQWFlrfH1hCHVmKyGBWAJ6AiZ2ERpvIokFE1IQGBxRnRgPEI1CKRAKEYgsBZYfRWkCn4EEEmUhGZmWABdkLCt5slGAQ61vG1WDhATEQxN9BiEna6JzzSwhIH0kd3kYENdDCn0TD8Fc4UIrfQNphA/ppqpgBhL29/FCJ/v89iH4+Q7wE+guC7x4KbTRM/cIg610694MuDNIgId4JchNw6Mk3IELfTCkqKiH2bUF0GxdiSSgVLMCfUoIkRCrZaAV1qYcmKDrC1iIYYG0NOoki0AIa3YcgMTEyhIDKQRAEXqkxIJCMEwL/KFCtKKWLodW5SSSAlgWSGcNHXJADIK5NVzcvDHwtJkEArFIsJELwEAJl9dSnEAyCYGBDioc0gkCACH5BAkJAC0ALAAAAAAeAB4AhQQCBISChMTCxERCROTi5BweHKyqrPTy9NTS1BQSFJSSlGxqbDQyNLS2tIyKjMzKzOzq7CQmJPz6/HR2dAwKDLSytNza3BwaHLy+vHx+fAQGBISGhMTGxERGROTm5CQiJKyurPT29BQWFJyanDQ2NLy6vIyOjMzOzOzu7CwqLPz+/Hx6fNze3P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb+wJZwOJRALKeHCpEgLSoHonTakrAEGIxAIDkBvgBRBkWVqjwcrVqg8oK/IoOq3FJZ1NqStv1+Z+gtEFhZa3x9YQh1ZiwhgVgCegIndhEabyKJBhNSEBgcUZ0YDxCNQioQChGILQaWIEVpAp+BBBJlIRmZlgAXZC0sebJRgEOtbxtVg4QExEMTfQUhKGuic80tIR99JXd5GBDXQwp9Ew/BXOFCLH0DaYQP6aaqYAUS9vfxQij7/PYh+PkO8BPoLgu8eCq00TP3CIOtdOveDLgzSICHeCbITcOjJNyBC30wqKioh9m1BdBsXYkkoFQzA31MCJEQqyWrCS6lHJig68tah2GBtDSCCaCAAhbW7DgAiYmVpQZSCEQx9oZBCAsKwTQ18IcK1TcJDrjp09SamWeHEoQY28cBMRAg31BYe6gA1GYoNhQAo5ZtARM5m4UoMWGAVQQFOqxwSCcIACH5BAkJADAALAAAAAAeAB4AhQQCBISChMTCxERCROTi5KSmpBweHPTy9JSSlNTS1LS2tCwuLBQSFGxqbIyKjMzKzOzq7KyurCQmJPz6/HR2dAwKDJyanNza3Ly+vDQ2NBwaHHx+fAQGBISGhMTGxERGROTm5KyqrCQiJPT29Ly6vDQyNBQWFIyOjMzOzOzu7LSytCwqLPz+/Hx6fJyenNze3P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb+QJhwOJxALqgHK8HINFQHonQKm7wEGIxAMEEBvgDTJkWVskAerVrA8oK/phCrDGNd1FqStv1+b+gwEFhZa3x9YQl1Zi8jgVgCegIodhIcbyaJIRRSEBgeUZ0YDxCNQiwQCBKIMAUcHBFFaQKfgQQTZSMbmZYAGmQwL3mzUYBDIbxfHVWDhATFQxR9BiMpa6JzzzAjIn0kd3kYENlDCH0UD8Jc40IvfQNphA/rpqpgBhP4+fNCKf3+/ymIzTvgjyCDNwuwjZvAzV6GNxXErXuBDMCABn0szDthTkUfCaWeHTDQB8MIE33+ZMP45h6MDZcSZWv15gQ/lKs0hZRygEJbIpoARAgssIqmAQQvsNlxoCGnJQVEWOiCcazPggkJ6oHBxCpAmap9GIxw04erwqjRDlUYkeDQFwfFIjR9I5asPajPUnQg+aVuyxM7n40gQWHAArYGPrTAcKtMEAAh+QQJCQAyACwAAAAAHgAeAIUEAgSEgoTEwsREQkSkoqTk4uQcHhy0srT08vSUkpTU0tRkZmQsLiwUEhR0dnSMiozMysysqqzs6uwkJiS8urz8+vwMCgycmpzc2tw0NjQcGhx8fnwEBgSEhoTExsRERkSkpqTk5uQkIiS0trT09vRsamw0MjQUFhR8enyMjozMzsysrqzs7uwsKiy8vrz8/vycnpzc3tz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/kCZcDisSDAqyEvRyJQOCKJ0KqvEBC6XQFBRAb6A04ZFlb5CHq1a8PKCv6fIqyx7YdRairb9fm/oMhJYWWt8fW
1EKdWYOiYJ5Wip2ExxvJ4kRDlIEiIFZEBIkQy8SCROcIBwcK0MhJ3CNBRVlJBuXlAAaZDIOlYmAQxG3Xx0yCA19Kb9DvG8GJCt9DLLKMiQGfRQLfTDUQwl9DiZvHLrdBX0DFm8M3aIizSzx8VHtQvLyCPMS9PX58yzqwDCY0+7FOzAGMryxIKFeDHQl+lyolwLcgT4TQlFDcO2NCxKu/HSL2EzWhl7dUL1JJoNFSEsyMGmcgoCRDJUARPADcYqSUYEEMQjaeaCBUzAAI4i8qBVT2BdpCkyhBBGgzNE+DUi46QOT4KJDACyQUAAWwINfK4q+yboVYVJlLDp0BMC2WYqZ1EhQcDCAwVgDH1C4mEYlCAAh+QQJCQAwACwAAAAAHgAeAIUEAgSEgoTEwsREQkQkIiSkoqTk4uT08vQUEhSUkpRkZmQ0MjS0srTU0tR0dnSMiowsKiysqqzs6uz8+vwcGhwMCgycmpw8Ojy8urzc2tx8fnwEBgSEhoTMzsxERkQkJiSkpqTk5uT09vQUFhRsamw0NjS0trR8enyMjowsLiysrqzs7uz8/vwcHhycnpzc3tz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/kCYcDg8qEgLgqiBKJEYB6J0CpM4RoAsQtTJZkeaFVXKKiC82QoX/Y2wxjAWia1d0wEaOAy0oW+7dCMNcWQOgxF9XhsXIhkfiV+HDlIFAIIwiAAQLhJvcRIJH5aDfBsqQyFYo3saE2MiGqQVWRRiMA5ol3pDKpAAHDAHZ2gou0O4aC0iKmwprsYwIgRsGApsLtBDCWwOC2gbttkGbAOzXinZQyzTXi0r7+9R6ULw8AfxEvLz9/Er5lkpPGVbl6wEmgoS5r0gNweNhXkouDFg80FEtgMtqIlQ5SUPtIbtXGnINQgaH2L0VF2K4MAilQOG9iQioA/EqpMtErzwxCLDSAMKqzKZIMIiFiZfAJw1EEVyT4Axmdj8uXNJIFFkbNQ0uAPgwS4VQNFMZdNiqLEVHDLWAZSlBQqX2URgcDAgxZIWHk4IgDslCAAh+QQJCQAyACwAAAAAHgAeAIUEAgSEgoTEwsREQkTk4uQkIiSkoqT08vS0srQUEhTU0tRkZmQ0MjSUkpR0dnSMiozMyszs6uwsKiysqqz8+vy8urwcGhwMCgzc2tw8Ojx8fnwEBgSEhoTExsRERkTk5uQkJiSkpqT09vS0trQUFhRsamw0NjScnpx8enyMjozMzszs7uwsLiysrqz8/vy8vrwcHhz
1c3tz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/kCZcDg8tEqMgkgkUGFWFKJ0Kos4SIBsQnR4CV6vTixKJboMiaz6wgV/v51IWegqqe9bprvifcXmMiEbd1ptXnxwBzIuUi4OCjITg2obGUsQAnxgHYoTDlIGACSQkgASJxGMQiIfEF6dgy1DH1iikCEaZFMUMSKRkxYrQg53o4BEE4QcMgdpdynHQ8R3MCIthCy6xyIwhBULhCfRRA2EDgx3G8LjQgSEAxd3LOxDLgXUK/n5ivRC+voH9kXg1y/gvhXx1LBQxc4eNRN3LsihF+OdnTvi6KUwh4AQCF/jDlgg9EJELTUa2F1UAyOKhmKQxgl65q+WMU8gpxx4FGhSWgGCIWz1BACjQQxVLjA8GHlz0AgzGkhNUkhBAQhCxkIEKFOK0BYVhLIYY2hmGiE2CsJmeXCsxUg8IsASgvE02goO3QrJzQIjRc5xIio4GMBChAIYHlC80CYlCAAh+QQJCQAxACwAAAAAHgAeAIUEAgSEgoTEwsREQkTk4uSkoqQkIiT08vS0srQUEhTU0tRkZmSUkpQ0MjR0dnSMiozMyszs6uysqqz8+vy8urwcGhwMCgwsKizc2tw8Ojx8fnwEBgSEhoTExsRERkTk5uSkpqT09vS0trQUFhRsamycnpw0NjR8enyMjozMzszs7uysrqz8/vy8vrwcHhwsLizc3tz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/sCYcDg8rEgNQygkSGFUE6J0Gos4RoBsInRoCVqtDixKJbIKiazawgV/v51IWcgiqe9bppvibcHmMSAbd1ptXnxwBzEsUiwOCjESg2obGUsQAnxgHYoRf0QFACOQkgAXJRGMQiEfEF6dX3JCH1iikCAaZFMTMCFVXy0QZA53o4BEEW5gBDEHaXcox0MwwJkdEyuEL7rHEx2ZfSoLhCXSRB9gfTANdxsq5kMTb14pFncv8EMsEJoUECoAASrKJ2SCwYMHBEYYSDBgQHtqXqiCx8LAHRcm7liQBQ/GpCwD7Nwplw8FIQcICCmBd6ACoRYhaqnRAE+kGhdRNBSDZE4QaDQhKmoZk+DAF5UDjwJNMsAQhC2lAFwwgKGKBYYHLocOEmFGA6mPWbYpMADWGIgAZUoR2pKCUBZjE80Qc8tGgdssD46tcIknRFtCLrhKU8HBhRq2F1EYhReCgoMBL0IocOHhRAtuUoIAACH5BAkJADAALAAAAAAeAB4AhQQCBISChMTCxERGROTi5KSipCQiJPTy9LSytBQSFNTS1JSSlGRmZDQyNHR2dIyKjMzKzOzq7KyqrPz6/Ly6vBwaHAwKDCwqLNza3Dw6PHx+fAQGBISGhMTGxOTm5KSmpPT29LS2tBQWFJyenGxqbDQ2NHx6fIyOjMzOzOzu7KyurPz+/Ly+vBweHCwuLNze3P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb+QJhwODyoSA0DCCRAYVITonQKizhEgGwCdGAJWKzOK0olrgqJrNrCBX+/nUhZuCKp71umm+JlveYwHxt3Wm1efHAHMCtSKw4KMBKDAJQbGUsQAnxgHYoRf0QFACKQkgAXIxGMQiAeEF6eX3JCHlijkB8aZFMTLyBVXywQZA6UlKSARBFuYAQwB2nGACfJQy/Bmh0TKtIALrvJEx2afSkM3SPVRB5gfS8N0hsp6kMTb14oFtIu9EMrEJsoQEhBkKCifkImKFx4wGCEgwgngFAIYoU+Yy5W0fvXTlgJaRZm0dMTDIUdaen6EWj35QWCbkroievz5QAIW8Y00HtxCMxuMBgapCFTt2yPMxgpbCGT4OAXlQOPgPnc9eFWoEEtFrxYtQLDgwpWI3yZ509DqUkYJygwgDYsqCmmum1B0e0YpDKO6gJgo0AvgAfJ
1VICVNrduixDqUnBoYaywsRYnnI6k4GCACxAKWgwwwQKclCAAIfkECQkALgAsAAAAAB4AHgCFBAIEhIKExMLEREZE5OLkJCIkpKKk9PL0FBIU1NLUtLK0ZGZkNDI0lJKUdHZ0zMrM7OrsrKqs/Pr8HBocDAoMjI6MLCos3NrcvLq8PDo8fH58BAYEhIaExMbE5ObkpKak9Pb0FBYUbGpsNDY0nJ6cfHp8zM7M7O7srK6s/P78HB4cLC4s3N7cvL68////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv5Al3A4PKBEjAIIJDBdThKidOqCOEKALAJ0aAlarQ4rSiWmDIismsIFf78dSFmYEqnvW6Yb422x5i4fG3dabV58cAcuKVIpDgkuEYMAlBsZSw8CfGAdihB/RAYAIZCSABYkEIxCIB4PXp5fckIeWKOQHxpkUxIsIFVfLQ9kDpSUpIBEEG5gBC4HacYAFclDLMGaHRIo0gAru8kSHZp9JwvdJNVEHmB9LAzSGyfqQxJvXiYU0iv0QykPmzA8OEGQoKJ+QiQoXHjAIISDCCWAUAgihT5jK1bR+9dO2AhpFGbR0xPMhB1p6foRaPeFhYJuSuiJ6/PlAAhbxjTQY3EIzHIwFxqkIVO3bI8zFydsIYvg4BeVXr8gBPsp5MOtQINUNGCxKgUIAuMERP0yz5+GUpMwSnwVLIyno1NMdUNwoAszOE6pOOpGaUuXYBjewC2DYkI3NiDuChMJ6AQHFcb8suxAAFw1EBgcDFiBKcGFA5aJBAEAIfkECQkAKQAsAAAAAB4AHgCFBAIEhIKExMLEZGZk5OLkJCIkpKKk9PL01NLUFBIUNDI0tLK0dHZ0zMrM7OrsrKqs/Pr8DAoMnJ6cLCos3NrcHBocPDo8fH58BAYEjI6MxMbEbGps5ObkpKak9Pb0FBYUNDY0vL68fHp8zM7M7O7srK6s/P78LC4s3N7c////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv7AlHA4PJQ2ioLHIxhRSBCidJpyMD6AbMJzCAlCIQ0qSiWaDImsOsIFf78aR1lo2qjvW6Z7j5qnOhh3Wm1eYF4CHikmUiYMCCkPgWoYFksNX4YCB1V9RAYAH4+RABMSDotCHhwNXpsOX3JCHFigjx0XZFMQBK6FGmQMd6F+RA6FXwQpB2l3GcRDKIZgvyWCJ7nEEKxvIQcDghLPRByZIRQKdxgk4kMQhV4jEXcn7EMmrIYNJPv7m/VCEAIKPNDPgb9/AgXKU3MCFTsTGqRpAHEnQix2ejAhsHMnXD0C5SgsEKSEHQQN3Lp5oKXmArto0hpEuSDskbhX75KlIEFrmGcDFA6lQECRyNgXmUM61KriRQMBD6hMeCCAUhNTARcVXXhkbI+ABia0SQtTtNMUo5jeQOhyyNfBKSZgvvNiogumPTrnkMD3RsDaPYfWPdsV8U3dmASwPTPhgMKIERA8NBhBwIFiIkEAACH5BAkJACUALAAAAAAeAB4AhQQCBISChMTCxGRmZOTi5CQiJPTy9KSipNTS1BQSFDQyNMzKzHR2dOzq7Pz6/Ly+vAwKDJyenKyqrNza3BwaHDw6PAQGBIyOjMTGxGxqbOTm5CwuLPT29BQWFDQ2NMzOzHx6fOzu7Pz+/KyurNze3P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb+wJJwODSMMooChyP4TEIOonRaajA6gGyCY3gIHg8MKUolig6JrBrCBX+/mEZZKMqo71ume0+alyQWd1ptXmBeAhwlIlIiDAh/gWoWFUsLX4YCBlV9RAcAHY+AABsRDYtCHBoLXpoNX3JCGlifoSCJVA4ErYUYZAx3oH5EDYVfBCUGaXcXwkMkhmC9I4IbZM0Oq28PBgOCEc1EGpgPEwp3FiHgQw6FXh8QdxvqQyKrhgsh+fma80IO/wAD/uvnTyAGaAsIijhoCMOHdgKsgdNzCcGEYg809CMw7smeBwtOXcOgbZsDhoU4NbvYbkEUEpe83Grmas+xEg7eZNokUopbAxK73ogkhqjKlwUEOJwSwYEAyaJEYQ3RZRSagJDYoIVppVIKMYxeHHQ5xGvmFBEwrXoR0SVmoZtzGjx1E3HsJQEC0l0jcVDoWDBIJTYT0WACApccFlg0IJhIEAAh+QQJCQAhACwAAAAAHgAeAIUEAgSEgoTEwsTk4uRkZmQkIiT08vTU0tSkoqQUEhTMyszs6uw0NjT8+vy8vrwMCgx8enzc2tysqqwEBgScnpzExsTk5uRsamwsLiz09vQUFhTMzszs7uw8Ojz8/vzc3tysrqz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/sCQcDg0gC6MQiYj2EQ4DaJ0GlpAEoBswmBwCByOyidKJXoQ2Kw20/W6K4uy0HNR2x9LsNv9kYckE3ZrXV9fXgIZIR5SHh8Gf4FqEx1LCoZgAo8LfUQLYYkSWRgUC4tCGRYKXppfcUINFV4VjxIQiVQNA5pvZB97s36dbl8DIQ2XxMFDvnphDRx7Dgqmyg2qhQ4GEZhgrspCA3pfEdeHZN8hTHsHsXoK6EMequ4N9fbwQ/b6+/iv+5fS+nloB6bChj0Czn1TZ+jAtj3evoXj9sTQFwUK/cBCCAUbmGLfHg5bxAzTLWWeLoGEVSjKpoz5HFVxg3FIyl3SBmQw5SHDSYAKAoAtaCVFVxWAAqZZa/apCsgpnoZhatBGADZgZRp5LOSBkDgvT8ssiGUxYVWaEeXkIuulazMBA2D68bAgwgGMGRQ4NEBtShAAIfkECQkAEAAsAAAAAB4AHgCEvL685OLk1NLU9PL0zMrM7Ors/Pr8xMbE3NrcxMLE5Obk9Pb0zM7M7O7s/P783N7c////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABf4gJI6jUSAM4QwHgTQGKc+Q8SQAkCTGoOeHR4xGcigOP1xilVMCDgWiyIH4WZe+pvYhhRRwuSTTqVxAHDLHw/y9MhwLArjJ5pIKz4E3RyiYSwoEOnptUSIGSAkHhAFDMzaEYARDD0kJf10ieFYBNXM5nZkiN1oHBg1XKqKHB2A4DVVWhqsQAWE6CIJKPLQiC04AAkhhBL1TgsQGysvGh8vPyguOvQbSy5/F
1xg7IQAxJANOiv0kMsT8KxrZaL2QHaKuIwAMGnwl2orGuaKRNeqttYULR05GA0IN3j9bswTFpBJ5LXhgGWPAOToBWBSMCmCUiQKRbCVQY4AaETagZmyuA8ciy48ciKWrq6RgDEsBJIgV0NVmphWADeBfFZOHTSNsJAZPiCEAwT0oIADs=' /></div>",e.document.body.appendChild(t),e},setUploadedDocumentName:function(e){this.createDocumentNewTitle=e.name},onChangeDocumentName:function(){this.isCreationSuccess=null,this.isUploadSuccess=null},createDocumentTypeChanged:function(){this.currentTemplateIndex=-1,this.pickedDocumentTemplate=null},loadMyRecentDocuments:function(){var e=this;try{if(this.isServiceMode)return this.recentDocumentsFail=!0,void(this.loadingMyRecentDocuments=!1);this.loadingMyRecentDocuments=!0,this.recentDocumentsFail=!1,this.recentDocumentsItems=[],this.recentDocumentsFields=[];var t={AulaMunicipalityId:this.selectedMunicipalityId};this.axios.post(this.azureFunctionAppHostUrl+"/api/DocumentsMy",t,this.getHeaders()).then((function(t){if(t&&t.data){var n=t.data.AulaMunicipalityId,i=t.data.DocumentData;if(!(n!==e.selectedMunicipalityId||e.recentDocumentsItems.length>0||null!==e.currentPage)){if(!i)return e.recentDocumentsFail=!0,void(e.loadingMyRecentDocuments=!1);for(var s=[],a=0;a<i.length;a++){var r=i[a],o=e.buildMyRecentDocument(r);null!==o&&s.push(o)}s&&(e.recentDocumentsItems=s),e.initialRecentDocumentsItems=e.recentDocumentsItems,e.loadingMyRecentDocuments=!1}}else e.loadingMyRecentDocuments=!1})).catch((function(t){e.recentDocumentsItems=[],e.recentDocumentsFields=[],e.recentDocumentsFail=!0,e.loadingMyRecentDocuments=!1,console.log(t),e.showErrorMessage(t.headers.errorcode)}))}catch(e){this.recentDocumentsFail=!0,this.loadingMyRecentDocuments=!1,console.log(e)}},buildMyRecentDocument:function(e){try{var t={},n=[],i=[];if(!e.DocumentProperties||e.DocumentProperties.length<=0)t={titel:e.DocumentName?e.DocumentName:"",elev:e.StudentFullName?e.StudentFullName:"",klasse:e.GroupName?e.GroupName:"",DocumentId:e.DocumentId?e.DocumentId:""},n.push("titel","elev","klasse"),i.push("DocumentName","GroupName","TemplateType");else e.DocumentProperties.forEach((function(s){t[s.DisplayName]=s.Value?s.Value:"",t.DocumentId=e.DocumentId?e.DocumentId:"",n.push(s.DisplayName),i.push(s.InternalName)})),t.DocumentId=e.DocumentId;return this.recentDocumentsFields.length<=0&&(this.recentDocumentsFields=n,this.recentDocumentsFieldsInternalNames=i),t}catch(e){return console.log(e),null}},getHeaders:function(){return{headers:{"Content-Type":"application/json",AulaToken:this.aulaToken}}},getTemplates:function(){var e=this;try{this.aulaTemplateTypes=[],this.loadingTemplates=!0;var t={AulaMunicipalityId:this.selectedMunicipalityId,InstitutionNumber:this.getInstitutionNumberFromContext,DocumentType:this.getDocumentTypeFromContext},n=[{value:null,text:"",disabled:!0,AulaTemplates:[]}];this.axios.post(this.azureFunctionAppHostUrl+"/api/Templates",t,this.getHeaders()).then((function(t){if(t&&t.data){var i=t.data.TemplatesData;i&&0!==i.length?(i.forEach((function(e){var t=e.AulaTemplates.length>0?e.AulaTemplates:[];t.length>0&&t.forEach((function(t){t.TemplateType=e.Name})),n.push({value:e.Name,text:e.Name,AulaTemplates:t})})),e.aulaTemplateTypes=n,e.selectedTemplateType=e.aulaTemplateTypes[0].value,e.loadingTemplates=!1):e.loadingTemplates=!1}else e.loadingTemplates=!1})).catch((function(t){e.loadingTemplates=!1,console.log(t),e.showErrorMessage(t.headers.errorcode)}))}catch(e){console.log(e)}},loadDocuments:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{this.recentDocumentsItems=[],this.recentDocumentsFields=[],this.recentDocumentUpdatePropertyInProgress=[],this.loadingMyRecentDocuments=!0,this.recentDocumentsFail=!1;var r=t||1;this.currentPage=r;var o={AulaMunicipalityId:this.selectedMunicipalityId,AulaId:this.getAulaIdFromContext,DocumentType:this.getDocumentTypeFromContext,Page:r,SortColumn:n,SortMode:i,TemplateTypeFilter:s,SearchPhrase:a};
1this.axios.post(this.azureFunctionAppHostUrl+"/api/Documents",o,this.getHeaders()).then((function(t){if(!t||!t.data)return e.recentDocumentsItems=[],e.recentDocumentsFields=[],void(e.loadingMyRecentDocuments=!1);var n=t.data.AulaMunicipalityId,i=t.data.DocumentData;if(e.isPageLast=t.data.IsPageLast,!(n!==e.selectedMunicipalityId||e.recentDocumentsItems.length>0)){if(!i)return e.recentDocumentsFail=!0,void(e.loadingMyRecentDocuments=!1);for(var s=[],a=!1,r=0;r<i.length;r++){var o=i[r],l=e.buildStudentDocument(o);if(null!==l){if(s.push(l),a)continue;var c=e.getRecentDocumentFields(o,t.data.FieldConfigurations);null!=c&&(e.recentDocumentsFields=c,a=!0)}}a||(e.recentDocumentsFields=e.getRecentDocumentFieldsForEmptyDocData(t.data.FieldConfigurations)),s.length>0&&(e.getSortOptions(),e.anyDocumentsPresent=!0),s&&(e.recentDocumentsItems=s),e.initialRecentDocumentsItems=e.recentDocumentsItems,e.loadingMyRecentDocuments=!1}})).catch((function(t){e.recentDocumentsItems=[],e.recentDocumentsFields=[],e.recentDocumentUpdatePropertyInProgress=[],e.recentDocumentsFail=!0,e.loadingMyRecentDocuments=!1,console.log(t),e.showErrorMessage(t.headers.errorcode)}))}catch(e){this.recentDocumentsFail=!0,this.loadingMyRecentDocuments=!1,console.log(e)}},getRecentDocumentFields:function(e,t){try{var n=[];if(!e.DocumentProperties||e.DocumentProperties<=0)n.push({key:"DocumentName",label:"titel"},{key:"GroupName",label:"klasse"},{key:"TemplateType",label:"dokumentstype"});else e.DocumentProperties.forEach((function(e){var i={key:e.InternalName,label:e.DisplayName};if(null!=t&&t.length>0){var s=t.find((function(t){return t.InternalName===e.InternalName}));null!=s&&(i.FieldType=s.FieldType?s.FieldType:"",i.IsEditable=!!s.IsEditable&&s.IsEditable)}n.push(i)}));return n}catch(e){return console.log(e),null}},getRecentDocumentFieldsForEmptyDocData:function(e){try{if(null==e||0===e.length)return[];var t=[];return e.forEach((function(e){t.push({key:e.InternalName,label:e.DisplayName?e.DisplayName:e.InternalName,FieldType:e.FieldType?e.FieldType:"",IsEditable:!!e.IsEditable&&e.IsEditable})})),t}catch(e){return console.log(e),[]}},buildStudentDocument:function(e){try{var t={};if(!e.DocumentProperties||e.DocumentProperties<=0)t={titel:e.DocumentName?e.DocumentName:"",elev:e.StudentFullName?e.StudentFullName:"",klasse:e.GroupName?e.GroupName:"",dokumentstype:e.TemplateType?e.TemplateType:"",DocumentId:e.DocumentId?e.DocumentId:""};else e.DocumentProperties.forEach((function(n){t[n.InternalName]=n.Value?n.Value:"",t.DocumentId=e.DocumentId?e.DocumentId:""})),t.DocumentId=e.DocumentId,t[this.consts.DOC_LOADING_FIELD_NAME]=!1;return t}catch(e){return console.log(e),null}},updateDocumentProperty:function(e,t,n,i,s){var a=this;this.recentDocumentUpdatePropertyInProgress.push({Index:e,InternalName:n}),this.updateRecentDocumentItem(!0,e,this.consts.DOC_LOADING_FIELD_NAME);var r={DocumentId:t,DocumentProperties:[{InternalName:n,Value:s}],AulaMunicipalityId:this.selectedMunicipalityId};this.axios.post(this.azureFunctionAppHostUrl+"/api/UpdateDocumentProperties",r,this.getHeaders()).then((function(){a.recentDocumentUpdatePropertyInProgress=a.recentDocumentUpdatePropertyInProgress.filter((function(t){return t.Index!=e&&t.InternalName!=n})),a.updateRecentDocumentItem(!1,e,a.consts.DOC_LOADING_FIELD_NAME)})).catch((function(t){a.recentDocumentUpdatePropertyInProgress=a.recentDocumentUpdatePropertyInProgress.filter((function(t){return t.Index!=e&&t.InternalName!=n})),a.updateRecentDocumentItem(!1,e,a.consts.DOC_LOADING_FIELD_NAME),a.showErrorMessage(t.headers.errorcode,i||"Dokumentegenskaben"),a.reloadDocuments(),console.log(t)}))},getSortOptions:function(){for(var e=this.getNoSortingOption(),t=0;t<this.recentDocumentsFields.length;t++)e.push({value:this.recentDocumentsFields[t].key+"#;Asc_",text:"Sortér på ".concat(this.recentDocumentsFields[t].label," (stigende)")}),e.push({value:this.recentDocumentsFields[t].key+"#;Desc_",text:"Sortér på ".concat(this.recentDocumentsFields[t].label," (faldende)")});this.sortOptions=e},getDocumentFilterOptions:function(){var e=this.getNotFilteringOption();
1null!==this.aulaTemplateTypes&&this.aulaTemplateTypes.forEach((function(t){t&&!t.disabled&&e.push(t)})),this.documentFilterOptions=e},clearSortFilterSearch:function(){this.currentPage=null,this.sortOptions=[],this.selectedSortOption=null,this.documentFilterOptions=[],this.documentFilterOption=null,this.documentSearchPhrase=null},refreshDocuments:function(){this.isStudentOrClassFound?this.reloadDocuments():this.loadMyRecentDocuments()},reloadDocuments:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null!==e&&(this.currentPage=e),this.loadDocuments(this.currentPage,this.sortColumn,this.sortMode,this.documentFilterOption,this.documentSearchPhrase)},getNoSortingOption:function(){return[{value:null,text:this.translations.noSorting}]},getNotFilteringOption:function(){return[{value:null,text:this.translations.noFiltering,AulaTemplates:[]}]},setMunicipalityLocalStorage:function(){localStorage.setItem(this.consts.MUNICIPALITY_LOCAL_STORAGE_NAME,this.selectedMunicipalityId)},getMunicipalityLocalStorageValue:function(){try{var e=parseInt(localStorage.getItem(this.consts.MUNICIPALITY_LOCAL_STORAGE_NAME));return isNaN(e)?null:e}catch(e){return null}}},computed:{getEditableBoolRecentDocumentFields:function(){var e;return null===(e=this.recentDocumentsFields)||void 0===e?void 0:e.filter((function(e){return!0===e.IsEditable&&("Bool"===e.FieldType||2===e.FieldType)}))},filteredDocumentTemplates:function(){var e=this;return this.currentTemplateIndex=-1,this.pickedDocumentTemplate=null,this.documentTemplates&&0!==this.documentTemplates.length?this.documentTemplates.filter((function(t){return t.TemplateType===e.selectedTemplateType})):[]},allStudents:function(){for(var e=this,t=[],n=function(n){var i=e.searchData[n],a=[];a.push.apply(a,s()(i.StudentDatas)),a.forEach((function(e){e.DisplayName=e.FullName,e.Group=i.GroupName,e.keyVal="".concat(e.AulaStudentId,"_").concat(i.GroupId)})),t.push.apply(t,a)},i=0;i<this.searchData.length;i++)n(i);return t},documentTemplates:function(){var e=[];return this.aulaTemplateTypes.forEach((function(t){if(!t.AulaTemplates||0===t.AulaTemplates.length)return e;e.push.apply(e,s()(t.AulaTemplates))})),e},groupNamesDictionary:function(){var e={};return this.searchData.forEach((function(t){e[t.GroupId]=t.GroupName})),e},isUserAllowedToGetData:function(){var e=this,t=this.municipalities.findIndex((function(t){return t.value===e.selectedMunicipalityId})),n=this.municipalities[t].shouldCheckAssuranceLevel;return!n||!!n&&3===this.assuranceLevel},isClassWithoutCaseFound:function(){return this.foundGroup&&!this.foundGroup.HasAulaClassCase},isClassFound:function(){return this.foundGroup&&this.foundGroup.HasAulaClassCase},isStudentOrClassFound:function(){return this.foundPerson||this.isClassFound},getDocumentTypeFromContext:function(){return this.foundPerson?0:this.isClassFound?1:null},getInstitutionNumberFromContext:function(){return this.foundPerson?this.foundPerson.InstitutionNumber:this.isClassFound?this.foundGroup.InstitutionNumber:null},getAulaIdFromContext:function(){switch(this.getDocumentTypeFromContext){case 0:return this.foundPerson.AulaStudentId;case 1:return this.foundGroup.GroupId;default:return null}}},created:function(){try{this.axios.interceptors.response.use((function(e){return e}),(function(e){return console.log(e),e.response?Promise.reject(e.response):Promise.reject(e)}))}catch(e){console.log(e)}},mounted:function(){try{this.aulaToken=this.getAulaToken()}catch(e){console.log(e)}},watch:{createDocumentNewTitle:function(e,t){this.documentNameContainsIllegalCharacter=this.consts.ILLEGAL_CHARACTERS_REGEX.test(e),this.documentNameIsTooLong=e&&e.length>150},recentDocumentsItems:function(){var e=this;this.documentLoading=this.recentDocumentsItems&&this.recentDocumentsItems.length>0&&this.recentDocumentsItems.some((function(t){return!0===t[e.consts.DOC_LOADING_FIELD_NAME]}))},aulaToken:function(){var e=this;null!=this.aulaToken&&(0===this.municipalities.length&&this.getMembership(),setTimeout((function(){e.aulaToken=e.getAulaToken()}),24e4))},selectedMunicipalityId:function(){var e=this;this.recentDocumentsItems=[],this.searchData=[],this.refreshWidget(),this.showErrorAlert=!1,this.showSuccessAlert=!1;var t=this.municipalities.findIndex((function(t){return t.value===e.selectedMunicipalityId}));null!==this.selectedMunicipalityId?(this.selectedMunicipalityId!==this.municipalityLocalStorage&&this.setMunicipalityLocalStorage(),this.checkAssuranceLevel=this.municipalities[t].shouldCheckAssuranceLevel,-1!==t&&!0===this.municipalities[t].isOneDriveAccountSet&&this.isUserAllowedToGetData&&!this.isServiceMode?this.loadSearchData():0!==t&&this.showCustomErrorMessage(this.translations.errors.noOneDriveAccount)):this.checkAssuranceLevel=!1},selectedSortOption:function(){var e=0;if(null===this.selectedSortOption)this.sortColumn=null,this.sortMode=null;else{var t=this.selectedSortOption.split("#;");"Asc_"===t[1]&&(e=1),"Desc_"===t[1]&&(e=2),this.sortColumn=t[0],this.sortMode=e}this.reloadDocuments(1)},documentFilterOption:function(){this.reloadDocuments(1)},loadingTemplates:function(){this.getDocumentFilterOptions()}}},u=c,d=n(3),h=Object(d.a)(u,(function(){var e=this,t=this,n=t.$createElement,i=t._self._c||n;return i("div",{staticClass:"widget-W0075V0001"},["employee"===t.userProfile?i("div",[0!==t.municipalities.length||t.isServiceMode?!0===t.isServiceMode?i("b-container",[i("b-row",[i("b-col",{staticClass:"text-center"},[i("h1",[i("i",{staticClass:"fa fa-wrench service"})]),t._v(" "),i("div",[t._v(t._s(t.translations.serviceWindowMessage))])])],1
1)],1):t.municipalities.length>2&&!t.isServiceMode?i("b-container",[i("b-row",[i("b-col",[i("b-form-select",{attrs:{options:t.municipalities},model:{value:t.selectedMunicipalityId,callback:function(e){t.selectedMunicipalityId=e},expression:"selectedMunicipalityId"}})],1)],1),t._v(" "),i("b-row",[i("b-col",[i("h1",{directives:[{name:"b-popover",rawName:"v-b-popover.hover.top",value:t.translations.refreshWidgetText,expression:"translations.refreshWidgetText",modifiers:{hover:!0,top:!0}}],staticClass:"text-center",attrs:{id:"refreshTitle"},on:{click:t.refreshWidget}},[t._v(t._s(t.translations.widgetTitle))])])],1)],1):2!==t.municipalities.length||t.isServiceMode?1!==t.municipalities.length||t.isServiceMode?t._e():i("b-container",[i("b-row",[i("b-col",{staticClass:"text-center"},[i("h1",{staticClass:"error"},[t._v(t._s(t.translations.errors.generic))]),t._v(" "),i("div",[t._v(t._s(t.translations.errors.membershipError))])])],1)],1):i("b-container",[i("b-row",[i("b-col",[i("h1",{directives:[{name:"b-popover",rawName:"v-b-popover.hover.top",value:t.translations.refreshWidgetText,expression:"translations.refreshWidgetText",modifiers:{hover:!0,top:!0}}],staticClass:"text-center",attrs:{id:"refreshTitle"},on:{click:t.refreshWidget}},[t._v(t._s(t.translations.widgetTitle))])])],1)],1):i("b-container",[i("b-row",[i("b-col",{staticClass:"text-center"},[i("b-spinner"),t._v(" "),i("div",[t._v(t._s(t.translations.loadingText)+t._s(t.translations.widgetTitle))])],1)],1)],1),t._v(" "),t.municipalities.length>0&&2===t.assuranceLevel&&t.checkAssuranceLevel&&!t.isServiceMode?i("b-container",[i("b-row",[i("b-col",[i("b-alert",{attrs:{show:"",variant:"danger"}},[i("b-row",[i("b-col",[i("p",[t._v(t._s(t.translations.assuranceLevelWarningText))])])],1)],1)],1)],1),t._v(" "),i("b-row",[i("b-col",{attrs:{align:"center"}},[i("b-button",{attrs:{variant:"primary"},on:{click:t.triggerStepUp}},[t._v(t._s(t.translations.assuranceLevelLoginButtonText))])],1)],1)],1):3!==t.assuranceLevel&&(2!==t.assuranceLevel||t.checkAssuranceLevel)||t.isServiceMode?t._e():i("b-container",[i("b-row",[i("b-col",[i("b-alert",{attrs:{variant:"danger",dismissible:""},model:{value:t.showErrorAlert,callback:function(e){t.showErrorAlert=e},expression:"showErrorAlert"}},[i("p",{staticClass:"error"}
1,[t._v(t._s(t.errorAlertMessage))])])],1)],1),t._v(" "),t.municipalities.length>1?i("b-row",[i("b-col",[i("b-container",[i("b-row",[i("b-col",[i("h5",[t._v("\n                  "+t._s(t.translations.searchTitle)+"\n                  "),null!==t.selectedMunicipalityId&&0===t.searchData.length&&!0===t.loadingSearch?i("b-spinner",{staticClass:"align-middle"}):t._e()],1)])],1),t._v(" "),i("b-row",[i("b-col",[i("div",{staticClass:"input-group search-input-group",attrs:{role:"group"}},[i("b-form-input",{staticClass:"form-control",attrs:{type:"text",id:"searchForm",placeholder:t.translations.findPupilOrClassText,state:t.searchStatus,disabled:null===t.selectedMunicipalityId||0===t.searchData.length,autocomplete:"off"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t.down.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:t.up.apply(null,arguments)}],keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.findGroupOrStudent.apply(null,arguments)},t.getStudentsAndGroups],blur:t.handleSearchFocusOut,focus:t.getStudentsAndGroups},model:{value:t.searchTerm,callback:function(e){t.searchTerm=e},expression:"searchTerm"}}),t._v(" "),i("span",{directives:[{name:"show",rawName:"v-show",value:null!==t.selectedMunicipalityId&&t.searchData.length>0,expression:"selectedMunicipalityId !== null && searchData.length > 0"}],staticClass:"icon-Aula_search"})],1),t._v(" "),i("ul",{directives:[{name:"show",rawName:"v-show",value:!!this.searchTerm&&this.searchTerm.length>1,expression:"!!this.searchTerm && this.searchTerm.length > 1"}],attrs:{id:"typeAheadContainer"}},t._l(t.filteredSearchItems,(function(e,n){return i("li",{key:e.GroupName?e.GroupName+e.GroupId:e.keyVal,class:t.setActiveCssClass(n),attrs:{id:"typeAheadResult"},on:{mousemove:function(e){return t.setActive(n)},mousedown:t.findGroupOrStudent}},[i("span",{staticClass:"name",domProps:{textContent:t._s(e.DisplayName)}}),t._v(" "),void 0!==e.FullName?i("span",{staticClass:"typeAheadAddInfo",domProps:{textContent:t._s(" ("+e.Group+")")}}):t._e()])})),0)])],1),t._v(" "),null!==t.selectedMunicipalityId&&0===t.searchData.length&&!1===t.loadingSearch?i("b-row",{staticClass:"searchErrorRow"},[i("b-col",{staticClass:"error"},[t._v(t._s(t.translations.errors.searchError))])],1):t._e(),t._v(" "),null!==t.foundGroup?i("b-row",[i("b-col",{class:[this.isClassFound?"classText":""]},[i("h5",[t._v(t._s(t.translations.studentsFromClassText)+" "+t._s(t.foundGroup.GroupName))])])],1):t._e(),t._v(" "),null!==t.foundGroup?i("b-row",[i("b-col",{attrs:{id:"classWrapper"}},[t._l(t.foundGroup.StudentDatas,(function(e,n){return i("b-list-group",{key:e.AulaStudentId,class:t.setHoverStudentCssClass(n),on:{mousemove:function(e){return t.setHoverStudent(n)},mouseout:t.resetHoverStudentCssClass,click:function(i){return t.setActiveStudent(n,e)}}},[i("b-list-group-item",{attrs:{id:"pupilItem"},domProps:{textContent:t._s(e.FullName)}})],1)})),t._v(" "),0===t.foundGroup.StudentDatas.length?i("div",{attrs:{align:"center"}},[t._v(t._s(t.translations.noStudentsInGroupFound))]):t._e()],2)],1):t._e()],1),t._v(" "),i("b-container",[null!==t.foundPerson&&t.foundPerson.AliasFullName?i("b-row",[i("b-col",[i("b-alert",{attrs:{show:"",variant:"warning"}},[i("p",[t._v(t._s(t.translations.aliasText)+t._s(t.foundPerson.AliasFullName))])])],1)],1):t._e(),t._v(" "),null!==t.foundPerson?i("b-row",[i("b-col",[i("h5",[t._v(t._s(t.translations.pupilText))])])],1):t._e(),t._v(" "),i("b-row",[i("b-col",[null!==t.foundPerson?i("b-table",{attrs:{striped:"",hover:"",fields:t.personSearchFields,items:[t.foundPerson]}}):t._e()],1)],1),t._v(" "),"search"!==t.currentMode||t.isClassWithoutCaseFound?t._e():i("b-row",[i("b-col",[i("div",{staticClass:"labelWithSpinner"},[i("h5",t._g({class:[this.documentLoading?"":"showPointer",this.isClassFound?"classText":""]},this.documentLoading?{}:{click:function(){return e.refreshDocuments()}}),[t._v(t._s(this.documentsHeader))]),t._v(" "),t.documentLoading&&null!==t.selectedMunicipalityId?i("div",{staticClass:"recentDocumentInfo"},[i("b-spinner",{staticClass:"align-middle"}
1)],1):t._e()])])],1),t._v(" "),null!==t.selectedMunicipalityId&&t.isStudentOrClassFound&&"search"===t.currentMode?i("b-row",[i("b-col",[t.loadingMyRecentDocuments||0===t.sortOptions.length||!t.anyDocumentsPresent?i("b-form-select",{attrs:{disabled:"",options:t.sortOptions},model:{value:t.selectedSortOption,callback:function(e){t.selectedSortOption=e},expression:"selectedSortOption"}}):i("b-form-select",{attrs:{options:t.sortOptions},model:{value:t.selectedSortOption,callback:function(e){t.selectedSortOption=e},expression:"selectedSortOption"}})],1),t._v(" "),i("b-col",[t.loadingMyRecentDocuments||0===t.documentFilterOptions.length||!t.anyDocumentsPresent?i("b-form-select",{attrs:{disabled:"",options:t.documentFilterOptions},model:{value:t.documentFilterOption,callback:function(e){t.documentFilterOption=e},expression:"documentFilterOption"}}):i("b-form-select",{attrs:{options:t.documentFilterOptions},model:{value:t.documentFilterOption,callback:function(e){t.documentFilterOption=e},expression:"documentFilterOption"}})],1)],1):t._e(),t._v(" "),null!==t.selectedMunicipalityId&&t.isStudentOrClassFound&&"search"===t.currentMode?i("b-row",[i("b-container",[i("b-row",[i("b-col",[i("div",{staticClass:"input-group search-input-group",attrs:{role:"group"}},[i("b-form-input",{staticClass:"form-control",attrs:{type:"text",id:"documentSearchForm",placeholder:t.translations.documentSearchPhrasePlaceholder,disabled:t.loadingMyRecentDocuments||!t.anyDocumentsPresent,autocomplete:"off"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.reloadDocuments(1)}},model:{value:t.documentSearchPhrase,callback:function(e){t.documentSearchPhrase=e},expression:"documentSearchPhrase"}}),t._v(" "),i("span",{directives:[{name:"show",rawName:"v-show",value:null!==t.selectedMunicipalityId&&t.searchData.length>0,expression:"selectedMunicipalityId !== null && searchData.length > 0"}],staticClass:"icon-Aula_search"})],1)])],1)],1)],1):t._e(),t._v(" "),0===t.recentDocumentsItems.length&&"search"===t.currentMode?i("b-row",[i("b-col",{attrs:{align:"center"}},[null===t.selectedMunicipalityId?i("div",[t._v(t._s(t.translations.errors.membershipNotPicked))]):t.loadingMyRecentDocuments?i("b-spinner",{staticClass:"align-middle"}):t.recentDocumentsFail?i("h5",{staticClass:"error"},[t._v(t._s(t.translations.errors.generic))]):0===t.recentDocumentsItems.length?i("div",[t._v(t._s(t.translations.noDocumentsFound))]):t._e()],1)],1):t._e(),t._v(" "),null===t.selectedMunicipalityId||"search"!==t.currentMode||t.isClassWithoutCaseFound?t._e():i("b-row",[i("b-col",[t.recentDocumentsItems.length>0?i("b-table",{attrs:{striped:"",hover:"",items:t.recentDocumentsItems,fields:t.recentDocumentsFields,"tbody-tr-class":t.recentDocumentsRowClass},on:{"row-clicked":t.openLink},scopedSlots:t._u([t._l(t.getEditableBoolRecentDocumentFields,(function(e){return{key:"cell("+e.key+")",fn:function(e){return[i("div",{staticClass:"checkboxContainer",on:{click:function(e){e.stopPropagation()}}},[null!=e.value&&""!==e.value?i("b-form-checkbox",{class:t.isRecentDocumentUpdatePropertyInProgress(e)?"showNotAllowed":"",attrs:{disabled:t.isRecentDocumentUpdatePropertyInProgress(e),switch:"",checked:!!+e.value},on:{change:function(n){return t.switchBoolDocumentProperty(e,n)}}}):t._e()],1)]}}}))],null,!0)}):t._e()],1)],1),t._v(" "),null!==t.selectedMunicipalityId&&t.isStudentOrClassFound&&!0!==t.loadingMyRecentDocuments&&null!==t.currentPage&&0!==t.recentDocumentsItems.length&&!0!==t.recentDocumentsFail&&"search"===t.currentMode?i("b-row",[i("b-col",{attrs:{align:"left"}},[null!==t.currentPage&&1!==t.currentPage?i("i",t._g({staticClass:"fas fa-arrow-alt-circle-left",class:[this.documentLoading?"showNotAllowed":"showPointer"]},this.documentLoading?{}:{click:function(){return t.reloadDocuments(t.currentPage-1)}})):t._e()]),t._v(" "),i("b-col",{attrs:{align:"center"}},[t._v(t._s(t.currentPage))]),t._v(" "),i("b-col",{attrs:{align:"right"}},[null!==t.currentPage&&!0!==t.isPageLast?i("i",t._g({staticClass:"fas fa-arrow-alt-circle-right",class:[this.documentLoading?"showNotAllowed":"showPointer"]},this.documentLoading?{}:{click:function(){return t.reloadDocuments(t.currentPage+1)}})):t._e()])],1):t._e()],1),t._v(" "),"create"===t.currentMode?i("b-container",[i("b-row",[i("b-col",{staticClass:"text-center",class:[this.isClassFound?"classText":""]},[i("h5",[t._v(t._s(t.translations.createDocumentTitleText))])])],1
1),t._v(" "),i("b-row",[i("b-col",[i("b-alert",{attrs:{variant:"success",dismissible:""},model:{value:t.showSuccessAlert,callback:function(e){t.showSuccessAlert=e},expression:"showSuccessAlert"}},[i("p",{staticClass:"success"},[t._v(t._s(t.successAlertMessage))])])],1)],1),t._v(" "),i("b-row",[i("b-col",[i("h5",[t._v("\n                  "+t._s(t.translations.selectedTemplateTypeText)+"\n                  "),t.loadingTemplates?i("b-spinner",{staticClass:"align-middle"}):t._e()],1)])],1),t._v(" "),i("b-row",[i("b-col",[t.loadingTemplates||0===t.aulaTemplateTypes.length?i("b-form-select",{attrs:{disabled:"",options:t.aulaTemplateTypes},model:{value:t.selectedTemplateType,callback:function(e){t.selectedTemplateType=e},expression:"selectedTemplateType"}}):i("b-form-select",{attrs:{options:t.aulaTemplateTypes},model:{value:t.selectedTemplateType,callback:function(e){t.selectedTemplateType=e},expression:"selectedTemplateType"}})],1)],1),t._v(" "),t.filteredDocumentTemplates.length>0?i("b-row",[i("b-col",[i("h5",[t._v("\n                  "+t._s(t.translations.documentTemplatesText)+"\n                ")])])],1):t._e(),t._v(" "),t.loadingTemplates||0!==t.aulaTemplateTypes.length?t._e():i("b-row",[i("b-col",{staticClass:"error recentDocumentInfo inline text-center"},[t._v("\n                "+t._s(t.translations.errors.noTemplates)+"\n              ")])],1),t._v(" "),t.filteredDocumentTemplates.length>0?i("b-row",[i("b-col",{attrs:{id:"classWrapper"}},t._l(t.filteredDocumentTemplates,(function(e,n){return i("b-list-group",{key:e.Name,class:t.activeTemplateCssClass(n),on:{click:function(i){return t.setActiveTemplate(n,e)}}},[i("b-list-group-item",{attrs:{id:"pupilItem"},domProps:{textContent:t._s(e.Name)}})],1)})),1)],1):t._e(),t._v(" "),t.filteredDocumentTemplates.length>0?i("b-row",[i("b-col",[i("h5",[t._v("\n                  "+t._s(t.translations.fileNameText)+"\n                  "),t.isCreationInProgress?i("b-spinner",{staticClass:"align-middle recentDocumentInfo inline"}):t._e(),t._v(" "),!1===t.isCreationSuccess?i("div",{staticClass:"recentDocumentInfo inline error"},[t._v(t._s(t.translations.errors.generic))]):t._e(),t._v(" "),!0===t.isCreationSuccess?i("div",{staticClass:"recentDocumentInfo inline success"},[t._v(t._s(t.translations.creationSuccess))]):t._e()],1)])],1):t._e(),t._v(" "),t.filteredDocumentTemplates.length>0?i("b-row",[i("b-col",[null===t.pickedDocumentTemplate?i("b-form-input",{attrs:{disabled:""}}):i("b-form-input",{on:{keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.saveTemplateDocument.apply(null,arguments)},input:t.onChangeDocumentName},model:{value:t.createDocumentNewTitle,callback:function(e){t.createDocumentNewTitle=e},expression:"createDocumentNewTitle"}})],1)],1):t._e(),t._v(" "),this.documentNameContainsIllegalCharacter?i("b-row",[i("b-col",[i("div",{staticClass:"recentDocumentInfo error illegalCharactersInfo"},[t._v("\n                  "+t._s(t.translations.errors.nameContainsIllegalCharacters)+"\n                ")])])],1):t._e(),t._v(" "),this.documentNameIsTooLong?i("b-row",[i("b-col",[i("div",{staticClass:"recentDocumentInfo error illegalCharactersInfo"},[t._v("\n                  "+t._s(t.translations.errors.documentNameIsTooLong)+"\n                ")])])],1):t._e(),t._v(" "),t.filteredDocumentTemplates.length>0&&null!=t.getEditableBoolRecentDocumentFields&&t.getEditableBoolRecentDocumentFields.length>0?i("div",[i("b-row",[i("b-col",[i("h5",[t._v("\n                    "+t._s(t.translations.documentPropertiesText)+"\n                  ")])])],1),t._v(" "),i("b-row",[i("b-col",[i("b-table",{attrs:{fields:t.createUploadDocumentPropertiesFields,items:t.getEditableBoolRecentDocumentFields,"thead-class":"hideHeader","tbody-tr-class":"disablePointerEvents"},scopedSlots:t._u([{key:"cell(Value)",fn:function(e){var n=e.item;return[i("div",{staticClass:"checkboxContainer"},[i("b-form-checkbox",{attrs:{switch:"",checked:!1},on:{change:function(e){return t.setNewValueForRecentDocumentField(n,e)}}})],1)]}}],null,!1,1649804735)})],1)],1)],1):t._e(),t._v(" "),i("b-row",{attrs:{"align-h":"around"}},[i("b-col",{attrs:{cols:"4",align:"center"}},[null===t.pickedDocumentTemplate||t.isCreationInProgress||-1===t.currentTemplateIndex||t.isCreationSuccess||t.documentNameContainsIllegalCharacter||t.documentNameIsTooLong?i("b-button",{attrs:{variant:"primary",disabled:""}}
1,[t._v(t._s(t.translations.saveAndOpenButtonText))]):i("b-button",{attrs:{variant:"primary"},on:{click:t.saveTemplateDocument,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.saveTemplateDocument.apply(null,arguments)}}},[t._v(t._s(t.translations.saveAndOpenButtonText))])],1),t._v(" "),i("b-col",{attrs:{cols:"4",align:"center"}},[i("b-button",{attrs:{variant:"secondary"},on:{click:function(e){return t.goBackToSearch(!0)}}},[t._v(t._s(t.translations.goBackButtonText))])],1)],1)],1):t._e(),t._v(" "),"upload"===t.currentMode?i("b-container",[i("b-row",[i("b-col",{staticClass:"text-center",class:[this.isClassFound?"classText":""]},[i("h5",[t._v(t._s(t.translations.openUploadDocumentModeText))])])],1),t._v(" "),i("b-row",[i("b-col",[i("div",[t.loadingTemplates||0===t.aulaTemplateTypes.length?i("b-form-file",{attrs:{disabled:"",state:Boolean(t.file),placeholder:t.translations.uploadPlaceholderText,"drop-placeholder":t.translations.uploadDropPlaceholderText,"browse-text":"Gennemse"},on:{input:t.setUploadedDocumentName},model:{value:t.file,callback:function(e){t.file=e},expression:"file"}}):i("b-form-file",{attrs:{state:Boolean(t.file),placeholder:t.translations.uploadPlaceholderText,"drop-placeholder":t.translations.uploadDropPlaceholderText,"browse-text":"Gennemse"},on:{input:t.setUploadedDocumentName},model:{value:t.file,callback:function(e){t.file=e},expression:"file"}})],1)])],1),t._v(" "),i("b-row",[i("b-col",[i("div",{staticClass:"mt-3 bold"},[t._v(t._s(t.translations.selectedFileText))])])],1),t._v(" "),i("b-row",[i("b-col",[i("div",[t._v(t._s(t.file?t.file.name:t.translations.noFileSelectedText))])])],1),t._v(" "),i("b-row",[i("b-col",[i("div",{staticClass:"mt-3 bold"},[i("div",{staticClass:"inline"},[t._v(t._s(t.translations.selectedTemplateTypeText))]),t._v(" "),t.loadingTemplates?i("div",{staticClass:"align-middle recentDocumentInfo inline"},[i("b-spinner",{staticClass:"align-middle"})],1):t._e(),t._v(" "),t.loadingTemplates||0!==t.aulaTemplateTypes.length?t._e():i("div",{staticClass:"error recentDocumentInfo inline"},[t._v(t._s(t.translations.errors.noTemplates))])])])],1),t._v(" "),i("b-row",[i("b-col",[null===t.file||t.loadingTemplates||0===t.aulaTemplateTypes.length?i("b-form-select",{attrs:{disabled:"",options:t.aulaTemplateTypes},model:{value:t.selectedTemplateType,callback:function(e){t.selectedTemplateType=e},expression:"selectedTemplateType"}}):i("b-form-select",{attrs:{options:t.aulaTemplateTypes},on:{input:t.onChangeDocumentName},model:{value:t.selectedTemplateType,callback:function(e){t.selectedTemplateType=e},expression:"selectedTemplateType"}})],1)],1),t._v(" "),i("b-row",[i("b-col",[i("h5",[t._v("\n                  "+t._s(t.translations.fileNameText)+"\n                  "),t.isUploadInProgress?i("b-spinner",{staticClass:"align-middle recentDocumentInfo inline"}):t._e(),t._v(" "),!1===t.isUploadSuccess?i("div",{staticClass:"recentDocumentInfo inline error"},[t._v(t._s(t.translations.uploadFail))]):t._e(),t._v(" "),!0===t.isUploadSuccess?i("div",{staticClass:"recentDocumentInfo inline success"},[t._v(t._s(t.translations.uploadSuccess))]):t._e()],1)])],1),t._v(" "),i("b-row",[i("b-col",[null===t.file?i("b-form-input",{attrs:{disabled:""}}):i("b-form-input",{on:{input:t.onChangeDocumentName},model:{value:t.createDocumentNewTitle,callback:function(e){t.createDocumentNewTitle=e},expression:"createDocumentNewTitle"}})],1)],1),t._v(" "),this.documentNameContainsIllegalCharacter?i("b-row",[i("b-col",[i("div",{staticClass:"recentDocumentInfo error illegalCharactersInfo"},[t._v("\n                  "+t._s(t.translations.errors.nameContainsIllegalCharacters)+"\n                ")])])],1):t._e(),t._v(" "),this.documentNameIsTooLong?i("b-row",[i("b-col",[i("div",{staticClass:"recentDocumentInfo error illegalCharactersInfo"},[t._v("\n                  "+t._s(t.translations.errors.documentNameIsTooLong)+"\n                ")])])],1):t._e(),t._v(" "),null!=t.getEditableBoolRecentDocumentFields&&t.getEditableBoolRecentDocumentFields.length>0?i("div",[i("b-row",[i("b-col",[i("h5",[t._v("\n                    "+t._s(t.translations.documentPropertiesText)+"\n                  ")])])],1),t._v(" "),i("b-row",[i("b-col",[i("b-table",{attrs:{fields:t.createUploadDocumentPropertiesFields,items:t.getEditableBoolRecentDocumentFields,"thead-class":"hideHeader","tbody-tr-class":"disablePointerEvents"},scopedSlots:t._u([{key:"cell(Value)",fn:function(e){var n=e.item;return[i("div",{staticClass:"checkboxContainer"},[i("b-form-checkbox",{attrs:{switch:"",checked:!1}
1,on:{change:function(e){return t.setNewValueForRecentDocumentField(n,e)}}})],1)]}}],null,!1,1649804735)})],1)],1)],1):t._e(),t._v(" "),i("b-row",{attrs:{"align-h":"around"}},[i("b-col",{attrs:{cols:"4",align:"center"}},[null===t.file||t.isUploadInProgress||!t.aulaTemplateTypes||null===t.selectedTemplateType||t.isUploadSuccess||t.documentNameContainsIllegalCharacter||t.documentNameIsTooLong?i("b-button",{attrs:{variant:"primary",disabled:""}},[t._v(t._s(t.translations.saveButtonText))]):i("b-button",{attrs:{variant:"primary"},on:{click:t.uploadDocument,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.uploadDocument.apply(null,arguments)}}},[t._v(t._s(t.translations.saveButtonText))])],1),t._v(" "),i("b-col",{attrs:{cols:"4",align:"center"}},[i("b-button",{attrs:{variant:"secondary"},on:{click:function(e){return t.goBackToSearch(!0)}}},[t._v(t._s(t.translations.goBackButtonText))])],1)],1)],1):t._e(),t._v(" "),"search"===t.currentMode?i("b-container",[i("b-row",{attrs:{"align-h":"around"}},[i("b-col",{ref:"createDocumentRef",attrs:{cols:"4",align:"center"}},[this.isStudentOrClassFound?i("b-button",{attrs:{variant:"primary"},on:{click:t.createDocument}},[t._v(t._s(t.translations.createDocumentButtonText))]):i("b-button",{attrs:{variant:"primary",disabled:""}},[t._v(t._s(t.translations.createDocumentButtonText))])],1),t._v(" "),i("b-col",{attrs:{cols:"4",align:"center"}},[this.isStudentOrClassFound?i("b-button",{attrs:{variant:"primary"},on:{click:t.openUploadDocumentMode}},[t._v(t._s(t.translations.openUploadDocumentModeButtonText))]):i("b-button",{attrs:{variant:"primary",disabled:""}},[t._v(t._s(t.translations.openUploadDocumentModeButtonText))])],1)],1)],1):t._e()],1)],1):t._e()],1)],1):t._e()])}),[],!1,null,null,null);t.a=h.exports},853:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,moment:Function,assuranceLevel:Number,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,who:"Aula widget developers",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,open:!1,domain:i,fields:{},item:{Binder:{Tile:{}}}}},methods:{getColor:function(e){return"background-color:"+(0==e?this.item.Binder.Tile.Inspection.InspectionSelectedType.ActionTypeList[0].Color:this.item.Binder.Tile.Inspection.InspectionSelectedType.ActionTypeList[e-1].Color)},getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/INTileGet/36",{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.moment.locale("da"),e.item=t.data,s(e),0==e.item.Binder.Tile.Inspection.length&&(e.section="nodata",e.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(t){s(e)})).finally((function(){return e.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile||null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}},loginURL:function(){return i+"/Login?ReturnUrl="+encodeURIComponent(location.href)}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#96be2c"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-clipboard"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[null!=e.item.Binder.Tile.Inspection.InspectionId?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-accordeon-row",staticStyle:{border:"none","background-color":"#FAFAFA"}},[n("div",{staticStyle:{display:"flex","align-items":"center","padding-left":"15px","padding-bottom":"20px"}},[n("div",{staticClass:"icon-calendar-green",staticStyle:{padding:"20px 10px 0 20px"}}),e._v(" "),null!=e.item.Binder.Tile.Inspection.InspectionId?n("div",{staticClass:"infoba-link",staticStyle:{"font-size":"16px",color:"#555555 !important"},on:{click:function(t){return e.goto(e.domain+"/IN/Inspection/Index/"+e.item.Binder.Tile.Inspection.InstitutionId)}}},[n("b",[e._v(e._s(e.moment(e.item.Binder.Tile.Inspection.VisitDate).format("DD. MMMM. ")))]),e._v(" "+e._s(e.moment(e.item.Binder.Tile.Inspection.VisitDate).format("YYYY"))+"\n            ")]):e._e(
1)])])]):e._e(),e._v(" "),0!=e.item.Binder.Tile.Inspection.DevelopmentPointList.length?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticStyle:{color:"#555555"}},[n("b",[e._v(e._s(e.item.Binder.Tile.TileSettings.InstitutionSettings.InspectionDevelopmentPointNamePlural))])])]),e._v(" "),0!=e.item.Binder.Tile.Inspection.DevelopmentPointList.length?n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:e.open},staticStyle:{cursor:"pointer"},on:{click:function(t){e.open=!e.open}}}):e._e()]):e._e(),e._v(" "),0==e.item.Binder.Tile.Inspection.DevelopmentPointList.length&&null==e.item.Binder.Tile.Inspection.InspectionId?n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[e._v("\n        Vi har ikke noget relevant data at vise dig.\n      ")]):e._e(),e._v(" "),n("div",[e._l(e.item.Binder.Tile.Inspection.DevelopmentPointList,(function(t){return[n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}]},[n("div",{staticClass:"infoba-accordeon-row",staticStyle:{"padding-left":"24px","padding-right":"20px","align-items":"center"}},[n("div",{staticStyle:{cursor:"pointer"},on:{click:function(n){return e.goto(e.domain+"/IN/Inspection/ActionPlan/"+t.ActionPlanRef.ActionPlanId+"?devPointId="+t.DevelopmentPointId+"&institutionId="+t.InstitutionId+"&inspectionId="+t.InspectionId)}}},[n("b",[e._v(e._s(t.Title))])]),e._v(" "),n("div",{staticClass:"icon-status-dot",style:e.getColor(t.ActionPlanRef.Status)})]),e._v(" "),n("div",{staticClass:"infoba-accordeon-row infoba-gray",staticStyle:{"padding-left":"24px","padding-right":"20px","align-items":"center"}},[n("div",[n("b",[e._v("Frist:")]),e._v(" "+e._s(e.moment(t.ClosingDate).format("DD. MMM. YYYY")))]),e._v(" "),n("div",[e._v(e._s(e.item.Binder.Tile.Inspection.InspectionSelectedType.SeverityList[t.SeverityId].Name))])])])])]}))],2)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"background-color":"#FAFAFA","font-size":"12px",color:"#888888"}},[n("div",[e._v("Næste tilsyn")])])}],!1,null,"256b114a",null);t.a=o.exports},854:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.DigitalSuitcase?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData(!0)}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,moment:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,domain:i,message:"",timer:"",headerLink:i,section:"default",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,isClass:!0,selectedId:0,headers:[],item:{Binder:{DigitalSuitcase:{}}}}},methods:{getData:function(e){var t=this;this.isClass=!!e;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="DigitalSchoolSuitcase",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),""!=this.selectedid&&null!=this.selectedid||(this.selectedid=0),this.axios.get(i+"/api/Aula/DigitalSchoolSuitcase?isClass="+(this.isClass?"true":"false")+"&id="+this.selectedId,{withCredentials:!0,credentials:"same-origin"}).then((function(n){t.moment.locale("da"),t.item=n.data,s(t),null!=t.item.Binder.DigitalSuitcase?e?t.groupByInstitutionId():t.groupByClassId():t.item.Binder.DigitalSuitcase={DigitalSchoolSuitCaseInstitutionsSelectList:[]}})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},groupByClassId:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList.length;n++)-1===t.indexOf(this.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList[n].ClassId)&&t.pu
1sh(this.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList[n].ClassId);for(var i=function(n){e.headers.push({Open:!1,ClassId:t[n],ClassName:e.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList.filter((function(e){return e.ClassId==t[n]}))[0].ClassName,Count:e.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList.filter((function(e){return e.ClassId==t[n]})).length,ChildList:e.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList.filter((function(e){return e.ClassId==t[n]}))})},s=0;s<t.length;s++)i(s)},groupByInstitutionId:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList.length;n++)-1===t.indexOf(this.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList[n].ParentInstitutionId)&&t.push(this.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList[n].ParentInstitutionId);for(var i=function(n){e.headers.push({Open:!1,InstitutionId:t[n],InstitutionName:e.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList.filter((function(e){return e.ParentInstitutionId==t[n]}))[0].InstitutionName,Count:e.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList.filter((function(e){return e.ParentInstitutionId==t[n]})).length,ChildList:e.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseList.filter((function(e){return e.ParentInstitutionId==t[n]}))})},s=0;s<t.length;s++)i(s)}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!0)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):e._e(),e._v(" "),n("section",{directives:[{name:"show",rawName:"v-show",value:"default"==e.section&&!e.loading,expression:"section=='default' && !loading"}]},[n("div",{},[n("div",{staticClass:"wrapper"}),e._v(" "),n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-briefcase-account"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain+"/School/DigitalSchoolSuitcase/SuitcaseDistributionInstitutionsList")}}},[e._v("\n            Digital skolekuffert\n          ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"tab-container"},[n("div",{staticClass:"tab-item",class:{active:e.isClass},on:{click:function(t){e.selectedId=0,e.getData(!0)}}},[e._v("\n          Klasse\n        ")]),e._v(" "),n("div",{staticClass:"tab-item",class:{active:!e.isClass},on:{click:function(t){e.selectedId=0,e.getData(!1)}}},[e._v("\n          Børnehave\n        ")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isClass,expression:"isClass"}],staticClass:"infoba-quick-access-item"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedId>0,expression:"selectedId>0"}],staticStyle:{"font-weight":"bold","margin-top":"5px","margin-bottom":"5px"}},[e._v("\n          Børn til klasse\n        ")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedId<=0,expression:"selectedId<=0"}],staticStyle:{"font-weight":"bold","margin-top":"5px","margin-bottom":"5px"}},[e._v("\n          Vælg klasse\n        ")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedId,expression:"selectedId"}],staticClass:"multiselect",attrs:{id:"classes"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,
1(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedId=t.target.multiple?n:n[0]},function(t){return e.getData(!0)}]}},e._l(e.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseClassesSelectList,(function(t){return n("option",{domProps:{value:t.Value}},[e._v("\n            "+e._s(t.Text)+"\n          ")])})),0)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.isClass,expression:"!isClass"}],staticClass:"infoba-quick-access-item"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedId>0,expression:"selectedId>0"}],staticStyle:{"font-weight":"bold","margin-top":"5px","margin-bottom":"5px"}},[e._v("\n          Børn fra børnehave\n        ")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedId<=0,expression:"selectedId<=0"}],staticStyle:{"font-weight":"bold","margin-top":"5px","margin-bottom":"5px"}},[e._v("\n          Vælg børnehave\n        ")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedId,expression:"selectedId"}],staticClass:"multiselect",attrs:{id:"institutions"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedId=t.target.multiple?n:n[0]},function(t){return e.getData(!1)}]}},e._l(e.item.Binder.DigitalSuitcase.DigitalSchoolSuitCaseInstitutionsSelectList,(function(t){return n("option",{domProps:{value:t.Value}},[e._v("\n            "+e._s(t.Text)+"\n          ")])})),0)]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item",staticStyle:{"padding-top":"0"}},[e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}},[n("div",{staticClass:"theme-circle"},[e._v("\n              "+e._s(t.Count)+"\n            ")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.isClass,expression:"!isClass"}],staticStyle:{width:"70%"}},[n("p",{staticClass:"ellipsis"},[n("b",[e._v(e._s(t.ClassName))])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isClass,expression:"isClass"}],staticStyle:{width:"70%"}},[n("p",{staticClass:"ellipsis"},[n("b",[e._v(e._s(t.InstitutionName))])])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open}})]),e._v(" "),e._l(t.ChildList,(function(i){return[n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"h.Open"}],staticClass:"infoba-accordeon-row",staticStyle:{padding:"0px"}},[n("div",{staticStyle:{display:"flex","flex-grow":"1"}},[n("div",{staticClass:"child-circle",staticStyle:{margin:"16px 10px 10px 10px"}},[n("div",{staticClass:"whiteCircle",staticStyle:{"vertical-align":"middle","text-align":"center"}},[n("img",{staticClass:"pictureCircle",attrs:{src:e.domain+"/images/icons/childFace.png"}})])]),e._v(" "),n("div",{staticStyle:{width:"70%"}},[n("div",{staticStyle:{"margin-top":"22px"}},[i.LockedBySystem&&i.Consent&&e.moment(i.SuitcaseDate,"DD-MM-YYYY").add(1,"year").diff(i.CreatedDate,"days")>0?n("div",{staticClass:"infoba-link",on:{click:function(t){return e.goto(e.domain+"/School/DigitalSchoolSuitcase/DownloadFile/"+i.DocumentId+"?childName="+i.ChildName+"&viewName=SuitcaseDistributionInstitutions&dataId="+e.selectedId)}}},[n("p",{staticClass:"ellipsis",staticStyle:{"padding-bottom":"0px"}},[n("b",[e._v(e._s(i.ChildName))])])]):n("div",[n("p",{staticClass:"ellipsis",staticStyle:{"padding-bottom":"0px"}},[n("b",[e._v(e._s(i.ChildName))])])]),e._v(" "),n("p",{staticStyle:{color:"#ccc","padding-top":"0px"}},[e._v("\n                        "+e._s(i.ChildAge)+"\n                      ")])])])])])])]}))]}))],2)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"icon-rotator infoba-rotate"})])}],!1,null,"4aa84e3e",null);t.a=o.exports},855:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{SpfTile:{ChildList:[]},TrvslTile:{ChildList:[]}}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)}},methods:{statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=124,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),124==t.tileType?t.tile=t.item.Binder.Tile.TrvslTile:t.tile=t.item.Binder.Tile.SpfTile,t.groupByDates(t.tileType),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}
1,dismissReminder:function(e,t){var n=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(i+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<n.tile.ReminderList.length;t++)n.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&n.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(n)})).finally((function(){return n.loading=!1}))},groupByDates:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.tile.ChildList.length;n++)-1===t.indexOf(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"))&&t.push(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"));for(var i=function(n){e.headers.push({Open:!1,Month:t[n],Count:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]})).length,ChildList:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=e.tileType?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==e.tileType?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[124!=e.tileType?n("div",[e.tile.ReminderList.length?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(e.item.Binder.Tile.SpfTile.ReminderList,(function(t){return n("div",{key:t.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(e.item.Binder.Tile.Header)+" "+e._s(t.Description)+" ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+t.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(t.ChildName)+"\n                  ")])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(n){return e.dismissReminder(t.ReminderId,t.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("i",{staticClass:"fas fa-bell-slash icon-bell-off"})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n              "+e._s(t.Count)+"\n            ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(t.Month))))]),e._v(e._s(e._f("getYear")(t.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(t.ChildList,(function(i){return[n("transition",{key:i.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[124!=e.tileType?n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]):n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+i.ChildId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]),e._v(" "),124!=e.tileType?n("span",{class:"none"!=i.Reminder?"icon-alarm-"+i.Reminder:""},[n("i",{class:"none"!=i.Reminder?"far fa-alarm-clock":""}
1)]):e._e(),e._v(" "),124==e.tileType?n("span",{class:e.statusColor(i.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})]):e._e()])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("PÃ¥mindelse")])])])])}],!1,null,"af7d2b8e",null);t.a=o.exports},856:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{SpfTile:{ChildList:[]},TrvslTile:{ChildList:[]}}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)}},methods:{statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=24,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),124==t.tileType?t.tile=t.item.Binder.Tile.TrvslTile:t.tile=t.item.Binder.Tile.SpfTile,t.groupByDates(t.tileType),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}
1,dismissReminder:function(e,t){var n=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(i+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<n.tile.ReminderList.length;t++)n.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&n.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(n)})).finally((function(){return n.loading=!1}))},groupByDates:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.tile.ChildList.length;n++)-1===t.indexOf(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"))&&t.push(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"));for(var i=function(n){e.headers.push({Open:!1,Month:t[n],Count:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]})).length,ChildList:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=e.tileType?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==e.tileType?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[124!=e.tileType?n("div",[e.tile.ReminderList.length?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(e.item.Binder.Tile.SpfTile.ReminderList,(function(t){return n("div",{key:t.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(e.item.Binder.Tile.Header)+" "+e._s(t.Description)+" ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+t.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(t.ChildName)+"\n                  ")])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(n){return e.dismissReminder(t.ReminderId,t.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("i",{staticClass:"fas fa-bell-slash icon-bell-off"})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n              "+e._s(t.Count)+"\n            ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(t.Month))))]),e._v(e._s(e._f("getYear")(t.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(t.ChildList,(function(i){return[n("transition",{key:i.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[124!=e.tileType?n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]):n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+i.ChildId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]),e._v(" "),124!=e.tileType?n("span",{class:"none"!=i.Reminder?"icon-alarm-"+i.Reminder:""},[n("i",{class:"none"!=i.Reminder?"far fa-alarm-clock":""}
1)]):e._e(),e._v(" "),124==e.tileType?n("span",{class:e.statusColor(i.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})]):e._e()])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("PÃ¥mindelse")])])])])}],!1,null,"000f961c",null);t.a=o.exports},857:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{SpfTile:{ChildList:[]},TrvslTile:{ChildList:[]}}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)}},methods:{statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=28,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),124==t.tileType?t.tile=t.item.Binder.Tile.TrvslTile:t.tile=t.item.Binder.Tile.SpfTile,t.groupByDates(t.tileType),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}
1,dismissReminder:function(e,t){var n=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(i+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<n.tile.ReminderList.length;t++)n.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&n.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(n)})).finally((function(){return n.loading=!1}))},groupByDates:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.tile.ChildList.length;n++)-1===t.indexOf(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"))&&t.push(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"));for(var i=function(n){e.headers.push({Open:!1,Month:t[n],Count:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]})).length,ChildList:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=e.tileType?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==e.tileType?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[124!=e.tileType?n("div",[e.tile.ReminderList.length?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(e.item.Binder.Tile.SpfTile.ReminderList,(function(t){return n("div",{key:t.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(e.item.Binder.Tile.Header)+" "+e._s(t.Description)+" ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+t.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(t.ChildName)+"\n                  ")])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(n){return e.dismissReminder(t.ReminderId,t.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("i",{staticClass:"fas fa-bell-slash icon-bell-off"})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n              "+e._s(t.Count)+"\n            ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(t.Month))))]),e._v(e._s(e._f("getYear")(t.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(t.ChildList,(function(i){return[n("transition",{key:i.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[124!=e.tileType?n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]):n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+i.ChildId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]),e._v(" "),124!=e.tileType?n("span",{class:"none"!=i.Reminder?"icon-alarm-"+i.Reminder:""},[n("i",{class:"none"!=i.Reminder?"far fa-alarm-clock":""}
1)]):e._e(),e._v(" "),124==e.tileType?n("span",{class:e.statusColor(i.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})]):e._e()])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("PÃ¥mindelse")])])])])}],!1,null,"406d26be",null);t.a=o.exports},858:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{SpfTile:{ChildList:[]},TrvslTile:{ChildList:[]}}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)}},methods:{statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=30,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),124==t.tileType?t.tile=t.item.Binder.Tile.TrvslTile:t.tile=t.item.Binder.Tile.SpfTile,t.groupByDates(t.tileType),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}
1,dismissReminder:function(e,t){var n=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(i+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<n.tile.ReminderList.length;t++)n.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&n.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(n)})).finally((function(){return n.loading=!1}))},groupByDates:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.tile.ChildList.length;n++)-1===t.indexOf(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"))&&t.push(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"));for(var i=function(n){e.headers.push({Open:!1,Month:t[n],Count:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]})).length,ChildList:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=e.tileType?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==e.tileType?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v(e._s(e.item.Binder.Tile.Header))])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[124!=e.tileType?n("div",[e.tile.ReminderList.length?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(e.item.Binder.Tile.SpfTile.ReminderList,(function(t){return n("div",{key:t.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(e.item.Binder.Tile.Header)+" "+e._s(t.Description))]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+t.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(t.ChildName)+"\n                  ")])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(n){return e.dismissReminder(t.ReminderId,t.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("i",{staticClass:"fas fa-bell-slash icon-bell-off"})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v(" "+e._s(t.Count))]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(t.Month))))]),e._v(e._s(e._f("getYear")(t.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(t.ChildList,(function(i){return[n("transition",{key:i.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[124!=e.tileType?n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]):n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+i.ChildId)}}},[e._v(" "+e._s(i.Name)+"\n                  ")]),e._v(" "),124!=e.tileType?n("span",{class:"none"!=i.Reminder?"icon-alarm-"+i.Reminder:""},[n("i",{class:"none"!=i.Reminder?"far fa-alarm-clock":""}
1)]):e._e(),e._v(" "),124==e.tileType?n("span",{class:e.statusColor(i.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})]):e._e()])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("PÃ¥mindelse")])])])])}],!1,null,"733d1b4e",null);t.a=o.exports},859:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{SpfTile:{ChildList:[]},TrvslTile:{ChildList:[]}}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)}},methods:{statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=70,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),124==t.tileType?t.tile=t.item.Binder.Tile.TrvslTile:t.tile=t.item.Binder.Tile.SpfTile,t.groupByDates(t.tileType),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}
1,dismissReminder:function(e,t){var n=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(i+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<n.tile.ReminderList.length;t++)n.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&n.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(n)})).finally((function(){return n.loading=!1}))},groupByDates:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.tile.ChildList.length;n++)-1===t.indexOf(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"))&&t.push(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"));for(var i=function(n){e.headers.push({Open:!1,Month:t[n],Count:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]})).length,ChildList:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=e.tileType?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==e.tileType?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[124!=e.tileType?n("div",[e.tile.ReminderList.length?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(e.item.Binder.Tile.SpfTile.ReminderList,(function(t){return n("div",{key:t.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(e.item.Binder.Tile.Header)+" "+e._s(t.Description)+" ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+t.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(t.ChildName)+"\n                  ")])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(n){return e.dismissReminder(t.ReminderId,t.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("i",{staticClass:"fas fa-bell-slash icon-bell-off"})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n              "+e._s(t.Count)+"\n            ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(t.Month))))]),e._v(e._s(e._f("getYear")(t.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(t.ChildList,(function(i){return[n("transition",{key:i.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[124!=e.tileType?n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]):n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+i.ChildId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]),e._v(" "),124!=e.tileType?n("span",{class:"none"!=i.Reminder?"icon-alarm-"+i.Reminder:""},[n("i",{class:"none"!=i.Reminder?"far fa-alarm-clock":""}
1)]):e._e(),e._v(" "),124==e.tileType?n("span",{class:e.statusColor(i.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})]):e._e()])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("Påmindelse")])])])])}],!1,null,"20591694",null);t.a=o.exports},860:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,moment:Function,assuranceLevel:Number,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,who:"Aula widget developers",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,domain:i,domainOld:"https://www.infoba.dk",fields:{},item:{Binder:{Tile:{}}},headers:[]}},methods:{getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/INTileGet/60",{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.moment.locale("da"),e.item=t.data,s(e),0==e.item.Binder.Tile.LearningPlanV2.ChangesSections.length&&(e.section="nodata",e.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(t){s(e)})).finally((function(){return e.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url,style:"cursor:pointer;"}}},filters:{firstLetter:function(e){return e.charAt(0)}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#425D82"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-book"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[n("div",{staticStyle:{height:"auto"}},[e._l(e.item.Binder.Tile.LearningPlanV2.ChangesSections,(function(t){return[n("div",{staticClass:"infoba-accordeon-row",staticStyle:{"padding-top":"0","margin-bottom":"7px"}},[n("div",{staticStyle:{padding:"16px"}},[n("p",{staticStyle:{"margin-bottom":"0px",color:"#888888","font-size":"12px"}},[e._v("\n                "+e._s(e.moment(t.UpdatedDate).format("DD.MMM.YYYY"))+"\n              ")]),e._v(" "),n("p",{staticClass:"ellipsis",staticStyle:{"margin-bottom":"0px"}},[n("b",[e._v(e._s(t.SectionName))])])])])]}))],2)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])}],!1,null,"0a27feca",null);t.a=o.exports},861:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,assuranceLevel:Number,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,aulaToken:null,domain:i,fields:{},item:{Binder:{Tile:{ProjectPlan:{ProjectList:[]}}}},headers:[]}},methods:{getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/INTileGet/40",{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.item=t.data,s(e),e.groupByProject()})).catch((function(t){s(e)})).finally((function(){return e.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},groupByProject:function(){for(var e=0;e<this.item.Binder.Tile.ProjectPlan.ProjectList.length;e++)this.headers.push({Open:!1,Project:this.item.Binder.Tile.ProjectPlan.ProjectList[e]})},goToUrl:function(e){""!=e&&(window.location.href=e)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url,style:"cursor:pointer;"}}},filters:{firstLetter:function(e){return e.charAt(0)}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#873C79"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fas fa-list"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          Læringsplatform\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[n("div",{staticStyle:{height:"auto"}},[e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center",width:"100%"}},[n("div",{staticClass:"theme-circle"},[e._v("\n                "+e._s(t.Project.ActivityList.length)+"\n              ")]),e._v(" "),n("widget-html",{staticClass:"ellipsis",staticStyle:{cursor:"pointer",width:"80%","font-weight":"bold"},attrs:{html:t.Project.Name},on:{click:function(n){return e.goto(e.domain+"/IN/ProjectPlan/ProjectView/"+t.Project.ProjectId)}}}
1)],1),e._v(" "),t.Project.ActivityList.length>0?n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}}):e._e()]),e._v(" "),n("div",[e._l(t.Project.ActivityList,(function(i){return[n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"project.Open"}],staticClass:"infoba-accordeon-row",staticStyle:{border:"none","padding-left":"58px","padding-right":"45px"}},[n("div",{staticClass:"ellipsis",staticStyle:{cursor:"pointer",width:"100%"},on:{click:function(n){return e.goto(e.domain+"/IN/ProjectPlan/Activity/"+i.ActivityId+"?pid="+t.Project.ProjectId)}}},[n("widget-html",{attrs:{html:i.Name}})],1)])])]}))],2)]}))],2)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])}],!1,null,"e3c74670",null);t.a=o.exports},862:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{SpfTile:{ChildList:[]},TrvslTile:{ChildList:[]}}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)}},methods:{statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=26,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),124==t.tileType?t.tile=t.item.Binder.Tile.TrvslTile:t.tile=t.item.Binder.Tile.SpfTile,t.groupByDates(t.tileType),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}
1,dismissReminder:function(e,t){var n=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(i+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<n.tile.ReminderList.length;t++)n.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&n.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(n)})).finally((function(){return n.loading=!1}))},groupByDates:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.tile.ChildList.length;n++)-1===t.indexOf(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"))&&t.push(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"));for(var i=function(n){e.headers.push({Open:!1,Month:t[n],Count:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]})).length,ChildList:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=e.tileType?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==e.tileType?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[124!=e.tileType?n("div",[e.tile.ReminderList.length?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(e.item.Binder.Tile.SpfTile.ReminderList,(function(t){return n("div",{key:t.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(e.item.Binder.Tile.Header)+" "+e._s(t.Description)+" ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+t.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(t.ChildName)+"\n                  ")])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(n){return e.dismissReminder(t.ReminderId,t.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("i",{staticClass:"fas fa-bell-slash icon-bell-off"})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n              "+e._s(t.Count)+"\n            ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(t.Month))))]),e._v(e._s(e._f("getYear")(t.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(t.ChildList,(function(i){return[n("transition",{key:i.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[124!=e.tileType?n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]):n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+i.ChildId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]),e._v(" "),124!=e.tileType?n("span",{class:"none"!=i.Reminder?"icon-alarm-"+i.Reminder:""},[n("i",{class:"none"!=i.Reminder?"far fa-alarm-clock":""}
1)]):e._e(),e._v(" "),124==e.tileType?n("span",{class:e.statusColor(i.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})]):e._e()])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("PÃ¥mindelse")])])])])}],!1,null,"d5c52fb8",null);t.a=o.exports},863:function(e,t,n){"use strict";var i,s=n(1),a=n.n(s),r="https://www2.infoba.dk";function o(e){return{groupName:e.GroupName,timeslots:[l(e)]}}function l(e){return{name:e.Name,time:"".concat(e.StartTime.slice(0,-3)," - ").concat(e.EndTime.slice(0,-3)),color:e.Color}}function c(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+r+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=r+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var u={props:(i={axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},a()(i,"userProfile",String),a()(i,"institutionCode",String),i),data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:r,who:"Aula widget developers",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,domain:r,domainOld:"https://www.infoba.dk",fields:{},item:{Binder:{Tile:{}}},timeSlots:Array,sortedTimeSlots:Array}},computed:{},methods:{getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="PPlan",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.institutionCode&&(this.axios.defaults.headers.common.institutionCode=this.institutionCode),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=130,this.axios.get(r+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.moment.locale("da"),e.item=t.data,c(e),0==e.item.Binder.Tile.TimeSlotList.length&&(e.section="nodata",e.message="Vi har ikke noget relevant data at vise dig."),e.timeSlots=e.item.Binder.Tile.TimeSlotList,e.sortedTimeSlots=[];for(var n=0;n<e.timeSlots.length;n++)if(e.sortedTimeSlots.length>0&&e.sortedTimeSlots[e.sortedTimeSlots.length-1].institutionName==e.timeSlots[n].InstitutionName){var i=e.sortedTimeSlots[e.sortedTimeSlots.length-1].groups;i[i.length-1].groupName==e.timeSlots[n].GroupName?i[i.length-1].timeslots.push(l(e.timeSlots[n])):i.push(o(e.timeSlots[n]))}else e.sortedTimeSlots||(e.sortedTimeSlots=[]),e.sortedTimeSlots.push({institutionName:(s=e.timeSlots[n]).InstitutionName,groups:[o(s)]});var s})).catch((function(t){c(e)})).finally((function(){return e.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,i="";if(null===t||null===n){var s="?referrer=Aula";-1!==e.indexOf("?")&&(s="&referrer=Aula"),i=e+s}else i=r+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var a=document.createElement("a");a.href=i,a.target="INFOBA",a.click()}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},d=n(3),h=Object(d.a)(u,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#425d82"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-calendar-account"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain+"/IN/PPlan")}}},[e._v("\n          INFOBA Vagtplan\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[e._l(e.sortedTimeSlots,(function(t){return[n("div",{staticClass:"institution"},[n("widget-html",{staticClass:"institution-name infoba-gray",attrs:{html:t.institutionName}}),e._v(" "),e._l(t.groups,(function(t){return[n("div",{staticClass:"group"},[n("widget-html",{staticClass:"group-name",attrs:{html:t.groupName}}),e._v(" "),e._l(t.timeslots,(function(t){return[n("div",{staticClass:"timeslot",on:{click:function(t){return e.goto(e.domain+"/IN/PPlan")}}},[n("div",{staticClass:"timeslot-content",style:{borderLeftColor:t.color}},[n("div",{staticClass:"timeslot-time infoba-gray"},[e._v("\n                      "+e._s(t.time)+"\n                    ")]),e._v(" "),n("widget-html",{staticClass:"timeslot-name",attrs:{html:t.name}})],1)])]}))],2)]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"icon-rotator infoba-rotate"})])}],!1,null,"b84d976a",null);t.a=h.exports},864:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{SpfTile:{ChildList:[]},TrvslTile:{ChildList:[]}}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)}},methods:{statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=90,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),124==t.tileType?t.tile=t.item.Binder.Tile.TrvslTile:t.tile=t.item.Binder.Tile.SpfTile,t.groupByDates(t.tileType),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}
1,dismissReminder:function(e,t){var n=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(i+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<n.tile.ReminderList.length;t++)n.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&n.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(n)})).finally((function(){return n.loading=!1}))},groupByDates:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.tile.ChildList.length;n++)-1===t.indexOf(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"))&&t.push(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"));for(var i=function(n){e.headers.push({Open:!1,Month:t[n],Count:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]})).length,ChildList:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=e.tileType?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==e.tileType?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[124!=e.tileType?n("div",[e.tile.ReminderList.length?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(e.item.Binder.Tile.SpfTile.ReminderList,(function(t){return n("div",{key:t.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(e.item.Binder.Tile.Header)+" "+e._s(t.Description)+" ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+t.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(t.ChildName)+"\n                  ")])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(n){return e.dismissReminder(t.ReminderId,t.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("i",{staticClass:"fas fa-bell-slash icon-bell-off"})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v("\n              "+e._s(t.Count)+"\n            ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(t.Month))))]),e._v(e._s(e._f("getYear")(t.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(t.ChildList,(function(i){return[n("transition",{key:i.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[124!=e.tileType?n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]):n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+i.ChildId)}}},[e._v("\n                    "+e._s(i.Name)+"\n                  ")]),e._v(" "),124!=e.tileType?n("span",{class:"none"!=i.Reminder?"icon-alarm-"+i.Reminder:""},[n("i",{class:"none"!=i.Reminder?"far fa-alarm-clock":""}
1)]):e._e(),e._v(" "),124==e.tileType?n("span",{class:e.statusColor(i.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})]):e._e()])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("PÃ¥mindelse")])])])])}],!1,null,"d7eed9e4",null);t.a=o.exports},865:function(e,t,n){"use strict";var i,s="https://www2.infoba.dk";function a(e,t){setTimeout((function(){if(null!=(i=document.getElementById("canvas"))){var n=i.getContext("2d");null!=n&&function(e,t,n,i,s,a,r){var o=0,l=0,c=Math.PI,u=2*c,d=-c/2;r.lineWidth=i;for(var h=0;h<s.length;h++)o+=s[h];for(h=0;h<s.length;h++)r.beginPath(),r.arc(e,t,n,d+u*(l/o),d+u*((l+s[h])/o)),r.strokeStyle=a[h],r.stroke(),l+=s[h];var m=n-i-3;r.beginPath(),r.arc(e,t,m,0,u)}(60,60,50,15,[e,t],["#96be2c","#e43351"],n)}}),1)}function r(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+s+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=s+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,domain:s,message:"",timer:"",headerLink:s,section:"default",aulaToken:null,item:{Binder:{Tile:{DigitalSuitcaseTile:{}}}}}},methods:{getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(s+"/api/Aula/INTileGet/127",{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,r(t),null!=t.item.Binder.Tile&&(0!=t.lockedPercent||0!=t.unlockedPercent?a(t.lockedPercent,t.unlockedPercent):(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig."))})).catch((function(e){r(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,i="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),i=e+a}else i=s+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=i,r.target="INFOBA",r.click()},statusColor:function(e){return!1===e?"icon-color-grey":"icon-color-green"}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url,style:"cursor:pointer;"}},lockedPercent:function(){return 0==this.item.Binder.Tile.DigitalSuitcaseTile.LockedCount?0:this.item.Binder.Tile.DigitalSuitcaseTile.LockedCount/(this.item.Binder.Tile.DigitalSuitcaseTile.LockedCount+this.item.Binder.Tile.DigitalSuitcaseTile.UnlockedCount)*100},unlockedPercent:function(){return 0==this.item.Binder.Tile.DigitalSuitcaseTile.UnlockedCount?0:this.item.Binder.Tile.DigitalSuitcaseTile.UnlockedCount/(this.item.Binder.Tile.DigitalSuitcaseTile.LockedCount+this.item.Binder.Tile.DigitalSuitcaseTile.UnlockedCount)*100}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):"default"!=e.section||e.loading?e._e():n("section",[n("div",{staticClass:"wrapper"}),e._v(" "),n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-briefcase"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(1)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"icon-rotator infoba-rotate"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{display:"flex","justify-content":"center","padding-left":"10px"}},[t("canvas",{staticStyle:{margin:"auto"},attrs:{id:"canvas",width:"120",height:"120"}})])}],!1,null,"03954082",null);t.a=c.exports},866:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,assuranceLevel:Number,moment:Function,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,domain:i,fields:{},item:{Binder:{Tile:{}}},headers:[]}},methods:{getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/INTileGet/123",{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.moment.locale("da"),e.item=t.data,s(e),e.groupByProject(),0==e.headers.length&&(e.section="nodata",e.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(t){s(e)})).finally((function(){return e.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},groupByProject:function(){for(var e=this,t=function(t){var n=e.item.Binder.Tile.Schema1List[t].ProjectSchema1Id,i=e.item.Binder.Tile.Schema2List.filter((function(e){return e.ProjectSchema1Id==n}));e.headers.push({Open:!1,Schema1:e.item.Binder.Tile.Schema1List[t],Schema2:i})},n=0;n<this.item.Binder.Tile.Schema1List.length;n++)t(n)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url,style:"cursor:pointer;"}}},filters:{firstLetter:function(e){return e.charAt(0)}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#96BE2C"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-projectskema"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[e._l(e.headers,(function(t){return[n("div",{key:t.Schema1.ProjectSchema1Id,staticClass:"infoba-accordeon-header",staticStyle:{"padding-top":"0","align-items":"center"}},[n("div",{staticStyle:{display:"flex","align-items":"baseline",cursor:"pointer",width:"90%"}},[n("div",{staticClass:"theme-circle",staticStyle:{"flex-shrink":"0"}},[e._v("\n              "+e._s(t.Schema2.length)+"\n            ")]),e._v(" "),n("div",{staticClass:"ellipsis"},[""!=t.Schema1.ProjectTitle?n("b",[n("widget-html",{staticClass:"ellipsis",attrs:{html:t.Schema1.ProjectTitle.replace("<p>","").replace("</p>","")},on:{click:function(n){return e.goto(e.domain+"/IN/ProjectSchema/Schema1/"+t.Schema1.ProjectSchema1Id)}}}
1)],1):n("b",{on:{click:function(n){return e.goto(e.domain+"/IN/ProjectSchema/Schema1/"+t.Schema1.ProjectSchema1Id)}}},[e._v("Skema for retning")])])]),e._v(" "),t.Schema2.length>0?n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}}):e._e()]),e._v(" "),n("div",{key:t.Schema1.ProjectSchema1Id+"act",staticStyle:{"background-color":"#FFFFFF"}},[e._l(t.Schema2,(function(i){return[n("transition",{key:i.ProjectSchema2Id,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"project.Open"}],staticStyle:{border:"none"}},[n("div",{staticStyle:{display:"flex","align-items":"baseline","justify-content":"space-between",padding:"10px 0 10px 0"}},[n("div",{staticClass:"ellipsis",staticStyle:{cursor:"pointer","margin-left":"33px"},on:{click:function(n){return e.goto(e.domain+"/IN/ProjectSchema/Schema2/"+i.ProjectSchema2Id+"?schema1Id="+t.Schema1.ProjectSchema1Id)}}},[null!=i.ProjectTitle?n("widget-html",{staticClass:"ellipsis",attrs:{html:i.ProjectTitle.replace("<p>","").replace("</p>","")}}):n("p",[e._v("\n                      Titel ikke udfyldt\n                    ")])],1),e._v(" "),n("div",{staticClass:"icon-status-dot",staticStyle:{"background-color":"orange","margin-left":"8px","margin-right":"15px","flex-shrink":"0"}})])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])}],!1,null,"038c5802",null);t.a=o.exports},867:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{getAulaToken:Function,axios:Function},data:function(){return{isLoaded:!1,subitUrl:"",aulaToken:null}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&Object.keys(this.aulaToken).length>0&&this.initRender()}},methods:{initRender:function(){var e=this;return s()(r.a.mark((function t(){var n,i,s,a;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.axios.defaults.baseURL="https://api.subit.dk",e.axios.defaults.headers.common["x-client"]="Aula info-screen-button",n=!1;try{i=localStorage.getItem("subit_token"),s=localStorage.getItem("subit_token_expires"),(!i||new Date(s).getTime()<(new Date).getTime())&&(n=!0)}catch(e){n=!0}if(!n){t.next=10;break}return t.next=7,e.axios.post("/v2/auth/aula",{jwt_token:e.aulaToken});case 7:a=t.sent,localStorage.setItem("subit_token",a.data.data.access_token),localStorage.setItem("subit_token_expires",a.data.data.expires_at);case 10:e.axios.defaults.headers.common.Authorization="Bearer "+localStorage.getItem("subit_token"),e.subitUrl="https://info.subit.dk/?token="+localStorage.getItem("subit_token"),e.isLoaded=!0;case 13:case"end":return t.stop()}}),t)})))()}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("a",{class:{loaded:e.isLoaded},attrs:{target:"_blank",href:e.subitUrl}},[n("div",{staticClass:"box"},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 31 31",fill:"none"}},[n("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.1068 31H12.8945C11.8497 31 10.9996 30.1924 10.9996 29.1999V25.3163C10.9996 24.8636 10.5984 24.583 10.2271 24.583C10.0842 24.583 9.94744 24.6215 9.82028 24.6968L5.66917 27.16
178C5.36703 27.3473 5.01932 27.4425 4.6643 27.4425C4.00658 27.4425 3.40569 27.1266 3.05685 26.598L0.289819 22.4018C0.0208797 21.9945 -0.0646407 21.5119 0.0490115 21.0431C0.162101 20.5744 0.461422 20.1757 0.889587 19.9207L5.88972 16.9447C6.11927 16.8084 6.25149 16.5823 6.25149 16.3252C6.25149 16.0676 6.11927 15.8421 5.89028 15.7058L0.889587 12.7298C0.461422 12.4743 0.162101 12.0761 0.0490115 11.6074C-0.0646407 11.1386 0.0208797 10.656 0.289819 10.2487L3.05685 6.05302C3.40569 5.52388 4.00658 5.208 4.6643 5.208C5.01989 5.208 5.36703 5.30314 5.66917 5.48272L9.82084 7.95364C9.94744 8.029 10.0842 8.06748 10.2271 8.06748C10.5984 8.06748 10.9996 7.78688 10.9996 7.33417V1.80014C10.9996 0.807603 11.8497 0 12.8945 0H18.1068C19.1516 0 20.0017 0.807603 20.0017 1.80014V7.30371C20.0017 7.56347 20.1289 7.7329 20.2352 7.82964C20.4873 8.05786 20.8828 8.10436 21.1872 7.9189L25.3225 5.39721C25.6286 5.21014 25.9825 5.11126 26.3449 5.11126C27.0026 5.11126 27.604 5.42714 27.9523 5.95628L30.7115 10.1402C31.2662 10.9815 30.9967 12.0943 30.1117 12.6218L24.9293 15.7058C24.6997 15.8421 24.5681 16.0676 24.5681 16.3252C24.5681 16.5823 24.6997 16.8084 24.9293 16.9452L30.1117 20.0292C30.9967 20.5562 31.2662 21.669 30.7115 22.5103L27.9557 26.6889C27.6068 27.218 27.0059 27.5333 26.3482 27.5333C25.9825 27.5333 25.6264 27.4334 25.318 27.2437L21.1906 24.6995C21.0617 24.6199 20.9216 24.5793 20.7748 24.5793C20.4034 24.5793 20.0017 24.8599 20.0017 25.3131V29.1999C20.0017 30.1924 19.1516 31 18.1068 31Z",fill:"#4D88FF"}})]),e._v(" "),n("div",{staticClass:"separator"}),e._v(" "),n("div",{staticClass:"sign-in-icon"}),e._v(" "),n("div",{staticClass:"text"},[e._v("\n                Åbn Subit infoskærm\n            ")])])]),e._v(" "),n("div",{staticClass:"footer"},[n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("mail")]),e._v(" "),n("path",{attrs:{d:"M0 4v18c0 3.314 2.686 6 6 6v0h20c3.314 0 6-2.686 6-6v0-18h-32zM30.667 22c0 2.577-2.089 4.667-4.667 4.667v0h-20c-2.577 0-4.667-2.089-4.667-4.667v0-16.667h29.333v16.667zM28.32 9.113l-0.893-0.987-11.427 10.307-11.36-10.293-0.893 0.987 12.253 11.107 12.32-11.12z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("[email protected]")])]),e._v(" "),n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("smart-phone")]),e._v(" "),n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("70 60 51 02")])])])])}),[],!1,null,"c7a2ea88",null);t.a=c.exports},868:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{KompasTile:{}}}}}},methods:{getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=81,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.moment.locale("da"),t.item=e.data,s(t),t.tile=t.item.Binder.Tile.KompasTile,t.tile.NextWorkingDays=t.addOpe
1n(t.tile.NextWorkingDays),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},filterByDate:function(e,t){var n=this;return e.filter((function(e){return n.moment(e.Date).format("DD-MM-YYYY")===n.moment(t).format("DD-MM-YYYY")}))},addOpen:function(e){return e.map((function(e){return{date:e,Open:!1}}))}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}},backgroundColor:function(){return null==this.item.Binder.Tile.KompasTile?"#888888":this.item.Binder.Tile.KompasTile.Color}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",style:{backgroundColor:e.backgroundColor}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-kompas"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[e._l(e.tile.NextWorkingDays,(function(t){return[n("div",{staticClass:"infoba-accordeon-header"},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",style:{backgroundColor:e.backgroundColor}},[e._v("\n              "+e._s(e.filterByDate(e.tile.FocusPeriodActivity,t.date).length)+"\n            ")]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("firstToUpper")(e.moment(t.date).format("dddd"))))]),e._v(e._s(e.moment(t.date).format(" DD. MMM YYYY")))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(e.filterByDate(e.tile.FocusPeriodActivity,t.date),(function(i){return[n("transition",{key:i.Tile,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"day.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{"margin-left":"54px"}},[n("div",{staticClass:"infoba-gray",staticStyle:{cursor:"pointer"},on:{click:function(t){return e.goto(e.domain+"/IN/Institution/GroupChildrenList/"+i.InstitutionId)}}},[e._v("\n                    "+e._s(i.InstitutionName)+"\n                  ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer"},on:{click:function(t){return e.goto(e.domain+"/IN/KOMPAS/FocusPeriodProcess/"+i.FocusPeriodId+"?KOMPASGroupPeriodActivityId="+i.GroupPeriodActivityId+"&activityId="+i.FocusPeriodActivityId)}}},[n("b",[e._v(e._s(i.Title))])])])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])}],!1,null,"bc01bd0c",null);t.a=o.exports},869:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{KompasTile:{GroupList:[]}}}}}},methods:{getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=80,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),t.tile=t.item.Binder.Tile.KompasTile,0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}},backgroundColor:function(){return 0==this.item.Binder.Tile.KompasTile.GroupList.length||0==this.item.Binder.Tile.KompasTile.GroupList[0].Texts.length?"#888888":this.item.Binder.Tile.KompasTile.GroupList[0].Texts[0].ThemeColor}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",style:{backgroundColor:e.backgroundColor}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-kompas"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),0==e.tile.GroupList.length?n("div",[n("div",{staticClass:"infoba-quick-access-item"},[e._v("\n        En ny aktivitetsperiode er begyndt og du er endnu ikke tilknyttet en KOMPAS-gruppe.\n      ")])]):n("div",{staticClass:"wrapper"},[e._l(e.tile.GroupList,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v(e._s(t.Texts[0].Header))])])]),e._v(" "),0==t.isLocked?n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}}):n("i",{staticClass:"far fa-lock-alt"})]),e._v(" "),n("div",[e._l(t.ChildrenGroupList,(function(i){return[n("transition",{key:i.ChildName,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1"}},[n("div",{staticClass:"theme-circle",style:{backgroundColor:t.Texts[0].ThemeColor,marginLeft:"20px"}},[e._v("\n                    "+e._s(i.Fills)+"\n                  ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v("\n                    "+e._s(i.ChildName)+"\n                  ")])])])])]}))],2)]}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])}],!1,null,"ea66c046",null);t.a=o.exports},870:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o="subit_token",l="subit_token_expires",c="subit_language",u={props:{getAulaToken:Function,axios:Function},data:function(){return{aulaToken:null,collapsed:!0,isLoading:!0,isFirstLoad:!0,user:null,language:localStorage.getItem(c)||"da",phone
1Extension:null,phoneNumber:null,showWithdrawConsentConfirmation:!1,takenPhoneNumbers:[],errorOccurred:!1}},computed:{isPhoneValid:function(){var e=this.isPhoneFormatValid,t=this.isPhoneTaken;return e&&!t},isPhoneFormatValid:function(){if(!this.phoneNumber)return!0;switch(this.phoneExtension){case 45:return!!this.phoneNumber.toString().match(/^[2-9]\d{7}$/g);case 46:return!!this.phoneNumber.toString().match(/^[1-9]\d{7,12}$/g);case 298:return!!this.phoneNumber.toString().match(/^[0-9]\d{5}$/g);default:return!0}},isPhoneTaken:function(){return this.takenPhoneNumbers.includes(this.phoneNumberHash)},phoneNumberHash:function(){return"".concat(this.phoneExtension,":").concat(this.phoneNumber)},translations:function(){return d[this.language]},isConsented:function(){return this.user.communication.is_consented},originalPhoneNumber:function(){return this.user.phone?this.user.phone.number:null},originalPhoneExtension:function(){return this.user.phone?this.user.phone.extension:null},canSavePhone:function(){var e=this.originalPhoneNumber!=this.phoneNumber,t=this.originalPhoneExtension!=this.phoneExtension;return e||t},checkboxBackgroundClasses:function(){return{"switch-active":this.isConsented,"switch-inactive":!this.isConsented}},checkboxForegroundStyle:function(){return{transform:this.isConsented?"translateX(14px)":"translateX(0)"}}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){this.aulaToken&&Object.keys(this.aulaToken).length>0&&(this.collapsed||this.performFirstLoad())}},methods:{initRender:function(){return s()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},performFirstLoad:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.isLoading=!0,e.axios.defaults.baseURL="https://api.subit.dk",e.axios.defaults.headers.common["x-client"]="Aula sms-widget-user-consent",!e.shouldReloadToken()){t.next=9;break}return t.next=6,e.axios.post("/v2/auth/aula",{jwt_token:e.aulaToken});case 6:n=t.sent,localStorage.setItem(o,n.data.data.access_token),localStorage.setItem(l,n.data.data.expires_at);case 9:return e.axios.defaults.headers.common.Authorization="Bearer "+localStorage.getItem(o),t.next=12,e.loadUser();case 12:e.isLoading=!1,e.isFirstLoad=!1;case 14:case"end":return t.stop()}}),t)})))()},shouldReloadToken:function(){try{var e=localStorage.getItem(o),t=localStorage.getItem(l);return!e||new Date(t).getTime()<(new Date).getTime()}catch(e){return!0}},loadUser:function(){var e=this;return s()(r.a.mark((function t(){var n,i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.axios.get("/v2/me");case 2:n=t.sent,i=n.data,e.user=i.data,e.language=d[e.user.language]?e.user.language:"da",e.phoneExtension=e.user.phone?e.user.phone.extension:null,e.phoneNumber=e.user.phone?e.user.phone.number:null,localStorage.setItem(c,e.language);case 9:case"end":return t.stop()}}),t)})))()},saveUser:function(e){var t=this;return s()(r.a.mark((function n(){var i,s,a,o;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.isLoading=!0,n.prev=1,n.next=4,t.axios.patch("v2/me",e);case 4:return i=n.sent,s=i.data,t.user=s.data,t.errorOccurred=!1,t.isLoading=!1,n.abrupt("return",!0);case 12:return n.prev=12,n.t0=n.catch(1),a=!1,n.t0.response&&n.t0.response.data&&(o=n.t0.response.data.errors,(o&&o.body&&Array.isArray(o.body)?o.body.map((function(e){return e.path})):[]).includes("phone")&&(a=!0,t.takenPhoneNumbers.push(t.phoneNumberHash))),t.errorOccurred=!a,t.isLoading=!1,n.abrupt("return",!1);case 19:case"end":return n.stop()}}),n,null,[[1,12]])})))()},onHeaderClicked:function(){this.collapsed=!this.collapsed,!this.collapsed&&this.isFirstLoad&&this.performFirstLoad()},onConsentChanged:function(){this.isConsented?this.showWithdrawConsentConfirmation=!0:this.saveUser({communication:{is_consented:!0}})},onPhoneExtensionChanged:function(e){this.phoneExtension=parseInt(e.target.value)},onPhoneNumberChanged:function(e){this.phoneNumber=e.target.value.length>0?e.target.value:null},onSavePhone:function(){this.saveUser({phone:{number:this.phoneNumber,extension:this.phoneExtension}})},onWithdrawConsentCancel:function(){this.showWithdrawConsentConfirmation=!1,this.errorOccurred=!1},onWithdrawConsentConfirm:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;
1)switch(t.prev=t.next){case 0:return t.next=2,e.saveUser({communication:{is_consented:!1}});case 2:t.sent&&(e.showWithdrawConsentConfirmation=!1);case 4:case"end":return t.stop()}}),t)})))()}}},d={da:{title:"SMS samtykke",descriptionHeader:"Samtykke til at modtage sms-beskeder",descriptionText:"Med dit samtykke kan skoler sende sms-beskeder med generel information omkring skolen, ændringer i undervisningen, eller kontakte dig i nødstilfælde.",phoneNumberHeader:"Telefon",phoneNumberTaken:"Nummeret er allerede registreret til en anden bruger",save:"Gem",errorOccurred:"Der skete en fejl",withdrawConsent:{message:"Er du sikker på, at du ønsker at fjerne dit samtykke til at modtage sms-beskeder? Uden dit samtykke går du måske glip af vigtig information.",cancel:"Tilbage",confirm:"Fjern samtykke"}},en:{title:"SMS consent",descriptionHeader:"Consent to receiving text messages",descriptionText:"With your consent, schools can send you text messages with general information about the school or schedule changes or in cases of emergency.",phoneNumberHeader:"Phone number",phoneNumberTaken:"That phone number is registered to another user",save:"Save",errorOccurred:"An error occurred",withdrawConsent:{message:"Are you sure you want to withdraw your consent? Without your consent you may miss important announcements and information.",cancel:"Cancel",confirm:"Withdraw consent"}}},h=u,m=n(3),p=Object(m.a)(h,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"container"},[n("div",{staticClass:"header",class:{collapsed:e.collapsed},on:{click:e.onHeaderClicked}},[n("svg",{staticClass:"header-icon",attrs:{viewBox:"0 0 32 32"}},[n("path",{attrs:{fill:"#fff",xmlns:"http://www.w3.org/2000/svg",d:"M0.667 0v32l10.24-9.333h13.093c4.050 0 7.333-3.283 7.333-7.333v0-15.333h-30.667zM30 15.333c0 3.314-2.686 6-6 6v0h-13.587l-8.413 7.88v-27.88h28v14zM10 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2zM18 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2zM26 11.333c0 1.105-0.895 2-2 2s-2-0.895-2-2c0-1.105 0.895-2 2-2s2 0.895 2 2z"}})]),e._v(" "),n("div",{staticStyle:{display:"flex","margin-left":"10px"}},[n("p",{staticClass:"title"},[e._v(e._s(e.translations.title))])]),e._v(" "),n("div",{staticClass:"header-expand-icon"},[e.collapsed?n("svg",{staticClass:"bi bi-chevron-down",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"#ffffff",viewBox:"0 0 16 16"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"}})]):e._e(),e._v(" "),e.collapsed?e._e():n("svg",{staticClass:"bi bi-chevron-up",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"#ffffff",viewBox:"0 0 16 16"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"}})])])]),e._v(" "),e.collapsed?e._e():n("div",{staticClass:"body"},[e.isLoading?n("div",{staticClass:"loading-container"},[n("img",{staticClass:"loading-spinner",attrs:{src:"https://subit-asset.s3.eu-north-1.amazonaws.com/loading-spinner.gif",alt:"loading"}})]):e._e(),e._v(" "),e.isLoading?e._e():n("div",{staticClass:"main-content"},[e.showWithdrawConsentConfirmation?n("div",[n("div",{staticClass:"withdraw-consent-container"},[n("p",{staticClass:"withdraw-consent-message"},[e._v(e._s(e.translations.withdrawConsent.message))]),e._v(" "),n("div",{staticClass:"withdraw-consent-button-container"},[n("button",{staticClass:"withdraw-consent-button withdraw-consent-button-cancel",on:{click:e.onWithdrawConsentCancel}},[e._v("\n              "+e._s(e.translations.withdrawConsent.cancel)+"\n            ")]),e._v(" "),n("button",{staticClass:"withdraw-consent-button withdraw-consent-button-confirm",on:{click:e.onWithdrawConsentConfirm}},[e._v("\n              "+e._s(e.translations.withdrawConsent.confirm)+"\n            ")])])])]):e._e(),e._v(" "),e.showWithdrawConsentConfirmation?e._e():n("div",[n("div",{staticClass:"subtitle-container"},[n("p",{staticClass:"subtitle"},[e._v(e._s(e.translations.descriptionHeader))]),e._v(" "),n("div",[n("span",{staticClass:"toggle-wrapper",attrs:{role:"checkbox","aria-checked":e.isConsented.toString(),tabindex:"0"},on:{click:e.onConsentChanged,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.onConsentChanged.apply(null,arguments))}}},[n("span",{staticClass:"toggle-background",class:e.checkboxBackgroun
1dClasses}),e._v(" "),n("span",{staticClass:"toggle-indicator",style:e.checkboxForegroundStyle})])])]),e._v(" "),n("div",[n("p",{staticClass:"text"},[e._v(e._s(e.translations.descriptionText))])]),e._v(" "),e.isConsented?n("div",[n("p",{staticClass:"subtitle subtitle-phone"},[n("span",{staticClass:"required"},[e._v("*")]),e._v(" "+e._s(e.translations.phoneNumberHeader))]),e._v(" "),n("div",{staticClass:"phone-form-container"},[n("div",{staticClass:"phone-input-container"},[n("select",{staticClass:"phone-extension-input",attrs:{name:"phone-extension"},on:{change:e.onPhoneExtensionChanged}},[n("option",{attrs:{value:"45"},domProps:{selected:45===e.phoneExtension}},[e._v("+45")]),e._v(" "),n("option",{attrs:{value:"46"},domProps:{selected:46===e.phoneExtension}},[e._v("+46")]),e._v(" "),n("option",{attrs:{value:"298"},domProps:{selected:298===e.phoneExtension}},[e._v("+298")])]),e._v(" "),n("input",{staticClass:"phone-number-input",attrs:{type:"tel",name:"phone-number"},domProps:{value:e.phoneNumber},on:{input:e.onPhoneNumberChanged}})]),e._v(" "),n("button",{staticClass:"phone-save-button",attrs:{disabled:!e.canSavePhone||!e.isPhoneValid},on:{click:e.onSavePhone}},[e._v("\n              "+e._s(e.translations.save)+"\n            ")])])]):e._e()])]),e._v(" "),e.isLoading?e._e():n("div",[e.isPhoneTaken?n("p",{staticClass:"error-message"},[e._v(e._s(e.translations.phoneNumberTaken))]):e._e(),e._v(" "),e.errorOccurred?n("p",{staticClass:"error-message"},[e._v(e._s(e.translations.errorOccurred))]):e._e()]),e._v(" "),n("div",{staticClass:"widget-footer"},[n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"}},[n("title",[e._v("mail")]),e._v(" "),n("path",{attrs:{d:"M0 4v18c0 3.314 2.686 6 6 6v0h20c3.314 0 6-2.686 6-6v0-18h-32zM30.667 22c0 2.577-2.089 4.667-4.667 4.667v0h-20c-2.577 0-4.667-2.089-4.667-4.667v0-16.667h29.333v16.667zM28.32 9.113l-0.893-0.987-11.427 10.307-11.36-10.293-0.893 0.987 12.253 11.107 12.32-11.12z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("[email protected]")])]),e._v(" "),n("div",{staticClass:"footer-item"},[n("svg",{staticClass:"footer-item-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 32 32"}},[n("title",[e._v("smart-phone")]),e._v(" "),n("path",{attrs:{d:"M22 0h-12c-1.841 0-3.333 1.492-3.333 3.333v0 25.333c0 1.841 1.492 3.333 3.333 3.333v0h12c1.841 0 3.333-1.492 3.333-3.333v0-25.333c0-1.841-1.492-3.333-3.333-3.333v0zM10 1.333h12c1.105 0 2 0.895 2 2v0 22h-16v-22c0-1.105 0.895-2 2-2v0zM22 30.667h-12c-1.105 0-2-0.895-2-2v0-2h16v2c0 1.105-0.895 2-2 2v0zM17.333 28.667c0 0.736-0.597 1.333-1.333 1.333s-1.333-0.597-1.333-1.333c0-0.736 0.597-1.333 1.333-1.333s1.333 0.597 1.333 1.333z"}})]),e._v(" "),n("p",{staticClass:"footer-item-text"},[e._v("70 60 51 02")])])])])])}),[],!1,null,"7fefa8fa",null);t.a=p.exports},871:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,placement:String,userProfile:String},data:function(){return{aulaToken:null,coliboServer:"",documents:[],links:[],feedEntries:[],envTitle:"",envUrl:"",showDocuments:!1,showError:!1,showLinks:!1,showFeed:!1,showLoading:!0}},mounted:function(){this.aulaToken=this.getAulaToken&&this.getAulaToken(),this.coliboServer="aula-integration.colibo.com"},watch:{aulaToken:function(){null!=this.aulaToken&&this.loadData()}},methods:{loadData:function(){var e=this;this.showLoading=!0,this.showError=!1,this.axios.get("https://".concat(this.coliboServer,"/api/Aula"),{headers:{Authorization:"bearer ".concat(this.aulaToken)}}).then((function(t){e.documents=t.data.documents,e.links=t.data.favorites,e.feedEntries=t.data.feedEntries,e.showDocuments=e.documents&&e.documents.length,e.showLinks=e.links&&e.links.length,e.showFeed=e.feedEntries&&e.feedEntries.length,e.envTitle=t.data.coliboInstanceName||"Colibo",e.envUrl=t.data.coliboInstanceUrl})).catch((function(){e.showError=!0})).finally((function(){e.showLoading=!1}))}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0102V0001"},["employee"===e.userProfile?n("div",[n("h2",[n("a",{attrs:{href:e.envUrl,target:"_blank"}},[e._v(e._s(e.envTitle))])]),e._v(" "),e.showFeed?n("div",[n("h3",[e._v("Nyheder")]),e._v(" "),n("ul",e._l(e.feedEntries,(function(t){return n("li",{key:t.url},[n("a",{attrs:{href:t.url,target:"_blank",title:t.title}},["News article"===t.type?n("img",{attrs:{alt:"Nyhed",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQgMThWNUgxNlYxOEMxNiAxOC4zNTA2IDE2LjA2MDIgMTguNjg3MiAxNi4xNzA3IDE5SDVDNC40NDc3MiAxOSA0IDE4LjU1MjMgNCAxOFpNMTkgMjFINUMzLjM0MzE1IDIxIDIgMTkuNjU2OSAyIDE4VjNIMTZIMTdIMThWOEgyMlY5VjEwVjE4QzIyIDE5LjY1NjkgMjAuNjU2OSAyMSAxOSAyMVpNMTggMTBIMjBWMThDMjAgMTguNTUyMyAxOS41NTIzIDE5IDE5IDE5QzE4LjQ0NzcgMTkgMTggMTguNTUyMyAxOCAxOFYxMFpNMTAgN1YxMUg2VjdIMTBaTTE0IDEwVjhIMTFWMTBIMTRaTTE0IDEyVjE0SDZWMTJIMTRaTTE0IDE3VjE1SDZWMTdIMTRaIiAvPg0KPC9zdmc+DQo="}}):"Event"===t.type?n("img",{attrs:{alt:"Begivenhed",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTggNkg2VjVINFY4SDIwVjVIMThWNkgxNlY1SDhWNlpNMjAgMTBINFYyMEgyMFYxMFpNMTYgM0g4VjJINlYzSDRDMi44OTU0MyAzIDIgMy44OTU0MyAyIDVWMjBDMiAyMS4xMDQ2IDIuODk1NDMgMjIgNCAyMkgyMEMyMS4xMDQ2IDIyIDIyIDIxLjEwNDYgMjIgMjBWNUMyMiAzLjg5NTQzIDIxLjEwNDYgMyAyMCAzSDE4VjJIMTZWM1pNNyAxNFYxMkg5VjE0SDdaTTExIDE0SDEzVjEySDExVjE0Wk0xNSAxNFYxMkgxN1YxNEgxNVpNNyAxNlYxOEg5VjE2SDdaTTEzIDE4SDExVjE2SDEzVjE4WiIvPg0KPC9zdmc+DQo="}}):n("img",{attrs:{alt:"Opslag",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMiAyMGEyIDIgMCAwMDIgMmgxMy40MTRMMjIgMTcuNDE0VjRhMiAyIDAgMDAtMi0ySDRhMiAyIDAgMDAtMiAydjE2ek00IDRoMTZ2MTFoLTNhMiAyIDAgMDAtMiAydjNINFY0em0xMyAxM2gyLjU4NkwxNyAxOS41ODZWMTd6TTcgMTV2Mmg2di0ySDd6bTAtMnYtMmgxMHYySDd6bTAtNnYyaDEwVjdIN3oiIGNsaXAtcnVsZT0iZXZlbm9kZCI+PC9wYXRoPjwvc3ZnPg=="}}),e._v(" "),n("span",[e._v(e._s(t.title))])])])}
1)),0)]):e._e(),e._v(" "),e.showDocuments?n("div",[n("h3",[e._v("Viden")]),e._v(" "),n("ul",e._l(e.documents,(function(t){return n("li",{key:t.url},[n("a",{attrs:{href:t.url,target:"_blank",title:t.title}},["Folder"===t.type?n("img",{attrs:{alt:"Folder",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTIxIDVDMjIuMTA0NiA1IDIzIDUuODk1NDMgMjMgN1YxOUMyMyAyMC4xMDQ2IDIyLjEwNDYgMjEgMjEgMjFIM0MxLjg5NTQzIDIxIDEgMjAuMTA0NiAxIDE5VjVDMSAzLjg5NTQzIDEuODk1NDMgMyAzIDNIOUMxMC4xMiAzIDEwLjgzMjkgMy40NzU0NSAxMS41NDkgNC4zNzg4NUMxMS41Njg4IDQuNDAzODUgMTEuNjE3MSA0LjQ2NjA4IDExLjY3MDYgNC41MzVMMTEuNjcwNyA0LjUzNTE1QzExLjc0NjEgNC42MzIzNiAxMS44MzE4IDQuNzQyODMgMTEuODYyNSA0Ljc4MDgyQzExLjg5MzUgNC44MTkyNSAxMS45MTk2IDQuODUxMDMgMTEuOTQxMiA0Ljg3NzNMMTEuOTQxMiA0Ljg3NzMyQzEyLjAyOTIgNC45ODQyOCAxMi4wNDE5IDQuOTk5NzggMTIuMDAxOCA1SDIxWk0yMSA5VjdMMTEuOTk0NiA2Ljk5OTk5QzExLjI3NjUgNi45OTYxNCAxMC44MDg3IDYuNjU5OTEgMTAuMzA1OCA2LjAzNjU0QzEwLjI2MDMgNS45ODAwNiAxMC4xNDk2IDUuODM3MzcgMTAuMDY5MiA1LjczMzc2TDEwLjA2OTIgNS43MzM3NUwxMC4wNjkxIDUuNzMzNTdDMTAuMDI3MSA1LjY3OTQ0IDkuOTkzMzYgNS42MzYgOS45ODE2IDUuNjIxMTZDOS42MDcwMiA1LjE0ODU3IDkuMzg0MjQgNSA5IDVIM1Y5SDIxWk0yMSAxMUgzVjE5SDIxVjExWiIgLz4NCjwvc3ZnPg0K"}}):n("img",{attrs:{alt:"Fil",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01IDFIMTUuNDE0MkwyMSA2LjU4NTc5VjIxQzIxIDIyLjEwNDYgMjAuMTA0NiAyMyAxOSAyM0g1QzMuODk1NDMgMjMgMyAyMi4xMDQ2IDMgMjFWM0MzIDEuODk1NDMgMy44OTU0MyAxIDUgMVpNMTMgM0g1VjIxSDE5VjlIMTVDMTMuODk1NCA5IDEzIDguMTA0NTcgMTMgN1YzWk0xNSAzLjQxNDIxVjdIMTguNTg1OEwxNSAzLjQxNDIxWk04IDE3VjE1SDE0VjE3SDhaTTggMTFWMTNIMTZWMTFIOFoiLz48L3N2Zz4NCg=="}}),e._v(" "),n("span",[e._v(e._s(t.title))])])])})),0)]):e._e(),e._v(" "),e.showLinks?n("div",[n("h3",[e._v("Favoritter")]),e._v(" "),n("ul",e._l(e.links,(function(t){return n("li",{key:t.url},[n("a",{attrs:{href:t.url,target:"_blank",title:t.title}},[n("img",{attrs:{alt:"Link",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS43MDQyIDEzLjcwNzFMMTguOTk3MSA2LjQxNDIxVjExSDIwLjk5NzFWM0gxMi45OTcxVjVIMTcuNTgyOUwxMC4yOSAxMi4yOTI5TDExLjcwNDIgMTMuNzA3MVpNMTkgMTlWMTRIMTdWMTlINVY3SDEwVjVINUMzLjg5NTQzIDUgMyA1Ljg5NTQzIDMgN1YxOUMzIDIwLjEwNDYgMy44OTU0MyAyMSA1IDIxSDE3QzE4LjEwNDYgMjEgMTkgMjAuMTA0NiAxOSAxOVoiIC8+PC9zdmc+DQo="}}),e._v(" "),n("span",[e._v(e._s(t.title))])])])})),0)]):e._e(),e._v(" "),e.showError?n("div",{staticClass:"error"},[n("div",[e._v("Der opstod en fejl under indlæsning af nyheder og dokumenter.")]),e._v(" "),n("center",[n("button",{on:{click:function(t){return e.loadData()}}},[e._v("Prøv igen")])])],1):e._e(),e._v(" "),e.showLoading?n("center",[n("div",{staticClass:"fa fa-spinner"})]):e._e()],1):e._e()])}),[],!1,null,null,null);t.a=a.exports},872:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,moment:Function,assuranceLevel:Number,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,who:"Aula widget developers",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,domain:i,domainOld:"https://www.infoba.dk",fields:{},item:{Binder:{Tile:{}}},headers:[]}},methods:{getData:function(){var e=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/INTileGet/200",{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.moment.locale("da"),e.item=t.data,s(e),null==e.item.Binder.Tile.LearningLibraryTile&&0==e.item.Binder.Tile.LearningLibraryTile.ChildrenList.length&&(e.section="nodata",e.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(t){s(e)})).finally((function(){return e.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url,style:"cursor:pointer;"}}},filters:{firstLetter:function(e){return e.charAt(0)}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#888"}},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#425D82"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-bookshelf"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v("\n          "+e._s(e.item.Binder.Tile.Header)+"\n        ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[n("div",{staticStyle:{height:"auto"}},[e._l(e.item.Binder.Tile.LearningLibraryTile.ChildrenList,(function(t){return[n("div",{staticClass:"infoba-accordeon-row",staticStyle:{cursor:"pointer"},style:{paddingTop:"0px",marginBottom:"7px",borderLeft:"4px solid "+t.Color},on:{click:function(n){return e.goto(e.domain+"/IN/LearningLibrary/Content/"+t.LearningLibraryId+"?pid="+t.ParentId+"&fvid="+t.FVId)}}},[n("div",{staticStyle:{padding:"16px"}},[n("p",{staticClass:"infoba-gray"},[e._v("\n                "+e._s(e.moment(t.PublishedDate).format("DD.MMM YYYY"))+"\n              ")]),e._v(" "),n("p",{staticClass:"topicheader"},[e._v("\n                "+e._s(t.HeaderText)+"\n              ")])])])]}))],2)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])}],!1,null,"0aac3636",null);t.a=o.exports},873:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,moment:Function,assuranceLevel:Number,getAulaToken:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,open:!1,section:"default",message:"",timer:"",headerLink:i,who:"Aula widget developers",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,domain:i,domainOld:"https://www.infoba.dk",fields:{},item:{Binder:{Tile:{}}}}},methods:{getReflectionColor:function(e){var t="grey50";return null!=e.MeetingId&&(t=e.MeetingDateSent?"green":"grey80"),t+" icon-small-ptcLinks"},getParentColor:function(e){var t="icon-house-grey50";return null!=e.MeetingFirstSeenDate&&(t=e.MeetingDateApproved?"icon-house-green":"icon-house-grey80"),t+" icon-small-ptcLinks"},getConclusionColor:function(e){var t="icon-text-grey50";return 0!=e.ConslusionExists&&(t=e.ConclusionDateSent?"icon-text-green":"icon-text-grey80"),t+" icon-small-ptcLinks"},getHistoryColor:function(e){var t="grey50";return e.MeetingId&&(t="grey80"),t+" icon-small-ptcLinks"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.axios.get(i+"/api/Aula/INTileGet/95",{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.moment.locale("da"),t.item=e.data,s(t)})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},getPTCMeetingLink:function(e){var t="";
1return 0==e.MeetingTypeId?t="#":0!=e.MeetingTypeId&&(t=i+"/IN/PTCMeeting/Reflection/"+e.Child.ChildId+"?meetingId="+(null==e.MeetingId?0:e.MeetingId)+"&meetingTypeId="+e.MeetingTypeId),null!=e.MeetingDateSent&&(t=i+"/IN/PTCMeeting/Conclusion/"+e.Child.ChildId+"?meetingId="+(null==e.MeetingId?0:e.MeetingId)),t}},created:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData()}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.section},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home-alt icon-house"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{directives:[{name:"show",rawName:"v-show",value:0!=this.item.Binder.Tile.PTCMeeting.MeetingList.length,expression:"this.item.Binder.Tile.PTCMeeting.MeetingList.length != 0"}],staticClass:"component"},[n("div",{staticClass:"infoba-header",staticStyle:{"background-color":"#96be2c"}},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-house-solid"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain+"/IN/PTCMeeting/")}}},[e._v("\n            "+e._s(e.item.Binder.Tile.Header)+"\n          ")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item",staticStyle:{height:"auto"}},[n("div",{staticClass:"infoba-content"},[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-top":"0","align-items":"center",border:"none","padding-left":"0px"}},[e._m(1),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:e.open},staticStyle:{cursor:"pointer"},on:{click:function(t){e.open=!e.open}}})]),e._v(" "),n("transition",{attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],staticStyle:{border:"none","padding-right":"10px"}},e._l(this.item.Binder.Tile.PTCMeeting.MeetingList,(function(t){return n("div",{staticClass:"infoba-row",staticStyle:{border:"none","flex-direction":"column","margin-top":"20px","padding-left":"0px"}},[n("div",[null!=t.MeetingDate?n("div",{staticClass:"infoba-gray"},[e._v("\n                    "+e._s(e.moment(t.MeetingDate).format("DD. MMM YYYY"))+" kl. "+e._s(e.moment(t.MeetingDate).format("HH:mm"))+"\n                  ")]):e._e(),e._v(" "),n("div",{class:0==t.MeetingTypeId?"infoba-gray":"infoba-link",staticStyle:{color:"#555 !important","border-bottom":"solid 1px #ccc",width:"100%"},on:{click:function(n){e.goto(e.getPTCMeetingLink(t))}}},[0==t.MeetingTypeId?n("b",[e._v(e._s(t.Child.FullName)+" (Ukendt)")]):n("b",[e._v(e._s(t.Child.FullName)+"  ("+e._s(t.Child.AgeInMonthsText+" år")+")")])])]),e._v(" "),n("div",{staticStyle:{display:"flex","justify-content":"space-between","align-content":"center","margin-top":"5px","margin-bottom":"10px"}},[n("div",[e._v(" "+e._s(t.MeetingType))]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center"}},[t.MeetingId>0?n("span",{class:e.getReflectionColor(t)},[n("i",{staticClass:"fas fa-user",staticStyle:{cursor:"pointer"},on:{click:function(n){e.goto(e.domain+"/IN/PTCMeeting/Reflection/"+t.Child.ChildId+"?meetingId="+(null==t.MeetingId?0:t.MeetingId)+"&meetingTypeId="+t.MeetingTypeId)}}})]):n("span",{class:e.getReflectionColor(t)},[n("i",{staticClass:"fas fa-user"})]),e._v(" "),n("div",{class:e.getParentColor(t)}),e._v(" "),null!=t.MeetingDateSent?n("div",{class:e.getConclusionColor(t),staticStyle:{cursor:"pointer"},on:{click:function(n){e.goto(e.domain+"/IN/PTCMeeting/Conclusion/"+t.Child.ChildId+"?meetingId="+(null==t.MeetingId?0:t.MeetingId))}}}):n("div",{class:e.getConclusionColor(t)}),e._v(" "),t.MeetingId>0?n("span",{class:e.getHistoryColor(t)},[n("i",{staticClass:"far fa-clock",staticStyle:{cursor:"pointer"},on:{click:function(n){e.goto(e.domain+"/IN/PTCMeeting/History/"+t.Child.ChildId+"?meetingId="+(null==t.MeetingId?0:t.MeetingId))}}})]):n("span",{class:e.getHistoryColor(t)},[n("i",{staticClass:"far fa-clock"})])])])])})),0)])],1)])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ellipsis"},[n("b",[e._v("Kommende samtaler")])])}],!1,null,"2f6548d8",null);t.a=o.exports},874:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],name:"TeacherWeekPlan.vue",props:{widgetIdentifier:{type:String,default:"teacherWeekPlan-"}},methods:{addReadmore:function(){var e=this.$refs.containers;e&&e.forEach((function(e){e.querySelector(".js-content").scrollHeight>51&&e.querySelector(".js-button").classList.add("show")}))},handleClick:function(e){var t=e.currentTarget,n=t.querySelector(".js-content"),i=t.querySelector(".js-button"),s=n.getBoundingClientRect().height;n.classList.contains("open")&&s>51?(n.style.height="51px",n.classList.remove("open"),i.innerHTML=i.getAttribute("data-more")):(n.style.height=s+"px",n.style.height=n.scrollHeight+"px",n.classList.add("open"),i.innerHTML=i.getAttribute("data-less"))}
1,getBackgroundStyle:function(e){return"content: url(".concat(this.meebookImgBaseUrl,"edit-task.png);")},getLinkIcon:function(){return"background-image: url(".concat(this.meebookImgBaseUrl,"link-2x.png)")},getDate:function(e){return this.moment(e)},getDayOfWeek:function(e){return e.substr(0,2)},getDateOfMonth:function(e){return e.match(/\d+/)[0]},formatAulaYearWeek:function(){return this.moment.locale("da"),this.moment(this.getCurrentWeekNumberPatchFormated()).format("GGGG-[W]WW")},getFormatedActiveWeekNumber:function(e){return this.moment(this.getActiveWeekNumber()).format(e)},getActiveWeekNumber:function(){return null===this.activeWeekNumber?this.getCurrentWeekNumberPatchFormated():this.activeWeekNumber},getCurrentWeekNumberPatchFormated:function(){return this.currentWeekNumber.length>7?this.currentWeekNumber:this.currentWeekNumber.replace("W","W0")},dayHasContent:function(e){var t=!1;return this.data.forEach((function(n){n.weekPlan[e].tasks.length>0&&(t=!0)})),t},groupHasNoTasks:function(e,t){return this.data[e].weekPlan[t].tasks.length>=1},checkDayForTasks:function(e){var t=!1;return this.data.forEach((function(n){n.weekPlan[e].tasks.length>=1&&(t=!0)})),t},getNextWeekPlan:function(){var e=this.getActiveWeekNumber();this.moment.locale("da"),this.activeWeekNumber=this.moment(e).add(1,"w"),this.getWeekPlan(this.moment(this.activeWeekNumber).format("GGGG-[W]WW"))},triggerGetNextWeekPlan:function(e){"Enter"!==e.code&&"Space"!==e.code||this.getNextWeekPlan()},getPreviousWeekPlan:function(){var e=this.getActiveWeekNumber();this.moment.locale("da"),this.activeWeekNumber=this.moment(e).subtract(1,"w"),this.getWeekPlan(this.moment(this.activeWeekNumber).format("GGGG-[W]WW"))},triggerGetPreviousWeekPlan:function(e){"Enter"!==e.code&&"Space"!==e.code||this.getPreviousWeekPlan()},getWeekPlan:function(e){var t=arguments,n=this;return s()(r.a.mark((function i(){var s,a,o;return r.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=t.length>1&&void 0!==t[1]&&t[1],n.errors=[],i.prev=2,i.next=5,n.getClient();case 5:return a=i.sent,i.next=8,a.get("teacherweekplan/all",{params:{currentWeekNumber:e,userProfile:n.userProfile,institutionFilter:n.institutionFilter}});case 8:o=i.sent,n.loading=!1,n.data=o.data||[],i.next=31;break;case 13:if(i.prev=13,i.t0=i.catch(2),!i.t0.response||401!==i.t0.response.status||s){i.next=28;break}return n.loading=!0,n.errors.push("Din Aula-token fornyes.. Øjeblik"),i.prev=18,i.next=21,n.ensureAulaToken();case 21:return n.errors.pop(),i.abrupt("return",n.getWeekPlan(e,!0));case 25:i.prev=25,i.t1=i.catch(18),n.errors.pop();case 28:n.loading=!1,n.data=[],i.t0.response&&i.t0.response.data&&i.t0.response.data.exceptionMessage?n.errors.push(i.t0.response.data.exceptionMessage):n.errors.push("Ugens plan kunne ikke hentes.");case 31:case"end":return i.stop()}}),i,null,[[2,13],[18,25]])})))()},loadContent:function(){this.getWeekPlan(this.formatAulaYearWeek())}},data:function(){return{loading:!0,activeWeekNumber:null,dayIsActive:!1,activeItemId:0,data:{},errors:[],aulaToken:null}},mounted:function(){this.moment().isoWeekday()<=5?this.activeItemId=this.moment().isoWeekday()-1:this.activeItemId=0},updated:function(){this.addReadmore()}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0109V0001"},[n("div",{staticClass:"studentplan-widget",class:e.placement},[e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v(e._s(t))])})),0)]):e._e(),e._v(" "),n("h2",{staticClass:"weekplan-title"},[e._v(" UGEPLANER: ")]),e._v(" "),n("div",{staticClass:"widget-nav"},[n("span",{staticClass:"widget-nav__week-link",attrs:{title:"Se ugeplan for forrige uge",tabindex:"0"},on:{click:function(t){return e.getPreviousWeekPlan()},keypress:function(t){return e.triggerGetPreviousWeekPlan(t)}}},[e._v("◀")]),e._v(" "),n("span",{staticClass:"widget-nav__week-info"},[e._v("Uge "+e._s(e.getFormatedActiveWeekNumber("WW")))]),e._v(" "),n("span",{staticClass:"widget-nav__week-link",attrs:{title:"Se ugeplan for næste uge",tabindex:"0"},on:{click:function(t){return e.getNextWeekPlan()},keypress:function(t){return e.triggerGetNextWeekPlan(t)}}},[e._v("▶\n")])]),e._v(" "),e._l(e.data,(function(t,i){return e.loading||e.hasErrors?e._e():n("div",{staticClass:"weekplan-container"},[n("h3",{staticClass:"groupname"},[e._v(" "+e._s(t.name)+" ")]),e._v(" "),i<1?n("div",{staticClass:"weekdays"}
1,[e._l(t.weekPlan,(function(t,s){return n("div",{key:t.date,staticClass:"weekdays__day",class:e.activeItemId===s?"active":"",attrs:{id:i+""+s},on:{click:function(t){e.activeItemId=s}}},[e._v("\n          "+e._s(e.getDayOfWeek(t.date))+"\n          "),n("br"),e._v("\n          "+e._s(e.getDateOfMonth(t.date))+"\n        ")])})),e._v(" "),e._l(t.weekPlan,(function(t,s){return i<1?n("span",{staticClass:"circle",class:e.checkDayForTasks(s)?"visible":""},[e._v("●")]):e._e()}))],2):e._e(),e._v(" "),n("div",{staticClass:"weekplan"},e._l(t.weekPlan,(function(s,a){return n("div",{key:s.date,staticClass:"weekplan__column",class:e.activeItemId===a?"active":""},["narrow"!==e.placement||e.groupHasNoTasks(i,a)?n("div",{staticClass:"weekplan__column__head"},[n("span",{staticClass:"plandate"},[e._v(e._s(s.date)+" ")]),e._v(" "),n("span",{staticClass:"childname"},[e._v(e._s(t.groupName)+" ")])]):e._e(),e._v(" "),e.dayHasContent(a)?e._e():n("span",{staticClass:"no-tasks"},[e._v("Der er intet indhold for denne dag")]),e._v(" "),n("div",{staticClass:"weekplan__column__tasks"},e._l(s.tasks,(function(t){return n("div",{key:t.id,class:"weekplan-task weekplan-task--"+t.type},[n("div",{staticClass:"weekplan-task__top"},[n("div",{staticClass:"pills-wrap"},[e._l(t.pill?t.pill.split(","):[],(function(t){return n("div",{staticClass:"weekplan-task__pill"},[e._v(e._s(t)+"\n                  ")])})),e._v(" "),"narrow"!==e.placement?n("p",{staticClass:"weekplan-task__class"},[e._v(e._s(t.group))]):e._e(),e._v(" "),n("form",{staticClass:"edit-icon-form",attrs:{action:e.getApiBaseUrl()+"teacherweekplanlinkauth",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"id"},domProps:{value:t.id}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"type"},domProps:{value:t.type}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.formatAulaYearWeek()}}),e._v(" "),n("button",{staticClass:"edit-icon",attrs:{type:"submit",title:"Se "+t.title+" i Meebook"}},[n("i",{style:e.getBackgroundStyle(t.type)})])])],2)]),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"weekplan-task__title"},[e._v("\n                "+e._s(t.title)+"\n              ")]),e._v(" "),n("div",{ref:"containers",refInFor:!0,staticClass:"weekplan-task__toggle-container",on:{click:function(t){return e.handleClick(t)}}},[n("div",{staticClass:"weekplan-task__toggle-container__content js-content"},[e._v("\n                  "+e._s(t.content)+"\n                ")]),e._v(" "),n("div",{staticClass:"weekplan-task__toggle-container__button js-button",attrs:{"data-more":"Læs mere","data-less":"Læs mindre"}},[e._v("\n                  Læs mere\n                ")])])])})),0)])})),0)])}))],2)])}),[],!1,null,null,null);t.a=u.exports},875:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(17),r=n.n(a),o=n(7),l=n.n(o),c={props:{axios:Function,getAulaToken:Function,userProfile:String,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,isMobileApp:Boolean},data:function(){return{uriToDocumentListApi:"https://aulawidgetapi.nordiccloud.dk/api/ConfidentialDocumentsShared",aulaToken:null,documentCollection:null,title:"",selectedChildName:null,isChildSelectorHidden:!1,loadingData:!0}},computed:{children:function(){if(this.documentCollection){var e=this.documentCollection.map((function(e){return e.childName}));return r()(new Set(e)).sort((function(e,t){return e.localeCompare(t)}))}return null},documentsForSelectedChild:function(){var e=this;return this.selectedChildName?this.documentCollection.filter((function(t){return t.childName==e.selectedChildName})).sort((function(e,t){return e.createdDate<t.createdDate})):[]},isNothingToShow:function(){return!(this.loadingData||null===this.documentCollection||Array.isArray(this.documentCollection)&&this.documentCollection.length)}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){this.aulaToken&&this.loadConfidentialDocumentsSharedFromApi()}},methods:{loadConfidentialDocumentsSharedFromApi:function(){var e=this;return s()(l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loadingData=!0,t.prev=1,t.next=4,e.axios.get("".concat(e.uriToDocumentListApi,"?userProfile=").concat(e.userProfile,"&assuranceLevel=").concat(e.assuranceLevel,"&childFilter=").concat(e.childFilter,"&institutionFilter=").concat(e.institutionFilter,"&isMobileApp=").concat(e.isMobileApp),{headers:{Authorization:"Bearer ".concat(e.aulaToken)}});
1case 4:(n=t.sent).data.documents.forEach((function(e){return e.createdDate=new Date(e.created)})),e.documentCollection=n.data.documents,e.title=n.data.title,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),e.documentCollection=[];case 13:return t.prev=13,e.loadingData=!1,e.updateUnread(),e.setupWidget(),t.finish(13);case 18:case"end":return t.stop()}}),t,null,[[1,10,13,18]])})))()},setupWidget:function(){this.children&&1==this.children.length&&(this.isChildSelectorHidden=!0,this.selectChild(this.children[0]))},selectChild:function(e){this.selectedChildName=e},deselectChild:function(){this.selectedChildName=null},decorateUrl:function(e){return"".concat(e,"&token=").concat(this.aulaToken)},onOpenDocument:function(){var e=this;setTimeout((function(){e.loadConfidentialDocumentsSharedFromApi()}),4e3)},updateUnread:function(){if(this.documentCollection){var e=this.documentCollection.filter((function(e){return null===e.isRead})).length;this.$emit("updateUnread",e)}},toDateString:function(e){return e.toLocaleDateString("da-dk",{year:"numeric",month:"short",day:"numeric"})},toTimeString:function(e){return"kl. "+e.toLocaleTimeString("da-dk",{hour:"numeric",minute:"numeric"})}}},u=n(3),d=Object(u.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0111V0001"},[n("div",[n("div",{staticClass:"aula-documentsCommonList-container"},[n("h1",{staticClass:"document-title",attrs:{tabindex:"0"}},[n("a",{on:{click:e.deselectChild}},[e._v(e._s(e.title))]),e._v(" "),e.selectedChildName?n("span",[e._v("/")]):e._e(),e._v(" "),n("b",[e._v(e._s(e.selectedChildName))])]),e._v(" "),e.loadingData&&!e.documentCollection?n("div",{staticClass:"text-container"},[n("i",{staticClass:"el-icon-loading"})]):n("div",[e.isNothingToShow?n("div",{staticClass:"text-container"},[e._v("\n          Der er ikke delt dokumenter med dig\n        ")]):n("div",[e.selectedChildName?n("div",{staticClass:"table"},[e._m(0),e._v(" "),e._l(e.documentsForSelectedChild,(function(t){return n("div",{key:t.id,staticClass:"table-row body",attrs:{tabindex:"0",role:"button","aria-label":"Se fortroligt dokument"}},[e._m(1,!0),e._v(" "),n("div",{staticClass:"table-cell title not-collapsed"},[n("b",[n("a",{attrs:{href:e.decorateUrl(t.url),target:"_blank"},on:{click:function(n){return e.onOpenDocument(t.id)}}},[e._v("\n                    "+e._s(t.fileName)+"\n                  ")])]),e._v(" "),t.isRead?e._e():n("span",{staticClass:"new-document-mark"},[e._v("Ny")])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[e._v("\n                "+e._s(t.sharedByName)+"\n              ")]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed",staticStyle:{width:"200px"}},[n("span",[e._v(e._s(e.toDateString(t.createdDate)))]),e._v(" "),n("span",{staticStyle:{"margin-left":"8px"}},[e._v(e._s(e.toTimeString(t.createdDate)))])]),e._v(" "),n("div",{staticClass:"table-cell collapsed-only"},[n("div",{staticClass:"item",staticStyle:{"text-align":"left"}},[n("b",[n("a",{attrs:{href:e.decorateUrl(t.url),target:"_blank"},on:{click:function(n){return e.onOpenDocument(t.id)}}},[e._v("\n                      "+e._s(t.fileName)+"\n                    ")]),e._v(" "),t.isRead?e._e():n("span",{staticClass:"new-document-mark"},[e._v("Ny")])])]),e._v(" "),n("div",{staticClass:"item pull-left"},[n("span",[e._v("Delt af ")]),e._v("\n                  "+e._s(t.sharedByName)+"\n                ")]),e._v(" "),n("div",{staticClass:"item pull-left"},[n("span",[e._v("Senest ændret")]),e._v(" \n                  "),n("span",[e._v(e._s(e.toDateString(t.createdDate)))]),e._v(" \n                  "),n("span",[e._v(e._s(e.toTimeString(t.createdDate)))])])])])}))],2):n("div",{staticClass:"table"},[e._m(2),e._v(" "),e._l(e.children,(function(t){return n("div",{key:t,staticClass:"table-row body",attrs:{tabindex:"1",role:"button","aria-label":"Vælg barn"}},[e._m(3,!0),e._v(" "),n("div",{staticClass:"table-cell not-collapsed title",staticStyle:{width:"calc(100% - 50px)"}},[n("b",[n("a",{on:{click:function(n){return e.selectChild(t)}}},[e._v("\n                    "+e._s(t)+"\n                  ")])])]),e._v(" "),n("div",{staticClass:"table-cell collapsed-only title",staticStyle:{width:"calc(100% - 50px)"}},[n("b",[n("a",{on:{click:function(n){return e.selectChild(t)}}},[e._v("\n                    "+e._s(t)+"\n                  ")])])])])}))],2)])])])])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"table-row header cursor-default"},[n("div",{staticClass:"table-cell"}),e._v(" "),n("div",{staticClass:"table-cell text-left"},[e._v("Titel")]),e._v(" "),n("div",{staticClass:"table-cell text-left"},[e._v("Delt af")]),e._v(" "),n("div",{staticClass:"table-cell fit-content text-left"},[e._v("Senest ændret")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"table-cell not-collapsed check",staticStyle:{width:"50px"}},[t("i",{staticClass:"icon-Aula_paper",staticStyle:{"font-size":"1.5em"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"table-row header cursor-default"},[n("div",{staticClass:"table-cell"}),e._v(" "),n("div",{staticClass:"table-cell text-left",staticStyle:{width:"calc(100% - 50px)"}},[e._v("Barn")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"table-cell not-collapsed check",staticStyle:{width:"50px"}},[t("i",{staticClass:"fas fa-user",staticStyle:{"font-size":"1.5em"}})])}],!1,null,null,null);t.a=d.exports},876:function(e,t,n){"use strict";var i="https://www2.infoba.dk",s="true";function a(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.ParentInstitutionId||e.item.ParentInstitutionId<=0?(e.section="error",e.message='Din institution har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):null==e.item.Binder.FocusChildInfoScreen.PictureIds||0==e.item.Binder.FocusChildInfoScreen.PictureIds.length?(e.section="error",e.message="Der er ikke nogle nye fokusbarnsskemaer at vise fra i dag eller i går.",1!=this.moment().isoWeekday()&&7!=this.moment().isoWeekday()||(e.message="Der er ikke nogle nye fokusbarnsskemaer at vise fra i dag eller i fredags.")):e.section="default":e.item&&401==e.item.Status?"Module payment missing"==e.item.Message?(e.section="error",e.message='Din institution har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message="For at se data fra INFOBA kontakt support."):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}function r(e){try{e.timer="",clearInterval(window.widgetintervalinfobascreenprogressbarInterval),e.refreshToken()}catch(t){e.color="#e43351",setTimeout((function(){r(e)}),5e3)}}var o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,moment:Function,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,loadingPicture:!1,domain:i,message:"",timer:"",headerLink:i,section:"default",who:"Aula widget developers",date:this.moment().format("DD-MM-YYYY"),aulaToken:null,timerBarValue:0,hasData:!1,pictureContainerZoom:1,item:{Binder:{FocusChildInfoScreen:{PictureId:0}}},color:"grey"}},methods:{getData:function(){this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.checkSettings=s,this.axios.defaults.headers.common.AuthorizationContext="FocusChildInfoScreen",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),null!=this.$refs.main0112F8A69F7DD2C540D6BA65E922F94E3F90?this.pictureContainerZoom=(this.$refs.main0112F8A69F7DD2C540D6BA65E922F94E3F90.clientHeight-50)/1320+"":this.pictureContainerZoom="1",this.getPicture
1(this),s="false"},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()},refreshToken:function(){this.aulaToken=null,this.aulaToken=this.getAulaToken()},getPicture:function(){var e=this;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.checkSettings=s,this.axios.get(i+"/api/Aula/FocusChildInfoScreenGet/"+this.item.Binder.FocusChildInfoScreen.PictureId,{withCredentials:!0,credentials:"same-origin"}).then((function(t){e.item=t.data,a(e)})).catch((function(t){clearInterval(window.widgetintervalinfobascreenprogressbarInterval),a(e)})).finally((function(){if(e.error=!1,e.timerBarValue=0,e.loading=!1,e.loadingPicture=!1,e.color="grey",null!=e.item.Binder.FocusChildInfoScreen&&null!=e.item.Binder.FocusChildInfoScreen.PictureIds){var t=e.item.Binder.FocusChildInfoScreen.PictureIds.length,n=e.item.Binder.FocusChildInfoScreen.PictureId;e.counter=n+"/"+t,(i=e).timer="",clearInterval(window.widgetintervalinfobascreenprogressbarInterval),window.widgetintervalinfobascreenprogressbarInterval=setInterval(function(){i.timerBarValue<100?i.timerBarValue=i.timerBarValue+.033:i.loadingPicture||(r(i),i.loadingPicture=!0)}.bind(i),10)}var i}))}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){if(null==this.aulaToken||this.hasData){if(null!=this.aulaToken&&this.hasData){var e;(e=this).getPicture()}}else(e=this).getData(),e.hasData=!0}},computed:{}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0112V0001"},[n("div",{key:e.section,ref:"main0112F8A69F7DD2C540D6BA65E922F94E3F90",staticClass:"main-section"},[e.loading?n("section",[e._m(0),e._v(" "),e._m(1)]):"default"!=e.section?n("section",[e._m(2),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):e._e(),e._v(" "),"default"!=e.section||e.loading?e._e():n("section",[n("div",{},[n("div",{staticClass:"wrapper"}),e._v(" "),n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("div",{staticClass:"icon-eye"}),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.domain)}}},[e._v(" "+e._s(e.item.Binder.FocusChildInfoScreen.Header))])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item",style:"display:flex; justify-content: center; padding-left: 10px; zoom: "+e.pictureContainerZoom+";"},[n("img",{attrs:{src:"data:image/png;base64,"+e.item.Binder.FocusChildInfoScreen.PictureBase64}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item",staticStyle:{position:"absolute",left:"0",right:"0",bottom:"15px"}},[n("div",{staticClass:"fa-counter",staticStyle:{position:"absolute"},style:{color:e.color}},[e._v(e._s(e.counter))]),e._v(" "),n("div",{staticStyle:{border:"0px solid grey !important","border-radius":"5px"}},[n("div",{style:"background-color: #9e9e9e !important; height: 1px; width: "+e.timerBarValue+"% !important;"})])])])])])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[e._v("\n           \n        ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[e._v("\n           \n        ")])])}],!1,null,null,null);t.a=c.exports},877:function(e,t,n){"use strict";var i="https://www2.infoba.dk";function s(e){clearTimeout(e.timer),e.item&&200==e.item.Status?null==e.item.Binder.Tile?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):e.section="default":e.item&&401==e.item.Status?"Invalid role"==e.item.Message||"Module payment missing"==e.item.Message?(e.section="error",e.message='Din bruger har ikke adgang til denne widget i INFOBA. Kontakt <a href="https://web.infoba.dk/support/" class="infoba-link">support</a>.'):(e.section="login",e.message='For at se data fra INFOBA, skal dine konti f&oslash;rst sammenk&aeligdes. <div><a href="'+i+"/IN/Personel/MatchAula/"+e.item.Username+'" class="infoba-link">Start sammenk&aeligdning <i class="material-icons icon-arrowright-circle" style="vertical-align: middle; margin-top: 2px; color:#96be2c"></i></a></div>',e.timer=setTimeout(function(){e.getData()}.bind(e),5e3),e.headerLink=i+"/IN/Personel/MatchAula/"+e.item.Username):(e.section="error",e.message="Undskyld. Det er i &oslash;jeblikket ikke muligt at vise dig den &oslash;nskede information. Vi h&aring;ber, du vil pr&oslash;ve igen senere.")}var a={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,moment:Function,childFilter:Array,institutionFilter:Array,group:String},data:function(){return{loading:!0,section:"default",message:"",timer:"",headerLink:i,date:this.moment().format("DD-MM-YYYY"),aulaToken:null,fields:{},firstMonth:"",domain:i,domainOld:"https://www.infoba.dk",headers:[],tile:{},tileType:0,item:{Binder:{Tile:{SpfTile:{ChildList:[]},TrvslTile:{ChildList:[]}}}}}},filters:{firstToUpper:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getYear:function(e){return e.substring(e.length-4,e.length)},getMonth:function(e){return e.substring(0,e.length-4)}},methods:{statusColor:function(e){var t=this.moment(e).diff(this.moment());return this.moment.duration(t,"days").asDays()>14?"icon-alarm-green":this.moment.duration(t,"days").asDays()>7?"icon-alarm-yellow":"icon-alarm-red"},getData:function(e){var t=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.defaults.headers.common.AuthorizationContext="INTile",null!=this.childFilter&&(this.axios.defaults.headers.common.childFilter=this.childFilter.join()),null!=this.institutionFilter&&(this.axios.defaults.headers.common.institutionFilter=this.institutionFilter.join()),null!=this.group&&(this.axios.defaults.headers.common.groupFilter=this.group),null!=this.userProfile&&(this.axios.defaults.headers.common.userProfile=this.userProfile),null!=this.currentWeekNumber&&(this.axios.defaults.headers.common.currentWeekNumber=this.currentWeekNumber),null!=this.isMobileApp&&(this.axios.defaults.headers.common.isMobileApp=this.isMobileApp),this.tileType=150,this.axios.get(i+"/api/Aula/INTileGet/"+this.tileType,{withCredentials:!0,credentials:"same-origin"}).then((function(e){t.item=e.data,s(t),124==t.tileType?t.tile=t.item.Binder.Tile.TrvslTile:t.tile=t.item.Binder.Tile.SpfTile,t.groupByDates(t.tileType),0==t.tile.length&&(t.section="nodata",t.message="Vi har ikke noget relevant data at vise dig.")})).catch((function(e){s(t)})).finally((function(){return t.loading=!1}))},goto:function(e){var t=this.item.INFOBAserial,n=this.item.INFOBAtoken,s="";if(null===t||null===n){var a="?referrer=Aula";-1!==e.indexOf("?")&&(a="&referrer=Aula"),s=e+a}else s=i+"/Login/Index?serial="+t+"&token="+n+"&referrer=Aula&returnUrl="+encodeURIComponent(e);var r=document.createElement("a");r.href=s,r.target="INFOBA",r.click()}
1,dismissReminder:function(e,t){var n=this;this.sessionUUID;this.axios.defaults.headers.common.Authorization=this.aulaToken,this.axios.get(i+"/api/Aula/DismissReminder?reminderId="+e+"&reminderTypeId="+t,{withCredentials:!0,credentials:"same-origin"}).then((function(e){for(var t=0;t<n.tile.ReminderList.length;t++)n.item.Binder.Tile.SpfTile.ReminderList[t].ReminderId==e.data.Binder.Reminder.ReminderId&&n.item.Binder.Tile.SpfTile.ReminderList.splice(t,1)})).catch((function(e){s(n)})).finally((function(){return n.loading=!1}))},groupByDates:function(){var e=this,t=[];this.headers=[];for(var n=0;n<this.tile.ChildList.length;n++)-1===t.indexOf(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"))&&t.push(this.moment(this.tile.ChildList[n].NextEvaluationDate).format("MMMM YYYY"));for(var i=function(n){e.headers.push({Open:!1,Month:t[n],Count:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]})).length,ChildList:e.tile.ChildList.filter((function(i){return e.moment(i.NextEvaluationDate).format("MMMM YYYY")==t[n]}))})},s=0;s<t.length;s++)i(s)}},computed:{headerLinkC:function(){return null==this.item.Binder.Tile.Url||0==this.item.Binder.Tile.Url.length?{url:"",style:""}:{url:this.item.Binder.Tile.Url}}},created:function(){this.aulaToken=this.getAulaToken(),this.moment.locale("da")},watch:{aulaToken:function(){if(void 0!==this.aulaToken){this.getData(!1)}}}},r=n(3),o=Object(r.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0114V0001"},[n("div",{key:e.section,staticClass:"main-section"},[e.loading?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),e._m(0)]):"default"!=e.section?n("section",[n("div",{staticClass:"infoba-header"},[n("div",{staticStyle:{display:"flex"}},[n("i",{staticClass:"fal fa-home"}),e._v(" "),n("span",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLink)}}},[e._v("INFOBA")])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"infoba-quick-access-item"},[n("widget-html",{attrs:{html:e.message}})],1)]):n("section",[n("div",{staticClass:"infoba-header",staticStyle:{background:"#873c79"}},[n("div",{staticStyle:{display:"flex"}},[124!=e.tileType?n("div",{staticClass:"icon-spf"}):e._e(),e._v(" "),124==e.tileType?n("div",{staticClass:"icon-trafficLight"}):e._e(),e._v(" "),n("div",{staticClass:"header-link",on:{click:function(t){return e.goto(e.headerLinkC.url)}}},[e._v(e._s(e.item.Binder.Tile.Header))])]),e._v(" "),n("img",{staticClass:"infoba-logo",attrs:{src:e.domain+"/Images/logowhite.svg"}})]),e._v(" "),n("div",{staticClass:"wrapper"},[124!=e.tileType?n("div",[e.tile.ReminderList.length?n("div",[e._m(1),e._v(" "),n("div",{staticClass:"infoba-section"},e._l(e.item.Binder.Tile.SpfTile.ReminderList,(function(t){return n("div",{key:t.ReminderId},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-left":"10px","padding-bottom":"15px"}},[n("div",[n("div",[e._v(e._s(e.item.Binder.Tile.Header)+" "+e._s(t.Description)+" ")]),e._v(" "),n("div",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(n){return e.goto(e.domain+"/IN/SPF/Evaluate/"+t.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v(e._s(t.ChildName))])]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer"},on:{click:function(n){return e.dismissReminder(t.ReminderId,t.TypeId)}}},[n("div",[e._v("Afvis")]),e._v(" "),n("i",{staticClass:"fas fa-bell-slash icon-bell-off"})])])])})),0)]):e._e()]):e._e(),e._v(" "),e._l(e.headers,(function(t){return[n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"25px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",{staticClass:"theme-circle",staticStyle:{"background-color":"#873c79"}},[e._v(" "+e._s(t.Count))]),e._v(" "),n("div",[n("b",[e._v(e._s(e._f("getMonth")(e._f("firstToUpper")(t.Month))))]),e._v(e._s(e._f("getYear")(t.Month)))])]),e._v(" "),n("i",{staticClass:"fas fa-chevron-right rotate chevron",class:{right:t.Open},staticStyle:{cursor:"pointer"},on:{click:function(e){t.Open=!t.Open}}})]),e._v(" "),n("div",[e._l(t.ChildList,(function(i){return[n("transition",{key:i.Name,attrs:{name:"slide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.Open,expression:"header.Open"}],staticClass:"infoba-accordeon-row"},[n("div",{staticStyle:{display:"flex","align-items":"center","flex-grow":"1","justify-content":"space-between"}},[124!=e.tileType?n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domain+"/IN/SPF/Evaluate/"+i.ChildId+"?spfTypeId="+e.tile.TypeId)}}},[e._v(" "+e._s(i.Name))]):n("div",{staticStyle:{cursor:"pointer","margin-left":"53px"},on:{click:function(t){return e.goto(e.domainOld+"/IN/childTrivsel.aspx?r=l&cid="+i.ChildId)}}},[e._v(" "+e._s(i.Name))]),e._v(" "),124!=e.tileType?n("span",{class:"none"!=i.Reminder?"icon-alarm-"+i.Reminder:""},[n("i",{class:"none"!=i.Reminder?"far fa-alarm-clock":""}
1)]):e._e(),e._v(" "),124==e.tileType?n("span",{class:e.statusColor(i.NextEvaluationDate)},[n("i",{staticClass:"fal fa-alarm-clock"})]):e._e()])])])]}))],2)]}))],2)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"infoba-quick-access-item",staticStyle:{"text-align":"center",padding:"20px !important"}},[t("div",{staticClass:"material-icons icon-rotator infoba-rotate"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"infoba-accordeon-header",staticStyle:{"padding-left":"35px"}},[n("div",{staticClass:"ellipsis",staticStyle:{display:"flex","align-items":"center"}},[n("div",[n("b",[e._v("Påmindelse")])])])])}],!1,null,null,null);t.a=o.exports},878:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:0,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String,moment:Function},data:function(){return{aulaToken:void 0,localToken:void 0,loading:!1,medium:!0,displayDate:new Date,displayDates:[],currentWeek:this.moment().week(),showTitleId:-1,showUpdatedTitle:!1,institutions:[],errorMessage:"",fullErrorMessage:"",showFullErrorMessage:!1,mineTimerUrl:"",anmodFravaerUrl:"",institution_g_number:"",updated:"",timer:null,weekOptions:[],showWeekOptions:!1,twoMonthsAgo:this.moment().subtract(2,"month").startOf("month").startOf("week"),aYearAhead:this.moment().add(1,"year").startOf("week"),firstTime:!0,isMenuOpen:!1}},methods:{initData:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.aulaToken){t.next=2;break}return t.abrupt("return");case 2:e.errorMessage="",e.fullErrorMessage="",e.loading=!0,n="https://api.ist.dk/dtp/api/aula_work_hours_widget/get_employee_work_hours.json?date="+e.moment(e.displayDate).format("YYYY-MM-DD")+"&institutionids="+e.institutionFilter.toString().replace(" ",""),e.mineTimerUrl="https://dagtilbudpersonale.ist.com/api/personale/login_via_aula.json",e.anmodFravaerUrl="https://saml.personale.ist.dk/simplesaml/module.php/tabulexaulalogin/aula.php",e.axios.get(n,{headers:{Authorization:"Bearer "+e.aulaToken}}).then((function(t){e.institutions=t.data.data,e.institution_g_number=e.institutions[0].institution_g_number,e.dates=e.institutions[0].dates_and_total_hours_per_day,e.setWeekDates(),e.firstTime&&(e.gotoToday(),e.firstTime=!1),e.updated="Opdateret: "+e.moment(new Date).format("DD/MM-YY HH:mm:ss")})).catch((function(t){try{var n=JSON.parse(t.response.data.errors[0].message);e.errorMessage=n.short_message,e.fullErrorMessage=n.full_message,clearInterval(e.timer)}catch(t){e.errorMessage="Der er sket en uventet fejl, forsøg venligst at opdatere siden senere."}})).finally((function(){e.loading=!1}));case 9:case"end":return t.stop()}}),t)})))()},goToMineTimer:function(e){this.$el.querySelector("#ist-mine-timer"+e).submit(),this.isMenuOpen=!1},goToAnmodFravaer:function(e){this.$el.querySelector("#ist-anmod-fravaer"+e).submit(),this.isMenuOpen=!1},setWeekDates:function(){this.displayDates=[];var e=this.moment(this.displayDate).startOf("week");this.currentWeek=this.moment(this.displayDate).week();for(var t=0;t<7;t++){var n=this.addDays(e,t);if(6==this.moment(n).day()||0==this.moment(n).day())for(var i=0;i<this.institutions.length;i++)this.getWorkHoursOnDay(n,this.institutions[i]).length>0&&(this.displayDates.push(n),i=this.institutions.length);else this.displayDates.push(n)}},getWeeks:function(){for(var e=[],t=this.moment().subtract(2,"month").startOf("month").startOf("week");t<=this.aYearAhead;){var n=t.week(),i=t.year();e.push({value:i+"-W"+n,label:n+": "+t.startOf("week").format("DD/MM-YY")+" - "+t.endOf("week").format("DD/MM-YY")}),t=t.add(1,"week")}this.weekOptions=e,this.scrollToWeek()},selectWeek:function(e){this.setDisplayDate(e),this.scrollToWeek(),this.showWeekOptions=!1,this.getData()},formatDateLong:function(e){return this.moment(e).format("dddd [DEN] DD. MMMM YYYY")},formatDateShort:function(e){return this.moment(e).format("dddd DD. MMMM")},getDisplayDates:function(){return this.displayDates},getWorkHoursOnDay:function(e,t){var n=this;
1return t.duties.filter((function(t){return t.start_date===n.moment(e).format("YYYY-MM-DD")}))},getTitle:function(e){var t="Arbejdstid overlapper:";return e.overlapping_duties.forEach((function(e){t+="  "+e.time})),t},getAbsenceOnDay:function(e,t){var n=this;return t.absences.filter((function(t){return t.date===n.moment(e).format("YYYY-MM-DD")}))},getTotaleHoursPerDay:function(e,t){var n=this,i=t.dates_and_total_hours_per_day.find((function(t){return t.date===n.moment(e).format("YYYY-MM-DD")}));return i?i.totale_hours_on_day===i.totale_hours_incl_change_request?i.totale_hours_on_day:i.totale_hours_on_day+" ("+i.totale_hours_incl_change_request+")":"0:00"},showTitle:function(e){var t=this;this.showTitleId===e?this.showTitleId=-1:setTimeout((function(){t.showTitleId=e}),200)},showUpdated:function(){var e=this;this.showUpdatedTitle=!this.showUpdatedTitle,this.showUpdatedTitle&&setTimeout((function(){e.showUpdatedTitle=!1}),1e3)},gotoToday:function(){var e=this;setTimeout((function(){var t=e.moment().format("YYYYMMDD"),n=e.$el.querySelector("[ist-date='"+t+"']");n&&n.scrollIntoView({behavior:"smooth"})}),500)},scrollToWeek:function(){var e=this,t=this.moment(this.displayDate).year()+"-W"+this.moment(this.displayDate).week();setTimeout((function(){var n=e.$el.querySelector("[ist-week='"+t+"']");n&&(n.style.fontWeight="bold",n.scrollIntoView())}),10)},setDisplayDate:function(e){var t=e.split("-W");this.currentWeek=t[1],this.displayDate=this.moment().year(t[0]).week(this.currentWeek).day(1).toDate()},backWeek:function(){this.displayDate=this.addDays(this.displayDate,-7),this.getData()},forwardWeek:function(){this.displayDate=this.addDays(this.displayDate,7),this.getData()},getData:function(){var e=this;this.showWeekOptions=!1,this.dates.find((function(t){return t.date===e.moment(e.displayDate).format("YYYY-MM-DD")}))?this.setWeekDates():this.initData()},addDays:function(e,t){var n=new Date(e);return n.setDate(n.getDate()+t),n},isMobile:function(){return document.body.clientWidth<500||this.isMobileApp},toggleMenu:function(){this.isMenuOpen=!this.isMenuOpen}},computed:{disableNextDay:function(){return this.displayDate>this.aYearAhead},disablePreviousDay:function(){return this.displayDate<this.twoMonthsAgo}},created:function(){this.moment.locale("da")},mounted:function(){var e=this;this.getWeeks(),this.medium="narrow"!==this.placement,this.aulaToken=this.getAulaToken(),this.timer=setInterval((function(){e.aulaToken=e.getAulaToken()}),3e5)},beforeDestroy:function(){clearInterval(this.timer)},watch:{showWeekOptions:function(){this.showWeekOptions&&this.scrollToWeek()},currentWeekNumber:function(){this.setDisplayDate(this.currentWeekNumber),this.initData()},aulaToken:function(){this.aulaToken&&this.aulaToken!==this.localToken&&(this.localToken=this.aulaToken,this.initData())},placement:function(){this.medium="medium"===this.placement},institutionFilter:function(){var e=this;this.fravaersInfo&&this.fravaersInfo.length&&(this.fravaersInfo=this.fravaersInfo.filter((function(t){return e.institutionFilter.find((function(e){return t.skoleId===e}))})))}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0116V0001"},[n("div",{on:{click:function(t){return e.showTitle(-1)}}},[n("div",{class:{"widget-scroll":"narrow"===e.placement&&!e.isMobile()},attrs:{id:"ist-div"}},[n("div",{class:{"ist-sticky":"narrow"===e.placement||e.isMobile()}},[n("div",{staticClass:"ist-top"},[e._m(0),e._v(" "),""!==e.errorMessage?n("div",{staticStyle:{"margin-top":"-20px"}},[n("br"),e._v(e._s(e.errorMessage)+"\n            "),""===e.fullErrorMessage||e.showFullErrorMessage?e._e():n("i",{staticClass:"fas fa-chevron-down errormessage-chevron",on:{click:function(t){e.showFullErrorMessage=!e.showFullErrorMessage}}}),e._v(" "),""!==e.fullErrorMessage&&e.showFullErrorMessage?n("i",{staticClass:"fas fa-chevron-up errormessage-chevron",on:{click:function(t){e.showFullErrorMessage=!e.showFullErrorMessage}}}):e._e(),e._v(" "),e.showFullErrorMessage?n("div",{staticClass:"ist-errormessage"}
1,[e._v(e._s(e.fullErrorMessage))]):e._e()]):e._e()]),e._v(" "),""===e.errorMessage&&e.institutions.length>0?n("div",{staticClass:"weekpicker"},[n("div",{staticClass:"ist-date-button date-back"},[n("b-button",{staticClass:"btn btn-link navbar-btn navbar-link",attrs:{disabled:e.disablePreviousDay},on:{click:e.backWeek}},[n("i",{staticClass:"fas fa-chevron-left"})])],1),e._v(" "),n("div",{staticClass:"ist-date"},[e._v("\n            Uge "+e._s(e.currentWeek)+"\n            "),n("b-button",{staticClass:"btn btn-link navbar-btn navbar-link ist-weekoptions-arrow",on:{click:function(t){e.showWeekOptions=!e.showWeekOptions}}},[n("i",{staticClass:"fas fa-chevron-down"})]),e._v(" "),e.showWeekOptions?n("div",{staticClass:"ist-weekoptions"},e._l(e.weekOptions,(function(t){return n("div",{key:t.value,attrs:{"ist-week":t.value},on:{click:function(n){return e.selectWeek(t.value)}}},[e._v("\n                "+e._s(t.label)+"\n              ")])})),0):e._e()],1),e._v(" "),n("div",{staticClass:"ist-date-button date-forward"},[n("b-button",{staticClass:"btn btn-link navbar-btn navbar-link",attrs:{disabled:e.disableNextDay},on:{click:e.forwardWeek}},[n("i",{staticClass:"fas fa-chevron-right"})])],1)]):e._e()]),e._v("\n      "+e._s(e.institution)+"\n      "),e._l(e.institutions,(function(t,i){return n("div",{key:i},[n("div",{class:{"ist-header":"narrow"!==e.placement}},[n("div",[e._v(e._s(t.institution_name))]),e._v(" "),e.aulaToken?n("div",{staticStyle:{display:"flow-root"}},[n("div",{staticClass:"menucontainer"},[n("b-button",{staticClass:"btn btn-link navbar-btn navbar-link ist-weekoptions-arrow",on:{click:e.toggleMenu}},[n("i",{staticClass:"fas fa-ellipsis-v"})]),e._v(" "),e.isMenuOpen?n("div",{staticClass:"dropdownmenu"},[n("form",{attrs:{id:"ist-anmod-fravaer"+t.institution_g_number,action:e.anmodFravaerUrl,method:"get",target:"Dagtilbud_Personale_fravær"}},[n("div",{key:"absence",staticClass:"menuitem",on:{click:function(n){return e.goToAnmodFravaer(t.institution_g_number)}}},[e._v("\n                    Anmod fravær\n                  ")]),e._v(" "),n("input",{attrs:{type:"text",name:"aulaToken",hidden:""},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"text",name:"userProfile",hidden:""},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"text",name:"institution",hidden:""},domProps:{value:t.institution_g_number}}),e._v(" "),n("input",{attrs:{type:"text",name:"appid",hidden:""},domProps:{value:e.anmodfravaerdtp}})]),e._v(" "),n("form",{attrs:{id:"ist-mine-timer"+t.institution_g_number,action:e.mineTimerUrl,method:"get",target:"Dagtilbud_Personale"}},[n("div",{key:"timer",staticClass:"menuitem",on:{click:function(n){return e.goToMineTimer(t.institution_g_number)}}},[e._v("\n                    Rediger arbejdstimer\n                  ")]),e._v(" "),n("input",{attrs:{type:"text",name:"token",hidden:""},domProps:{value:"Bearer "+e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"text",name:"institution_g_number",hidden:""},domProps:{value:t.institution_g_number}})])]):e._e()],1)]):e._e()]),e._v(" "),n("div",{staticClass:"ist-day",class:{"weekplan-medium":"narrow"!==e.placement&&!e.isMobile(),"weekplan-narrow":"narrow"===e.placement||e.isMobile()}},e._l(e.getDisplayDates(),(function(i,s){return n("div",{key:s,staticClass:"list-table",attrs:{value:i}},[n("table",[n("tbody",[n("div",[n("tr",[n("td",{staticClass:"widget-header",class:{today:e.moment().isSame(i,"day")}},[e.medium?n("span",{attrs:{"ist-date":e.moment(i).format("YYYYMMDD")}},[e._v(e._s(e.formatDateShort(i)))]):n("span",{attrs:{"ist-date":e.moment(i).format("YYYYMMDD")}},[e._v(e._s(e.formatDateLong(i)))])])]),e._v(" "),n("tr",[n("td",{staticClass:"hours"},[n("span",[e._v("Arbejdstimer "+e._s(e.getTotaleHoursPerDay(i,t)))])])]),e._v(" "),n("tr",[n("td",{staticClass:"absence"},e._l(e.getAbsenceOnDay(i,t),(function(t,i){return n("span",{key:i},[e._v(e._s(t.code+" "))])})),0)]),e._v(" "),n("tr",[n("td",e._l(e.getWorkHoursOnDay(i,t),(function(t,i){return n("div",{key:"workhours"+i,staticClass:"day-group"},[n("div",{staticClass:"day-view-time-event"},[t.duration_override?e._e():n("div",[e._v("\n                          "+e._s(t.start_time)+"\n                        ")]),e._v(" "),t.duration_override?e._e():n("div",{staticClass:"content-bottom"},[e._v("\n                          "+e._s(t.end_time)+"\n                        ")]),e._v(" "),t.duration_override&&2!==t.target?n("div",{staticClass:"duration-clock"},[n("i",{staticClass:"far fa-clock"}
1)]):e._e(),e._v(" "),t.duration_override&&2===t.target?n("div",{staticClass:"duration-clock"},[n("i",{staticClass:"far fa-hourglass-half"})]):e._e()]),e._v(" "),n("div",{staticClass:"day-view-title-event"},[!t.duration_override&&(t.overlapping_duties.length>0||t.events_outside_workhours.length>0)?n("div",{staticClass:"alert-icon"},[n("i",{staticClass:"fas fa-exclamation-circle",on:{click:function(n){return e.showTitle(t.id)}}})]):e._e(),e._v(" "),e.showTitleId===t.id?n("div",{staticClass:"title-div",class:{"title-div-position":"narrow"!==e.placement}},[n("div",{staticClass:"close-icon",on:{click:function(t){e.showTitleId=-1}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._l(t.events_outside_workhours,(function(t,i){return n("div",{key:i,staticClass:"new-item",attrs:{value:t}},[e._v("\n                            "+e._s(t.name)+"\n                          ")])})),e._v(" "),e._l(t.overlapping_duties,(function(t,i){return n("div",{key:i,staticStyle:{"padding-bottom":"5px"},attrs:{value:t}},[e._v("\n                            "+e._s(t.name)+"\n                            "+e._s(t.overlap_warning)+"\n                          ")])}))],2):e._e(),e._v(" "),t.opening_duty&&!t.duration_override?n("div",{staticClass:"new-item"}
1,[n("strong",[e._v("Åbne vagt")]),n("br")]):e._e(),e._v(" "),e._l(t.pools,(function(t,i){return n("div",{key:i,staticClass:"new-item"},[e._v("\n                          "+e._s(t.name)+"\n                          "),t.spend?n("div",[e._v("Forbrug: "+e._s(t.spend))]):e._e(),e._v(" "),t.event_name?n("div",[e._v("\n                            "+e._s(t.event_name)+" "),n("br"),e._v(e._s(t.time)+"\n                          ")]):e._e()])})),e._v(" "),e._l(t.events,(function(t,i){return n("div",{key:i,staticClass:"new-item"},[e._v("\n                          "+e._s(t.name)+" "),n("br"),e._v("\n                          "+e._s(t.time)+"\n                        ")])})),e._v(" "),t.duration_override&&""===t.start_time&&2!==t.target?n("div",{staticClass:"new-item"},[e._v("\n                          "+e._s(t.duration+" timer uden start/slut tid")+"\n                        ")]):e._e(),e._v(" "),t.duration_override&&""!==t.start_time?n("div",{staticClass:"new-item"},[e._v("\n                          "+e._s("Varighed: "+t.duration+"\nOprindelig: "+t.start_time+" - "+t.end_time)+"\n                        ")]):e._e(),e._v(" "),e._l(t.durations,(function(t,i){return n("div",{key:i,staticClass:"new-item"},[e._v("\n                          "+e._s(t.name)+"\n                        ")])})),e._v(" "),e._l(t.change_requests,(function(t,i){return n("div",{key:i,staticClass:"new-item"},[n("i",{staticClass:"far fa-calendar"}),e._v(" "),1!==t.status&&2!==t.status?n("span",[e._v(e._s(t.start_time)+"-"+e._s(t.end_time)),n("br")]):e._e(
1),e._v("\n                          >"+e._s(t.start_time)+"-"+e._s(t.end_time)),n("br"),e._v(" "),0===t.status?n("span",[n("b",[e._v("Afventer")])]):e._e(),e._v(" "),1===t.status?n("span",{staticStyle:{color:"#45b7c1"}},[n("b",[e._v("Godkendt")])]):e._e(),e._v(" "),3===t.status?n("span",{staticStyle:{color:"#222350"}},[n("b",[e._v("Nulstillet")])]):e._e(),e._v("\n                          >\n                          "),2===t.status?n("span",{staticStyle:{color:"#b50050"}},[n("b",[e._v("Afvist")])]):e._e(),e._v(" "),""!==t.note?n("i",{staticClass:"far fa-comment",attrs:{"aria-hidden":"true",title:"Se note i Dagtilbud Personale"}}):e._e()])})),e._v(" "),t.closing_duty&&!t.duration_override?n("div",[n("strong",[e._v("Lukke vagt")]),n("br")]):e._e()],2)])})),0)])])])])])})),0)])})),e._v(" "),e.showUpdatedTitle?n("div",{staticClass:"title-div-updated"},[e._v("Data hentes hvert 5. minut")]):e._e(),e._v(" "),n("div",{staticClass:"hours",class:{"mobile-bottom":e.isMobile()},staticStyle:{cursor:"pointer"},on:{click:function(t){return e.showUpdated()}}},[e._v("\n        "+e._s(e.updated)+" "),e.loading?n("i",{staticClass:"fa fa-spinner fa-spin"}):e._e()])],2)])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{display:"flex","flex-direction":"row"}},[n("div",{staticStyle:{display:"flex","flex-direction":"column"}},[n("div",[n("h5",[e._v("Arbejdstid")])]),e._v(" "),n("div",{staticClass:"ist-dtp"},[e._v("Dagtilbud Personale")])])])}],!1,null,null,null);t.a=c.exports},879:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://kkapi.pay4it.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://skolemad-klub.kk.dk/aula/login?return",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0118V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}
1),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])})),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"Gå til skolemad oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("Gå til Skolemad")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=a.exports},880:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={mixins:[{props:{axios:Function,moment:Function,getAulaToken:Function,devServer:String,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,assuranceLevel:Number,userProfile:String,childFilter:[String,Array],institutionFilter:[String,Array],group:String,meebookImgBaseUrl:{type:String,default:"https://app.meebook.com/images/aula/"},meebookApiBaseUrl:String},data:function(){return{loading:!0,items:[],errors:[],showAll:!1,aulaToken:null}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this._aulaTokenRefreshInterval=setInterval((function(){e.refreshAulaTokenSilently()}),24e4)},beforeDestroy:function(){this._aulaTokenRefreshInterval&&clearInterval(this._aulaTokenRefreshInterval)},watch:{aulaToken:function(e,t){e&&!t&&this.loadContent()}},computed:{maxShown:function(){return this.showAll?1/0:3},hasErrors:function(){return this.errors&&this.errors.length}},methods:{ensureAulaToken:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAulaToken();case 2:return(n=t.sent)&&(e.aulaToken=n),t.abrupt("return",e.aulaToken);case 5:case"end":return t.stop()}}),t)})))()},refreshAulaTokenSilently:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAulaToken();case 3:(n=t.sent)&&(e.aulaToken=n),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getClient:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ensureAulaToken();case 2:return t.abrupt("return",e.axios.create({baseURL:e.getApiBaseUrl(),timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:"Bearer "+e.aulaToken,sessionUUID:e.sessionUUID,"X-Version":"1.0"}}));case 3:case"end":return t.stop()}}),t)})))()},getApiBaseUrl:function(){return"https://app.meebook.com/aulaapi/"},getBookIcon:function(){return"background-image: url("+this.meebookImgBaseUrl+"meebook-2x.png)"},toggleShowAll:function(){this.showAll=!this.showAll}}}],data:function(){return{data:{notifications:{items:[],pagination:[]},links:[]},loading:!0,widgetIdentifier:"NotificationWidget-",typeIdentifier:"linkauth"}},methods:{getBaseUrl:function(){return"https://app.meebook.com"},getThisYearWeek:function(){var e=new Date,t=e.getFullYear(),n=e-new Date(t,0,1),i=Math.floor(n/864e5),s=Math.ceil(i/7);return"".concat(t,"-W").concat(s<10?"0"+s:s)},loadContent:function(){var e=arguments,t=this;return s()(r.a.mark((function n(){var i,s,a;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]&&e[0],t.errors=[],n.prev=2,n.next=5,t.getClient();case 5:return s=n.sent,n.next=8,s.get("relatednotifications",{params:{currentWeekNumber:t.getThisYearWeek(),userProfile:t.userProfile,childFilter:t.childFilter,institutionFilter:t.institutionFilter}});case 8:a=n.sent,t.loading=!1,t.data=a.data||[],n.next=31;break;case 13:if(n.prev=13,n.t0=n.catch(2),!n.t0.response||401!==n.t0.response.status||i){n.next=28;break}return t.loading=!0,t.errors.push("Din Aula-token fornyes.. Øjeblik"),n.prev=18,n.next=21,t.ensureAulaToken();case 21:return t.errors.pop(),n.abrupt("return",t.loadContent(!0));case 25:n.prev=25,n.t1=n.catch(18),t.errors.pop();case 28:t.loading=!1,t.data=[],n.t0.response&&n.t0.response.data&&n.t0.response.data.exceptionMessage?t.errors.push(n.t0.response.data.exceptionMessage):t.errors.push("Notifikationer kunne ikke hentes");case 31:case"end":return n.stop()}}),n,null,[[2,13],[18,25]])})))()},renderTitle:function(e){switch(e.type){case"messagebook_comment_new":case"messagebook_published":return this.possesiveFirstname(e.data.studentName)+" meddelelsesbog";case"annualplan_published":return this.possesiveFirstname(e.data.studentName)+" årsplan";case"upv_published":return this.possesiveFirstname(e.data.studentName)+" UPV";default:return"Unknown notification"}},renderMessage:function(e){switch(e.type){case"messagebook_comment_new":return this.firstname(e.data.senderName)+": "+e.data.excerpt;case"messagebook_published":return"Ny meddelelsesbog for ".concat(e.data.yearSpan);case"annualplan_published":return"Ny årsplan for ".concat(e.data.categories.join(", "));case"upv_published":return"Ny UPV for ".concat(e.data.yearSpan)}},renderDate:function(e){var t=new Date,n=new Date;n.setDate(n.getDate()-1);var i=new Date(e);return t.setHours(0,0,0,0),i.setHours(0,0,0,0),n.setHours(0,0,0,0),i.getTime()===t.getTime()?"I dag":i.getTime()===n.getTime()?"I går":i.toLocaleDateString("da",{day:"numeric",month:"short"})},firstname:function(e){return e.split(" ")[0]},possesiveFirstname:function(e){var t=this.firstname(e);return["x","s","z"].includes(t.slice(-1))?t+"'":t+"s"}}},l=o,c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0119V0001"},[n("div",{staticClass:"widget",class:e.placement},[n("h2",{staticClass:"title"}
1,[e._v("Meebook")]),e._v(" "),e.loading?n("div",{staticClass:"widget-loader"},[n("i",{staticClass:"fa fa-spinner"}),e._v("\n      Loading...\n    ")]):e._e(),e._v(" "),e.hasErrors?n("div",[n("ul",{staticClass:"errors"},e._l(e.errors,(function(t){return n("li",{key:t,staticClass:"errors__error"},[e._v("\n          "+e._s(t)+"\n        ")])})),0)]):e._e(),e._v(" "),n("ul",{staticClass:"links"},[n("li",[e._v("Gå til:")]),e._v(" "),e._l(e.data.links,(function(t,i){return n("li",{key:i},[n("form",{staticClass:"links__form",attrs:{action:e.getApiBaseUrl()+"relatednotificationslinkauth/",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"type"},domProps:{value:e.typeIdentifier}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:encodeURIComponent(e.getBaseUrl()+t.path+"?aulaJWT="+e.aulaToken)}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.getThisYearWeek()}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),e._l(e.institutionFilter,(function(e){return n("input",{key:e,attrs:{type:"hidden",name:"institutionFilter[]"},domProps:{value:e}})})),e._v(" "),e._l(e.childFilter,(function(e){return n("input",{key:e,attrs:{type:"hidden",name:"childFilter[]"},domProps:{value:e}})})),e._v(" "),n("button",{staticClass:"links__submit",attrs:{type:"submit"}},[e._v(e._s(t.label))])],2)])}))],2),e._v(" "),0===e.data.notifications.items.length?n("div",{staticClass:"empty-state"},[n("h3",{staticClass:"empty-state__title"},[e._v("Ingen notifikationer")]),e._v(" "),n("p",{staticClass:"empty-state__body"},[e._v("Når der sker noget nyt i Meebook,\n        vil det blive vist her")])]):n("ul",e._l(e.data.notifications.items,(function(t){return t.data.isVisibleForRelated?n("li",{key:t.id,staticClass:"notification"},[n("div",{staticClass:"notification__header"},[n("h2",{staticClass:"notification__title"},[e._v(e._s(e.renderTitle(t)))]),e._v(" "),n("time",{staticClass:"notification__date"},[e._v(e._s(e.renderDate(t.date)))])]),e._v(" "),n("p",{staticClass:"notification__subtitle"},["messagebook_comment_new"===t.type?n("span",{staticClass:"notification__bubble"}):e._e(),e._v("\n          "+e._s(e.renderMessage(t))+"\n        ")]),e._v(" "),n("form",{staticClass:"notification__form",attrs:{action:e.getApiBaseUrl()+"relatednotificationslinkauth/",method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"type"},domProps:{value:e.typeIdentifier}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:encodeURIComponent(e.getBaseUrl()+t.link+"&aulaJWT="+e.aulaToken)}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.getThisYearWeek()}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaJWT"},domProps:{value:e.aulaToken}}),e._v(" "),e._l(e.institutionFilter,(function(e){return n("input",{key:e,attrs:{type:"hidden",name:"institutionFilter[]"},domProps:{value:e}})})),e._v(" "),e._l(e.childFilter,(function(e){return n("input",{key:e,attrs:{type:"hidden",name:"childFilter[]"},domProps:{value:e}})})),e._v(" "),n("button",{staticClass:"notification__link",attrs:{type:"submit"}},[e._v("Se på Meebook")])],2)]):e._e()})),0)])])}),[],!1,null,null,null);t.a=u.exports},881:function(e,t,n){"use strict";var i={props:{assuranceLevel:Number,axios:Function,childFilter:[String,Array],currentWeekNumber:String,getAulaToken:Function,group:String,institutionFilter:[String,Array],isMobileApp:Boolean,placement:String,sessionUUID:String,userProfile:String},data:function(){return{aulaToken:null,error:"",isLoading:!1,link:"https://api.minuddannelse.net/aula/redirect",result:{harAdgang:!1,personType:""},tempAulaToken:"",widgetName:"MessageBook"}},watch:{aulaToken:function(){void 0!==this.aulaToken&&this.validateMbLicens()}},computed:{getTempAulaToken:function(){return this.tempAulaToken}},methods:{addAulaTokenOnSubmit:function(e){var t=this;e.preventDefault(),this.tempAulaToken=this.aulaToken,setTimeout((function(){Array.isArray(t.$refs.mBForm)?t.$refs.mBForm[0].submit():t.$refs.mBForm.submit(),setTimeout((function(){t.tempAulaToken=""}),500)}),500)},validateMbLicens:function(){var e=this,t={widgetName:this.widgetName},n=["axios","getaulatoken"];
1Object.keys(this.$props).forEach((function(i){n.includes(i.toLowerCase())||(t[i]=e.$props[i]?e.$props[i].toString():e.$props[i])}));var i={method:"get",headers:{Authorization:"Bearer ".concat(this.aulaToken),Accept:"application/json"},params:t,url:"https://api.minuddannelse.net/aula/meddelelsesbog"};this.axios(i).then((function(t){e.error="",e.result=t.data,e.isLoading=!1})).catch((function(){e.error="error",e.isLoading=!1}))}},created:function(){this.isLoading=!0,this.aulaToken=this.getAulaToken()}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0120V0001"},[n("div",{staticClass:"mb-container"},[e.isLoading?n("div",{staticClass:"spinner-wrapper"},[n("i",{staticClass:"fa fa-spinner fa-spin"}),e._v("\n      MinUddannelse Meddelelsesbog: Henter link...\n    ")]):"error"===e.error||!e.result.harAdgang&&"employee"===e.userProfile.toLowerCase()?n("span",{staticClass:"error-message"},[e._v("\nMinUddannelse Meddelelsesbog: Noget gik galt med at hente link. Prøv evt. at logge ud og ind igen.\n")]):e.result.harAdgang?n("form",{ref:"mBForm",attrs:{method:"GET",target:"_blank",action:e.link},on:{submit:e.addAulaTokenOnSubmit}},[n("input",{attrs:{type:"hidden",name:"sessionUUID"},domProps:{value:e.sessionUUID}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"placement"},domProps:{value:e.placement}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"currentWeekNumber"},domProps:{value:e.currentWeekNumber}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"isMobileApp"},domProps:{value:e.isMobileApp}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"assuranceLevel"},domProps:{value:e.assuranceLevel}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"childFilter"},domProps:{value:e.childFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"institutionFilter"},domProps:{value:e.institutionFilter}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"group"},domProps:{value:e.group}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.getTempAulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"widgetName"},domProps:{value:e.widgetName}}),e._v(" "),n("b-button",{staticClass:"mb-button",attrs:{role:"link",title:"https://www.minuddannelse.net",type:"submit"}},[n("b-row",{staticClass:"button-logo"},[n("div",{staticClass:"logo"},[n("b-img",{attrs:{src:"https://www.minuddannelse.net/Content/Graphics/Frontpage/logo_mu.svg",alt:"MinUddannelse logo"}})],1),e._v(" "),n("div",[e._v("\n            Meddelelsesbog\n          ")])])],1)],1):e.result.harAdgang?e._e():n("span",{staticClass:"text-muted"},["child"===e.userProfile.toLowerCase()?n("span",[e._v("\nMinUddannelse Meddelelsesbog: Dine lærere har ikke skrevet noget i din meddelelsesbog endnu.\n")]):"guardian"===e.userProfile.toLowerCase()||"otp"===e.userProfile.toLowerCase()?n("span",[e._v("\nMinUddannelse Meddelelsesbog: Skolens personale har ikke skrevet noget i dit barns/dine børns meddelelsesbog endnu.\n")]):e._e()])])])}),[],!1,null,null,null);t.a=a.exports},882:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String},data:function(){return{aulaToken:null,aioUrl:"https://skole.fkpay.dk/aula/login"}},methods:{},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0126V0001"},[n("div",{staticClass:"widget-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[n("div",{staticClass:"widget-header"},[e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),e._m(0)]):e._e()])])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"widget-login-button",attrs:{type:"submit","aria-label":"Gå til FKPay"}},[n("span",{staticClass:"mr-8"},[e._v("Gå til FKPay")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null);t.a=a.exports},883:function(e,t,n){"use strict";var i,s=n(12),a=n.n(s),r=n(7),o=n.n(r),l=n(78),c=n.n(l),u={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,getAulaToken:Function,assuranceLevel:Number,institutionCode:String,userProfile:String,childFilter:Array,institutionFilter:Array,group:String,triggerStepUp:Function,notifications:Array,deleteNotifications:Function,setIframeHeight:Function,getProps:Function},data:function(){return{heading:null,isLoading:!0,items:[]}},created:(i=a()(o.a.mark((function e(){var t,n,i,s,a,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c()("https://vivi.dk/api/AulaWidget/GetAulaLinks").catch((function(){}));case 2:t=e.sent,n=(t||{}).data,s=(i=n||{}).heading,a=i.items,r=void 0===a?[]:a,this.isLoading=!1,this.heading=s,this.items=(r.length?r:[]).filter((function(e){return null==e?void 0:e.url}));case 8:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},d=u,h=n(3),m=Object(h.a)(d,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-viborg-link-list",class:"c-viborg-link-list--"+e.placement},[e.heading?n("div",{staticClass:"c-viborg-link-list__main-heading",domProps:{textContent:e._s(e.heading)}}
1):e._e(),e._v(" "),e.isLoading?n("div",{key:"loading",staticClass:"c-viborg-link-list__link"},[e._v("\n    Indlæser...\n  ")]):e.items.length?e._l(e.items,(function(t,i){return n("a",{key:i,staticClass:"c-viborg-link-list__link",attrs:{href:t.url,target:"_blank"}},[t.title?n("span",{staticClass:"c-viborg-link-list__heading",domProps:{textContent:e._s(t.title)}}):e._e(),e._v(" "),t.teaser?n("p",{staticClass:"c-viborg-link-list__teaser",domProps:{textContent:e._s(t.teaser)}}):e._e(),e._v(" "),n("div",{staticClass:"c-viborg-link-list__link-arrow"},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 34 34","svg-inline":"","aria-hidden":"true",role:"presentation",focusable:"false",tabindex:"-1"}},[n("path",{staticClass:"circle",attrs:{d:"M17.007.007c9.4 0 17 7.6 17 17s-7.6 17-17 17-17-7.6-17-17 7.6-17 17-17z",fill:"#afe0ce"}}),e._v(" "),n("path",{staticClass:"st1",attrs:{d:"M20.088 22.371c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l3.4-3.4-3.4-3.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l4.2 4.1c.2.2.3.4.3.7 0 .3-.1.5-.3.7l-4.1 4.1c-.3.2-.5.3-.8.3z"}}),e._v(" "),n("path",{staticClass:"st1",attrs:{d:"M22.988 18.271h-13c-.6 0-1-.4-1-1s.4-1 1-1h13c.6 0 1 .4 1 1s-.4 1-1 1z"}})]),e._v("\n\n        Læs mere\n      ")])])})):n("p",[e._v("Der er ingen links tilgængelige")])],2)}),[],!1,null,"7a592527",null);t.a=m.exports},884:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://randerskommunebetalingskort.dk/aula/login?return",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0129V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}
1),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])})),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"GÃ¥ til skolemad oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("GÃ¥ til madbestilling")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=a.exports},885:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://gribskovpay.dk/aula/login?return",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}
1).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0130V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])})),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(
1),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"Gå til GribskovPay oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("Gå til GribskovPay")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=a.exports},886:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://ishøjpay.dk/aula/login",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0132V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}
1),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])})),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name)+"\n        ")]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"Gå til Ishøj Pay"}},[n("span",{staticClass:"mr-8"},[e._v("Gå til Ishøj Pay")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=a.exports},887:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},childCount:null,activeChild:null,activeProduct:null,apiUrl:"https://kkapi.pay4it.dk/V2/Wallet/AulaClubInfo",aioUrl:"https://skolemad-klub.kk.dk/aula/login?return"}},methods:{getChildren:function(){var e=this,t=this.moment().format();this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:t}).then((function(t){e.errors=[],e.childInfo=t.data,e.childCount=0,e.childInfo.Wallets&&(e.childCount=e.childInfo.Wallets.length,e.childInfo.Wallets.forEac
1h((function(e,t){e.expand=!0,e.Balance={Amount:parseFloat(e.WalletBalance),Credit:parseFloat(e.CreditBalance)}})))})).catch((function(t){e.errors.push(t),e.dataFetchFailed=!0})).finally((function(){e.loading=!1}))},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)},currency:function(e){return"number"!=typeof e?e:new Intl.NumberFormat("da-DK",{style:"currency",currency:"DKK"}).format(e)}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren()}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0134V0001"},[n("div",{staticClass:"widget-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[e._m(0),e._v(" "),e.dataFetchFailed&&e.aulaToken?n("div",[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),e._m(1)])]):e._e(),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"widget-error"},[n("span",[e._v(e._s(t))])])})),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"widget-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"widget-child-info",class:{expand:t.expand}},[n("div",{staticClass:"balance-container"},[n("div",{staticClass:"balance"},[n("div",{staticClass:"balance-title"},[e._v("Saldo")]),e._v(" "),n("div",{staticClass:"balance-value"},[e._v(e._s(e.currency(t.Balance.Amount)))])]),e._v(" "),t.Balance.Credit?n("div",{staticClass:"balance"},[n("div",{staticClass:"balance-title"},[e._v("Tilskud")]),e._v(" "),n("div",{staticClass:"balance-value"},[e._v(e._s(e.currency(t.Balance.Credit)))])]):e._e()]),e._v(" "),!t.NFCAdded&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/NFC/Index?WalletID="+t.WalletID}}),e._v(" "),n("button",{staticClass:"missing-card-info",attrs:{type:"submit","aria-label":"Tilføj klubkort for "+t.Name}},[n("strong",[e._v("Vigtigt:")]),e._v(" Der er ikke tilføjet et klubkort til kontoen.\n              "),n("strong",[e._v("Tryk her for at tilføje.")])])]):e._e(),e._v(" "),t.NFCAdded?n("div",[e._m(2,!0)]):e._e(),e._v(" "),n("div",{staticClass:"account-child-info"},[n("div",{staticClass:"account-buttons"},[e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/DepositWithdraw/Deposit?WalletID="+t.WalletID}}),e._v(" "),n("button",{staticClass:"account-button",attrs:{type:"submit","aria-label":"Optank saldo for "+t.Name}},[e._v("\n                  Optank Saldo\n                ")])]):e._e(),e._v(" "),e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/Webshop/Index?WalletID="+t.WalletID}}),e._v(" "),n("button",{staticClass:"account-button",attrs:{type:"submit","aria-label":"Køb webshop-produkter for "+t.Name}},[e._v("\n                  Webshop\n                ")])]):e._e(
1)])])])])})),0):e._e(),e._v(" "),e.childCount||e.loading?e._e():n("div",{staticClass:"error-container"},[e._m(3)]),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"widget-header"},[t("img",{attrs:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAToAAABKCAYAAAArF5gpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABcVJREFUeNrsneuV4jgQRmv2bALeELwhMCG4QzAh0CGYEJoQIAQcAoQwhIBDaIfg/dHirKfHLj0sP8D3nsOPbgx6lPWpSrKKH03TCADAK/MXXQAACB0AAEIHAIDQAQAgdAAACB0AAEIHAIDQAQBCBwCA0AEAIHQAAAgdAABCBwCA0AEAIHQAAAgdACB0AAAIHQAAQgcAgNDNSSEiTc/rmct6lTo/Y58tnY2IXOgGkb/pAoCX5MNMHkDoCvBy7ETkE
15HDowN4RTLjxW3oCjw6gFdlg8ghdACA0AEAIHQAAAgdAMBSYdcVQklFJO/4/+HJ25Wbts3Vrkx+31QoRaTidhtI0zRreRVNP7bPpspn703TJBHKuvRcf/Fs573ne4pI/VMoZbT7pFiwfbrK/tW4UZjyYrctU+pw7mhDDHZrGf+Erm4clff2IlKvxIP7JV/PaqUO136IyN14KEu1z06+jpj5PH/2aNdRRJKIXtxFqUMuHOVijW5kCmWwlua1BpG7iP9zWo/PFQuzT2LqdRxQ7s4I/yZC354drtsIpx0QuhHXSz563qtE5H0l/XB28OJsXlCxEPs8RC6Gp5lGELsPD88QoUPoorOxzLTblYSsInGeuI99PCnUPkeJf4LgMmAiyD2uTQZOOKuFXdd+T0FbE3kXkdtK+6aWrx3IqhUWFi0xs4nd24z22TkIy8m07dASotTStsQI6JC27U3ZienPneJFVub6732SKd/dxWruYYSue4Y9WwbRaaV9UxpP6TuHlkiclQH3GIzXmeyjhX63HoEsW208K0I5pG3bVjm1qUdqCa8PPXVwvZbQdcUcETl1YG0dvL03y2DPZrLPTgn7KlNvm4eztdh/F9Cmq3RvmFyVPgaELjgUultuVNtN/spUSvjTJzh1RKGLYZ8ssL5dYWCleJu+j5z4ChoPDyN0wVwss/1PWcdjJH34Cnyl9NdmJvtkSsjqE27Wlv7wbV9f2WlPXfHoAmCNzj7A3+mGoHUnLQxMI3kmrvZJFE+rjNwfvruitfL/Pd4cQjc2tpl7TYTszlUW4ZnSPkmA0IT2RxKpnw7cdoSuU5DI8AdlY5AG1HuMvog9ibyKfQChe/rQ7HE8J5mgDnUEkUlGqms60WfGsk8dWcQ3I4s4IHSjsFXCkal+G1MTOtcF7rG8myyiGNTiv9Y01D61xN8FDgnZAaGbldoMpkoZTOcZ6+c6GPORyvd9PixV6lLNZJ+r0rdZxP5Y4mmD1Yf3CN3vA/BNmflzsR9xGuLpVAOFJpWwB1ZdB4pP27UURuVM9tF2Sn0O1mtpqsoZQ9c6MNRG6FYsdn0U4pZBog7wuiqL0Bwt74+9llg4eE0umUHKmexzsniELgfzzxb7L3WXPl/7wEboukOPN8uMnjsMSG0wXsz3ZB7ewCP/WdEStMz8fZ9o1s7l/1+BzzsE5tMicicZvoY1xD4Hi9fzSKhZfGtzIV8JOnOLgF9nvm81u7XPIGcek/ZrQCr13lTdO0sa6kwpK3FMZf39O47NeAxJpR6DT0tK86nscx6pbelIaeJ9Xp+e9T6SSh1Oop/vPIu+sxgyux8irPHEXiO6RvrO2Pn7Qu2zlbgbBo9EBkvYbS0ZtoSuIRyUcMf2wOo+oLyhWYvHSAZaiT1riQ1bRpOp7RPr7LJr1pMp71cf+69mNxahs7NXBoW2CXALFIgyQOweXsVYM/o10Gu5GVG5LtA+W/HLWtLlUf4ry3qcxLYzjUcHVk+pb7BuFM+hNIOhL7VPpQwiV69jb8oYeyH82mqLy7Vb04bbgu1zEpF/TJtc6lm3+nupyR5upn62HeBK5t08mZQfTdMgY8tn1+GVXGf2Jjby5w5rJc+/TjT3D1hPce+c1ub1IXQAQOgKAIDQAQAgdAAACB0AAEIHAIDQAQAgdACA0AEAIHQAAAgdAABCBwCA0AEAIHQAAAgdAABCBwAIHQAAQgcAgNABACyQ/wYA2wyRpKM+yYIAAAAASUVORK5CYII=",alt:"klubkort"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"widget-login-button",attrs:{type:"submit","aria-label":"Gå til klubkort oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("Gå til Klubkort")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"nfc-added"},[n("span",{staticClass:"fa fa-check nfc-check",attrs:{"aria-hidden":"true"}}),e._v(" Klubkort er tilføjet til konto")])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-error"},[n("span",[e._v("Der blev ikke fundet nogen brugere tilknyttet denne konto")])])}],!1,null,null,null);t.a=a.exports},888:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(17),r=n.n(a),o=n(7),l=n.n(o),c={props:{axios:Function,getAulaToken:Function,triggerStepUp:Function,userProfile:String,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,isMobileApp:Boolean,notifications:Array,deleteNotifications:Function},data:function(){return{activeGroups:[],aulaToken:null,peopleDocumentCollection:null,institutionDocumentCollection:null,isPeopleDocumentCollectionInError:!1,isInstitutionDocumentCollectionInError:!1,title:"",isDataLoading:!0,dataValidTimeout:null}},computed:{groups:function(){var e=this;if(this.peopleDocumentCollection){var t=this.peopleDocumentCollection.filter((function(t){var n;return null===(n=e.childFilter)||void 0===n?void 0:n.includes(t.uident)})).map((function(e){return e.childName}));return r()(new Set(t)).sort((function(e,t){return e.localeCompare(t)}))}return null},institutionDocuments:function(){return this.institutionDocumentCollection?this.institutionDocumentCollection.sort((function(e,t){return e.fileName.localeCompare(t.fileName)})):null},isNothingToShow:function(){return!(this.isDataLoading||null===this.peopleDocumentCollection||Array.isArray(this.peopleDocumentCollection)&&this.peopleDocumentCollection.length)},isUserSteppedUp:function(){return this.assuranceLevel>2}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){this.aulaToken&&this.loadData()},assuranceLevel:function(){this.loadData()},childFilter:function(e,t){e>t&&this.loadData()}},methods:{loadData:function(){var e=this;return s()(l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isUserSteppedUp){t.next=7;break}return e.isDataLoading=!0,n=[e.loadConfidentialDocumentsSharedFromApi(),e.loadInstitutionDocumentsSharedFromApi()],t.next=5,Promise.all(n);case 5:e.isDataLoading=!1,e.dataValidTimeout=new Date;case 7:case"end":return t.stop()}}),t)})))()},loadConfidentialDocumentsSharedFromApi:function(){var e=this;return s()(l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.axios.get("".concat("https://aulawidgetapi.nordiccloud.dk/api/confidential/user/v2","?userProfile=").concat(e.userProfile,"&assuranceLevel=").concat(e.assuranceLevel,"&childFilter=").concat(e.childFilter,"&institutionFilter=").concat(e.institutionFilter,"&isMobileApp=").concat(e.isMobileApp),{headers:{Authorization:"Bearer ".concat(e.aulaToken)}});
1case 3:(n=t.sent).data.documents.forEach((function(e){return e.createdDate=new Date(e.created)})),e.peopleDocumentCollection=n.data.documents,e.title=n.data.title,e.synchronizeBadgeNotifications(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),e.isPeopleDocumentCollectionInError=!0;case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},loadInstitutionDocumentsSharedFromApi:function(){var e=this;return s()(l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.axios.get("".concat("https://aulawidgetapi.nordiccloud.dk/api/confidential/institution/v2","?userProfile=").concat(e.userProfile,"&assuranceLevel=").concat(e.assuranceLevel,"&childFilter=").concat(e.childFilter,"&institutionFilter=").concat(e.institutionFilter,"&isMobileApp=").concat(e.isMobileApp),{headers:{Authorization:"Bearer ".concat(e.aulaToken)}});case 3:(n=t.sent).data.documents.forEach((function(e){e.createdDate=new Date(e.created)})),e.institutionDocumentCollection=n.data.documents,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),e.isInstitutionDocumentCollectionInError=!0;case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},documentsForGroup:function(e){return this.peopleDocumentCollection.filter((function(t){return t.childName===e})).sort((function(e,t){return t.createdDate-e.createdDate}))},initialsForGroup:function(e){var t=e.split(" ");if(t.length>1)return t[0][0]+t[t.length-1][0]},numberOfUnreadDocumentsFortGroup:function(e){return this.peopleDocumentCollection.filter((function(t){return t.childName===e&&!t.isRead})).length},toggleGroup:function(e){try{for(var t=e.target;!t.classList.contains("nct-header");)t=t.parentElement;t.classList.toggle("active");var n=t.nextElementSibling;n.style.maxHeight?n.style.maxHeight=null:n.style.maxHeight=n.scrollHeight+"px"}catch(e){return}},synchronizeBadgeNotifications:function(){try{var e=this.peopleDocumentCollection.filter((function(e){return!e.isRead})).map((function(e){return e.confidentialDocumentId})),t=this.notifications.filter((function(t){return!e.includes(t.widgetNotificationId)})).map((function(e){return e.widgetNotificationId}));this.deleteNotifications(t)}catch(e){return}},stepUp:function(){this.triggerStepUp()},checkDocumentTimeout:function(e,t){var n=this;return s()(l.a.mark((function i(){return l.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!(n.dataValidTimeout&&new Date-n.dataValidTimeout>6e5)){i.next=5;break}return t.preventDefault(),i.next=4,n.loadData();case 4:n.$nextTick((function(){var t;console.log("checkDocumentTimeout",n.$refs["nct"+e][0]),null===(t=n.$refs["nct"+e][0])||void 0===t||t.click()}));case 5:case"end":return i.stop()}}),i)})))()}},filters:{toDkDateString:function(e){return e?"".concat(e.toLocaleDateString("da-dk",{year:"numeric",month:"short",day:"numeric"})," kl. ").concat(e.toLocaleTimeString("da-dk",{hour:"numeric",minute:"numeric"})):""}}},u=n(3),d=Object(u.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0136V0001"},[n("div",{staticClass:"nct-widget-container"},[e.isUserSteppedUp?n("div",[e.isDataLoading?n("div",{staticClass:"nct-error"},[n("div",{staticClass:"nct-loader"})]):e._e(),e._v(" "),e.groups?n("div",[e.isPeopleDocumentCollectionInError&&e.isInstitutionDocumentCollectionInError?n("div",{staticClass:"nct-error"},[e._v("\n          Der er desværre ikke delt dokumenter med dig."),n("br"),e._v("Kontakt\n          skolen/institutionen for at få hjælp.\n        ")]):n("div",{class:{"nct-opacitated":e.isDataLoading}},[e._l(e.groups,(function(t){return n("div",{key:t,staticClass:"nct-container"},[n("div",{staticClass:"nct-header",on:{click:e.toggleGroup}},[n("div",{staticClass:"nct-icon-container"},[n("div",{staticClass:"nct-avatar"},[n("span",[e._v("\n                    "+e._s(e.initialsForGroup(t))+"\n                  ")])])]),e._v(" "),n("div",{staticClass:"nct-group-name"},[n("b",[e._v(e._s(t))]),e._v(" "),e.numberOfUnreadDocumentsFortGroup(t)>0?n("div",{staticClass:"nct-badge"},[n("span",[e._v("\n                    "+e._s(e.numberOfUnreadDocumentsFortGroup(t))+"\n                  ")])]):e._e(
1)]),e._v(" "),n("i",{staticClass:"aula-icon aula-icon-variables nct-expand-icon icon-Aula_down-arrow"})]),e._v(" "),n("div",{staticClass:"nct-list aula-documentsCommonList-container",class:{active:e.activeGroups.indexOf("group")>-1}},[n("div",{staticClass:"table"},e._l(e.documentsForGroup(t),(function(t){return n("div",{key:t.id,staticClass:"table-row body",attrs:{tabindex:"0",role:"button"}},[n("div",{staticClass:"table-cell icon-container nct-icon-container not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("i",{staticClass:"icon-Aula_paper"})])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed nct-document-name"},[n("a",{ref:"nct"+t.id,refInFor:!0,attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("b",[e._v("\n                        "+e._s(t.fileName)+"\n                      ")]),e._v(" "),t.isRead?e._e():n("span",{staticClass:"nct-new-document-mark"},[e._v("\n                        Ny\n                      ")])])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[e._v("\n                      "+e._s(t.institutionName)+"\n                    ")])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[e._v("\n                      Delt "+e._s(e._f("toDkDateString")(t.createdDate))+" af\n                      "+e._s(t.sharedByName)+"\n                    ")])]),e._v(" "),n("div",{staticClass:"table-cell collapsed-only"},[n("div",{staticClass:"item"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("b",[e._v("\n                          "+e._s(t.fileName)+"\n                        ")]),e._v(" "),t.isRead?e._e():n("span",{staticClass:"nct-new-document-mark"},[e._v("\n                          Ny\n                        ")]),e._v(" "),n("br"),e._v("\n                        "+e._s(t.institutionName)+"\n                        "),n("br"),e._v("\n                        Delt "+e._s(e._f("toDkDateString")(t.createdDate))+" af\n                        "+e._s(t.sharedByName)+"\n                      ")])])])])})),0)])])})),e._v(" "),e.institutionDocuments?n("div",{staticClass:"nct-container"},[n("div",{staticClass:"nct-header",on:{click:e.toggleGroup}},[e._m(0),e._v(" "),e._m(1),e._v(" "),n("i",{staticClass:"aula-icon aula-icon-variables nct-expand-icon icon-Aula_down-arrow"})]),e._v(" "),n("div",{staticClass:"nct-list aula-documentsCommonList-container",class:{active:e.activeGroups.indexOf("Fælles")>-1}},[n("div",{staticClass:"table"},e._l(e.institutionDocuments,(function(t){return n("div",{key:t.id,staticClass:"table-row body",attrs:{tabindex:"0",role:"button"}},[n("div",{staticClass:"table-cell icon-container nct-icon-container not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("i",{staticClass:"icon-Aula_paper"})])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed nct-document-name"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("b",[e._v("\n                        "+e._s(t.fileName)+"\n                      ")])])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[e._v("\n                      "+e._s(t.institutionName)+"\n                    ")])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[e._v("\n                      Delt "+e._s(e._f("toDkDateString")(t.createdDate))+"\n                    ")])]),e._v(" "),n("div",{staticClass:"table-cell collapsed-only"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("div",{staticClass:"item"},[n("b",[e._v(e._s(t.fileName))]),e._v(" "),n("br"),e._v("\n                        "+e._s(t.institutionName)+"\n                        "),n("br"),e._v("\n                        Delt "+e._s(e._f("toDkDateString")(t.createdDate))+"\n                      ")])])])])}
1)),0)])]):e._e()],2)]):e._e()]):n("div",{staticClass:"nct-button-container",attrs:{role:"button"},on:{click:e.stepUp}},[e._m(2),e._v(" "),e._m(3),e._v(" "),e._m(4)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"nct-icon-container"},[t("span",{staticClass:"icon-Aula_folder"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"nct-group-name"},[n("b",[e._v("Fælles")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("span",{staticClass:"icon-Aula_folder nct-file-icon"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._v("KK filer er låst "),n("span",{staticClass:"icon-Aula_lock"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",[e._v("\n        Åbn\n        "),n("span",{staticClass:"icon-Aula_forward-arrow pull-right"})])}],!1,null,null,null);t.a=d.exports},889:function(e,t,n){"use strict";var i={props:{isMobileApp:{type:Boolean,default:!1},userProfile:{type:String,default:""}},mounted:function(){this.isMobileApp&&"employee"===this.userProfile&&window.open("https://kk.kviklogin.dk","_blank")}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"nct-container"},["employee"===e.userProfile?n("a",{attrs:{href:"https://kk.kviklogin.dk",target:"_blank",title:"Åbn KK filer"}},[n("svg",{attrs:{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 200 150","xml:space":"preserve"}},[n("path",{staticClass:"st1",attrs:{d:"M101.86,26.55v-2.27c0-6.27-5.1-11.36-11.36-11.36H72.77c-6.27,0-11.36,5.1-11.36,11.36v2.27h-4.83v-2.27\nc0-6.27-5.1-11.36-11.36-11.36H27.48c-6.27,0-11.36,5.1-11.36,11.36v93.26c0,10.77,8.65,19.53,19.29,19.53l148.61,0.01V26.55H101.86\nz M68.03,24.28c0-2.61,2.13-4.74,4.74-4.74H90.5c2.61,0,4.74,2.13,4.74,4.74v2.27H68.03V24.28z M177.39,130.45l-141.98,0\nc-6.99,0-12.67-5.79-12.67-12.9V24.28c0-2.61,2.13-4.74,4.74-4.74h17.73c2.61,0,4.74,2.13,4.74,4.74v8.89h127.44V130.45z"}})]),e._v(" "),n("img",{attrs:{src:" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAApAAAACKCAMAAAAquYq2AAAAM1BMVEUAAAAADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC4ADC6+j1PBAAAAEHRSTlMAQPCAwBDQMGDgIKCQUHCwA7T3NAAACgpJREFUeNrs3Uty2zAQRdHGl/iRfPtfbSLHLsexZDSQZoQkfebW8+BKRbBYEimllFLSzOG8t3jn/emSCfSl7ageL6xvqZBSAvYW8Yj1bn9QZXEZH8UjkFK/Za8WPbGZzzlW3GGdJqnmBZfBY+tOPzseZZx3UmoyR4sBthV6FU481kipCYfFqO21x4ivVFJq1BYxLNMPEdAilahkMeg9tIoeR0qNaJix082OPkNK8VVMoRcZfZGUurrHk24SOBKpGwMWYojgOdaZZzow7n0qA6MfkeCgf5JcEQVMZp15HoNJhb7bwFM0SNkiGnjsQvMswWJOpBsHnkODlC0ig+dcaJ6lYlKjGw+eU4MULSKBKS00z2Ewaxt6p2QNUrQID6aw0DyHxyRLL8ClQUoWYcB0rjTPUDCrapBPDNKDKa00z9AwK2mQzwvSgMmGleYZLGYFDfJ5QXowtaXmrzzSeNIgnxakAVdZar7PYdYx+BFrNUi5IiKYzrXm+zxmbYOv4DVIsSIOcJm15vswK4+eipwGKVVEsGDyi813Fcxq9GoHj9EgpYo4wWUWm7/wTLMPntOzPu0jVYQBl19t/rog7ei5yGmQQkWEDK5ttfmuA5POwUsKGzRIoSIquOpy810Ok9LgixykQcoUsYPLluXmrwuyjN2WOkmDlCmiWHC59eYFg8zVJZNcjbiJY/9lDBqkUBERXHHBebFDzbnRm5DOT/VvttejBilTRAObWXC+y0w9Q1TObeRrL3wgDVKmiB1sbcX5riJ1NRDaV3+tQcoUsVlw5bDifJ/cM23G455aSIMUKiJksJkl5/ui4A13Uy0+yq0QaZBSRUSwtTXn+5rs+X13Pr/FeLqNiDRIsSIq2OKi833pijvumyn0QoMULKKBzW6LzsucajKN0yCli0jgS6vOC11E7hrk04NM4KvLzjMc6LObBvnkIBP4Ylh2Xu5OZPh7gizGOe/9rz/5RH9ASc3bt9V6bGJFJGDioYb15jlOsHi3G2MWD7LszeORfCvkQuGInyZbESkiAZO3ABebv8dBhhvL6/og95bRk+t+0bsmVIt7apkqYj6Igz5aav7/CfIbe3e22zYMBWGYorhIoijN+z9tgd4UbbNwwsNFx/7vg4mbz/Ai1l6SRVk2LQ1AXp/Pn75SxIa6VxQTzb8ISH/tYNo3LwvSO3xRiFUiTgB1/41lnvmXAHkk0NnVC4KM9pu1WCEiof4V7jTzLwDyD0eWpBjIaIEykbwIH0BkPwMxy7x6kH61+Gl7lgEZLVAmkhcRd0Dkkt0k89pBLjtqur0AyGiJ84GkiM2KgZhjXjdIn1CZzdUgfSjEz4rgb182XzTHvGqQcUd9Zy3IhMIWVkQMAOSONEwxrxnkBpGCrwKZUdpOilghC2KKecUgE4TaYw1IS/zJGBFLEAcxw7xekLRH/sk4hAuMCMiDmGFeK0jvgOYiIV2kRMiDmGBeK0gHoLlISHdSIuRBTDCvFGSCcNb3ALk3EmELQUwwrxPkCfFCD5A4KBHyb0iPn1cJckODUg+QmRIhD2L8vEaQ0aJFuQPItYGIcJjixs9rBBnQJOvbg3SUCPkDX+PnFYJc0aj7iSCTYRo/rw9kRLOW5iAhLeIyVOPn9YF0aNb+NJA2G67x8+pAbmjY9iyQIRqy8fPqQO4ozN7r8rv1tihsfxTI5A3b+HltIDeU5fJfP1XKOD8JZDB04+e1gSyTZa8ffj/U/SSQOA3b+HllIDN37YD/O/gngUQ2ZOPnlYG8OY/8g/31Q5DBOdcfpPWGa/y8LpBHzZtjjn7MJj90wK/4LlsmYspvW/1o/tVBXjX/Sgu9SZ8u2LpfqVkN1fj5jzqWf0JJy38d3UGGqk+D29mf5i/wODmQxeNM4+ebflhjb5AeVZ+Hntj7PP+4lbuf9tm9IRo/rwrkhoKuuqcqNw0yE7frEheB2xCNn1cFMtFfYs97djRI5knFQomQP+Awfl4VyIAOsb+kY17Ke0qE/Int8fOaQHrwtQd5EveZnRIhf0Z2gnlNIBfwtQe5ErcrUTdD/pTsBPOaQF7gaw8yE6eHN0qE/DW8CeY1gVzRo0j+kgtxn4mUCPlvh
1plgXhNIhx4ZFiTxFJIRccofBZth/g2yJ8gDX5YYESaIHwWbYV4TyAC+9iBj+RulmRIRxa/hzTCvCSS6xA4Sh5E8+Ymh0kfBZph/g+wI0uHLblKEcbJHwaaYf4MksxW/pLSIw4JofcT8GySZmwgk+c5rfML8G+STQZqbOwr2gPk3yF/t3V2O2zAMBGBK1L8sm/c/bR8CFMi2XYSStR0GmQNkkOAzYlu0rEyHAhm9KHIZqP+AVIahQNIQTQp+/TuBrPIDObFA0qEbBYOvfyeQQX4gDgxkrLpRMPT6D0hlGhhI5TDEgV7/TiAP2R9PaCCJRZMBXv9OIFleyeFWkvFAUtKNgmHXmwaZZ37KAHR/9h4RWTRJ2PWmQbqZjVTEvRtI5YoJQ9ebBjnoOf72YdV6WgCpvJxzyPWmQTI957r3GI1dRLIFkM3rRsGA602DTJNPeZWXOLJ/rMAaAElFNAnA9aZBSpt8I0h5ieMjlwWQdIkmJ269bZBdfxL5yBHpuzT28junBZDRiyYZtt42SCmzbyWuhf6VWK4vK7AGQCrHHGpErUcFWeW18PTPUrnRn2nnJV+TogGQynWqjlqPCjLIi/GdmY9jauCn9tO13xRd4eDlb+kWQMYqmhTQevMgHwl7N68oBkAqxxx8xqxHBXnMgWyyJT4bAKk8GhNmPSpIngNJXbYkRQMgKYkmB2Q9Kkg3CbLJnnQLILOoMhDrUUG2SZDUZU+GAZDKMQffAOtRQdIsyOZlS3wzAFJ5LRgA62FBTn83lj1JFkAqD0fGq4cFybMgKcmeHAZAUhFVHFw9LEg3DTLLpgwDIJVjDj6i1cOCJK8Euf9P2zcDIJVjDhdaPS7IPg2SguxJMgCShqhygtXjghzzIOO200gDILWLXBmrHhck+WmQlL3siTMAMlblIhRUPTBIVoPcL/IyAFK7ytWh6oFBRq8EuV9kt/CXrb6qK0j1wCCJdSD3i2QLFzX6W7G+AdUjg4x1ASTlKvfGOwv3IWduxSagemSQ5LQgd15rh2hhpWbutY8HTj00SDqUIPdth+ZPC9M+07diB0w9NkgKSyBpeLknoVmYh5wfc/ARpR4cZExLICl2uSF1WHimZmnMIaDUg4OkmBa/kEvLHIuF57IXxxyEQerRQRL11SOs1DWOJrZSWR5zEIdRjw+Shp8FuU4yFBPb8d2xYlIjRL0BkBT78jnICKJPPZqNDUvvGXO4IOotgCRqffmkuHFVasxmdtC9Z8xBToR6GyCJ4pmWr9Iypxcx9tLu+10+edO08/Krtw3i4OC/tRh4NPrkk9fSHB/hiVQIfLqo/RAOoT4tp4bQ+XSZ/nt+AfdyxDukoXFeAAAAAElFTkSuQmCC",alt:"KK filer"}})]):e._e()])}),[],!1,null,"23aa36d5",null);t.a=a.exports},890:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://skole.nkpay.dk/aula/login?return",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0141V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}
1),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])})),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"GÃ¥ til skolemad oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("GÃ¥ til madbestilling")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=a.exports},891:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{getAulaToken:Function,triggerStepUp:Function,assuranceLevel:Number,isMobileApp:Boolean,userProfile:String},data:function(){return{aulaToken:null,loading:!0,targetUrl:"https://app.teacherspace.org/auth/aula_sso/callback",formMethod:"POST"}},methods:{startSso:function(){var e=this;return s()(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.loading){t.next=2;break}return t.abrupt("return");case 2:if(e.loading=!0,!(e.assuranceLevel<3)){t.next=7;break}return e.triggerStepUp(),e.loading=!1,t.abrupt("return");case 7:if(e.aulaToken){t.next=11;break}return console.error("AulaToken not available"),e.loading=!1,t.abrupt("return");case 11:e.isMobileApp&&(e.formMethod="GET",e.targetUrl+="?AulaToken=".concat(encodeURIComponent(e.aulaToken))+"&userProfile=".concat(encodeURIComponent(e.userProfile||""))),e.$nextTick((function(){e.$refs.ssoForm.submit(),e.loading=!1}));case 13:case"end":return t.stop()}}),t)})))()}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&(this.loading=!1)}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0143V0001"},[n("div",{staticClass:"aula-sso-container"},[n("button",{staticClass:"aula-sso-btn",attrs:{disabled:e.loading},on:{click:e.startSso}},[n("span",{staticClass:"aula-sso-logo-wrapper"},[n("svg",{attrs:{width:"28",height:"32",viewBox:"0 0 96 110",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M64.25 109.95H8.88C7.78 109.95 6.88 109.05 6.88 107.95C6.88 106.85 7.78 105.95 8.88 105.95H64.25C79.22 105.95 91.39 93.77 91.39 78.81V23.44C91.39 22.34 92.29 21.44 93.39 21.44C94.49 21.44 95.39 22.34 95.39 23.44V78.81C95.39 95.98 81.42 109.95 64.25 109.95ZM4.75 86.71V31.34C4.75 16.37 16.93 4.2 31.89 4.2H87.26C88.36 4.2 89.26 3.3 89.26 2.2C89.26 1.1 88.36 0.199997 87.26 0.199997H31.89C14.72 0.199997 0.75 14.17 0.75 31.34V86.71C0.75 87.81 1.65 88.71 2.75 88.71C3.85 88.71 4.75 87.81 4.75 86.71ZM35.86 45.65H45.37V71.1H51.23V45.65H60.74V40.25H35.86V45.65Z",fill:"#baf7d0"}})])]),e._v(" "),n("span",{staticClass:"aula-sso-btn-text"},[e._v("GÃ¥ til Teacherspace")])]),e._v(" "),n("form",{ref:"ssoForm",attrs:{action:e.targetUrl,method:e.formMethod,target:"_blank"}},["POST"===e.formMethod?n("input",{attrs:{type:"hidden",name:"AulaToken"},domProps:{value:e.aulaToken}}
1):e._e(),e._v(" "),"POST"===e.formMethod?n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}):e._e()])])])}),[],!1,null,null,null);t.a=c.exports},892:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://skole.thistedkortet.dk/aula/login?return",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)},buildUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=new URL(this.aioUrl);return this.aulaToken&&t.searchParams.set("aulatoken",this.aulaToken),this.userProfile&&t.searchParams.set("userProfile",this.userProfile),e&&e.WalletID&&this.selectedWeek.date&&t.searchParams.set("returnUrl","/FoodPlannerV3/Index?walletID="+e.WalletID+"&date="+this.selectedWeek.date.format("YYYY-MM-DD")),t.toString()}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=i,a=n(3),r=Object(a.a)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0144V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])}
1)),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"Gå til skolemad oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("Gå til madbestilling")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=r.exports},893:function(e,t,n){"use strict";var i={props:{placement:String,isMobileApp:Boolean,getAulaToken:Function,userProfile:{type:String,default:"guardian"}},data:function(){return{loginUrl:"https://saml.borger.ist.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=istelevborger",aulaToken:void 0,localToken:void 0,timer:null}},computed:{isButtonDisabled:function(){return!this.aulaToken}},mounted:function(){var e=this;this.aulaToken=this.getAulaToken(),this.timer=setInterval((function(){e.aulaToken=e.getAulaToken()}),3e5)},beforeDestroy:function(){clearInterval(this.timer)},watch:{aulaToken:function(){this.aulaToken&&this.aulaToken!==this.localToken&&(this.localToken=this.aulaToken)}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0145V0001"},[n("div",{staticClass:"ist-elev-widget",class:{narrow:"narrow"===e.placement||e.isMobileApp},attrs:{"data-test":"AulaSecureWidget"}},[n("form",{attrs:{action:e.loginUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"appid",value:"istelevborger"}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("button",{staticClass:"btn-primary",attrs:{type:"submit","aria-label":"G&aring; til IST Elev - Meld frav&aelig;r",disabled:e.isButtonDisabled}},[e._m(0),e._v(" "),n("span",{staticClass:"btn-icon",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"}},[n("path",{attrs:{d:"M5 12h14M13 6l6 6-6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}})])])])])])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"btn-text"},[n("span",{staticClass:"btn-label"},[e._v("Gå til IST Elev - Fravær")]),e._v(" "),n("span",{staticClass:"btn-subtitle"},[e._v("Åbner i browser")])])}],!1,null,null,null);t.a=a.exports},894:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(17),r=n.n(a),o=n(7),l=n.n(o),c={props:{axios:Function,getAulaToken:Function,triggerStepUp:Function,userProfile:String,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,isMobileApp:Boolean,notifications:Array,deleteNotifications:Function},data:function(){return{activeGroups:[],aulaToken:null,peopleDocumentCollection:null,institutionDocumentCollection:null,isPeopleDocumentCollectionInError:!1,isInstitutionDocumentCollectionInError:!1,title:"",isDataLoading:!0,dataValidTimeout:null}},computed:{groups:function(){var e=this;if(this.peopleDocumentCollection){var t=this.peopleDocumentCollection.filter((function(t){var n;return null===(n=e.childFilter)||void 0===n?void 0:n.includes(t.uident)})).map((function(e){return e.childName}));return r()(new Set(t)).sort((function(e,t){return e.localeCompare(t)}))}return null},institutionDocuments:function(){return this.institutionDocumentCollection?this.institutionDocumentCollection.sort((function(e,t){return e.fileName.localeCompare(t.fileName)})):null},isNothingToShow:function(){return!(this.isDataLoading||null===this.peopleDocumentCollection||Array.isArray(this.peopleDocumentCollection)&&this.peopleDocumentCollection.length)},isUserSteppedUp:function(){return this.assuranceLevel>2}},mounted:function(){this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){this.aulaToken&&this.loadData()},assuranceLevel:function(){this.loadData()},childFilter:function(e,t){e>t&&this.loadData()}},methods:{loadData:function(){var e=this;return s()(l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isUserSteppedUp){t.next=7;break}return e.isDataLoading=!0,n=[e.loadConfidentialDocumentsSharedFromApi(),e.loadInstitutionDocumentsSharedFromApi()],t.next=5,Promise.all(n);case 5:e.isDataLoading=!1,e.dataValidTimeout=new Date;case 7:case"end":return t.stop()}}),t)})))()},loadConfidentialDocumentsSharedFromApi:function(){var e=this;return s()(l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.axios.get("".concat("https://aulawidgetapi.nordiccloud.dk/api/confidential/user/v2","?userProfile=").concat(e.userProfile,"&assuranceLevel=").concat(e.assuranceLevel,"&childFilter=").concat(e.childFilter,"&institutionFilter=").concat(e.institutionFilter,"&isMobileApp=").concat(e.isMobileApp),{headers:{Authorization:"Bearer ".concat(e.aulaToken)}});
1case 3:(n=t.sent).data.documents.forEach((function(e){return e.createdDate=new Date(e.created)})),e.peopleDocumentCollection=n.data.documents,e.title=n.data.title,e.synchronizeBadgeNotifications(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),e.isPeopleDocumentCollectionInError=!0;case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},loadInstitutionDocumentsSharedFromApi:function(){var e=this;return s()(l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.axios.get("".concat("https://aulawidgetapi.nordiccloud.dk/api/confidential/institution/v2","?userProfile=").concat(e.userProfile,"&assuranceLevel=").concat(e.assuranceLevel,"&childFilter=").concat(e.childFilter,"&institutionFilter=").concat(e.institutionFilter,"&isMobileApp=").concat(e.isMobileApp),{headers:{Authorization:"Bearer ".concat(e.aulaToken)}});case 3:(n=t.sent).data.documents.forEach((function(e){e.createdDate=new Date(e.created)})),e.institutionDocumentCollection=n.data.documents,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),e.isInstitutionDocumentCollectionInError=!0;case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},documentsForGroup:function(e){return this.peopleDocumentCollection.filter((function(t){return t.childName===e})).sort((function(e,t){return t.createdDate-e.createdDate}))},initialsForGroup:function(e){var t=e.split(" ");if(t.length>1)return t[0][0]+t[t.length-1][0]},numberOfUnreadDocumentsFortGroup:function(e){return this.peopleDocumentCollection.filter((function(t){return t.childName===e&&!t.isRead})).length},toggleGroup:function(e){try{for(var t=e.target;!t.classList.contains("nct-header");)t=t.parentElement;t.classList.toggle("active");var n=t.nextElementSibling;n.style.maxHeight?n.style.maxHeight=null:n.style.maxHeight=n.scrollHeight+"px"}catch(e){return}},synchronizeBadgeNotifications:function(){try{var e=this.peopleDocumentCollection.filter((function(e){return!e.isRead})).map((function(e){return e.confidentialDocumentId})),t=this.notifications.filter((function(t){return!e.includes(t.widgetNotificationId)})).map((function(e){return e.widgetNotificationId}));this.deleteNotifications(t)}catch(e){return}},stepUp:function(){this.triggerStepUp()},checkDocumentTimeout:function(e,t){var n=this;return s()(l.a.mark((function i(){return l.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!(n.dataValidTimeout&&new Date-n.dataValidTimeout>6e5)){i.next=5;break}return t.preventDefault(),i.next=4,n.loadData();case 4:n.$nextTick((function(){var t;console.log("checkDocumentTimeout",n.$refs["nct"+e][0]),null===(t=n.$refs["nct"+e][0])||void 0===t||t.click()}));case 5:case"end":return i.stop()}}),i)})))()}},filters:{toDkDateString:function(e){return e?"".concat(e.toLocaleDateString("da-dk",{year:"numeric",month:"short",day:"numeric"})," kl. ").concat(e.toLocaleTimeString("da-dk",{hour:"numeric",minute:"numeric"})):""}}},u=n(3),d=Object(u.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0147V0001"},[n("div",{staticClass:"nct-widget-container"},[e.isUserSteppedUp?n("div",[e.isDataLoading?n("div",{staticClass:"nct-error"},[n("div",{staticClass:"nct-loader"})]):e._e(),e._v(" "),e.groups?n("div",[e.isPeopleDocumentCollectionInError&&e.isInstitutionDocumentCollectionInError?n("div",{staticClass:"nct-error"},[e._v("\n          Der er desværre ikke delt dokumenter med dig."),n("br"),e._v("Kontakt\n          skolen/institutionen for at få hjælp.\n        ")]):n("div",{class:{"nct-opacitated":e.isDataLoading}},[e._l(e.groups,(function(t){return n("div",{key:t,staticClass:"nct-container"},[n("div",{staticClass:"nct-header",on:{click:e.toggleGroup}},[n("div",{staticClass:"nct-icon-container"},[n("div",{staticClass:"nct-avatar"},[n("span",[e._v("\n                    "+e._s(e.initialsForGroup(t))+"\n                  ")])])]),e._v(" "),n("div",{staticClass:"nct-group-name"},[n("b",[e._v(e._s(t))]),e._v(" "),e.numberOfUnreadDocumentsFortGroup(t)>0?n("div",{staticClass:"nct-badge"},[n("span",[e._v("\n                    "+e._s(e.numberOfUnreadDocumentsFortGroup(t))+"\n                  ")])]):e._e(
1)]),e._v(" "),n("i",{staticClass:"aula-icon aula-icon-variables nct-expand-icon icon-Aula_down-arrow"})]),e._v(" "),n("div",{staticClass:"nct-list aula-documentsCommonList-container",class:{active:e.activeGroups.indexOf("group")>-1}},[n("div",{staticClass:"table"},e._l(e.documentsForGroup(t),(function(t){return n("div",{key:t.id,staticClass:"table-row body",attrs:{tabindex:"0",role:"button"}},[n("div",{staticClass:"table-cell icon-container nct-icon-container not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("i",{staticClass:"icon-Aula_paper"})])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed nct-document-name"},[n("a",{ref:"nct"+t.id,refInFor:!0,attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("b",[e._v("\n                        "+e._s(t.fileName)+"\n                      ")]),e._v(" "),t.isRead?e._e():n("span",{staticClass:"nct-new-document-mark"},[e._v("\n                        Ny\n                      ")])])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[e._v("\n                      "+e._s(t.institutionName)+"\n                    ")])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[e._v("\n                      Delt "+e._s(e._f("toDkDateString")(t.createdDate))+" af\n                      "+e._s(t.sharedByName)+"\n                    ")])]),e._v(" "),n("div",{staticClass:"table-cell collapsed-only"},[n("div",{staticClass:"item"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("b",[e._v("\n                          "+e._s(t.fileName)+"\n                        ")]),e._v(" "),t.isRead?e._e():n("span",{staticClass:"nct-new-document-mark"},[e._v("\n                          Ny\n                        ")]),e._v(" "),n("br"),e._v("\n                        "+e._s(t.institutionName)+"\n                        "),n("br"),e._v("\n                        Delt "+e._s(e._f("toDkDateString")(t.createdDate))+" af\n                        "+e._s(t.sharedByName)+"\n                      ")])])])])})),0)])])})),e._v(" "),e.institutionDocuments?n("div",{staticClass:"nct-container"},[n("div",{staticClass:"nct-header",on:{click:e.toggleGroup}},[e._m(0),e._v(" "),e._m(1),e._v(" "),n("i",{staticClass:"aula-icon aula-icon-variables nct-expand-icon icon-Aula_down-arrow"})]),e._v(" "),n("div",{staticClass:"nct-list aula-documentsCommonList-container",class:{active:e.activeGroups.indexOf("Fælles")>-1}},[n("div",{staticClass:"table"},e._l(e.institutionDocuments,(function(t){return n("div",{key:t.id,staticClass:"table-row body",attrs:{tabindex:"0",role:"button"}},[n("div",{staticClass:"table-cell icon-container nct-icon-container not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("i",{staticClass:"icon-Aula_paper"})])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed nct-document-name"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("b",[e._v("\n                        "+e._s(t.fileName)+"\n                      ")])])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[e._v("\n                      "+e._s(t.institutionName)+"\n                    ")])]),e._v(" "),n("div",{staticClass:"table-cell not-collapsed"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[e._v("\n                      Delt "+e._s(e._f("toDkDateString")(t.createdDate))+"\n                    ")])]),e._v(" "),n("div",{staticClass:"table-cell collapsed-only"},[n("a",{attrs:{href:t.url,target:"_blank"},on:{click:function(n){return e.checkDocumentTimeout(t.id,n)}}},[n("div",{staticClass:"item"},[n("b",[e._v(e._s(t.fileName))]),e._v(" "),n("br"),e._v("\n                        "+e._s(t.institutionName)+"\n                        "),n("br"),e._v("\n                        Delt "+e._s(e._f("toDkDateString")(t.createdDate))+"\n                      ")])])])])}
1)),0)])]):e._e()],2)]):e._e()]):n("div",{staticClass:"nct-button-container",attrs:{role:"button"},on:{click:e.stepUp}},[e._m(2),e._v(" "),e._m(3),e._v(" "),e._m(4)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"nct-icon-container"},[t("span",{staticClass:"icon-Aula_folder"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"nct-group-name"},[n("b",[e._v("Fælles")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("span",{staticClass:"icon-Aula_folder nct-file-icon"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("i",[e._v("Sikker")]),e._v(" fil er låst "),n("span",{staticClass:"icon-Aula_lock"})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",[e._v("\n        Åbn\n        "),n("span",{staticClass:"icon-Aula_forward-arrow pull-right"})])}],!1,null,null,null);t.a=d.exports},895:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://elevmad.dk/aula/login",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0148V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])}
1)),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"GÃ¥ til skolemad oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("GÃ¥ til madbestilling")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=a.exports},896:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://skole.skpay.dk/aula/login?return",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)},buildUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=new URL(this.aioUrl);return this.aulaToken&&t.searchParams.set("aulatoken",this.aulaToken),this.userProfile&&t.searchParams.set("userProfile",this.userProfile),e&&e.WalletID&&this.selectedWeek.date&&t.searchParams.set("returnUrl","/FoodPlannerV3/Index?walletID="+e.WalletID+"&date="+this.selectedWeek.date.format("YYYY-MM-DD")),t.toString()}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MM
1M"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=i,a=n(3),r=Object(a.a)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0149V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])})),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])}
1)),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"GÃ¥ til skolemad oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("GÃ¥ til madbestilling")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=r.exports},897:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://skole.viborgpay.dk/aula/login?return",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)},buildUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=new URL(this.aioUrl);return this.aulaToken&&t.searchParams.set("aulatoken",this.aulaToken),this.userProfile&&t.searchParams.set("userProfile",this.userProfile),e&&e.WalletID&&this.selectedWeek.date&&t.searchParams.set("returnUrl","/FoodPlannerV3/Index?walletID="+e.WalletID+"&date="+this.selectedWeek.date.format("YYYY-MM-DD")),t.toString()}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=i,a=n(3),r=Object(a.a)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0150V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}
1),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])})),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"GÃ¥ til skolemad oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("GÃ¥ til madbestilling")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=r.exports},898:function(e,t,n){"use strict";var i,s,a=n(12),r=n.n(a),o=n(7),l=n.n(o),c={props:{axios:{type:Function,required:!0},moment:{type:Function,required:!0},placement:{type:String,required:!0},isMobileApp:{type:Boolean,required:!0}},data:function(){return{newsItems:[],loading:!0,error:null,omniaApiBaseUrl:"https://b4ae8c32fd95410ba388365d09a3b437-vallensbaek.omniacloud.net",moreLinkUrl:"",moreLinkText:""}}
1,computed:{hasMoreLink:function(){return Boolean(this.moreLinkText&&this.isValidMoreLinkUrl(this.moreLinkUrl))}},methods:{fetchNews:(s=r()(l.a.mark((function e(){var t,n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.axios.get(this.omniaApiBaseUrl+"/api/widget/settings");case 3:if(!(t=e.sent).data.success){e.next=11;break}if(n=t.data.data){e.next=8;break}return e.abrupt("return");case 8:this.newsItems=Array.isArray(n.newsItems)?n.newsItems:[],this.moreLinkUrl=n.moreLinkUrl?n.moreLinkUrl:"",this.moreLinkText=n.moreLinkText?n.moreLinkText:"";case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),console.error("Failed to get news from Omnia. More Details: ",e.t0),this.error="Failed to get news from Omnia";case 17:case"end":return e.stop()}}),e,this,[[0,13]])}))),function(){return s.apply(this,arguments)}),formatDate:function(e){return e?this.moment(e).format("DD.MM.YYYY").toUpperCase():""},isValidMoreLinkUrl:function(e){if(!e)return!1;try{new URL(e);return!0}catch(e){return!1}},getAuthorName:function(e){return e.owcmpagecontact&&0!==e.owcmpagecontact.length?e.owcmpagecontact[0].displayName:""}},mounted:(i=r()(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading=!0,e.next=3,this.fetchNews();case 3:this.loading=!1;case 4:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},u=c,d=n(3),h=Object(d.a)(u,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0151V0001"},[n("div",{staticClass:"news-widget"},[e.loading?n("div",{staticClass:"news__loading",attrs:{"aria-live":"polite"}},[n("i",{staticClass:"fa fa-spinner",attrs:{"aria-hidden":"true"}})]):e.error?n("div",{staticClass:"news__error",attrs:{"aria-live":"assertive"}},[n("p",[e._v(e._s(e.error))])]):n("div",{staticClass:"news__container"},[e._l(e.newsItems,(function(t){return n("a",{key:t.$id,staticClass:"news__card",attrs:{href:t.$url,target:"_blank",rel:"noopener","aria-label":"Read more about "+t.title}},[t.owcmpageimage_data?n("div",{staticClass:"news__card-image"},[n("transition",{attrs:{name:"fade"}},[t.owcmpageimage_data?n("img",{staticClass:"news__card-image-img",attrs:{src:"data:image/png;base64,"+t.owcmpageimage_data,alt:t.title}}):n("div",{staticClass:"news__imagePlaceholder"},[n("svg",{staticClass:"news__placeholder-icon",attrs:{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"}},[n("rect",{attrs:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}}),e._v(" "),n("circle",{attrs:{cx:"8.5",cy:"8.5",r:"1.5"}}),e._v(" "),n("polyline",{attrs:{points:"21 15 16 10 5 21"}})])])])],1):e._e(),e._v(" "),n("div",{staticClass:"news__card-content"},[t.tags&&t.tags.length>0?n("ul",{staticClass:"news__card-tags",attrs:{role:"list"}},[e._l(t.tags.slice(0,2),(function(t){return n("li",{key:t,staticClass:"news__card-tag"},[e._v(e._s(t.name))])})),e._v(" "),t.tags.length>2?n("li",{staticClass:"news__card-tag-more",attrs:{"aria-label":"Additional tags: "+t.tags.slice(2).map((function(e){return e.name})).join(", "),title:t.tags.slice(2).map((function(e){return e.name})).join(", ")}},[e._v("+"+e._s(t.tags.length-2)+"\n            ")]):e._e()],2):e._e(),e._v(" "),n("div",{staticClass:"news__card-heading"},[n("h3",{staticClass:"news__card-title"},[e._v(e._s(t.title))])]),e._v(" "),n("div",{staticClass:"news__card-details"},[t.owcmarticledate?n("span",{staticClass:"news__card-date"},[e._v("\n                            "+e._s(e.formatDate(t.owcmarticledate))+"\n                        ")]):e._e(),e._v(" "),e.getAuthorName(t)?n("span",{staticClass:"news__card-author"},[e._v("\n                           - "+e._s(e.getAuthorName(t))+"\n                        ")]):e._e()]),e._v(" "),n("div",{staticClass:"news__card-summary"},[n("widget-html",{attrs:{html:t.owcmpagesummary}})],1)])])})),e._v(" "),e.hasMoreLink?n("div",{staticClass:"news__footer"},[n("a",{staticClass:"news__more-button",attrs:{href:e.moreLinkUrl,target:"_blank",rel:"noopener"}},[e._v("\n          "+e._s(e.moreLinkText)+"\n        ")])]):e._e(
1)],2)])])}),[],!1,null,null,null);t.a=h.exports},899:function(e,t,n){"use strict";var i={props:{axios:Function,getAulaToken:Function,userProfile:String,childFilter:Array,moment:Function},data:function(){return{errors:[],loading:!0,dataFetchFailed:!1,aulaToken:null,childInfo:{},activeChild:null,activeDate:null,activeProduct:null,apiUrl:"https://api.mywallet.dk/V2/Wallet/AulaSchoolInfoV2",aioUrl:"https://skole.tkpay.dk/aula/login?return",selectedWeek:{date:null,number:null},currentWeek:{date:null,number:-1,fromDate:"",toDate:""},nextWeek:{date:null,number:-1,fromDate:"",toDate:""}}},methods:{getChildren:function(e){var t=this;this.loading=!0,this.dataFetchFailed=!1,this.axios.post(this.apiUrl,{aulaToken:this.aulaToken,childs:this.childFilter,date:e.format()}).then((function(n){n.data.Wallets&&n.data.Wallets.forEach((function(e){e.expand=!0})),t.errors=[],t.selectedWeek.date=t.moment(e).startOf("isoWeek"),t.selectedWeek.number=t.moment(e).isoWeek(),t.childInfo=n.data,t.resetSelectedProduct(),t.loading=!1})).catch((function(e){t.errors.push(e),t.loading=!1,t.dataFetchFailed=!0}))},resetSelectedProduct:function(){this.activeChild=null,this.activeDate=null,this.activeProduct=null},toggleProduct:function(e,t,n){e==this.activeChild&&t==this.activeDate&&n==this.activeProduct?this.resetSelectedProduct():(this.activeChild=e,this.activeDate=t,this.activeProduct=n)},toggleChild:function(e){e.expand=!e.expand},selectWeek:function(e){this.getChildren(e)},buildUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=new URL(this.aioUrl);return this.aulaToken&&t.searchParams.set("aulatoken",this.aulaToken),this.userProfile&&t.searchParams.set("userProfile",this.userProfile),e&&e.WalletID&&this.selectedWeek.date&&t.searchParams.set("returnUrl","/FoodPlannerV3/Index?walletID="+e.WalletID+"&date="+this.selectedWeek.date.format("YYYY-MM-DD")),t.toString()}},mounted:function(){this.moment.locale("da");var e=this.moment(),t=this.moment(e).add(1,"weeks"),n=this.moment().startOf("isoWeek").add(4,"days").add(16,"hours");e.isSameOrAfter(n)&&(e=this.moment().add(1,"weeks").startOf("week"),t=this.moment(e).add(1,"weeks")),this.currentWeek.date=this.moment(e).startOf("isoWeek"),this.currentWeek.number=e.isoWeek(),this.currentWeek.fromDate=e.startOf("isoWeek").format("D. MMM"),this.currentWeek.toDate=e.endOf("isoWeek").format("D. MMM"),this.nextWeek.date=this.moment(t).startOf("isoWeek"),this.nextWeek.number=t.isoWeek(),this.nextWeek.fromDate=t.startOf("isoWeek").format("D. MMM"),this.nextWeek.toDate=t.endOf("isoWeek").format("D. MMM"),this.selectedWeek.date=this.currentWeek.date,this.selectedWeek.number=this.currentWeek.date.isoWeek(),this.aulaToken=this.getAulaToken()},watch:{aulaToken:function(){null!=this.aulaToken&&this.getChildren(this.currentWeek.date)}}},s=i,a=n(3),r=Object(a.a)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0152V0001"},[n("div",{staticClass:"foodplan-container default-theme",class:{"admin-theme":"employee"==e.userProfile}},[(e.childInfo.CanLogin||e.dataFetchFailed)&&e.aulaToken?n("div",{staticClass:"foodplan-header"},[n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),e._m(0)])]):e._e(),e._v(" "),n("div",{staticClass:"week-select-buttons"},[n("button",{staticClass:"week-select-button",class:{active:e.currentWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.currentWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.currentWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.currentWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.currentWeek.fromDate)+" - "+e._s(e.currentWeek.toDate))])]),e._v(" "),n("button",{staticClass:"week-select-button",class:{active:e.nextWeek.number==e.selectedWeek.number},attrs:{"aria-label":"Vis bestillinger for uge "+e.nextWeek.number,disabled:e.loading},on:{click:function(t){return e.selectWeek(e.nextWeek.date)}}},[n("div",[e._v("Uge "+e._s(e.nextWeek.number))]),e._v(" "),n("div",{staticClass:"week-select-date"},[e._v(e._s(e.nextWeek.fromDate)+" - "+e._s(e.nextWeek.toDate))])])]),e._v(" "),e.errors.length?n("div",{staticClass:"error-container"},e._l(e.errors,(function(t){return n("div",{staticClass:"foodplan-error"},[n("span",[e._v(e._s(t))])])}
1)),0):e._e(),e._v(" "),e.childInfo&&!e.loading?n("div",e._l(e.childInfo.Wallets,(function(t,i){return n("div",["child"!=e.userProfile?n("button",{staticClass:"foodplan-child-name",attrs:{"aria-label":(t.expand?"Skjul":"Vis")+" bestillinger for "+t.Name},on:{click:function(n){return e.toggleChild(t)}}},[n("i",{staticClass:"fa-solid fa-user mr-8",attrs:{"aria-hidden":"true"}}),e._v(e._s(t.Name))]):e._e(),e._v(" "),n("hr"),e._v(" "),n("div",{staticClass:"foodplan-child-info",class:{expand:t.expand}},[e.childInfo.CanLogin&&e.aulaToken?n("form",{attrs:{action:e.aioUrl,method:"GET",target:"_blank"}},[n("input",{attrs:{type:"hidden",name:"return",value:""}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"aulaToken"},domProps:{value:e.aulaToken}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"userProfile"},domProps:{value:e.userProfile}}),e._v(" "),n("input",{attrs:{type:"hidden",name:"returnUrl"},domProps:{value:"/FoodPlannerV3/Index?walletID="+t.WalletID+"&date="+e.selectedWeek.date.format("YYYY-MM-DD")}}),e._v(" "),n("button",{staticClass:"foodplan-order-button",attrs:{type:"submit"}},[n("i",{staticClass:"fa-solid fa-cart-arrow-down mr-8",attrs:{"aria-hidden":"true","aria-label":"Bestil og afbestil mad for "+t.Name}}),e._v("\n              Bestil / Afbestil\n            ")])]):e._e(),e._v(" "),e._l(Object.keys(t.Dates),(function(s){return n("div",[n("span",{staticClass:"date"},[e._v(e._s(e.moment(s).format("dddd"))+":")]),e._v(" "),0==t.Dates[s].length?n("div",{staticClass:"product product-order-none"},[e._m(1,!0)]):e._e(),e._v(" "),e._l(t.Dates[s],(function(t,a){return n("button",{staticClass:"product",class:{expand:e.activeChild==i&&e.activeDate==s&&e.activeProduct==a},on:{click:function(t){return e.toggleProduct(i,s,a)}}},[n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v(e._s(t))])])])}))],2)}))],2)])})),0):e._e(),e._v(" "),e.loading?n("div",{staticClass:"loading-container"},[n("i",{staticClass:"fa-solid fa-spinner loading-spinner",attrs:{"aria-hidden":"true"}})]):e._e()])])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"foodplan-login-button",attrs:{type:"submit","aria-label":"GÃ¥ til skolemad oversigt"}},[n("span",{staticClass:"mr-8"},[e._v("GÃ¥ til madbestilling")]),e._v(" "),n("i",{staticClass:"fa-solid fa-arrow-right",attrs:{"aria-hidden":"true"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"product-wrapper"},[n("span",{staticClass:"product-name"},[e._v("Ingen bestillinger")])])}],!1,null,null,null);t.a=r.exports},900:function(e,t,n){"use strict";var i,s,a=n(12),r=n.n(a),o=n(7),l=n.n(o),c={props:{axios:{type:Function,required:!0},moment:{type:Function,required:!0},placement:{type:String,required:!0},isMobileApp:{type:Boolean,required:!0}},data:function(){return{newsItems:[],loading:!0,error:null,omniaApiBaseUrl:"https://b4ae8c32fd95410ba388365d09a3b437-koege.omniacloud.net",moreLinkUrl:"",moreLinkText:""}},computed:{hasMoreLink:function(){return Boolean(this.moreLinkText&&this.isValidMoreLinkUrl(this.moreLinkUrl))}},methods:{fetchNews:(s=r()(l.a.mark((function e(){var t,n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.axios.get(this.omniaApiBaseUrl+"/api/widget/settings");case 3:if(!(t=e.sent).data.success){e.next=11;break}if(n=t.data.data){e.next=8;break}return e.abrupt("return");case 8:this.newsItems=Array.isArray(n.newsItems)?n.newsItems:[],this.moreLinkUrl=n.moreLinkUrl?n.moreLinkUrl:"",this.moreLinkText=n.moreLinkText?n.moreLinkText:"";case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),console.error("Failed to get news from Omnia. More Details: ",e.t0),this.error="Failed to get news from Omnia";case 17:case"end":return e.stop()}}),e,this,[[0,13]])}))),function(){return s.apply(this,arguments)}),formatDate:function(e){return e?this.moment(e).format("DD.MM.YYYY").toUpperCase():""},isValidMoreLinkUrl:function(e){if(!e)return!1;try{new URL(e);return!0}catch(e){return!1}},getAuthorName:function(e){return e.owcmpagecontact&&0!==e.owcmpagecontact.length?e.owcmpagecontact[0].displayName:""}},mounted:(i=r()(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading=!0,e.next=3,this.fetchNews();case 3:this.loading=!1;case 4:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},u=c,d=n(3),h=Object(d.a)(u,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0153V0001"},[n("div",{staticClass:"news-widget"},[e.loading?n("div",{staticClass:"news__loading",attrs:{"aria-live":"polite"}},[n("i",{staticClass:"fa fa-spinner",attrs:{"aria-hidden":"true"}})]):e.error?n("div",{staticClass:"news__error",attrs:{"aria-live":"assertive"}},[n("p",[e._v(e._s(e.error))])]):n("div",{staticClass:"news__container"},[e._l(e.newsItems,(function(t){return n("a",{key:t.$id,staticClass:"news__card",attrs:{href:t.$url,target:"_blank",rel:"noopener","aria-label":"Read more about "+t.title}},[t.owcmpageimage_data?n("div",{staticClass:"news__card-image"},[n("transition",{attrs:{name:"fade"}},[t.owcmpageimage_data?n("img",{staticClass:"news__card-image-img",attrs:{src:"data:image/png;base64,"+t.owcmpageimage_data,alt:t.title}}
1):n("div",{staticClass:"news__imagePlaceholder"},[n("svg",{staticClass:"news__placeholder-icon",attrs:{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"}},[n("rect",{attrs:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}}),e._v(" "),n("circle",{attrs:{cx:"8.5",cy:"8.5",r:"1.5"}}),e._v(" "),n("polyline",{attrs:{points:"21 15 16 10 5 21"}})])])])],1):e._e(),e._v(" "),n("div",{staticClass:"news__card-content"},[t.tags&&t.tags.length>0?n("ul",{staticClass:"news__card-tags",attrs:{role:"list"}},[e._l(t.tags.slice(0,2),(function(t){return n("li",{key:t,staticClass:"news__card-tag"},[e._v(e._s(t.name))])})),e._v(" "),t.tags.length>2?n("li",{staticClass:"news__card-tag-more",attrs:{"aria-label":"Additional tags: "+t.tags.slice(2).map((function(e){return e.name})).join(", "),title:t.tags.slice(2).map((function(e){return e.name})).join(", ")}},[e._v("+"+e._s(t.tags.length-2)+"\n            ")]):e._e()],2):e._e(),e._v(" "),n("div",{staticClass:"news__card-heading"},[n("h3",{staticClass:"news__card-title"},[e._v(e._s(t.title))])]),e._v(" "),n("div",{staticClass:"news__card-details"},[t.owcmarticledate?n("span",{staticClass:"news__card-date"},[e._v("\n                            "+e._s(e.formatDate(t.owcmarticledate))+"\n                        ")]):e._e(),e._v(" "),e.getAuthorName(t)?n("span",{staticClass:"news__card-author"},[e._v("\n                           - "+e._s(e.getAuthorName(t))+"\n                        ")]):e._e()]),e._v(" "),n("div",{staticClass:"news__card-summary"},[n("widget-html",{attrs:{html:t.owcmpagesummary}})],1)])])})),e._v(" "),e.hasMoreLink?n("div",{staticClass:"news__footer"},[n("a",{staticClass:"news__more-button",attrs:{href:e.moreLinkUrl,target:"_blank",rel:"noopener"}},[e._v("\n          "+e._s(e.moreLinkText)+"\n        ")])]):e._e()],2)])])}),[],!1,null,null,null);t.a=h.exports},901:function(e,t,n){"use strict";var i,s,a=n(12),r=n.n(a),o=n(7),l=n.n(o),c={props:{axios:{type:Function,required:!0},moment:{type:Function,required:!0},placement:{type:String,required:!0},isMobileApp:{type:Boolean,required:!0}},data:function(){return{newsItems:[],loading:!0,error:null,omniaApiBaseUrl:"https://b4ae8c32fd95410ba388365d09a3b437-aalborg.omniacloud.eu",moreLinkUrl:"",moreLinkText:""}},computed:{hasMoreLink:function(){return Boolean(this.moreLinkText&&this.isValidMoreLinkUrl(this.moreLinkUrl))}},methods:{fetchNews:(s=r()(l.a.mark((function e(){var t,n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.axios.get(this.omniaApiBaseUrl+"/api/widget/settings");case 3:if(!(t=e.sent).data.success){e.next=11;break}if(n=t.data.data){e.next=8;break}return e.abrupt("return");case 8:this.newsItems=Array.isArray(n.newsItems)?n.newsItems:[],this.moreLinkUrl=n.moreLinkUrl?n.moreLinkUrl:"",this.moreLinkText=n.moreLinkText?n.moreLinkText:"";case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),console.error("Failed to get news from Omnia. More Details: ",e.t0),this.error="Failed to get news from Omnia";case 17:case"end":return e.stop()}}),e,this,[[0,13]])}))),function(){return s.apply(this,arguments)}),formatDate:function(e){return e?this.moment(e).format("DD.MM.YYYY").toUpperCase():""},isValidMoreLinkUrl:function(e){if(!e)return!1;try{new URL(e);return!0}catch(e){return!1}},getAuthorName:function(e){return e.owcmpagecontact&&0!==e.owcmpagecontact.length?e.owcmpagecontact[0].displayName:""}},mounted:(i=r()(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading=!0,e.next=3,this.fetchNews();case 3:this.loading=!1;case 4:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},u=c,d=n(3),h=Object(d.a)(u,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0154V0001"},[n("div",{staticClass:"news-widget"},[e.loading?n("div",{staticClass:"news__loading",attrs:{"aria-live":"polite"}},[n("i",{staticClass:"fa fa-spinner",attrs:{"aria-hidden":"true"}})]):e.error?n("div",{staticClass:"news__error",attrs:{"aria-live":"assertive"}},[n("p",[e._v(e._s(e.error))])]):n("div",{staticClass:"news__container"},[e._l(e.newsItems,(function(t){return n("a",{key:t.$id,staticClass:"news__card",attrs:{href:t.$url,target:"_blank",rel:"noopener","aria-label":"Read more about "+t.title}},[t.owcmpageimage_data?n("div",{staticClass:"news__card-image"},[n("transition",{attrs:{name:"fade"}},[t.owcmpageimage_data?n("img",{staticClass:"news__card-image-img",attrs:{src:"data:image/png;base64,"+t.owcmpageimage_data,alt:t.title}}
1):n("div",{staticClass:"news__imagePlaceholder"},[n("svg",{staticClass:"news__placeholder-icon",attrs:{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"}},[n("rect",{attrs:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}}),e._v(" "),n("circle",{attrs:{cx:"8.5",cy:"8.5",r:"1.5"}}),e._v(" "),n("polyline",{attrs:{points:"21 15 16 10 5 21"}})])])])],1):e._e(),e._v(" "),n("div",{staticClass:"news__card-content"},[t.tags&&t.tags.length>0?n("ul",{staticClass:"news__card-tags",attrs:{role:"list"}},[e._l(t.tags.slice(0,2),(function(t){return n("li",{key:t,staticClass:"news__card-tag"},[e._v(e._s(t.name))])})),e._v(" "),t.tags.length>2?n("li",{staticClass:"news__card-tag-more",attrs:{"aria-label":"Additional tags: "+t.tags.slice(2).map((function(e){return e.name})).join(", "),title:t.tags.slice(2).map((function(e){return e.name})).join(", ")}},[e._v("+"+e._s(t.tags.length-2)+"\n            ")]):e._e()],2):e._e(),e._v(" "),n("div",{staticClass:"news__card-heading"},[n("h3",{staticClass:"news__card-title"},[e._v(e._s(t.title))])]),e._v(" "),n("div",{staticClass:"news__card-details"},[t.owcmarticledate?n("span",{staticClass:"news__card-date"},[e._v("\n                            "+e._s(e.formatDate(t.owcmarticledate))+"\n                        ")]):e._e(),e._v(" "),e.getAuthorName(t)?n("span",{staticClass:"news__card-author"},[e._v("\n                           - "+e._s(e.getAuthorName(t))+"\n                        ")]):e._e()]),e._v(" "),n("div",{staticClass:"news__card-summary"},[n("widget-html",{attrs:{html:t.owcmpagesummary}})],1)])])})),e._v(" "),e.hasMoreLink?n("div",{staticClass:"news__footer"},[n("a",{staticClass:"news__more-button",attrs:{href:e.moreLinkUrl,target:"_blank",rel:"noopener"}},[e._v("\n          "+e._s(e.moreLinkText)+"\n        ")])]):e._e()],2)])])}),[],!1,null,null,null);t.a=h.exports},902:function(e,t,n){"use strict";var i={props:{axios:Function,userProfile:String,institutionFilter:Array},data:function(){return{posts:[]}},created:function(){var e=this;this.axios.get("https://api-info.ibkservices.dk/?institutionsnummer="+this.institutionFilter).then((function(t){e.posts=t.data})).catch((function(e){console.log(e)}))}},s=n(3),a=Object(s.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0155V0001"},[n("div",[n("p",{class:"employee"===e.userProfile||"otp"===e.userProfile?"info-title-employee":"info-title-other"},[e._v("\n      INFO")]),e._v(" "),e.posts&&e.posts.length?n("ul",e._l(e.posts,(function(t,i){return n("li",[null!=t.institutionsNavn&&e.posts.length>1?n("span",{staticClass:"institution-title"},[e._v(e._s(t.institutionsNavn))]):e._e(),e._v(" "),null!=t.institutionsNavn||1===e.posts.length?n("div",{staticClass:"fixed-info-text"},e._l(t.institutionsInfo.split("\r\n\r\n"),(function(t,i){return n("p",{key:"p-"+i},e._l(t.split("\r\n"),(function(i,s){return n("span",{key:"l-"+s},[e._v("\n                            "+e._s(i)+"\n                            "),s<t.split("\r\n").length-1?n("br"):e._e()])})),0)})),0):e._e()])})),0):e._e()])])}),[],!1,null,null,null);t.a=a.exports},903:function(e,t,n){"use strict";var i=n(1),s=n.n(i),a=n(12),r=n.n(a),o=n(7),l=n.n(o);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d={props:["placement","institutionFilter","aulaUuid","aulaToken"],data:function(){return{aktuelConfig:null,labelTekst:"",bodyTekst:"",billedeUrl:"",forloebsLink:"",loading:!0,status:"Indlæser...",ikkeUnderstoettet:!1,apiFejlBesked:""}},computed:{aktueltInstNr:function(){return this.institutionFilter?Array.isArray(this.institutionFilter)?String(this.institutionFilter[0]).trim():String(this.institutionFilter).trim():null},portalTitel:function(){return this.aktuelConfig?this.aktuelConfig.title||this.aktuelConfig.domain:""},siteDomain:function(){return this.aktuelConfig?this.aktuelConfig.domain:""},apiPath:function(){return this.aktuelConfig?this.aktuelConfig.path:""},apiBaseUrl:function(){return this.siteDomain?"https://api.".concat(this.siteDomain):""},wwwBaseUrl:function(){return this.siteDomain?["laeringsportalenskive.dk","ulfi
1aarhus.dk","ude.nu"].includes(this.siteDomain)?"https://www.".concat(this.siteDomain):"https://".concat(this.siteDomain):""},apiUrl:function(){return this.apiBaseUrl&&this.apiPath?"".concat(this.apiBaseUrl).concat(this.apiPath,"?format=json&region=content&sort_by=created"):""},fuldEksternUrl:function(){return this.forloebsLink&&this.wwwBaseUrl?"".concat(this.wwwBaseUrl).concat(this.forloebsLink):""},widgetStorrelse:function(){return this.aktuelConfig&&this.aktuelConfig.widgetSize||"medium"},antalTilbud:function(){if(!this.aktuelConfig||void 0===this.aktuelConfig.numberOfOffers)return 1;var e=parseInt(this.aktuelConfig.numberOfOffers,10);return isNaN(e)?1:e},overskriftTekst:function(){return 1===this.antalTilbud?"Nyt fra":"Forløb fra"}},methods:{fetchMedTimeout:function(e){var t=arguments;return r()(l.a.mark((function n(){var i,s,a,r;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=t.length>1&&void 0!==t[1]?t[1]:{},8e3,s=new AbortController,a=setTimeout((function(){return s.abort()}),8e3),n.prev=4,n.next=7,fetch(e,u(u({},i),{},{signal:s.signal}));case 7:return r=n.sent,clearTimeout(a),n.abrupt("return",r);case 12:throw n.prev=12,n.t0=n.catch(4),clearTimeout(a),n.t0;case 16:case"end":return n.stop()}}),n,null,[[4,12]])})))()},hentData:function(){var e=this;return r()(l.a.mark((function t(){var n,i,s,a,r,o,c,u,d,h,m,p,v,f,g,_,E,A,T,b,C,k,y,I,S,D,w,N,R,O,L;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.aktueltInstNr){t.next=4;break}return e.ikkeUnderstoettet=!0,e.loading=!1,t.abrupt("return");case 4:return t.prev=4,e.status="Henter konfiguration...",u="https://api.iklog.dk/v2/iklogudoglaer.php?kode=".concat(e.aktueltInstNr),d={},e.aulaUuid&&(d["X-Aula-Session-UUID"]=e.aulaUuid),t.next=11,e.fetchMedTimeout(u,{headers:d});case 11:if((h=t.sent).ok){t.next=14;break}throw new Error("Kunne ikke hente konfiguration fra serveren");case 14:return t.next=16,h.json();case 16:if("success"===(m=t.sent).status&&m.domain&&m.path){t.next=21;break}return e.ikkeUnderstoettet=!0,e.loading=!1,t.abrupt("return");case 21:if(e.aktuelConfig={domain:m.domain,path:m.path,title:m.title||m.domain,widgetSize:m.widgetSize||"medium",numberOfOffers:void 0!==m.numberOfOffers?m.numberOfOffers:1},e.status="Indlæser indhold...",e.apiUrl){t.next=25;break}throw new Error("Konfigurationsstier ikke klar.");case 25:return t.next=27,e.fetchMedTimeout(e.apiUrl);case 27:if((p=t.sent).ok){t.next=30;break}throw new Error("Netværksfejl ved hentning af layout");case 30:return t.next=32,p.json();case 32:if(v=t.sent,f=(null==v||null===(n=v.content)||void 0===n?void 0:n.layout_builder__layout)||[],(g=null===(i=f[0])||void 0===i||null===(s=i.regions)||void 0===s||null===(a=s.content)||void 0===a||null===(r=a[0])||void 0===r?void 0:r.results)&&g.length||(A=f.find((function(e){var t,n;return null==e||null===(t=e.regions)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.some((function(e){return"view"===(null==e?void 0:e.type)}))})),T=null==A||null===(_=A.regions)||void 0===_||null===(E=_.content)||void 0===E?void 0:E.find((function(e){return"view"===(null==e?void 0:e.type)})),g=null==T?void 0:T.results),g&&g.length){t.next=38;break}throw new Error("Der er ikke lagt noget aktivt forløb på denne portal endnu.");case 38:if((b=e.antalTilbud>0?g.slice(0,e.antalTilbud):g)&&0!==b.length){t.next=41;break}throw new Error("Ingen tilgængelige forløb blev fundet.");case 41:if(C=Math.floor(Math.random()*b.length),k=null===(o=b[C])||void 0===o?void 0:o.link){t.next=45;break}throw new Error("Kunne ikke finde et gyldigt link til det valgte forløb.");case 45:return t.next=47,e.fetchMedTimeout("".concat(e.apiBaseUrl).concat(k,"?format=json"));case 47:if((y=t.sent).ok){t.next=50;break}throw new Error("Netværksfejl ved hentning af indhold");case 50:return t.next=52,y.json();case 52:I=t.sent,(S=null==I||null===(c=I.content)||void 0===c?void 0:c.content)&&(e.labelTekst=S.label||"Ingen titel fundet",e.bodyTekst=S.body||"",e.forloebsLink=S.link||"",R=(null===(D=S.field_image)||void 0===D?void 0:D.sources)||[],O=null,L=1/0,R.forEach((function(e){var t=parseInt(null==e?void 0:e.width,10);if(!isNaN(t)){var n=Math.abs(t-300);n<L&&(L=n,null!=e&&e.srcset&&(O=e.srcset.trim().split(/\s+/)[0]))}})),e.billedeUrl=O||(null===(w=S.field_image)||void 0===w||null===(N=w.img_element)||void 0===N?void 0:N.uri)||""),e.loading=!1,t.next=62;break;
1case 58:t.prev=58,t.t0=t.catch(4),e.apiFejlBesked="Vi kunne desværre ikke indlæse indholdet i øjeblikket. Prøv igen senere.",e.loading=!1;case 62:case"end":return t.stop()}}),t,null,[[4,58]])})))()},aabenEksterntLink:function(){if(this.forloebsLink){var e="https://api.iklog.dk/v2/iklogudoglaer.php?kode=".concat(this.aktueltInstNr);fetch(e,{method:"GET",headers:{"X-Widget-Action":"open"},keepalive:!0}).catch((function(){}));var t=document.getElementById("aula-secure-navigation-form");t&&setTimeout((function(){t.submit()}),80)}}},mounted:function(){this.hentData().catch((function(e){console.error("Kritisk fejl under widget initialisering:",e)}))}},h=d,m=n(3),p=Object(m.a)(h,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0157V0001"},[n("div",[n("form",{staticStyle:{display:"none"},attrs:{id:"aula-secure-navigation-form",action:e.fuldEksternUrl,method:"GET",target:"_blank"}}),e._v(" "),e.apiFejlBesked?n("div",{staticClass:"api-fejl-boks"},[n("p",[e._v(e._s(e.apiFejlBesked))])]):e.loading?n("p",{staticClass:"loading-tekst"},[n("i",{staticClass:"fa fa-spinner fa-spin"}),e._v(" "+e._s(e.status)+"\n    ")]):e.ikkeUnderstoettet?n("div",{staticClass:"ikke-understoettet-boks"},[n("p",[e._v("Din institution understøtter i øjeblikket ikke denne widget.")]),e._v(" "),n("p",[e._v("Hvis din kommune er med i OS2udoglær, kan funktionen dog nemt aktiveres fremover.")])]):n("div",{class:["aula-widget-wrapper",e.widgetStorrelse],on:{click:e.aabenEksterntLink}},[n("h2",[n("span",{staticClass:"overskrift-prefix"},[e._v(e._s(e.overskriftTekst))]),e._v(" "),n("span",{staticClass:"overskrift-titel"},[e._v(e._s(e.portalTitel))])]),e._v(" "),n("div",{staticClass:"indhold-wrapper"},[e.billedeUrl?n("div",{staticClass:"billede-ramme"},[n("img",{attrs:{src:e.billedeUrl,alt:"Forløbsbillede"}})]):e._e(),e._v(" "),n("h1",[e._v(e._s(e.labelTekst))])]),e._v(" "),"minimal"!==e.widgetStorrelse?n("div",{staticClass:"body-scroll-container"},[e.bodyTekst?n("widget-html",{staticClass:"brødtekst",attrs:{html:e.bodyTekst}}):e._e(),e._v(" "),n("div",{staticClass:"floating-tekst-fixed"},[e._v("Klik for at læse mere...")])],1):e._e()])])])}),[],!1,null,null,null);t.a=p.exports},904:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o="https://aulawidgetapi.nordiccloud.dk/api/questionnaire/v1",l={props:{axios:Function,getAulaToken:Function,triggerStepUp:Function,userProfile:String,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,notifications:Array,deleteNotifications:Function},data:function(){return{aulaToken:null,questionnaires:null,selectedAnswers:{},isDataLoading:!0,isDataSubmitting:!1,isInError:!1}},mounted:function(){var e;this.aulaToken=this.getAulaToken(),null===(e=this.$el.closest(".content"))||void 0===e||e.style.setProperty("border","none")},watch:{aulaToken:function(){this.aulaToken&&this.loadData()},assuranceLevel:function(){this.loadData()}},methods:{loadData:function(){var e=this;return s()(r.a.mark((function t(){var n,i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.isDataLoading=!0,e.isInError=!1,t.prev=2,t.next=5,e.axios.get("".concat(o,"?userProfile=").concat(e.userProfile,"&assuranceLevel=").concat(e.assuranceLevel,"&childFilter=").concat(e.childFilter,"&institutionFilter=").concat(e.institutionFilter),{headers:{Authorization:"Bearer ".concat(e.aulaToken)}});case 5:n=t.sent,(i=n.data).forEach((function(t){t.questions=(t.questions||[]).sort((function(e,t){return e.order-t.order})),t.questions.forEach((function(t){var n,i;(t.parsedSettings=t.settings?JSON.parse(t.settings):{},t.answer)?(t.answer.parsedAnswer=t.answer.answerString?JSON.parse(t.answer.answerString):null,e.$set(e.selectedAnswers,t.questionId,null!==(n=null===(i=t.answer.parsedAnswer)||void 0===i?void 0:i.answer)&&void 0!==n?n:null)):e.$set(e.selectedAnswers,t.questionId,null)}))})),e.questionnaires=i,e.synchronizeBadgeNotifications(),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),e.isInError=!0;case 15:return t.prev=15,e.isDataLoading=!1,t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,12,15,18]])})))()},submitAnswers:function(e){var t=this;return s()(r.a.mark((function n(){var i;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.isDataSubmitting=!0,i=e.questions.filter((function(e){return!e.answer&&t.selectedAnswers[e.questionId]})).map((function(e){return{questionId:e.questionId,answerString:JSON.stringify({answer:t.selectedAnswers[e.questionId]})}})),n.prev=2,n.next=5,t.axios.post(o,i,{headers:{Authorization:"Bearer ".concat(t.aulaToken)}});case 5:t.loadData(),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(2),t.isInError=!0;case 11:return n.prev=11,t.isDataSubmitting=!1,n.finish(11);case 14:case"end":return n.stop()}}),n,null,[[2,8,11,14]])}
1)))()},formatDateTime:function(e){var t=new Date(e),n=t.toLocaleDateString("da-DK",{day:"numeric",month:"long",year:"numeric"}),i=t.toLocaleTimeString("da-DK",{hour:"2-digit",minute:"2-digit"});return"".concat(n," kl. ").concat(i)},firstAnswerOrDefault:function(e){var t;return null!==(t=e.questions)&&void 0!==t&&t.some((function(e){return e.answer}))?e.questions.find((function(e){return e.answer})):null},canAnswersBeSubmitted:function(e){var t=this;return e.questions.every((function(e){return!e.answer&&t.selectedAnswers[e.questionId]}))},synchronizeBadgeNotifications:function(){var e=this;try{var t=this.questionnaires.filter((function(t){return!e.firstAnswerOrDefault(t)})).map((function(e){var t;return null===(t=e.relation)||void 0===t?void 0:t.notificationId})).filter((function(e){return null!=e})),n=this.notifications.filter((function(e){return!t.includes(e)})).map((function(e){return e}));this.deleteNotifications(n)}catch(e){return}}}},c=n(3),u=Object(c.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-W0158V0001"},[n("div",{staticClass:"sq-widget-container"},[e.isDataLoading?n("div",{staticClass:"sq-error"},[n("div",{staticClass:"sq-loader"})]):n("div",[e.isInError?n("div",{staticClass:"sq-error"},[e._v("\n        Der opstod en fejl. Prøv igen senere.\n      ")]):e.questionnaires&&0!==e.questionnaires.length?n("div",e._l(e.questionnaires,(function(t){return n("div",{key:t.questionnaireId,staticClass:"sq-container"},[n("div",{staticClass:"sq-header"},[n("div",{staticClass:"sq-title"},[n("b",[e._v(e._s(t.title))]),e._v(" "),e.firstAnswerOrDefault(t)?e._e():n("span",{staticClass:"nct-new-document-mark"},[e._v("\n              Ny\n            ")])])]),e._v(" "),n("div",{staticClass:"sq-info"},[e.firstAnswerOrDefault(t)?n("p",{staticClass:"sq-answered-text"},[e._v("\n              Besvaret af\n              "+e._s(e.firstAnswerOrDefault(t).answer.submittedBy)+" den\n              "+e._s(e.formatDateTime(e.firstAnswerOrDefault(t).answer.submittedDate))+"\n            ")]):n("p",{staticClass:"sq-deadline"},[e._v("\n              Kan besvares til "+e._s(e.formatDateTime(t.end))+"\n            ")]),e._v(" "),n("p",{staticClass:"sq-description"},[e._v(e._s(t.description))])]),e._v(" "),e._l(t.questions,(function(t){return n("div",{key:t.questionId,staticClass:"sq-body"},[n("div",{staticClass:"sq-questions"},[n("div",{staticClass:"sq-question"},[t.description?n("p",{staticClass:"sq-question-text"},[e._v("\n                  "+e._s(t.description)+"\n                ")]):e._e(),e._v(" "),1===t.type?[n("fieldset",{staticClass:"sq-fieldset",attrs:{disabled:!!t.answer}},[n("div",{staticClass:"sq-radio-group"},[n("div",{staticClass:"custom-control custom-radio",class:{"checked-is-disabled":!!t.answer}}
1,[n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedAnswers[t.questionId],expression:"selectedAnswers[question.questionId]"}],staticClass:"custom-control-input",attrs:{type:"radio",id:"q"+t.questionId+"-yes",name:"sq-q"+t.questionId,value:"yes",disabled:e.isDataSubmitting},domProps:{checked:e._q(e.selectedAnswers[t.questionId],"yes")},on:{change:function(n){return e.$set(e.selectedAnswers,t.questionId,"yes")}}}),e._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"q"+t.questionId+"-yes"}},[e._v("\n                          "+e._s(t.parsedSettings.yes.label)+"\n                        ")])]),e._v(" "),n("div",{staticClass:"custom-control custom-radio",class:{"checked-is-disabled":!!t.answer}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedAnswers[t.questionId],expression:"selectedAnswers[question.questionId]"}],staticClass:"custom-control-input",attrs:{type:"radio",id:"q"+t.questionId+"-no",name:"sq-q"+t.questionId,value:"no",disabled:e.isDataSubmitting},domProps:{checked:e._q(e.selectedAnswers[t.questionId],"no")},on:{change:function(n){return e.$set(e.selectedAnswers,t.questionId,"no")}}}),e._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"q"+t.questionId+"-no"}},[e._v("\n                          "+e._s(t.parsedSettings.no.label)+"\n                        ")])])])])]:[n("p",{staticClass:"sq-unsupported"},[e._v("\n                    Spørgsmålstype "+e._s(t.type)+" understøttes ikke endnu.\n                  ")])]],2)])])})),e._v(" "),e.firstAnswerOrDefault(t)?e._e():n("button",{staticClass:"btn btn-primary sq-confirm-button",attrs:{type:"button",disabled:!1===e.canAnswersBeSubmitted(t)||e.isDataSubmitting},on:{click:function(n){return e.submitAnswers(t)}}},[e.isDataSubmitting?n("span",[e._v("Gemmer...")]):n("span",[e._v("Gem svar")])])],2)})),0):n("div",{staticClass:"sq-empty"},[e._v("\n        Der er ingen aktuelle spørgeskemaer\n      ")])])])])}),[],!1,null,null,null);t.a=u.exports},905:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:Number,notifications:Array,deleteNotifications:Function},data:function(){return{aulaToken:null,removeNotificationSet:new Set}},mounted:function(){this.getAulaToken()},methods:{clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("Widget-10")]),e._v(" "),e.sessionUUID?[n("strong",[e._v("sessionUUID:")]),e._v(" "+e._s(e.sessionUUID)),n("br")]:e._e(
1),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.currentWeekNumber?[n("strong",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.isMobileApp?[n("strong",[e._v("isMobileApp:")]),e._v(" "+e._s(e.isMobileApp)),n("br")]:e._e(),e._v(" "),e.userProfile?[n("strong",[e._v("userProfile:")]),e._v(" "+e._s(e.userProfile)),n("br")]:e._e(),e._v(" "),e.aulaToken?[n("strong",[e._v("aulaToken:")]),e._v(" "),n("span",{staticClass:"breakWord"},[e._v(e._s(e.aulaToken))]),n("br")]:e._e(),e._v(" "),e.assuranceLevel?[n("strong",[e._v("assuranceLevel:")]),e._v(" "+e._s(e.assuranceLevel)),n("br")]:e._e(),e._v(" "),e.childFilter?[n("strong",[e._v("childFilter:")]),e._v(" "+e._s(e.childFilter)),n("br")]:e._e(),e._v(" "),e.institutionFilter?[n("strong",[e._v("institutionFilter:")]),e._v(" "+e._s(e.institutionFilter)),n("br")]:e._e(),e._v(" "),e.group?[n("strong",[e._v("group:")]),e._v(" "+e._s(e.group)),n("br")]:e._e(),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)})):e._e()],2)],2)}),[],!1,null,"3aa18c10",null);t.a=c.exports},906:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:Number,notifications:Array,deleteNotifications:Function},data:function(){return{aulaToken:null,removeNotificationSet:new Set}},mounted:function(){this.getAulaToken()},methods:{clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("Widget-11")]),e._v(" "),e.sessionUUID?[n("strong",[e._v("sessionUUID:")]),e._v(" "+e._s(e.sessionUUID)),n("br")]:e._e(
1),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.currentWeekNumber?[n("strong",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.isMobileApp?[n("strong",[e._v("isMobileApp:")]),e._v(" "+e._s(e.isMobileApp)),n("br")]:e._e(),e._v(" "),e.userProfile?[n("strong",[e._v("userProfile:")]),e._v(" "+e._s(e.userProfile)),n("br")]:e._e(),e._v(" "),e.aulaToken?[n("strong",[e._v("aulaToken:")]),e._v(" "),n("span",{staticClass:"breakWord"},[e._v(e._s(e.aulaToken))]),n("br")]:e._e(),e._v(" "),e.assuranceLevel?[n("strong",[e._v("assuranceLevel:")]),e._v(" "+e._s(e.assuranceLevel)),n("br")]:e._e(),e._v(" "),e.childFilter?[n("strong",[e._v("childFilter:")]),e._v(" "+e._s(e.childFilter)),n("br")]:e._e(),e._v(" "),e.institutionFilter?[n("strong",[e._v("institutionFilter:")]),e._v(" "+e._s(e.institutionFilter)),n("br")]:e._e(),e._v(" "),e.group?[n("strong",[e._v("group:")]),e._v(" "+e._s(e.group)),n("br")]:e._e(),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)})):e._e()],2)],2)}),[],!1,null,"2e353570",null);t.a=c.exports},907:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,moment:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String,triggerStepUp:Function,notifications:Array,deleteNotifications:Function},data:function(){return{posts:{},aulaToken:null,someDate:null,removeNotificationSet:new Set}},methods:{loadStuff:function(){var e=this;this.axios.get("/static/posts.json").then((function(t){e.posts=t.data})).catch((function(e){console.log(e)}))},openModal:function(){this.$refs["notes-modal"].show()},stepUp:function(){this.triggerStepUp()},clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}},mounted:function(){this.aulaToken=this.getAulaToken(),this.someDate=this.moment().format("MMMM Do YYYY, h:mm:ss a")},watch:{aulaToken:function(){null!=this.aulaToken&&this.loadStuff()}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("widget - testing props ")]),e._v(" "),e.sessionUUID?[n("strong",[e._v("sessionUUID:")]),e._v(" "+e._s(e.sessionUUID)),n("br")]:e._e(
1),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.currentWeekNumber?[n("strong",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.isMobileApp?[n("strong",[e._v("isMobileApp:")]),e._v(" "+e._s(e.isMobileApp)),n("br")]:e._e(),e._v(" "),e.userProfile?[n("strong",[e._v("userProfile:")]),e._v(" "+e._s(e.userProfile)),n("br")]:e._e(),e._v(" "),e.aulaToken?[n("strong",[e._v("aulaToken:")]),e._v(" "),n("span",{staticClass:"breakWord"},[e._v(e._s(e.aulaToken))]),n("br")]:e._e(),e._v(" "),e.assuranceLevel?[n("strong",[e._v("assuranceLevel:")]),e._v(" "+e._s(e.assuranceLevel)),n("br")]:e._e(),e._v(" "),e.childFilter?[n("strong",[e._v("childFilter:")]),e._v(" "+e._s(e.childFilter)),n("br")]:e._e(),e._v(" "),e.institutionFilter?[n("strong",[e._v("institutionFilter:")]),e._v(" "+e._s(e.institutionFilter)),n("br")]:e._e(),e._v(" "),e.group?[n("strong",[e._v("group:")]),e._v(" "+e._s(e.group)),n("br")]:e._e(),e._v(" "),e.someDate?[n("strong",[e._v("moment date:")]),e._v(" "+e._s(e.someDate)),n("br")]:e._e(
1),e._v(" "),n("br"),n("button",{staticClass:"btn btn-primary",on:{click:function(t){return e.openModal()}}},[e._v("open modal")]),n("br"),e._v(" "),n("p",[e._v("\n    Lets load some data with Axios:\n      ")]),e.posts&&e.posts.length?n("blockquote",e._l(e.posts,(function(t){return n("p",{key:t.id},[n("strong",[e._v(e._s(t.id)+" - "+e._s(t.title))]),e._v(" "),n("br"),e._v(" "+e._s(t.body)+"\n          ")])})),0):e._e(),e._v(" "),n("p"),e._v(" "),n("b-modal",{ref:"notes-modal",attrs:{title:"test modal","hide-footer":""}},[e._v("\n    test\n  ")]),e._v(" "),n("button",{on:{click:function(t){return e.stepUp()}}},[e._v("Stepup")]),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)})):e._e()],2)],2)}),[],!1,null,"54daa364",null);t.a=c.exports},908:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:Number,notifications:Array,deleteNotifications:Function},data:function(){return{loading:!0,posts:[],token:"nope",removeNotificationSet:new Set}},methods:{clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}},created:function(){var e=this;this.axios.get("/static/posts.json").then((function(t){e.posts=t.data,e.loading=!1})).catch((function(e){console.log(e)}))}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("widget - testing axios")]),e._v(" "),n("p",[e._v(" Lets load some data with Axios:\n    "),e.loading?n("i",{staticClass:"fa fa-spinner fa-spin"}):e._e()]),e.posts&&e.posts.length?n("div",e._l(e.posts,(function(t){return n("p",[n("strong",[e._v(e._s(t.id)+" - "+e._s(t.title))]),e._v(" "),n("br"),e._v(" "+e._s(t.body)+"\n      ")])})),0):e._e(),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)})):e._e()],2)])}),[],!1,null,"73357f3c",null);t.a=c.exports},909:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:Number,notifications:Array,deleteNotifications:Function},data:function(){return{loading:!0,posts:[],aulaToken:null,removeNotificationSet:new Set}},created:function(){var e=this;this.axios.get("/static/posts.json").then((function(t){e.posts=t.data,e.loading=!1})).catch((function(e){console.log(e)}))},mounted:function(){this.getAulaToken()},methods:{clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"myWidget"},[n("b-tabs",{attrs:{pills:""}},[n("b-tab",{attrs:{title:"Form data",active:""}},[n("h1",[e._v("Form data")]),e._v(" "),n("b-row",[n("b-col",[n("br"),e._v(" "),n("div",[n("b-dropdown",{staticClass:"m-md-2",attrs:{id:"ddown1",text:"Dropdown Button"}},[n("b-dropdown-item",[e._v("First Action")]),e._v(" "),n("b-dropdown-item",[e._v("Second Action")]),e._v(" "),n("b-dropdown-item",[e._v("Third Action")]),e._v(" "),n("b-dropdown-divider"),e._v(" "),n("b-dropdown-item",{attrs:{active:""}},[e._v("Active action")]),e._v(" "),n("b-dropdown-item",{attrs:{disabled:""}},[e._v("Disabled action")])],1)],1),e._v(" "),n("br"),e._v(" "),n("b-form-group",{attrs:{id:"exampleInputGroup1",label:"Email address:","label-for":"exampleInput1",description:"We'll never share your email with anyone else."}},[n("b-form-input",{attrs:{id:"exampleInput1",type:"email",required:"",placeholder:"Enter email"}})],1),e._v(" "),n("b-form-group",{attrs:{id:"exampleInputGroup2",label:"Address:","label-for":"exampleInput2",description:"Where do you live."}},[n("b-form-input",{attrs:{id:"exampleInput2",type:"text",required:"",placeholder:"Enter adress"}})],1)],1),e._v(" "),n("b-col",[n("label",[e._v("Select")]),e._v(" "),n("b-form-select",{staticClass:"mb-3"},[n("option",{domProps:{value:null}},[e._v("Please select an option")]),e._v(" "),n("option",{attrs:{value:"a"}},[e._v("Option A")]),e._v(" "),n("option",{attrs:{value:"b",disabled:""}},[e._v("Option B (disabled)")]),e._v(" "),n("optgroup",{attrs:{label:"Grouped Options"}},[n("option",{domProps:{value:{C:"3PO"}}},[e._v("Option with object value")]),e._v(" "),n("option",{domProps:{value:{R:"2D2"}}},[e._v("Another option with object value")])])]),e._v(" "),n("label",[e._v("Checkboxes")]),e._v(" "),n("b-form-group",{attrs:{id:"exampleGroup4"}},[n("b-form-checkbox-group",{attrs:{id:"exampleChecks"}},[n("b-form-checkbox",{attrs:{value:"me"}},[e._v("Check me out")]),e._v(" "),n("b-form-checkbox",{attrs:{value:"that"}},[e._v("Check that out")])],1)],1),e._v(" "),n("label",[e._v("Radios")]),e._v(" "),n("b-form-group",[n("b-form-radio",{attrs:{value:"A",name:"some-radios"}},[e._v("Option A")]),e._v(" "),n("b-form-radio",{attrs:{value:"B",
1name:"some-radios"}},[e._v("Option B")])],1)],1)],1),e._v(" "),n("b-button",{attrs:{type:"submit",variant:"primary"}},[e._v("Submit")]),e._v(" "),n("b-button",{attrs:{type:"reset",variant:"normal"}},[e._v("Reset")])],1),e._v(" "),n("b-tab",{attrs:{title:"Axios"}},[e.loading?n("i",{staticClass:"fa fa-spinner fa-spin"}):e._e(),e._v(" "),e.posts&&e.posts.length?n("div",e._l(e.posts,(function(t){return n("p",[n("strong",[e._v(e._s(t.id)+" - "+e._s(t.title))]),e._v(" "),n("br"),e._v(" "+e._s(t.body)+"\n        ")])})),0):e._e()]),e._v(" "),n("b-tab",{attrs:{title:"Properties"}},[n("h1",[e._v("Properties")]),e._v(" "),e.sessionUUID?[n("strong",[e._v("sessionUUID:")]),e._v(" "+e._s(e.sessionUUID)),n("br")]:e._e(),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.currentWeekNumber?[n("strong",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.isMobileApp?[n("strong",[e._v("isMobileApp:")]),e._v(" "+e._s(e.isMobileApp)),n("br")]:e._e(
1),e._v(" "),e.userProfile?[n("strong",[e._v("userProfile:")]),e._v(" "+e._s(e.userProfile)),n("br")]:e._e(),e._v(" "),e.aulaToken?[n("strong",[e._v("aulaToken:")]),e._v(" "),n("span",{staticClass:"breakWord"},[e._v(e._s(e.aulaToken))]),n("br")]:e._e(),e._v(" "),e.assuranceLevel?[n("strong",[e._v("assuranceLevel:")]),e._v(" "+e._s(e.assuranceLevel)),n("br")]:e._e(),e._v(" "),e.childFilter?[n("strong",[e._v("childFilter:")]),e._v(" "+e._s(e.childFilter)),n("br")]:e._e(),e._v(" "),e.institutionFilter?[n("strong",[e._v("institutionFilter:")]),e._v(" "+e._s(e.institutionFilter)),n("br")]:e._e(),e._v(" "),e.group?[n("strong",[e._v("group:")]),e._v(" "+e._s(e.group)),n("br")]:e._e(),e._v(" "),n("br")],2),e._v(" "),n("b-tab",{attrs:{title:"Links"}},[n("h1",[e._v("Links")]),e._v(" "),n("p",[e._v("\n        A external link opening in a new window/tab"),n("br"),e._v(" "),n("a",{attrs:{href:"https://www.dr.dk/ligetil/indland/otte-skoler-har-testet-ny-udgave-af-skoleintra",target:"_blank"}},[e._v("Otte\n          skoler har testet ny udgave af Skoleintra")])]),e._v(" "),n("p",[e._v("\n        A external link opening in a same window"),n("br"),e._v(" "),n("a",{attrs:{href:"https://www.dr.dk/ligetil/indland/otte-skoler-har-testet-ny-udgave-af-skoleintra"}},[e._v("Otte skoler har\n          testet ny udgave af Skoleintra")])])])],1),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)})):e._e()],2)],1)}),[],!1,null,"30a0a80c",null);t.a=c.exports},910:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,moment:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:String,notifications:Array,deleteNotifications:Function},data:function(){return{posts:{},aulaToken:null,someDate:null,removeNotificationSet:new Set}},methods:{loadStuff:function(){var e=this;this.axios.get("/static/posts.json").then((function(t){e.posts=t.data})).catch((function(e){console.log(e)}))},clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}},mounted:function(){this.aulaToken=this.getAulaToken(),this.someDate=this.moment().format("MMMM Do YYYY, h:mm:ss a")},watch:{aulaToken:function(){null!=this.aulaToken&&this.loadStuff()}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("widget - testing props aaa")]),e._v(" "),e.sessionUUID?[n("strong",[e._v("sessionUUID:")]),e._v(" "+e._s(e.sessionUUID)),n("br")]:e._e(
1),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.currentWeekNumber?[n("strong",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.isMobileApp?[n("strong",[e._v("isMobileApp:")]),e._v(" "+e._s(e.isMobileApp)),n("br")]:e._e(),e._v(" "),e.userProfile?[n("strong",[e._v("userProfile:")]),e._v(" "+e._s(e.userProfile)),n("br")]:e._e(),e._v(" "),e.aulaToken?[n("strong",[e._v("aulaToken:")]),e._v(" "),n("span",{staticClass:"breakWord"},[e._v(e._s(e.aulaToken))]),n("br")]:e._e(),e._v(" "),e.assuranceLevel?[n("strong",[e._v("assuranceLevel:")]),e._v(" "+e._s(e.assuranceLevel)),n("br")]:e._e(),e._v(" "),e.childFilter?[n("strong",[e._v("childFilter:")]),e._v(" "+e._s(e.childFilter)),n("br")]:e._e(),e._v(" "),e.institutionFilter?[n("strong",[e._v("institutionFilter:")]),e._v(" "+e._s(e.institutionFilter)),n("br")]:e._e(),e._v(" "),e.group?[n("strong",[e._v("group:")]),e._v(" "+e._s(e.group)),n("br")]:e._e(),e._v(" "),e.someDate?[n("strong",[e._v("moment date:")]),e._v(" "+e._s(e.someDate)),n("br")]:e._e(
1),e._v(" "),n("p",[e._v(" Lets load some data with Axios:\n      ")]),e.posts&&e.posts.length?n("blockquote",e._l(e.posts,(function(t){return n("p",[n("strong",[e._v(e._s(t.id)+" - "+e._s(t.title))]),e._v(" "),n("br"),e._v(" "+e._s(t.body)+"\n          ")])})),0):e._e(),e._v(" "),n("p"),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)})):e._e()],2)],2)}),[],!1,null,"0b3385ca",null);t.a=c.exports},911:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:Number,notifications:Array,deleteNotifications:Function},data:function(){return{aulaToken:null,removeNotificationSet:new Set}},mounted:function(){this.getAulaToken()},methods:{clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("Widget-9")]),e._v(" "),e.sessionUUID?[n("strong",[e._v("sessionUUID:")]),e._v(" "+e._s(e.sessionUUID)),n("br")]:e._e(
1),e._v(" "),e.placement?[n("strong",[e._v("placement:")]),e._v(" "+e._s(e.placement)),n("br")]:e._e(),e._v(" "),e.currentWeekNumber?[n("b",[e._v("currentWeekNumber:")]),e._v(" "+e._s(e.currentWeekNumber)),n("br")]:e._e(),e._v(" "),e.isMobileApp?[n("strong",[e._v("isMobileApp:")]),e._v(" "+e._s(e.isMobileApp)),n("br")]:e._e(),e._v(" "),e.userProfile?[n("strong",[e._v("userProfile:")]),e._v(" "+e._s(e.userProfile)),n("br")]:e._e(),e._v(" "),e.aulaToken?[n("strong",[e._v("aulaToken:")]),e._v(" "),n("span",{staticClass:"breakWord"},[e._v(e._s(e.aulaToken))]),n("br")]:e._e(),e._v(" "),e.assuranceLevel?[n("strong",[e._v("assuranceLevel:")]),e._v(" "+e._s(e.assuranceLevel)),n("br")]:e._e(),e._v(" "),e.childFilter?[n("strong",[e._v("childFilter:")]),e._v(" "+e._s(e.childFilter)),n("br")]:e._e(),e._v(" "),e.institutionFilter?[n("strong",[e._v("institutionFilter:")]),e._v(" "+e._s(e.institutionFilter)),n("br")]:e._e(),e._v(" "),e.group?[n("strong",[e._v("group:")]),e._v(" "+e._s(e.group)),n("br")]:e._e(),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)})):e._e()],2)],2)}),[],!1,null,"36a3b654",null);t.a=c.exports},912:function(e,t,n){"use strict";var i=n(4),s={props:{widgetID:String,axios:{type:Function},moment:{type:Object},sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,group:String,source:String,institutionCode:String,triggerStepUp:Function,assuranceLevel:Number,childFilter:{type:Array},institutionFilter:{type:Array},getAulaToken:Function,aulaToken:String},setup(e){const t=Object(i.computed)((()=>Object.keys(e).filter((e=>!["axios","moment","getAulaToken","triggerStepUp"].includes(e))))),n=Object(i.computed)((()=>t.value.filter((t=>e[t])).map((t=>({key:t,value:e[t]})))));return{propKeys:t,propsList:n,updateAulaToken:()=>{e.getAulaToken()},runStepUp:()=>{e.triggerStepUp()}}}},a=n(3),r=Object(a.a)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pre"},[e._m(0),e._v(" "),n("div",[e._l(e.propsList,(function(t,i){return n("div",{key:i},[n("span",{staticClass:"bold"},[e._v("\n        "+e._s(t.key)+"\n      ")]),e._v(":\n      "),n("span",[e._v("\n        "+e._s(t.value)+"\n      ")])])})),e._v(" "),n("br"),e._v(" "),e.getAulaToken?n("button",{attrs:{type:"button"},on:{click:e.updateAulaToken}},[e._v("\n      get aula token\n    ")]):e._e(),e._v("\n     \n    "),e.triggerStepUp?n("button",{attrs:{type:"button"},on:{click:e.runStepUp}},[e._v("\n      trigger step up\n    ")]):e._e()],2)])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[e._v("\n    This is your widget\n    Click "),n("a",{attrs:{href:"/aula/"}},[e._v("here")]),e._v(" to see the Aula test platform.\n  ")])}],!1,null,"f240e8f2",null);t.a=r.exports},913:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o=0,l=1,c={LATEST:0,OLDEST:1,RANDOM:2},u={thisted_skoler:["280215","280220","280811","281197","281396","765001","765004","765005","785002","785006","785007","785009","785013","785015","785016","785301","787002","787004","787005","787006","787008","787012","787013","787016","787019","787021","787022","787024","787030","787033","787035","787036","787214","787303","787000"],thisted_dagtilbud:["G21469","G21673","G21674","G21675","G21676","G21677","G21678","G21704","G21705","G21706","G21707","G21708","G21731","G21775","G22746","G22747","G22748","G22749","G22750","G22751","G22752","G22753","G22754","G22755","G22756","G22757","G22759","G22760","G22761","G22762","G22763","G22764","G22765","G22768"],aarhus_skoler:["280114","280144","280146","280307","280313","280397","280410","280458","281191","281290","281401","281403","281404","281520","281602","281648","281689","751002","751003","751004","751006","751007","751008","751013","751014","751015","751016","751017","751018","751019","751020","751021","751022","751023","751024","751025","751026","751027","751032","751033","751034","751035","751036","751038","751039","751040","751041","751042","751043","751044","751045","751046","751050","751051","751052","751053","751054","751055","751056","751058","751059","751060","751061","751062","751063","751064","751065","751066","751080","751081","751089","751090","751094","751095","751098","751107","751111","751114","751204","751312","751327","751903","791413"],hjoerring_skoler:["819002","819003","819004","839006","839004","819001","821006","829005","829002","821003","821010","821002","821001","821009","821019","280628"]},d={thisted_skoler:{feedUrl:"https://www.rum.thisted.dk/feed/json/node/course",filterMethod:o,filterKeyword:"Grundskole",selectionMethod:c.LATEST},thisted_dagtilbud:{feedUrl:"https://www.rum.thisted.dk/feed/json/node/course",filterMethod:o,filterKeyword:"Dagtilbud",selectionMethod:c.LATEST},aarhus_skoler:{feedUrl:"https://www.ulfiaarhus.dk/feed/json/node/news",filterMethod:void 0,filterKeyword:void 0,selectionMethod:c.LATEST},hjoerring_skoler:{feedUrl:"https://www.ungegarantien.dk/feed/json/node/education",filterMethod:void 0,filterKeyword:void 0,selectionMethod:c.RANDOM}},h={Produktnavn:"Der opstod en fejl",Author:"Udvikleren",Manchet:"Noget gik galt",BilledeUrl:"",BilledeUrlTeaser:"",Beskrivelse:"Ind til videre virker denne widget kun for institutioner i Aarhus, Hjørring og Thisted kommune.\nHvis din kommune er med i OS2udoglær, kan dette widget udvikles til at vise seneste nyt fra jeres portal.",Beskrivelse_cut:"Ind til videre virker denne widget kun for institutioner i Aarhus, Hjørring og Thisted kommune.\nHvis din kommune er med i OS2udoglær, kan dette widget udvikles til at vise seneste nyt fra jeres portal.",
1Url:"https://os2.eu/produkt/os2udoglaer",BaseUrl:"https://www."},m={props:{axios:Function,placement:String,institutionFilter:Array},data:function(){return{isFetchingPost:!0,currentPost:{}}},computed:{beskrivelse:function(){return this.placement.includes("narrow")?this.currentPost.Beskrivelse_cut:this.currentPost.Beskrivelse},billedeUrl:function(){return this.placement.includes("narrow")?this.currentPost.BilledeUrlTeaser:this.currentPost.BilledeUrl},articleUrl:function(){var e;return null===(e=this.currentPost.BaseUrl)||void 0===e?void 0:e.replace("https://","").replace("www.","")}},methods:{loadPost:function(e){var t=this;return s()(r.a.mark((function n(){var i,s,a,o,l,c,m;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,i=Object.keys(u).find((function(t){return u[t].includes(e)}))){n.next=4;break}throw new Error("Invalid institution number");case 4:return a=(s=d[i]).feedUrl,o=s.filterMethod,l=s.filterKeyword,c=s.selectionMethod,n.next=7,t.fetchPosts(a);case 7:if(m=n.sent,!((m=t.filterPosts(m,o,l)).length<1)){n.next=11;break}throw new Error("No posts to show");case 11:t.currentPost=t.selectPost(m,c),n.next=18;break;case 14:n.prev=14,n.t0=n.catch(0),console.error(n.t0),t.currentPost=h;case 18:return n.prev=18,t.isFetchingPost=!1,n.finish(18);case 21:case"end":return n.stop()}}),n,null,[[0,14,18,21]])})))()},fetchPosts:function(e){var t=this;return s()(r.a.mark((function n(){var i;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.axios.get(e);case 3:return i=n.sent,n.abrupt("return",i.data);case 7:throw n.prev=7,n.t0=n.catch(0),console.error(n.t0),new Error("Failed to fetch posts");case 11:case"end":return n.stop()}}),n,null,[[0,7]])})))()},filterPosts:function(e,t,n){switch(t){case o:return e.filter((function(e){return null==e?void 0:e.targetGroup.includes(n)}));case l:return e.filter((function(e){return null==e?void 0:e.targetGroupSub.includes(n)}));default:return e}},selectPost:function(e,t){switch(t){case c.RANDOM:return e[Math.floor(Math.random()*e.length)];case c.OLDEST:return e[0];default:return e.at(-1)}}},created:function(){var e=this;return s()(r.a.mark((function t(){var n,i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((null===(n=e.institutionFilter)||void 0===n?void 0:n.length)>0)){t.next=6;break}return i=e.institutionFilter[0],t.next=4,e.loadPost(i);case 4:t.next=9;break;case 6:console.error("No institution number given"),e.currentPost=h,e.isFetchingPost=!1;case 9:case"end":return t.stop()}}),t)})))()}},p=n(3),v=Object(p.a)(m,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isFetchingPost?n("div",[n("p",[e._v("Loading")])]):n("div",[n("h1",[e._v(e._s(e.currentPost.Produktnavn))]),e._v(" "),n("p",[n("em",[e._v("Nyt fra "+e._s(e.currentPost.Author))])]),e._v(" "),e.currentPost.Manchet?n("p",[e._v(e._s(e.currentPost.Manchet))]):e._e(),e._v(" "),n("img",{attrs:{src:e.billedeUrl,alt:""}}),e._v(" "),n("p",[n("widget-html",{attrs:{html:e.beskrivelse}})],1),e._v(" "),n("p",[n("a",{attrs:{href:e.currentPost.Url,target:"_blank"}},[e._v("Læs mere")])]),e._v(" "),n("p",[n("em",[e._v(e._s(e.articleUrl))])])])}),[],!1,null,null,null);t.a=v.exports},914:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{axios:Function,sessionUUID:String,placement:String,currentWeekNumber:String,isMobileApp:Boolean,userProfile:String,getAulaToken:Function,assuranceLevel:Number,childFilter:Array,institutionFilter:Array,group:Number,notifications:Array,deleteNotifications:Function},data:function(){return{lektier:null,removeNotificationSet:new Set}},methods:{clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}},mounted:function(){switch(Math.floor(5*Math.random())){case 1:this.lektier=[{dag:"Tirsdag",fag:"Engelsk",bog:"Hello Oxford",side:"1",opgave:"read monologue two"},{dag:"Torsdag",fag:"Matematik",bog:"Matematrix",side:"12-13",opgave:"23, 24, 25, 26, 30, 31"}];break;case 2:this.lektier=[{dag:"Mandag",fag:"Dansk",bog:"Skriv Nu!",side:"5",opgave:"O, P, Q"},{dag:"Tirsdag",fag:"Engelsk",bog:"Hello Oxford",side:"1",opgave:"read monologue two"},{dag:"Torsdag",fag:"Matematik",bog:"Matematrix",side:"12-13",opgave:"23, 24, 25, 26, 30, 31"}];break;case 3:this.lektier=[{dag:"Fredag",fag:"Fysik",bog:"Fysik trin 2",side:"45",opgave:"Syre og Base"}];break;case 4:this.lektier=[{dag:"Mandag",fag:"Matematik",bog:"Matematrix",side:"12-13",opgave:"23, 24, 25, 26, 30, 31"},{dag:"Onsdag",fag:"Dansk",bog:"Skriv Nu!",side:"5",opgave:"O, P, Q"}]}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lektieBogen"},[n("h1",[e._v("Lektier uge "+e._s(e.currentWeekNumber.split("W").slice(-1)[0]))]),e._v(" "),e.lektier&&e.lektier.length?n("div",e._l(e.lektier,(function(t){return n("p",[n("strong",[e._v(e._s(t.dag))]),e._v(" "),n("br"),e._v(" Fag: "+e._s(t.fag)+"\n      "),n("br"),e._v(" Bog: "+e._s(t.bog)+"\n      "),n("br"),e._v(" Side: "+e._s(t.side)+"\n      "),n("br"),e._v(" Opgave: "+e._s(t.opgave)+"\n    ")])})),0):n("div",[n("strong",[e._v("Du har ingen lektier for i denne uge")])]),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)}
1)):e._e()],2)])}),[],!1,null,"926d262e",null);t.a=c.exports},915:function(e,t,n){"use strict";var i=n(12),s=n.n(i),a=n(7),r=n.n(a),o={props:{notifications:Array,deleteNotifications:Function},data:function(){return{widgetIndhold:'<p><span>K&aelig;re for&aelig;ldre i 0.A.</span></p><p><strong>K&aelig;ledyr:</strong><br />Vi har nu afsluttet vores emne om k&aelig;ledyr. Alle k&aelig;ledyrs-burene st&aring;r ude ved garderoberne og I skal v&aelig;re s&oslash;de at tage dem med hjem.&nbsp;<span style="font-size:12.8px;">Kig ind forbi klassen og se de flotte k&aelig;ledyrs-tegneserier jeres barn har lavet.<br /></span><strong style="font-size:12.8px;"><br />Vokalerne:</strong><br /><span>Vi er nu i fuld gang med at arbejde med vokalerne. I sidste uge arbejdede vi med vokalen a og i denne uge skal vi arbejde med vokalen E. I m&aring; meget gerne tale med jeres barn om, hvilke ord de kender der begynder med e. Tegn tre ting der begynder med e og medbring det p&aring; mandag.</span></p><p><strong>Bamse banko:</strong><span>&nbsp;</span><span>Ugens heldige vindere er: Jannat, Magnus og Ellen. I skal huske bamserne n&aelig;ste fredag. Sonia skal huske sin bamse p&aring; mandag.<br /></span></p><p><strong>Godtfreds dyrehandel:&nbsp;</strong>I&nbsp;Godtfreds dyrehandel er der nu flyttet&nbsp;<span>14 firben, 15 pincetfisk,&nbsp;</span><span>16 hvide mus,&nbsp;</span><span>17 vandrende pinde</span>ind og 18 sl&oslash;rhaler.&nbsp;Vi arbejder med at t&aelig;lle og&nbsp;genkende tallene.<br /><br /><span><strong>Skole-hjemsamtaler:</strong></span><br /><span>Husk der afholdes skolehjemsamtaler tirsdag og torsdag i uge 40. Der er afsat 15 min til samtalen og det er&nbsp;<strong>uden</strong>&nbsp;b&oslash;rn. Samtalerne afholdes i l&aelig;selokalet p&aring; den store gang mellem gang 3 og gang 4.</span></p><div><p><span><strong>Et lille hjertesuk:</strong>&nbsp; &nbsp;&nbsp;</span><span style="font-size:large;">🙁</span><span style="font-size:large;">🙁</span><span style="font-size:large;">😟</span>&nbsp;<br /><span>Vil I ikke nok l&aelig;gge skiftet&oslash;j i jeres barn garderobekasse. Idag fredag har vi haft mange v&aring;de og kolde b&oslash;rn, da der ikke var noget t&oslash;rt t&oslash;j at tage p&aring;. Vi har ikke skiftet&oslash;j liggende og derfor g&aring;r jeres barn enten rundt i undert&oslash;j eller med v&aring;dt t&oslash;j. Det er ikke rart og huden begynder at kl&oslash;.</span></p><p><span><strong>9-maden:</strong></span><br /><span>Mange b&oslash;rn, ca 50 %, spiser mad fra madpakken allerede kl. 9.00. Tal med jeres barn og find lige ud af om der evt. skal lidt mere mad med til kl. 9.00. De er temmelig sultne p&aring; dette tidspunkt.</span></p><p><span>Hilsen fra team 0. A</span></p></div><p>&nbsp;</p><div><div><div><span style="font-size:12.8px;"></span></div></div></div>',widgetIndhold2:'<p><span>K&aelig;re for&aelig;ldre i 0.A.</span></p><p><strong>K&aelig;ledyr:</strong><br />Vi har nu afsluttet vores emne om k&aelig;ledyr. Alle k&aelig;ledyrs-burene st&aring;r ude ved garderoberne og I skal v&aelig;re s&oslash;de at tage dem med hjem.&nbsp;<span style=\\"font-size:12.8px;\\">Kig ind forbi klassen og se de flotte k&aelig;ledyrs-tegneserier jeres barn har lavet.<br /></span><strong style=\\"font-size:12.8px;\\"><br />Vokalerne:</strong><br /><span>Vi er nu i fuld gang med at arbejde med vokalerne. I sidste uge arbejdede vi med vokalen a og i denne uge skal vi arbejde med vokalen E. I m&aring; meget gerne tale med jeres barn om, hvilke ord de kender der begynder med e. Tegn tre ting der begynder med e og medbring det p&aring; mandag.</span></p><p><strong>Bamse banko:</strong><span>&nbsp;</span><span>Ugens heldige vindere er: Jannat, Magnus og Ellen. I skal huske bamserne n&aelig;ste fredag. Sonia skal huske sin bamse p&aring; mandag.<br /></span></p><p><strong>Godtfreds dyrehandel:&nbsp;</strong>I&nbsp;Godtfreds dyrehandel er der nu flyttet&nbsp;<span>14 firben, 15 pincetfisk,&nbsp;</span><span>16 hvide mus,&nbsp;</span><span>17 vandrende pinde</span>ind og 18 sl&oslash;rhaler.&nbsp;Vi arbejder med at t&aelig;lle og&nbsp;genkende tallene.<br /><br /><span><strong>Skole-hjemsamtaler:</strong></span><br /><span>Husk der afholdes skolehjemsamtaler tirsdag og torsdag i uge 40. Der er afsat 15 min til samtalen og det er&nbsp;<strong>uden</strong>&nbsp;b&oslash;rn. Samtalerne afholdes i l&aelig;selokalet p&aring; den store gang mellem gang 3 og gang 4.</span></p><div><p><span><strong>Et lille hjertesuk:</strong>&nbsp; &nbsp;&nbsp;</span><span style=\\"font-size:large;\\">🙁</span><span style=\\"font-size:large;\\">🙁</span><span style=\\"font-size:large;\\">😟</span>&nbsp;<br /><span>Vil I ikke nok l&aelig;gge skiftet&oslash;j i jeres barn garderobekasse. Idag fredag har vi haft mange v&aring;de og kolde b&oslash;rn, da der ikke var noget t&oslash;rt t&oslash;j at tage p&aring;. Vi har ikke skiftet&oslash;j liggende og derfor g&aring;r jeres barn enten rundt i undert&oslash;j eller med v&aring;dt t&oslash;j. Det er ikke rart og huden begynder at kl&oslash;
1.</span></p><p><span><strong>9-maden:</strong></span><br /><span>Mange b&oslash;rn, ca 50 %, spiser mad fra madpakken allerede kl. 9.00. Tal med jeres barn og find lige ud af om der evt. skal lidt mere mad med til kl. 9.00. De er temmelig sultne p&aring; dette tidspunkt.</span></p><p><span>Hilsen fra team 0. A</span></p></div><p>&nbsp;</p><div><div><div><span style=\\"font-size:12.8px;\\"></span></div></div></div>'}},methods:{clearNotification:function(e){var t=this;return s()(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.removeNotificationSet.add(e),n.next=3,t.deleteNotifications([e.widgetNotificationId]);case 3:t.removeNotificationSet.delete(e);case 4:case"end":return n.stop()}}),n)})))()},clearAllNotifications:function(){var e=this;return s()(r.a.mark((function t(){var n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.removeNotificationSet=new Set(e.notifications),n=e.notifications.map((function(e){return e.widgetNotificationId})),t.next=4,e.deleteNotifications(n);case 4:e.removeNotificationSet.clear();case 5:case"end":return t.stop()}}),t)})))()}}},l=n(3),c=Object(l.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("widget - testing html element")]),e._v(" "),n("h1",[e._v("1")]),e._v(" "),n("widget-html",{attrs:{html:e.widgetIndhold}},[e._v("henter indehold")]),e._v(" "),n("hr"),e._v(" "),n("h1",[e._v("2")]),e._v(" "),n("widget-html",{attrs:{html:e.widgetIndhold2}},[e._v("henter indehold")]),e._v(" "),n("hr"),e._v(" "),n("h1",[e._v("3")]),e._v(" "),e._v('">Kig ind forbi klassen og se de flotte kæledyrs-tegneserier jeres barn har lavet.'),n("br"),e._v('"font-size:12.8px;\\">'),n("br"),e._v("Vokalerne:"),n("br"),n("span",[e._v("Vi er nu i fuld gang med at arbejde med vokalerne. I sidste uge arbejdede vi med vokalen a og i denne uge skal vi arbejde med vokalen E. I må meget gerne tale med jeres barn om, hvilke ord de kender der begynder med e. Tegn tre ting der begynder med e og medbring det på mandag.")]),n("p"),e._m(0),e._m(1),e._m(2),n("p",[e._v(" ")]),e._m(3),e._v('">henter indehold'),e._v(" "),n("hr"),e._v(" "),n("h1",[e._v("4")]),e._v(" "),e._v('">Kig ind forbi klassen og se de flotte kæledyrs-tegneserier jeres barn har lavet.'),n("br"),e._v('"font-size:12.8px;\\">'),n("br"),e._v("Vokalerne:"),n("br"),n("span",[e._v("Vi er nu i fuld gang med at arbejde med vokalerne. I sidste uge arbejdede vi med vokalen a og i denne uge skal vi arbejde med vokalen E. I må meget gerne tale med jeres barn om, hvilke ord de kender der begynder med e. Tegn tre ting der begynder med e og medbring det på mandag.")]),n("p"),e._m(4),e._m(5),e._m(6),n("p",[e._v(" ")]),e._m(7),e._v('">henter indehold'),e._v(" "),n("div",[n("p",{staticClass:"d-flex justify-content-between align-items-center"},[e._v("\n      Notifikationer\n      "),n("b-btn",{on:{click:e.clearAllNotifications}},[e._v("Ryd alle")])],1),e._v(" "),e.notifications&&e.notifications.length>0?e._l(e.notifications,(function(t){return n("div",{key:t.widgetNotificationId,staticClass:"d-flex justify-content-between align-items-center"},[n("p",{staticClass:"mb-0"},[e._v("\n          "+e._s(t.notificationMessage)+"\n        ")]),e._v(" "),n("b-btn",{attrs:{disabled:e.removeNotificationSet.has(t),variant:"link"},on:{click:function(n){return e.clearNotification(t)}}},[e._v("\n          X\n        ")])],1)})):e._e()],2)],1)}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[n("strong",[e._v("Bamse banko:")]),n("span",[e._v(" ")]),n("span",[e._v("Ugens heldige vindere er: Jannat, Magnus og Ellen. I skal huske bamserne næste fredag. Sonia skal huske sin bamse på mandag."),n("br")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[n("strong",[e._v("Godtfreds dyrehandel: ")]),e._v("I Godtfreds dyrehandel er der nu flyttet "),n("span",[e._v("14 firben, 15 pincetfisk, ")]),n("span",[e._v("16 hvide mus, ")]),n("span",[e._v("17 vandrende pinde")]),e._v("ind og 18 slørhaler. Vi arbejder med at tælle og genkende tallene."),n("br"),n("br"),n("span",[n("strong",[e._v("Skole-hjemsamtaler:")])]),n("br"),n("span",[e._v("Husk der afholdes skolehjemsamtaler tirsdag og torsdag i uge 40. Der er afsat 15 min til samtalen og det er "),n("strong",[e._v("uden")]),e._v(" børn. Samtalerne afholdes i læselokalet på den store gang mellem gang 3 og gang 4.")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("p",[n("span",[n("strong",[e._v("Et lille hjertesuk:")]),e._v("    ")]),e._v('"font-size:large;\\">🙁'),e._v('"font-size:large;\\">🙁'),e._v('"font-size:large;\\">
1😟'),e._v(" "),n("br"),n("span",[e._v("Vil I ikke nok lægge skiftetøj i jeres barn garderobekasse. Idag fredag har vi haft mange våde og kolde børn, da der ikke var noget tørt tøj at tage på. Vi har ikke skiftetøj liggende og derfor går jeres barn enten rundt i undertøj eller med vådt tøj. Det er ikke rart og huden begynder at klø.")])]),n("p",[n("span",[n("strong",[e._v("9-maden:")])]),n("br"),n("span",[e._v("Mange børn, ca 50 %, spiser mad fra madpakken allerede kl. 9.00. Tal med jeres barn og find lige ud af om der evt. skal lidt mere mad med til kl. 9.00. De er temmelig sultne på dette tidspunkt.")])]),n("p",[n("span",[e._v("Hilsen fra team 0. A")])])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",[n("div",[e._v('"font-size:12.8px;\\">')])])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[n("strong",[e._v("Bamse banko:")]),n("span",[e._v(" ")]),n("span",[e._v("Ugens heldige vindere er: Jannat, Magnus og Ellen. I skal huske bamserne næste fredag. Sonia skal huske sin bamse på mandag."),n("br")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[n("strong",[e._v("Godtfreds dyrehandel: ")]),e._v("I Godtfreds dyrehandel er der nu flyttet "),n("span",[e._v("14 firben, 15 pincetfisk, ")]),n("span",[e._v("16 hvide mus, ")]),n("span",[e._v("17 vandrende pinde")]),e._v("ind og 18 slørhaler. Vi arbejder med at tælle og genkende tallene."),n("br"),n("br"),n("span",[n("strong",[e._v("Skole-hjemsamtaler:")])]),n("br"),n("span",[e._v("Husk der afholdes skolehjemsamtaler tirsdag og torsdag i uge 40. Der er afsat 15 min til samtalen og det er "),n("strong",[e._v("uden")]),e._v(" børn. Samtalerne afholdes i læselokalet på den store gang mellem gang 3 og gang 4.")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("p",[n("span",[n("strong",[e._v("Et lille hjertesuk:")]),e._v("    ")]),e._v('"font-size:large;\\">🙁'),e._v('"font-size:large;\\">🙁'),e._v('"font-size:large;\\">😟'),e._v(" "),n("br"),n("span",[e._v("Vil I ikke nok lægge skiftetøj i jeres barn garderobekasse. Idag fredag har vi haft mange våde og kolde børn, da der ikke var noget tørt tøj at tage på. Vi har ikke skiftetøj liggende og derfor går jeres barn enten rundt i undertøj eller med vådt tøj. Det er ikke rart og huden begynder at klø.")])]),n("p",[n("span",[n("strong",[e._v("9-maden:")])]),n("br"),n("span",[e._v("Mange børn, ca 50 %, spiser mad fra madpakken allerede kl. 9.00. Tal med jeres barn og find lige ud af om der evt. skal lidt mere mad med til kl. 9.00. De er temmelig sultne på dette tidspunkt.")])]),n("p",[n("span",[e._v("Hilsen fra team 0. A")])])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",[n("div",[e._v('"font-size:12.8px;\\">')])])])}],!1,null,"4a380c98",null);t.a=c.exports}}]);
2//# sourceMappingURL=10.602468c12c96a7068fc8.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.