芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/cloud.pulsehost.co.uk/static/js/3326.app.e5eadef382400f93b739.min.js
(self.webpackChunkafterlogic_aurora_platform=self.webpackChunkafterlogic_aurora_platform||[]).push([[3326],{M0Qh:(t,e,i)=>{"use strict";var s=i("EFhx"),a=i("KvAJ");s.registerAbortRequestHandler(a.ServerModuleName,(function(t,e){switch(t.Method){case"UpdateEvent":var i=t.Parameters,s=e.Parameters;return"UpdateEvent"===e.Method&&s.calendarId===i.calendarId&&s.uid===i.uid;case"GetCalendars":return"GetCalendars"===e.Method;case"GetPublicCalendar":return"GetPublicCalendar"===e.Method;case"GetEvents":return"GetEvents"===e.Method}return!1})),t.exports={send:function(t,e,i,n,r){s.send(r||a.ServerModuleName,t,e,i,n)}}},exyt:(t,e,i)=>{"use strict";var s=i("p09A"),a=i("a7T2"),n=i("9kOp"),r=i("M0Qh");function o(){this.calendars=s.observableArray([]),this.calendarsLoadingStarted=s.observable(!1),this.icalAttachments=[],this.recivedAnim=s.observable(!1).extend({autoResetToFalse:500}),this.calendarSettingsChanged=s.observable(!1),this.calendarChanged=s.observable(!1)}o.prototype.addIcal=function(t){a.each(this.icalAttachments,(function(e){e.uid()===t.uid()&&t.sSequence!==e.sSequence&&(t.sSequence>e.sSequence?e.lastModification(!1):t.lastModification(!1))})),this.icalAttachments.push(t),0===this.calendars().length&&this.requestCalendarList()},o.prototype.getIcal=function(t){return a.find(this.icalAttachments,(function(e){return t===e.file()}))},o.prototype.onGetCalendarsResponse=function(t,e){if(t&&t.Result&&t.Result.Calendars){var i=n.currentAccountEmail?n.currentAccountEmail():"",s=a.filter(t.Result.Calendars,(function(t){return t.Owner===i||t.Access===Enums.CalendarAccess.Full||t.Access===Enums.CalendarAccess.Write}));this.calendars(a.map(s,(function(t){return{name:t.Name+" <"+t.Owner+">",id:t.Id,readonly:t.Subscribed}})))}this.calendarsLoadingStarted(!1)},o.prototype.requestCalendarList=function(){this.calendarsLoadingStarted()||(r.send("GetCalendars",null,this.onGetCalendarsResponse,this),this.calendarsLoadingStarted(!0))},o.prototype.markIcalTypeByFile=function(t,e,i,s,n,r){a.each(this.icalAttachments,(function(a){t===a.file()&&(a.type(e),a.cancelDecision(i),a.replyDecision(s),a.calendarId(n),a.selectedCalendarId(r))}))},o.prototype.markIcalNonexistent=function(t){a.each(this.icalAttachments,(function(e){t===e.uid()&&e.markNeededAction()}))},o.prototype.markIcalNotSaved=function(t){a.each(this.icalAttachments,(function(e){t===e.uid()&&e.markNotSaved()}))},o.prototype.markIcalTentative=function(t){a.each(this.icalAttachments,(function(e){t===e.uid()&&e.markTentative()}))},o.prototype.markIcalAccepted=function(t){a.each(this.icalAttachments,(function(e){t===e.uid()&&e.markAccepted()}))},t.exports=new o},KvAJ:(t,e,i)=>{"use strict";var s=i("a7T2"),a=i("M4cL"),n=i("KC/L");t.exports={ServerModuleName:"Calendar",HashModuleName:"calendar",ServerMeetingsPluginName:"CalendarMeetingsPlugin",ServerCorporateCalendarName:"CorporateCalendar",ReminderValuesInMinutes:[5,10,15,30,60,120,180,240,300,360,420,480,540,600,660,720,1080,1440,2880,4320,5760,10080,20160],AddDescriptionToTitle:!1,AllowAppointments:!0,AllowShare:!1,AllowTasks:!0,DefaultTab:"3",HighlightWorkingDays:!0,HighlightWorkingHours:!0,PublicCalendarId:"",WeekStartsOn:"0",WorkdayEnds:"18",WorkdayStarts:"9",AllowSubscribedCalendars:!1,AllowPrivateEvents:!0,DefaultReminders:[],CalendarColors:["#f09650"],ShowWeekNumbers:!1,init:function(t){var e=t[this.ServerModuleName],i=t[this.ServerMeetingsPluginName],r=t[this.ServerCorporateCalendarName];s.isEmpty(e)||(this.AddDescriptionToTitle=n.pBool(e.AddDescriptionToTitle,this.AddDescriptionToTitle),this.AddDescriptionToTitle&&a("html").addClass("AddDescriptionToTitle"),s.isEmpty(r)||(this.AllowShare=n.pBool(r.AllowShare,this.AllowShare)),this.AllowTasks=n.pBool(e.AllowTasks,this.AllowTasks),this.DefaultTab=n.pString(e.DefaultTab,this.DefaultTab),this.HighlightWorkingDays=n.pBool(e.HighlightWorkingDays,this.HighlightWorkingDays),this.HighlightWorkingHours=n.pBool(e.HighlightWorkingHours,this.HighlightWorkingHours),this.PublicCalendarId=n.pString(e.PublicCalendarId,this.PublicCalendarId),this.WeekStartsOn=n.pString(e.WeekStartsOn,this.WeekStartsOn),this.WorkdayEnds=n.pString(e.WorkdayEnds,this.WorkdayEnds),this.WorkdayStarts=n.pString(e.WorkdayStarts,this.WorkdayStarts),this.AllowSubscribedCalendars=n.pBool(e.AllowSubscribedCalendars,this.AllowSubscribedCalendars),this.AllowPrivateEvents=n.pBool(e.AllowPrivateEvents,this.AllowPrivateEvents),this.AllowDefaultReminders=n.pBool(e.AllowDefaultReminders,this.AllowDefaultReminders),this.DefaultReminders=e.DefaultReminders,this.DefaultReminders,this.CalendarColors=e.CalendarColors,this.CalendarColors,this.ShowWeekNumbers=e.ShowWeekNumbers,this.ShowWeekNumbers),s.isEmpty(i)||(this.AllowAppointments=n.pBool(i.AllowAppointments,this.AllowAppointments))},update:function(t,e,i,s,a,n,r){this.DefaultTab=n.toString(),this.HighlightWorkingDays=t,this.HighlightWorkingHours=e,this.WeekStartsOn=a.toString(),this.WorkdayEnds=s.toString(),this.WorkdayStarts=i.toString(),this.DefaultReminders=r}}},"k+x/":(t,e,i)=>{"use strict";var s=i("a7T2"),a=i("p09A"),n=i("nGOo");function r(t){this.parentOnCalendarActiveChange=t.onCalendarActiveChange,this.parentOnCalendarCollectionChange=t.onCalendarCollectionChange,this.defaultCal=a.observable(null),this.currentCal=a.observable(null),this.collection=a.observableArray([]),this.collection.subscribe((function(){this.pickCurrentCalendar(this.defaultCal()),this.parentOnCalendarCollectionChange&&this.parentOnCalendarCollectionChange()}),this),this.count=a.computed((function(){return this.collection().length}),this),this.own=a.computed((function(){return s.filter(this.collection(),(function(t){return!t.isShared()}))}),this),this.ownCount=a.computed((function(){return this.own().length}),this),this.shared=a.computed((function(){return s.filter(this.collection(),(function(t){return t.isShared()&&!t.isSharedToAll()}))}),this),this.sharedCount=a.computed((function(){return this.shared().length}),this),this.sharedToAll=a.computed((function(){return s.filter(this.collection(),(function(t){return t.isShared()&&t.isSharedToAll()}))}),this),this.sharedToAllCount=a.computed((function(){return this.sharedToAll().length}),this),this.ids=a.computed((function(){return s.map(this.collection(),(function(t){return t.id}),this)}),this)}r.prototype.pickCurrentCalendar=function(t){const e=t=>t.active()&&t.isEditable()&&!t.subscribed();if(!this.currentCal()||!e(this.currentCal()))if(t&&e(t))this.currentCal(t);else if(this.defaultCal()&&e(this.defaultCal()))this.currentCal(this.defaultCal());else{let t=this.collection().find(e);t||(t=this.collection().find((t=>t.isEditable()&&!t.subscribed()))),t&&this.currentCal(t)}},r.prototype.getCalendarById=function(t){return s.find(this.collection(),(function(e){return e.id===t}),this)},r.prototype.getEvents=function(t,e){var i=[],a=[];return s.each(this.collection(),(function(n){n&&n.active()&&(a=t&&e?n.getEvents(t,e):n.events(),i=s.union(i,a))}),this),i},r.prototype.parseCalendar=function(t){var e=new n;return e.parse(t),e},r.prototype.parseAndAddCalendar=function(t){var e,i=null,s=this.parseCalendar(t);return s.active.subscribe((function(t){this.parentOnCalendarActiveChange(s);var e=s.active()?s:this.defaultCal();this.pickCurrentCalendar(e)}),this),s.isDefault&&this.defaultCal(s),(e=this.calendarExists(s.id))||0===e?(i=this.getCalendarById(s.id),s.events(i.events()),this.collection.splice(e,1,s)):this.collection.push(s),s},r.prototype.calendarExists=function(t){var e=s.indexOf(s.map(this.collection(),(function(t){return t.id})),t);return!(e<0)&&e},r.prototype.removeCalendar=function(t){this.collection(s.filter(this.collection(),(function(e){return e.id!==t}),this))},r.prototype.clearCollection=function(){this.collection.removeAll()},r.prototype.getColors=function(){return s.map(this.collection(),(function(t){return t.color().toLowerCase()}),this)},r.prototype.setDefault=function(t){s.each(this.collection(),(function(e){e.id!==t?(e.isDefault=!0,this.defaultCal(e)):e.isDefault=!1}),this)},r.prototype.sort=function(){var t=s.sortBy(this.collection(),(function(t){return t.name()}));this.collection(s.sortBy(t,(function(t){return t.isShared()})))},r.prototype.expunge=function(t){this.collection(s.filter(this.collection(),(function(e){return s.include(t,e.id)}),this))},t.exports=r},nGOo:(t,e,i)=>{"use strict";const s=i("a7T2"),a=i("p09A"),n=i("sdEb"),r=i("KC/L"),o=i("Tt1R"),l=i("9kOp"),h=i("HCAJ"),c=i("nwS3"),d=i("W5ZY"),u=i("KvAJ");function p(){this.id=0,this.sSyncToken="",this.name=a.observable(""),this.description=a.observable(""),this.owner=a.observable(""),this.isDefault=!1,this.isShared=a.observable(!1),this.isSharedToAll=a.observable(!1),this.sharedToAllAccess=Enums.CalendarAccess.Read,this.isPublic=a.observable(!1),this.url=a.observable(""),this.davUrl=a.observable(""),this.exportUrl=a.observable(""),this.pubUrl=a.observable(""),this.shares=a.observableArray([]),this.events=a.observableArray([]),this.eventsCount=a.computed((function(){return this.events().length}),this),this.access=a.observable(Enums.CalendarAccess.Write),this.color=a.observable(""),this.color.subscribe((function(){this.events(s.map(this.events(),(function(t){return t.backgroundColor=t.borderColor=this.color(),t}),this)),this.name.valueHasMutated()}),this),this.active=a.observable(!0),this.startDateTime=0,this.endDateTime=0,this.canShare=a.computed((function(){return!this.isShared()||this.isShared()&&this.access()===Enums.CalendarAccess.Write&&0!==this.shares().length||this.isOwner()}),this),this.bAllowShare=u.AllowShare,this.bAllowAppointments=u.AllowAppointments,this.subscribed=a.observable(!1),this.source=a.observable("")}p.prototype.parseCssColor=function(t){var e=r.pString(t);return e.length>7?e=e.substr(0,7):e.length>4&&e.length<7&&(e=e.substr(0,4)),4===e.length&&(e=e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.match(/^#[A-Fa-f0-9]{6}$/i)||(e="#f09650"),e},p.prototype.getIsActiveFromStorage=function(){if(h.hasData(this.id)){const t=h.getData(this.id);return h.removeData(this.id),h.setData(`aurora_calendar_${this.id}_is-active`,t),t}return!h.hasData(`aurora_calendar_${this.id}_is-active`)||h.getData(`aurora_calendar_${this.id}_is-active`)},p.prototype.parse=function(t){this.id=r.pString(t.Id),this.sSyncToken=t.SyncToken,this.name(r.pString(t.Name)),this.description(r.pString(t.Description)),this.owner(r.pString(t.Owner)),this.active(this.getIsActiveFromStorage()),this.active.subscribe((()=>{h.setData(`aurora_calendar_${this.id}_is-active`,this.active())})),this.isDefault=!!t.IsDefault,this.isShared(!!t.Shared),this.isSharedToAll(!!t.SharedToAll),this.sharedToAllAccess=t.SharedToAllAccess,this.isPublic(!!t.IsPublic),this.access(t.Access),this.color(this.parseCssColor(t.Color)),this.url(r.pString(t.Url)),this.exportUrl(o.getAppPath()+"?calendar-download/"+r.pString(t.ExportHash)),this.pubUrl(o.getAppPath()+"?calendar-pub="+r.pString(t.PubHash)),this.shares(t.Shares||[]),s.each(t.Events,(function(t){this.addEvent(t)}),this),this.subscribed(!!t.Subscribed),this.source(t.Source)},p.prototype.updateEvent=function(t){return t&&(this.removeEvent(t.id),this.addEvent(t)),!1},p.prototype.addEvent=function(t){t&&!this.eventExists(t.id)&&this.events.push(this.parseEvent(t))},p.prototype.getEvent=function(t){return s.find(this.events(),(function(e){return e.id===t}),this)},p.prototype.eventExists=function(t){return!!this.getEvent(t)},p.prototype.getEvents=function(t,e){return s.filter(this.events(),(function(i){var s=t.unix(),a=e.unix(),r=n.utc(i.start).unix(),o=n.utc(i.end).unix();return r>=s&&o<=a||r<=s&&o>=a||r>=s&&r<=a||o<=a&&o>=s}),this)||[]},p.prototype.removeEvent=function(t){this.events(s.filter(this.events(),(function(e){return e.id!==t}),this))},p.prototype.removeEventByUid=function(t,e){this.events(s.filter(this.events(),(function(i){return i.uid!==t||e&&i.excluded}),this))},p.prototype.removeEvents=function(){this.events([])},p.prototype.expungeEvents=function(t,e,i,a){var r=[];s.each(this.getEvents(n.unix(e),n.unix(i)),(function(e){s.include(t,e.id)||e.type!==a||r.push(e.id)}),this),this.events(s.filter(this.events(),(function(t){return!s.include(r,t.id)}),this))},p.prototype.isEditable=function(){return this.access()!==Enums.CalendarAccess.Read},p.prototype.isOwner=function(){return l.getUserPublicId()===this.owner()},p.prototype.parseEvent=function(t){if(t.description=d.parseDescriptionLocation(t.description),t.location=d.parseDescriptionLocation(t.location),t.title=c.getTitleForEvent(t.subject,t.description),t.editable=!t.appointment,t.backgroundColor=t.borderColor=this.color(),!s.isArray(t.className)){var e=t.className;t.className=[e]}return this.access()===Enums.CalendarAccess.Read?(t.className.includes("fc-event-readonly")||t.className.push("fc-event-readonly"),t.editable=!1):(t.className=s.filter(t.className,(function(t){return"fc-event-readonly"!==t})),this.subscribed()&&(t.editable=!1)),t.rrule&&!t.excluded?t.className.includes("fc-event-repeat")||t.className.push("fc-event-repeat"):t.className=s.filter(t.className,(function(t){return"fc-event-repeat"!==t})),r.isNonEmptyArray(t.attendees)&&this.bAllowAppointments?t.className.includes("fc-event-appointment")||t.className.push("fc-event-appointment"):t.className=s.filter(t.className,(function(t){return"fc-event-appointment"!==t})),t.isPrivate&&l.getUserPublicId()!==t.owner&&(t.editable=!1),t.isPrivate?t.className.includes("fc-event-private")||t.className.push("fc-event-private"):t.className=s.filter(t.className,(function(t){return"fc-event-private"!==t})),t},p.prototype.reloadEvents=function(){this.events(s.map(this.events(),(function(t){return this.parseEvent(t)}),this))},t.exports=p},"6prR":(t,e,i)=>{"use strict";const s=i("a7T2"),a=i("M4cL"),n=i("p09A"),r=i("sdEb"),o=i("injE"),l=i("H20a"),h=i("KC/L"),c=i("REt5"),d=i("/QeJ"),u=i("9kOp"),p=i("TdEd"),m=i("skxT"),b=i("OfVV"),E=i("oUN1"),v=i("o1lX"),f=i("hT1I"),A=i("XeMN"),D=i("HZAs"),C=i("nwS3"),T=i("M0Qh"),y=i("KvAJ"),g=i("QDxx"),k=i("8tGW");function w(){v.call(this),this.modified=!1,this.isPublic=u.isPublic(),this.isEditable=n.observable(!1),this.isEditableReminders=n.observable(!1),this.selectedCalendarIsShared=n.observable(!1),this.selectedCalendarIsEditable=n.observable(!1),this.selectedCalendarIsSubscribed=n.observable(!1),this.callbackSave=null,this.callbackDelete=null,this.timeFormatMoment="HH:mm",this.dateFormatMoment="MM/DD/YYYY",this.dateFormatDatePicker="mm/dd/yy",this.ampmTimeFormat=n.observable(!1),this.calendarId=n.observable(null),this.id=n.observable(null),this.uid=n.observable(null),this.recurrenceId=n.observable(null),this.allEvents=n.observable(Enums.CalendarEditRecurrenceEvent.AllEvents),this.isMyEvent=n.observable(!1),this.startDom=n.observable(null),this.endDom=n.observable(null),this.repeatEndDom=n.observable(null),this.yearlyDayText=n.observable(""),this.monthlyDayText=n.observable(""),this.subject=n.observable("").extend({disableLinebreaks:!0}),this.linkPopupEditableView=new k,this.descriptionView=new g({isEditableObservable:this.isEditable,autosizeTriggerObservable:this.autosizeTrigger,linkPopupEditableView:this.linkPopupEditableView,allowEditLinks:!0,placeholderText:l.i18n("CALENDARWEBCLIENT/LABEL_DESCRIPTION")}),this.locationView=new g({isEditableObservable:this.isEditable,autosizeTriggerObservable:this.autosizeTrigger,linkPopupEditableView:this.linkPopupEditableView,allowEditLinks:!0,placeholderText:l.i18n("CALENDARWEBCLIENT/LABEL_LOCATION")}),this.lockSelectStartEndDate=n.observable(!1),this.startDate=n.observable(""),this.startTime=n.observable(""),this.startTime.subscribe((function(){this.selectStartDate()}),this),this.allDay=n.observable(!1),this.allDay.subscribe((function(){this.allDay()||this.setActualTime()}),this),this.endDate=n.observable(""),this.endTime=n.observable(""),this.endTime.subscribe((function(){this.selectEndDate()}),this),this.repeatEndDate=n.observable(""),this.isEvOneDay=n.observable(!0),this.isEvOneTime=n.observable(!0),this.isRepeat=n.observable(!1),this.allowSetPrivateEvent=n.observable(!1),this.isPrivateEvent=n.observable(!1),this.repeatPeriodOptions=n.observableArray(this.getDisplayedPeriods()),this.repeatWeekIntervalOptions=n.observableArray([1,2,3,4]),this.defaultAlarms=n.observableArray(y.ReminderValuesInMinutes),this.alarmOptions=n.observableArray([]),this.timeOptions=n.observableArray(C.getTimeListStepHalfHour(b.timeFormat()!==Enums.TimeFormat.F24?"hh:mm A":"HH:mm")),b.timeFormat.subscribe((function(){this.timeOptions(C.getTimeListStepHalfHour(b.timeFormat()!==Enums.TimeFormat.F24?"hh:mm A":"HH:mm"))}),this),this.displayedAlarms=n.observableArray([]),this.displayedAlarms.subscribe((function(){this.disableAlarms()}),this),this.excluded=n.observable(!1),this.rrule=n.observable(null),this.repeatPeriod=n.observable(Enums.CalendarRepeatPeriod.None),this.repeatPeriod.subscribe((function(t){this.setDayOfWeek(),this.isRepeat(!!t)}),this),this.repeatInterval=n.observable(1),this.repeatCount=n.observable(null),this.repeatWeekNum=n.observable(null),this.weekMO=n.observable(!1),this.weekTU=n.observable(!1),this.weekWE=n.observable(!1),this.weekTH=n.observable(!1),this.weekFR=n.observable(!1),this.weekSA=n.observable(!1),this.weekSU=n.observable(!1),this.always=n.observable(1),this.appointment=n.observable(!1),this.attendees=n.observableArray([]),this.attenderStatus=n.observable(0),this.owner=n.observable(""),this.organizer=n.observable(""),this.recivedAnim=n.observable(!1).extend({autoResetToFalse:500}),this.whomAnimate=n.observable(""),this.guestAutocompleteItem=n.observable(null),this.guestAutocomplete=n.observable(""),this.guestEmailFocus=n.observable(!1),this.guestAutocomplete.subscribe((function(t){""===t&&this.guestAutocompleteItem(null)}),this),this.condition=n.observable(""),this.autosizeTrigger=n.observable(!0),this.calendars=null,this.calendarsList=n.observableArray([]),this.calendarColor=n.observable(""),this.selectedCalendarId=n.observable(""),this.selectedCalendarName=n.observable(""),this.selectedCalendarId.subscribe((function(t){if(t){var e=this.calendars.getCalendarById(t);this.owner(e.owner()),this.selectedCalendarName(e.name()),this.selectedCalendarIsShared(e.isShared()),this.selectedCalendarIsEditable(e.isEditable()&&!e.subscribed()),this.selectedCalendarIsSubscribed(e.subscribed()),this.changeCalendarColor(t),this.allowSetPrivateEvent(y.AllowPrivateEvents&&!e.isShared()&&!e.isSharedToAll())}}),this),this.subjectFocus=n.observable(!1),this.dateEdit=n.observable(!1),this.repeatEdit=n.observable(!1),this.guestsEdit=n.observable(!1),this.isEditForm=n.computed((function(){return!!this.id()}),this),this.callbackAttendeeActionDecline=null,this.additionalButtonControllers=n.observableArray([]),u.broadcastEvent("CalendarWebclient::RegisterEditEventController",{register:(t,e)=>{"AdditionalButton"===e&&this.additionalButtonControllers.push(t)},view:this}),this.bAllowAppointments=y.AllowAppointments,this.bAllowTasks=y.AllowTasks,this.eventType=n.observable("VEVENT"),this.status=n.observable(!1),this.isTask=n.observable(!1),this.isTaskApp=n.observable(!1),this.withDate=n.observable(!0),this.allowConvertEventToTask=n.computed((function(){return this.isEditable()&&!this.isTaskApp()&&0===this.attendees().length&&this.allEvents()===Enums.CalendarEditRecurrenceEvent.AllEvents}),this),this.isTask.subscribe((function(t){this.eventType(t?"VTODO":"VEVENT")}),this),this.allChanges=n.computed((function(){this.subject(),this.descriptionView.dataHtml(),this.locationView.dataHtml(),this.isRepeat(),this.allDay(),this.repeatPeriod(),this.repeatInterval(),this.repeatCount(),this.repeatWeekNum(),this.startDate(),this.startTime(),this.endDate(),this.endTime(),this.repeatEndDate(),this.displayedAlarms(),this.weekMO(),this.weekTU(),this.weekWE(),this.weekTH(),this.weekFR(),this.weekSA(),this.weekSU(),this.always(),this.attendees(),this.selectedCalendarId(),this.status(),this.isTask(),this.withDate(),this.isPrivateEvent(),this.modified=!0}),this),this.aReminderPhrase=l.i18n("CALENDARWEBCLIENT/INFO_REMINDER").split("%"),this.isAppointmentButtonsVisible=n.observable(!1)}s.extendOwn(w.prototype,v.prototype),w.prototype.PopupTemplate="CalendarWebclient_EditEventPopup",w.prototype.createDatePickerObject=function(t,e){a(t).datepicker({showOtherMonths:!0,selectOtherMonths:!0,monthNames:o.getMonthNamesArray(),dayNamesMin:l.i18n("COREWEBCLIENT/LIST_DAY_NAMES_MIN").split(" "),nextText:"",prevText:"",firstDay:y.WeekStartsOn,showOn:"both",buttonText:" ",dateFormat:this.dateFormatDatePicker,onSelect:e}),a(t).on("mousedown",(function(){a("#ui-datepicker-div").toggle()}))},w.prototype.initializeDatePickers=function(){this.createDatePickerObject(this.startDom(),this.selectStartDate.bind(this)),this.createDatePickerObject(this.endDom(),this.selectEndDate.bind(this)),this.createDatePickerObject(this.repeatEndDom(),function(t){this.repeatEndDate(t)}.bind(this)),this.startDom().datepicker("option","dateFormat",this.dateFormatDatePicker),this.endDom().datepicker("option","dateFormat",this.dateFormatDatePicker),this.repeatEndDom().datepicker("option","dateFormat",this.dateFormatDatePicker)},w.prototype.onOpen=function(t){this.linkPopupEditableView.onOpen();var e=u.getUserPublicId(),i=null,a=null,n="",o=null,l="",d=r();this.withDate(!!t.Start&&!!t.End),t.Start||t.End||(d.minutes()>30?d.add(60-d.minutes(),"minutes"):d.minutes(30),d.seconds(0).milliseconds(0),t.Start=d,t.End=d.clone().add(30,"minutes")),i=t.End?t.End.clone():null,a=t.Start?t.Start.clone():null,this.iDiffInMinutes=null,this.eventType(t.Type||"VEVENT"),this.isTask("VTODO"===this.eventType()),this.calendarId(t.SelectedCalendar),this.calendars=t.Calendars,(o=this.calendars.getCalendarById(this.calendarId()))&&(l=o.owner()),this.callbackSave=t.CallbackSave,this.callbackDelete=t.CallbackDelete,this.callbackAttendeeActionDecline=t.CallbackAttendeeActionDecline,this.timeFormatMoment=t.TimeFormat,this.dateFormatMoment=c.getDateFormatForMoment(t.DateFormat),this.dateFormatDatePicker=C.getDateFormatForDatePicker(t.DateFormat),this.ampmTimeFormat(b.timeFormat()!==Enums.TimeFormat.F24),this.initializeDatePickers(),this.allDay(t.AllDay),a=r(a.format("X"),"X"),i=r(i.format("X"),"X"),a&&(this.setStartDate(a,!0),this.startTime(a.format(this.timeFormatMoment))),i&&this.allDay()&&i.subtract(1,"days"),!i&&a&&(i=a),i&&(this.setEndDate(i,!0),this.endTime(i.format(this.timeFormatMoment))),this.calendars&&this.calendarsList(s.filter(this.calendars.collection(),(function(t){return t.isEditable()&&!t.subscribed()}))),!t.Alarms&&y.AllowDefaultReminders&&(t.Alarms=y.DefaultReminders),this.selectedCalendarId(t.SelectedCalendar),this.selectedCalendarId.valueHasMutated(),this.changeCalendarColor(this.selectedCalendarId()),this.id(t.ID||null),this.uid(t.Uid||null),this.recurrenceId(t.RecurrenceId||null),this.subject(t.Subject||""),this.status(t.Status||!1),this.locationView.setPlain(t.Location),this.descriptionView.setPlain(t.Description),this.allEvents(t.AllEvents||Enums.CalendarEditRecurrenceEvent.AllEvents),this.isTaskApp(t.IsTaskApp||!1),this.populateAlarms(t.Alarms),this.organizer(h.pString(t.Organizer)),this.appointment(t.Appointment),this.attendees(t.Attendees||[]),s.isFunction(u.getAttendee)&&(n=u.getAttendee(this.attendees())),this.isMyEvent((""!=this.organizer()&&e===this.organizer()||""==this.organizer())&&(e===t.Owner||e===l)),this.editableSwitch(this.selectedCalendarIsShared(),this.selectedCalendarIsEditable(),this.isMyEvent(),this.selectedCalendarIsSubscribed()),this.setCurrentAttenderStatus(n,t.Attendees||[]),this.owner(t.Owner||e),this.guestAutocomplete(""),this.excluded(t.Excluded||!1),this.rrule(t.RRule||null),this.repeatRuleParse(t.RRule||null),null===this.id()&&this.subjectFocus(!0),this.autosizeTrigger.notifySubscribers(!0),this.modified=!1,this.isAppointmentButtonsVisible(this.appointment()&&this.selectedCalendarIsEditable()&&s.find(this.attendees(),(function(t){return t.email===e}))),this.isPrivateEvent(!!t.IsPrivate)},w.prototype.changeCalendarColor=function(t){if(s.isFunction(this.calendars.getCalendarById)){var e=this.calendars.getCalendarById(t);e&&(this.calendarColor(""),this.calendarColor(e.color()))}},w.prototype.onIsTaskClick=function(){this.eventType("VTODO"===this.eventType()?"VEVENT":"VTODO")},w.prototype.onSaveClick=function(){if(""===this.subject())E.showPopup(f,[l.i18n("CALENDARWEBCLIENT/ERROR_SUBJECT_BLANK"),s.bind((function(){this.subjectFocus(!0)}),this)]);else{if(this.callbackSave){var t=h.pInt(this.repeatPeriod()),e="",i=null,a=0,n=r(this.getDateTime(this.startDom(),this.startTime())),o=r(this.getDateTime(this.endDom(),this.endTime())),c={calendarId:this.calendarId(),newCalendarId:this.selectedCalendarId(),id:this.id(),uid:this.uid(),recurrenceId:this.recurrenceId(),allEvents:this.allEvents(),subject:this.subject(),title:C.getTitleForEvent(this.subject(),this.descriptionView.getPlain()),allDay:this.allDay(),location:this.locationView.getPlain(),description:this.descriptionView.getPlain(),alarms:this.getAlarmsArray(this.displayedAlarms()),attendees:this.attendees(),owner:this.owner(),modified:this.modified,type:this.eventType(),status:this.status(),withDate:this.withDate(),isPrivate:this.allowSetPrivateEvent()&&this.isPrivateEvent(),excluded:this.excluded()},d=h.pInt(this.always());if(this.allDay()&&o.add(1,"days"),c.start=n,c.end=o,t){i=(e=this.repeatEndDom().datepicker("getDate"))?r(e).unix():null,a=this.repeatInterval();const s={byDays:[],count:null,end:0,interval:1,period:t,until:null,weekNum:null};switch(t){case Enums.CalendarRepeatPeriod.Daily:d===Enums.CalendarAlways.Disable?(s.end=2,s.until=i):d===Enums.CalendarAlways.Enable&&(s.end=3);break;case Enums.CalendarRepeatPeriod.Weekly:this.setDayOfWeek(),s.byDays=this.getDays(),s.interval=a,d===Enums.CalendarAlways.Disable?(s.end=2,s.until=i):d===Enums.CalendarAlways.Enable&&(s.end=3);case Enums.CalendarRepeatPeriod.Monthly:case Enums.CalendarRepeatPeriod.Yearly:}c.rrule=s}this.callbackSave(c)}this.closePopup()}},w.prototype.onEscHandler=function(){this.dateEdit()?this.dateEdit(!1):this.closePopup()},w.prototype.onClose=function(){this.linkPopupEditableView.onClose(),this.hideAll(),this.cleanAll()},w.prototype.hideAll=function(){this.dateEdit(!1),this.repeatEdit(!1),this.guestsEdit(!1)},w.prototype.cleanAll=function(){this.isTask()?this.withDate(!1):this.withDate(!0),this.isTask(!1),this.subject(""),this.descriptionView.setPlain(""),this.locationView.setPlain(""),this.isRepeat(!1),this.allDay(!1),this.repeatPeriod(Enums.CalendarRepeatPeriod.None),this.repeatInterval(1),this.repeatCount(null),this.repeatWeekNum(null),this.startDate(""),this.startTime(""),this.endDate(""),this.endTime(""),this.repeatEndDate(""),this.displayedAlarms([]),this.weekMO(!1),this.weekTU(!1),this.weekWE(!1),this.weekTH(!1),this.weekFR(!1),this.weekSA(!1),this.weekSU(!1),this.attendees([]),this.always(1),this.selectedCalendarId(""),this.isPrivateEvent(!1),this.attendees([])},w.prototype.onDeleteClick=function(){if(this.callbackDelete){var t={calendarId:this.selectedCalendarId(),id:this.id(),uid:this.uid(),recurrenceId:this.recurrenceId(),allEvents:this.allEvents(),subject:this.subject(),title:C.getTitleForEvent(this.subject(),this.descriptionView.getPlain()),start:r(this.getDateTime(this.startDom(),this.startTime())),end:r(this.getDateTime(this.endDom(),this.endTime())),allDay:this.allDay(),location:this.locationView.getPlain(),description:this.descriptionView.getPlain()};this.callbackDelete(t)}this.closePopup()},w.prototype.showDates=function(t,e){e.stopPropagation(),this.dateEdit(!this.dateEdit())},w.prototype.showGuests=function(){if(this.attendees().length>0){var t=l.i18n("CALENDARWEBCLIENT/CONFIRM_REMOVE_ALL_ATTENDEES"),e=s.bind((function(t){t&&(this.guestsEdit(!1),this.guestEmailFocus(!1),this.attendees([]))}),this);E.showPopup(A,[t,e])}else this.guestsEdit(!this.guestsEdit()),this.guestEmailFocus(!this.guestEmailFocus())},w.prototype.onAddGuestClick=function(){var t=this.guestAutocompleteItem(),e=this.guestAutocomplete(),i=t||{name:"",email:e},a=s.any(this.attendees(),(function(t){return t.email===i.email}));""===i.email?m.showError(l.i18n("CALENDARWEBCLIENT/ERROR_EMAIL_BLANK")):i.email===this.owner()||a?this.recivedAnim(!0):this.attendees.push({status:0,name:i.name,email:i.email}),this.whomAnimate(i.email),this.guestAutocomplete(""),this.guestEmailFocus(!0)},w.prototype.populateAlarms=function(t){t?(this.alarmOptions(this.getDisplayedAlarms(s.union(this.defaultAlarms(),t))),this.displayedAlarms(this.getDisplayedAlarms(t))):this.alarmOptions(this.getDisplayedAlarms(this.defaultAlarms()))},w.prototype.getDisplayedAlarms=function(t){var e=[];return t&&s.each(t,(function(t){var i=this["alarm"+t]=n.observable(t),s=C.getReminderFiendlyTitle(t);i.subscribe((function(){this.disableAlarms(),this.modified=!0}),this),e.push({value:t,alarm:i,text:s,isDisabled:!1})}),this),s.sortBy(e,(function(t){return t.value}))},w.prototype.getDisplayedPeriods=function(){return[{label:l.i18n("CALENDARWEBCLIENT/LABEL_REPEAT_NEVER"),value:0},{label:l.i18n("CALENDARWEBCLIENT/LABEL_REPEAT_DAILY"),value:1},{label:l.i18n("CALENDARWEBCLIENT/LABEL_REPEAT_WEEKLY"),value:2},{label:l.i18n("CALENDARWEBCLIENT/LABEL_REPEAT_MONTHLY"),value:3},{label:l.i18n("CALENDARWEBCLIENT/LABEL_REPEAT_YEARLY"),value:4}]},w.prototype.getAlarmsArray=function(t){var e=[];return s.each(t,(function(t,i){e.push(t.alarm())}),this),s.sortBy(e,(function(t){return-t}))},w.prototype.addFirstAlarm=function(){if(this.displayedAlarms().length){var t=l.i18n("CALENDARWEBCLIENT/CONFIRM_REMOVE_ALL_ALARMS"),e=s.bind((function(t){t&&this.displayedAlarms.removeAll()}),this);E.showPopup(A,[t,e])}else this.displayedAlarms(this.getDisplayedAlarms([this.alarmOptions()[0].value]))},w.prototype.addAlarm=function(){var t,e,i=0;e=s.sortBy(this.displayedAlarms(),(function(t){return t.alarm()})),s.each(e,(function(t){var e=t.alarm();5!==e&&i<=5?i=5:10!==e&&i<=10?i=10:15!==e&&i<=15?i=15:30!==e&&i<=30?i=30:1440!==e&&i<=1440&&(i=1440)})),t=this.getDisplayedAlarms([i])[0],this["alarm"+i]=n.observable(i),this.displayedAlarms.push(t)},w.prototype.removeAlarm=function(t){this.displayedAlarms.remove(t)},w.prototype.removeGuest=function(t){this.attendees.remove(t)},w.prototype.disableAlarms=function(){s.each(this.alarmOptions(),(function(t,e){t.isDisabled=s.any(this.displayedAlarms(),(function(e){return e.alarm()===t.value}))}),this),this.alarmOptions.valueHasMutated()},w.prototype.autocompleteCallback=function(t,e){const i={exceptEmail:this.owner()},a=p.run("ContactsWebclient","getSuggestionsAutocompleteCallback",[i]);s.isFunction(a)&&(this.guestAutocompleteItem(null),a(t,e))},w.prototype.repeatRuleParse=function(t){var e=this.allEvents();if(this.repeatEndDom().datepicker("option","minDate",this.getDateTime(this.endDom())),t&&e===Enums.CalendarEditRecurrenceEvent.AllEvents){if(t.until){var i=new Date(1e3*t.until),a=new Date(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds());this.repeatEndDom().datepicker("setDate",a)}t.byDays.length&&s.each(t.byDays,(function(t){this["week"+t](!0)}),this),this.repeatPeriod(t.period),this.repeatInterval(t.interval),this.repeatCount(t.count),this.repeatWeekNum(t.weekNum),this.always(3===t.end?1:0)}},w.prototype.getDays=function(){var t=[];return this.weekMO()&&t.push("MO"),this.weekTU()&&t.push("TU"),this.weekWE()&&t.push("WE"),this.weekTH()&&t.push("TH"),this.weekFR()&&t.push("FR"),this.weekSA()&&t.push("SA"),this.weekSU()&&t.push("SU"),t},w.prototype.onMainPanelClick=function(){this.dateEdit()&&this.dateEdit(!1)},w.prototype.getDateWithoutYearIfMonthWord=function(t){var e=t.split(" "),i=r().format("YYYY");return 3===e.length&&i===e[2]?e[0]+" "+e[1]:t},w.prototype.setStartDate=function(t,e){e&&this.startDom().datepicker("setDate",t.toDate()),this.startDate(this.getDateWithoutYearIfMonthWord(a(this.startDom()).val())),this.yearlyDayText(l.i18n("CALENDARWEBCLIENT/LABEL_REPEAT_YEARLY_DAYMONTH",{DAYMONTH:t.format(this.getDateMonthFormat())})),this.monthlyDayText(l.i18n("CALENDARWEBCLIENT/LABEL_REPEAT_MONTHLY_DAY",{DAY:t.format("DD")}))},w.prototype.selectStartDate=function(){if(!this.lockSelectStartEndDate()&&this.startDate()&&this.endDate()){this.lockSelectStartEndDate(!0);var t=this.getDateTime(this.startDom(),this.startTime()),e=r(t),i=this.getDateTime(this.endDom(),this.endTime()),s=r(i);h.isNumber(this.iDiffInMinutes)&&(i=(s=e.clone().add(this.iDiffInMinutes,"minutes")).toDate(),this.setEndDate(s,!0),this.endTime(s.format(this.timeFormatMoment))),s.diff(e,"minutes")<0&&(this.setEndDate(e,!0),this.endTime(e.format(this.timeFormatMoment))),this.isEvOneDay(0===s.diff(e,"days")),this.isEvOneTime(0===s.diff(e,"minutes")),this.setStartDate(e,!1),this.startTime(e.format(this.timeFormatMoment)),this.lockSelectStartEndDate(!1)}},w.prototype.getDateMonthFormat=function(){var t=this.dateFormatMoment.slice(0,-5);return-1===a.inArray(t,["MM/DD","DD/MM","DD MMMM"])&&(t="MM/DD"),t},w.prototype.setEndDate=function(t,e){e&&this.endDom().datepicker("setDate",t.toDate()),this.endDate(this.getDateWithoutYearIfMonthWord(a(this.endDom()).val()))},w.prototype.selectEndDate=function(){if(!this.lockSelectStartEndDate()&&this.endDate()&&this.startDate()){this.lockSelectStartEndDate(!0);var t=this.getDateTime(this.startDom(),this.startTime()),e=r(t),i=this.getDateTime(this.endDom(),this.endTime()),s=r(i);this.iDiffInMinutes=s.diff(e,"minutes"),this.iDiffInMinutes<0&&(this.setStartDate(s,!0),this.startTime(s.format(this.timeFormatMoment)),this.iDiffInMinutes=0),this.isEvOneDay(0===s.diff(e,"days")),this.isEvOneTime(0===s.diff(e,"minutes")),this.setEndDate(s,!1),this.endTime(s.format(this.timeFormatMoment)),this.repeatEndDom().datepicker("option","minDate",i),this.isRepeat()||this.repeatEndDom().datepicker("setDate",s.add(7,"days").toDate()),this.lockSelectStartEndDate(!1)}},w.prototype.getDateTime=function(t,e){e=e?r(e,this.timeFormatMoment).format("HH:mm"):"";var i=t.datepicker("getDate"),s=e?e.split(":"):[];return 2===s.length&&null!==i&&(i.setHours(s[0]),i.setMinutes(s[1])),i},w.prototype.setActualTime=function(){if(!this.lockSelectStartEndDate()&&this.endDate()&&this.startDate()){this.lockSelectStartEndDate(!0);var t=r().format(this.timeFormatMoment),e=this.getDateTime(this.startDom(),t),i=r(e),a=this.getDateTime(this.endDom(),t),n=r(a);s.isEqual(i,n)&&(n.add(30,"minutes"),this.isEvOneTime(!1)),i.minutes()>30?(i.add(60-i.minutes(),"minutes"),n.add(90-n.minutes(),"minutes")):(i.add(30-i.minutes(),"minutes"),n.add(60-n.minutes(),"minutes")),this.iDiffInMinutes=n.diff(i,"minutes"),this.setStartDate(i,!0),this.startTime(i.format(this.timeFormatMoment)),this.setEndDate(n,!0),this.endTime(n.format(this.timeFormatMoment)),this.lockSelectStartEndDate(!1)}},w.prototype.onSetAppointmentActionResponse=function(t,e){t.Result||d.showErrorByCode(t,l.i18n("COREWEBCLIENT/ERROR_UNKNOWN"))},w.prototype.setAppointmentAction=function(t){const e=D.getIntDecision(t);if(e!==this.attenderStatus()){var i=this.attendees(),a=u.getAttendee?u.getAttendee(this.attendees()):"",n=s.find(this.attendees(),(function(t){return t.email===a}),this),r=this.calendars.getCalendarById(this.selectedCalendarId()),o={AppointmentAction:t,CalendarId:this.selectedCalendarId(),EventId:this.uid(),Attendee:a,RecurrenceId:this.recurrenceId(),AllEvents:this.allEvents()};n&&(D.markIcalInCache(t,this.uid()),T.send("SetAppointmentAction",o,this.onSetAppointmentActionResponse,this,"CalendarMeetingsPlugin"),n.status=e,this.attendees([]),this.attendees(i),this.setCurrentAttenderStatus(n.email,this.attendees()),t===Enums.IcalConfig.Declined&&r&&this.callbackAttendeeActionDecline&&s.isFunction(this.callbackAttendeeActionDecline)&&(this.callbackAttendeeActionDecline(r,this.id()),this.closePopup()))}},w.prototype.editableSwitch=function(t,e,i,s=!1){this.isEditable((t&&e||i)&&!s),this.isEditableReminders(e)},w.prototype.setCurrentAttenderStatus=function(t,e){var i=s.find(e,(function(e){return e.email===t}));this.attenderStatus(i?i.status:0)},w.prototype.getAttenderTextStatus=function(t){switch(t){case 0:t=l.i18n("CALENDARWEBCLIENT/LABEL_ATTENDER_STATUS_PENDING");break;case 1:t=l.i18n("CALENDARWEBCLIENT/LABEL_ATTENDER_STATUS_ACCEPTED");break;case 2:t=l.i18n("CALENDARWEBCLIENT/LABEL_ATTENDER_STATUS_DECLINED");break;case 3:t=l.i18n("CALENDARWEBCLIENT/LABEL_ATTENDER_STATUS_TENTATIVE")}return t},w.prototype.setDayOfWeek=function(){if(this.repeatPeriod()===Enums.CalendarRepeatPeriod.Weekly&&!this.getDays().length)switch(this.getDateTime(this.startDom()).getUTCDay()){case 0:this.weekMO(!0);break;case 1:this.weekTU(!0);break;case 2:this.weekWE(!0);break;case 3:this.weekTH(!0);break;case 4:this.weekFR(!0);break;case 5:this.weekSA(!0);break;case 6:this.weekSU(!0)}},w.prototype.switchTask=function(t){this.isTask(t)},t.exports=new w},ZC11:(t,e,i)=>{"use strict";var s=i("a7T2"),a=i("p09A"),n=i("H20a"),r=i("o1lX");function o(){r.call(this),this.fCallback=null,this.confirmDesc=a.observable(n.i18n("CALENDARWEBCLIENT/CONFIRM_EDIT_RECURRENCE")),this.onlyThisInstanceButtonText=n.i18n("CALENDARWEBCLIENT/ACTION_CHANGE_ONLY_THIS_INSTANCE"),this.allEventsButtonText=a.observable(n.i18n("CALENDARWEBCLIENT/ACTION_CHANGE_ALL_EVENTS")),this.cancelButtonText=n.i18n("COREWEBCLIENT/ACTION_CANCEL")}s.extendOwn(o.prototype,r.prototype),o.prototype.PopupTemplate="CalendarWebclient_EditEventRecurrencePopup",o.prototype.onOpen=function(t,e){s.isFunction(t)&&(this.fCallback=t),"VTODO"===e?(this.confirmDesc(n.i18n("CALENDARWEBCLIENT/CONFIRM_EDIT_RECURRENCE_TASKS")),this.allEventsButtonText(n.i18n("CALENDARWEBCLIENT/ACTION_CHANGE_ALL_TASKS"))):(this.confirmDesc(n.i18n("CALENDARWEBCLIENT/CONFIRM_EDIT_RECURRENCE")),this.allEventsButtonText(n.i18n("CALENDARWEBCLIENT/ACTION_CHANGE_ALL_EVENTS")))},o.prototype.onlyThisInstanceButtonClick=function(){this.fCallback&&this.fCallback(Enums.CalendarEditRecurrenceEvent.OnlyThisInstance),this.closePopup()},o.prototype.allEventsButtonClick=function(){this.fCallback&&this.fCallback(Enums.CalendarEditRecurrenceEvent.AllEvents),this.closePopup()},o.prototype.cancelPopup=function(){this.fCallback&&this.fCallback(Enums.CalendarEditRecurrenceEvent.None),this.closePopup()},t.exports=new o},HZAs:(t,e,i)=>{"use strict";const s=i("exyt");t.exports={getIntDecision(t){switch(t){case Enums.IcalConfig.Accepted:return Enums.IcalConfigInt.Accepted;case Enums.IcalConfig.Tentative:return Enums.IcalConfigInt.Tentative;case Enums.IcalConfig.Declined:return Enums.IcalConfigInt.Declined;default:return Enums.IcalConfigInt.NeedsAction}},markIcalInCache(t,e){switch(t){case Enums.IcalConfig.Accepted:s.markIcalAccepted(e);break;case Enums.IcalConfig.Tentative:s.markIcalTentative(e);break;case Enums.IcalConfig.Declined:s.markIcalNonexistent(e)}}}},nwS3:(t,e,i)=>{"use strict";i("a7T2");var s=i("M4cL"),a=i("A3in"),n=i("H20a"),r=i("KvAJ");a.getTitleForEvent=function(t,e){if(r.AddDescriptionToTitle)return s.trim((t+" "+e).replace(/[\n\r]/g," "));var i=t?s.trim(t.replace(/[\n\r]/," ")):"",a=i.indexOf(" ",180);return a>=0&&(i=i.substring(0,a)+"..."),i.length>200&&(i=i.substring(0,200)+"..."),i},a.getReminderFiendlyTitle=function(t){let e=""+t;return e=t>0&&t<60?n.i18n("COREWEBCLIENT/LABEL_MINUTES_PLURAL",{COUNT:t},null,t):t>=60&&t<1440?n.i18n("CALENDARWEBCLIENT/LABEL_HOURS_PLURAL",{COUNT:t/60},null,t/60):t>=1440&&t<10080?n.i18n("CALENDARWEBCLIENT/LABEL_DAYS_PLURAL",{COUNT:t/1440},null,t/1440):n.i18n("CALENDARWEBCLIENT/LABEL_WEEKS_PLURAL",{COUNT:t/10080},null,t/10080),e},t.exports=a},W5ZY:(t,e,i)=>{"use strict";var s=i("M4cL");const a=i("H20a"),n=i("KC/L"),r=i("jNBr");t.exports={parseDescriptionLocation(t){const e=n.pString(t).replace(/\\n/g,"\n").replace(/\r/g,"");if(a.isHtml(e)){const t=s(`
${e.replace(/\n/g,"
")}
`);return t.find("a").attr("target","_blank"),t.html()}return a.plainToHtml(e,!0)},formatDate(t){const e=new Date(n.pString(t)),i=new r;return i.parse(e.getTime()/1e3),i.getDate()}}},"8tGW":(t,e,i)=>{"use strict";var s=i("M4cL");const a=i("p09A");function n(){this.visibleLinkPopup=a.observable(!1),this.linkPopupDom=a.observable(null),this.linkHrefDom=a.observable(null),this.linkHref=a.observable(""),this.visibleLinkHref=a.observable(!1),this.allowEditLinks=a.observable(!1),this.currLink=!1,this.onBodyClick=function(t){0===s(t.target).parents("div.inline_popup").length&&this.closeAllPopups()}.bind(this)}n.prototype.PopupTemplate="CalendarWebclient_LinkPopupEditableView",n.prototype.onOpen=function(){s(document.body).on("click",this.onBodyClick)},n.prototype.onClose=function(){s(document.body).off("click",this.onBodyClick)},n.prototype.initInputField=function(t,e){t.on("click","a",function(i){if(i.ctrlKey)window.open(i.target.href,"_blank");else{const s=i.currentTarget;this.visibleLinkPopup()&&s===this.currLink?(this.currLink=null,this.hideLinkPopup()):(this.allowEditLinks(e),this.showLinkPopup(s,t))}i.preventDefault(),i.stopPropagation()}.bind(this))},n.prototype.showLinkPopup=function(t,e){const i=s(t),a=e.parents("div.row").position(),n=i.position(),r=i.height(),o={left:Math.round(n.left+a.left),top:Math.round(n.top+r+a.top)};this.currLink=t,this.linkHref(i.attr("href")||i.text()),s(this.linkPopupDom()).css(o),s(this.linkHrefDom()).css(o),this.visibleLinkPopup(!0)},n.prototype.hideLinkPopup=function(){this.visibleLinkPopup(!1)},n.prototype.showChangeLink=function(){this.visibleLinkHref(!0),this.hideLinkPopup()},n.prototype.changeLink=function(){this.changeLinkHref(this.linkHref()),this.hideChangeLink()},n.prototype.hideChangeLink=function(){this.visibleLinkHref(!1)},n.prototype.normaliseURL=function(t){return-1!==t.search(/^https?:\/\/|^mailto:|^tel:/g)?t:"http://"+t},n.prototype.changeLinkHref=function(t){const e=this.normaliseURL(t),i=s(this.currLink);i&&(i.attr("href")===i.text()&&i.text(e),i.attr("href",e),this.currLink=null)},n.prototype.removeCurrentLink=function(){if(this.currLink&&document.createRange&&window.getSelection){const t=document.createRange(),e=window.getSelection();t.selectNodeContents(this.currLink),e.removeAllRanges(),e.addRange(t),window.document.execCommand("unlink"),this.currLink=null,this.hideLinkPopup()}},n.prototype.closeAllPopups=function(){this.currLink=null,this.hideLinkPopup(),this.hideChangeLink()},t.exports=n},QDxx:(t,e,i)=>{"use strict";const s=i("p09A"),a=i("H20a"),n=i("KC/L");function r({isEditableObservable:t,autosizeTriggerObservable:e,linkPopupEditableView:i,allowEditLinks:r,placeholderText:o}){this.isEditable=t,this.autosizeTrigger=e,this.placeholderText=o,this.dataHtml=s.observable(""),this.dataDom=s.observable(null),this.dataDom.subscribe((function(){this.dataDom()&&(this.dataDom().on("keyup paste cut",function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||this.dataHtml(this.dataDom().html())}.bind(this)),this.dataDom().on("paste",(function(t){const e=(t=t.originalEvent||t).clipboardData||window.clipboardData;if(e){const i=n.pString(e.getData("text")),s=a.plainToHtml(i,!0);window.document.execCommand("insertHTML",!1,s),t.preventDefault()}})),i.initInputField(this.dataDom(),r),""!==this.dataHtml()&&this.dataDom().html(this.dataHtml()))}),this),this.dataFocus=s.observable(!1)}r.prototype.PopupTemplate="CalendarWebclient_SimpleEditableView",r.prototype.getHtml=function(){return this.dataHtml()},r.prototype.getPlain=function(){return a.htmlToPlain(this.dataHtml())},r.prototype.setHtml=function(t){this.setData(n.pString(t).replace(/\r/g,"").replace(/\n/g,"
"))},r.prototype.setData=function(t){this.dataHtml(t),this.dataDom()&&this.dataDom().html(this.dataHtml())},r.prototype.setPlain=function(t){let e=n.pString(t);a.isHtml(e)||(e=a.plainToHtml(e,!0)),this.setData(e)},t.exports=r},A3in:(t,e,i)=>{"use strict";var s=i("a7T2"),a=i("sdEb"),n={getTimeListStepHour:function(t,e){return t=t||"HH:mm",e=e||"k",s.map(["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"],(function(i){var s=a(i,"HH:mm");return{text:s.format(t),value:s.format(e)}}))},getTimeListStepHalfHour:function(t){return s.map(["00:00","00:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","10:30","11:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30"],(function(e){var i=a(e,"HH:mm").format(t);return{text:i,value:i}}))},getDateFormatForDatePicker:function(t){return t.replace("MM","mm").replace("DD","dd").replace("YYYY","yy").replace("Month","MM")}};t.exports=n},injE:(t,e,i)=>{"use strict";var s=i("H20a"),a={getMonthNamesArray:function(){for(var t=s.i18n("COREWEBCLIENT/LIST_MONTH_NAMES").split(" "),e=t.length;e<12;e++)t[e]="";return t},daysInMonth:function(t,e){return 0
t&&0
{var s=i("p09A"),a=i("W66n");function n(t){this.sName="",this.visible=s.observable(!0),this.baseHash=s.observable(""),this.hash=s.observable(""),this.linkText=s.observable(t),this.isCurrent=s.observable(!1),this.recivedAnim=s.observable(!1).extend({autoResetToFalse:500}),this.unseenCount=s.observable(0),this.allowChangeTitle=s.observable(!1),this.inactiveTitle=s.observable(""),this.excludedHashes=s.observableArray([])}n.prototype.ViewTemplate="CoreWebclient_HeaderItemView",n.prototype.setName=function(t){this.sName=t.toLowerCase(),""===this.baseHash()?(this.hash(a.buildHashFromArray([t.toLowerCase()])),this.baseHash(this.hash())):this.hash(this.baseHash())},t.exports=n}}]);