Mirror of https://github.com/improsocial/impro An extensible Bluesky client for web impro.social
6

Configure Feed

Select the types of activity you want to include in your feed.

Remove unused repeat directive

Grace Kind (Dec 7, 2025, 11:49 AM EST) ce86472f 0713ad23

+86 -170
+1 -2
clientLibs/litHtml.js
··· 1 1 import { html, render } from "lit-html"; 2 2 import { keyed } from "lit-html/directives/keyed.js"; 3 - import { repeat } from "lit-html/directives/repeat.js"; 4 3 import { ref } from "lit-html/directives/ref.js"; 5 4 6 - export { html, render, keyed, repeat, ref }; 5 + export { html, render, keyed, ref };
+84 -166
src/js/lib/lit-html.js
··· 20 20 var p = /'/g; 21 21 var g = /"/g; 22 22 var $ = /^(?:script|style|textarea|title)$/i; 23 - var y = (t4) => (i4, ...s4) => ({ _$litType$: t4, strings: i4, values: s4 }); 23 + var y = (t4) => (i4, ...s3) => ({ _$litType$: t4, strings: i4, values: s3 }); 24 24 var x = y(1); 25 25 var b = y(2); 26 26 var w = y(3); ··· 33 33 return void 0 !== s ? s.createHTML(i4) : i4; 34 34 } 35 35 var V = (t4, i4) => { 36 - const s4 = t4.length - 1, o4 = []; 37 - let r4, l2 = 2 === i4 ? "<svg>" : 3 === i4 ? "<math>" : "", c4 = f; 38 - for (let i5 = 0; i5 < s4; i5++) { 39 - const s5 = t4[i5]; 40 - let a2, u4, d2 = -1, y2 = 0; 41 - for (; y2 < s5.length && (c4.lastIndex = y2, u4 = c4.exec(s5), null !== u4); ) y2 = c4.lastIndex, c4 === f ? "!--" === u4[1] ? c4 = v : void 0 !== u4[1] ? c4 = _ : void 0 !== u4[2] ? ($.test(u4[2]) && (r4 = RegExp("</" + u4[2], "g")), c4 = m) : void 0 !== u4[3] && (c4 = m) : c4 === m ? ">" === u4[0] ? (c4 = r4 ?? f, d2 = -1) : void 0 === u4[1] ? d2 = -2 : (d2 = c4.lastIndex - u4[2].length, a2 = u4[1], c4 = void 0 === u4[3] ? m : '"' === u4[3] ? g : p) : c4 === g || c4 === p ? c4 = m : c4 === v || c4 === _ ? c4 = f : (c4 = m, r4 = void 0); 42 - const x2 = c4 === m && t4[i5 + 1].startsWith("/>") ? " " : ""; 43 - l2 += c4 === f ? s5 + n : d2 >= 0 ? (o4.push(a2), s5.slice(0, d2) + e + s5.slice(d2) + h + x2) : s5 + h + (-2 === d2 ? i5 : x2); 36 + const s3 = t4.length - 1, o4 = []; 37 + let r3, l2 = 2 === i4 ? "<svg>" : 3 === i4 ? "<math>" : "", c3 = f; 38 + for (let i5 = 0; i5 < s3; i5++) { 39 + const s4 = t4[i5]; 40 + let a2, u3, d2 = -1, y2 = 0; 41 + for (; y2 < s4.length && (c3.lastIndex = y2, u3 = c3.exec(s4), null !== u3); ) y2 = c3.lastIndex, c3 === f ? "!--" === u3[1] ? c3 = v : void 0 !== u3[1] ? c3 = _ : void 0 !== u3[2] ? ($.test(u3[2]) && (r3 = RegExp("</" + u3[2], "g")), c3 = m) : void 0 !== u3[3] && (c3 = m) : c3 === m ? ">" === u3[0] ? (c3 = r3 ?? f, d2 = -1) : void 0 === u3[1] ? d2 = -2 : (d2 = c3.lastIndex - u3[2].length, a2 = u3[1], c3 = void 0 === u3[3] ? m : '"' === u3[3] ? g : p) : c3 === g || c3 === p ? c3 = m : c3 === v || c3 === _ ? c3 = f : (c3 = m, r3 = void 0); 42 + const x2 = c3 === m && t4[i5 + 1].startsWith("/>") ? " " : ""; 43 + l2 += c3 === f ? s4 + n : d2 >= 0 ? (o4.push(a2), s4.slice(0, d2) + e + s4.slice(d2) + h + x2) : s4 + h + (-2 === d2 ? i5 : x2); 44 44 } 45 - return [P(t4, l2 + (t4[s4] || "<?>") + (2 === i4 ? "</svg>" : 3 === i4 ? "</math>" : "")), o4]; 45 + return [P(t4, l2 + (t4[s3] || "<?>") + (2 === i4 ? "</svg>" : 3 === i4 ? "</math>" : "")), o4]; 46 46 }; 47 47 var N = class _N { 48 - constructor({ strings: t4, _$litType$: s4 }, n4) { 49 - let r4; 48 + constructor({ strings: t4, _$litType$: s3 }, n4) { 49 + let r3; 50 50 this.parts = []; 51 - let c4 = 0, a2 = 0; 52 - const u4 = t4.length - 1, d2 = this.parts, [f4, v3] = V(t4, s4); 53 - if (this.el = _N.createElement(f4, n4), C.currentNode = this.el.content, 2 === s4 || 3 === s4) { 51 + let c3 = 0, a2 = 0; 52 + const u3 = t4.length - 1, d2 = this.parts, [f4, v2] = V(t4, s3); 53 + if (this.el = _N.createElement(f4, n4), C.currentNode = this.el.content, 2 === s3 || 3 === s3) { 54 54 const t5 = this.el.content.firstChild; 55 55 t5.replaceWith(...t5.childNodes); 56 56 } 57 - for (; null !== (r4 = C.nextNode()) && d2.length < u4; ) { 58 - if (1 === r4.nodeType) { 59 - if (r4.hasAttributes()) for (const t5 of r4.getAttributeNames()) if (t5.endsWith(e)) { 60 - const i4 = v3[a2++], s5 = r4.getAttribute(t5).split(h), e3 = /([.?@])?(.*)/.exec(i4); 61 - d2.push({ type: 1, index: c4, name: e3[2], strings: s5, ctor: "." === e3[1] ? H : "?" === e3[1] ? I : "@" === e3[1] ? L : k }), r4.removeAttribute(t5); 62 - } else t5.startsWith(h) && (d2.push({ type: 6, index: c4 }), r4.removeAttribute(t5)); 63 - if ($.test(r4.tagName)) { 64 - const t5 = r4.textContent.split(h), s5 = t5.length - 1; 65 - if (s5 > 0) { 66 - r4.textContent = i ? i.emptyScript : ""; 67 - for (let i4 = 0; i4 < s5; i4++) r4.append(t5[i4], l()), C.nextNode(), d2.push({ type: 2, index: ++c4 }); 68 - r4.append(t5[s5], l()); 57 + for (; null !== (r3 = C.nextNode()) && d2.length < u3; ) { 58 + if (1 === r3.nodeType) { 59 + if (r3.hasAttributes()) for (const t5 of r3.getAttributeNames()) if (t5.endsWith(e)) { 60 + const i4 = v2[a2++], s4 = r3.getAttribute(t5).split(h), e3 = /([.?@])?(.*)/.exec(i4); 61 + d2.push({ type: 1, index: c3, name: e3[2], strings: s4, ctor: "." === e3[1] ? H : "?" === e3[1] ? I : "@" === e3[1] ? L : k }), r3.removeAttribute(t5); 62 + } else t5.startsWith(h) && (d2.push({ type: 6, index: c3 }), r3.removeAttribute(t5)); 63 + if ($.test(r3.tagName)) { 64 + const t5 = r3.textContent.split(h), s4 = t5.length - 1; 65 + if (s4 > 0) { 66 + r3.textContent = i ? i.emptyScript : ""; 67 + for (let i4 = 0; i4 < s4; i4++) r3.append(t5[i4], l()), C.nextNode(), d2.push({ type: 2, index: ++c3 }); 68 + r3.append(t5[s4], l()); 69 69 } 70 70 } 71 - } else if (8 === r4.nodeType) if (r4.data === o) d2.push({ type: 2, index: c4 }); 71 + } else if (8 === r3.nodeType) if (r3.data === o) d2.push({ type: 2, index: c3 }); 72 72 else { 73 73 let t5 = -1; 74 - for (; -1 !== (t5 = r4.data.indexOf(h, t5 + 1)); ) d2.push({ type: 7, index: c4 }), t5 += h.length - 1; 74 + for (; -1 !== (t5 = r3.data.indexOf(h, t5 + 1)); ) d2.push({ type: 7, index: c3 }), t5 += h.length - 1; 75 75 } 76 - c4++; 76 + c3++; 77 77 } 78 78 } 79 79 static createElement(t4, i4) { 80 - const s4 = r.createElement("template"); 81 - return s4.innerHTML = t4, s4; 80 + const s3 = r.createElement("template"); 81 + return s3.innerHTML = t4, s3; 82 82 } 83 83 }; 84 - function S(t4, i4, s4 = t4, e3) { 84 + function S(t4, i4, s3 = t4, e3) { 85 85 if (i4 === T) return i4; 86 - let h3 = void 0 !== e3 ? s4._$Co?.[e3] : s4._$Cl; 86 + let h3 = void 0 !== e3 ? s3._$Co?.[e3] : s3._$Cl; 87 87 const o4 = c(i4) ? void 0 : i4._$litDirective$; 88 - return h3?.constructor !== o4 && (h3?._$AO?.(false), void 0 === o4 ? h3 = void 0 : (h3 = new o4(t4), h3._$AT(t4, s4, e3)), void 0 !== e3 ? (s4._$Co ??= [])[e3] = h3 : s4._$Cl = h3), void 0 !== h3 && (i4 = S(t4, h3._$AS(t4, i4.values), h3, e3)), i4; 88 + return h3?.constructor !== o4 && (h3?._$AO?.(false), void 0 === o4 ? h3 = void 0 : (h3 = new o4(t4), h3._$AT(t4, s3, e3)), void 0 !== e3 ? (s3._$Co ??= [])[e3] = h3 : s3._$Cl = h3), void 0 !== h3 && (i4 = S(t4, h3._$AS(t4, i4.values), h3, e3)), i4; 89 89 } 90 90 var M = class { 91 91 constructor(t4, i4) { ··· 98 98 return this._$AM._$AU; 99 99 } 100 100 u(t4) { 101 - const { el: { content: i4 }, parts: s4 } = this._$AD, e3 = (t4?.creationScope ?? r).importNode(i4, true); 101 + const { el: { content: i4 }, parts: s3 } = this._$AD, e3 = (t4?.creationScope ?? r).importNode(i4, true); 102 102 C.currentNode = e3; 103 - let h3 = C.nextNode(), o4 = 0, n4 = 0, l2 = s4[0]; 103 + let h3 = C.nextNode(), o4 = 0, n4 = 0, l2 = s3[0]; 104 104 for (; void 0 !== l2; ) { 105 105 if (o4 === l2.index) { 106 106 let i5; 107 - 2 === l2.type ? i5 = new R(h3, h3.nextSibling, this, t4) : 1 === l2.type ? i5 = new l2.ctor(h3, l2.name, l2.strings, this, t4) : 6 === l2.type && (i5 = new z(h3, this, t4)), this._$AV.push(i5), l2 = s4[++n4]; 107 + 2 === l2.type ? i5 = new R(h3, h3.nextSibling, this, t4) : 1 === l2.type ? i5 = new l2.ctor(h3, l2.name, l2.strings, this, t4) : 6 === l2.type && (i5 = new z(h3, this, t4)), this._$AV.push(i5), l2 = s3[++n4]; 108 108 } 109 109 o4 !== l2?.index && (h3 = C.nextNode(), o4++); 110 110 } ··· 112 112 } 113 113 p(t4) { 114 114 let i4 = 0; 115 - for (const s4 of this._$AV) void 0 !== s4 && (void 0 !== s4.strings ? (s4._$AI(t4, s4, i4), i4 += s4.strings.length - 2) : s4._$AI(t4[i4])), i4++; 115 + for (const s3 of this._$AV) void 0 !== s3 && (void 0 !== s3.strings ? (s3._$AI(t4, s3, i4), i4 += s3.strings.length - 2) : s3._$AI(t4[i4])), i4++; 116 116 } 117 117 }; 118 118 var R = class _R { 119 119 get _$AU() { 120 120 return this._$AM?._$AU ?? this._$Cv; 121 121 } 122 - constructor(t4, i4, s4, e3) { 123 - this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t4, this._$AB = i4, this._$AM = s4, this.options = e3, this._$Cv = e3?.isConnected ?? true; 122 + constructor(t4, i4, s3, e3) { 123 + this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t4, this._$AB = i4, this._$AM = s3, this.options = e3, this._$Cv = e3?.isConnected ?? true; 124 124 } 125 125 get parentNode() { 126 126 let t4 = this._$AA.parentNode; ··· 146 146 this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t4 : this.T(r.createTextNode(t4)), this._$AH = t4; 147 147 } 148 148 $(t4) { 149 - const { values: i4, _$litType$: s4 } = t4, e3 = "number" == typeof s4 ? this._$AC(t4) : (void 0 === s4.el && (s4.el = N.createElement(P(s4.h, s4.h[0]), this.options)), s4); 149 + const { values: i4, _$litType$: s3 } = t4, e3 = "number" == typeof s3 ? this._$AC(t4) : (void 0 === s3.el && (s3.el = N.createElement(P(s3.h, s3.h[0]), this.options)), s3); 150 150 if (this._$AH?._$AD === e3) this._$AH.p(i4); 151 151 else { 152 - const t5 = new M(e3, this), s5 = t5.u(this.options); 153 - t5.p(i4), this.T(s5), this._$AH = t5; 152 + const t5 = new M(e3, this), s4 = t5.u(this.options); 153 + t5.p(i4), this.T(s4), this._$AH = t5; 154 154 } 155 155 } 156 156 _$AC(t4) { ··· 160 160 k(t4) { 161 161 a(this._$AH) || (this._$AH = [], this._$AR()); 162 162 const i4 = this._$AH; 163 - let s4, e3 = 0; 164 - for (const h3 of t4) e3 === i4.length ? i4.push(s4 = new _R(this.O(l()), this.O(l()), this, this.options)) : s4 = i4[e3], s4._$AI(h3), e3++; 165 - e3 < i4.length && (this._$AR(s4 && s4._$AB.nextSibling, e3), i4.length = e3); 163 + let s3, e3 = 0; 164 + for (const h3 of t4) e3 === i4.length ? i4.push(s3 = new _R(this.O(l()), this.O(l()), this, this.options)) : s3 = i4[e3], s3._$AI(h3), e3++; 165 + e3 < i4.length && (this._$AR(s3 && s3._$AB.nextSibling, e3), i4.length = e3); 166 166 } 167 167 _$AR(t4 = this._$AA.nextSibling, i4) { 168 168 for (this._$AP?.(false, true, i4); t4 !== this._$AB; ) { ··· 181 181 get _$AU() { 182 182 return this._$AM._$AU; 183 183 } 184 - constructor(t4, i4, s4, e3, h3) { 185 - this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t4, this.name = i4, this._$AM = e3, this.options = h3, s4.length > 2 || "" !== s4[0] || "" !== s4[1] ? (this._$AH = Array(s4.length - 1).fill(new String()), this.strings = s4) : this._$AH = E; 184 + constructor(t4, i4, s3, e3, h3) { 185 + this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t4, this.name = i4, this._$AM = e3, this.options = h3, s3.length > 2 || "" !== s3[0] || "" !== s3[1] ? (this._$AH = Array(s3.length - 1).fill(new String()), this.strings = s3) : this._$AH = E; 186 186 } 187 - _$AI(t4, i4 = this, s4, e3) { 187 + _$AI(t4, i4 = this, s3, e3) { 188 188 const h3 = this.strings; 189 189 let o4 = false; 190 190 if (void 0 === h3) t4 = S(this, t4, i4, 0), o4 = !c(t4) || t4 !== this._$AH && t4 !== T, o4 && (this._$AH = t4); 191 191 else { 192 192 const e4 = t4; 193 - let n4, r4; 194 - for (t4 = h3[0], n4 = 0; n4 < h3.length - 1; n4++) r4 = S(this, e4[s4 + n4], i4, n4), r4 === T && (r4 = this._$AH[n4]), o4 ||= !c(r4) || r4 !== this._$AH[n4], r4 === E ? t4 = E : t4 !== E && (t4 += (r4 ?? "") + h3[n4 + 1]), this._$AH[n4] = r4; 193 + let n4, r3; 194 + for (t4 = h3[0], n4 = 0; n4 < h3.length - 1; n4++) r3 = S(this, e4[s3 + n4], i4, n4), r3 === T && (r3 = this._$AH[n4]), o4 ||= !c(r3) || r3 !== this._$AH[n4], r3 === E ? t4 = E : t4 !== E && (t4 += (r3 ?? "") + h3[n4 + 1]), this._$AH[n4] = r3; 195 195 } 196 196 o4 && !e3 && this.j(t4); 197 197 } ··· 216 216 } 217 217 }; 218 218 var L = class extends k { 219 - constructor(t4, i4, s4, e3, h3) { 220 - super(t4, i4, s4, e3, h3), this.type = 5; 219 + constructor(t4, i4, s3, e3, h3) { 220 + super(t4, i4, s3, e3, h3), this.type = 5; 221 221 } 222 222 _$AI(t4, i4 = this) { 223 223 if ((t4 = S(this, t4, i4, 0) ?? E) === T) return; 224 - const s4 = this._$AH, e3 = t4 === E && s4 !== E || t4.capture !== s4.capture || t4.once !== s4.once || t4.passive !== s4.passive, h3 = t4 !== E && (s4 === E || e3); 225 - e3 && this.element.removeEventListener(this.name, this, s4), h3 && this.element.addEventListener(this.name, this, t4), this._$AH = t4; 224 + const s3 = this._$AH, e3 = t4 === E && s3 !== E || t4.capture !== s3.capture || t4.once !== s3.once || t4.passive !== s3.passive, h3 = t4 !== E && (s3 === E || e3); 225 + e3 && this.element.removeEventListener(this.name, this, s3), h3 && this.element.addEventListener(this.name, this, t4), this._$AH = t4; 226 226 } 227 227 handleEvent(t4) { 228 228 "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t4) : this._$AH.handleEvent(t4); 229 229 } 230 230 }; 231 231 var z = class { 232 - constructor(t4, i4, s4) { 233 - this.element = t4, this.type = 6, this._$AN = void 0, this._$AM = i4, this.options = s4; 232 + constructor(t4, i4, s3) { 233 + this.element = t4, this.type = 6, this._$AN = void 0, this._$AM = i4, this.options = s3; 234 234 } 235 235 get _$AU() { 236 236 return this._$AM._$AU; ··· 242 242 var Z = { M: e, P: h, A: o, C: 1, L: V, R: M, D: u, V: S, I: R, H: k, N: I, U: L, B: H, F: z }; 243 243 var j = t.litHtmlPolyfillSupport; 244 244 j?.(N, R), (t.litHtmlVersions ??= []).push("3.3.1"); 245 - var B = (t4, i4, s4) => { 246 - const e3 = s4?.renderBefore ?? i4; 245 + var B = (t4, i4, s3) => { 246 + const e3 = s3?.renderBefore ?? i4; 247 247 let h3 = e3._$litPart$; 248 248 if (void 0 === h3) { 249 - const t5 = s4?.renderBefore ?? null; 250 - e3._$litPart$ = h3 = new R(i4.insertBefore(l(), t5), t5, void 0, s4 ?? {}); 249 + const t5 = s3?.renderBefore ?? null; 250 + e3._$litPart$ = h3 = new R(i4.insertBefore(l(), t5), t5, void 0, s3 ?? {}); 251 251 } 252 252 return h3._$AI(t4), h3; 253 253 }; ··· 275 275 // node_modules/lit-html/directive-helpers.js 276 276 var { I: t3 } = Z; 277 277 var f2 = (o4) => void 0 === o4.strings; 278 - var r2 = () => document.createComment(""); 279 - var s2 = (o4, i4, n4) => { 280 - const e3 = o4._$AA.parentNode, l2 = void 0 === i4 ? o4._$AB : i4._$AA; 281 - if (void 0 === n4) { 282 - const i5 = e3.insertBefore(r2(), l2), d2 = e3.insertBefore(r2(), l2); 283 - n4 = new t3(i5, d2, o4, o4.options); 284 - } else { 285 - const t4 = n4._$AB.nextSibling, i5 = n4._$AM, d2 = i5 !== o4; 286 - if (d2) { 287 - let t5; 288 - n4._$AQ?.(o4), n4._$AM = o4, void 0 !== n4._$AP && (t5 = o4._$AU) !== i5._$AU && n4._$AP(t5); 289 - } 290 - if (t4 !== l2 || d2) { 291 - let o5 = n4._$AA; 292 - for (; o5 !== t4; ) { 293 - const t5 = o5.nextSibling; 294 - e3.insertBefore(o5, l2), o5 = t5; 295 - } 296 - } 297 - } 298 - return n4; 299 - }; 300 - var v2 = (o4, t4, i4 = o4) => (o4._$AI(t4, i4), o4); 301 278 var u2 = {}; 302 279 var m2 = (o4, t4 = u2) => o4._$AH = t4; 303 - var p2 = (o4) => o4._$AH; 304 - var M2 = (o4) => { 305 - o4._$AR(), o4._$AA.remove(); 306 - }; 307 280 308 281 // node_modules/lit-html/directives/keyed.js 309 282 var i3 = e2(class extends i2 { 310 283 constructor() { 311 284 super(...arguments), this.key = E; 312 285 } 313 - render(r4, t4) { 314 - return this.key = r4, t4; 286 + render(r3, t4) { 287 + return this.key = r3, t4; 315 288 } 316 - update(r4, [t4, e3]) { 317 - return t4 !== this.key && (m2(r4), this.key = t4), e3; 318 - } 319 - }); 320 - 321 - // node_modules/lit-html/directives/repeat.js 322 - var u3 = (e3, s4, t4) => { 323 - const r4 = /* @__PURE__ */ new Map(); 324 - for (let l2 = s4; l2 <= t4; l2++) r4.set(e3[l2], l2); 325 - return r4; 326 - }; 327 - var c2 = e2(class extends i2 { 328 - constructor(e3) { 329 - if (super(e3), e3.type !== t2.CHILD) throw Error("repeat() can only be used in text expressions"); 330 - } 331 - dt(e3, s4, t4) { 332 - let r4; 333 - void 0 === t4 ? t4 = s4 : void 0 !== s4 && (r4 = s4); 334 - const l2 = [], o4 = []; 335 - let i4 = 0; 336 - for (const s5 of e3) l2[i4] = r4 ? r4(s5, i4) : i4, o4[i4] = t4(s5, i4), i4++; 337 - return { values: o4, keys: l2 }; 338 - } 339 - render(e3, s4, t4) { 340 - return this.dt(e3, s4, t4).values; 341 - } 342 - update(s4, [t4, r4, c4]) { 343 - const d2 = p2(s4), { values: p3, keys: a2 } = this.dt(t4, r4, c4); 344 - if (!Array.isArray(d2)) return this.ut = a2, p3; 345 - const h3 = this.ut ??= [], v3 = []; 346 - let m3, y2, x2 = 0, j2 = d2.length - 1, k2 = 0, w2 = p3.length - 1; 347 - for (; x2 <= j2 && k2 <= w2; ) if (null === d2[x2]) x2++; 348 - else if (null === d2[j2]) j2--; 349 - else if (h3[x2] === a2[k2]) v3[k2] = v2(d2[x2], p3[k2]), x2++, k2++; 350 - else if (h3[j2] === a2[w2]) v3[w2] = v2(d2[j2], p3[w2]), j2--, w2--; 351 - else if (h3[x2] === a2[w2]) v3[w2] = v2(d2[x2], p3[w2]), s2(s4, v3[w2 + 1], d2[x2]), x2++, w2--; 352 - else if (h3[j2] === a2[k2]) v3[k2] = v2(d2[j2], p3[k2]), s2(s4, d2[x2], d2[j2]), j2--, k2++; 353 - else if (void 0 === m3 && (m3 = u3(a2, k2, w2), y2 = u3(h3, x2, j2)), m3.has(h3[x2])) if (m3.has(h3[j2])) { 354 - const e3 = y2.get(a2[k2]), t5 = void 0 !== e3 ? d2[e3] : null; 355 - if (null === t5) { 356 - const e4 = s2(s4, d2[x2]); 357 - v2(e4, p3[k2]), v3[k2] = e4; 358 - } else v3[k2] = v2(t5, p3[k2]), s2(s4, d2[x2], t5), d2[e3] = null; 359 - k2++; 360 - } else M2(d2[j2]), j2--; 361 - else M2(d2[x2]), x2++; 362 - for (; k2 <= w2; ) { 363 - const e3 = s2(s4, v3[w2 + 1]); 364 - v2(e3, p3[k2]), v3[k2++] = e3; 365 - } 366 - for (; x2 <= j2; ) { 367 - const e3 = d2[x2++]; 368 - null !== e3 && M2(e3); 369 - } 370 - return this.ut = a2, m2(s4, v3), T; 289 + update(r3, [t4, e3]) { 290 + return t4 !== this.key && (m2(r3), this.key = t4), e3; 371 291 } 372 292 }); 373 293 374 294 // node_modules/lit-html/async-directive.js 375 - var s3 = (i4, t4) => { 295 + var s2 = (i4, t4) => { 376 296 const e3 = i4._$AN; 377 297 if (void 0 === e3) return false; 378 - for (const i5 of e3) i5._$AO?.(t4, false), s3(i5, t4); 298 + for (const i5 of e3) i5._$AO?.(t4, false), s2(i5, t4); 379 299 return true; 380 300 }; 381 301 var o2 = (i4) => { ··· 385 305 e3 = t4._$AN, e3.delete(i4), i4 = t4; 386 306 } while (0 === e3?.size); 387 307 }; 388 - var r3 = (i4) => { 308 + var r2 = (i4) => { 389 309 for (let t4; t4 = i4._$AM; i4 = t4) { 390 310 let e3 = t4._$AN; 391 311 if (void 0 === e3) t4._$AN = e3 = /* @__PURE__ */ new Set(); 392 312 else if (e3.has(i4)) break; 393 - e3.add(i4), c3(t4); 313 + e3.add(i4), c2(t4); 394 314 } 395 315 }; 396 316 function h2(i4) { 397 - void 0 !== this._$AN ? (o2(this), this._$AM = i4, r3(this)) : this._$AM = i4; 317 + void 0 !== this._$AN ? (o2(this), this._$AM = i4, r2(this)) : this._$AM = i4; 398 318 } 399 319 function n2(i4, t4 = false, e3 = 0) { 400 - const r4 = this._$AH, h3 = this._$AN; 401 - if (void 0 !== h3 && 0 !== h3.size) if (t4) if (Array.isArray(r4)) for (let i5 = e3; i5 < r4.length; i5++) s3(r4[i5], false), o2(r4[i5]); 402 - else null != r4 && (s3(r4, false), o2(r4)); 403 - else s3(this, i4); 320 + const r3 = this._$AH, h3 = this._$AN; 321 + if (void 0 !== h3 && 0 !== h3.size) if (t4) if (Array.isArray(r3)) for (let i5 = e3; i5 < r3.length; i5++) s2(r3[i5], false), o2(r3[i5]); 322 + else null != r3 && (s2(r3, false), o2(r3)); 323 + else s2(this, i4); 404 324 } 405 - var c3 = (i4) => { 325 + var c2 = (i4) => { 406 326 i4.type == t2.CHILD && (i4._$AP ??= n2, i4._$AQ ??= h2); 407 327 }; 408 328 var f3 = class extends i2 { ··· 410 330 super(...arguments), this._$AN = void 0; 411 331 } 412 332 _$AT(i4, t4, e3) { 413 - super._$AT(i4, t4, e3), r3(this), this.isConnected = i4._$AU; 333 + super._$AT(i4, t4, e3), r2(this), this.isConnected = i4._$AU; 414 334 } 415 335 _$AO(i4, t4 = true) { 416 - i4 !== this.isConnected && (this.isConnected = i4, i4 ? this.reconnected?.() : this.disconnected?.()), t4 && (s3(this, i4), o2(this)); 336 + i4 !== this.isConnected && (this.isConnected = i4, i4 ? this.reconnected?.() : this.disconnected?.()), t4 && (s2(this, i4), o2(this)); 417 337 } 418 338 setValue(t4) { 419 339 if (f2(this._$Ct)) this._$Ct._$AI(t4, this); ··· 434 354 render(i4) { 435 355 return E; 436 356 } 437 - update(i4, [s4]) { 438 - const e3 = s4 !== this.G; 439 - return e3 && void 0 !== this.G && this.rt(void 0), (e3 || this.lt !== this.ct) && (this.G = s4, this.ht = i4.options?.host, this.rt(this.ct = i4.element)), E; 357 + update(i4, [s3]) { 358 + const e3 = s3 !== this.G; 359 + return e3 && void 0 !== this.G && this.rt(void 0), (e3 || this.lt !== this.ct) && (this.G = s3, this.ht = i4.options?.host, this.rt(this.ct = i4.element)), E; 440 360 } 441 361 rt(t4) { 442 362 if (this.isConnected || (t4 = void 0), "function" == typeof this.G) { 443 363 const i4 = this.ht ?? globalThis; 444 - let s4 = o3.get(i4); 445 - void 0 === s4 && (s4 = /* @__PURE__ */ new WeakMap(), o3.set(i4, s4)), void 0 !== s4.get(this.G) && this.G.call(this.ht, void 0), s4.set(this.G, t4), void 0 !== t4 && this.G.call(this.ht, t4); 364 + let s3 = o3.get(i4); 365 + void 0 === s3 && (s3 = /* @__PURE__ */ new WeakMap(), o3.set(i4, s3)), void 0 !== s3.get(this.G) && this.G.call(this.ht, void 0), s3.set(this.G, t4), void 0 !== t4 && this.G.call(this.ht, t4); 446 366 } else this.G.value = t4; 447 367 } 448 368 get lt() { ··· 459 379 x as html, 460 380 i3 as keyed, 461 381 n3 as ref, 462 - B as render, 463 - c2 as repeat 382 + B as render 464 383 }; 465 384 /*! Bundled license information: 466 385 467 386 lit-html/lit-html.js: 468 387 lit-html/directive.js: 469 - lit-html/directives/repeat.js: 470 388 lit-html/async-directive.js: 471 389 (** 472 390 * @license
+1 -2
src/js/views/chatDetail.view.js
··· 432 432 onLongPress, 433 433 isSelected, 434 434 }) { 435 - // return "This is a message"; 436 435 return html` 437 436 <div 438 437 class="message-wrapper ${isSelected ? "message-wrapper-active" : ""}" 439 438 > 440 439 <div 441 - ref=${ref((el) => { 440 + ${ref((el) => { 442 441 if (el) { 443 442 enableLongPress(el); 444 443 }