aboutsummaryrefslogblamecommitdiffstats
path: root/library/fullcalendar/packages/rrule/index.global.min.js
blob: 4197cedb2eb3481d483bfe4fbccff1580aa38bd2 (plain) (tree)
1
2
3
4
5
6





                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
/*!
FullCalendar RRule Plugin v6.0.3
Docs & License: https://fullcalendar.io/docs/rrule-plugin
(c) 2022 Adam Shaw
*/
FullCalendar.RRule=function(e,r,t,i){"use strict";const n={parse(e,r){if(null!=e.rrule){let n=function(e,r){let n,u=!1,a=!1;if("string"==typeof e.rrule){let r=function(e){let r=t.rrulestr(e,{forceset:!0}),n=function(e){let r=!1,t=!1;function n(e,n,l){let u=i.parseMarker(l);r=r||!u.isTimeUnspecified,t=t||null!==u.timeZoneOffset}return e.replace(/\b(DTSTART:)([^\n]*)/,n),e.replace(/\b(EXDATE:)([^\n]*)/,n),e.replace(/\b(UNTIL=)([^;\n]*)/,n),{isTimeSpecified:r,isTimeZoneSpecified:t}}(e);return Object.assign({rruleSet:r},n)}(e.rrule);n=r.rruleSet,u=r.isTimeSpecified,a=r.isTimeZoneSpecified}if("object"==typeof e.rrule&&e.rrule){let i=l(e.rrule,r);n=new t.RRuleSet,n.rrule(i.rrule),u=i.isTimeSpecified,a=i.isTimeZoneSpecified}let s=[].concat(e.exdate||[]),f=[].concat(e.exrule||[]);for(let e of s){let r=i.parseMarker(e);u=u||!r.isTimeUnspecified,a=a||null!==r.timeZoneOffset,n.exdate(new Date(r.marker.valueOf()-60*(r.timeZoneOffset||0)*1e3))}for(let e of f){let t=l(e,r);u=u||t.isTimeSpecified,a=a||t.isTimeZoneSpecified,n.exrule(t.rrule)}return{rruleSet:n,isTimeSpecified:u,isTimeZoneSpecified:a}}(e,r);if(n)return{typeData:{rruleSet:n.rruleSet,isTimeZoneSpecified:n.isTimeZoneSpecified},allDayGuess:!n.isTimeSpecified,duration:e.duration}}return null},expand(e,r,t){let i;return i=e.isTimeZoneSpecified?e.rruleSet.between(t.toDate(r.start),t.toDate(r.end),!0).map(e=>t.createMarker(e)):e.rruleSet.between(r.start,r.end,!0),i}};function l(e,r){let n=!1,l=!1;function s(e){if("string"==typeof e){let r=i.parseMarker(e);return r?(n=n||!r.isTimeUnspecified,l=l||null!==r.timeZoneOffset,new Date(r.marker.valueOf()-60*(r.timeZoneOffset||0)*1e3)):null}return e}let f=Object.assign(Object.assign({},e),{dtstart:s(e.dtstart),until:s(e.until),freq:a(e.freq),wkst:null==e.wkst?(r.weekDow-1+7)%7:a(e.wkst),byweekday:u(e.byweekday)});return{rrule:new t.RRule(f),isTimeSpecified:n,isTimeZoneSpecified:l}}function u(e){return Array.isArray(e)?e.map(a):a(e)}function a(e){return"string"==typeof e?t.RRule[e.toUpperCase()]:e}const s={rrule:i.identity,exrule:i.identity,exdate:i.identity,duration:i.createDuration};var f=r.createPlugin({name:"@fullcalendar/rrule",recurringTypes:[n],eventRefiners:s});return r.globalPlugins.push(f),e.default=f,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,rrule,FullCalendar.Internal);