PageSourceSearch

https://4u.ge/assets/chess_config_controller-1jwczr2b.digested.js

js 4u.ge collected 2026-10-03 01:52:15 UTC 2,168 bytes, 3 lines download raw bytes

1import{e}from"/assets/application-pevgkcf3.digested.js";import"/assets/application-w9hy54q6.digested.js";import{he,ns,rs,ni}from"/assets/application-f7svcfkc.digested.js";import"/assets/application-pp1gscaj.digested.js";class i extends e{static targets=["panel","status"];connect(){this._apply(this._readControls()),rs((t)=>{this._syncControls(t);let s=this._readControls();this._apply(s),this._syncControls(s)})}change(){this._commit(this._readControls()),this._announce(),window.dispatchEvent(new CustomEvent("chess:view-changed"))}facetChange(){let t={};this._panel().querySelectorAll("input[data-facet]:checked").forEach((a)=>{t[a.dataset.facet]=!0});let s=!!t.hideUnavailable;delete t.hideUnavailable,this.element.classList.toggle("rc-chess--hide-unavailable",s),window.dispatchEvent(new CustomEvent("chess:facets-changed",{detail:t})),this._announce()}_announce(){if(!this.hasStatusTarget)return;let t=this._panel(),s=(c)=>c?.closest(".rc-chess__config-opt")?.querySelector("span")?.textContent?.trim()||"",a=[s(t.querySelector('input[name="rc-chess-center"]:checked')),s(t.querySelector('input[name="rc-chess-bg"]:checked')),...[...t.querySelectorAll("input[data-facet]:checked")].map(s)].filter(Boolean);this.statusTarget.textContent=a.join(" · ")}_panel(){return this.hasPanelTarget?this.panelTarget:this.element}
1_readControls(){let t=this._panel(),s=t.querySelector('input[name="rc-chess-center"]:checked')?.value,a=t.querySelector('input[name="rc-chess-bg"]:checked')?.value,c=[...t.querySelectorAll('input[data-axis="mark"]:checked')].map((n)=>n.value);return he({center:s,bg:a,marks:c})}_syncControls(t){let s=this._panel(),a=(c,n)=>s.querySelectorAll(`input[name="${c}"]`).forEach((r)=>{r.checked=r.value===n});a("rc-chess-center",t.center),a("rc-chess-bg",t.bg),s.querySelectorAll('input[data-axis="mark"]').forEach((c)=>{c.checked=t.marks.includes(c.value)})}_commit(t){this._apply(t),ns(t)}_apply(t){let s=this.element;[...s.classList].forEach((a)=>{if(/^rc-chess--(center|bg|mark)-/.test(a)||a==="rc-chess--detailed")s.classList.remove(a)}),ni(t).forEach((a)=>s.classList.add(a))}}export{i as default};
2
3//# debugId=3301CE4233985ECC64756E2164756E21

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.