Daily Reading Daily Bible reading
53/260 · Week 12 Day 53 of 260 · Week 12
verse?.id === this.selected);
if (start < 0) return [];
const verses = [this.rangeVerses[start]];
for (let i = start + 1; i < this.rangeVerses.length; i++) {
const one = verses[verses.length - 1], two = this.rangeVerses[i];
if (!two || one.book !== two.book || two.order !== one.order + 1
|| !((one.chapter === two.chapter && two.number === one.number + 1)
|| (two.chapter === one.chapter + 1 && two.number === 1))) break;
verses.push(two);
}
return verses;
},
get rangeIds() {
return this.endings.slice(0, this.endings.findIndex(verse => verse.id === this.end) + 1).map(verse => verse.id);
},
categoryState(category) {
const count = this.rangeIds.filter(id => (this.$wire.highlightCategories[id] || []).includes(category)).length;
return count === 0 ? 'false' : (count === this.rangeIds.length ? 'true' : 'mixed');
},
setEnd(id) {
const previous = this.end;
this.end = Number(id);
this.$wire.selectRange(this.selected, this.end, previous);
const start = this.endings[0], end = this.endings.find(verse => verse.id === this.end);
this.reference = start.reference + (start.id === end.id ? '' : '–' + (start.chapter === end.chapter ? end.number : end.chapter + ':' + end.number));
},
moveEnd(direction) {
const index = this.endings.findIndex(verse => verse.id === this.end);
this.setEnd(this.endings[Math.max(0, Math.min(this.endings.length - 1, index + direction))].id);
},
select(id, reference, trigger) {
if (this.selected === id && this.anchor === trigger) { this.dismiss(true); return; }
this.selected = id; this.end = id; this.choosingEnd = false; this.reference = reference; this.anchor = trigger;
this.$wire.selectRange(id, id);
this.$nextTick(() => requestAnimationFrame(() => {
const rect = trigger.getBoundingClientRect();
const menu = this.$refs.actions;
this.left = Math.max(8, Math.min(rect.left, window.innerWidth - menu.offsetWidth - 8));
this.top = rect.top > menu.offsetHeight + 16
? rect.top - menu.offsetHeight - 10
: Math.max(8, Math.min(rect.bottom + 10, window.innerHeight - menu.offsetHeight - 8));
menu.querySelector('button, a')?.focus({ preventScroll: true });
}));
}
}"
@keydown.escape.window="if (selected !== null) { $event.preventDefault(); dismiss(true) }"
@resize.window="dismiss()" @scroll.window="dismiss()"
@click.window="if (selected !== null && !$refs.actions.contains($event.target) && $event.target !== anchor) dismiss()"
@focusin.window="if (selected !== null && !$refs.actions.contains($event.target) && $event.target !== anchor) dismiss()"
@highlight-panel-closed="restoreReading()"
@highlight-saved="dismiss(true)"
@discussion-draft-reset="threadToken = crypto.randomUUID(); replyToken = crypto.randomUUID(); focusDiscussion()"
@discussion-opened="focusDiscussion()"
@discussion-replied="replyToken = crypto.randomUUID()"
>
Matthew
21 And said unto them, It is written, My house shall be called the house of prayer; but ye have made it a den of thieves.
Mark
11 And he taught, saying unto them, Is it not written, My house shall be called of all nations the house of prayer? but ye have made it a den of thieves.
King James Version (public domain).