cc-element-components
Version:
该项目是基于`element-plus`二次封装组件,使用的技术栈为`vue3` + `typescript` + `element-plus`。在此项目当中,我们会基于`element-plus`的组件库已有组件封装如下组件: - 图标选择器 - 时间选择器 - 城市选择器 - 省市区选择器 - 通知菜单 - 趋势标记 - 评论 - 数据列表 - 数值统计 - 倒计时 - 分割面板 - 时间轴 - 弹框拓展 - 进度条拓展 - 导航菜单拓展 - 可配置项表格 - 可配置项表单 - 日历
1,481 lines (1,479 loc) • 434 kB
JavaScript
import { defineComponent, ref, watch, onMounted, openBlock, createElementBlock } from "vue";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var extendStatics = function(d2, b2) {
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
d3.__proto__ = b3;
} || function(d3, b3) {
for (var p2 in b3)
if (Object.prototype.hasOwnProperty.call(b3, p2))
d3[p2] = b3[p2];
};
return extendStatics(d2, b2);
};
function __extends(d2, b2) {
if (typeof b2 !== "function" && b2 !== null)
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
extendStatics(d2, b2);
function __() {
this.constructor = d2;
}
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign2(t2) {
for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
s2 = arguments[i2];
for (var p2 in s2)
if (Object.prototype.hasOwnProperty.call(s2, p2))
t2[p2] = s2[p2];
}
return t2;
};
return __assign.apply(this, arguments);
};
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2)
for (var i2 = 0, l2 = from.length, ar; i2 < l2; i2++) {
if (ar || !(i2 in from)) {
if (!ar)
ar = Array.prototype.slice.call(from, 0, i2);
ar[i2] = from[i2];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
var n, l, u, t, r$1, o, f$1, e$1 = {}, c$1 = [], s = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
function a$1(n2, l2) {
for (var u2 in l2)
n2[u2] = l2[u2];
return n2;
}
function h(n2) {
var l2 = n2.parentNode;
l2 && l2.removeChild(n2);
}
function v$1(l2, u2, i2) {
var t2, r2, o2, f2 = {};
for (o2 in u2)
o2 == "key" ? t2 = u2[o2] : o2 == "ref" ? r2 = u2[o2] : f2[o2] = u2[o2];
if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n.call(arguments, 2) : i2), typeof l2 == "function" && l2.defaultProps != null)
for (o2 in l2.defaultProps)
f2[o2] === void 0 && (f2[o2] = l2.defaultProps[o2]);
return y(l2, f2, t2, r2, null);
}
function y(n2, i2, t2, r2, o2) {
var f2 = { type: n2, props: i2, key: t2, ref: r2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: o2 == null ? ++u : o2 };
return o2 == null && l.vnode != null && l.vnode(f2), f2;
}
function p() {
return { current: null };
}
function d(n2) {
return n2.children;
}
function _(n2, l2) {
this.props = n2, this.context = l2;
}
function k(n2, l2) {
if (l2 == null)
return n2.__ ? k(n2.__, n2.__.__k.indexOf(n2) + 1) : null;
for (var u2; l2 < n2.__k.length; l2++)
if ((u2 = n2.__k[l2]) != null && u2.__e != null)
return u2.__e;
return typeof n2.type == "function" ? k(n2) : null;
}
function b$1(n2) {
var l2, u2;
if ((n2 = n2.__) != null && n2.__c != null) {
for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++)
if ((u2 = n2.__k[l2]) != null && u2.__e != null) {
n2.__e = n2.__c.base = u2.__e;
break;
}
return b$1(n2);
}
}
function m(n2) {
(!n2.__d && (n2.__d = true) && t.push(n2) && !g$1.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || r$1)(g$1);
}
function g$1() {
for (var n2; g$1.__r = t.length; )
n2 = t.sort(function(n3, l2) {
return n3.__v.__b - l2.__v.__b;
}), t = [], n2.some(function(n3) {
var l2, u2, i2, t2, r2, o2;
n3.__d && (r2 = (t2 = (l2 = n3).__v).__e, (o2 = l2.__P) && (u2 = [], (i2 = a$1({}, t2)).__v = t2.__v + 1, j$2(o2, t2, i2, l2.__n, o2.ownerSVGElement !== void 0, t2.__h != null ? [r2] : null, u2, r2 == null ? k(t2) : r2, t2.__h), z$1(u2, t2), t2.__e != r2 && b$1(t2)));
});
}
function w$1(n2, l2, u2, i2, t2, r2, o2, f2, s2, a2) {
var h2, v2, p2, _2, b2, m2, g2, w2 = i2 && i2.__k || c$1, A2 = w2.length;
for (u2.__k = [], h2 = 0; h2 < l2.length; h2++)
if ((_2 = u2.__k[h2] = (_2 = l2[h2]) == null || typeof _2 == "boolean" ? null : typeof _2 == "string" || typeof _2 == "number" || typeof _2 == "bigint" ? y(null, _2, null, null, _2) : Array.isArray(_2) ? y(d, { children: _2 }, null, null, null) : _2.__b > 0 ? y(_2.type, _2.props, _2.key, null, _2.__v) : _2) != null) {
if (_2.__ = u2, _2.__b = u2.__b + 1, (p2 = w2[h2]) === null || p2 && _2.key == p2.key && _2.type === p2.type)
w2[h2] = void 0;
else
for (v2 = 0; v2 < A2; v2++) {
if ((p2 = w2[v2]) && _2.key == p2.key && _2.type === p2.type) {
w2[v2] = void 0;
break;
}
p2 = null;
}
j$2(n2, _2, p2 = p2 || e$1, t2, r2, o2, f2, s2, a2), b2 = _2.__e, (v2 = _2.ref) && p2.ref != v2 && (g2 || (g2 = []), p2.ref && g2.push(p2.ref, null, _2), g2.push(v2, _2.__c || b2, _2)), b2 != null ? (m2 == null && (m2 = b2), typeof _2.type == "function" && _2.__k === p2.__k ? _2.__d = s2 = x$1(_2, s2, n2) : s2 = P$1(n2, _2, p2, w2, b2, s2), typeof u2.type == "function" && (u2.__d = s2)) : s2 && p2.__e == s2 && s2.parentNode != n2 && (s2 = k(p2));
}
for (u2.__e = m2, h2 = A2; h2--; )
w2[h2] != null && (typeof u2.type == "function" && w2[h2].__e != null && w2[h2].__e == u2.__d && (u2.__d = k(i2, h2 + 1)), N(w2[h2], w2[h2]));
if (g2)
for (h2 = 0; h2 < g2.length; h2++)
M$1(g2[h2], g2[++h2], g2[++h2]);
}
function x$1(n2, l2, u2) {
for (var i2, t2 = n2.__k, r2 = 0; t2 && r2 < t2.length; r2++)
(i2 = t2[r2]) && (i2.__ = n2, l2 = typeof i2.type == "function" ? x$1(i2, l2, u2) : P$1(u2, i2, i2, t2, i2.__e, l2));
return l2;
}
function A$1(n2, l2) {
return l2 = l2 || [], n2 == null || typeof n2 == "boolean" || (Array.isArray(n2) ? n2.some(function(n3) {
A$1(n3, l2);
}) : l2.push(n2)), l2;
}
function P$1(n2, l2, u2, i2, t2, r2) {
var o2, f2, e2;
if (l2.__d !== void 0)
o2 = l2.__d, l2.__d = void 0;
else if (u2 == null || t2 != r2 || t2.parentNode == null)
n:
if (r2 == null || r2.parentNode !== n2)
n2.appendChild(t2), o2 = null;
else {
for (f2 = r2, e2 = 0; (f2 = f2.nextSibling) && e2 < i2.length; e2 += 2)
if (f2 == t2)
break n;
n2.insertBefore(t2, r2), o2 = r2;
}
return o2 !== void 0 ? o2 : t2.nextSibling;
}
function C$1(n2, l2, u2, i2, t2) {
var r2;
for (r2 in u2)
r2 === "children" || r2 === "key" || r2 in l2 || H(n2, r2, null, u2[r2], i2);
for (r2 in l2)
t2 && typeof l2[r2] != "function" || r2 === "children" || r2 === "key" || r2 === "value" || r2 === "checked" || u2[r2] === l2[r2] || H(n2, r2, l2[r2], u2[r2], i2);
}
function $$1(n2, l2, u2) {
l2[0] === "-" ? n2.setProperty(l2, u2) : n2[l2] = u2 == null ? "" : typeof u2 != "number" || s.test(l2) ? u2 : u2 + "px";
}
function H(n2, l2, u2, i2, t2) {
var r2;
n:
if (l2 === "style")
if (typeof u2 == "string")
n2.style.cssText = u2;
else {
if (typeof i2 == "string" && (n2.style.cssText = i2 = ""), i2)
for (l2 in i2)
u2 && l2 in u2 || $$1(n2.style, l2, "");
if (u2)
for (l2 in u2)
i2 && u2[l2] === i2[l2] || $$1(n2.style, l2, u2[l2]);
}
else if (l2[0] === "o" && l2[1] === "n")
r2 = l2 !== (l2 = l2.replace(/Capture$/, "")), l2 = l2.toLowerCase() in n2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + r2] = u2, u2 ? i2 || n2.addEventListener(l2, r2 ? T$1 : I$1, r2) : n2.removeEventListener(l2, r2 ? T$1 : I$1, r2);
else if (l2 !== "dangerouslySetInnerHTML") {
if (t2)
l2 = l2.replace(/xlink[H:h]/, "h").replace(/sName$/, "s");
else if (l2 !== "href" && l2 !== "list" && l2 !== "form" && l2 !== "tabIndex" && l2 !== "download" && l2 in n2)
try {
n2[l2] = u2 == null ? "" : u2;
break n;
} catch (n3) {
}
typeof u2 == "function" || (u2 != null && (u2 !== false || l2[0] === "a" && l2[1] === "r") ? n2.setAttribute(l2, u2) : n2.removeAttribute(l2));
}
}
function I$1(n2) {
this.l[n2.type + false](l.event ? l.event(n2) : n2);
}
function T$1(n2) {
this.l[n2.type + true](l.event ? l.event(n2) : n2);
}
function j$2(n2, u2, i2, t2, r2, o2, f2, e2, c2) {
var s2, h2, v2, y2, p2, k2, b2, m2, g2, x2, A2, P2 = u2.type;
if (u2.constructor !== void 0)
return null;
i2.__h != null && (c2 = i2.__h, e2 = u2.__e = i2.__e, u2.__h = null, o2 = [e2]), (s2 = l.__b) && s2(u2);
try {
n:
if (typeof P2 == "function") {
if (m2 = u2.props, g2 = (s2 = P2.contextType) && t2[s2.__c], x2 = s2 ? g2 ? g2.props.value : s2.__ : t2, i2.__c ? b2 = (h2 = u2.__c = i2.__c).__ = h2.__E : ("prototype" in P2 && P2.prototype.render ? u2.__c = h2 = new P2(m2, x2) : (u2.__c = h2 = new _(m2, x2), h2.constructor = P2, h2.render = O$1), g2 && g2.sub(h2), h2.props = m2, h2.state || (h2.state = {}), h2.context = x2, h2.__n = t2, v2 = h2.__d = true, h2.__h = []), h2.__s == null && (h2.__s = h2.state), P2.getDerivedStateFromProps != null && (h2.__s == h2.state && (h2.__s = a$1({}, h2.__s)), a$1(h2.__s, P2.getDerivedStateFromProps(m2, h2.__s))), y2 = h2.props, p2 = h2.state, v2)
P2.getDerivedStateFromProps == null && h2.componentWillMount != null && h2.componentWillMount(), h2.componentDidMount != null && h2.__h.push(h2.componentDidMount);
else {
if (P2.getDerivedStateFromProps == null && m2 !== y2 && h2.componentWillReceiveProps != null && h2.componentWillReceiveProps(m2, x2), !h2.__e && h2.shouldComponentUpdate != null && h2.shouldComponentUpdate(m2, h2.__s, x2) === false || u2.__v === i2.__v) {
h2.props = m2, h2.state = h2.__s, u2.__v !== i2.__v && (h2.__d = false), h2.__v = u2, u2.__e = i2.__e, u2.__k = i2.__k, u2.__k.forEach(function(n3) {
n3 && (n3.__ = u2);
}), h2.__h.length && f2.push(h2);
break n;
}
h2.componentWillUpdate != null && h2.componentWillUpdate(m2, h2.__s, x2), h2.componentDidUpdate != null && h2.__h.push(function() {
h2.componentDidUpdate(y2, p2, k2);
});
}
h2.context = x2, h2.props = m2, h2.state = h2.__s, (s2 = l.__r) && s2(u2), h2.__d = false, h2.__v = u2, h2.__P = n2, s2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s, h2.getChildContext != null && (t2 = a$1(a$1({}, t2), h2.getChildContext())), v2 || h2.getSnapshotBeforeUpdate == null || (k2 = h2.getSnapshotBeforeUpdate(y2, p2)), A2 = s2 != null && s2.type === d && s2.key == null ? s2.props.children : s2, w$1(n2, Array.isArray(A2) ? A2 : [A2], u2, i2, t2, r2, o2, f2, e2, c2), h2.base = u2.__e, u2.__h = null, h2.__h.length && f2.push(h2), b2 && (h2.__E = h2.__ = null), h2.__e = false;
} else
o2 == null && u2.__v === i2.__v ? (u2.__k = i2.__k, u2.__e = i2.__e) : u2.__e = L$1(i2.__e, u2, i2, t2, r2, o2, f2, c2);
(s2 = l.diffed) && s2(u2);
} catch (n3) {
u2.__v = null, (c2 || o2 != null) && (u2.__e = e2, u2.__h = !!c2, o2[o2.indexOf(e2)] = null), l.__e(n3, u2, i2);
}
}
function z$1(n2, u2) {
l.__c && l.__c(u2, n2), n2.some(function(u3) {
try {
n2 = u3.__h, u3.__h = [], n2.some(function(n3) {
n3.call(u3);
});
} catch (n3) {
l.__e(n3, u3.__v);
}
});
}
function L$1(l2, u2, i2, t2, r2, o2, f2, c2) {
var s2, a2, v2, y2 = i2.props, p2 = u2.props, d2 = u2.type, _2 = 0;
if (d2 === "svg" && (r2 = true), o2 != null) {
for (; _2 < o2.length; _2++)
if ((s2 = o2[_2]) && (s2 === l2 || (d2 ? s2.localName == d2 : s2.nodeType == 3))) {
l2 = s2, o2[_2] = null;
break;
}
}
if (l2 == null) {
if (d2 === null)
return document.createTextNode(p2);
l2 = r2 ? document.createElementNS("http://www.w3.org/2000/svg", d2) : document.createElement(d2, p2.is && p2), o2 = null, c2 = false;
}
if (d2 === null)
y2 === p2 || c2 && l2.data === p2 || (l2.data = p2);
else {
if (o2 = o2 && n.call(l2.childNodes), a2 = (y2 = i2.props || e$1).dangerouslySetInnerHTML, v2 = p2.dangerouslySetInnerHTML, !c2) {
if (o2 != null)
for (y2 = {}, _2 = 0; _2 < l2.attributes.length; _2++)
y2[l2.attributes[_2].name] = l2.attributes[_2].value;
(v2 || a2) && (v2 && (a2 && v2.__html == a2.__html || v2.__html === l2.innerHTML) || (l2.innerHTML = v2 && v2.__html || ""));
}
if (C$1(l2, p2, y2, r2, c2), v2)
u2.__k = [];
else if (_2 = u2.props.children, w$1(l2, Array.isArray(_2) ? _2 : [_2], u2, i2, t2, r2 && d2 !== "foreignObject", o2, f2, o2 ? o2[0] : i2.__k && k(i2, 0), c2), o2 != null)
for (_2 = o2.length; _2--; )
o2[_2] != null && h(o2[_2]);
c2 || ("value" in p2 && (_2 = p2.value) !== void 0 && (_2 !== l2.value || d2 === "progress" && !_2) && H(l2, "value", _2, y2.value, false), "checked" in p2 && (_2 = p2.checked) !== void 0 && _2 !== l2.checked && H(l2, "checked", _2, y2.checked, false));
}
return l2;
}
function M$1(n2, u2, i2) {
try {
typeof n2 == "function" ? n2(u2) : n2.current = u2;
} catch (n3) {
l.__e(n3, i2);
}
}
function N(n2, u2, i2) {
var t2, r2;
if (l.unmount && l.unmount(n2), (t2 = n2.ref) && (t2.current && t2.current !== n2.__e || M$1(t2, null, u2)), (t2 = n2.__c) != null) {
if (t2.componentWillUnmount)
try {
t2.componentWillUnmount();
} catch (n3) {
l.__e(n3, u2);
}
t2.base = t2.__P = null;
}
if (t2 = n2.__k)
for (r2 = 0; r2 < t2.length; r2++)
t2[r2] && N(t2[r2], u2, typeof n2.type != "function");
i2 || n2.__e == null || h(n2.__e), n2.__e = n2.__d = void 0;
}
function O$1(n2, l2, u2) {
return this.constructor(n2, u2);
}
function S$1(u2, i2, t2) {
var r2, o2, f2;
l.__ && l.__(u2, i2), o2 = (r2 = typeof t2 == "function") ? null : t2 && t2.__k || i2.__k, f2 = [], j$2(i2, u2 = (!r2 && t2 || i2).__k = v$1(d, null, [u2]), o2 || e$1, e$1, i2.ownerSVGElement !== void 0, !r2 && t2 ? [t2] : o2 ? null : i2.firstChild ? n.call(i2.childNodes) : null, f2, !r2 && t2 ? t2 : o2 ? o2.__e : i2.firstChild, r2), z$1(f2, u2);
}
function D$1(n2, l2) {
var u2 = { __c: l2 = "__cC" + f$1++, __: n2, Consumer: function(n3, l3) {
return n3.children(l3);
}, Provider: function(n3) {
var u3, i2;
return this.getChildContext || (u3 = [], (i2 = {})[l2] = this, this.getChildContext = function() {
return i2;
}, this.shouldComponentUpdate = function(n4) {
this.props.value !== n4.value && u3.some(m);
}, this.sub = function(n4) {
u3.push(n4);
var l3 = n4.componentWillUnmount;
n4.componentWillUnmount = function() {
u3.splice(u3.indexOf(n4), 1), l3 && l3.call(n4);
};
}), n3.children;
} };
return u2.Provider.__ = u2.Consumer.contextType = u2;
}
n = c$1.slice, l = { __e: function(n2, l2) {
for (var u2, i2, t2; l2 = l2.__; )
if ((u2 = l2.__c) && !u2.__)
try {
if ((i2 = u2.constructor) && i2.getDerivedStateFromError != null && (u2.setState(i2.getDerivedStateFromError(n2)), t2 = u2.__d), u2.componentDidCatch != null && (u2.componentDidCatch(n2), t2 = u2.__d), t2)
return u2.__E = u2;
} catch (l3) {
n2 = l3;
}
throw n2;
} }, u = 0, _.prototype.setState = function(n2, l2) {
var u2;
u2 = this.__s != null && this.__s !== this.state ? this.__s : this.__s = a$1({}, this.state), typeof n2 == "function" && (n2 = n2(a$1({}, u2), this.props)), n2 && a$1(u2, n2), n2 != null && this.__v && (l2 && this.__h.push(l2), m(this));
}, _.prototype.forceUpdate = function(n2) {
this.__v && (this.__e = true, n2 && this.__h.push(n2), m(this));
}, _.prototype.render = d, t = [], r$1 = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, g$1.__r = 0, f$1 = 0;
var r, i = [], c = l.__b, f = l.__r, e = l.diffed, a = l.__c, v = l.unmount;
function x() {
i.forEach(function(t2) {
if (t2.__P)
try {
t2.__H.__h.forEach(g), t2.__H.__h.forEach(j$1), t2.__H.__h = [];
} catch (u2) {
t2.__H.__h = [], l.__e(u2, t2.__v);
}
}), i = [];
}
l.__b = function(n2) {
c && c(n2);
}, l.__r = function(n2) {
f && f(n2);
var r2 = n2.__c.__H;
r2 && (r2.__h.forEach(g), r2.__h.forEach(j$1), r2.__h = []);
}, l.diffed = function(t2) {
e && e(t2);
var o2 = t2.__c;
o2 && o2.__H && o2.__H.__h.length && (i.push(o2) !== 1 && r === l.requestAnimationFrame || ((r = l.requestAnimationFrame) || function(n2) {
var t3, u2 = function() {
clearTimeout(r2), b && cancelAnimationFrame(t3), setTimeout(n2);
}, r2 = setTimeout(u2, 100);
b && (t3 = requestAnimationFrame(u2));
})(x));
}, l.__c = function(t2, u2) {
u2.some(function(t3) {
try {
t3.__h.forEach(g), t3.__h = t3.__h.filter(function(n2) {
return !n2.__ || j$1(n2);
});
} catch (r2) {
u2.some(function(n2) {
n2.__h && (n2.__h = []);
}), u2 = [], l.__e(r2, t3.__v);
}
}), a && a(t2, u2);
}, l.unmount = function(t2) {
v && v(t2);
var u2 = t2.__c;
if (u2 && u2.__H)
try {
u2.__H.__.forEach(g);
} catch (t3) {
l.__e(t3, u2.__v);
}
};
var b = typeof requestAnimationFrame == "function";
function g(n2) {
typeof n2.__c == "function" && n2.__c();
}
function j$1(n2) {
n2.__c = n2.__();
}
function S(n2, t2) {
for (var e2 in t2)
n2[e2] = t2[e2];
return n2;
}
function C(n2, t2) {
for (var e2 in n2)
if (e2 !== "__source" && !(e2 in t2))
return true;
for (var r2 in t2)
if (r2 !== "__source" && n2[r2] !== t2[r2])
return true;
return false;
}
function E(n2) {
this.props = n2;
}
(E.prototype = new _()).isPureReactComponent = true, E.prototype.shouldComponentUpdate = function(n2, t2) {
return C(this.props, n2) || C(this.state, t2);
};
var w = l.__b;
l.__b = function(n2) {
n2.type && n2.type.__f && n2.ref && (n2.props.ref = n2.ref, n2.ref = null), w && w(n2);
};
var A = l.__e;
l.__e = function(n2, t2, e2) {
if (n2.then) {
for (var r2, u2 = t2; u2 = u2.__; )
if ((r2 = u2.__c) && r2.__c)
return t2.__e == null && (t2.__e = e2.__e, t2.__k = e2.__k), r2.__c(n2, t2);
}
A(n2, t2, e2);
};
var O = l.unmount;
function L() {
this.__u = 0, this.t = null, this.__b = null;
}
function U(n2) {
var t2 = n2.__.__c;
return t2 && t2.__e && t2.__e(n2);
}
function M() {
this.u = null, this.o = null;
}
l.unmount = function(n2) {
var t2 = n2.__c;
t2 && t2.__R && t2.__R(), t2 && n2.__h === true && (n2.type = null), O && O(n2);
}, (L.prototype = new _()).__c = function(n2, t2) {
var e2 = t2.__c, r2 = this;
r2.t == null && (r2.t = []), r2.t.push(e2);
var u2 = U(r2.__v), o2 = false, i2 = function() {
o2 || (o2 = true, e2.__R = null, u2 ? u2(l2) : l2());
};
e2.__R = i2;
var l2 = function() {
if (!--r2.__u) {
if (r2.state.__e) {
var n3 = r2.state.__e;
r2.__v.__k[0] = function n4(t4, e3, r3) {
return t4 && (t4.__v = null, t4.__k = t4.__k && t4.__k.map(function(t5) {
return n4(t5, e3, r3);
}), t4.__c && t4.__c.__P === e3 && (t4.__e && r3.insertBefore(t4.__e, t4.__d), t4.__c.__e = true, t4.__c.__P = r3)), t4;
}(n3, n3.__c.__P, n3.__c.__O);
}
var t3;
for (r2.setState({ __e: r2.__b = null }); t3 = r2.t.pop(); )
t3.forceUpdate();
}
}, c2 = t2.__h === true;
r2.__u++ || c2 || r2.setState({ __e: r2.__b = r2.__v.__k[0] }), n2.then(i2, i2);
}, L.prototype.componentWillUnmount = function() {
this.t = [];
}, L.prototype.render = function(n2, t2) {
if (this.__b) {
if (this.__v.__k) {
var e2 = document.createElement("div"), r2 = this.__v.__k[0].__c;
this.__v.__k[0] = function n3(t3, e3, r3) {
return t3 && (t3.__c && t3.__c.__H && (t3.__c.__H.__.forEach(function(n4) {
typeof n4.__c == "function" && n4.__c();
}), t3.__c.__H = null), (t3 = S({}, t3)).__c != null && (t3.__c.__P === r3 && (t3.__c.__P = e3), t3.__c = null), t3.__k = t3.__k && t3.__k.map(function(t4) {
return n3(t4, e3, r3);
})), t3;
}(this.__b, e2, r2.__O = r2.__P);
}
this.__b = null;
}
var u2 = t2.__e && v$1(d, null, n2.fallback);
return u2 && (u2.__h = null), [v$1(d, null, t2.__e ? null : n2.children), u2];
};
var T = function(n2, t2, e2) {
if (++e2[1] === e2[0] && n2.o.delete(t2), n2.props.revealOrder && (n2.props.revealOrder[0] !== "t" || !n2.o.size))
for (e2 = n2.u; e2; ) {
for (; e2.length > 3; )
e2.pop()();
if (e2[1] < e2[0])
break;
n2.u = e2 = e2[2];
}
};
function D(n2) {
return this.getChildContext = function() {
return n2.context;
}, n2.children;
}
function I(n2) {
var t2 = this, e2 = n2.i;
t2.componentWillUnmount = function() {
S$1(null, t2.l), t2.l = null, t2.i = null;
}, t2.i && t2.i !== e2 && t2.componentWillUnmount(), n2.__v ? (t2.l || (t2.i = e2, t2.l = { nodeType: 1, parentNode: e2, childNodes: [], appendChild: function(n3) {
this.childNodes.push(n3), t2.i.appendChild(n3);
}, insertBefore: function(n3, e3) {
this.childNodes.push(n3), t2.i.appendChild(n3);
}, removeChild: function(n3) {
this.childNodes.splice(this.childNodes.indexOf(n3) >>> 1, 1), t2.i.removeChild(n3);
} }), S$1(v$1(D, { context: t2.context }, n2.__v), t2.l)) : t2.l && t2.componentWillUnmount();
}
function W(n2, t2) {
return v$1(I, { __v: n2, i: t2 });
}
(M.prototype = new _()).__e = function(n2) {
var t2 = this, e2 = U(t2.__v), r2 = t2.o.get(n2);
return r2[0]++, function(u2) {
var o2 = function() {
t2.props.revealOrder ? (r2.push(u2), T(t2, n2, r2)) : u2();
};
e2 ? e2(o2) : o2();
};
}, M.prototype.render = function(n2) {
this.u = null, this.o = new Map();
var t2 = A$1(n2.children);
n2.revealOrder && n2.revealOrder[0] === "b" && t2.reverse();
for (var e2 = t2.length; e2--; )
this.o.set(t2[e2], this.u = [1, 0, this.u]);
return n2.children;
}, M.prototype.componentDidUpdate = M.prototype.componentDidMount = function() {
var n2 = this;
this.o.forEach(function(t2, e2) {
T(n2, e2, t2);
});
};
var j = typeof Symbol != "undefined" && Symbol.for && Symbol.for("react.element") || 60103, P = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, V = typeof document != "undefined", z = function(n2) {
return (typeof Symbol != "undefined" && typeof Symbol() == "symbol" ? /fil|che|rad/i : /fil|che|ra/i).test(n2);
};
_.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n2) {
Object.defineProperty(_.prototype, n2, { configurable: true, get: function() {
return this["UNSAFE_" + n2];
}, set: function(t2) {
Object.defineProperty(this, n2, { configurable: true, writable: true, value: t2 });
} });
});
var Z = l.event;
function Y() {
}
function $() {
return this.cancelBubble;
}
function q() {
return this.defaultPrevented;
}
l.event = function(n2) {
return Z && (n2 = Z(n2)), n2.persist = Y, n2.isPropagationStopped = $, n2.isDefaultPrevented = q, n2.nativeEvent = n2;
};
var J = { configurable: true, get: function() {
return this.class;
} }, K = l.vnode;
l.vnode = function(n2) {
var t2 = n2.type, e2 = n2.props, r2 = e2;
if (typeof t2 == "string") {
var u2 = t2.indexOf("-") === -1;
for (var o2 in r2 = {}, e2) {
var i2 = e2[o2];
V && o2 === "children" && t2 === "noscript" || o2 === "value" && "defaultValue" in e2 && i2 == null || (o2 === "defaultValue" && "value" in e2 && e2.value == null ? o2 = "value" : o2 === "download" && i2 === true ? i2 = "" : /ondoubleclick/i.test(o2) ? o2 = "ondblclick" : /^onchange(textarea|input)/i.test(o2 + t2) && !z(e2.type) ? o2 = "oninput" : /^on(Ani|Tra|Tou|BeforeInp)/.test(o2) ? o2 = o2.toLowerCase() : u2 && P.test(o2) ? o2 = o2.replace(/[A-Z0-9]/, "-$&").toLowerCase() : i2 === null && (i2 = void 0), r2[o2] = i2);
}
t2 == "select" && r2.multiple && Array.isArray(r2.value) && (r2.value = A$1(e2.children).forEach(function(n3) {
n3.props.selected = r2.value.indexOf(n3.props.value) != -1;
})), t2 == "select" && r2.defaultValue != null && (r2.value = A$1(e2.children).forEach(function(n3) {
n3.props.selected = r2.multiple ? r2.defaultValue.indexOf(n3.props.value) != -1 : r2.defaultValue == n3.props.value;
})), n2.props = r2;
}
t2 && e2.class != e2.className && (J.enumerable = "className" in e2, e2.className != null && (r2.class = e2.className), Object.defineProperty(r2, "className", J)), n2.$$typeof = j, K && K(n2);
};
var Q = l.__r;
l.__r = function(n2) {
Q && Q(n2);
};
var globalObj = typeof globalThis !== "undefined" ? globalThis : window;
if (globalObj.FullCalendarVDom) {
console.warn("FullCalendar VDOM already loaded");
} else {
globalObj.FullCalendarVDom = {
Component: _,
createElement: v$1,
render: S$1,
createRef: p,
Fragment: d,
createContext: createContext$1,
createPortal: W,
flushToDom: flushToDom$1,
unmountComponentAtNode: unmountComponentAtNode$1
};
}
function flushToDom$1() {
var oldDebounceRendering = l.debounceRendering;
var callbackQ = [];
function execCallbackSync(callback) {
callbackQ.push(callback);
}
l.debounceRendering = execCallbackSync;
S$1(v$1(FakeComponent, {}), document.createElement("div"));
while (callbackQ.length) {
callbackQ.shift()();
}
l.debounceRendering = oldDebounceRendering;
}
var FakeComponent = function(_super) {
__extends(FakeComponent2, _super);
function FakeComponent2() {
return _super !== null && _super.apply(this, arguments) || this;
}
FakeComponent2.prototype.render = function() {
return v$1("div", {});
};
FakeComponent2.prototype.componentDidMount = function() {
this.setState({});
};
return FakeComponent2;
}(_);
function createContext$1(defaultValue) {
var ContextType = D$1(defaultValue);
var origProvider = ContextType.Provider;
ContextType.Provider = function() {
var _this = this;
var isNew = !this.getChildContext;
var children = origProvider.apply(this, arguments);
if (isNew) {
var subs_1 = [];
this.shouldComponentUpdate = function(_props) {
if (_this.props.value !== _props.value) {
subs_1.forEach(function(c2) {
c2.context = _props.value;
c2.forceUpdate();
});
}
};
this.sub = function(c2) {
subs_1.push(c2);
var old = c2.componentWillUnmount;
c2.componentWillUnmount = function() {
subs_1.splice(subs_1.indexOf(c2), 1);
old && old.call(c2);
};
};
}
return children;
};
return ContextType;
}
function unmountComponentAtNode$1(node) {
S$1(null, node);
}
var main$3 = "";
if (typeof FullCalendarVDom === "undefined") {
throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");
}
var Component = FullCalendarVDom.Component;
var createElement = FullCalendarVDom.createElement;
var render = FullCalendarVDom.render;
var createRef = FullCalendarVDom.createRef;
var Fragment = FullCalendarVDom.Fragment;
var createContext = FullCalendarVDom.createContext;
var createPortal = FullCalendarVDom.createPortal;
var flushToDom = FullCalendarVDom.flushToDom;
var unmountComponentAtNode = FullCalendarVDom.unmountComponentAtNode;
/*!
FullCalendar v5.10.1
Docs & License: https://fullcalendar.io/
(c) 2021 Adam Shaw
*/
var EventSourceApi = function() {
function EventSourceApi2(context, internalEventSource) {
this.context = context;
this.internalEventSource = internalEventSource;
}
EventSourceApi2.prototype.remove = function() {
this.context.dispatch({
type: "REMOVE_EVENT_SOURCE",
sourceId: this.internalEventSource.sourceId
});
};
EventSourceApi2.prototype.refetch = function() {
this.context.dispatch({
type: "FETCH_EVENT_SOURCES",
sourceIds: [this.internalEventSource.sourceId],
isRefetch: true
});
};
Object.defineProperty(EventSourceApi2.prototype, "id", {
get: function() {
return this.internalEventSource.publicId;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventSourceApi2.prototype, "url", {
get: function() {
return this.internalEventSource.meta.url;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventSourceApi2.prototype, "format", {
get: function() {
return this.internalEventSource.meta.format;
},
enumerable: false,
configurable: true
});
return EventSourceApi2;
}();
function removeElement(el) {
if (el.parentNode) {
el.parentNode.removeChild(el);
}
}
function elementClosest(el, selector) {
if (el.closest) {
return el.closest(selector);
}
if (!document.documentElement.contains(el)) {
return null;
}
do {
if (elementMatches(el, selector)) {
return el;
}
el = el.parentElement || el.parentNode;
} while (el !== null && el.nodeType === 1);
return null;
}
function elementMatches(el, selector) {
var method = el.matches || el.matchesSelector || el.msMatchesSelector;
return method.call(el, selector);
}
function findElements(container, selector) {
var containers = container instanceof HTMLElement ? [container] : container;
var allMatches = [];
for (var i2 = 0; i2 < containers.length; i2 += 1) {
var matches = containers[i2].querySelectorAll(selector);
for (var j2 = 0; j2 < matches.length; j2 += 1) {
allMatches.push(matches[j2]);
}
}
return allMatches;
}
var PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i;
function applyStyle(el, props) {
for (var propName in props) {
applyStyleProp(el, propName, props[propName]);
}
}
function applyStyleProp(el, name, val) {
if (val == null) {
el.style[name] = "";
} else if (typeof val === "number" && PIXEL_PROP_RE.test(name)) {
el.style[name] = val + "px";
} else {
el.style[name] = val;
}
}
function getEventTargetViaRoot(ev) {
var _a, _b;
return (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)[0]) !== null && _b !== void 0 ? _b : ev.target;
}
function getElRoot(el) {
return el.getRootNode ? el.getRootNode() : document;
}
var guid$1 = 0;
function getUniqueDomId() {
guid$1 += 1;
return "fc-dom-" + guid$1;
}
function preventDefault(ev) {
ev.preventDefault();
}
function buildDelegationHandler(selector, handler) {
return function(ev) {
var matchedChild = elementClosest(ev.target, selector);
if (matchedChild) {
handler.call(matchedChild, ev, matchedChild);
}
};
}
function listenBySelector(container, eventType, selector, handler) {
var attachedHandler = buildDelegationHandler(selector, handler);
container.addEventListener(eventType, attachedHandler);
return function() {
container.removeEventListener(eventType, attachedHandler);
};
}
function listenToHoverBySelector(container, selector, onMouseEnter, onMouseLeave) {
var currentMatchedChild;
return listenBySelector(container, "mouseover", selector, function(mouseOverEv, matchedChild) {
if (matchedChild !== currentMatchedChild) {
currentMatchedChild = matchedChild;
onMouseEnter(mouseOverEv, matchedChild);
var realOnMouseLeave_1 = function(mouseLeaveEv) {
currentMatchedChild = null;
onMouseLeave(mouseLeaveEv, matchedChild);
matchedChild.removeEventListener("mouseleave", realOnMouseLeave_1);
};
matchedChild.addEventListener("mouseleave", realOnMouseLeave_1);
}
});
}
var transitionEventNames = [
"webkitTransitionEnd",
"otransitionend",
"oTransitionEnd",
"msTransitionEnd",
"transitionend"
];
function whenTransitionDone(el, callback) {
var realCallback = function(ev) {
callback(ev);
transitionEventNames.forEach(function(eventName) {
el.removeEventListener(eventName, realCallback);
});
};
transitionEventNames.forEach(function(eventName) {
el.addEventListener(eventName, realCallback);
});
}
function createAriaClickAttrs(handler) {
return __assign({ onClick: handler }, createAriaKeyboardAttrs(handler));
}
function createAriaKeyboardAttrs(handler) {
return {
tabIndex: 0,
onKeyDown: function(ev) {
if (ev.key === "Enter" || ev.key === " ") {
handler(ev);
ev.preventDefault();
}
}
};
}
var guidNumber = 0;
function guid() {
guidNumber += 1;
return String(guidNumber);
}
function disableCursor() {
document.body.classList.add("fc-not-allowed");
}
function enableCursor() {
document.body.classList.remove("fc-not-allowed");
}
function preventSelection(el) {
el.classList.add("fc-unselectable");
el.addEventListener("selectstart", preventDefault);
}
function allowSelection(el) {
el.classList.remove("fc-unselectable");
el.removeEventListener("selectstart", preventDefault);
}
function preventContextMenu(el) {
el.addEventListener("contextmenu", preventDefault);
}
function allowContextMenu(el) {
el.removeEventListener("contextmenu", preventDefault);
}
function parseFieldSpecs(input) {
var specs = [];
var tokens = [];
var i2;
var token;
if (typeof input === "string") {
tokens = input.split(/\s*,\s*/);
} else if (typeof input === "function") {
tokens = [input];
} else if (Array.isArray(input)) {
tokens = input;
}
for (i2 = 0; i2 < tokens.length; i2 += 1) {
token = tokens[i2];
if (typeof token === "string") {
specs.push(token.charAt(0) === "-" ? { field: token.substring(1), order: -1 } : { field: token, order: 1 });
} else if (typeof token === "function") {
specs.push({ func: token });
}
}
return specs;
}
function compareByFieldSpecs(obj0, obj1, fieldSpecs) {
var i2;
var cmp;
for (i2 = 0; i2 < fieldSpecs.length; i2 += 1) {
cmp = compareByFieldSpec(obj0, obj1, fieldSpecs[i2]);
if (cmp) {
return cmp;
}
}
return 0;
}
function compareByFieldSpec(obj0, obj1, fieldSpec) {
if (fieldSpec.func) {
return fieldSpec.func(obj0, obj1);
}
return flexibleCompare(obj0[fieldSpec.field], obj1[fieldSpec.field]) * (fieldSpec.order || 1);
}
function flexibleCompare(a2, b2) {
if (!a2 && !b2) {
return 0;
}
if (b2 == null) {
return -1;
}
if (a2 == null) {
return 1;
}
if (typeof a2 === "string" || typeof b2 === "string") {
return String(a2).localeCompare(String(b2));
}
return a2 - b2;
}
function padStart(val, len) {
var s2 = String(val);
return "000".substr(0, len - s2.length) + s2;
}
function formatWithOrdinals(formatter, args, fallbackText) {
if (typeof formatter === "function") {
return formatter.apply(void 0, args);
}
if (typeof formatter === "string") {
return args.reduce(function(str, arg, index2) {
return str.replace("$" + index2, arg || "");
}, formatter);
}
return fallbackText;
}
function compareNumbers(a2, b2) {
return a2 - b2;
}
function isInt(n2) {
return n2 % 1 === 0;
}
function computeSmallestCellWidth(cellEl) {
var allWidthEl = cellEl.querySelector(".fc-scrollgrid-shrink-frame");
var contentWidthEl = cellEl.querySelector(".fc-scrollgrid-shrink-cushion");
if (!allWidthEl) {
throw new Error("needs fc-scrollgrid-shrink-frame className");
}
if (!contentWidthEl) {
throw new Error("needs fc-scrollgrid-shrink-cushion className");
}
return cellEl.getBoundingClientRect().width - allWidthEl.getBoundingClientRect().width + contentWidthEl.getBoundingClientRect().width;
}
var DAY_IDS = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
function addWeeks(m2, n2) {
var a2 = dateToUtcArray(m2);
a2[2] += n2 * 7;
return arrayToUtcDate(a2);
}
function addDays(m2, n2) {
var a2 = dateToUtcArray(m2);
a2[2] += n2;
return arrayToUtcDate(a2);
}
function addMs(m2, n2) {
var a2 = dateToUtcArray(m2);
a2[6] += n2;
return arrayToUtcDate(a2);
}
function diffWeeks(m0, m1) {
return diffDays(m0, m1) / 7;
}
function diffDays(m0, m1) {
return (m1.valueOf() - m0.valueOf()) / (1e3 * 60 * 60 * 24);
}
function diffHours(m0, m1) {
return (m1.valueOf() - m0.valueOf()) / (1e3 * 60 * 60);
}
function diffMinutes(m0, m1) {
return (m1.valueOf() - m0.valueOf()) / (1e3 * 60);
}
function diffSeconds(m0, m1) {
return (m1.valueOf() - m0.valueOf()) / 1e3;
}
function diffDayAndTime(m0, m1) {
var m0day = startOfDay(m0);
var m1day = startOfDay(m1);
return {
years: 0,
months: 0,
days: Math.round(diffDays(m0day, m1day)),
milliseconds: m1.valueOf() - m1day.valueOf() - (m0.valueOf() - m0day.valueOf())
};
}
function diffWholeWeeks(m0, m1) {
var d2 = diffWholeDays(m0, m1);
if (d2 !== null && d2 % 7 === 0) {
return d2 / 7;
}
return null;
}
function diffWholeDays(m0, m1) {
if (timeAsMs(m0) === timeAsMs(m1)) {
return Math.round(diffDays(m0, m1));
}
return null;
}
function startOfDay(m2) {
return arrayToUtcDate([
m2.getUTCFullYear(),
m2.getUTCMonth(),
m2.getUTCDate()
]);
}
function startOfHour(m2) {
return arrayToUtcDate([
m2.getUTCFullYear(),
m2.getUTCMonth(),
m2.getUTCDate(),
m2.getUTCHours()
]);
}
function startOfMinute(m2) {
return arrayToUtcDate([
m2.getUTCFullYear(),
m2.getUTCMonth(),
m2.getUTCDate(),
m2.getUTCHours(),
m2.getUTCMinutes()
]);
}
function startOfSecond(m2) {
return arrayToUtcDate([
m2.getUTCFullYear(),
m2.getUTCMonth(),
m2.getUTCDate(),
m2.getUTCHours(),
m2.getUTCMinutes(),
m2.getUTCSeconds()
]);
}
function weekOfYear(marker, dow, doy) {
var y2 = marker.getUTCFullYear();
var w2 = weekOfGivenYear(marker, y2, dow, doy);
if (w2 < 1) {
return weekOfGivenYear(marker, y2 - 1, dow, doy);
}
var nextW = weekOfGivenYear(marker, y2 + 1, dow, doy);
if (nextW >= 1) {
return Math.min(w2, nextW);
}
return w2;
}
function weekOfGivenYear(marker, year, dow, doy) {
var firstWeekStart = arrayToUtcDate([year, 0, 1 + firstWeekOffset(year, dow, doy)]);
var dayStart = startOfDay(marker);
var days = Math.round(diffDays(firstWeekStart, dayStart));
return Math.floor(days / 7) + 1;
}
function firstWeekOffset(year, dow, doy) {
var fwd = 7 + dow - doy;
var fwdlw = (7 + arrayToUtcDate([year, 0, fwd]).getUTCDay() - dow) % 7;
return -fwdlw + fwd - 1;
}
function dateToLocalArray(date) {
return [
date.getFullYear(),
date.getMonth(),
date.getDate(),
date.getHours(),
date.getMinutes(),
date.getSeconds(),
date.getMilliseconds()
];
}
function arrayToLocalDate(a2) {
return new Date(a2[0], a2[1] || 0, a2[2] == null ? 1 : a2[2], a2[3] || 0, a2[4] || 0, a2[5] || 0);
}
function dateToUtcArray(date) {
return [
date.getUTCFullYear(),
date.getUTCMonth(),
date.getUTCDate(),
date.getUTCHours(),
date.getUTCMinutes(),
date.getUTCSeconds(),
date.getUTCMilliseconds()
];
}
function arrayToUtcDate(a2) {
if (a2.length === 1) {
a2 = a2.concat([0]);
}
return new Date(Date.UTC.apply(Date, a2));
}
function isValidDate(m2) {
return !isNaN(m2.valueOf());
}
function timeAsMs(m2) {
return m2.getUTCHours() * 1e3 * 60 * 60 + m2.getUTCMinutes() * 1e3 * 60 + m2.getUTCSeconds() * 1e3 + m2.getUTCMilliseconds();
}
function createEventInstance(defId, range, forcedStartTzo, forcedEndTzo) {
return {
instanceId: guid(),
defId,
range,
forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo,
forcedEndTzo: forcedEndTzo == null ? null : forcedEndTzo
};
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
function mergeProps(propObjs, complexPropsMap) {
var dest = {};
if (complexPropsMap) {
for (var name_1 in complexPropsMap) {
var complexObjs = [];
for (var i2 = propObjs.length - 1; i2 >= 0; i2 -= 1) {
var val = propObjs[i2][name_1];
if (typeof val === "object" && val) {
complexObjs.unshift(val);
} else if (val !== void 0) {
dest[name_1] = val;
break;
}
}
if (complexObjs.length) {
dest[name_1] = mergeProps(complexObjs);
}
}
}
for (var i2 = propObjs.length - 1; i2 >= 0; i2 -= 1) {
var props = propObjs[i2];
for (var name_2 in props) {
if (!(name_2 in dest)) {
dest[name_2] = props[name_2];
}
}
}
return dest;
}
function filterHash(hash, func) {
var filtered = {};
for (var key in hash) {
if (func(hash[key], key)) {
filtered[key] = hash[key];
}
}
return filtered;
}
function mapHash(hash, func) {
var newHash = {};
for (var key in hash) {
newHash[key] = func(hash[key], key);
}
return newHash;
}
function arrayToHash(a2) {
var hash = {};
for (var _i = 0, a_1 = a2; _i < a_1.length; _i++) {
var item = a_1[_i];
hash[item] = true;
}
return hash;
}
function hashValuesToArray(obj) {
var a2 = [];
for (var key in obj) {
a2.push(obj[key]);
}
return a2;
}
function isPropsEqual(obj0, obj1) {
if (obj0 === obj1) {
return true;
}
for (var key in obj0) {
if (hasOwnProperty.call(obj0, key)) {
if (!(key in obj1)) {
return false;
}
}
}
for (var key in obj1) {
if (hasOwnProperty.call(obj1, key)) {
if (obj0[key] !== obj1[key]) {
return false;
}
}
}
return true;
}
function getUnequalProps(obj0, obj1) {
var keys = [];
for (var key in obj0) {
if (hasOwnProperty.call(obj0, key)) {
if (!(key in obj1)) {
keys.push(key);
}
}
}
for (var key in obj1) {
if (hasOwnProperty.call(obj1, key)) {
if (obj0[key] !== obj1[key]) {
keys.push(key);
}
}
}
return keys;
}
function compareObjs(oldProps, newProps, equalityFuncs) {
if (equalityFuncs === void 0) {
equalityFuncs = {};
}
if (oldProps === newProps) {
return true;
}
for (var key in newProps) {
if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key]))
;
else {
return false;
}
}
for (var key in oldProps) {
if (!(key in newProps)) {
return false;
}
}
return true;
}
function isObjValsEqual(val0, val1, comparator) {
if (val0 === val1 || comparator === true) {
return true;
}
if (comparator) {
return comparator(val0, val1);
}
return false;
}
function collectFromHash(hash, startIndex, endIndex, step) {
if (startIndex === void 0) {
startIndex = 0;
}
if (step === void 0) {
step = 1;
}
var res = [];
if (endIndex == null) {
endIndex = Object.keys(hash).length;
}
for (var i2 = startIndex; i2 < endIndex; i2 += step) {
var val = hash[i2];
if (val !== void 0) {
res.push(val);
}
}
return res;
}
function parseRecurring(refined, defaultAllDay, dateEnv, recurringTypes) {
for (var i2 = 0; i2 < recurringTypes.length; i2 += 1) {
var parsed = recurringTypes[i2].parse(refined, dateEnv);
if (parsed) {
var allDay = refined.allDay;
if (allDay == null) {
allDay = defaultAllDay;
if (allDay == null) {
allDay = parsed.allDayGuess;
if (allDay == null) {
allDay = false;
}
}
}
return {
allDay,
duration: parsed.duration,
typeData: parsed.typeData,
typeId: i2
};
}
}
return null;
}
function expandRecurring(eventStore, framingRange, context) {
var dateEnv = context.dateEnv, pluginHooks = context.pluginHooks, options = context.options;
var defs = eventStore.defs, instances = eventStore.instances;
instances = filterHash(instances, function(instance2) {
return !defs[instance2.defId].recurringDef;
});
for (var defId in defs) {
var def = defs[defId];
if (def.recurringDef) {
var duration = def.recurringDef.duration;
if (!duration) {
duration = def.allDay ? options.defaultAllDayEventDuration : options.defaultTimedEventDuration;
}
var starts = expandRecurringRanges(def, duration, framingRange, dateEnv, pluginHooks.recurringTypes);
for (var _i = 0, starts_1 = starts; _i < starts_1.length; _i++) {
var start = starts_1[_i];
var instance = createEventInstance(defId, {
start,
end: dateEnv.add(start, duration)
});
instances[instance.instanceId] = instance;
}
}
}
return { defs, instances };
}
function expandRecurringRanges(eventDef, duration, framingRange, dateEnv, recurringTypes) {
var typeDef = recurringTypes[eventDef.recurringDef.typeId];
var markers = typeDef.expand(eventDef.recurringDef.typeData, {
start: dateEnv.subtract(framingRange.start, duration),
end: framingRange.end
}, dateEnv);
if (eventDef.allDay) {
markers = markers.map(startOfDay);
}
return markers;
}
var PARSE_RE = /^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;
function createDuration(input, unit) {
var _a;
if (typeof input === "string") {
return parseString(input);
}
if (typeof input === "object" && input) {
return parseObject(input);
}
if (typeof input === "number") {
return parseObject((_a = {}, _a[unit || "milliseconds"] = input, _a));
}
return null;
}
function parseString(s2) {
var m2 = PARSE_RE.exec(s2);
if (m2) {
var sign = m2[1] ? -1 : 1;
return {
years: 0,
months: 0,
days: sign * (m2[2] ? parseInt(m2[2], 10) : 0),
milliseconds: sign * ((m2[3] ? parseInt(m2[3], 10) : 0) * 60 * 60 * 1e3 + (m2[4] ? parseInt(m2[4], 10) : 0) * 60 * 1e3 + (m2[5] ? parseInt(m2[5], 10) : 0) * 1e3 + (m2[6] ? parseInt(m2[6], 10) : 0))
};
}
return null;
}
function parseObject(obj) {
var duration = {
years: obj.years || obj.year || 0,
months: obj.months || obj.month || 0,
days: obj.days || obj.day || 0,
milliseconds: (obj.hours || obj.hour || 0) * 60 * 60 * 1e3 + (obj.minutes || obj.minute || 0) * 60 * 1e3 + (obj.seconds || obj.second || 0) * 1e3 + (obj.milliseconds || obj.millisecond || obj.ms || 0)
};
var weeks = obj.weeks || obj.week;
if (weeks) {
duration.days += weeks * 7;
duration.specifiedWeeks = true;
}
return duration;
}
function durationsEqual(d0, d1) {
return d0.years === d1.years && d0.months === d1.months && d0.days === d1.days && d0.milliseconds === d1.milliseconds;
}
function subtractDurations(d1, d0) {
return {
years: d1.years - d0.years,
months: d1.months - d0.months,
days: d1.days - d0.days,
milliseconds: d1.milliseconds - d0.milliseconds
};
}
function asRoughYears(dur) {
return asRoughDays(dur) / 365;
}
function asRoughMonths(dur) {
return asRoughDays(dur) / 30;
}
function asRoughDays(dur) {
return asRoughMs(dur) / 864e5;
}
function asRoughMs(dur) {
return dur.years * (365 * 864e5) + dur.months * (30 * 864e5) + dur.days * 864e5 + dur.milliseconds;
}
function greatestDurationDenominator(dur) {
var ms = dur.milliseconds;
if (ms) {
if (ms % 1e3 !== 0) {
return { unit: "millisecond", value: ms };
}
if (ms % (1e3 * 60) !== 0) {
return { unit: "second", value: ms / 1e3 };
}
if (ms % (1e3 * 60 * 60) !== 0) {
return { unit: "minute", value: ms / (1e3 * 60) };
}
if (ms) {
return { unit: "hour", value: ms / (1e3 * 60 * 60) };
}
}
if (dur.days) {
if (dur.specifiedWeeks && dur.days % 7 === 0) {
return { unit: "week", value: dur.days / 7 };
}
return { unit: "day", value: dur.days };
}
if (dur.months) {
return { unit: "month", value: dur.months };
}
if (dur.years) {
return { unit: "year", value: dur.years };
}
return { unit: "millisecond", value: 0 };
}
function buildIsoString(marker, timeZoneOffset, stripZeroTime) {
if (stripZeroTime === void 0) {
stripZeroTime = false;
}
var s2 = marker.toISOString();
s2 = s2.replace(".000", "");
if (stripZeroTime) {
s2 = s2.replace("T00:00:00Z", "");
}
if (s2.length > 10) {
if (timeZoneOffset == null) {
s2 = s2.replace("Z", "");
} else if (timeZoneOffset !== 0) {
s2 = s2.replace("Z", formatTimeZoneOffset(timeZoneOffset, true));
}
}
return s2;
}
function formatDayString(marker) {
return marker.toISOString().replace(/T.*$/, "");
}
function formatTimeZoneOffset(minutes, doIso) {
if (doIso === void 0) {
doIso = false;
}
var sign = minutes < 0 ? "-" : "+";
var abs = Math.abs(minutes);
var hours = Math.floor(abs / 60);
var mins = Math.round(abs % 60);
if (doIso) {
return sign + padStart(hours, 2) + ":" + padStart(mins, 2);
}
return "GMT" + sign + hours + (mins ? ":" + padStart(mins, 2) : "");
}
function isArraysEqual(a0, a1, equalityFunc) {
if (a0 === a1) {
return true;
}
var len = a0.length;
var i2;
if (len !== a1.length) {
return false;
}
for (i2 = 0; i2 < len; i2 += 1) {
if (!(equalityFunc ? equalityFunc(a0[i2], a1[i2]) : a0[i2] === a1[i2])) {
return false;
}
}
return true;
}
function memoize(workerFunc, resEquality, teardownFunc) {
var currentArgs;
var currentRes;
return function() {
var newArgs = [];
for (var _i = 0; _i < arguments.length; _i++) {
newArgs[_i] = arguments[_i];
}
if (!currentArgs) {
currentRes = w