PageSourceSearch

https://chessbook.com/_build/assets/ColorSamples-CIexeGz8.js

js chessbook.com collected 2026-09-25 20:22:29 UTC 10,892 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`chessbook-web@bb8efeb7ea07680c803efd4da4817360df75da47`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a43e7775-b532-46ee-a5af-29c92deac3d8`,e._sentryDebugIdIdentifier=`sentry-dbid-a43e7775-b532-46ee-a5af-29c92deac3d8`)}catch{}})();import{O as e,P as t,S as n,T as r,l as i,o as a,p as o,x as s}from"./web-zdZ8e3vS.js";import{c,i as l}from"./design_system-FNTZTTEV.js";import{At as u,F as d,Kn as f,M as p,N as m,R as ee,Tt as te,Ut as ne,W as h,Wn as g,kt as _,nn as v,r as y}from"./SidebarTemplate-C1Xhep8F.js";import{n as re,t as ie}from"./styles-AcG4WnLQ.js";import{n as b}from"./GameResultsBar-D4-lXtI4.js";import{n as x,r as ae}from"./CharacteristicsRow-jG0Tu7XK.js";import{n as S,t as C}from"./TrainerHistory-DnYgFIJI.js";import{t as w}from"./Button-B9C-AQO5.js";var T=r(`<div class="flex flex-col items-center gap-1"><div class="w-20 h-12 rounded"></div><span class="text-sm text-primary font-semibold"></span><span class="text-xs text-tertiary font-mono">L <!> C <!>`),oe=r(`<div class="flex flex-col gap-1"><!><!><!>`),se=r(`<div class="grid grid-cols-3 gap-x-8 gap-y-1">`),ce=r(`<div class="flex flex-row gap-4 text-lg font-bold"><span data-glyph=inaccuracy></span><span data-glyph=mistake></span><span data-glyph=blunder>`),le=r(`<div class="flex flex-row gap-3 text-sm font-semibold">`),ue=r(`<div class="flex flex-row items-center gap-4"><div class="flex flex-row items-center gap-1.5"><!><!></div><span class="text-highlight text-sm font-semibold">text-highlight`),de=r(`<div class="relative w-full rounded-[1px] overflow-hidden h-1 my-1 bg-gray-40"><div class="h-full w-[55%] bg-learning"></div><div class="absolute right-0 top-0 h-full w-[20%] text-tertiary bg-current">`),fe=r(`<div class="w-10 h-10">`),pe=r(`<div class="flex flex-col gap-1 rounded px-4 py-3 text-sm font-semibold bg-gray-21"><span class=text-primary>text-primary</span><span class=text-secondary>text-secondary</span><span class=text-tertiary>text-tertiary`),me=r(`<div class="flex flex-col gap-1 text-sm font-semibold">`),E=r(`<div class="w-72 bg-gray-21 py-3 flex flex-col gap-2"><!><!><!><!>`),D=r(`<div class="grid grid-cols-2 gap-2">`),O=r(`<div class="flex flex-row flex-wrap gap-2">`),k=r(`<div class="flex flex-col gap-6"><div class="flex flex-row flex-wrap gap-6 items-end"><div class="w-px self-stretch bg-gray-40"></div><!></div><div class="flex flex-row flex-wrap items-center gap-8"><!><!><!><!></div><div class="flex flex-row flex-wrap items-start gap-8"><!><!><!><!></div><div class="flex flex-row flex-wrap items-center gap-8"><!><!><!><!><!><!></div><div class="flex flex-row flex-wrap items-start gap-8"><!><!><!><!>`),A=r(`<span>`),j=r(`<span>text-`),M=r(`<div class="flex flex-row items-center gap-1.5 rounded bg-gray-21 px-2 py-1"><div></div><span></span><span class="text-xs text-tertiary">×`),N=r(`<div><span class="text-xs text-tertiary">`),P=r(`<div class="flex flex-col gap-1"><span class="text-xs text-tertiary"></span><div class="relative overflow-hidden rounded-sm"style=width:192px;height:192px><div class=absolute style=width:768px;height:768px;left:-96px;top:-192px>`),F=r(`<div class="flex flex-col gap-6"><div class="flex flex-row flex-wrap gap-8"><div class="flex flex-col gap-1"><span class="text-xs text-tertiary">Last move, and arrows: default at three weights, success, danger</span><div class="w-[400px] h-[400px]"></div></div><div class="flex flex-col gap-1"><span class="text-xs text-tertiary">As black: highlighted square, danger and success coloured squares</span><div class="w-[400px] h-[400px]"></div></div></div><div class="flex flex-row flex-wrap gap-6">`),I=[`success`,`danger`,`warning`,`learning`,`caution`],L=[[`backgroundColor`,l.backgroundColor],[`border`,l.border],[`sidebar button`,l.components.sidebar_button_primary],[`sidebar button hover`,l.components.sidebar_button_primary_hover],[`buttonSecondary`,l.buttonSecondary]],R=[[`blue-45`,1],[`blue-55`,4],[`blue-65`,1],[`blue-70`,10],[`blue-75`,13],[`blue-80`,7],[`green-30`,1],[`green-70`,1],[`green-90`,2],[`green-95`,1],[`orange-30`,2],[`orange-65`,3],[`orange-70`,5],[`orange-75`,1],[`orange-80`,1],[`orangeBright-75`,3],[`purple-55`,3],[`purple-60`,3],[`purple-65`,1],[`red-30`,1],[`red-60`,3],[`red-65`,2],[`red-75`,2],[`red-80`,1],[`red-90`,1],[`teal-80`,1],[`teal-85`,1],[`yellow-60`,1]],he=[`primary`,`basic`,`basicSecondary`,`extraDark`,`outlineLight`,`outlineDark`,`disabled`,`primaryDisabled`],z=e=>{let{L:t,C:r}=c(e.color);
1var a=T(),s=a.firstChild,l=s.nextSibling,u=l.nextSibling,d=u.firstChild.nextSibling,f=d.nextSibling.nextSibling;return o(l,()=>e.label),o(u,()=>t.toFixed(0),d),o(u,()=>r.toFixed(2),f),i(()=>e.color,e=>{n(s,`background-color`,e)}),a},B=()=>{var n=k(),r=n.firstChild,s=r.firstChild.nextSibling,c=r.nextSibling,d=c.firstChild,m=d.nextSibling,T=m.nextSibling,N=T.nextSibling,P=c.nextSibling,F=P.firstChild,B=F.nextSibling,H=B.nextSibling,U=H.nextSibling,W=P.nextSibling,G=W.firstChild,K=G.nextSibling,q=K.nextSibling,J=q.nextSibling,Y=J.nextSibling,ge=Y.nextSibling,X=W.nextSibling,Z=X.firstChild,Q=Z.nextSibling,$=Q.nextSibling,_e=$.nextSibling;return o(r,t(e,{each:I,children:e=>t(z,{label:e,get color(){return l[e]}})}),r.firstChild),o(r,t(e,{each:L,children:([e,n])=>t(z,{label:e,color:n})}),s),o(c,t(V,{label:`Repertoire stats`,widget:`stats`,get children(){var e=oe(),n=e.firstChild,r=n.nextSibling,i=r.nextSibling;return o(e,t(x,{value:.9}),n),o(e,t(x,{value:.5}),r),o(e,t(x,{value:.2}),i),e}}),d),o(c,t(V,{label:`Move ratings`,widget:`ratings`,wide:!0,get children(){return t(h,{counts:{good:12,inaccuracy:2,mistake:1,blunder:0}})}}),m),o(c,t(V,{label:`Trainer history`,widget:`trainer`,wide:!0,get children(){return t(C,{entries:[{passed:!0},{passed:!1},{passed:!0},{passed:!0}],onSelect:()=>{}})}}),T),o(c,t(V,{label:`Review counters`,widget:`counters`,wide:!0,get children(){return t(te,{icons:[{icon:`fa fa-clock`,class:`text-learning`,text:`12 Due`},{icon:`fa-kit fa-tick`,class:`text-inverse bg-success rounded-full`,text:8},{icon:`fa-kit fa-cross`,class:`text-inverse bg-danger rounded-full`,text:2},{icon:null,class:`text-warning`,text:`3 Remaining`}]})}}),N),o(P,t(V,{label:`Move tags`,widget:`tags`,wide:!0,get children(){var n=se();return o(n,t(e,{get each(){return Object.values(_)},children:e=>t(u,e)})),n}}),F),o(P,t(V,{label:`Annotation glyphs`,widget:`glyphs`,wide:!0,get children(){var e=ce(),t=e.firstChild,n=t.nextSibling,r=n.nextSibling;return o(t,()=>g(f.Inaccuracy)),o(n,()=>g(f.Mistake)),o(r,()=>g(f.Blunder)),e}}),B),o(P,t(V,{label:`Eval wording`,widget:`eval`,wide:!0,get children(){var n=le();return o(n,t(e,{each:[.95,.75,.5,.35,.2,.05],children:e=>{let[t,n]=p(e);var r=A();return o(r,t),i(()=>`text-${n}`,(e,t)=>{a(r,e,t)}),r}})),n}}),H),o(P,t(V,{label:`Badges`,widget:`badges`,wide:!0,get children(){var e=ue(),n=e.firstChild,r=n.firstChild,i=r.nextSibling;return o(e,t(S,{}),e.firstChild),o(n,t(v,{side:`white`}),r),o(n,t(v,{side:`black`}),i),e}}),U),o(W,t(V,{label:`Coverage bar`,widget:`coverage`,get children(){return t(ae,{value:.8})}}),G),o(W,t(V,{label:`Loading bar`,widget:`loading`,get children(){return t(ne,{value:.6})}}),K),o(W,t(V,{label:`Mastery bar, part locked (replica)`,widget:`mastery`,get children(){return de()}}),q),o(W,t(V,{label:`Progress circle`,widget:`circle`,get children(){var e=fe();return o(e,t(ee,{progress:.7})),e}}),J),o(W,t(V,{label:`Game results, as white`,widget:`results`,get children(){return t(b,{gameResults:{white:46,draw:12,black:42},lowConfidence:!1,activeSide:`white`})}}),Y),o(W,t(V,{label:`Game results, as black`,widget:`results`,get children(){return t(b,{gameResults:{white:46,draw:12,black:42},lowConfidence:!1,activeSide:`black`})}}),ge),o(X,t(V,{label:`Text on the app background`,widget:`text`,wide:!0,get children(){var n=pe();return n.firstChild.nextSibling.nextSibling,o(n,t(e,{each:I,children:e=>(()=>{var t=j();return t.firstChild,o(t,e,null),i(()=>`text-${e}`,(e,n)=>{a(t,e,n)}),t})()}),null),n}}),Z),o(X,t(V,{label:`Inverse text on the tokens`,widget:`text-inverse`,wide:!0,get children(){var n=me();return o(n,t(e,{each:I,children:e=>(()=>{var t=A();return o(t,e),i(()=>`rounded px-3 py-1 text-inverse bg-${e}`,(e,n)=>{a(t,e,n)}),t})()})),n}}),Q),o(X,t(V,{label:`Sidebar actions`,widget:`sidebar-actions`,wide:!0,get children(){var e=E(),n=e.firstChild,r=n.nextSibling,i=r.nextSibling,a=i.nextSibling;return o(e,t(y,{action:{style:`primary`,text:`Practice all moves`,right:`12 due`}}),n),o(e,t(y,{first:!0,action:{style:`secondary`,text:`Browse repertoire`,right:`240 moves`}}),r),o(e,t(y,{action:{style:`tertiary`,text:`Delete repertoire`}}),i),o(e,t(y,{action:{style:`wide`,text:`Wide action`,subtext:`With some subtext`}}),a),e}}),$),o(X,t(V,{label:`Buttons`,widget:`buttons`,wide:!0,get children(){var n=D();return o(n,t(e,{each:he,children:e=>t(w,{get style(){return re(ie.buttons[e])},children:e})})),n}}),_e),o(n,t(V,{label:`Ramp shades used directly in the app (× uses)`,widget:`one-offs`,wide:!0,get children(){var n=O();return o(n,t(e,{each:R,children:([e,t])=>(()=>{var n=M(),r=n.firstChild,s=r.nextSibling,c=s.nextSibling;return c.firstChild,o(s,e),o(c,t,null),i(()=>({e:`w-4 h-4 rounded-sm bg-${e}`,t:`text-xs font-semibold text-${e}`}),({e,t},n)=>{a(r,e,n?.e),a(s,t,n?.t)}),n})()})),n}}),null),n},V=e=>(()=>{var t=N(),n=t.firstChild;return o(n,()=>e.label),o(t,()=>e.children,null),i(()=>({e:`flex flex-col gap-1 items-start ${e.wide?`w-auto`:`w-44`}`,t:e.widget}),({e,t:n},r)=>{a(t,e,r?.e),n!==r?.t&&s(t,`data-widget`,n)}),t})(),H=`r1bqkbnr/pppp1ppp/2n5/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq -`,U=[`correct`,`incorrect`,`alternative`,`bonus`,`inaccuracy`,`mistake`,`blunder`],W=e=>{let n=m({epd:H,side:`white`,nextMove:`Bb5`,hideCoordinates:!0});n.set(t=>{t.frozen=!0,t.moveFeedback={result:e.result,square:`b5`,settled:!0}});var r=P(),i=r.firstChild,a=i.nextSibling.firstChild;
1return o(i,()=>e.result),o(a,t(d,{chessboardInterface:n})),r},G=()=>{let n=m({epd:H,side:`white`,nextMove:`Bb5`});n.set(e=>{e.frozen=!0,e.probabilityArrows=[{fromSquare:`a7`,toSquare:`a6`,san:`a6`,weight:1,label:`A`},{fromSquare:`g8`,toSquare:`f6`,san:`Nf6`,weight:.6},{fromSquare:`f8`,toSquare:`c5`,san:`Bc5`,weight:.3},{fromSquare:`d7`,toSquare:`d6`,san:`d6`,weight:.4,color:l.success},{fromSquare:`f7`,toSquare:`f5`,san:`f5`,weight:.4,color:l.danger}]});let r=m({epd:H,side:`black`,nextMove:`Bb5`});r.setFrozen(!0),r.highlightSquare(`c6`),r.colorSquare(`e5`,l.danger,.6),r.colorSquare(`d4`,l.success,.6);var i=F(),a=i.firstChild,s=a.firstChild,c=s.firstChild.nextSibling,u=s.nextSibling.firstChild.nextSibling,f=a.nextSibling;return o(c,t(d,{chessboardInterface:n})),o(u,t(d,{chessboardInterface:r})),o(f,t(e,{each:U,children:e=>t(W,{result:e})})),i};export{B as n,G as t};

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.