@luckydye/calendar 1.1.3 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calendar.js +485 -415
- package/package.json +1 -2
- package/src/CalendarView.ts +320 -164
- package/src/app.ts +2 -0
package/dist/calendar.js
CHANGED
|
@@ -35,7 +35,7 @@ const cn = (n) => new Wi(typeof n == "string" ? n : n + "", void 0, je), zi = (n
|
|
|
35
35
|
for (const i of t.cssRules) e += i.cssText;
|
|
36
36
|
return cn(e);
|
|
37
37
|
})(n) : n;
|
|
38
|
-
const { is: dn, defineProperty: un, getOwnPropertyDescriptor: fn, getOwnPropertyNames: gn, getOwnPropertySymbols: pn, getPrototypeOf: vn } = Object, Ce = globalThis, ci = Ce.trustedTypes, mn = ci ? ci.emptyScript : "", yn = Ce.reactiveElementPolyfillSupport, re = (n, t) => n,
|
|
38
|
+
const { is: dn, defineProperty: un, getOwnPropertyDescriptor: fn, getOwnPropertyNames: gn, getOwnPropertySymbols: pn, getPrototypeOf: vn } = Object, Ce = globalThis, ci = Ce.trustedTypes, mn = ci ? ci.emptyScript : "", yn = Ce.reactiveElementPolyfillSupport, re = (n, t) => n, Ie = { toAttribute(n, t) {
|
|
39
39
|
switch (t) {
|
|
40
40
|
case Boolean:
|
|
41
41
|
n = n ? mn : null;
|
|
@@ -63,7 +63,7 @@ const { is: dn, defineProperty: un, getOwnPropertyDescriptor: fn, getOwnProperty
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return e;
|
|
66
|
-
} }, Fi = (n, t) => !dn(n, t), hi = { attribute: !0, type: String, converter:
|
|
66
|
+
} }, Fi = (n, t) => !dn(n, t), hi = { attribute: !0, type: String, converter: Ie, reflect: !1, useDefault: !1, hasChanged: Fi };
|
|
67
67
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Ce.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
68
68
|
let Vt = class extends HTMLElement {
|
|
69
69
|
static addInitializer(t) {
|
|
@@ -162,14 +162,14 @@ let Vt = class extends HTMLElement {
|
|
|
162
162
|
_$ET(t, e) {
|
|
163
163
|
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
|
164
164
|
if (s !== void 0 && i.reflect === !0) {
|
|
165
|
-
const r = (i.converter?.toAttribute !== void 0 ? i.converter :
|
|
165
|
+
const r = (i.converter?.toAttribute !== void 0 ? i.converter : Ie).toAttribute(e, i.type);
|
|
166
166
|
this._$Em = t, r == null ? this.removeAttribute(s) : this.setAttribute(s, r), this._$Em = null;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
_$AK(t, e) {
|
|
170
170
|
const i = this.constructor, s = i._$Eh.get(t);
|
|
171
171
|
if (s !== void 0 && this._$Em !== s) {
|
|
172
|
-
const r = i.getPropertyOptions(s), o = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter :
|
|
172
|
+
const r = i.getPropertyOptions(s), o = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : Ie;
|
|
173
173
|
this._$Em = s;
|
|
174
174
|
const a = o.fromAttribute(e, r.type);
|
|
175
175
|
this[s] = a ?? this._$Ej?.get(s) ?? a, this._$Em = null;
|
|
@@ -247,9 +247,9 @@ let Vt = class extends HTMLElement {
|
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
Vt.elementStyles = [], Vt.shadowRootOptions = { mode: "open" }, Vt[re("elementProperties")] = /* @__PURE__ */ new Map(), Vt[re("finalized")] = /* @__PURE__ */ new Map(), yn?.({ ReactiveElement: Vt }), (Ce.reactiveElementVersions ??= []).push("2.1.2");
|
|
250
|
-
const Ke = globalThis, di = (n) => n, we = Ke.trustedTypes, ui = we ? we.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Bi = "$lit$", At = `lit$${Math.random().toFixed(9).slice(2)}$`, qi = "?" + At, bn = `<${qi}>`,
|
|
251
|
-
\f\r]`, ne = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, fi = /-->/g, gi = />/g,
|
|
252
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), pi = /'/g, vi = /"/g, Vi = /^(?:script|style|textarea|title)$/i, En = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), _ = En(1), Xt = /* @__PURE__ */ Symbol.for("lit-noChange"), G = /* @__PURE__ */ Symbol.for("lit-nothing"), mi = /* @__PURE__ */ new WeakMap(),
|
|
250
|
+
const Ke = globalThis, di = (n) => n, we = Ke.trustedTypes, ui = we ? we.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Bi = "$lit$", At = `lit$${Math.random().toFixed(9).slice(2)}$`, qi = "?" + At, bn = `<${qi}>`, Lt = document, le = () => Lt.createComment(""), ce = (n) => n === null || typeof n != "object" && typeof n != "function", Xe = Array.isArray, wn = (n) => Xe(n) || typeof n?.[Symbol.iterator] == "function", _e = `[
|
|
251
|
+
\f\r]`, ne = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, fi = /-->/g, gi = />/g, It = RegExp(`>|${_e}(?:([^\\s"'>=/]+)(${_e}*=${_e}*(?:[^
|
|
252
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), pi = /'/g, vi = /"/g, Vi = /^(?:script|style|textarea|title)$/i, En = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), _ = En(1), Xt = /* @__PURE__ */ Symbol.for("lit-noChange"), G = /* @__PURE__ */ Symbol.for("lit-nothing"), mi = /* @__PURE__ */ new WeakMap(), Ut = Lt.createTreeWalker(Lt, 129);
|
|
253
253
|
function ji(n, t) {
|
|
254
254
|
if (!Xe(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
255
255
|
return ui !== void 0 ? ui.createHTML(t) : t;
|
|
@@ -260,8 +260,8 @@ const xn = (n, t) => {
|
|
|
260
260
|
for (let a = 0; a < e; a++) {
|
|
261
261
|
const l = n[a];
|
|
262
262
|
let c, d, h = -1, u = 0;
|
|
263
|
-
for (; u < l.length && (o.lastIndex = u, d = o.exec(l), d !== null); ) u = o.lastIndex, o === ne ? d[1] === "!--" ? o = fi : d[1] !== void 0 ? o = gi : d[2] !== void 0 ? (Vi.test(d[2]) && (s = RegExp("</" + d[2], "g")), o =
|
|
264
|
-
const f = o ===
|
|
263
|
+
for (; u < l.length && (o.lastIndex = u, d = o.exec(l), d !== null); ) u = o.lastIndex, o === ne ? d[1] === "!--" ? o = fi : d[1] !== void 0 ? o = gi : d[2] !== void 0 ? (Vi.test(d[2]) && (s = RegExp("</" + d[2], "g")), o = It) : d[3] !== void 0 && (o = It) : o === It ? d[0] === ">" ? (o = s ?? ne, h = -1) : d[1] === void 0 ? h = -2 : (h = o.lastIndex - d[2].length, c = d[1], o = d[3] === void 0 ? It : d[3] === '"' ? vi : pi) : o === vi || o === pi ? o = It : o === fi || o === gi ? o = ne : (o = It, s = void 0);
|
|
264
|
+
const f = o === It && n[a + 1].startsWith("/>") ? " " : "";
|
|
265
265
|
r += o === ne ? l + bn : h >= 0 ? (i.push(c), l.slice(0, h) + Bi + l.slice(h) + At + f) : l + At + (h === -2 ? a : f);
|
|
266
266
|
}
|
|
267
267
|
return [ji(n, r + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
@@ -272,21 +272,21 @@ class he {
|
|
|
272
272
|
this.parts = [];
|
|
273
273
|
let r = 0, o = 0;
|
|
274
274
|
const a = t.length - 1, l = this.parts, [c, d] = xn(t, e);
|
|
275
|
-
if (this.el = he.createElement(c, i),
|
|
275
|
+
if (this.el = he.createElement(c, i), Ut.currentNode = this.el.content, e === 2 || e === 3) {
|
|
276
276
|
const h = this.el.content.firstChild;
|
|
277
277
|
h.replaceWith(...h.childNodes);
|
|
278
278
|
}
|
|
279
|
-
for (; (s =
|
|
279
|
+
for (; (s = Ut.nextNode()) !== null && l.length < a; ) {
|
|
280
280
|
if (s.nodeType === 1) {
|
|
281
281
|
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Bi)) {
|
|
282
|
-
const u = d[o++], f = s.getAttribute(h).split(At),
|
|
283
|
-
l.push({ type: 1, index: r, name:
|
|
282
|
+
const u = d[o++], f = s.getAttribute(h).split(At), v = /([.?@])?(.*)/.exec(u);
|
|
283
|
+
l.push({ type: 1, index: r, name: v[2], strings: f, ctor: v[1] === "." ? Tn : v[1] === "?" ? kn : v[1] === "@" ? Dn : Me }), s.removeAttribute(h);
|
|
284
284
|
} else h.startsWith(At) && (l.push({ type: 6, index: r }), s.removeAttribute(h));
|
|
285
285
|
if (Vi.test(s.tagName)) {
|
|
286
286
|
const h = s.textContent.split(At), u = h.length - 1;
|
|
287
287
|
if (u > 0) {
|
|
288
288
|
s.textContent = we ? we.emptyScript : "";
|
|
289
|
-
for (let f = 0; f < u; f++) s.append(h[f], le()),
|
|
289
|
+
for (let f = 0; f < u; f++) s.append(h[f], le()), Ut.nextNode(), l.push({ type: 2, index: ++r });
|
|
290
290
|
s.append(h[u], le());
|
|
291
291
|
}
|
|
292
292
|
}
|
|
@@ -299,7 +299,7 @@ class he {
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
static createElement(t, e) {
|
|
302
|
-
const i =
|
|
302
|
+
const i = Lt.createElement("template");
|
|
303
303
|
return i.innerHTML = t, i;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
@@ -320,17 +320,17 @@ class Sn {
|
|
|
320
320
|
return this._$AM._$AU;
|
|
321
321
|
}
|
|
322
322
|
u(t) {
|
|
323
|
-
const { el: { content: e }, parts: i } = this._$AD, s = (t?.creationScope ??
|
|
324
|
-
|
|
325
|
-
let r =
|
|
323
|
+
const { el: { content: e }, parts: i } = this._$AD, s = (t?.creationScope ?? Lt).importNode(e, !0);
|
|
324
|
+
Ut.currentNode = s;
|
|
325
|
+
let r = Ut.nextNode(), o = 0, a = 0, l = i[0];
|
|
326
326
|
for (; l !== void 0; ) {
|
|
327
327
|
if (o === l.index) {
|
|
328
328
|
let c;
|
|
329
329
|
l.type === 2 ? c = new ue(r, r.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (c = new Cn(r, this, t)), this._$AV.push(c), l = i[++a];
|
|
330
330
|
}
|
|
331
|
-
o !== l?.index && (r =
|
|
331
|
+
o !== l?.index && (r = Ut.nextNode(), o++);
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return Ut.currentNode = Lt, s;
|
|
334
334
|
}
|
|
335
335
|
p(t) {
|
|
336
336
|
let e = 0;
|
|
@@ -365,7 +365,7 @@ class ue {
|
|
|
365
365
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
366
366
|
}
|
|
367
367
|
_(t) {
|
|
368
|
-
this._$AH !== G && ce(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
368
|
+
this._$AH !== G && ce(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Lt.createTextNode(t)), this._$AH = t;
|
|
369
369
|
}
|
|
370
370
|
$(t) {
|
|
371
371
|
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = he.createElement(ji(i.h, i.h[0]), this.options)), i);
|
|
@@ -539,7 +539,7 @@ var Ye = [
|
|
|
539
539
|
for (var e = [], i = n; i < t; i++)
|
|
540
540
|
e.push(i);
|
|
541
541
|
return e;
|
|
542
|
-
},
|
|
542
|
+
}, I = function(n, t) {
|
|
543
543
|
var e = 0, i = [];
|
|
544
544
|
if (ot(n))
|
|
545
545
|
for (; e < t; e++)
|
|
@@ -551,10 +551,10 @@ var Ye = [
|
|
|
551
551
|
}, On = function(n) {
|
|
552
552
|
return ot(n) ? n : [n];
|
|
553
553
|
};
|
|
554
|
-
function
|
|
554
|
+
function qt(n, t, e) {
|
|
555
555
|
e === void 0 && (e = " ");
|
|
556
556
|
var i = String(n);
|
|
557
|
-
return t = t >> 0, i.length > t ? String(i) : (t = t - i.length, t > e.length && (e +=
|
|
557
|
+
return t = t >> 0, i.length > t ? String(i) : (t = t - i.length, t > e.length && (e += I(e, t / e.length)), e.slice(0, t) + String(i));
|
|
558
558
|
}
|
|
559
559
|
var _n = function(n, t, e) {
|
|
560
560
|
var i = n.split(t);
|
|
@@ -562,7 +562,7 @@ var _n = function(n, t, e) {
|
|
|
562
562
|
}, lt = function(n, t) {
|
|
563
563
|
var e = n % t;
|
|
564
564
|
return e * t < 0 ? e + t : e;
|
|
565
|
-
},
|
|
565
|
+
}, He = function(n, t) {
|
|
566
566
|
return { div: Math.floor(n / t), mod: lt(n, t) };
|
|
567
567
|
}, yt = function(n) {
|
|
568
568
|
return !V(n) || n.length === 0;
|
|
@@ -570,29 +570,29 @@ var _n = function(n, t, e) {
|
|
|
570
570
|
return !yt(n);
|
|
571
571
|
}, F = function(n, t) {
|
|
572
572
|
return Z(n) && n.indexOf(t) !== -1;
|
|
573
|
-
},
|
|
573
|
+
}, Wt = function(n, t, e, i, s, r) {
|
|
574
574
|
return i === void 0 && (i = 0), s === void 0 && (s = 0), r === void 0 && (r = 0), new Date(Date.UTC(n, t - 1, e, i, s, r));
|
|
575
|
-
},
|
|
575
|
+
}, Hn = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ki = 1e3 * 60 * 60 * 24, Xi = 9999, Zi = Wt(1970, 1, 1), Pn = [6, 0, 1, 2, 3, 4, 5], oe = function(n) {
|
|
576
576
|
return n % 4 === 0 && n % 100 !== 0 || n % 400 === 0;
|
|
577
577
|
}, Gi = function(n) {
|
|
578
578
|
return n instanceof Date;
|
|
579
579
|
}, se = function(n) {
|
|
580
580
|
return Gi(n) && !isNaN(n.getTime());
|
|
581
|
-
},
|
|
581
|
+
}, Rn = function(n, t) {
|
|
582
582
|
var e = n.getTime(), i = t.getTime(), s = e - i;
|
|
583
583
|
return Math.round(s / Ki);
|
|
584
584
|
}, Ne = function(n) {
|
|
585
|
-
return
|
|
585
|
+
return Rn(n, Zi);
|
|
586
586
|
}, Ji = function(n) {
|
|
587
587
|
return new Date(Zi.getTime() + n * Ki);
|
|
588
|
-
},
|
|
588
|
+
}, In = function(n) {
|
|
589
589
|
var t = n.getUTCMonth();
|
|
590
|
-
return t === 1 && oe(n.getUTCFullYear()) ? 29 :
|
|
590
|
+
return t === 1 && oe(n.getUTCFullYear()) ? 29 : Hn[t];
|
|
591
591
|
}, Gt = function(n) {
|
|
592
|
-
return
|
|
592
|
+
return Pn[n.getUTCDay()];
|
|
593
593
|
}, bi = function(n, t) {
|
|
594
|
-
var e =
|
|
595
|
-
return [Gt(e),
|
|
594
|
+
var e = Wt(n, t + 1, 1);
|
|
595
|
+
return [Gt(e), In(e)];
|
|
596
596
|
}, Qi = function(n, t) {
|
|
597
597
|
return t = t || n, new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
598
598
|
}, Ue = function(n) {
|
|
@@ -610,13 +610,13 @@ var _n = function(n, t, e) {
|
|
|
610
610
|
t === void 0 && (t = !0);
|
|
611
611
|
var e = new Date(n);
|
|
612
612
|
return [
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
613
|
+
qt(e.getUTCFullYear().toString(), 4, "0"),
|
|
614
|
+
qt(e.getUTCMonth() + 1, 2, "0"),
|
|
615
|
+
qt(e.getUTCDate(), 2, "0"),
|
|
616
616
|
"T",
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
617
|
+
qt(e.getUTCHours(), 2, "0"),
|
|
618
|
+
qt(e.getUTCMinutes(), 2, "0"),
|
|
619
|
+
qt(e.getUTCSeconds(), 2, "0"),
|
|
620
620
|
t ? "Z" : ""
|
|
621
621
|
].join("");
|
|
622
622
|
}, Je = function(n) {
|
|
@@ -1010,10 +1010,10 @@ function tn(n, t) {
|
|
|
1010
1010
|
for (; i.accept("comma"); ) {
|
|
1011
1011
|
if (i.isDone())
|
|
1012
1012
|
throw new Error("Unexpected end");
|
|
1013
|
-
var
|
|
1014
|
-
if (!
|
|
1013
|
+
var v = l();
|
|
1014
|
+
if (!v)
|
|
1015
1015
|
throw new Error("Unexpected symbol " + i.symbol + ", expected weekday");
|
|
1016
|
-
e.byweekday.push(k[
|
|
1016
|
+
e.byweekday.push(k[v]), i.nextSymbol();
|
|
1017
1017
|
}
|
|
1018
1018
|
o(), d(), h();
|
|
1019
1019
|
break;
|
|
@@ -1049,9 +1049,9 @@ function tn(n, t) {
|
|
|
1049
1049
|
var u = i.accept("on"), f = i.accept("the");
|
|
1050
1050
|
if (u || f)
|
|
1051
1051
|
do {
|
|
1052
|
-
var
|
|
1053
|
-
if (
|
|
1054
|
-
g ? (i.nextSymbol(), e.byweekday || (e.byweekday = []), e.byweekday.push(k[g].nth(
|
|
1052
|
+
var v = c(), g = l(), p = a();
|
|
1053
|
+
if (v)
|
|
1054
|
+
g ? (i.nextSymbol(), e.byweekday || (e.byweekday = []), e.byweekday.push(k[g].nth(v))) : (e.bymonthday || (e.bymonthday = []), e.bymonthday.push(v), i.accept("day(s)"));
|
|
1055
1055
|
else if (g)
|
|
1056
1056
|
i.nextSymbol(), e.byweekday || (e.byweekday = []), e.byweekday.push(k[g]);
|
|
1057
1057
|
else if (i.symbol === "weekday(s)")
|
|
@@ -1066,8 +1066,8 @@ function tn(n, t) {
|
|
|
1066
1066
|
throw new Error("Unexpected symbol " + i.symbol + "; expected monthday");
|
|
1067
1067
|
e.byweekno.push(parseInt(y[0], 10));
|
|
1068
1068
|
}
|
|
1069
|
-
} else if (
|
|
1070
|
-
i.nextSymbol(), e.bymonth || (e.bymonth = []), e.bymonth.push(
|
|
1069
|
+
} else if (p)
|
|
1070
|
+
i.nextSymbol(), e.bymonth || (e.bymonth = []), e.bymonth.push(p);
|
|
1071
1071
|
else
|
|
1072
1072
|
return;
|
|
1073
1073
|
} while (i.accept("comma") || i.accept("the") || i.accept("on"));
|
|
@@ -1246,21 +1246,21 @@ var zn = function(n, t, e, i) {
|
|
|
1246
1246
|
}, t.prototype.addHours = function(e, i, s) {
|
|
1247
1247
|
for (i && (this.hour += Math.floor((23 - this.hour) / e) * e); ; ) {
|
|
1248
1248
|
this.hour += e;
|
|
1249
|
-
var r =
|
|
1249
|
+
var r = He(this.hour, 24), o = r.div, a = r.mod;
|
|
1250
1250
|
if (o && (this.hour = a, this.addDaily(o)), yt(s) || F(s, this.hour))
|
|
1251
1251
|
break;
|
|
1252
1252
|
}
|
|
1253
1253
|
}, t.prototype.addMinutes = function(e, i, s, r) {
|
|
1254
1254
|
for (i && (this.minute += Math.floor((1439 - (this.hour * 60 + this.minute)) / e) * e); ; ) {
|
|
1255
1255
|
this.minute += e;
|
|
1256
|
-
var o =
|
|
1256
|
+
var o = He(this.minute, 60), a = o.div, l = o.mod;
|
|
1257
1257
|
if (a && (this.minute = l, this.addHours(a, !1, s)), (yt(s) || F(s, this.hour)) && (yt(r) || F(r, this.minute)))
|
|
1258
1258
|
break;
|
|
1259
1259
|
}
|
|
1260
1260
|
}, t.prototype.addSeconds = function(e, i, s, r, o) {
|
|
1261
1261
|
for (i && (this.second += Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) / e) * e); ; ) {
|
|
1262
1262
|
this.second += e;
|
|
1263
|
-
var a =
|
|
1263
|
+
var a = He(this.second, 60), l = a.div, c = a.mod;
|
|
1264
1264
|
if (l && (this.second = c, this.addMinutes(l, !1, s, r)), (yt(s) || F(s, this.hour)) && (yt(r) || F(r, this.minute)) && (yt(o) || F(o, this.second)))
|
|
1265
1265
|
break;
|
|
1266
1266
|
}
|
|
@@ -1530,8 +1530,8 @@ function ze(n) {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
var h = t.map(function(f) {
|
|
1533
|
-
var
|
|
1534
|
-
return "".concat(
|
|
1533
|
+
var v = f[0], g = f[1];
|
|
1534
|
+
return "".concat(v, "=").concat(g.toString());
|
|
1535
1535
|
}).join(";"), u = "";
|
|
1536
1536
|
return h !== "" && (u = "RRULE:".concat(h)), [e, u].filter(function(f) {
|
|
1537
1537
|
return !!f;
|
|
@@ -1581,49 +1581,49 @@ var Jn = (
|
|
|
1581
1581
|
return ot(i) ? wi(i) : i instanceof Date ? Ue(i) : i;
|
|
1582
1582
|
}, n;
|
|
1583
1583
|
})()
|
|
1584
|
-
), Qn = m(m(m(m(m(m(m(m(m(m(m(m(m([],
|
|
1584
|
+
), Qn = m(m(m(m(m(m(m(m(m(m(m(m(m([], I(1, 31), !0), I(2, 28), !0), I(3, 31), !0), I(4, 30), !0), I(5, 31), !0), I(6, 30), !0), I(7, 31), !0), I(8, 31), !0), I(9, 30), !0), I(10, 31), !0), I(11, 30), !0), I(12, 31), !0), I(1, 7), !0), ts = m(m(m(m(m(m(m(m(m(m(m(m(m([], I(1, 31), !0), I(2, 29), !0), I(3, 31), !0), I(4, 30), !0), I(5, 31), !0), I(6, 30), !0), I(7, 31), !0), I(8, 31), !0), I(9, 30), !0), I(10, 31), !0), I(11, 30), !0), I(12, 31), !0), I(1, 7), !0), es = bt(1, 29), is = bt(1, 30), Ot = bt(1, 31), tt = bt(1, 32), ns = m(m(m(m(m(m(m(m(m(m(m(m(m([], tt, !0), is, !0), tt, !0), Ot, !0), tt, !0), Ot, !0), tt, !0), tt, !0), Ot, !0), tt, !0), Ot, !0), tt, !0), tt.slice(0, 7), !0), ss = m(m(m(m(m(m(m(m(m(m(m(m(m([], tt, !0), es, !0), tt, !0), Ot, !0), tt, !0), Ot, !0), tt, !0), tt, !0), Ot, !0), tt, !0), Ot, !0), tt, !0), tt.slice(0, 7), !0), rs = bt(-28, 0), os = bt(-29, 0), _t = bt(-30, 0), et = bt(-31, 0), as = m(m(m(m(m(m(m(m(m(m(m(m(m([], et, !0), os, !0), et, !0), _t, !0), et, !0), _t, !0), et, !0), et, !0), _t, !0), et, !0), _t, !0), et, !0), et.slice(0, 7), !0), ls = m(m(m(m(m(m(m(m(m(m(m(m(m([], et, !0), rs, !0), et, !0), _t, !0), et, !0), _t, !0), et, !0), et, !0), _t, !0), et, !0), _t, !0), et, !0), et.slice(0, 7), !0), cs = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366], hs = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365], Di = (function() {
|
|
1585
1585
|
for (var n = [], t = 0; t < 55; t++)
|
|
1586
1586
|
n = n.concat(bt(7));
|
|
1587
1587
|
return n;
|
|
1588
1588
|
})();
|
|
1589
1589
|
function ds(n, t) {
|
|
1590
|
-
var e =
|
|
1590
|
+
var e = Wt(n, 1, 1), i = oe(n) ? 366 : 365, s = oe(n + 1) ? 366 : 365, r = Ne(e), o = Gt(e), a = at(at({ yearlen: i, nextyearlen: s, yearordinal: r, yearweekday: o }, us(n)), { wnomask: null });
|
|
1591
1591
|
if (yt(t.byweekno))
|
|
1592
1592
|
return a;
|
|
1593
|
-
a.wnomask =
|
|
1593
|
+
a.wnomask = I(0, i + 7);
|
|
1594
1594
|
var l, c, d = l = lt(7 - o + t.wkst, 7);
|
|
1595
1595
|
d >= 4 ? (d = 0, c = a.yearlen + lt(o - t.wkst, 7)) : c = i - d;
|
|
1596
|
-
for (var h = Math.floor(c / 7), u = lt(c, 7), f = Math.floor(h + u / 4),
|
|
1597
|
-
var g = t.byweekno[
|
|
1596
|
+
for (var h = Math.floor(c / 7), u = lt(c, 7), f = Math.floor(h + u / 4), v = 0; v < t.byweekno.length; v++) {
|
|
1597
|
+
var g = t.byweekno[v];
|
|
1598
1598
|
if (g < 0 && (g += f + 1), g > 0 && g <= f) {
|
|
1599
|
-
var
|
|
1600
|
-
g > 1 ? (
|
|
1601
|
-
for (var y = 0; y < 7 && (a.wnomask[
|
|
1599
|
+
var p = void 0;
|
|
1600
|
+
g > 1 ? (p = d + (g - 1) * 7, d !== l && (p -= 7 - l)) : p = d;
|
|
1601
|
+
for (var y = 0; y < 7 && (a.wnomask[p] = 1, p++, a.wdaymask[p] !== t.wkst); y++)
|
|
1602
1602
|
;
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
1605
|
if (F(t.byweekno, 1)) {
|
|
1606
|
-
var
|
|
1607
|
-
if (d !== l && (
|
|
1608
|
-
for (var
|
|
1606
|
+
var p = d + f * 7;
|
|
1607
|
+
if (d !== l && (p -= 7 - l), p < i)
|
|
1608
|
+
for (var v = 0; v < 7 && (a.wnomask[p] = 1, p += 1, a.wdaymask[p] !== t.wkst); v++)
|
|
1609
1609
|
;
|
|
1610
1610
|
}
|
|
1611
1611
|
if (d) {
|
|
1612
|
-
var
|
|
1612
|
+
var C = void 0;
|
|
1613
1613
|
if (F(t.byweekno, -1))
|
|
1614
|
-
|
|
1614
|
+
C = -1;
|
|
1615
1615
|
else {
|
|
1616
|
-
var
|
|
1617
|
-
|
|
1616
|
+
var H = Gt(Wt(n - 1, 1, 1)), M = lt(7 - H.valueOf() + t.wkst, 7), x = oe(n - 1) ? 366 : 365, $ = void 0;
|
|
1617
|
+
M >= 4 ? (M = 0, $ = x + lt(H - t.wkst, 7)) : $ = i - d, C = Math.floor(52 + lt($, 7) / 4);
|
|
1618
1618
|
}
|
|
1619
|
-
if (F(t.byweekno,
|
|
1620
|
-
for (var
|
|
1621
|
-
a.wnomask[
|
|
1619
|
+
if (F(t.byweekno, C))
|
|
1620
|
+
for (var p = 0; p < d; p++)
|
|
1621
|
+
a.wnomask[p] = 1;
|
|
1622
1622
|
}
|
|
1623
1623
|
return a;
|
|
1624
1624
|
}
|
|
1625
1625
|
function us(n) {
|
|
1626
|
-
var t = oe(n) ? 366 : 365, e =
|
|
1626
|
+
var t = oe(n) ? 366 : 365, e = Wt(n, 1, 1), i = Gt(e);
|
|
1627
1627
|
return t === 365 ? {
|
|
1628
1628
|
mmask: Qn,
|
|
1629
1629
|
mdaymask: ss,
|
|
@@ -1653,18 +1653,18 @@ function fs(n, t, e, i, s, r) {
|
|
|
1653
1653
|
else r.freq === k.MONTHLY && (a = [i.slice(t - 1, t + 1)]);
|
|
1654
1654
|
if (yt(a))
|
|
1655
1655
|
return o;
|
|
1656
|
-
o.nwdaymask =
|
|
1656
|
+
o.nwdaymask = I(0, e);
|
|
1657
1657
|
for (var l = 0; l < a.length; l++)
|
|
1658
1658
|
for (var c = a[l], d = c[0], h = c[1] - 1, u = 0; u < r.bynweekday.length; u++) {
|
|
1659
|
-
var f = void 0,
|
|
1660
|
-
|
|
1659
|
+
var f = void 0, v = r.bynweekday[u], g = v[0], p = v[1];
|
|
1660
|
+
p < 0 ? (f = h + (p + 1) * 7, f -= lt(s[f] - g, 7)) : (f = d + (p - 1) * 7, f += lt(7 - s[f] + g, 7)), d <= f && f <= h && (o.nwdaymask[f] = 1);
|
|
1661
1661
|
}
|
|
1662
1662
|
return o;
|
|
1663
1663
|
}
|
|
1664
1664
|
function gs(n, t) {
|
|
1665
1665
|
t === void 0 && (t = 0);
|
|
1666
|
-
var e = n % 19, i = Math.floor(n / 100), s = n % 100, r = Math.floor(i / 4), o = i % 4, a = Math.floor((i + 8) / 25), l = Math.floor((i - a + 1) / 3), c = Math.floor(19 * e + i - r - l + 15) % 30, d = Math.floor(s / 4), h = s % 4, u = Math.floor(32 + 2 * o + 2 * d - c - h) % 7, f = Math.floor((e + 11 * c + 22 * u) / 451),
|
|
1667
|
-
return [Math.ceil((
|
|
1666
|
+
var e = n % 19, i = Math.floor(n / 100), s = n % 100, r = Math.floor(i / 4), o = i % 4, a = Math.floor((i + 8) / 25), l = Math.floor((i - a + 1) / 3), c = Math.floor(19 * e + i - r - l + 15) % 30, d = Math.floor(s / 4), h = s % 4, u = Math.floor(32 + 2 * o + 2 * d - c - h) % 7, f = Math.floor((e + 11 * c + 22 * u) / 451), v = Math.floor((c + u - 7 * f + 114) / 31), g = (c + u - 7 * f + 114) % 31 + 1, p = Date.UTC(n, v - 1, g + t), y = Date.UTC(n, 0, 1);
|
|
1667
|
+
return [Math.ceil((p - y) / (1e3 * 60 * 60 * 24))];
|
|
1668
1668
|
}
|
|
1669
1669
|
var ps = (
|
|
1670
1670
|
/** @class */
|
|
@@ -1754,15 +1754,15 @@ var ps = (
|
|
|
1754
1754
|
}), n.prototype.ydayset = function() {
|
|
1755
1755
|
return [bt(this.yearlen), 0, this.yearlen];
|
|
1756
1756
|
}, n.prototype.mdayset = function(t, e) {
|
|
1757
|
-
for (var i = this.mrange[e - 1], s = this.mrange[e], r =
|
|
1757
|
+
for (var i = this.mrange[e - 1], s = this.mrange[e], r = I(null, this.yearlen), o = i; o < s; o++)
|
|
1758
1758
|
r[o] = o;
|
|
1759
1759
|
return [r, i, s];
|
|
1760
1760
|
}, n.prototype.wdayset = function(t, e, i) {
|
|
1761
|
-
for (var s =
|
|
1761
|
+
for (var s = I(null, this.yearlen + 7), r = Ne(Wt(t, e, i)) - this.yearordinal, o = r, a = 0; a < 7 && (s[r] = r, ++r, this.wdaymask[r] !== this.options.wkst); a++)
|
|
1762
1762
|
;
|
|
1763
1763
|
return [s, o, r];
|
|
1764
1764
|
}, n.prototype.ddayset = function(t, e, i) {
|
|
1765
|
-
var s =
|
|
1765
|
+
var s = I(null, this.yearlen), r = Ne(Wt(t, e, i)) - this.yearordinal;
|
|
1766
1766
|
return s[r] = r, [s, r, r + 1];
|
|
1767
1767
|
}, n.prototype.htimeset = function(t, e, i, s) {
|
|
1768
1768
|
var r = this, o = [];
|
|
@@ -1809,9 +1809,9 @@ function vs(n, t, e, i, s, r) {
|
|
|
1809
1809
|
var f = r[u];
|
|
1810
1810
|
V(f) && h.push(f);
|
|
1811
1811
|
}
|
|
1812
|
-
var
|
|
1813
|
-
l < 0 ?
|
|
1814
|
-
var g = t[c],
|
|
1812
|
+
var v = void 0;
|
|
1813
|
+
l < 0 ? v = h.slice(l)[0] : v = h[l];
|
|
1814
|
+
var g = t[c], p = Ji(s.yearordinal + v), y = Qi(p, g);
|
|
1815
1815
|
F(o, y) || o.push(y);
|
|
1816
1816
|
}
|
|
1817
1817
|
return de(o), o;
|
|
@@ -1823,29 +1823,29 @@ function nn(n, t) {
|
|
|
1823
1823
|
var l = Bn.fromDate(e), c = new ps(t);
|
|
1824
1824
|
c.rebuild(l.year, l.month);
|
|
1825
1825
|
for (var d = bs(c, l, t); ; ) {
|
|
1826
|
-
var h = c.getdayset(i)(l.year, l.month, l.day), u = h[0], f = h[1],
|
|
1826
|
+
var h = c.getdayset(i)(l.year, l.month, l.day), u = h[0], f = h[1], v = h[2], g = ys(u, f, v, c, t);
|
|
1827
1827
|
if (Z(o))
|
|
1828
|
-
for (var
|
|
1829
|
-
var
|
|
1830
|
-
if (r &&
|
|
1828
|
+
for (var p = vs(o, d, f, v, c, u), y = 0; y < p.length; y++) {
|
|
1829
|
+
var C = p[y];
|
|
1830
|
+
if (r && C > r)
|
|
1831
1831
|
return xt(n);
|
|
1832
|
-
if (
|
|
1833
|
-
var
|
|
1834
|
-
if (!n.accept(
|
|
1832
|
+
if (C >= e) {
|
|
1833
|
+
var H = Ci(C, t);
|
|
1834
|
+
if (!n.accept(H) || a && (--a, !a))
|
|
1835
1835
|
return xt(n);
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
1838
|
else
|
|
1839
|
-
for (var y = f; y <
|
|
1840
|
-
var
|
|
1841
|
-
if (V(
|
|
1842
|
-
for (var x = Ji(c.yearordinal +
|
|
1843
|
-
var w = d[
|
|
1844
|
-
if (r &&
|
|
1839
|
+
for (var y = f; y < v; y++) {
|
|
1840
|
+
var M = u[y];
|
|
1841
|
+
if (V(M))
|
|
1842
|
+
for (var x = Ji(c.yearordinal + M), $ = 0; $ < d.length; $++) {
|
|
1843
|
+
var w = d[$], C = Qi(x, w);
|
|
1844
|
+
if (r && C > r)
|
|
1845
1845
|
return xt(n);
|
|
1846
|
-
if (
|
|
1847
|
-
var
|
|
1848
|
-
if (!n.accept(
|
|
1846
|
+
if (C >= e) {
|
|
1847
|
+
var H = Ci(C, t);
|
|
1848
|
+
if (!n.accept(H) || a && (--a, !a))
|
|
1849
1849
|
return xt(n);
|
|
1850
1850
|
}
|
|
1851
1851
|
}
|
|
@@ -1976,8 +1976,8 @@ var dt = {
|
|
|
1976
1976
|
function Es(n, t, e, i, s, r) {
|
|
1977
1977
|
var o = {}, a = n.accept;
|
|
1978
1978
|
function l(u, f) {
|
|
1979
|
-
e.forEach(function(
|
|
1980
|
-
|
|
1979
|
+
e.forEach(function(v) {
|
|
1980
|
+
v.between(u, f, !0).forEach(function(g) {
|
|
1981
1981
|
o[Number(g)] = !0;
|
|
1982
1982
|
});
|
|
1983
1983
|
});
|
|
@@ -2024,24 +2024,24 @@ function xs(n, t) {
|
|
|
2024
2024
|
return c.forEach(function(d) {
|
|
2025
2025
|
var h;
|
|
2026
2026
|
if (d) {
|
|
2027
|
-
var u = Ds(d), f = u.name,
|
|
2027
|
+
var u = Ds(d), f = u.name, v = u.parms, g = u.value;
|
|
2028
2028
|
switch (f.toUpperCase()) {
|
|
2029
2029
|
case "RRULE":
|
|
2030
|
-
if (
|
|
2031
|
-
throw new Error("unsupported RRULE parm: ".concat(
|
|
2030
|
+
if (v.length)
|
|
2031
|
+
throw new Error("unsupported RRULE parm: ".concat(v.join(",")));
|
|
2032
2032
|
e.push(We(d));
|
|
2033
2033
|
break;
|
|
2034
2034
|
case "RDATE":
|
|
2035
|
-
var
|
|
2036
|
-
y && !l && (l = y), i = i.concat($i(g,
|
|
2035
|
+
var p = (h = /RDATE(?:;TZID=([^:=]+))?/i.exec(d)) !== null && h !== void 0 ? h : [], y = p[1];
|
|
2036
|
+
y && !l && (l = y), i = i.concat($i(g, v));
|
|
2037
2037
|
break;
|
|
2038
2038
|
case "EXRULE":
|
|
2039
|
-
if (
|
|
2040
|
-
throw new Error("unsupported EXRULE parm: ".concat(
|
|
2039
|
+
if (v.length)
|
|
2040
|
+
throw new Error("unsupported EXRULE parm: ".concat(v.join(",")));
|
|
2041
2041
|
s.push(We(g));
|
|
2042
2042
|
break;
|
|
2043
2043
|
case "EXDATE":
|
|
2044
|
-
r = r.concat($i(g,
|
|
2044
|
+
r = r.concat($i(g, v));
|
|
2045
2045
|
break;
|
|
2046
2046
|
case "DTSTART":
|
|
2047
2047
|
break;
|
|
@@ -2063,22 +2063,22 @@ function Ss(n, t) {
|
|
|
2063
2063
|
if (t.compatible && (t.forceset = !0, t.unfold = !0), t.forceset || i.length > 1 || s.length || r.length || o.length) {
|
|
2064
2064
|
var d = new $s(c);
|
|
2065
2065
|
return d.dtstart(a), d.tzid(l || void 0), i.forEach(function(u) {
|
|
2066
|
-
d.rrule(new k(
|
|
2066
|
+
d.rrule(new k(Pe(u, a, l), c));
|
|
2067
2067
|
}), s.forEach(function(u) {
|
|
2068
2068
|
d.rdate(u);
|
|
2069
2069
|
}), r.forEach(function(u) {
|
|
2070
|
-
d.exrule(new k(
|
|
2070
|
+
d.exrule(new k(Pe(u, a, l), c));
|
|
2071
2071
|
}), o.forEach(function(u) {
|
|
2072
2072
|
d.exdate(u);
|
|
2073
2073
|
}), t.compatible && t.dtstart && d.rdate(a), d;
|
|
2074
2074
|
}
|
|
2075
2075
|
var h = i[0] || {};
|
|
2076
|
-
return new k(
|
|
2076
|
+
return new k(Pe(h, h.dtstart || t.dtstart || a, h.tzid || t.tzid || l), c);
|
|
2077
2077
|
}
|
|
2078
2078
|
function Fe(n, t) {
|
|
2079
2079
|
return t === void 0 && (t = {}), Ss(n, Ts(t));
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function Pe(n, t, e) {
|
|
2082
2082
|
return at(at({}, n), { dtstart: t, tzid: e });
|
|
2083
2083
|
}
|
|
2084
2084
|
function Ts(n) {
|
|
@@ -2193,7 +2193,7 @@ var $s = (
|
|
|
2193
2193
|
}).filter(function(s) {
|
|
2194
2194
|
return !/^DTSTART/.test(s);
|
|
2195
2195
|
}));
|
|
2196
|
-
}), this._rdate.length && e.push(
|
|
2196
|
+
}), this._rdate.length && e.push(Hi("RDATE", this._rdate, this.tzid())), this._exdate.length && e.push(Hi("EXDATE", this._exdate, this.tzid())), e;
|
|
2197
2197
|
}, t.prototype.toString = function() {
|
|
2198
2198
|
return this.valueOf().join(`
|
|
2199
2199
|
`);
|
|
@@ -2221,7 +2221,7 @@ function _i(n, t) {
|
|
|
2221
2221
|
throw new TypeError(String(n) + " is not Date instance");
|
|
2222
2222
|
F(t.map(Number), Number(n)) || (t.push(n), de(t));
|
|
2223
2223
|
}
|
|
2224
|
-
function
|
|
2224
|
+
function Hi(n, t, e) {
|
|
2225
2225
|
var i = !e || e.toUpperCase() === "UTC", s = i ? "".concat(n, ":") : "".concat(n, ";TZID=").concat(e, ":"), r = t.map(function(o) {
|
|
2226
2226
|
return Ge(o.valueOf(), i);
|
|
2227
2227
|
}).join(",");
|
|
@@ -2235,7 +2235,7 @@ const As = [
|
|
|
2235
2235
|
{ label: "1 hour before", value: 60 },
|
|
2236
2236
|
{ label: "2 hours before", value: 120 },
|
|
2237
2237
|
{ label: "1 day before", value: 1440 }
|
|
2238
|
-
], Os = 12, _s = 12,
|
|
2238
|
+
], Os = 12, _s = 12, Hs = 96;
|
|
2239
2239
|
class U {
|
|
2240
2240
|
constructor(t) {
|
|
2241
2241
|
this.startDate = /* @__PURE__ */ new Date(), this.endDate = U.addDays(/* @__PURE__ */ new Date(), 182), this.weekStart = 0, this.filter = "", this.calendarEvents = /* @__PURE__ */ new Map(), this.selectedEvents = /* @__PURE__ */ new Set(), this.enabledCalendars = /* @__PURE__ */ new Set(), this.lockedCalendars = /* @__PURE__ */ new Set(), this.sync = (i, s, r) => {
|
|
@@ -2292,7 +2292,7 @@ RRULE:${t.rrule}`, h = Fe(d), u = /* @__PURE__ */ new Date();
|
|
|
2292
2292
|
u.setFullYear(u.getFullYear() - 2);
|
|
2293
2293
|
const f = /* @__PURE__ */ new Date();
|
|
2294
2294
|
return f.setFullYear(f.getFullYear() + 2), h.between(u, f, !0).map((g) => {
|
|
2295
|
-
const
|
|
2295
|
+
const p = t.end.getTime() - t.start.getTime(), y = new Date(g.getTime() + p);
|
|
2296
2296
|
return {
|
|
2297
2297
|
...t,
|
|
2298
2298
|
id: `${t.id}-${g.getTime()}`,
|
|
@@ -2478,7 +2478,7 @@ RRULE:${t.rrule}`, h = Fe(d), u = /* @__PURE__ */ new Date();
|
|
|
2478
2478
|
return Os;
|
|
2479
2479
|
}
|
|
2480
2480
|
getMaxWeeks() {
|
|
2481
|
-
return
|
|
2481
|
+
return Hs;
|
|
2482
2482
|
}
|
|
2483
2483
|
trimRange(t, e) {
|
|
2484
2484
|
t === "past" ? this.startDate = U.addDays(this.startDate, -e * 7) : this.endDate = U.addDays(this.endDate, -e * 7);
|
|
@@ -2528,14 +2528,14 @@ RRULE:${t.rrule}`, h = Fe(d), u = /* @__PURE__ */ new Date();
|
|
|
2528
2528
|
return e.includes(t) || i === "he" || i === "ar" ? 0 : 1;
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
2531
|
-
function
|
|
2531
|
+
function Re(n) {
|
|
2532
2532
|
return [
|
|
2533
2533
|
parseInt(`${n[1]}${n[2]}`, 16),
|
|
2534
2534
|
parseInt(`${n[3]}${n[4]}`, 16),
|
|
2535
2535
|
parseInt(`${n[5]}${n[6]}`, 16)
|
|
2536
2536
|
];
|
|
2537
2537
|
}
|
|
2538
|
-
function
|
|
2538
|
+
function Ps([n, t, e]) {
|
|
2539
2539
|
n /= 255, t /= 255, e /= 255;
|
|
2540
2540
|
let i = Math.min(n, t, e), s = Math.max(n, t, e), r = s - i, o = 0, a = 0, l = 0;
|
|
2541
2541
|
return r === 0 ? o = 0 : s === n ? o = (t - e) / r % 6 : s === t ? o = (e - n) / r + 2 : o = (n - t) / r + 4, o = Math.round(o * 60), o < 0 && (o += 360), l = (s + i) / 2, a = r === 0 ? 0 : r / (1 - Math.abs(2 * l - 1)), a = +(a * 100).toFixed(1), l = +(l * 100).toFixed(1), [o, a, l];
|
|
@@ -2686,18 +2686,18 @@ const ii = {
|
|
|
2686
2686
|
}
|
|
2687
2687
|
}
|
|
2688
2688
|
};
|
|
2689
|
-
function
|
|
2689
|
+
function Rs() {
|
|
2690
2690
|
return window.matchMedia?.("(prefers-color-scheme: dark)")?.matches ? "dark" : "light";
|
|
2691
2691
|
}
|
|
2692
|
-
function
|
|
2693
|
-
return n === "auto" ?
|
|
2692
|
+
function Is(n) {
|
|
2693
|
+
return n === "auto" ? Rs() : n;
|
|
2694
2694
|
}
|
|
2695
2695
|
function Ys(n) {
|
|
2696
2696
|
const t = document.querySelector('meta[name="theme-color"]');
|
|
2697
2697
|
t && t.setAttribute("content", n);
|
|
2698
2698
|
}
|
|
2699
2699
|
function Ns(n, t = document.body) {
|
|
2700
|
-
const e =
|
|
2700
|
+
const e = Is(n), i = ii[e];
|
|
2701
2701
|
if (i) {
|
|
2702
2702
|
for (const [s, r] of Object.entries(i.variables))
|
|
2703
2703
|
t.style.setProperty(s, r);
|
|
@@ -2718,22 +2718,22 @@ const Ws = [
|
|
|
2718
2718
|
label: n.label
|
|
2719
2719
|
}))
|
|
2720
2720
|
];
|
|
2721
|
-
function
|
|
2721
|
+
function Pi(n) {
|
|
2722
2722
|
const t = n.getFullYear(), e = String(n.getMonth() + 1).padStart(2, "0"), i = String(n.getDate()).padStart(2, "0"), s = String(n.getHours()).padStart(2, "0"), r = String(n.getMinutes()).padStart(2, "0"), o = String(n.getSeconds()).padStart(2, "0");
|
|
2723
2723
|
return `${t}${e}${i}T${s}${r}${o}`;
|
|
2724
2724
|
}
|
|
2725
|
-
function
|
|
2725
|
+
function Ri(n) {
|
|
2726
2726
|
const t = n.getFullYear(), e = String(n.getMonth() + 1).padStart(2, "0"), i = String(n.getDate()).padStart(2, "0");
|
|
2727
2727
|
return `${t}${e}${i}`;
|
|
2728
2728
|
}
|
|
2729
|
-
function
|
|
2729
|
+
function Ii(n) {
|
|
2730
2730
|
const t = [
|
|
2731
2731
|
"BEGIN:VCALENDAR",
|
|
2732
2732
|
"VERSION:2.0",
|
|
2733
2733
|
"PRODID:-//Calendar//EN"
|
|
2734
2734
|
];
|
|
2735
2735
|
for (const e of n)
|
|
2736
|
-
t.push("BEGIN:VEVENT"), t.push(`UID:${e.id}`), t.push(`SUMMARY:${e.title}`), e.isAllDay ? (t.push(`DTSTART;VALUE=DATE:${
|
|
2736
|
+
t.push("BEGIN:VEVENT"), t.push(`UID:${e.id}`), t.push(`SUMMARY:${e.title}`), e.isAllDay ? (t.push(`DTSTART;VALUE=DATE:${Ri(e.start)}`), t.push(`DTEND;VALUE=DATE:${Ri(e.end)}`)) : (t.push(`DTSTART:${Pi(e.start)}`), t.push(`DTEND:${Pi(e.end)}`)), e.description && t.push(`DESCRIPTION:${e.description}`), e.location && t.push(`LOCATION:${e.location}`), e.url && t.push(`URL:${e.url}`), t.push("END:VEVENT");
|
|
2737
2737
|
return t.push("END:VCALENDAR"), t.join(`\r
|
|
2738
2738
|
`);
|
|
2739
2739
|
}
|
|
@@ -2861,7 +2861,7 @@ class zs {
|
|
|
2861
2861
|
u.onerror = () => {
|
|
2862
2862
|
r(new Error(`Failed to query events: ${u.error?.message}`));
|
|
2863
2863
|
}, u.onsuccess = () => {
|
|
2864
|
-
const g = u.result.filter((
|
|
2864
|
+
const g = u.result.filter((p) => p.end >= c).map((p) => this.deserializeEvent(p));
|
|
2865
2865
|
s(g);
|
|
2866
2866
|
};
|
|
2867
2867
|
});
|
|
@@ -2877,10 +2877,10 @@ class zs {
|
|
|
2877
2877
|
for (const [c, d] of e.entries()) {
|
|
2878
2878
|
const h = d.toISOString(), u = IDBKeyRange.only(c), f = l.openCursor(u);
|
|
2879
2879
|
f.onsuccess = () => {
|
|
2880
|
-
const
|
|
2881
|
-
if (
|
|
2882
|
-
const g =
|
|
2883
|
-
(!g.lastSynced || g.lastSynced < h) && (console.debug("sync deleted", g.id), a.delete(g.id)),
|
|
2880
|
+
const v = f.result;
|
|
2881
|
+
if (v) {
|
|
2882
|
+
const g = v.value;
|
|
2883
|
+
(!g.lastSynced || g.lastSynced < h) && (console.debug("sync deleted", g.id), a.delete(g.id)), v.continue();
|
|
2884
2884
|
}
|
|
2885
2885
|
}, f.onerror = () => {
|
|
2886
2886
|
r(new Error(`Failed to query calendar events: ${f.error?.message}`));
|
|
@@ -3007,27 +3007,33 @@ class zs {
|
|
|
3007
3007
|
});
|
|
3008
3008
|
}
|
|
3009
3009
|
}
|
|
3010
|
-
const
|
|
3010
|
+
const Nt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
3011
3011
|
constructor() {
|
|
3012
|
-
super(), this._dayHeight =
|
|
3013
|
-
const
|
|
3014
|
-
let
|
|
3015
|
-
(
|
|
3012
|
+
super(), this._dayHeight = Nt, this._scrollTop = 0, this.viewportHeight = 0, this.currentTime = /* @__PURE__ */ new Date(), this.selection = null, this.canvas = null, this.ctx = null, this.overlayCanvas = null, this.overlayCtx = null, this.minimapBufferCanvas = null, this.minimapBufferCtx = null, this.stripePatternCanvas = null, this.scrollContainer = null, this.scrollContent = null, this.resizeObserver = null, this.totalHeight = 0, this.isDraggingZoom = !1, this.zoomDragStartY = 0, this.zoomDragStartHeight = 0, this.zoomOriginY = 0, this.zoomViewportY = 0, this.isPanning = !1, this.panStartX = 0, this.panStartY = 0, this.panStartScrollTop = 0, this.isSelecting = !1, this.selectionStartX = 0, this.selectionStartY = 0, this.potentialSelectionStart = null, this.selectionModifierKey = !1, this.cursorPosition = null, this.animationFrame = null, this.isDraggingMinimap = !1, this.isFiltered = !1, this.timeUpdateInterval = null, this.isExtendingRange = !1, this.isCreatingEvent = !1, this.eventCreationStart = null, this.eventCreationEnd = null, this.eventCreationShiftPressed = !1, this.eventCreationPreviousShiftPressed = !1, this.eventCreationInitialDuration = null, this.movingEvent = null, this.movingEventOrigin = null, this.movingEventEnd = null, this.isDraggingEvent = !1, this.movingEventDuplicateMode = !1, this.movingEventMouseEvent = null, this.isDraggingFile = !1, this.resizingEvent = null, this.resizingEdge = null, this.resizingOriginalStart = null, this.resizingOriginalEnd = null, this.isResizingEvent = !1, this._columnsPerRow = 7, this.historyStack = [], this.historyIndex = 0, this.saveHistoryTimeout = null, this.weeks = [], this.events = [], this.eventRects = [], this.hoveredEventId = null, this.selectedEventForDetail = null, this.selectedEventRect = null, this.isDescriptionExpanded = !1, this.notificationPopoverOpen = !1, this.scheduledNotifications = [], this.updateEventTimeout = null, this.currentUserEmails = /* @__PURE__ */ new Set(), this.currentTheme = Ls(), this.activeCalendarColor = null, this.scrollToToday = (t = !0) => {
|
|
3013
|
+
const e = /* @__PURE__ */ new Date();
|
|
3014
|
+
let i = this.weeks.findIndex(
|
|
3015
|
+
(r) => r.days.some((o) => U.isSameDay(o, e))
|
|
3016
3016
|
);
|
|
3017
|
-
|
|
3018
|
-
(
|
|
3017
|
+
i < 0 && (this.weeks = this.internal.resetRangeAroundDate(e), i = this.weeks.findIndex(
|
|
3018
|
+
(r) => r.days.some((o) => U.isSameDay(o, e))
|
|
3019
3019
|
));
|
|
3020
|
-
let
|
|
3021
|
-
if (
|
|
3022
|
-
const
|
|
3023
|
-
(
|
|
3020
|
+
let s = 0.5;
|
|
3021
|
+
if (i >= 0) {
|
|
3022
|
+
const o = this.weeks[i].days.findIndex(
|
|
3023
|
+
(a) => U.isSameDay(a, e)
|
|
3024
3024
|
);
|
|
3025
|
-
if (
|
|
3026
|
-
const
|
|
3027
|
-
|
|
3025
|
+
if (o >= 0) {
|
|
3026
|
+
const a = Math.floor(o / this._columnsPerRow), l = (e.getHours() + e.getMinutes() / 60) / 24;
|
|
3027
|
+
s = (a + l) / this.rowsPerWeek;
|
|
3028
3028
|
}
|
|
3029
3029
|
}
|
|
3030
|
-
this.scrollToDate(
|
|
3030
|
+
this.scrollToDate(e, s, t, !0, 900);
|
|
3031
|
+
}, this.scrollToMonth = (t = !0) => {
|
|
3032
|
+
const e = /* @__PURE__ */ new Date(), i = new Date(e.getFullYear(), e.getMonth(), 15), s = Math.max(
|
|
3033
|
+
Nt,
|
|
3034
|
+
Math.round(this.viewportHeight / 5)
|
|
3035
|
+
);
|
|
3036
|
+
this.scrollToDate(i, 0.5, t, !0, s);
|
|
3031
3037
|
}, this.goBack = () => {
|
|
3032
3038
|
this.saveHistoryTimeout && (clearTimeout(this.saveHistoryTimeout), this.saveHistoryTimeout = null), this.historyIndex++;
|
|
3033
3039
|
const t = this.historyStack[this.historyIndex];
|
|
@@ -3041,6 +3047,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3041
3047
|
}, this.onScrollContainerMouseLeave = () => {
|
|
3042
3048
|
this.cursorPosition = null, this.requestUpdate();
|
|
3043
3049
|
}, this.onWheel = (t) => {
|
|
3050
|
+
if (this.hasAttribute("scroll-lock")) return;
|
|
3044
3051
|
this.scrollAnimationFrame && this.cancelScrollAnimation();
|
|
3045
3052
|
const i = navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? t.metaKey : t.ctrlKey;
|
|
3046
3053
|
if (this.isFiltered && this.historyIndex === 0 ? this.replaceFilterInHistory() : this.debouncedSaveToHistory(), !i || !this.scrollContainer) {
|
|
@@ -3049,7 +3056,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3049
3056
|
}
|
|
3050
3057
|
t.preventDefault();
|
|
3051
3058
|
const s = t.deltaY * (this.dayHeight / 100), r = Math.max(
|
|
3052
|
-
|
|
3059
|
+
Nt,
|
|
3053
3060
|
Math.min(me, this.dayHeight - s)
|
|
3054
3061
|
), o = this.dayHeight, a = r / o, l = this.zoomOriginY * a, c = l - this.zoomViewportY;
|
|
3055
3062
|
this.setView(r, c), this.zoomOriginY = l;
|
|
@@ -3061,7 +3068,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3061
3068
|
}, this.onDragStart = (t) => {
|
|
3062
3069
|
if (!this.movingEvent || !t.dataTransfer) return;
|
|
3063
3070
|
this.isDraggingOut = !0, this.isDraggingEvent = !0;
|
|
3064
|
-
const e = this.movingEvent, i =
|
|
3071
|
+
const e = this.movingEvent, i = Ii([e]);
|
|
3065
3072
|
t.dataTransfer.setData("application/x-calendar-event", e.id), t.dataTransfer.setData("text/plain", i), t.dataTransfer.effectAllowed = "copyMove";
|
|
3066
3073
|
try {
|
|
3067
3074
|
const o = `${e.title.replace(/[^a-z0-9]/gi, "_")}.ics`, a = new File([i], o, { type: "text/calendar" });
|
|
@@ -3092,7 +3099,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3092
3099
|
let e = 0;
|
|
3093
3100
|
this.lastPointerY && (e = t.clientY - this.lastPointerY);
|
|
3094
3101
|
const i = e * (this.dayHeight / 100), s = Math.max(
|
|
3095
|
-
|
|
3102
|
+
Nt,
|
|
3096
3103
|
Math.min(me, this.dayHeight - i)
|
|
3097
3104
|
), r = this.dayHeight, o = s / r, a = this.zoomOriginY * o, l = a - this.zoomViewportY;
|
|
3098
3105
|
this.setView(s, l, !1), this.zoomOriginY = a, this.isFiltered && this.historyIndex === 0 ? this.replaceFilterInHistory() : this.debouncedSaveToHistory();
|
|
@@ -3249,8 +3256,8 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3249
3256
|
), l = this.convertPositionToDateTime(r, o);
|
|
3250
3257
|
if (a && l) {
|
|
3251
3258
|
const c = l.getTime() - a.getTime(), d = (f) => {
|
|
3252
|
-
const
|
|
3253
|
-
return f.setMinutes(Math.floor(
|
|
3259
|
+
const v = f.getMinutes();
|
|
3260
|
+
return f.setMinutes(Math.floor(v / 15) * 15, 0, 0), f;
|
|
3254
3261
|
}, h = d(
|
|
3255
3262
|
new Date(this.movingEvent.start.getTime() + c)
|
|
3256
3263
|
), u = d(
|
|
@@ -3327,12 +3334,14 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3327
3334
|
})
|
|
3328
3335
|
), this.renderCanvas(), this.requestUpdate(), t.altKey ? (this.eventCreationStart = { x: i, y: s }, this.eventCreationInitialDuration = 3600 * 1e3) : t.metaKey || t.ctrlKey ? this.potentialSelectionStart = { x: i, y: s } : (this.eventCreationStart = { x: i, y: s }, this.eventCreationInitialDuration = 3600 * 1e3);
|
|
3329
3336
|
}, this.onScroll = () => {
|
|
3330
|
-
this.scrollContainer && (this._scrollTop = this.scrollContainer.scrollTop, this.renderCanvas(), this.checkAndExtendRange(), this.saveScrollPosition(), this.isFiltered && this.historyIndex === 0 && this.replaceFilterInHistory());
|
|
3337
|
+
this.scrollContainer && (this._scrollTop = this.scrollContainer.scrollTop, this.renderCanvas(), this.repositionEventDetailOverlay(), this.checkAndExtendRange(), this.saveScrollPosition(), this.isFiltered && this.historyIndex === 0 && this.replaceFilterInHistory());
|
|
3331
3338
|
}, this.onFilterInput = (t) => {
|
|
3332
3339
|
const e = t.target;
|
|
3333
3340
|
this.internal.setFilter(e.value);
|
|
3334
3341
|
}, this.onNotificationPopoverToggle = async () => {
|
|
3335
|
-
this.notificationPopoverOpen = !this.notificationPopoverOpen, this.notificationPopoverOpen && this.dispatchEvent(
|
|
3342
|
+
this.notificationPopoverOpen = !this.notificationPopoverOpen, this.notificationPopoverOpen && this.dispatchEvent(
|
|
3343
|
+
new CustomEvent("load-notifications", { bubbles: !0 })
|
|
3344
|
+
), this.requestUpdate();
|
|
3336
3345
|
}, this.setScheduledNotifications = (t) => {
|
|
3337
3346
|
this.scheduledNotifications = t, this.requestUpdate();
|
|
3338
3347
|
}, this.onThemeChange = (t) => {
|
|
@@ -3350,7 +3359,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3350
3359
|
locale: this.getAttribute("locale") || void 0,
|
|
3351
3360
|
weekStart: Number(this.getAttribute("week-start")),
|
|
3352
3361
|
storage: new zs()
|
|
3353
|
-
});
|
|
3362
|
+
}), this.addEventListener("wheel", this.onWheel, { passive: !1 }), this.addEventListener("dragstart", this.onDragStart), this.addEventListener("dragend", this.onDragEnd), this.addEventListener("dragover", this.onDragOver), this.addEventListener("dragleave", this.onDragLeave), this.addEventListener("drop", this.onDrop);
|
|
3354
3363
|
}
|
|
3355
3364
|
set dayHeight(t) {
|
|
3356
3365
|
this._dayHeight = t, this.saveDayHeight(), this.updateWeekOffsets(), this.renderCanvas();
|
|
@@ -3364,8 +3373,23 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3364
3373
|
get scrollTop() {
|
|
3365
3374
|
return this._scrollTop;
|
|
3366
3375
|
}
|
|
3367
|
-
setView(t, e, i = !0) {
|
|
3368
|
-
|
|
3376
|
+
setView(t, e, i = !0, s = !1) {
|
|
3377
|
+
if (this.cancelScrollAnimation(), s) {
|
|
3378
|
+
const r = this._dayHeight, o = this._scrollTop, a = this.totalHeight;
|
|
3379
|
+
this._dayHeight = t, this.updateWeekOffsets();
|
|
3380
|
+
const l = this.totalHeight;
|
|
3381
|
+
this._dayHeight = r, this.updateWeekOffsets();
|
|
3382
|
+
const c = a > 0 ? o / a : 0, d = l > 0 ? e / l : 0, h = 600, u = performance.now(), f = (p) => p === 1 ? 1 : 1 - 2 ** (-10 * p), v = (p) => 1 - (1 - p) ** 3, g = (p) => {
|
|
3383
|
+
if (!this.scrollAnimationFrame) return;
|
|
3384
|
+
const y = Math.min((p - u) / h, 1);
|
|
3385
|
+
this._dayHeight = r + (t - r) * f(y), this.updateWeekOffsets();
|
|
3386
|
+
const C = c + (d - c) * v(y);
|
|
3387
|
+
this._scrollTop = Math.max(0, C * this.totalHeight), this.scrollContainer && (this.scrollContent && this.scrollContainer.scrollHeight < this._scrollTop && (this.scrollContent.style.minHeight = this._scrollTop + window.innerHeight + "px"), this.scrollContainer.scrollTop = this._scrollTop), this.renderCanvas(), y < 1 ? this.scrollAnimationFrame = requestAnimationFrame(g) : (this._dayHeight = t, this._scrollTop = e, this.saveDayHeight(), this.saveScrollPosition(), this.scrollAnimationFrame = null, this.renderCanvas());
|
|
3388
|
+
};
|
|
3389
|
+
this.scrollAnimationFrame = requestAnimationFrame(g);
|
|
3390
|
+
return;
|
|
3391
|
+
}
|
|
3392
|
+
this._dayHeight = t, this._scrollTop = e, this.saveDayHeight(), this.updateWeekOffsets(), i && this.scrollContainer && this.scrollContent && (this.scrollContainer.scrollHeight < e && (this.scrollContent.style.minHeight = `${e + window.innerHeight}px`), this.scrollContainer.scrollTop = e), this.saveScrollPosition(), this.renderCanvas();
|
|
3369
3393
|
}
|
|
3370
3394
|
set columnsPerRow(t) {
|
|
3371
3395
|
const e = Math.max(1, Math.min(7, Math.floor(t)));
|
|
@@ -3403,9 +3427,9 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3403
3427
|
loadDayHeight() {
|
|
3404
3428
|
const t = localStorage.getItem("calendar-dayHeight");
|
|
3405
3429
|
return t ? Math.max(
|
|
3406
|
-
|
|
3430
|
+
Nt,
|
|
3407
3431
|
Math.min(me, parseFloat(t))
|
|
3408
|
-
) :
|
|
3432
|
+
) : Nt;
|
|
3409
3433
|
}
|
|
3410
3434
|
saveDayHeight() {
|
|
3411
3435
|
localStorage.setItem("calendar-dayHeight", this.dayHeight.toString());
|
|
@@ -3449,29 +3473,24 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3449
3473
|
this.saveToHistory();
|
|
3450
3474
|
}, 1e3));
|
|
3451
3475
|
}
|
|
3452
|
-
scrollToDate(t, e = 0.5, i = !1, s = !1) {
|
|
3453
|
-
|
|
3454
|
-
|
|
3476
|
+
scrollToDate(t, e = 0.5, i = !1, s = !1, r) {
|
|
3477
|
+
const o = r ?? this._dayHeight;
|
|
3478
|
+
let a = this.weeks.findIndex(
|
|
3479
|
+
(l) => l.days.some((c) => U.isSameDay(c, t)) || l.days[0] && l.days[6] && l.days[0] <= t && t <= l.days[6]
|
|
3455
3480
|
);
|
|
3456
|
-
if (
|
|
3457
|
-
(
|
|
3458
|
-
)),
|
|
3459
|
-
const
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3481
|
+
if (a < 0 && s && (this.weeks = this.internal.resetRangeAroundDate(t), a = this.weeks.findIndex(
|
|
3482
|
+
(l) => l.days.some((c) => U.isSameDay(c, t)) || l.days[0] && l.days[6] && l.days[0] <= t && t <= l.days[6]
|
|
3483
|
+
)), a >= 0) {
|
|
3484
|
+
const l = this._dayHeight;
|
|
3485
|
+
this._dayHeight = o, this.updateWeekOffsets();
|
|
3486
|
+
const c = this.weeks[a];
|
|
3487
|
+
if (c) {
|
|
3488
|
+
const d = c.yOffset + c.height * e, h = Math.max(0, d - this.viewportHeight / 2);
|
|
3489
|
+
this._dayHeight = l, i && this.updateWeekOffsets(), this.setView(o, h, !0, i);
|
|
3490
|
+
} else
|
|
3491
|
+
this._dayHeight = l, this.updateWeekOffsets();
|
|
3464
3492
|
}
|
|
3465
3493
|
}
|
|
3466
|
-
animateScrollTo(t) {
|
|
3467
|
-
if (this.cancelScrollAnimation(), !this.scrollContainer) return;
|
|
3468
|
-
const e = this.scrollTop, i = t - e, s = 800, r = performance.now(), o = (l) => l === 1 ? 1 : 1 - 2 ** (-10 * l), a = (l) => {
|
|
3469
|
-
if (!this.scrollAnimationFrame) return;
|
|
3470
|
-
const c = l - r, d = Math.min(c / s, 1), h = o(d);
|
|
3471
|
-
this.scrollTop = e + i * h, d < 1 ? this.scrollAnimationFrame = requestAnimationFrame(a) : this.scrollAnimationFrame = null;
|
|
3472
|
-
};
|
|
3473
|
-
this.scrollAnimationFrame = requestAnimationFrame(a);
|
|
3474
|
-
}
|
|
3475
3494
|
// Push current state when entering filter mode
|
|
3476
3495
|
pushFilterToHistory() {
|
|
3477
3496
|
this.saveHistoryTimeout && (clearTimeout(this.saveHistoryTimeout), this.saveHistoryTimeout = null), this.historyIndex > 0 && (this.historyStack = this.historyStack.slice(this.historyIndex), this.historyIndex = 0);
|
|
@@ -3493,21 +3512,30 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3493
3512
|
}
|
|
3494
3513
|
}
|
|
3495
3514
|
connectedCallback() {
|
|
3496
|
-
super.connectedCallback(), window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), window.addEventListener("
|
|
3515
|
+
super.connectedCallback(), window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), window.addEventListener("paste", this.onPaste);
|
|
3497
3516
|
}
|
|
3498
3517
|
disconnectedCallback() {
|
|
3499
|
-
super.disconnectedCallback(),
|
|
3518
|
+
super.disconnectedCallback(), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("paste", this.onPaste), this.scrollContainer && this.scrollContainer.removeEventListener(
|
|
3500
3519
|
"mouseleave",
|
|
3501
3520
|
this.onScrollContainerMouseLeave
|
|
3502
3521
|
), this.resizeObserver && this.resizeObserver.disconnect(), this.animationFrame && cancelAnimationFrame(this.animationFrame), this.timeUpdateInterval && clearInterval(this.timeUpdateInterval);
|
|
3503
3522
|
}
|
|
3504
3523
|
updated() {
|
|
3505
|
-
this.handleResize();
|
|
3524
|
+
this.handleResize(), this.repositionEventDetailOverlay();
|
|
3525
|
+
}
|
|
3526
|
+
repositionEventDetailOverlay() {
|
|
3527
|
+
if (!this.selectedEventForDetail || !this.selectedEventRect) return;
|
|
3528
|
+
const t = this.renderRoot.querySelector(".event-detail-overlay");
|
|
3529
|
+
if (!t) return;
|
|
3530
|
+
const e = t.offsetHeight, i = 8, s = this.scrollContainer?.clientHeight || 600, r = this.selectedEventRect.y - this.scrollTop, o = i, a = s - e - i, l = Math.max(o, Math.min(a, r));
|
|
3531
|
+
t.style.top = `${l}px`;
|
|
3506
3532
|
}
|
|
3507
3533
|
async firstUpdated() {
|
|
3508
3534
|
this.canvas = this.renderRoot.querySelector(".canvas-layer canvas"), this.overlayCanvas = this.renderRoot.querySelector(".overlay-canvas"), this.scrollContainer = this.renderRoot.querySelector(".scroll-container"), this.scrollContent = this.renderRoot.querySelector(".scroll-content"), this.ctx = this.canvas?.getContext("2d") ?? null, this.overlayCtx = this.overlayCanvas?.getContext("2d") ?? null, this.minimapBufferCanvas = document.createElement("canvas"), this.minimapBufferCtx = this.minimapBufferCanvas.getContext("2d"), this.weeks = this.internal.generateWeeks();
|
|
3509
3535
|
const t = this.loadDayHeight();
|
|
3510
|
-
t !== 80 && (this.dayHeight = t), this.scrollContainer && (this.scrollContainer.addEventListener("scroll", this.onScroll
|
|
3536
|
+
t !== 80 && (this.dayHeight = t), this.scrollContainer && (this.scrollContainer.addEventListener("scroll", this.onScroll, {
|
|
3537
|
+
passive: !1
|
|
3538
|
+
}), this.scrollContainer.addEventListener(
|
|
3511
3539
|
"mouseleave",
|
|
3512
3540
|
this.onScrollContainerMouseLeave
|
|
3513
3541
|
)), this.handleResize(), this.resizeObserver = new ResizeObserver(() => {
|
|
@@ -3557,7 +3585,10 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3557
3585
|
}
|
|
3558
3586
|
updateColumnsForViewport() {
|
|
3559
3587
|
if (!this.scrollContainer) return;
|
|
3560
|
-
const e = this.scrollContainer.getBoundingClientRect().width - z, s = Math.max(
|
|
3588
|
+
const e = this.scrollContainer.getBoundingClientRect().width - z, s = Math.max(
|
|
3589
|
+
1,
|
|
3590
|
+
Math.min(7, Math.floor(e / 120))
|
|
3591
|
+
);
|
|
3561
3592
|
this._columnsPerRow !== s && (this._columnsPerRow = s, this.updateWeekOffsets());
|
|
3562
3593
|
}
|
|
3563
3594
|
renderCanvas() {
|
|
@@ -3572,12 +3603,12 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3572
3603
|
(f) => U.isSameDay(f, l)
|
|
3573
3604
|
);
|
|
3574
3605
|
if (u >= 0) {
|
|
3575
|
-
const { row: f, col:
|
|
3576
|
-
if (t.fillStyle = y, t.fillRect(g,
|
|
3577
|
-
const
|
|
3578
|
-
if (
|
|
3606
|
+
const { row: f, col: v } = this.getDayVisualPosition(u), g = z + v * a, p = h.yOffset + f * this.dayHeight - r, y = getComputedStyle(this).getPropertyValue("--bg-today").trim() || "rgba(255, 255, 255, 0.05)";
|
|
3607
|
+
if (t.fillStyle = y, t.fillRect(g, p, a, this.dayHeight), d) {
|
|
3608
|
+
const C = /* @__PURE__ */ new Date(), H = C.getHours() * 60 + C.getMinutes(), M = p + H / 1440 * this.dayHeight;
|
|
3609
|
+
if (M >= 0 && M <= i) {
|
|
3579
3610
|
const x = getComputedStyle(this).getPropertyValue("--accent-current-time").trim() || "rgba(255, 0, 0, 0.8)";
|
|
3580
|
-
t.strokeStyle = x, t.lineWidth = 1, t.beginPath(), t.moveTo(g,
|
|
3611
|
+
t.strokeStyle = x, t.lineWidth = 1, t.beginPath(), t.moveTo(g, M), t.lineTo(g + a, M), t.stroke(), t.lineWidth = 1;
|
|
3581
3612
|
}
|
|
3582
3613
|
}
|
|
3583
3614
|
}
|
|
@@ -3594,14 +3625,14 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3594
3625
|
if (this.filter && h > 0) {
|
|
3595
3626
|
const w = c[h - 1];
|
|
3596
3627
|
if (!w) continue;
|
|
3597
|
-
const S = this.weeks.indexOf(w),
|
|
3598
|
-
if (
|
|
3628
|
+
const S = this.weeks.indexOf(w), A = this.weeks.indexOf(u) - S - 1;
|
|
3629
|
+
if (A > 0) {
|
|
3599
3630
|
const b = f, E = getComputedStyle(this).getPropertyValue("--grid-color-strong").trim() || "rgba(255, 255, 255, 0.3)";
|
|
3600
3631
|
t.strokeStyle = E, t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(z, b), t.lineTo(e, b), t.stroke(), t.setLineDash([]);
|
|
3601
3632
|
const T = getComputedStyle(this).getPropertyValue("--text-muted").trim() || "rgba(255, 255, 255, 0.4)";
|
|
3602
3633
|
t.fillStyle = T, t.textAlign = "center";
|
|
3603
|
-
const D = `⋯ ${
|
|
3604
|
-
t.fillStyle = K, t.beginPath(), t.roundRect(
|
|
3634
|
+
const D = `⋯ ${A} week${A > 1 ? "s" : ""}`, N = t.measureText(D).width, L = 8, P = (z + e) / 2 - N / 2 - L, B = b - 8, R = N + L * 2, W = 16, K = getComputedStyle(this).getPropertyValue("--bg-primary").trim() || "rgba(30, 30, 30, 0.9)";
|
|
3635
|
+
t.fillStyle = K, t.beginPath(), t.roundRect(P, B, R, W, 8), t.fill(), t.fillStyle = T, t.fillText(D, (z + e) / 2, b + 4);
|
|
3605
3636
|
}
|
|
3606
3637
|
}
|
|
3607
3638
|
t.strokeStyle = getComputedStyle(this).getPropertyValue("--grid-color").trim() || "rgba(255, 255, 255, 0.1)", t.beginPath(), t.moveTo(z, f), t.lineTo(e, f), t.stroke();
|
|
@@ -3609,105 +3640,105 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3609
3640
|
const S = f + w * this.dayHeight;
|
|
3610
3641
|
S >= 0 && S <= i && (t.beginPath(), t.moveTo(z, S), t.lineTo(e, S), t.stroke());
|
|
3611
3642
|
}
|
|
3612
|
-
const
|
|
3643
|
+
const v = Math.max(
|
|
3613
3644
|
0,
|
|
3614
3645
|
Math.min(1, (this.dayHeight - 300) / 300)
|
|
3615
3646
|
);
|
|
3616
3647
|
t.font = `500 11px ${s}`, t.textBaseline = "bottom", t.textAlign = "right";
|
|
3617
|
-
const g = getComputedStyle(this).getPropertyValue("--grid-color").trim() || "rgba(255, 255, 255, 0.1)",
|
|
3648
|
+
const g = getComputedStyle(this).getPropertyValue("--grid-color").trim() || "rgba(255, 255, 255, 0.1)", p = getComputedStyle(this).getPropertyValue("--text-muted").trim() || "rgba(255, 255, 255, 0.4)";
|
|
3618
3649
|
t.strokeStyle = g.replace(
|
|
3619
3650
|
/[\d.]+\)$/,
|
|
3620
|
-
`${0.05 *
|
|
3621
|
-
), t.fillStyle =
|
|
3651
|
+
`${0.05 * v})`
|
|
3652
|
+
), t.fillStyle = p.replace(
|
|
3622
3653
|
/[\d.]+\)$/,
|
|
3623
|
-
`${0.4 *
|
|
3654
|
+
`${0.4 * v})`
|
|
3624
3655
|
);
|
|
3625
3656
|
for (let w = 0; w < this.rowsPerWeek; w++) {
|
|
3626
3657
|
const S = f + w * this.dayHeight;
|
|
3627
3658
|
for (let O = 0; O < 24; O++) {
|
|
3628
|
-
const
|
|
3629
|
-
if (
|
|
3659
|
+
const A = S + O / 24 * this.dayHeight;
|
|
3660
|
+
if (A >= 0 && A <= i && (t.beginPath(), t.moveTo(z, A), t.lineTo(e, A), t.stroke(), v > 0.1)) {
|
|
3630
3661
|
const b = `${O.toString().padStart(2, "0")}:00`;
|
|
3631
|
-
t.fillText(b, 48,
|
|
3662
|
+
t.fillText(b, 48, A + 4);
|
|
3632
3663
|
}
|
|
3633
3664
|
}
|
|
3634
3665
|
}
|
|
3635
|
-
if (
|
|
3666
|
+
if (v > 0.1) {
|
|
3636
3667
|
const w = /* @__PURE__ */ new Date(), S = u.days.findIndex(
|
|
3637
3668
|
(O) => U.isSameDay(O, w)
|
|
3638
3669
|
);
|
|
3639
3670
|
if (S >= 0) {
|
|
3640
|
-
const { row: O } = this.getDayVisualPosition(S),
|
|
3671
|
+
const { row: O } = this.getDayVisualPosition(S), A = w.getHours() * 60 + w.getMinutes(), b = f + O * this.dayHeight + A / 1440 * this.dayHeight;
|
|
3641
3672
|
if (b >= 0 && b <= i) {
|
|
3642
3673
|
const E = w.getHours().toString().padStart(2, "0"), T = w.getMinutes().toString().padStart(2, "0"), D = `${E}:${T}`;
|
|
3643
3674
|
t.save(), t.textAlign = "right", t.textBaseline = "middle";
|
|
3644
|
-
const N = t.measureText(D).width, L = 6,
|
|
3645
|
-
t.fillStyle =
|
|
3646
|
-
|
|
3675
|
+
const N = t.measureText(D).width, L = 6, P = 48, B = b, R = getComputedStyle(this).getPropertyValue("--bg-elevated").trim() || "rgba(0, 0, 0, 0.7)";
|
|
3676
|
+
t.fillStyle = R, t.beginPath(), t.roundRect(
|
|
3677
|
+
P - N - L,
|
|
3647
3678
|
B - 8,
|
|
3648
3679
|
N + L * 2,
|
|
3649
3680
|
16,
|
|
3650
3681
|
4
|
|
3651
|
-
), t.fill(), t.fillStyle = "
|
|
3682
|
+
), t.fill(), t.fillStyle = getComputedStyle(this).getPropertyValue("--text-primary").trim() || "rgba(255, 255, 255, 1)", t.fillText(D, P, B), t.restore();
|
|
3652
3683
|
}
|
|
3653
3684
|
}
|
|
3654
3685
|
}
|
|
3655
3686
|
const y = Math.max(
|
|
3656
3687
|
0,
|
|
3657
3688
|
Math.min(1, 1 - (this.dayHeight - 300) / 50)
|
|
3658
|
-
),
|
|
3659
|
-
t.fillStyle =
|
|
3689
|
+
), C = getComputedStyle(this).getPropertyValue("--text-muted").trim() || "rgba(255, 255, 255, 0.4)";
|
|
3690
|
+
t.fillStyle = C.replace(
|
|
3660
3691
|
/[\d.]+\)$/,
|
|
3661
3692
|
`${0.4 * y})`
|
|
3662
3693
|
), t.textAlign = "center";
|
|
3663
|
-
const
|
|
3694
|
+
const H = `W${u.weekNumber}`, M = f, x = f + u.height, $ = Math.max(
|
|
3664
3695
|
14,
|
|
3665
|
-
Math.min(
|
|
3696
|
+
Math.min(M + u.height / 2 + 4, x - 4)
|
|
3666
3697
|
);
|
|
3667
|
-
|
|
3698
|
+
$ >= Math.max(0, M + 4) && $ <= Math.min(i, x) && y > 0.1 && t.fillText(H, 30, $);
|
|
3668
3699
|
}
|
|
3669
3700
|
this.renderEventsOnCanvas(t, r, i, a, c), this.renderDateLabels(), this.renderWeekdayLabels(t, a, c, r, i), this.isCreatingEvent && this.renderEventCreationPreview(), this.isDraggingEvent && this.renderEventMovePreview(), this.renderMinimap();
|
|
3670
3701
|
}
|
|
3671
3702
|
renderEventsOnCanvas(t, e, i, s, r) {
|
|
3672
3703
|
const o = this.events, a = getComputedStyle(this).fontFamily, l = e + i, c = this.dayHeight >= 300;
|
|
3673
3704
|
if (this.eventRects = [], r.length === 0) return;
|
|
3674
|
-
const d = r[0], h = r[r.length - 1], u = d.days[0], f = h.days[6],
|
|
3705
|
+
const d = r[0], h = r[r.length - 1], u = d.days[0], f = h.days[6], v = u.getTime(), g = f.getTime() + 864e5 - 1, p = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), C = [], H = [], M = [];
|
|
3675
3706
|
for (const b of o) {
|
|
3676
3707
|
const E = b.start.getTime(), T = b.end.getTime();
|
|
3677
|
-
if (T <
|
|
3708
|
+
if (T < v || E > g)
|
|
3678
3709
|
continue;
|
|
3679
3710
|
const D = [];
|
|
3680
|
-
for (const
|
|
3681
|
-
const B =
|
|
3682
|
-
if (!B || !
|
|
3683
|
-
const W = B.getTime(), K =
|
|
3711
|
+
for (const P of r) {
|
|
3712
|
+
const B = P.days[0], R = P.days[6];
|
|
3713
|
+
if (!B || !R) continue;
|
|
3714
|
+
const W = B.getTime(), K = R.getTime() + 86399999;
|
|
3684
3715
|
if (T >= W && E <= K) {
|
|
3685
|
-
const J = this.weeks.indexOf(
|
|
3686
|
-
D.push({ weekIndex: J, week:
|
|
3716
|
+
const J = this.weeks.indexOf(P);
|
|
3717
|
+
D.push({ weekIndex: J, week: P });
|
|
3687
3718
|
}
|
|
3688
3719
|
}
|
|
3689
3720
|
const N = D.length, L = b.isAllDay === !0;
|
|
3690
|
-
for (let
|
|
3691
|
-
const { weekIndex: B, week:
|
|
3721
|
+
for (let P = 0; P < D.length; P++) {
|
|
3722
|
+
const { weekIndex: B, week: R } = D[P], W = P === 0, K = P === D.length - 1;
|
|
3692
3723
|
let J = 0, wt = 6;
|
|
3693
|
-
if (W && (J = Ui(
|
|
3724
|
+
if (W && (J = Ui(R, b.start)), K) {
|
|
3694
3725
|
const ut = L ? new Date(b.end.getTime() - 1) : b.end;
|
|
3695
|
-
wt = Ui(
|
|
3726
|
+
wt = Ui(R, ut);
|
|
3696
3727
|
}
|
|
3697
3728
|
const rt = {
|
|
3698
3729
|
event: b,
|
|
3699
3730
|
weekIndex: B,
|
|
3700
|
-
week:
|
|
3731
|
+
week: R,
|
|
3701
3732
|
startDayIndex: J,
|
|
3702
3733
|
endDayIndex: wt,
|
|
3703
3734
|
isStart: W,
|
|
3704
3735
|
isEnd: K,
|
|
3705
3736
|
totalWeeks: N
|
|
3706
3737
|
};
|
|
3707
|
-
L ?
|
|
3738
|
+
L ? H.push(rt) : M.push(rt);
|
|
3708
3739
|
}
|
|
3709
3740
|
}
|
|
3710
|
-
const x = c ?
|
|
3741
|
+
const x = c ? M.flatMap((b) => {
|
|
3711
3742
|
if (b.startDayIndex === b.endDayIndex) return [b];
|
|
3712
3743
|
const E = [];
|
|
3713
3744
|
for (let T = b.startDayIndex; T <= b.endDayIndex; T++)
|
|
@@ -3720,21 +3751,21 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3720
3751
|
totalWeeks: 1
|
|
3721
3752
|
});
|
|
3722
3753
|
return E;
|
|
3723
|
-
}) :
|
|
3724
|
-
|
|
3725
|
-
const
|
|
3726
|
-
for (const b of
|
|
3754
|
+
}) : M;
|
|
3755
|
+
C.push(...H, ...x);
|
|
3756
|
+
const $ = /* @__PURE__ */ new Map();
|
|
3757
|
+
for (const b of C) {
|
|
3727
3758
|
const E = b.event.isAllDay === !0;
|
|
3728
3759
|
if (c && !E)
|
|
3729
3760
|
for (let T = b.startDayIndex; T <= b.endDayIndex; T++) {
|
|
3730
3761
|
const D = `${b.weekIndex}-${T}`;
|
|
3731
|
-
|
|
3762
|
+
$.has(D) || $.set(D, []), $.get(D).push(b);
|
|
3732
3763
|
}
|
|
3733
3764
|
}
|
|
3734
3765
|
const w = /* @__PURE__ */ new Map();
|
|
3735
|
-
for (const [b, E] of
|
|
3736
|
-
const [T, D] = b.split("-"), N = parseInt(D), L = parseInt(T),
|
|
3737
|
-
for (const
|
|
3766
|
+
for (const [b, E] of $) {
|
|
3767
|
+
const [T, D] = b.split("-"), N = parseInt(D), L = parseInt(T), P = [];
|
|
3768
|
+
for (const R of E) {
|
|
3738
3769
|
const W = this.weeks[L];
|
|
3739
3770
|
if (!W) continue;
|
|
3740
3771
|
const K = new Date(W.days[N]).setHours(
|
|
@@ -3747,37 +3778,37 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3747
3778
|
59,
|
|
3748
3779
|
59,
|
|
3749
3780
|
999
|
|
3750
|
-
), wt =
|
|
3751
|
-
|
|
3781
|
+
), wt = R.event.start.getTime(), rt = R.event.end.getTime() - 6e4, ut = Math.max(wt, K), Q = Math.min(rt, J), X = new Date(ut), Tt = new Date(Q), Qt = X.getHours() * 60 + X.getMinutes(), kt = Tt.getHours() * 60 + Tt.getMinutes();
|
|
3782
|
+
P.push({ segment: R, startMinutes: Qt, endMinutes: kt });
|
|
3752
3783
|
}
|
|
3753
|
-
|
|
3784
|
+
P.sort((R, W) => R.startMinutes !== W.startMinutes ? R.startMinutes - W.startMinutes : W.endMinutes - W.startMinutes - (R.endMinutes - R.startMinutes));
|
|
3754
3785
|
const B = [];
|
|
3755
|
-
for (const
|
|
3786
|
+
for (const R of P) {
|
|
3756
3787
|
let W = 0;
|
|
3757
|
-
for (; W < B.length && !(B[W].endMinutes <=
|
|
3788
|
+
for (; W < B.length && !(B[W].endMinutes <= R.startMinutes); W++)
|
|
3758
3789
|
;
|
|
3759
|
-
W === B.length ? B.push({ endMinutes:
|
|
3760
|
-
const K = `${
|
|
3790
|
+
W === B.length ? B.push({ endMinutes: R.endMinutes }) : B[W].endMinutes = R.endMinutes;
|
|
3791
|
+
const K = `${R.segment.weekIndex}-${R.segment.event.id}-${N}`;
|
|
3761
3792
|
w.set(K, {
|
|
3762
3793
|
column: W,
|
|
3763
3794
|
totalColumns: B.length
|
|
3764
3795
|
});
|
|
3765
3796
|
}
|
|
3766
|
-
for (const
|
|
3767
|
-
const W = `${
|
|
3797
|
+
for (const R of P) {
|
|
3798
|
+
const W = `${R.segment.weekIndex}-${R.segment.event.id}-${N}`, K = w.get(W);
|
|
3768
3799
|
K && (K.totalColumns = B.length);
|
|
3769
3800
|
}
|
|
3770
3801
|
}
|
|
3771
|
-
for (const b of
|
|
3802
|
+
for (const b of C) {
|
|
3772
3803
|
const {
|
|
3773
3804
|
event: E,
|
|
3774
3805
|
week: T,
|
|
3775
3806
|
weekIndex: D,
|
|
3776
3807
|
startDayIndex: N,
|
|
3777
3808
|
endDayIndex: L,
|
|
3778
|
-
isStart:
|
|
3809
|
+
isStart: P,
|
|
3779
3810
|
isEnd: B,
|
|
3780
|
-
totalWeeks:
|
|
3811
|
+
totalWeeks: R
|
|
3781
3812
|
} = b, W = T.yOffset, K = E.isAllDay === !0, J = this.getDayVisualPosition(N), wt = this.getDayVisualPosition(L);
|
|
3782
3813
|
J.row, wt.row;
|
|
3783
3814
|
let rt, ut;
|
|
@@ -3792,8 +3823,8 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3792
3823
|
59,
|
|
3793
3824
|
59,
|
|
3794
3825
|
999
|
|
3795
|
-
), Et = E.start.getTime(), gt = E.end.getTime() - 6e4, st = Math.max(Et, nt), j = Math.min(gt, q), pt = new Date(st), vt = new Date(j),
|
|
3796
|
-
rt = $t +
|
|
3826
|
+
), Et = E.start.getTime(), gt = E.end.getTime() - 6e4, st = Math.max(Et, nt), j = Math.min(gt, q), pt = new Date(st), vt = new Date(j), Pt = pt.getHours() * 60 + pt.getMinutes(), Rt = vt.getHours() * 60 + vt.getMinutes(), $t = W + J.row * this.dayHeight;
|
|
3827
|
+
rt = $t + Pt / 1440 * this.dayHeight, ut = $t + Rt / 1440 * this.dayHeight;
|
|
3797
3828
|
} else {
|
|
3798
3829
|
const nt = `${D}-${E.id}`;
|
|
3799
3830
|
let q = y.get(nt);
|
|
@@ -3802,7 +3833,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3802
3833
|
let st = !0;
|
|
3803
3834
|
for (let j = N; j <= L; j++) {
|
|
3804
3835
|
const pt = `${D}-${j}`;
|
|
3805
|
-
if (
|
|
3836
|
+
if (p.get(pt)?.has(q)) {
|
|
3806
3837
|
st = !1;
|
|
3807
3838
|
break;
|
|
3808
3839
|
}
|
|
@@ -3814,8 +3845,8 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3814
3845
|
}
|
|
3815
3846
|
for (let st = N; st <= L; st++) {
|
|
3816
3847
|
const j = `${D}-${st}`;
|
|
3817
|
-
let pt =
|
|
3818
|
-
pt || (pt = /* @__PURE__ */ new Set(),
|
|
3848
|
+
let pt = p.get(j);
|
|
3849
|
+
pt || (pt = /* @__PURE__ */ new Set(), p.set(j, pt)), pt.add(q);
|
|
3819
3850
|
}
|
|
3820
3851
|
const Et = Math.floor(
|
|
3821
3852
|
(this.dayHeight - 4) / (ye + 2)
|
|
@@ -3838,28 +3869,28 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3838
3869
|
}
|
|
3839
3870
|
const ft = rt - e;
|
|
3840
3871
|
if (ft + Q < 0 || ft > i) continue;
|
|
3841
|
-
const $e = E.color || "#888888",
|
|
3842
|
-
let Ct = 4,
|
|
3843
|
-
|
|
3844
|
-
const
|
|
3845
|
-
|
|
3872
|
+
const $e = E.color || "#888888", Ht = this.internal.isEventSelected(E), sn = this.hoveredEventId === E.id, ct = 2, Dt = Tt - ct * 2, te = 3, si = 6;
|
|
3873
|
+
let Ct = 4, zt = 4, Mt = 4, Ft = 4;
|
|
3874
|
+
R > 1 && (P && !B ? (zt = 0, Ft = 0) : !P && B ? (Ct = 0, Mt = 0) : !P && !B && (Ct = 0, zt = 0, Mt = 0, Ft = 0)), t.save(), E.readOnly && (t.globalAlpha = 0.5);
|
|
3875
|
+
const Bt = Ps(Re($e)), ri = getComputedStyle(this).getPropertyValue("--text-primary").trim() || "rgba(255, 255, 255, 0.9)", Ae = getComputedStyle(this).getPropertyValue("--text-inverse").trim() || "rgb(0, 0, 0)", rn = Ht ? $e : `hsla(${Bt[0]}, ${Math.min(Bt[1] * 0.9, 90)}%, ${Math.min(
|
|
3876
|
+
Bt[2] + 15,
|
|
3846
3877
|
40
|
|
3847
|
-
)}%, 0.45)`, on =
|
|
3848
|
-
|
|
3878
|
+
)}%, 0.45)`, on = Ht ? $e : `hsla(${Bt[0]}, ${Math.min(Bt[1] * 0.9, 90)}%, ${Math.min(
|
|
3879
|
+
Bt[2] + 10,
|
|
3849
3880
|
70
|
|
3850
3881
|
)}%, 1)`, an = this.shouldRenderEventWithStripes(E);
|
|
3851
3882
|
if (t.beginPath(), t.roundRect(X + ct, ft, Dt, Q, [
|
|
3852
3883
|
Ct,
|
|
3853
|
-
Wt,
|
|
3854
3884
|
zt,
|
|
3885
|
+
Ft,
|
|
3855
3886
|
Mt
|
|
3856
3887
|
]), t.fillStyle = rn, t.fill(), an) {
|
|
3857
3888
|
const nt = this.getStripePatternCanvas();
|
|
3858
3889
|
if (nt) {
|
|
3859
3890
|
t.save(), t.beginPath(), t.roundRect(X + ct, ft, Dt, Q, [
|
|
3860
3891
|
Ct,
|
|
3861
|
-
Wt,
|
|
3862
3892
|
zt,
|
|
3893
|
+
Ft,
|
|
3863
3894
|
Mt
|
|
3864
3895
|
]), t.clip();
|
|
3865
3896
|
const q = 12, Et = Math.floor((X + ct) / q) * q, gt = Math.floor(rt / q) * q - e;
|
|
@@ -3869,24 +3900,24 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3869
3900
|
t.restore();
|
|
3870
3901
|
}
|
|
3871
3902
|
}
|
|
3872
|
-
if (
|
|
3903
|
+
if (Ht || (t.fillStyle = on, t.beginPath(), t.roundRect(
|
|
3873
3904
|
X + ct + 2,
|
|
3874
3905
|
ft + 2,
|
|
3875
3906
|
te,
|
|
3876
3907
|
Q - 4,
|
|
3877
3908
|
[Ct, Ct, Mt, Mt]
|
|
3878
|
-
), t.fill()),
|
|
3909
|
+
), t.fill()), Ht && (t.strokeStyle = Ae, t.lineWidth = 1, t.beginPath(), t.roundRect(X + ct, ft, Dt, Q, [
|
|
3879
3910
|
Ct,
|
|
3880
|
-
Wt,
|
|
3881
3911
|
zt,
|
|
3912
|
+
Ft,
|
|
3882
3913
|
Mt
|
|
3883
|
-
]), t.stroke()), sn && !
|
|
3914
|
+
]), t.stroke()), sn && !Ht && (t.strokeStyle = getComputedStyle(this).getPropertyValue("--grid-color-hover").trim() || "rgba(255, 255, 255, 0.2)", t.lineWidth = 1, t.beginPath(), t.roundRect(X + ct, ft, Dt, Q, [
|
|
3884
3915
|
Ct,
|
|
3885
|
-
Wt,
|
|
3886
3916
|
zt,
|
|
3917
|
+
Ft,
|
|
3887
3918
|
Mt
|
|
3888
|
-
]), t.stroke()),
|
|
3889
|
-
const nt =
|
|
3919
|
+
]), t.stroke()), P && Q >= 16) {
|
|
3920
|
+
const nt = Ht ? Ae : ri;
|
|
3890
3921
|
t.fillStyle = nt, t.font = `11px ${a}`, t.textAlign = "left", t.textBaseline = "top";
|
|
3891
3922
|
const q = X + ct + te + si + 1, Et = ft + 6;
|
|
3892
3923
|
let gt = Dt - te - si - 4;
|
|
@@ -3897,17 +3928,17 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3897
3928
|
Q
|
|
3898
3929
|
), t.clip(), E.rrule) {
|
|
3899
3930
|
t.font = `11px ${a}`;
|
|
3900
|
-
const vt = "⟳",
|
|
3901
|
-
t.fillText(vt, q, Et), gt -=
|
|
3931
|
+
const vt = "⟳", Pt = t.measureText(vt).width;
|
|
3932
|
+
t.fillText(vt, q, Et), gt -= Pt + 4;
|
|
3902
3933
|
}
|
|
3903
3934
|
const st = q + (E.rrule ? t.measureText("⟳").width + 4 : 0);
|
|
3904
3935
|
let j = E.title;
|
|
3905
3936
|
if (t.font = `11px ${a}`, t.measureText(j).width > gt) {
|
|
3906
|
-
const
|
|
3907
|
-
let
|
|
3908
|
-
for (;
|
|
3909
|
-
const ht = Math.floor((
|
|
3910
|
-
t.measureText(oi).width +
|
|
3937
|
+
const Pt = t.measureText("…").width;
|
|
3938
|
+
let Rt = 0, $t = j.length, fe = 0;
|
|
3939
|
+
for (; Rt <= $t; ) {
|
|
3940
|
+
const ht = Math.floor((Rt + $t) / 2), oi = j.substring(0, ht);
|
|
3941
|
+
t.measureText(oi).width + Pt <= gt ? (fe = ht, Rt = ht + 1) : $t = ht - 1;
|
|
3911
3942
|
}
|
|
3912
3943
|
j = j.substring(0, fe) + "…";
|
|
3913
3944
|
}
|
|
@@ -3915,7 +3946,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3915
3946
|
const vt = (ge) => {
|
|
3916
3947
|
const pe = ge.getHours(), ee = ge.getMinutes(), ie = pe >= 12 ? "PM" : "AM";
|
|
3917
3948
|
return `${pe % 12 || 12}:${ee.toString().padStart(2, "0")} ${ie}`;
|
|
3918
|
-
},
|
|
3949
|
+
}, Pt = vt(E.start), Rt = vt(E.end), $t = `${Pt} – ${Rt}`, fe = Ht ? Ae : ri;
|
|
3919
3950
|
t.fillStyle = fe, t.font = `10px ${a}`;
|
|
3920
3951
|
let ht = $t;
|
|
3921
3952
|
if (t.measureText(ht).width > gt) {
|
|
@@ -3952,13 +3983,13 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3952
3983
|
"October",
|
|
3953
3984
|
"November",
|
|
3954
3985
|
"December"
|
|
3955
|
-
], O = [],
|
|
3986
|
+
], O = [], A = /* @__PURE__ */ new Set();
|
|
3956
3987
|
for (const b of r) {
|
|
3957
3988
|
const E = b.days[0];
|
|
3958
3989
|
if (!E) continue;
|
|
3959
3990
|
const T = E.getMonth(), D = E.getFullYear(), N = `${T}-${D}`;
|
|
3960
|
-
if (
|
|
3961
|
-
|
|
3991
|
+
if (!A.has(N)) {
|
|
3992
|
+
A.add(N);
|
|
3962
3993
|
const L = S[T];
|
|
3963
3994
|
L && O.push({
|
|
3964
3995
|
monthKey: N,
|
|
@@ -3972,7 +4003,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
3972
4003
|
const E = O[b], T = O[b + 1], D = E.yOffset, N = T ? T.yOffset : this.totalHeight;
|
|
3973
4004
|
if (N < e) continue;
|
|
3974
4005
|
if (D > l) break;
|
|
3975
|
-
const L = [12, 0, 0, 12],
|
|
4006
|
+
const L = [12, 0, 0, 12], P = Math.max(0, e - D), B = N - D - 24, R = Math.min(P, B), K = D + R - e + 32;
|
|
3976
4007
|
t.save(), t.font = `bold 18px ${a}`, t.textAlign = "left", t.textBaseline = "top";
|
|
3977
4008
|
const J = `${E.monthName} ${E.year}`, wt = t.measureText(J).width, ut = 64 + L[3] + 8, Q = K + L[0], X = 8, Tt = 8, Qt = getComputedStyle(this).getPropertyValue("--bg-elevated").trim() || "rgba(0, 0, 0, 0.7)";
|
|
3978
4009
|
t.fillStyle = Qt, t.beginPath(), t.roundRect(
|
|
@@ -4001,10 +4032,12 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4001
4032
|
copySelectedEvents() {
|
|
4002
4033
|
const t = this.internal.getSelectedEvents();
|
|
4003
4034
|
if (t.length === 0) return;
|
|
4004
|
-
const e =
|
|
4035
|
+
const e = Ii(t), i = new Blob([e], { type: "text/plain" }), s = new ClipboardItem({ "text/plain": i });
|
|
4005
4036
|
navigator.clipboard.write([s]).then(() => {
|
|
4006
4037
|
const r = t.length;
|
|
4007
|
-
Yt(
|
|
4038
|
+
Yt(
|
|
4039
|
+
`Copied ${r} event${r === 1 ? "" : "s"} to clipboard`
|
|
4040
|
+
);
|
|
4008
4041
|
});
|
|
4009
4042
|
}
|
|
4010
4043
|
deleteSelectedEvents() {
|
|
@@ -4120,10 +4153,16 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4120
4153
|
if (!this.selection || !this.scrollContainer) return;
|
|
4121
4154
|
const t = Math.min(this.selection.startX, this.selection.endX), e = Math.max(this.selection.startX, this.selection.endX), i = Math.min(this.selection.startY, this.selection.endY), s = Math.max(this.selection.startY, this.selection.endY), a = (this.scrollContainer.getBoundingClientRect().width - z) / this._columnsPerRow, l = Math.max(
|
|
4122
4155
|
0,
|
|
4123
|
-
Math.min(
|
|
4156
|
+
Math.min(
|
|
4157
|
+
this._columnsPerRow - 1,
|
|
4158
|
+
Math.floor((t - z) / a)
|
|
4159
|
+
)
|
|
4124
4160
|
), c = Math.max(
|
|
4125
4161
|
0,
|
|
4126
|
-
Math.min(
|
|
4162
|
+
Math.min(
|
|
4163
|
+
this._columnsPerRow - 1,
|
|
4164
|
+
Math.floor((e - z) / a)
|
|
4165
|
+
)
|
|
4127
4166
|
), d = this.weeks.filter(
|
|
4128
4167
|
(g) => g.height > 0 && g.yOffset < s && g.yOffset + g.height > i
|
|
4129
4168
|
);
|
|
@@ -4131,53 +4170,55 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4131
4170
|
const h = [];
|
|
4132
4171
|
if (this.dayHeight >= 200)
|
|
4133
4172
|
for (const g of d)
|
|
4134
|
-
for (let
|
|
4135
|
-
const y = g.days[
|
|
4173
|
+
for (let p = 0; p < 7; p++) {
|
|
4174
|
+
const y = g.days[p];
|
|
4136
4175
|
if (!y) continue;
|
|
4137
|
-
const { row:
|
|
4138
|
-
if (
|
|
4139
|
-
const
|
|
4140
|
-
if (s <
|
|
4141
|
-
const
|
|
4176
|
+
const { row: C, col: H } = this.getDayVisualPosition(p);
|
|
4177
|
+
if (H < l || H > c) continue;
|
|
4178
|
+
const M = g.yOffset + C * this.dayHeight, x = M + this.dayHeight;
|
|
4179
|
+
if (s < M || i > x) continue;
|
|
4180
|
+
const $ = Math.max(i, M), w = Math.min(s, x), S = $ - M, O = Math.floor(
|
|
4142
4181
|
S / this.dayHeight * 24 * 60
|
|
4143
|
-
),
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4182
|
+
), A = Math.floor(O / 60), b = O % 60, E = w - M, T = Math.ceil(
|
|
4183
|
+
E / this.dayHeight * 24 * 60
|
|
4184
|
+
), D = Math.floor(T / 60), N = T % 60, L = new Date(y);
|
|
4185
|
+
L.setHours(A, b, 0, 0);
|
|
4186
|
+
const P = new Date(y);
|
|
4187
|
+
P.setHours(D, N, 59, 999), h.push({ start: L, end: P });
|
|
4147
4188
|
}
|
|
4148
4189
|
else
|
|
4149
4190
|
for (const g of d)
|
|
4150
|
-
for (let
|
|
4151
|
-
const y = g.days[
|
|
4191
|
+
for (let p = 0; p < 7; p++) {
|
|
4192
|
+
const y = g.days[p];
|
|
4152
4193
|
if (!y) continue;
|
|
4153
|
-
const { row:
|
|
4154
|
-
if (
|
|
4155
|
-
const
|
|
4156
|
-
if (s <
|
|
4157
|
-
const
|
|
4158
|
-
|
|
4194
|
+
const { row: C, col: H } = this.getDayVisualPosition(p);
|
|
4195
|
+
if (H < l || H > c) continue;
|
|
4196
|
+
const M = g.yOffset + C * this.dayHeight, x = M + this.dayHeight;
|
|
4197
|
+
if (s < M || i > x) continue;
|
|
4198
|
+
const $ = new Date(y);
|
|
4199
|
+
$.setHours(0, 0, 0, 0);
|
|
4159
4200
|
const w = new Date(y);
|
|
4160
|
-
w.setHours(23, 59, 59, 999), h.push({ start:
|
|
4201
|
+
w.setHours(23, 59, 59, 999), h.push({ start: $, end: w });
|
|
4161
4202
|
}
|
|
4162
4203
|
const f = /* @__PURE__ */ new Set();
|
|
4163
4204
|
for (const g of this.events) {
|
|
4164
4205
|
if (g.isAllDay) continue;
|
|
4165
|
-
const
|
|
4166
|
-
for (const
|
|
4167
|
-
const
|
|
4168
|
-
if (!(y <
|
|
4206
|
+
const p = g.start.getTime(), y = g.end.getTime();
|
|
4207
|
+
for (const C of h) {
|
|
4208
|
+
const H = C.start.getTime(), M = C.end.getTime();
|
|
4209
|
+
if (!(y < H || p > M)) {
|
|
4169
4210
|
f.add(g);
|
|
4170
4211
|
break;
|
|
4171
4212
|
}
|
|
4172
4213
|
}
|
|
4173
4214
|
}
|
|
4174
|
-
const
|
|
4215
|
+
const v = Array.from(f);
|
|
4175
4216
|
this.selectionModifierKey || (this.internal.clearSelection(), this.selectedEventForDetail = null, this.selectedEventRect = null);
|
|
4176
|
-
for (const g of
|
|
4217
|
+
for (const g of v)
|
|
4177
4218
|
this.internal.selectEvent(g, "add");
|
|
4178
4219
|
this.requestUpdate(), this.dispatchEvent(
|
|
4179
4220
|
new CustomEvent("selection-change", {
|
|
4180
|
-
detail: { selectedEvents:
|
|
4221
|
+
detail: { selectedEvents: v },
|
|
4181
4222
|
bubbles: !0
|
|
4182
4223
|
})
|
|
4183
4224
|
), this.dispatchEvent(
|
|
@@ -4226,7 +4267,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4226
4267
|
}
|
|
4227
4268
|
async onEventClick(t, e) {
|
|
4228
4269
|
const i = e.metaKey || e.ctrlKey;
|
|
4229
|
-
if (
|
|
4270
|
+
if (i ? this.internal.selectEvent(t, "toggle") : this.internal.selectEvent(t, "replace"), i)
|
|
4230
4271
|
this.selectedEventForDetail = null, this.selectedEventRect = null, this.isDescriptionExpanded = !1, this.requestUpdate();
|
|
4231
4272
|
else {
|
|
4232
4273
|
this.selectedEventForDetail = t, this.isDescriptionExpanded = !1;
|
|
@@ -4339,7 +4380,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4339
4380
|
this.movingEventEnd.y
|
|
4340
4381
|
);
|
|
4341
4382
|
} else {
|
|
4342
|
-
const a =
|
|
4383
|
+
const a = Re(this.movingEvent.color || "#888888");
|
|
4343
4384
|
this.renderVirtualEvent(
|
|
4344
4385
|
r,
|
|
4345
4386
|
o,
|
|
@@ -4377,7 +4418,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4377
4418
|
i.setMinutes(Math.round(i.getMinutes() / 15) * 15, 0, 0), s.setMinutes(Math.round(s.getMinutes() / 15) * 15, 0, 0);
|
|
4378
4419
|
let r, o;
|
|
4379
4420
|
if (this.activeCalendarColor) {
|
|
4380
|
-
const a =
|
|
4421
|
+
const a = Re(this.activeCalendarColor);
|
|
4381
4422
|
r = `rgba(${a[0]}, ${a[1]}, ${a[2]}, 0.3)`, o = `rgba(${a[0]}, ${a[1]}, ${a[2]}, 0.8)`;
|
|
4382
4423
|
} else {
|
|
4383
4424
|
const a = getComputedStyle(this).getPropertyValue("--accent-primary").trim() || "rgb(100, 150, 255)";
|
|
@@ -4397,71 +4438,71 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4397
4438
|
renderVirtualEvent(t, e, i, s) {
|
|
4398
4439
|
if (!this.overlayCanvas || !this.overlayCtx || !this.scrollContainer)
|
|
4399
4440
|
return;
|
|
4400
|
-
const r = this.overlayCtx, o = getComputedStyle(this).fontFamily, c = (this.scrollContainer.getBoundingClientRect().width - z - Yi) / this._columnsPerRow, d = (S, O,
|
|
4441
|
+
const r = this.overlayCtx, o = getComputedStyle(this).fontFamily, c = (this.scrollContainer.getBoundingClientRect().width - z - Yi) / this._columnsPerRow, d = (S, O, A) => {
|
|
4401
4442
|
const b = this.weeks.find(
|
|
4402
|
-
(L) => L.days.some((
|
|
4443
|
+
(L) => L.days.some((P) => P.toDateString() === S.toDateString())
|
|
4403
4444
|
);
|
|
4404
4445
|
if (!b) return null;
|
|
4405
4446
|
const E = b.days.findIndex(
|
|
4406
4447
|
(L) => L.toDateString() === S.toDateString()
|
|
4407
4448
|
);
|
|
4408
4449
|
if (E < 0) return null;
|
|
4409
|
-
const { row: T } = this.getDayVisualPosition(E), D = O * 60 +
|
|
4450
|
+
const { row: T } = this.getDayVisualPosition(E), D = O * 60 + A;
|
|
4410
4451
|
return b.yOffset + T * this.dayHeight + D / 1440 * this.dayHeight - this.scrollTop;
|
|
4411
4452
|
}, h = (S) => {
|
|
4412
4453
|
const O = this.weeks.find(
|
|
4413
4454
|
(E) => E.days.some((T) => T.toDateString() === S.toDateString())
|
|
4414
4455
|
);
|
|
4415
4456
|
if (!O) return null;
|
|
4416
|
-
const
|
|
4457
|
+
const A = O.days.findIndex(
|
|
4417
4458
|
(E) => E.toDateString() === S.toDateString()
|
|
4418
4459
|
);
|
|
4419
|
-
if (
|
|
4420
|
-
const { col: b } = this.getDayVisualPosition(
|
|
4460
|
+
if (A < 0) return null;
|
|
4461
|
+
const { col: b } = this.getDayVisualPosition(A);
|
|
4421
4462
|
return b * c;
|
|
4422
|
-
}, u = (S, O,
|
|
4423
|
-
const b = S + 2, E = c - 4, T = Math.max(4,
|
|
4463
|
+
}, u = (S, O, A) => {
|
|
4464
|
+
const b = S + 2, E = c - 4, T = Math.max(4, A - O);
|
|
4424
4465
|
r.fillStyle = i.fill, r.beginPath(), r.roundRect(b, O, E, T, 4), r.fill(), r.strokeStyle = i.stroke, r.lineWidth = 1, r.setLineDash([6, 3]), r.stroke(), r.setLineDash([]);
|
|
4425
4466
|
}, f = t.toDateString() === e.toDateString();
|
|
4426
4467
|
if (f) {
|
|
4427
|
-
const S = h(t), O = d(t, t.getHours(), t.getMinutes()),
|
|
4428
|
-
S != null && O != null &&
|
|
4468
|
+
const S = h(t), O = d(t, t.getHours(), t.getMinutes()), A = d(e, e.getHours(), e.getMinutes());
|
|
4469
|
+
S != null && O != null && A != null && u(S, O, A);
|
|
4429
4470
|
} else {
|
|
4430
4471
|
const S = new Date(t);
|
|
4431
4472
|
S.setHours(0, 0, 0, 0);
|
|
4432
4473
|
const O = new Date(e);
|
|
4433
4474
|
for (O.setHours(23, 59, 59, 999); S <= O; ) {
|
|
4434
|
-
const
|
|
4435
|
-
if (
|
|
4475
|
+
const A = h(S);
|
|
4476
|
+
if (A != null) {
|
|
4436
4477
|
const b = S.toDateString() === t.toDateString(), E = S.toDateString() === e.toDateString();
|
|
4437
4478
|
let T, D;
|
|
4438
|
-
b ? (T = d(S, t.getHours(), t.getMinutes()), D = d(S, 23, 59)) : E ? (T = d(S, 0, 0), D = d(S, e.getHours(), e.getMinutes())) : (T = d(S, 0, 0), D = d(S, 23, 59)), T != null && D != null && u(
|
|
4479
|
+
b ? (T = d(S, t.getHours(), t.getMinutes()), D = d(S, 23, 59)) : E ? (T = d(S, 0, 0), D = d(S, e.getHours(), e.getMinutes())) : (T = d(S, 0, 0), D = d(S, 23, 59)), T != null && D != null && u(A, T, D);
|
|
4439
4480
|
}
|
|
4440
4481
|
S.setDate(S.getDate() + 1);
|
|
4441
4482
|
}
|
|
4442
4483
|
}
|
|
4443
|
-
const
|
|
4444
|
-
if (
|
|
4484
|
+
const v = (S) => `${S.getHours().toString().padStart(2, "0")}:${S.getMinutes().toString().padStart(2, "0")}`, g = (S) => `${S.getDate()}.${S.getMonth() + 1}`, p = f ? `${v(t)} – ${v(e)}` : `${g(t)} ${v(t)} – ${g(e)} ${v(e)}`, H = Math.abs(e.getTime() - t.getTime()) / (1e3 * 60) < 15, M = h(t), x = h(e), $ = d(t, t.getHours(), t.getMinutes()), w = d(e, e.getHours(), e.getMinutes());
|
|
4485
|
+
if (M != null && x != null && $ != null && w != null) {
|
|
4445
4486
|
r.font = `600 11px ${o}`, r.fillStyle = i.text, r.textAlign = "left";
|
|
4446
4487
|
let S = !0;
|
|
4447
4488
|
if (s !== void 0) {
|
|
4448
|
-
const
|
|
4489
|
+
const A = s - this.scrollTop, b = Math.abs(A - $), E = Math.abs(A - w);
|
|
4449
4490
|
S = b < E;
|
|
4450
4491
|
}
|
|
4451
|
-
const O = S ?
|
|
4452
|
-
if (
|
|
4453
|
-
const
|
|
4492
|
+
const O = S ? M : x;
|
|
4493
|
+
if (H) {
|
|
4494
|
+
const A = S ? $ : w, b = A + 6, E = A + 10, T = r.measureText(p).width, D = 6, N = getComputedStyle(this).getPropertyValue("--bg-elevated").trim() || "rgba(0, 0, 0, 0.8)";
|
|
4454
4495
|
r.fillStyle = N, r.beginPath(), r.roundRect(
|
|
4455
4496
|
O + 4,
|
|
4456
4497
|
b,
|
|
4457
4498
|
T + D * 2,
|
|
4458
4499
|
16,
|
|
4459
4500
|
4
|
|
4460
|
-
), r.fill(), r.fillStyle = "white", r.textBaseline = "top", r.fillText(
|
|
4501
|
+
), r.fill(), r.fillStyle = "white", r.textBaseline = "top", r.fillText(p, O + 4 + D, E);
|
|
4461
4502
|
} else {
|
|
4462
4503
|
r.textBaseline = "top";
|
|
4463
|
-
const
|
|
4464
|
-
r.fillText(
|
|
4504
|
+
const A = S ? $ + 4 : w - 18;
|
|
4505
|
+
r.fillText(p, O + 8, A);
|
|
4465
4506
|
}
|
|
4466
4507
|
}
|
|
4467
4508
|
}
|
|
@@ -4480,21 +4521,21 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4480
4521
|
for (let c = 0; c < 7; c++) {
|
|
4481
4522
|
const d = l.days[c];
|
|
4482
4523
|
if (!d) continue;
|
|
4483
|
-
const { row: h, col: u } = this.getDayVisualPosition(c), f = u * s,
|
|
4524
|
+
const { row: h, col: u } = this.getDayVisualPosition(c), f = u * s, v = l.yOffset + h * this.dayHeight - r, g = v + this.dayHeight;
|
|
4484
4525
|
if (c === 5 || c === 6) {
|
|
4485
4526
|
const x = getComputedStyle(this).getPropertyValue("--bg-weekend").trim() || "rgba(255, 255, 255, 0.03)";
|
|
4486
|
-
t.fillStyle = x, t.fillRect(f,
|
|
4527
|
+
t.fillStyle = x, t.fillRect(f, v, s, this.dayHeight);
|
|
4487
4528
|
}
|
|
4488
|
-
const
|
|
4489
|
-
if (!
|
|
4529
|
+
const p = this.dayHeight >= 300, y = /* @__PURE__ */ new Date();
|
|
4530
|
+
if (!p && U.isSameDay(d, y)) {
|
|
4490
4531
|
const x = getComputedStyle(this).getPropertyValue("--accent-current-time").trim() || "rgba(255, 0, 0, 0.8)";
|
|
4491
|
-
t.strokeStyle = x, t.lineWidth = 1, t.strokeRect(f + 1,
|
|
4532
|
+
t.strokeStyle = x, t.lineWidth = 1, t.strokeRect(f + 1, v + 1, s - 2, this.dayHeight - 2), t.lineWidth = 1;
|
|
4492
4533
|
}
|
|
4493
|
-
const
|
|
4494
|
-
g -
|
|
4495
|
-
i -
|
|
4534
|
+
const C = 12, M = Math.min(
|
|
4535
|
+
g - C - 8,
|
|
4536
|
+
i - C - 64
|
|
4496
4537
|
);
|
|
4497
|
-
|
|
4538
|
+
v < i && g > 0 && M > v && (t.fillStyle = a, t.fillText(d.getDate().toString(), f + s - 12, M));
|
|
4498
4539
|
}
|
|
4499
4540
|
}
|
|
4500
4541
|
}
|
|
@@ -4505,23 +4546,23 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4505
4546
|
const d = 16, h = 12, u = i[0];
|
|
4506
4547
|
if (u)
|
|
4507
4548
|
for (let f = 0; f < this.rowsPerWeek; f++) {
|
|
4508
|
-
const
|
|
4509
|
-
if (g < 0 ||
|
|
4510
|
-
const
|
|
4511
|
-
if (!(
|
|
4549
|
+
const v = u.yOffset + f * this.dayHeight - s, g = v + this.dayHeight;
|
|
4550
|
+
if (g < 0 || v > r) continue;
|
|
4551
|
+
const p = Math.min(h, g - d - 2);
|
|
4552
|
+
if (!(p < 0))
|
|
4512
4553
|
for (let y = 0; y < this._columnsPerRow; y++) {
|
|
4513
|
-
const
|
|
4514
|
-
if (
|
|
4515
|
-
const
|
|
4516
|
-
if (!
|
|
4517
|
-
const
|
|
4554
|
+
const C = f * this._columnsPerRow + y;
|
|
4555
|
+
if (C >= 7) continue;
|
|
4556
|
+
const H = o[C];
|
|
4557
|
+
if (!H) continue;
|
|
4558
|
+
const M = z + y * e + e / 2, x = t.measureText(H).width, $ = 6, w = 2;
|
|
4518
4559
|
t.fillStyle = c, t.beginPath(), t.roundRect(
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
x +
|
|
4560
|
+
M - x / 2 - $,
|
|
4561
|
+
p,
|
|
4562
|
+
x + $ * 2,
|
|
4522
4563
|
d,
|
|
4523
4564
|
4
|
|
4524
|
-
), t.fill(), t.fillStyle = l, t.fillText(
|
|
4565
|
+
), t.fill(), t.fillStyle = l, t.fillText(H, M, p + w + 1);
|
|
4525
4566
|
}
|
|
4526
4567
|
}
|
|
4527
4568
|
}
|
|
@@ -4550,18 +4591,18 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4550
4591
|
(d - r) / o
|
|
4551
4592
|
), f = Math.floor(
|
|
4552
4593
|
(h - r) / o
|
|
4553
|
-
),
|
|
4554
|
-
for (let
|
|
4555
|
-
const y = this.weeks[
|
|
4594
|
+
), v = Math.max(0, u), g = Math.min(this.weeks.length - 1, f);
|
|
4595
|
+
for (let p = v; p <= g; p++) {
|
|
4596
|
+
const y = this.weeks[p];
|
|
4556
4597
|
if (!y || y.height === 0) continue;
|
|
4557
|
-
const
|
|
4558
|
-
if (!
|
|
4559
|
-
const
|
|
4560
|
-
|
|
4598
|
+
const C = y.days[0], H = y.days[6];
|
|
4599
|
+
if (!C || !H) continue;
|
|
4600
|
+
const M = C.getTime(), x = H.getTime() + a - 1, $ = Math.max(d, M), w = Math.min(h, x), S = Math.floor(
|
|
4601
|
+
$ % a / l
|
|
4561
4602
|
), O = Math.floor(
|
|
4562
4603
|
w % a / l
|
|
4563
|
-
),
|
|
4564
|
-
i.globalAlpha = c.readOnly ? 0.333 * 0.5 : 0.333, i.fillStyle = c.color || "#888", i.fillRect(2,
|
|
4604
|
+
), A = y.yOffset / this.totalHeight * e + S / 1440 * (y.height / this.totalHeight * e), b = y.yOffset / this.totalHeight * e + O / 1440 * (y.height / this.totalHeight * e);
|
|
4605
|
+
i.globalAlpha = c.readOnly ? 0.333 * 0.5 : 0.333, i.fillStyle = c.color || "#888", i.fillRect(2, A, t - 4, Math.max(b - A, 2));
|
|
4565
4606
|
}
|
|
4566
4607
|
}
|
|
4567
4608
|
}
|
|
@@ -4620,7 +4661,10 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4620
4661
|
if (t < z) return null;
|
|
4621
4662
|
const a = Math.max(
|
|
4622
4663
|
0,
|
|
4623
|
-
Math.min(
|
|
4664
|
+
Math.min(
|
|
4665
|
+
this._columnsPerRow - 1,
|
|
4666
|
+
Math.floor((t - z) / o)
|
|
4667
|
+
)
|
|
4624
4668
|
), l = this.weeks.find(
|
|
4625
4669
|
(g) => g.height > 0 && g.yOffset <= e && g.yOffset + g.height > e
|
|
4626
4670
|
);
|
|
@@ -4631,22 +4675,22 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4631
4675
|
if (!h) return null;
|
|
4632
4676
|
let u = 0, f = 0;
|
|
4633
4677
|
if (this.dayHeight >= 200) {
|
|
4634
|
-
const g = e - (l.yOffset + c * this.dayHeight),
|
|
4635
|
-
u = Math.floor(
|
|
4678
|
+
const g = e - (l.yOffset + c * this.dayHeight), p = Math.floor(g / this.dayHeight * 24 * 60);
|
|
4679
|
+
u = Math.floor(p / 60), f = p % 60;
|
|
4636
4680
|
} else
|
|
4637
4681
|
u = 12;
|
|
4638
|
-
const
|
|
4639
|
-
return
|
|
4682
|
+
const v = new Date(h);
|
|
4683
|
+
return v.setHours(u, f, 0, 0), v;
|
|
4640
4684
|
}
|
|
4641
4685
|
convertDateTimeToPosition(t) {
|
|
4642
4686
|
if (!this.scrollContainer) return null;
|
|
4643
4687
|
const s = (this.scrollContainer.getBoundingClientRect().width - z) / this._columnsPerRow, r = t.toDateString(), o = this.weeks.find(
|
|
4644
|
-
(
|
|
4688
|
+
(p) => p.days.some((y) => y.toDateString() === r)
|
|
4645
4689
|
);
|
|
4646
4690
|
if (!o) return null;
|
|
4647
|
-
const a = o.days.findIndex((
|
|
4691
|
+
const a = o.days.findIndex((p) => p.toDateString() === r);
|
|
4648
4692
|
if (a === -1) return null;
|
|
4649
|
-
const { row: l, col: c } = this.getDayVisualPosition(a), d = z + c * s + s / 2, h = t.getHours(), u = t.getMinutes(),
|
|
4693
|
+
const { row: l, col: c } = this.getDayVisualPosition(a), d = z + c * s + s / 2, h = t.getHours(), u = t.getMinutes(), v = (h * 60 + u) / 1440 * this.dayHeight, g = o.yOffset + l * this.dayHeight + v;
|
|
4650
4694
|
return { x: d, y: g };
|
|
4651
4695
|
}
|
|
4652
4696
|
getCursorTime() {
|
|
@@ -4705,24 +4749,28 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4705
4749
|
), this.selectedEventForDetail = null, this.selectedEventRect = null, this.requestUpdate();
|
|
4706
4750
|
}
|
|
4707
4751
|
renderNotificationsList(t) {
|
|
4708
|
-
return t.reminders?.length ? t.reminders.map(
|
|
4752
|
+
return t.reminders?.length ? t.reminders.map(
|
|
4753
|
+
(e) => _`
|
|
4709
4754
|
<div class="notification-item">
|
|
4710
4755
|
<select
|
|
4711
4756
|
class="notification-select"
|
|
4712
4757
|
.value=${String(e.triggerOffset)}
|
|
4713
4758
|
@change=${(i) => {
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4759
|
+
const s = Number(i.target.value);
|
|
4760
|
+
this.updateNotification(t, e.id, { triggerOffset: s });
|
|
4761
|
+
}}
|
|
4717
4762
|
>
|
|
4718
|
-
${As.map(
|
|
4763
|
+
${As.map(
|
|
4764
|
+
(i) => _`<option value="${i.value}" ?selected=${i.value === e.triggerOffset}>${i.label}</option>`
|
|
4765
|
+
)}
|
|
4719
4766
|
</select>
|
|
4720
4767
|
<button
|
|
4721
4768
|
class="notification-remove-button"
|
|
4722
4769
|
@click=${() => this.removeNotification(t, e.id)}
|
|
4723
4770
|
>×</button>
|
|
4724
4771
|
</div>
|
|
4725
|
-
`
|
|
4772
|
+
`
|
|
4773
|
+
) : _`<div class="notification-empty-state">No notifications set</div>`;
|
|
4726
4774
|
}
|
|
4727
4775
|
addNotification(t) {
|
|
4728
4776
|
const e = {
|
|
@@ -4730,29 +4778,35 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4730
4778
|
triggerOffset: 15,
|
|
4731
4779
|
enabled: !0
|
|
4732
4780
|
}, i = [...t.reminders || [], e];
|
|
4733
|
-
this.dispatchEvent(
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4781
|
+
this.dispatchEvent(
|
|
4782
|
+
new CustomEvent("update-event", {
|
|
4783
|
+
detail: { event: t, updates: { reminders: i } },
|
|
4784
|
+
bubbles: !0,
|
|
4785
|
+
composed: !0
|
|
4786
|
+
})
|
|
4787
|
+
);
|
|
4738
4788
|
}
|
|
4739
4789
|
updateNotification(t, e, i) {
|
|
4740
4790
|
const s = (t.reminders || []).map(
|
|
4741
4791
|
(r) => r.id === e ? { ...r, ...i } : r
|
|
4742
4792
|
);
|
|
4743
|
-
this.dispatchEvent(
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4793
|
+
this.dispatchEvent(
|
|
4794
|
+
new CustomEvent("update-event", {
|
|
4795
|
+
detail: { event: t, updates: { reminders: s } },
|
|
4796
|
+
bubbles: !0,
|
|
4797
|
+
composed: !0
|
|
4798
|
+
})
|
|
4799
|
+
);
|
|
4748
4800
|
}
|
|
4749
4801
|
removeNotification(t, e) {
|
|
4750
4802
|
const i = (t.reminders || []).filter((s) => s.id !== e);
|
|
4751
|
-
this.dispatchEvent(
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4803
|
+
this.dispatchEvent(
|
|
4804
|
+
new CustomEvent("update-event", {
|
|
4805
|
+
detail: { event: t, updates: { reminders: i } },
|
|
4806
|
+
bubbles: !0,
|
|
4807
|
+
composed: !0
|
|
4808
|
+
})
|
|
4809
|
+
);
|
|
4756
4810
|
}
|
|
4757
4811
|
shouldRenderEventWithStripes(t) {
|
|
4758
4812
|
if (t.status === "TENTATIVE")
|
|
@@ -4782,11 +4836,9 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4782
4836
|
}).format(x), i = (x) => new Intl.DateTimeFormat(this.locale, {
|
|
4783
4837
|
hour: "numeric",
|
|
4784
4838
|
minute: "2-digit"
|
|
4785
|
-
}).format(x), s = U.isSameDay(t.start, t.end), r = 320, o = 550, a = 8, l = this.scrollContainer?.clientWidth || 800, c = this.scrollContainer?.clientHeight || 600, d = this.selectedEventRect.x + this.selectedEventRect.width + a, h = this.selectedEventRect.x - r - a, u = d + r <= l ? d : h, f = z + a,
|
|
4839
|
+
}).format(x), s = U.isSameDay(t.start, t.end), r = 320, o = 550, a = 8, l = this.scrollContainer?.clientWidth || 800, c = this.scrollContainer?.clientHeight || 600, d = this.selectedEventRect.x + this.selectedEventRect.width + a, h = this.selectedEventRect.x - r - a, u = d + r <= l ? d : h, f = z + a, v = l - r - a, g = Math.max(f, Math.min(v, u)), p = this.selectedEventRect.y - this.scrollTop, y = a, C = c - o - a, H = Math.max(y, Math.min(C, p)), M = `left: ${g}px; top: ${H}px; --calendar-color: ${t.color || "#888888"};`;
|
|
4786
4840
|
return _`
|
|
4787
|
-
<div class="event-detail-overlay" style="${
|
|
4788
|
-
<div class="event-detail-color-bar" style="opacity: ${t.readOnly ? "0.5" : "1"}"></div>
|
|
4789
|
-
|
|
4841
|
+
<div class="event-detail-overlay" style="${M}">
|
|
4790
4842
|
<div class="event-detail-content">
|
|
4791
4843
|
<div class="event-detail-header">
|
|
4792
4844
|
<div class="event-detail-header-content">
|
|
@@ -4817,14 +4869,14 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4817
4869
|
@keydown=${(x) => {
|
|
4818
4870
|
if (x.key === "Enter") {
|
|
4819
4871
|
this.updateEventTimeout && (clearTimeout(this.updateEventTimeout), this.updateEventTimeout = null);
|
|
4820
|
-
const
|
|
4872
|
+
const $ = x.target, w = $.value;
|
|
4821
4873
|
w !== t.title && this.dispatchEvent(
|
|
4822
4874
|
new CustomEvent("update-event", {
|
|
4823
4875
|
detail: { event: t, updates: { title: w } },
|
|
4824
4876
|
bubbles: !0,
|
|
4825
4877
|
composed: !0
|
|
4826
4878
|
})
|
|
4827
|
-
),
|
|
4879
|
+
), $.blur();
|
|
4828
4880
|
}
|
|
4829
4881
|
}}
|
|
4830
4882
|
/>
|
|
@@ -4877,12 +4929,12 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4877
4929
|
|
|
4878
4930
|
${(() => {
|
|
4879
4931
|
if (!t.attendees || t.attendees.length === 0) return null;
|
|
4880
|
-
const x = this.findCurrentUserAttendee(t),
|
|
4881
|
-
return
|
|
4932
|
+
const x = this.findCurrentUserAttendee(t), $ = x ? t.attendees.filter((w) => w !== x) : t.attendees;
|
|
4933
|
+
return $.length > 0 ? _`
|
|
4882
4934
|
<div class="event-detail-section">
|
|
4883
|
-
<div class="event-detail-label">Participants (${
|
|
4935
|
+
<div class="event-detail-label">Participants (${$.length})</div>
|
|
4884
4936
|
<div class="event-detail-value">
|
|
4885
|
-
${
|
|
4937
|
+
${$.map(
|
|
4886
4938
|
(w) => _`
|
|
4887
4939
|
<div style="margin-bottom: 4px">
|
|
4888
4940
|
<span title=${w.email}>${w.name || w.email}</span>
|
|
@@ -4947,7 +4999,10 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4947
4999
|
this.updateEventTimeout && clearTimeout(this.updateEventTimeout), this.updateEventTimeout = setTimeout(() => {
|
|
4948
5000
|
this.dispatchEvent(
|
|
4949
5001
|
new CustomEvent("update-event", {
|
|
4950
|
-
detail: {
|
|
5002
|
+
detail: {
|
|
5003
|
+
event: t,
|
|
5004
|
+
updates: { description: w }
|
|
5005
|
+
},
|
|
4951
5006
|
bubbles: !0,
|
|
4952
5007
|
composed: !0
|
|
4953
5008
|
})
|
|
@@ -4958,7 +5013,10 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
4958
5013
|
const w = x.target.value;
|
|
4959
5014
|
this.updateEventTimeout && (clearTimeout(this.updateEventTimeout), this.updateEventTimeout = null), w !== (t.description ?? "") && this.dispatchEvent(
|
|
4960
5015
|
new CustomEvent("update-event", {
|
|
4961
|
-
detail: {
|
|
5016
|
+
detail: {
|
|
5017
|
+
event: t,
|
|
5018
|
+
updates: { description: w }
|
|
5019
|
+
},
|
|
4962
5020
|
bubbles: !0,
|
|
4963
5021
|
composed: !0
|
|
4964
5022
|
})
|
|
@@ -5012,6 +5070,9 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
5012
5070
|
<div class="toolbar-left">
|
|
5013
5071
|
<slot name="toolbar-center"></slot>
|
|
5014
5072
|
|
|
5073
|
+
<button class="toolbar-button" title="Month" @click=${this.scrollToMonth}>
|
|
5074
|
+
Month
|
|
5075
|
+
</button>
|
|
5015
5076
|
<button class="toolbar-button" title="Today" @click=${this.scrollToToday}>
|
|
5016
5077
|
Today
|
|
5017
5078
|
</button>
|
|
@@ -5025,7 +5086,7 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
5025
5086
|
<input
|
|
5026
5087
|
type="range"
|
|
5027
5088
|
class="toolbar-zoom-slider"
|
|
5028
|
-
min="${
|
|
5089
|
+
min="${Nt}"
|
|
5029
5090
|
max="${me}"
|
|
5030
5091
|
.value=${this.dayHeight}
|
|
5031
5092
|
@input=${this.onZoomSliderChange}
|
|
@@ -5107,10 +5168,14 @@ const qt = 100, me = 3e3, z = 60, Yi = 12, ye = 20, ni = class ni extends Kt {
|
|
|
5107
5168
|
<div class="notification-popover-item">
|
|
5108
5169
|
<div class="notification-popover-item-header">
|
|
5109
5170
|
<div class="notification-popover-item-title">${i.eventTitle}</div>
|
|
5110
|
-
<div class="notification-popover-item-time">${t(
|
|
5171
|
+
<div class="notification-popover-item-time">${t(
|
|
5172
|
+
i.triggerTime
|
|
5173
|
+
)}</div>
|
|
5111
5174
|
</div>
|
|
5112
5175
|
<div class="notification-popover-item-details">
|
|
5113
|
-
<div class="notification-popover-item-event-time">📅 ${e(
|
|
5176
|
+
<div class="notification-popover-item-event-time">📅 ${e(
|
|
5177
|
+
i.eventStart
|
|
5178
|
+
)}</div>
|
|
5114
5179
|
${i.eventLocation ? _`<div class="notification-popover-item-location">📍 ${i.eventLocation}</div>` : null}
|
|
5115
5180
|
</div>
|
|
5116
5181
|
</div>
|
|
@@ -5335,6 +5400,10 @@ ni.styles = zi`
|
|
|
5335
5400
|
overflow-anchor: none;
|
|
5336
5401
|
}
|
|
5337
5402
|
|
|
5403
|
+
:host([scroll-lock]) .scroll-container {
|
|
5404
|
+
overflow: hidden;
|
|
5405
|
+
}
|
|
5406
|
+
|
|
5338
5407
|
.scroll-container.zoom-cursor {
|
|
5339
5408
|
cursor: ns-resize;
|
|
5340
5409
|
}
|
|
@@ -5424,12 +5493,11 @@ ni.styles = zi`
|
|
|
5424
5493
|
font-size: 16px;
|
|
5425
5494
|
font-weight: 600;
|
|
5426
5495
|
color: var(--text-primary, rgba(255, 255, 255, 0.9));
|
|
5427
|
-
background: var(--input-bg, rgba(0, 0, 0, 0.2));
|
|
5428
5496
|
border: 1px solid var(--input-border, rgba(255, 255, 255, 0.1));
|
|
5497
|
+
background: transparent;
|
|
5429
5498
|
border-radius: 4px;
|
|
5430
5499
|
padding: 6px 8px;
|
|
5431
5500
|
width: 100%;
|
|
5432
|
-
outline: none;
|
|
5433
5501
|
font-family: inherit;
|
|
5434
5502
|
margin: 0 -8px 0 -8px;
|
|
5435
5503
|
field-sizing: content;
|
|
@@ -5450,7 +5518,6 @@ ni.styles = zi`
|
|
|
5450
5518
|
|
|
5451
5519
|
.event-detail-title-input:focus {
|
|
5452
5520
|
border-color: var(--input-border-focus, rgba(255, 255, 255, 0.3));
|
|
5453
|
-
background: var(--input-bg-focus, rgba(0, 0, 0, 0.3));
|
|
5454
5521
|
}
|
|
5455
5522
|
|
|
5456
5523
|
.event-detail-time {
|
|
@@ -5471,6 +5538,9 @@ ni.styles = zi`
|
|
|
5471
5538
|
font-size: 20px;
|
|
5472
5539
|
line-height: 1;
|
|
5473
5540
|
flex-shrink: 0;
|
|
5541
|
+
position: absolute;
|
|
5542
|
+
top: 0.75rem;
|
|
5543
|
+
right: 1rem;
|
|
5474
5544
|
}
|
|
5475
5545
|
|
|
5476
5546
|
.event-detail-close:hover {
|