UNPKG

vue-ele-plus

Version:

1,463 lines 436 kB
import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock } from "vue"; 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$1, u$1, t, o, r$1, f$1 = {}, e$1 = [], c$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; function s(n2, l2) { for (var u2 in l2) n2[u2] = l2[u2]; return n2; } function a$1(n2) { var l2 = n2.parentNode; l2 && l2.removeChild(n2); } function h(l2, u2, i2) { var t2, o2, r2, f2 = {}; for (r2 in u2) r2 == "key" ? t2 = u2[r2] : r2 == "ref" ? o2 = u2[r2] : f2[r2] = u2[r2]; if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n.call(arguments, 2) : i2), typeof l2 == "function" && l2.defaultProps != null) for (r2 in l2.defaultProps) f2[r2] === void 0 && (f2[r2] = l2.defaultProps[r2]); return v$1(l2, f2, t2, o2, null); } function v$1(n2, i2, t2, o2, r2) { var f2 = { type: n2, props: i2, key: t2, ref: o2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: r2 == null ? ++u$1 : r2 }; return r2 == null && l$1.vnode != null && l$1.vnode(f2), f2; } function y() { return { current: null }; } function p(n2) { return n2.children; } function d(n2, l2) { this.props = n2, this.context = l2; } function _(n2, l2) { if (l2 == null) return n2.__ ? _(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" ? _(n2) : null; } function k$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 k$1(n2); } } function b$1(n2) { (!n2.__d && (n2.__d = true) && t.push(n2) && !g$2.__r++ || o !== l$1.debounceRendering) && ((o = l$1.debounceRendering) || setTimeout)(g$2); } function g$2() { for (var n2; g$2.__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, o2, r2; n3.__d && (o2 = (t2 = (l2 = n3).__v).__e, (r2 = l2.__P) && (u2 = [], (i2 = s({}, t2)).__v = t2.__v + 1, j$2(r2, t2, i2, l2.__n, r2.ownerSVGElement !== void 0, t2.__h != null ? [o2] : null, u2, o2 == null ? _(t2) : o2, t2.__h), z$1(u2, t2), t2.__e != o2 && k$1(t2))); }); } function w$1(n2, l2, u2, i2, t2, o2, r2, c2, s2, a2) { var h2, y2, d2, k2, b2, g2, w2, x2 = i2 && i2.__k || e$1, C2 = x2.length; for (u2.__k = [], h2 = 0; h2 < l2.length; h2++) if ((k2 = u2.__k[h2] = (k2 = l2[h2]) == null || typeof k2 == "boolean" ? null : typeof k2 == "string" || typeof k2 == "number" || typeof k2 == "bigint" ? v$1(null, k2, null, null, k2) : Array.isArray(k2) ? v$1(p, { children: k2 }, null, null, null) : k2.__b > 0 ? v$1(k2.type, k2.props, k2.key, k2.ref ? k2.ref : null, k2.__v) : k2) != null) { if (k2.__ = u2, k2.__b = u2.__b + 1, (d2 = x2[h2]) === null || d2 && k2.key == d2.key && k2.type === d2.type) x2[h2] = void 0; else for (y2 = 0; y2 < C2; y2++) { if ((d2 = x2[y2]) && k2.key == d2.key && k2.type === d2.type) { x2[y2] = void 0; break; } d2 = null; } j$2(n2, k2, d2 = d2 || f$1, t2, o2, r2, c2, s2, a2), b2 = k2.__e, (y2 = k2.ref) && d2.ref != y2 && (w2 || (w2 = []), d2.ref && w2.push(d2.ref, null, k2), w2.push(y2, k2.__c || b2, k2)), b2 != null ? (g2 == null && (g2 = b2), typeof k2.type == "function" && k2.__k === d2.__k ? k2.__d = s2 = m$1(k2, s2, n2) : s2 = A(n2, k2, d2, x2, b2, s2), typeof u2.type == "function" && (u2.__d = s2)) : s2 && d2.__e == s2 && s2.parentNode != n2 && (s2 = _(d2)); } for (u2.__e = g2, h2 = C2; h2--; ) x2[h2] != null && N(x2[h2], x2[h2]); if (w2) for (h2 = 0; h2 < w2.length; h2++) M$1(w2[h2], w2[++h2], w2[++h2]); } function m$1(n2, l2, u2) { for (var i2, t2 = n2.__k, o2 = 0; t2 && o2 < t2.length; o2++) (i2 = t2[o2]) && (i2.__ = n2, l2 = typeof i2.type == "function" ? m$1(i2, l2, u2) : A(u2, i2, i2, t2, i2.__e, l2)); return l2; } function x(n2, l2) { return l2 = l2 || [], n2 == null || typeof n2 == "boolean" || (Array.isArray(n2) ? n2.some(function(n3) { x(n3, l2); }) : l2.push(n2)), l2; } function A(n2, l2, u2, i2, t2, o2) { var r2, f2, e2; if (l2.__d !== void 0) r2 = l2.__d, l2.__d = void 0; else if (u2 == null || t2 != o2 || t2.parentNode == null) n: if (o2 == null || o2.parentNode !== n2) n2.appendChild(t2), r2 = null; else { for (f2 = o2, e2 = 0; (f2 = f2.nextSibling) && e2 < i2.length; e2 += 2) if (f2 == t2) break n; n2.insertBefore(t2, o2), r2 = o2; } return r2 !== void 0 ? r2 : t2.nextSibling; } function C$1(n2, l2, u2, i2, t2) { var o2; for (o2 in u2) o2 === "children" || o2 === "key" || o2 in l2 || H$1(n2, o2, null, u2[o2], i2); for (o2 in l2) t2 && typeof l2[o2] != "function" || o2 === "children" || o2 === "key" || o2 === "value" || o2 === "checked" || u2[o2] === l2[o2] || H$1(n2, o2, l2[o2], u2[o2], i2); } function $$1(n2, l2, u2) { l2[0] === "-" ? n2.setProperty(l2, u2) : n2[l2] = u2 == null ? "" : typeof u2 != "number" || c$1.test(l2) ? u2 : u2 + "px"; } function H$1(n2, l2, u2, i2, t2) { var o2; 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") o2 = l2 !== (l2 = l2.replace(/Capture$/, "")), l2 = l2.toLowerCase() in n2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o2] = u2, u2 ? i2 || n2.addEventListener(l2, o2 ? T$1 : I$1, o2) : n2.removeEventListener(l2, o2 ? T$1 : I$1, o2); 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.indexOf("-") == -1 ? n2.removeAttribute(l2) : n2.setAttribute(l2, u2)); } } function I$1(n2) { this.l[n2.type + false](l$1.event ? l$1.event(n2) : n2); } function T$1(n2) { this.l[n2.type + true](l$1.event ? l$1.event(n2) : n2); } function j$2(n2, u2, i2, t2, o2, r2, f2, e2, c2) { var a2, h2, v2, y2, _2, k2, b2, g2, m2, x2, A2, C2, $2, H2, I2, T2 = u2.type; if (u2.constructor !== void 0) return null; i2.__h != null && (c2 = i2.__h, e2 = u2.__e = i2.__e, u2.__h = null, r2 = [e2]), (a2 = l$1.__b) && a2(u2); try { n: if (typeof T2 == "function") { if (g2 = u2.props, m2 = (a2 = T2.contextType) && t2[a2.__c], x2 = a2 ? m2 ? m2.props.value : a2.__ : t2, i2.__c ? b2 = (h2 = u2.__c = i2.__c).__ = h2.__E : ("prototype" in T2 && T2.prototype.render ? u2.__c = h2 = new T2(g2, x2) : (u2.__c = h2 = new d(g2, x2), h2.constructor = T2, h2.render = O$1), m2 && m2.sub(h2), h2.props = g2, h2.state || (h2.state = {}), h2.context = x2, h2.__n = t2, v2 = h2.__d = true, h2.__h = [], h2._sb = []), h2.__s == null && (h2.__s = h2.state), T2.getDerivedStateFromProps != null && (h2.__s == h2.state && (h2.__s = s({}, h2.__s)), s(h2.__s, T2.getDerivedStateFromProps(g2, h2.__s))), y2 = h2.props, _2 = h2.state, v2) T2.getDerivedStateFromProps == null && h2.componentWillMount != null && h2.componentWillMount(), h2.componentDidMount != null && h2.__h.push(h2.componentDidMount); else { if (T2.getDerivedStateFromProps == null && g2 !== y2 && h2.componentWillReceiveProps != null && h2.componentWillReceiveProps(g2, x2), !h2.__e && h2.shouldComponentUpdate != null && h2.shouldComponentUpdate(g2, h2.__s, x2) === false || u2.__v === i2.__v) { for (h2.props = g2, 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); }), A2 = 0; A2 < h2._sb.length; A2++) h2.__h.push(h2._sb[A2]); h2._sb = [], h2.__h.length && f2.push(h2); break n; } h2.componentWillUpdate != null && h2.componentWillUpdate(g2, h2.__s, x2), h2.componentDidUpdate != null && h2.__h.push(function() { h2.componentDidUpdate(y2, _2, k2); }); } if (h2.context = x2, h2.props = g2, h2.__v = u2, h2.__P = n2, C2 = l$1.__r, $2 = 0, "prototype" in T2 && T2.prototype.render) { for (h2.state = h2.__s, h2.__d = false, C2 && C2(u2), a2 = h2.render(h2.props, h2.state, h2.context), H2 = 0; H2 < h2._sb.length; H2++) h2.__h.push(h2._sb[H2]); h2._sb = []; } else do { h2.__d = false, C2 && C2(u2), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s; } while (h2.__d && ++$2 < 25); h2.state = h2.__s, h2.getChildContext != null && (t2 = s(s({}, t2), h2.getChildContext())), v2 || h2.getSnapshotBeforeUpdate == null || (k2 = h2.getSnapshotBeforeUpdate(y2, _2)), I2 = a2 != null && a2.type === p && a2.key == null ? a2.props.children : a2, w$1(n2, Array.isArray(I2) ? I2 : [I2], u2, i2, t2, o2, r2, 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 r2 == null && u2.__v === i2.__v ? (u2.__k = i2.__k, u2.__e = i2.__e) : u2.__e = L$1(i2.__e, u2, i2, t2, o2, r2, f2, c2); (a2 = l$1.diffed) && a2(u2); } catch (n3) { u2.__v = null, (c2 || r2 != null) && (u2.__e = e2, u2.__h = !!c2, r2[r2.indexOf(e2)] = null), l$1.__e(n3, u2, i2); } } function z$1(n2, u2) { l$1.__c && l$1.__c(u2, n2), n2.some(function(u3) { try { n2 = u3.__h, u3.__h = [], n2.some(function(n3) { n3.call(u3); }); } catch (n3) { l$1.__e(n3, u3.__v); } }); } function L$1(l2, u2, i2, t2, o2, r2, e2, c2) { var s2, h2, v2, y2 = i2.props, p2 = u2.props, d2 = u2.type, k2 = 0; if (d2 === "svg" && (o2 = true), r2 != null) { for (; k2 < r2.length; k2++) if ((s2 = r2[k2]) && "setAttribute" in s2 == !!d2 && (d2 ? s2.localName === d2 : s2.nodeType === 3)) { l2 = s2, r2[k2] = null; break; } } if (l2 == null) { if (d2 === null) return document.createTextNode(p2); l2 = o2 ? document.createElementNS("http://www.w3.org/2000/svg", d2) : document.createElement(d2, p2.is && p2), r2 = null, c2 = false; } if (d2 === null) y2 === p2 || c2 && l2.data === p2 || (l2.data = p2); else { if (r2 = r2 && n.call(l2.childNodes), h2 = (y2 = i2.props || f$1).dangerouslySetInnerHTML, v2 = p2.dangerouslySetInnerHTML, !c2) { if (r2 != null) for (y2 = {}, k2 = 0; k2 < l2.attributes.length; k2++) y2[l2.attributes[k2].name] = l2.attributes[k2].value; (v2 || h2) && (v2 && (h2 && v2.__html == h2.__html || v2.__html === l2.innerHTML) || (l2.innerHTML = v2 && v2.__html || "")); } if (C$1(l2, p2, y2, o2, c2), v2) u2.__k = []; else if (k2 = u2.props.children, w$1(l2, Array.isArray(k2) ? k2 : [k2], u2, i2, t2, o2 && d2 !== "foreignObject", r2, e2, r2 ? r2[0] : i2.__k && _(i2, 0), c2), r2 != null) for (k2 = r2.length; k2--; ) r2[k2] != null && a$1(r2[k2]); c2 || ("value" in p2 && (k2 = p2.value) !== void 0 && (k2 !== l2.value || d2 === "progress" && !k2 || d2 === "option" && k2 !== y2.value) && H$1(l2, "value", k2, y2.value, false), "checked" in p2 && (k2 = p2.checked) !== void 0 && k2 !== l2.checked && H$1(l2, "checked", k2, y2.checked, false)); } return l2; } function M$1(n2, u2, i2) { try { typeof n2 == "function" ? n2(u2) : n2.current = u2; } catch (n3) { l$1.__e(n3, i2); } } function N(n2, u2, i2) { var t2, o2; if (l$1.unmount && l$1.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$1.__e(n3, u2); } t2.base = t2.__P = null, n2.__c = void 0; } if (t2 = n2.__k) for (o2 = 0; o2 < t2.length; o2++) t2[o2] && N(t2[o2], u2, i2 || typeof n2.type != "function"); i2 || n2.__e == null || a$1(n2.__e), n2.__ = n2.__e = n2.__d = void 0; } function O$1(n2, l2, u2) { return this.constructor(n2, u2); } function P$1(u2, i2, t2) { var o2, r2, e2; l$1.__ && l$1.__(u2, i2), r2 = (o2 = typeof t2 == "function") ? null : t2 && t2.__k || i2.__k, e2 = [], j$2(i2, u2 = (!o2 && t2 || i2).__k = h(p, null, [u2]), r2 || f$1, f$1, i2.ownerSVGElement !== void 0, !o2 && t2 ? [t2] : r2 ? null : i2.firstChild ? n.call(i2.childNodes) : null, e2, !o2 && t2 ? t2 : r2 ? r2.__e : i2.firstChild, o2), z$1(e2, u2); } function B$1(n2, l2) { var u2 = { __c: l2 = "__cC" + r$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(b$1); }, 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 = e$1.slice, l$1 = { __e: function(n2, l2, u2, i2) { for (var t2, o2, r2; l2 = l2.__; ) if ((t2 = l2.__c) && !t2.__) try { if ((o2 = t2.constructor) && o2.getDerivedStateFromError != null && (t2.setState(o2.getDerivedStateFromError(n2)), r2 = t2.__d), t2.componentDidCatch != null && (t2.componentDidCatch(n2, i2 || {}), r2 = t2.__d), r2) return t2.__E = t2; } catch (l3) { n2 = l3; } throw n2; } }, u$1 = 0, d.prototype.setState = function(n2, l2) { var u2; u2 = this.__s != null && this.__s !== this.state ? this.__s : this.__s = s({}, this.state), typeof n2 == "function" && (n2 = n2(s({}, u2), this.props)), n2 && s(u2, n2), n2 != null && this.__v && (l2 && this._sb.push(l2), b$1(this)); }, d.prototype.forceUpdate = function(n2) { this.__v && (this.__e = true, n2 && this.__h.push(n2), b$1(this)); }, d.prototype.render = p, t = [], g$2.__r = 0, r$1 = 0; var r, u, i, f = [], c = [], e = l$1.__b, a = l$1.__r, v = l$1.diffed, l = l$1.__c, m = l$1.unmount; function b() { for (var t2; t2 = f.shift(); ) if (t2.__P && t2.__H) try { t2.__H.__h.forEach(k), t2.__H.__h.forEach(w), t2.__H.__h = []; } catch (r2) { t2.__H.__h = [], l$1.__e(r2, t2.__v); } } l$1.__b = function(n2) { typeof n2.type != "function" || n2.__m || n2.__ === null ? n2.__m || (n2.__m = n2.__ && n2.__.__m ? n2.__.__m : "") : n2.__m = (n2.__ && n2.__.__m ? n2.__.__m : "") + (n2.__ && n2.__.__k ? n2.__.__k.indexOf(n2) : 0), r = null, e && e(n2); }, l$1.__r = function(n2) { a && a(n2); var i2 = (r = n2.__c).__H; i2 && (u === r ? (i2.__h = [], r.__h = [], i2.__.forEach(function(n3) { n3.__N && (n3.__ = n3.__N), n3.__V = c, n3.__N = n3.i = void 0; })) : (i2.__h.forEach(k), i2.__h.forEach(w), i2.__h = [])), u = r; }, l$1.diffed = function(t2) { v && v(t2); var o2 = t2.__c; o2 && o2.__H && (o2.__H.__h.length && (f.push(o2) !== 1 && i === l$1.requestAnimationFrame || ((i = l$1.requestAnimationFrame) || j$1)(b)), o2.__H.__.forEach(function(n2) { n2.i && (n2.__H = n2.i), n2.__V !== c && (n2.__ = n2.__V), n2.i = void 0, n2.__V = c; })), u = r = null; }, l$1.__c = function(t2, r2) { r2.some(function(t3) { try { t3.__h.forEach(k), t3.__h = t3.__h.filter(function(n2) { return !n2.__ || w(n2); }); } catch (u2) { r2.some(function(n2) { n2.__h && (n2.__h = []); }), r2 = [], l$1.__e(u2, t3.__v); } }), l && l(t2, r2); }, l$1.unmount = function(t2) { m && m(t2); var r2, u2 = t2.__c; u2 && u2.__H && (u2.__H.__.forEach(function(n2) { try { k(n2); } catch (n3) { r2 = n3; } }), u2.__H = void 0, r2 && l$1.__e(r2, u2.__v)); }; var g$1 = typeof requestAnimationFrame == "function"; function j$1(n2) { var t2, r2 = function() { clearTimeout(u2), g$1 && cancelAnimationFrame(t2), setTimeout(n2); }, u2 = setTimeout(r2, 100); g$1 && (t2 = requestAnimationFrame(r2)); } function k(n2) { var t2 = r, u2 = n2.__c; typeof u2 == "function" && (n2.__c = void 0, u2()), r = t2; } function w(n2) { var t2 = r; n2.__c = n2.__(), r = t2; } function g(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 d()).isPureReactComponent = true, E.prototype.shouldComponentUpdate = function(n2, t2) { return C(this.props, n2) || C(this.state, t2); }; var R = l$1.__b; l$1.__b = function(n2) { n2.type && n2.type.__f && n2.ref && (n2.props.ref = n2.ref, n2.ref = null), R && R(n2); }; var O = l$1.__e; l$1.__e = function(n2, t2, e2, r2) { if (n2.then) { for (var u2, o2 = t2; o2 = o2.__; ) if ((u2 = o2.__c) && u2.__c) return t2.__e == null && (t2.__e = e2.__e, t2.__k = e2.__k), u2.__c(n2, t2); } O(n2, t2, e2, r2); }; var T = l$1.unmount; function I(n2, t2, e2) { return n2 && (n2.__c && n2.__c.__H && (n2.__c.__H.__.forEach(function(n3) { typeof n3.__c == "function" && n3.__c(); }), n2.__c.__H = null), (n2 = g({}, n2)).__c != null && (n2.__c.__P === e2 && (n2.__c.__P = t2), n2.__c = null), n2.__k = n2.__k && n2.__k.map(function(n3) { return I(n3, t2, e2); })), n2; } function L(n2, t2, e2) { return n2 && (n2.__v = null, n2.__k = n2.__k && n2.__k.map(function(n3) { return L(n3, t2, e2); }), n2.__c && n2.__c.__P === t2 && (n2.__e && e2.insertBefore(n2.__e, n2.__d), n2.__c.__e = true, n2.__c.__P = e2)), n2; } function U() { this.__u = 0, this.t = null, this.__b = null; } function D(n2) { var t2 = n2.__.__c; return t2 && t2.__a && t2.__a(n2); } function M() { this.u = null, this.o = null; } l$1.unmount = function(n2) { var t2 = n2.__c; t2 && t2.__R && t2.__R(), t2 && n2.__h === true && (n2.type = null), T && T(n2); }, (U.prototype = new d()).__c = function(n2, t2) { var e2 = t2.__c, r2 = this; r2.t == null && (r2.t = []), r2.t.push(e2); var u2 = D(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.__a) { var n3 = r2.state.__a; r2.__v.__k[0] = L(n3, n3.__c.__P, n3.__c.__O); } var t3; for (r2.setState({ __a: r2.__b = null }); t3 = r2.t.pop(); ) t3.forceUpdate(); } }, c2 = t2.__h === true; r2.__u++ || c2 || r2.setState({ __a: r2.__b = r2.__v.__k[0] }), n2.then(i2, i2); }, U.prototype.componentWillUnmount = function() { this.t = []; }, U.prototype.render = function(n2, e2) { if (this.__b) { if (this.__v.__k) { var r2 = document.createElement("div"), o2 = this.__v.__k[0].__c; this.__v.__k[0] = I(this.__b, r2, o2.__O = o2.__P); } this.__b = null; } var i2 = e2.__a && h(p, null, n2.fallback); return i2 && (i2.__h = null), [h(p, null, e2.__a ? null : n2.children), i2]; }; var V = 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 W(n2) { return this.getChildContext = function() { return n2.context; }, n2.children; } function P(n2) { var e2 = this, r2 = n2.i; e2.componentWillUnmount = function() { P$1(null, e2.l), e2.l = null, e2.i = null; }, e2.i && e2.i !== r2 && e2.componentWillUnmount(), n2.__v ? (e2.l || (e2.i = r2, e2.l = { nodeType: 1, parentNode: r2, childNodes: [], appendChild: function(n3) { this.childNodes.push(n3), e2.i.appendChild(n3); }, insertBefore: function(n3, t2) { this.childNodes.push(n3), e2.i.appendChild(n3); }, removeChild: function(n3) { this.childNodes.splice(this.childNodes.indexOf(n3) >>> 1, 1), e2.i.removeChild(n3); } }), P$1(h(W, { context: e2.context }, n2.__v), e2.l)) : e2.l && e2.componentWillUnmount(); } function $(n2, e2) { var r2 = h(P, { __v: n2, i: e2 }); return r2.containerInfo = e2, r2; } (M.prototype = new d()).__a = function(n2) { var t2 = this, e2 = D(t2.__v), r2 = t2.o.get(n2); return r2[0]++, function(u2) { var o2 = function() { t2.props.revealOrder ? (r2.push(u2), V(t2, n2, r2)) : u2(); }; e2 ? e2(o2) : o2(); }; }, M.prototype.render = function(n2) { this.u = null, this.o = /* @__PURE__ */ new Map(); var t2 = x(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) { V(n2, e2, t2); }); }; var j = typeof Symbol != "undefined" && Symbol.for && Symbol.for("react.element") || 60103, z = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, B = typeof document != "undefined", H = function(n2) { return (typeof Symbol != "undefined" && typeof Symbol() == "symbol" ? /fil|che|rad/i : /fil|che|ra/i).test(n2); }; d.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t2) { Object.defineProperty(d.prototype, t2, { configurable: true, get: function() { return this["UNSAFE_" + t2]; }, set: function(n2) { Object.defineProperty(this, t2, { configurable: true, writable: true, value: n2 }); } }); }); var q = l$1.event; function G() { } function J() { return this.cancelBubble; } function K() { return this.defaultPrevented; } l$1.event = function(n2) { return q && (n2 = q(n2)), n2.persist = G, n2.isPropagationStopped = J, n2.isDefaultPrevented = K, n2.nativeEvent = n2; }; var X = { configurable: true, get: function() { return this.class; } }, nn = l$1.vnode; l$1.vnode = function(n2) { var t2 = n2.type, e2 = n2.props, u2 = e2; if (typeof t2 == "string") { var o2 = t2.indexOf("-") === -1; for (var i2 in u2 = {}, e2) { var l2 = e2[i2]; B && i2 === "children" && t2 === "noscript" || i2 === "value" && "defaultValue" in e2 && l2 == null || (i2 === "defaultValue" && "value" in e2 && e2.value == null ? i2 = "value" : i2 === "download" && l2 === true ? l2 = "" : /ondoubleclick/i.test(i2) ? i2 = "ondblclick" : /^onchange(textarea|input)/i.test(i2 + t2) && !H(e2.type) ? i2 = "oninput" : /^onfocus$/i.test(i2) ? i2 = "onfocusin" : /^onblur$/i.test(i2) ? i2 = "onfocusout" : /^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i2) ? i2 = i2.toLowerCase() : o2 && z.test(i2) ? i2 = i2.replace(/[A-Z0-9]/g, "-$&").toLowerCase() : l2 === null && (l2 = void 0), /^oninput$/i.test(i2) && (i2 = i2.toLowerCase(), u2[i2] && (i2 = "oninputCapture")), u2[i2] = l2); } t2 == "select" && u2.multiple && Array.isArray(u2.value) && (u2.value = x(e2.children).forEach(function(n3) { n3.props.selected = u2.value.indexOf(n3.props.value) != -1; })), t2 == "select" && u2.defaultValue != null && (u2.value = x(e2.children).forEach(function(n3) { n3.props.selected = u2.multiple ? u2.defaultValue.indexOf(n3.props.value) != -1 : u2.defaultValue == n3.props.value; })), n2.props = u2, e2.class != e2.className && (X.enumerable = "className" in e2, e2.className != null && (u2.class = e2.className), Object.defineProperty(u2, "className", X)); } n2.$$typeof = j, nn && nn(n2); }; var tn = l$1.__r; l$1.__r = function(n2) { tn && tn(n2); }; var globalObj = typeof globalThis !== "undefined" ? globalThis : window; if (globalObj.FullCalendarVDom) { console.warn("FullCalendar VDOM already loaded"); } else { globalObj.FullCalendarVDom = { Component: d, createElement: h, render: P$1, createRef: y, Fragment: p, createContext: createContext$1, createPortal: $, flushSync: flushSync$1, unmountComponentAtNode: unmountComponentAtNode$1 }; } function flushSync$1(runBeforeFlush) { runBeforeFlush(); var oldDebounceRendering = l$1.debounceRendering; var callbackQ = []; function execCallbackSync(callback) { callbackQ.push(callback); } l$1.debounceRendering = execCallbackSync; P$1(h(FakeComponent, {}), document.createElement("div")); while (callbackQ.length) { callbackQ.shift()(); } l$1.debounceRendering = oldDebounceRendering; } var FakeComponent = function(_super) { __extends(FakeComponent2, _super); function FakeComponent2() { return _super !== null && _super.apply(this, arguments) || this; } FakeComponent2.prototype.render = function() { return h("div", {}); }; FakeComponent2.prototype.componentDidMount = function() { this.setState({}); }; return FakeComponent2; }(d); function createContext$1(defaultValue) { var ContextType = B$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) { P$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 flushSync = FullCalendarVDom.flushSync; var unmountComponentAtNode = FullCalendarVDom.unmountComponentAtNode; /*! FullCalendar v5.11.3 Docs & License: https://fullcalendar.io/ (c) 2022 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) : ""); } fu