asciify-engine 4.25.0 → 4.26.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/field.cjs +1 -1
  3. package/dist/field.d.cts +132 -275
  4. package/dist/field.d.ts +132 -275
  5. package/dist/field.js +1 -1
  6. package/dist/glyph-field-C2fQIlnq.d.cts +292 -0
  7. package/dist/glyph-field-DRC-7uVf.d.ts +292 -0
  8. package/dist/kit/{chunk-KS3TL3S2.js → chunk-2FH6GGV6.js} +1 -1
  9. package/dist/kit/chunk-2GAV4OAK.js +1 -0
  10. package/dist/kit/{chunk-3F6FTBMN.js → chunk-2LBQ7QJT.js} +1 -1
  11. package/dist/kit/chunk-3LJ5C3U3.js +1 -0
  12. package/dist/kit/{chunk-SQGJ263V.js → chunk-3MHEDZLZ.js} +1 -1
  13. package/dist/kit/{chunk-KTYCGGRO.js → chunk-3OD5BMF5.js} +1 -1
  14. package/dist/kit/{chunk-OVCIHOOS.js → chunk-3VEMKDBW.js} +1 -1
  15. package/dist/kit/{chunk-H4DBJULW.js → chunk-42KMN727.js} +1 -1
  16. package/dist/kit/{chunk-PND73YEV.js → chunk-6G5MPND3.js} +1 -1
  17. package/dist/kit/{chunk-CA5J25SV.js → chunk-6WU247CB.js} +1 -1
  18. package/dist/kit/{chunk-6L2GAV5C.js → chunk-776H2BJ7.js} +1 -1
  19. package/dist/kit/{chunk-4SHQA3CO.js → chunk-7DXSG526.js} +1 -1
  20. package/dist/kit/{chunk-L3P7ZDSK.js → chunk-7M2FFUZ3.js} +1 -1
  21. package/dist/kit/{chunk-XYLLL2PQ.js → chunk-7NVKRDKE.js} +1 -1
  22. package/dist/kit/chunk-AIGAJMNN.js +1 -0
  23. package/dist/kit/{chunk-XXPDXJMQ.js → chunk-B3TY6UXJ.js} +1 -1
  24. package/dist/kit/chunk-BFBG3VHI.js +1 -0
  25. package/dist/kit/{chunk-6XNIZ52V.js → chunk-CG6SGQMY.js} +1 -1
  26. package/dist/kit/{chunk-KBXVIAWS.js → chunk-CGSWUO67.js} +1 -1
  27. package/dist/kit/{chunk-PFNFW4ZI.js → chunk-DCLJHSWM.js} +1 -1
  28. package/dist/kit/{chunk-QTVMD62E.js → chunk-DMRPBFLW.js} +1 -1
  29. package/dist/kit/{chunk-CR7QS3B3.js → chunk-E3FPFANJ.js} +1 -1
  30. package/dist/kit/{chunk-LUOIH2EM.js → chunk-EKYEA7Z4.js} +1 -1
  31. package/dist/kit/{chunk-QKZYCROD.js → chunk-F6F2C3RH.js} +1 -1
  32. package/dist/kit/chunk-FEAFQY7O.js +1 -0
  33. package/dist/kit/{chunk-A6EDU3UT.js → chunk-FHN3PPSI.js} +1 -1
  34. package/dist/kit/{chunk-FIWIUXNV.js → chunk-FPCCX4FM.js} +1 -1
  35. package/dist/kit/{chunk-EHYFSX5K.js → chunk-FWODCYYJ.js} +1 -1
  36. package/dist/kit/{chunk-PZAQLUAS.js → chunk-GBNV3GXG.js} +1 -1
  37. package/dist/kit/chunk-GF72XM4C.js +1 -0
  38. package/dist/kit/{chunk-MRDEO5HZ.js → chunk-GKR3ROYR.js} +1 -1
  39. package/dist/kit/{chunk-D4KCZSIP.js → chunk-H5KHXZWR.js} +1 -1
  40. package/dist/kit/{chunk-EJ3W4FN6.js → chunk-I5R2347P.js} +1 -1
  41. package/dist/kit/{chunk-ZYYLWSPY.js → chunk-IBNDCKEX.js} +1 -1
  42. package/dist/kit/{chunk-A73S2BCE.js → chunk-ILXVBO7M.js} +1 -1
  43. package/dist/kit/{chunk-QZHZWO7N.js → chunk-JELJEEJO.js} +1 -1
  44. package/dist/kit/{chunk-XDNCXCR7.js → chunk-K6JX64AS.js} +1 -1
  45. package/dist/kit/{chunk-2D2SG6FW.js → chunk-KCEYRIU4.js} +1 -1
  46. package/dist/kit/{chunk-SE6MQQLB.js → chunk-KDROJANO.js} +1 -1
  47. package/dist/kit/{chunk-ODMQERGZ.js → chunk-KEE55QSD.js} +1 -1
  48. package/dist/kit/{chunk-YBBYCUFP.js → chunk-KFXMLIVF.js} +1 -1
  49. package/dist/kit/{chunk-P6S6HSN3.js → chunk-KLRF3S7O.js} +1 -1
  50. package/dist/kit/{chunk-ANLBW5RI.js → chunk-KXI3T72F.js} +1 -1
  51. package/dist/kit/{chunk-PDNKLLBI.js → chunk-KY5KCIZE.js} +1 -1
  52. package/dist/kit/{chunk-PCGRRX5P.js → chunk-LE53AVKR.js} +1 -1
  53. package/dist/kit/{chunk-MIA6TUQC.js → chunk-LVCGC3SO.js} +1 -1
  54. package/dist/kit/chunk-M5VVLYI2.js +1 -0
  55. package/dist/kit/{chunk-KJJJORN6.js → chunk-MJJSZS23.js} +1 -1
  56. package/dist/kit/{chunk-EPVZIGEZ.js → chunk-MZFK765W.js} +1 -1
  57. package/dist/kit/{chunk-G4BQYQJ6.js → chunk-NF4WVWAC.js} +1 -1
  58. package/dist/kit/{chunk-JRSCTMFM.js → chunk-NW4U2YRE.js} +1 -1
  59. package/dist/kit/chunk-ORSI57T2.js +1 -0
  60. package/dist/kit/{chunk-GCIZKMJL.js → chunk-QSTDYL35.js} +1 -1
  61. package/dist/kit/{chunk-B6GZ645M.js → chunk-QVICL57J.js} +1 -1
  62. package/dist/kit/{chunk-JAM46FF6.js → chunk-RXOPJJC4.js} +1 -1
  63. package/dist/kit/{chunk-YL2AXWRA.js → chunk-SDSW7422.js} +1 -1
  64. package/dist/kit/{chunk-WT3XOWAI.js → chunk-TRDA73HN.js} +1 -1
  65. package/dist/kit/{chunk-VFV7HZ3G.js → chunk-UOYBFLGJ.js} +1 -1
  66. package/dist/kit/{chunk-EWPT56TR.js → chunk-UVLKCAKH.js} +1 -1
  67. package/dist/kit/{chunk-EHXSXMBE.js → chunk-VBWG7HQA.js} +1 -1
  68. package/dist/kit/{chunk-2TQW2PIG.js → chunk-VIUEAEBX.js} +1 -1
  69. package/dist/kit/{chunk-BBOSHBZK.js → chunk-VV2KP7ZW.js} +1 -1
  70. package/dist/kit/{chunk-4XT5IKM3.js → chunk-VX2AD3M7.js} +1 -1
  71. package/dist/kit/{chunk-2KFBIOVS.js → chunk-W4U5CK6L.js} +1 -1
  72. package/dist/kit/chunk-WDS7VM2E.js +1 -0
  73. package/dist/kit/{chunk-6YVZZ3DO.js → chunk-WI2AF2KE.js} +1 -1
  74. package/dist/kit/{chunk-HMW5NRUV.js → chunk-XUCYFWC3.js} +1 -1
  75. package/dist/kit/{chunk-V6GEQ5Y5.js → chunk-Z2FRNFMB.js} +1 -1
  76. package/dist/kit/{chunk-NPJ77LDC.js → chunk-Z3KD6CLE.js} +1 -1
  77. package/dist/kit/{chunk-ONVONNUH.js → chunk-ZCXNGJGB.js} +1 -1
  78. package/dist/kit/{chunk-IUX46UDR.js → chunk-ZWZZMU5P.js} +1 -1
  79. package/dist/kit.cjs +1 -1
  80. package/dist/kit.d.cts +1 -1
  81. package/dist/kit.d.ts +1 -1
  82. package/dist/kit.js +1 -1
  83. package/dist/studio-worker.js +1 -0
  84. package/dist/studio.cjs +1 -1
  85. package/dist/studio.js +1 -1
  86. package/package.json +2 -1
  87. package/skills/asciify-engine/SKILL.md +2 -2
  88. package/skills/asciify-engine/references/performance.md +1 -1
  89. package/dist/kit/chunk-2JQ4MRIP.js +0 -1
  90. package/dist/kit/chunk-BJRPY7UB.js +0 -1
  91. package/dist/kit/chunk-EK4GIXIO.js +0 -1
  92. package/dist/kit/chunk-PFQBEWCF.js +0 -1
  93. package/dist/kit/chunk-SAQJAH2I.js +0 -1
  94. package/dist/kit/chunk-SVXRMHUJ.js +0 -1
  95. package/dist/kit/chunk-UO4U32P7.js +0 -1
  96. package/dist/kit/chunk-XVB3B3FV.js +0 -1
  97. package/dist/kit/chunk-YDP6566E.js +0 -1
@@ -1 +1 @@
1
- import{styleKeeper as e,isDark as t,resolveColor as n,prefersReduced as i,boxIn as o}from"./chunk-PFQBEWCF.js";var r="#6f6d67",s="#8f8d86",a={x:-1,y:-1,users:0},c=e=>{a.x=e.clientX,a.y=e.clientY};function d(d,l,u=0){if("undefined"==typeof document)return null;const{host:m}=d,h=document.createElement("canvas");let f=null;try{f=h.getContext("2d")}catch{f=null}if(!f)return null;const v=f,p=e();"static"===getComputedStyle(m).position&&p.set(m,"position","relative"),p.set(m,"isolation","isolate"),h.dataset.asciiKit="",h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;inset:0;width:100%;height:100%;pointer-events:none;border-radius:inherit;z-index:-1"),m.appendChild(h);let g,y=t(m),b="";const x=()=>{b=n(d.ink(y),m,y?s:r)??s;const e=d.settings().accent;g=e?n(e,m)??void 0:void 0};x();let E=0,M=!0,w=!1,L=!1,A=0,C=0,F=0,O=!1,S=9,R=9,z=1,k=1,q=u;const I={x:.5,y:.5},P=()=>!!(d.reducedMotion()??i()),W=()=>{const e=d.settings(),t=performance.now(),n={fontSize:e.cellSize,chars:e.charset,ditherStrength:e.dither,lightMode:!y,ink:b,accent:g,elapsed:R,speed:e.speed};for(v.globalAlpha=1,v.globalCompositeOperation="source-over";q>0;q--)l(v,z,k,S,I,n);l(v,z,k,S,I,n),(e=>{if(!e||!e.isConnected)return;const t=o(h,e);if(!t.w||!t.h)return;const n=.71*t.w+32,i=.71*t.h+32,r=h.width/z||1;v.save(),v.setTransform(r*n,0,0,r*i,r*(t.x+t.w/2),r*(t.y+t.h/2));const s=v.createRadialGradient(0,0,0,0,0,1);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(.72,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),v.globalCompositeOperation="destination-out",v.fillStyle=s,v.fillRect(-1,-1,2,2),v.restore()})(e.clear),F=.9*F+.1*(performance.now()-t),h.dataset.painted=""},j=e=>{if(E=0,L||w||!M||"undefined"!=typeof document&&document.hidden)return void(A=C=0);const t=P(),n=d.settings(),i=C?e-C:17;if(C=e,!t&&F>4.5&&i<12&&(O=!O))return void(E=requestAnimationFrame(j));const o=A?Math.min(.05,(e-A)/1e3):0;if(A=e,t||(S+=o*n.speed,R+=o),n.cursor&&a.x>=0){const e=h.getBoundingClientRect();e.width&&e.height&&(I.x+=.07*((a.x-e.left)/e.width-I.x),I.y+=.07*((a.y-e.top)/e.height-I.y))}else n.cursor||(I.x+=.07*(.5-I.x),I.y+=.07*(.5-I.y));W(),t||(E=requestAnimationFrame(j))},B=()=>{E||L||w||!M||(E=requestAnimationFrame(j))},H=()=>{if(L)return;const e=Math.min(2,"number"==typeof devicePixelRatio&&devicePixelRatio||1);z=Math.max(1,h.clientWidth||m.clientWidth||1),k=Math.max(1,h.clientHeight||m.clientHeight||1),h.width=Math.round(z*e),h.height=Math.round(k*e),v.setTransform(e,0,0,e,0,0),q=u,M&&!w&&W(),B()};H();const T="function"==typeof ResizeObserver?new ResizeObserver(H):null;T?.observe(m);const G="function"==typeof IntersectionObserver?new IntersectionObserver(([e])=>{M=e.isIntersecting,A=0,M?B():E&&(cancelAnimationFrame(E),E=0)},{rootMargin:"64px"}):null;G?.observe(m);const K=()=>{A=0,B()};document.addEventListener("visibilitychange",K);const Q="function"==typeof matchMedia?matchMedia("(prefers-reduced-motion: reduce)"):null;Q?.addEventListener?.("change",K),0===a.users++&&"function"==typeof addEventListener&&addEventListener("pointermove",c,{passive:!0});const X="object"==typeof document.fonts?document.fonts:null,Y=()=>{L||!M||w||(W(),B())};X?.addEventListener?.("loadingdone",Y),X?.ready?.then(Y,()=>{});let D=0;const J=()=>{D||L||(D=requestAnimationFrame(()=>{D=0,L||(y=t(m),x(),P()&&W(),B())}))},N="function"==typeof matchMedia?matchMedia("(prefers-color-scheme: dark)"):null;N?.addEventListener?.("change",J);const U="function"==typeof MutationObserver?new MutationObserver(J):null;for(const e of[document.documentElement,document.body])e&&U?.observe(e,{attributes:!0,attributeFilter:["class","data-theme","data-mode","style"]});return{field:null,canvas:h,refresh(){L||(y=t(m),x(),P()&&M&&!w&&W(),B())},play(){w&&(w=!1,A=0,B())},pause(){w=!0,E&&cancelAnimationFrame(E),E=0},destroy(){L||(L=!0,E&&cancelAnimationFrame(E),D&&cancelAnimationFrame(D),E=D=0,T?.disconnect(),G?.disconnect(),U?.disconnect(),document.removeEventListener("visibilitychange",K),Q?.removeEventListener?.("change",K),N?.removeEventListener?.("change",J),X?.removeEventListener?.("loadingdone",Y),0===--a.users&&"function"==typeof removeEventListener&&removeEventListener("pointermove",c),h.remove(),h.width=h.height=0,p.restore())}}}export{d as mountCanvas};//# sourceMappingURL=chunk-KTYCGGRO.js.map
1
+ import{styleKeeper as e,isDark as t,resolveColor as n,prefersReduced as i,boxIn as o}from"./chunk-GF72XM4C.js";var r="#6f6d67",s="#8f8d86",a={x:-1,y:-1,users:0},c=e=>{a.x=e.clientX,a.y=e.clientY};function d(d,l,u=0){if("undefined"==typeof document)return null;const{host:m}=d,h=document.createElement("canvas");let f=null;try{f=h.getContext("2d")}catch{f=null}if(!f)return null;const v=f,p=e();"static"===getComputedStyle(m).position&&p.set(m,"position","relative"),p.set(m,"isolation","isolate"),h.dataset.asciiKit="",h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;inset:0;width:100%;height:100%;pointer-events:none;border-radius:inherit;z-index:-1"),m.appendChild(h);let g,y=t(m),b="";const x=()=>{b=n(d.ink(y),m,y?s:r)??s;const e=d.settings().accent;g=e?n(e,m)??void 0:void 0};x();let M=0,w=!0,E=!1,L=!1,A=0,C=0,F=0,O=!1,S=9,R=9,z=1,k=1,q=u;const I={x:.5,y:.5},j=()=>!!(d.reducedMotion()??i()),G=()=>{const e=d.settings(),t=performance.now(),n={fontSize:e.cellSize,chars:e.charset,ditherStrength:e.dither,lightMode:!y,ink:b,accent:g,elapsed:R,speed:e.speed};for(v.globalAlpha=1,v.globalCompositeOperation="source-over";q>0;q--)l(v,z,k,S,I,n);l(v,z,k,S,I,n),(e=>{if(!e||!e.isConnected)return;const t=o(h,e);if(!t.w||!t.h)return;const n=.71*t.w+32,i=.71*t.h+32,r=h.width/z||1;v.save(),v.setTransform(r*n,0,0,r*i,r*(t.x+t.w/2),r*(t.y+t.h/2));const s=v.createRadialGradient(0,0,0,0,0,1);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(.72,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),v.globalCompositeOperation="destination-out",v.fillStyle=s,v.fillRect(-1,-1,2,2),v.restore()})(e.clear),F=.9*F+.1*(performance.now()-t),h.dataset.painted=""},H=e=>{if(M=0,L||E||!w||"undefined"!=typeof document&&document.hidden)return void(A=C=0);const t=j(),n=d.settings(),i=C?e-C:17;if(C=e,!t&&F>4.5&&i<12&&(O=!O))return void(M=requestAnimationFrame(H));const o=A?Math.min(.05,(e-A)/1e3):0;if(A=e,t||(S+=o*n.speed,R+=o),n.cursor&&a.x>=0){const e=h.getBoundingClientRect();e.width&&e.height&&(I.x+=.07*((a.x-e.left)/e.width-I.x),I.y+=.07*((a.y-e.top)/e.height-I.y))}else n.cursor||(I.x+=.07*(.5-I.x),I.y+=.07*(.5-I.y));G(),t||(M=requestAnimationFrame(H))},P=()=>{M||L||E||!w||(M=requestAnimationFrame(H))},T=()=>{if(L)return;const e=Math.min(2,"number"==typeof devicePixelRatio&&devicePixelRatio||1);z=Math.max(1,h.clientWidth||m.clientWidth||1),k=Math.max(1,h.clientHeight||m.clientHeight||1),h.width=Math.round(z*e),h.height=Math.round(k*e),v.setTransform(e,0,0,e,0,0),q=u,w&&!E&&G(),P()};T();const W="function"==typeof ResizeObserver?new ResizeObserver(T):null;W?.observe(m);const X="function"==typeof IntersectionObserver?new IntersectionObserver(([e])=>{w=e.isIntersecting,A=0,w?P():M&&(cancelAnimationFrame(M),M=0)},{rootMargin:"64px"}):null;X?.observe(m);const B=()=>{A=0,P()};document.addEventListener("visibilitychange",B);const K="function"==typeof matchMedia?matchMedia("(prefers-reduced-motion: reduce)"):null;K?.addEventListener?.("change",B),0===a.users++&&"function"==typeof addEventListener&&addEventListener("pointermove",c,{passive:!0});const Y="object"==typeof document.fonts?document.fonts:null,D=()=>{L||!w||E||(G(),P())};Y?.addEventListener?.("loadingdone",D),Y?.ready?.then(D,()=>{});let J=0;const N=()=>{J||L||(J=requestAnimationFrame(()=>{J=0,L||(y=t(m),x(),j()&&G(),P())}))},Q="function"==typeof matchMedia?matchMedia("(prefers-color-scheme: dark)"):null;Q?.addEventListener?.("change",N);const U="function"==typeof MutationObserver?new MutationObserver(N):null;for(const e of[document.documentElement,document.body])e&&U?.observe(e,{attributes:!0,attributeFilter:["class","data-theme","data-mode","style"]});return{field:null,canvas:h,refresh(){L||(y=t(m),x(),j()&&w&&!E&&G(),P())},play(){E&&(E=!1,A=0,P())},pause(){E=!0,M&&cancelAnimationFrame(M),M=0},destroy(){L||(L=!0,M&&cancelAnimationFrame(M),J&&cancelAnimationFrame(J),M=J=0,W?.disconnect(),X?.disconnect(),U?.disconnect(),document.removeEventListener("visibilitychange",B),K?.removeEventListener?.("change",B),Q?.removeEventListener?.("change",N),Y?.removeEventListener?.("loadingdone",D),0===--a.users&&"function"==typeof removeEventListener&&removeEventListener("pointermove",c),h.remove(),h.width=h.height=0,p.restore())}}}export{d as mountCanvas};//# sourceMappingURL=chunk-3OD5BMF5.js.map
@@ -1 +1 @@
1
- import{mountPageField as e}from"./chunk-4SHQA3CO.js";var r=(e,r)=>!1===e.cursor?"none":"string"==typeof e.cursor?e.cursor:r;function t(r,t,n,l){let o=null;if(o=e({host:r.host,kit:r.kit,layer:"under",glyphs:l&&(()=>l(r.settings())),look:e=>{const n=r.settings();return{...t(n,e),...n.look}},ink:e=>r.ink(e)??(e?n.dark:n.light),reducedMotion:r.reducedMotion,onFail:()=>{o=null,r.onFail()}}),!o)return null;const i=o.canvas;return{get field(){return o?.field??null},get canvas(){return o?.canvas??i},refresh(){o?.refresh()},play(){o?.field.play()},pause(){o?.field.pause()},destroy(){o?.destroy(),o=null}}}var n=()=>"number"==typeof innerWidth&&innerWidth<760,l={light:"#86847e",dark:"#7c7a74"},o={light:"#8f8d86",dark:"#64625d"},i=e=>({font:'"Geist Mono", ui-monospace, monospace',fontWeight:400,cellSize:e.cellSize,cellAspect:.62,glyphScale:.86}),s=e=>({cellSize:e.cellSize,cellAspect:1,dotScale:.68}),a={x:.18,y:.2,width:.64,height:.6,feather:.3,shape:"ellipse"};function c(e){const{scene:n,charset:o,hover:c,middle:d=a,feather:h=.3,graphite:u=l}=e,p=e.mark??"glyph";return{id:e.id,name:e.name,description:e.description,cellSize:e.cellSize,speed:e.speed??1,cursor:e.cursor??!0,opacity:e.opacity,mount(l){const a=t(l,(t,l)=>{const a=((e,r)=>e.mark??(e.charset||e.look?.charset?"glyph":r))(t,p);return{scene:n,color:"ink",shade:0,background:"transparent",vignette:0,speed:t.speed,maxPixelRatio:2,levels:"none",blend:"on",..."dot"===a?{mark:"dot",...s(t)}:{mark:"glyph",charset:t.charset??o,...i(t)},hover:r(t,c),lantern:{radius:.14,strength:.45,trail:.8,follow:9},trail:{strength:.8,radius:.35},fluid:{radius:.09,refraction:.03,glow:.6},clear:t.clear?{element:t.clear,padding:0,feather:h,shape:"ellipse"}:d,...e.tune?.(t,l)}},u,"dot"===p?e=>({...i(e),charset:o}):void 0);if(!a||!e.extra)return a;const g=e.extra(l,a),f=a.destroy.bind(a);return Object.assign(a,{destroy(){g(),f()}})}}}export{o as FIELD_GRAPHITE,r as hoverOf,t as mountField,n as narrow,c as scenePreset};//# sourceMappingURL=chunk-OVCIHOOS.js.map
1
+ import{mountPageField as e}from"./chunk-7DXSG526.js";var r=(e,r)=>!1===e.cursor?"none":"string"==typeof e.cursor?e.cursor:r;function t(r,t,n,l){let o=null;if(o=e({host:r.host,kit:r.kit,layer:"under",glyphs:l&&(()=>l(r.settings())),look:e=>{const n=r.settings();return{...t(n,e),...n.look}},ink:e=>r.ink(e)??(e?n.dark:n.light),reducedMotion:r.reducedMotion,onFail:()=>{o=null,r.onFail()}}),!o)return null;const i=o.canvas;return{get field(){return o?.field??null},get canvas(){return o?.canvas??i},refresh(){o?.refresh()},play(){o?.field.play()},pause(){o?.field.pause()},destroy(){o?.destroy(),o=null}}}var n=()=>"number"==typeof innerWidth&&innerWidth<760,l={light:"#86847e",dark:"#7c7a74"},o={light:"#8f8d86",dark:"#64625d"},i=e=>({font:'"Geist Mono", ui-monospace, monospace',fontWeight:400,cellSize:e.cellSize,cellAspect:.62,glyphScale:.86}),s=e=>({cellSize:e.cellSize,cellAspect:1,dotScale:.68}),a={x:.18,y:.2,width:.64,height:.6,feather:.3,shape:"ellipse"};function c(e){const{scene:n,charset:o,hover:c,middle:d=a,feather:h=.3,graphite:u=l}=e,p=e.mark??"glyph";return{id:e.id,name:e.name,description:e.description,cellSize:e.cellSize,speed:e.speed??1,cursor:e.cursor??!0,opacity:e.opacity,mount(l){const a=t(l,(t,l)=>{const a=((e,r)=>e.mark??(e.charset||e.look?.charset?"glyph":r))(t,p);return{scene:n,color:"ink",shade:0,background:"transparent",vignette:0,speed:t.speed,maxPixelRatio:2,levels:"none",blend:"on",..."dot"===a?{mark:"dot",...s(t)}:{mark:"glyph",charset:t.charset??o,...i(t)},hover:r(t,c),lantern:{radius:.14,strength:.45,trail:.8,follow:9},trail:{strength:.8,radius:.35},fluid:{radius:.09,refraction:.03,glow:.6},clear:t.clear?{element:t.clear,padding:0,feather:h,shape:"ellipse"}:d,...e.tune?.(t,l)}},u,"dot"===p?e=>({...i(e),charset:o}):void 0);if(!a||!e.extra)return a;const g=e.extra(l,a),f=a.destroy.bind(a);return Object.assign(a,{destroy(){g(),f()}})}}}export{o as FIELD_GRAPHITE,r as hoverOf,t as mountField,n as narrow,c as scenePreset};//# sourceMappingURL=chunk-3VEMKDBW.js.map
@@ -1 +1 @@
1
- import{blank as t,mountPageField as e,pageHandle as o,sleep as n,pulseAt as r}from"./chunk-4SHQA3CO.js";var i={saving:null,font:'"Geist", Arial, sans-serif'};function a(t,e){const o=t.getBoundingClientRect(),n=o.height?t.offsetHeight/o.height:1,r=e?.getBoundingClientRect().top??o.top+o.height;let i=e;for(;i&&i.parentElement!==t;)i=i.parentElement;let a=o.top;for(const e of Array.from(t.children)){if(e===i)break;if(void 0!==e.dataset?.asciiKit)continue;const t=e.getBoundingClientRect();t.height&&(a=Math.max(a,t.top+t.height))}return{middle:((a+r)/2-o.top)*n,height:(r-a)*n}}function l(e,o,n,r=i.font){const l=Math.max(2,Math.round(2*e.offsetWidth)),s=Math.max(2,Math.round(2*e.offsetHeight)),{canvas:c,pen:f}=t(l,s),d=f.createRadialGradient(l,0,0,l,0,.52*Math.hypot(l,s));d.addColorStop(0,"rgb(150 150 150)"),d.addColorStop(.4,"rgb(64 64 64)"),d.addColorStop(1,"rgb(0 0 0)"),f.fillStyle=d,f.fillRect(0,0,l,s);const h=o?a(e,n):null;if(o&&h&&h.height>=30){const t=Math.min(2*h.height*.9,.34*l),e=l-.07*l,n=2*h.middle+.04*t;f.font=`600 ${t}px ${r}`,f.letterSpacing=.04*-t+"px",f.textAlign="right",f.textBaseline="middle",f.lineJoin="round",f.lineWidth=.28*t,f.strokeStyle="rgb(0 0 0 / .85)",f.strokeText(o,e,n),f.fillStyle="#fff",f.fillText(o,e,n)}return c}function s(a,s={}){const c={current:{...i,...s}},f=(t=c.current.saving)=>l(a,t,(()=>{const t=c.current.price;return"string"==typeof t?a.querySelector(t):t??a.querySelector("[data-price]")})(),c.current.font);let d=null,h=0,u=0,g=0,p=null;p=e({host:a,look:()=>({mark:"dot",scene:"drift",scale:"number"==typeof innerWidth&&innerWidth<760?1.7:1,cellSize:4,cellAspect:1,dotScale:.92,color:"ink",shade:0,fit:"cover",focus:{x:.5,y:.5},levels:"none",contrast:1.1,brightness:-.04,drift:.5,hover:"lantern",lantern:{radius:.26,strength:.4,trail:.7,follow:8},trail:{strength:.9,radius:.4},fluid:{radius:.09,refraction:.03,glow:.6},...c.current.look}),ink:t=>c.current.ink??(t?"#aeaca5":"#5c5a55"),source:d=f(),kit:c,reducedMotion:()=>c.current.reducedMotion,onFail:()=>{p=null,m?.disconnect()}}),u=a.offsetWidth,g=a.offsetHeight;const m=p&&"function"==typeof ResizeObserver?new ResizeObserver(()=>{!p||Math.abs(a.offsetWidth-u)<2&&Math.abs(a.offsetHeight-g)<2||(u=a.offsetWidth,g=a.offsetHeight,h++,p.field.setSource(d=f()))}):null;m?.observe(a);const S=async e=>{const o=p?.field,r=d;if(d=e,!o)return;const i=++h;if(!r||p.still())return void await o.setSource(e);const a=t(e.width,e.height),l=a.pen,s=e.width,c=e.height,f=.34*s;for(let t=1;t<=9&&i===h;t++){const i=performance.now(),d=t/9*(s+2*f)-f,h=Math.max(0,Math.min(s,d));l.globalCompositeOperation="source-over",l.drawImage(r,0,0,s,c),h>0&&l.drawImage(e,0,0,h,c,0,0,h,c);const u=l.createLinearGradient(d-f,0,d+.4*f,0);u.addColorStop(0,"rgb(0 0 0 / 0)"),u.addColorStop(.72,"rgb(255 255 255 / .5)"),u.addColorStop(1,"rgb(0 0 0 / 0)"),l.globalCompositeOperation="lighter",l.fillStyle=u,l.fillRect(0,0,s,c),await o.setSource(a.canvas),await n(Math.max(0,48-(performance.now()-i)))}i===h&&p?.field===o&&await o.setSource(e)};return o(()=>p,c,()=>{S(f())},{sweep:()=>S(f()),saving:t=>(c.current={...c.current,saving:t},S(f(t))),pulse:(t,e=1.6)=>{p&&!p.still()&&r(p.field,t,e)}},()=>{h++,m?.disconnect()})}export{l as planArt,s as pricingGlow,a as savingRoom};//# sourceMappingURL=chunk-H4DBJULW.js.map
1
+ import{blank as t,mountPageField as e,pageHandle as o,sleep as n,pulseAt as r}from"./chunk-7DXSG526.js";var i={saving:null,font:'"Geist", Arial, sans-serif'};function a(t,e){const o=t.getBoundingClientRect(),n=o.height?t.offsetHeight/o.height:1,r=e?.getBoundingClientRect().top??o.top+o.height;let i=e;for(;i&&i.parentElement!==t;)i=i.parentElement;let a=o.top;for(const e of Array.from(t.children)){if(e===i)break;if(void 0!==e.dataset?.asciiKit)continue;const t=e.getBoundingClientRect();t.height&&(a=Math.max(a,t.top+t.height))}return{middle:((a+r)/2-o.top)*n,height:(r-a)*n}}function l(e,o,n,r=i.font){const l=Math.max(2,Math.round(2*e.offsetWidth)),s=Math.max(2,Math.round(2*e.offsetHeight)),{canvas:c,pen:f}=t(l,s),d=f.createRadialGradient(l,0,0,l,0,.52*Math.hypot(l,s));d.addColorStop(0,"rgb(150 150 150)"),d.addColorStop(.4,"rgb(64 64 64)"),d.addColorStop(1,"rgb(0 0 0)"),f.fillStyle=d,f.fillRect(0,0,l,s);const h=o?a(e,n):null;if(o&&h&&h.height>=30){const t=Math.min(2*h.height*.9,.34*l),e=l-.07*l,n=2*h.middle+.04*t;f.font=`600 ${t}px ${r}`,f.letterSpacing=.04*-t+"px",f.textAlign="right",f.textBaseline="middle",f.lineJoin="round",f.lineWidth=.28*t,f.strokeStyle="rgb(0 0 0 / .85)",f.strokeText(o,e,n),f.fillStyle="#fff",f.fillText(o,e,n)}return c}function s(a,s={}){const c={current:{...i,...s}},f=(t=c.current.saving)=>l(a,t,(()=>{const t=c.current.price;return"string"==typeof t?a.querySelector(t):t??a.querySelector("[data-price]")})(),c.current.font);let d=null,h=0,u=0,g=0,p=null;p=e({host:a,look:()=>({mark:"dot",scene:"drift",scale:"number"==typeof innerWidth&&innerWidth<760?1.7:1,cellSize:4,cellAspect:1,dotScale:.92,color:"ink",shade:0,fit:"cover",focus:{x:.5,y:.5},levels:"none",contrast:1.1,brightness:-.04,drift:.5,hover:"lantern",lantern:{radius:.26,strength:.4,trail:.7,follow:8},trail:{strength:.9,radius:.4},fluid:{radius:.09,refraction:.03,glow:.6},...c.current.look}),ink:t=>c.current.ink??(t?"#aeaca5":"#5c5a55"),source:d=f(),kit:c,reducedMotion:()=>c.current.reducedMotion,onFail:()=>{p=null,m?.disconnect()}}),u=a.offsetWidth,g=a.offsetHeight;const m=p&&"function"==typeof ResizeObserver?new ResizeObserver(()=>{!p||Math.abs(a.offsetWidth-u)<2&&Math.abs(a.offsetHeight-g)<2||(u=a.offsetWidth,g=a.offsetHeight,h++,p.field.setSource(d=f()))}):null;m?.observe(a);const S=async e=>{const o=p?.field,r=d;if(d=e,!o)return;const i=++h;if(!r||p.still())return void await o.setSource(e);const a=t(e.width,e.height),l=a.pen,s=e.width,c=e.height,f=.34*s;for(let t=1;t<=9&&i===h;t++){const i=performance.now(),d=t/9*(s+2*f)-f,h=Math.max(0,Math.min(s,d));l.globalCompositeOperation="source-over",l.drawImage(r,0,0,s,c),h>0&&l.drawImage(e,0,0,h,c,0,0,h,c);const u=l.createLinearGradient(d-f,0,d+.4*f,0);u.addColorStop(0,"rgb(0 0 0 / 0)"),u.addColorStop(.72,"rgb(255 255 255 / .5)"),u.addColorStop(1,"rgb(0 0 0 / 0)"),l.globalCompositeOperation="lighter",l.fillStyle=u,l.fillRect(0,0,s,c),await o.setSource(a.canvas),await n(Math.max(0,48-(performance.now()-i)))}i===h&&p?.field===o&&await o.setSource(e)};return o(()=>p,c,()=>{S(f())},{sweep:()=>S(f()),saving:t=>(c.current={...c.current,saving:t},S(f(t))),pulse:(t,e=1.6)=>{p&&!p.still()&&r(p.field,t,e)}},()=>{h++,m?.disconnect()})}export{l as planArt,s as pricingGlow,a as savingRoom};//# sourceMappingURL=chunk-42KMN727.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-OVCIHOOS.js";var r=e({id:"halo",name:"Halo",description:"A corona breathes slowly round the middle, its rays turning; the centre stays empty for a headline.",cellSize:11,scene:"halo",charset:" .·:-=+*",hover:"lantern",middle:!1,feather:.12});export{r as halo};//# sourceMappingURL=chunk-PND73YEV.js.map
1
+ import{scenePreset as e}from"./chunk-3VEMKDBW.js";var r=e({id:"halo",name:"Halo",description:"A corona breathes slowly round the middle, its rays turning; the centre stays empty for a headline.",cellSize:11,scene:"halo",charset:" .·:-=+*",hover:"lantern",middle:!1,feather:.12});export{r as halo};//# sourceMappingURL=chunk-6G5MPND3.js.map
@@ -1 +1 @@
1
- import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as e}from"./chunk-KTYCGGRO.js";var o=(t,e,o,r)=>{const h=2.8*t+1.8*e+.018*r,a=1.2*t-3.2*e,i=Math.abs(2*(h-Math.floor(h))-1),n=Math.abs(2*(a-Math.floor(a))-1);return.85*Math.pow(Math.min(i,n),1.8)},r={id:"facet",name:"Facet",description:"Quiet folded planes catch light along their edges.",cellSize:12,speed:1,cursor:!1,mount:r=>e(r,(e,r,h,a,i,n)=>t(o,e,r,h,a,{ditherStrength:n.ditherStrength,fontSize:n.fontSize,chars:n.chars,lightMode:n.lightMode,color:n.ink}))};export{r as facet};//# sourceMappingURL=chunk-CA5J25SV.js.map
1
+ import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as e}from"./chunk-3OD5BMF5.js";var o=(t,e,o,r)=>{const h=2.8*t+1.8*e+.018*r,a=1.2*t-3.2*e,i=Math.abs(2*(h-Math.floor(h))-1),n=Math.abs(2*(a-Math.floor(a))-1);return.85*Math.pow(Math.min(i,n),1.8)},r={id:"facet",name:"Facet",description:"Quiet folded planes catch light along their edges.",cellSize:12,speed:1,cursor:!1,mount:r=>e(r,(e,r,h,a,i,n)=>t(o,e,r,h,a,{ditherStrength:n.ditherStrength,fontSize:n.fontSize,chars:n.chars,lightMode:n.lightMode,color:n.ink}))};export{r as facet};//# sourceMappingURL=chunk-6WU247CB.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-OVCIHOOS.js";var r=e({id:"mesh",name:"Mesh",description:"Four soft lights on slow paths: a gradient mesh written in characters.",cellSize:11,scene:"mesh",charset:" .:-=+*#%@",hover:"trail"});export{r as mesh};//# sourceMappingURL=chunk-6L2GAV5C.js.map
1
+ import{scenePreset as e}from"./chunk-3VEMKDBW.js";var r=e({id:"mesh",name:"Mesh",description:"Four soft lights on slow paths: a gradient mesh written in characters.",cellSize:11,scene:"mesh",charset:" .:-=+*#%@",hover:"trail"});export{r as mesh};//# sourceMappingURL=chunk-776H2BJ7.js.map
@@ -1 +1 @@
1
- import{styleKeeper as e,isDark as t,BASE_LOOK as n,prefersReduced as r,resolveColor as o,mergeOptions as i}from"./chunk-PFQBEWCF.js";import{poster as s,liveField as l,watchTheme as u,cancelFieldFrame as d,requestFieldFrame as a,disposeKit as c,setPosterSource as p}from"./chunk-XVB3B3FV.js";import{isGlyphFieldSupported as f}from"../field.js";var g=e=>new Promise(t=>setTimeout(t,e));function h(i){const{host:c,layer:p="under",kit:g}=i;if("undefined"==typeof document)return null;const h=`position:absolute;inset:0;width:100%;height:100%;pointer-events:none;border-radius:inherit;z-index:${"under"===p?-1:"auto"}`;if(!f())return g?.current.poster&&!i.ownPoster&&s(c,g.current.poster,h,g),null;const m=e(),v=document.createElement("canvas");"static"===getComputedStyle(c).position&&m.set(c,"position","relative"),"under"===p&&m.set(c,"isolation","isolate"),v.dataset.asciiKit="",v.setAttribute("style",h),c.appendChild(v);let y=t(c),b=!1;const k=()=>{const e=i.reducedMotion();return!0===e?{speed:0,drift:0,respectReducedMotion:!0}:{respectReducedMotion:!1!==e}},w=()=>o(i.ink(y),c,y?"#d8d6cf":"#1d1d1b")??"#888888",P=l({host:c,canvas:v,kit:g,place:h,ownPoster:i.ownPoster,glyphs:i.glyphs,source:i.source??null,options:()=>({...n,...i.look(y),...k(),ink:w(),interactionTarget:c,label:i.label??""}),onMount:(e,t)=>{i.label||(t.removeAttribute("role"),t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")),i.onMount?.()},onRelease:i.onRelease,onFail:()=>{B(),i.onFail?.()}}),R=P.field;let j=!1;const C=()=>{b||(y=t(c),R.update({...n,...i.look(y),...k(),ink:w()}))},M=()=>{j=!1,C()},x=u(()=>{j||b||(j=!0,a(M))});function B(){b||(b=!0,j&&d(M),x(),P.destroy(),m.restore())}return P.start(),P.failed?(B(),null):{field:R,get canvas(){return P.canvas},get live(){return P.live},dark:()=>y,still:()=>!!(i.reducedMotion()??r()),refresh:C,destroy:B}}function m(e,t,n,r,o=()=>{}){let s=!1;const l={get supported(){return!!e()&&!s},get field(){return s?null:e()?.field??null},update(r){if(s)return;t.current=i(t.current,r);const o=r.poster;o&&p(t,o),n(t.current),e()?.refresh()},play(){s||e()?.field.play()},pause(){s||e()?.field.pause()},destroy(){s||(s=!0,o(),e()?.destroy(),c(t))}};return Object.defineProperties(r,Object.getOwnPropertyDescriptors(l))}function v(e,t){const n=Object.assign(document.createElement("canvas"),{width:e,height:t}),r=n.getContext("2d");return r.fillStyle="#000",r.fillRect(0,0,e,t),{canvas:n,pen:r}}function y(e,t,n){if(!t)return void e.pulse({strength:n});if("getBoundingClientRect"in t)return void e.pulse({element:t,strength:n});const r=e.canvas.getBoundingClientRect();e.pulse({x:t.x-r.left,y:t.y-r.top,strength:n})}export{v as blank,h as mountPageField,m as pageHandle,y as pulseAt,g as sleep};//# sourceMappingURL=chunk-4SHQA3CO.js.map
1
+ import{styleKeeper as e,isDark as t,BASE_LOOK as n,prefersReduced as r,resolveColor as o,mergeOptions as i}from"./chunk-GF72XM4C.js";import{poster as s,liveField as l,disposeKit as u,setPosterSource as d}from"./chunk-FEAFQY7O.js";import{isGlyphFieldSupported as a,watchTheme as c,cancelFieldFrame as p,requestFieldFrame as f}from"../field.js";var g=e=>new Promise(t=>setTimeout(t,e));function h(i){const{host:u,layer:d="under",kit:g}=i;if("undefined"==typeof document)return null;const h=`position:absolute;inset:0;width:100%;height:100%;pointer-events:none;border-radius:inherit;z-index:${"under"===d?-1:"auto"}`;if(!a())return g?.current.poster&&!i.ownPoster&&s(u,g.current.poster,h,g),null;const m=e(),v=document.createElement("canvas");"static"===getComputedStyle(u).position&&m.set(u,"position","relative"),"under"===d&&m.set(u,"isolation","isolate"),v.dataset.asciiKit="",v.setAttribute("style",h),u.appendChild(v);let y=t(u),b=!1;const k=()=>{const e=i.reducedMotion();return!0===e?{speed:0,drift:0,respectReducedMotion:!0}:{respectReducedMotion:!1!==e}},w=()=>o(i.ink(y),u,y?"#d8d6cf":"#1d1d1b")??"#888888",M=l({host:u,canvas:v,kit:g,place:h,ownPoster:i.ownPoster,glyphs:i.glyphs,source:i.source??null,options:()=>({...n,...i.look(y),...k(),ink:w(),interactionTarget:u,label:i.label??""}),onMount:(e,t)=>{i.label||(t.removeAttribute("role"),t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")),i.onMount?.()},onRelease:i.onRelease,onFail:()=>{A(),i.onFail?.()}}),R=M.field;let j=!1;const C=()=>{b||(y=t(u),R.update({...n,...i.look(y),...k(),ink:w()}))},P=()=>{j=!1,C()},x=c(()=>{j||b||(j=!0,f(P))});function A(){b||(b=!0,j&&p(P),x(),M.destroy(),m.restore())}return M.start(),M.failed?(A(),null):{field:R,get canvas(){return M.canvas},get live(){return M.live},dark:()=>y,still:()=>!!(i.reducedMotion()??r()),refresh:C,destroy:A}}function m(e,t,n,r,o=()=>{}){let s=!1;const l={get supported(){return!!e()&&!s},get field(){return s?null:e()?.field??null},update(r){if(s)return;t.current=i(t.current,r);const o=r.poster;o&&d(t,o),n(t.current),e()?.refresh()},play(){s||e()?.field.play()},pause(){s||e()?.field.pause()},destroy(){s||(s=!0,o(),e()?.destroy(),u(t))}};return Object.defineProperties(r,Object.getOwnPropertyDescriptors(l))}function v(e,t){const n=Object.assign(document.createElement("canvas"),{width:e,height:t}),r=n.getContext("2d");return r.fillStyle="#000",r.fillRect(0,0,e,t),{canvas:n,pen:r}}function y(e,t,n){if(!t)return void e.pulse({strength:n});if("getBoundingClientRect"in t)return void e.pulse({element:t,strength:n});const r=e.canvas.getBoundingClientRect();e.pulse({x:t.x-r.left,y:t.y-r.top,strength:n})}export{v as blank,h as mountPageField,m as pageHandle,y as pulseAt,g as sleep};//# sourceMappingURL=chunk-7DXSG526.js.map
@@ -1 +1 @@
1
- import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-KTYCGGRO.js";function n(e,n,c,i,a={x:.5,y:.5},r={}){const{fontSize:l=13,chars:s=" ·:;=+*#%@",color:h,accentColor:f,speed:M=1,radius:$=.38,swirl:d=3,lightMode:g=!1}=r,m=f??(g?"#6b8700":"#d4ff00"),p=.62*l,u=1.4*l,x=Math.ceil(n/p),b=Math.ceil(c/u),S=n/c;e.clearRect(0,0,n,c),e.font=`${l}px monospace`,e.textBaseline="top";let y=255,C=255,z=255;if(g&&(y=55,C=55,z=55),h){const o=t(h);o&&(y=o.r,C=o.g,z=o.b)}let k=212,v=255,w=0;const G=t(m);G&&(k=G.r,v=G.g,w=G.b);const T=i*M;for(let t=0;t<b;t++){const n=t/b;for(let c=0;c<x;c++){const i=(c/x-a.x)*S,r=n-a.y,l=Math.sqrt(i*i+r*r)/$;if(l>1){const n=o(3*c,7*t)*Math.max(0,1-3*(l-1));if(n<.62)continue;const i=n*(g?.28:.04);e.fillStyle=`rgba(${y},${C},${z},${i})`,e.fillText(s[1],c*p,t*u);continue}const h=Math.max(0,1-Math.abs(l-(.15+.12*Math.sin(1.1*T)))/.07),f=Math.pow(1-l,2.2),M=Math.min(1,f+.6*h);if(M<.06)continue;const d=Math.floor(M*(s.length-1)),m=s[Math.min(s.length-1,d)],b=h>.35||l<.08,G=g?.85*M:.18*M;e.fillStyle=b?`rgba(${k},${v},${w},${g?.95:.38})`:`rgba(${y},${C},${z},${G})`,e.fillText(m,c*p,t*u)}}}var c={id:"void",name:"Void",description:"A gravity well that spirals characters around the cursor.",cellSize:13,speed:1,cursor:!0,mount:t=>e(t,(t,o,e,c,i,a)=>n(t,o,e,c,i,{fontSize:a.fontSize,chars:a.chars,lightMode:a.lightMode,color:a.ink,accentColor:a.accent}))};export{n as renderVoidBackground,c as voidWell};//# sourceMappingURL=chunk-L3P7ZDSK.js.map
1
+ import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-3OD5BMF5.js";function n(e,n,c,i,a={x:.5,y:.5},r={}){const{fontSize:l=13,chars:s=" ·:;=+*#%@",color:h,accentColor:f,speed:M=1,radius:$=.38,swirl:d=3,lightMode:g=!1}=r,m=f??(g?"#6b8700":"#d4ff00"),p=.62*l,u=1.4*l,x=Math.ceil(n/p),b=Math.ceil(c/u),S=n/c;e.clearRect(0,0,n,c),e.font=`${l}px monospace`,e.textBaseline="top";let y=255,z=255,C=255;if(g&&(y=55,z=55,C=55),h){const o=t(h);o&&(y=o.r,z=o.g,C=o.b)}let k=212,v=255,w=0;const V=t(m);V&&(k=V.r,v=V.g,w=V.b);const j=i*M;for(let t=0;t<b;t++){const n=t/b;for(let c=0;c<x;c++){const i=(c/x-a.x)*S,r=n-a.y,l=Math.sqrt(i*i+r*r)/$;if(l>1){const n=o(3*c,7*t)*Math.max(0,1-3*(l-1));if(n<.62)continue;const i=n*(g?.28:.04);e.fillStyle=`rgba(${y},${z},${C},${i})`,e.fillText(s[1],c*p,t*u);continue}const h=Math.max(0,1-Math.abs(l-(.15+.12*Math.sin(1.1*j)))/.07),f=Math.pow(1-l,2.2),M=Math.min(1,f+.6*h);if(M<.06)continue;const d=Math.floor(M*(s.length-1)),m=s[Math.min(s.length-1,d)],b=h>.35||l<.08,V=g?.85*M:.18*M;e.fillStyle=b?`rgba(${k},${v},${w},${g?.95:.38})`:`rgba(${y},${z},${C},${V})`,e.fillText(m,c*p,t*u)}}}var c={id:"void",name:"Void",description:"A gravity well that spirals characters around the cursor.",cellSize:13,speed:1,cursor:!0,mount:t=>e(t,(t,o,e,c,i,a)=>n(t,o,e,c,i,{fontSize:a.fontSize,chars:a.chars,lightMode:a.lightMode,color:a.ink,accentColor:a.accent}))};export{n as renderVoidBackground,c as voidWell};//# sourceMappingURL=chunk-7M2FFUZ3.js.map
@@ -1 +1 @@
1
- import{imageFor as e,drawCover as t,injectStyle as a,imageReady as n,toneOf as r}from"./chunk-PCGRRX5P.js";import{styleKeeper as i,clamp as o,mountSurface as c,smoothstep as s,handle as l,prefersReduced as p}from"./chunk-PFQBEWCF.js";var d=e=>"string"==typeof e?{src:e}:e;function u(u,h){const m={current:{open:0,duration:420,label:"Images",...h}},f=i(),v=m.current.images.map(d);let x=o(Math.round(m.current.open),0,Math.max(0,v.length-1)),b=0,g=0;const w=v.map((e,t)=>({x:t===x?1:0,v:0})),y=v.map(()=>null),k=v.map(()=>null);let E=null;const A=v.map(t=>{const a=document.createElement("button");a.type="button",a.className="ascii-acc-panel",a.setAttribute("aria-label",[t.title??t.alt,t.meta].filter(Boolean).join(", ")||t.src);const n=e(t.src);if(n.className="ascii-acc-photo",n.alt="",n.draggable=!1,t.focus&&n.style.setProperty("object-position",`${100*t.focus.x}% ${100*t.focus.y}%`),a.appendChild(n),t.title||t.meta){const e=document.createElement("span");e.className="ascii-acc-caption",e.setAttribute("aria-hidden","true");for(const[a,n]of[["ascii-acc-title",t.title],["ascii-acc-meta",t.meta]]){if(!n)continue;const t=document.createElement("span");t.className=a,t.textContent=n,e.appendChild(t)}a.appendChild(e)}return a});function M(e,t){const a=b?Math.min(.064,(e-b)/1e3):1/60;b=e;const n=5/(Math.max(1,m.current.duration)/1e3),r=Math.max(1,Math.ceil(240*a)),i=a/r;let o=!1;return w.forEach((e,a)=>{const c=a===x?1:0;t&&(e.x=c,e.v=0);for(let t=0;t<r&&(e.x!==c||e.v);t++)e.v+=(-n*n*(e.x-c)-2*n*e.v)*i,e.x+=e.v*i;Math.abs(e.x-c)<.001&&Math.abs(e.v)<.01?(e.x=c,e.v=0):o=!0,F(A[a],e.x)}),o||(b=0),o}function F(e,t){const a=e.style;a.setProperty("--ascii-acc-open",t.toFixed(4)),a.setProperty("--ascii-acc-photo",(E?s(.15,.75,t):.45+.55*t).toFixed(3)),a.setProperty("--ascii-acc-caption",s(.6,1,t).toFixed(3))}E=c({host:u,layer:"under",look:()=>({blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:6,cellAspect:.62,glyphScale:.94,hover:"trail",trail:{strength:.5,radius:.25},...m.current.look}),ink:()=>m.current.ink??"--ascii-ink-strong",kit:m,reducedMotion:()=>m.current.reducedMotion,onFail:()=>{E=null,delete u.dataset.asciiField},onTheme:()=>{y.forEach((e,t)=>{k[t]=e&&E?r(e,!E.dark()):null}),E?.kick()},paint:({pen:e,still:a,now:n,box:r})=>{const i=M(n,a);return A.forEach((a,n)=>{const i=k[n],o=w[n].x,c=1-s(.45,.95,o);if(!i||c<=0)return;const l=r(a),p=parseFloat(getComputedStyle(a).borderTopLeftRadius)||0,d=1.04-.04*o;e.save(),e.beginPath(),e.roundRect(l.x,l.y,l.w,l.h,p),e.clip(),e.globalAlpha=c,t(e,i,l.x-l.w*(d-1)/2,l.y-l.h*(d-1)/2,l.w*d,l.h*d,v[n].focus?.x,v[n].focus?.y),e.restore()}),i}});const L=()=>{A.forEach((e,t)=>{e.setAttribute("aria-expanded",String(t===x)),e.tabIndex=t===x?0:-1})},C=(e,t=!1)=>{e=o(Math.round(e),0,A.length-1),t&&A[e]?.focus(),e!==x&&(x=e,L(),m.current.onChange?.(e),(()=>{if(E)return void E.kick();if(g||"function"!=typeof requestAnimationFrame)return void(g||M(performance.now(),!0));const e=t=>{g=M(t,!!(m.current.reducedMotion??p()))?requestAnimationFrame(e):0};g=requestAnimationFrame(e)})())};let P=0,S=0,j=0,R=0,T=0;const q=()=>{P&&clearTimeout(P),P=0},N=A.map((e,t)=>{const a=e=>{if("mouse"!==e.pointerType)return;const a=e.timeStamp||performance.now(),n=Math.max(1,a-j);if(R=j&&n<100?.5*R+Math.abs(e.clientX-S)/n*.5:0,S=e.clientX,j=a,T!==t&&q(),T=t,t!==x)return R<.3?(q(),void C(t)):void(P||(P=setTimeout(()=>{P=0,C(T)},90)));q()},n=()=>{q(),C(t)},r=()=>{e.matches(":focus-visible")&&C(t)},i=e=>{const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[e.key],n="Home"===e.key?0:"End"===e.key?A.length-1:void 0!==a?(t+a+A.length)%A.length:null;null!==n&&(e.preventDefault(),C(n,!0))};return e.addEventListener("pointermove",a),e.addEventListener("pointerdown",n),e.addEventListener("click",n),e.addEventListener("focus",r),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointermove",a),e.removeEventListener("pointerdown",n),e.removeEventListener("click",n),e.removeEventListener("focus",r),e.removeEventListener("keydown",i)}}),z=()=>{q(),j=0};u.addEventListener("pointerleave",z),a("ascii-kit-accordion",'\n:where([data-ascii-accordion]){display:flex;gap:6px}\n:where(.ascii-acc-panel){position:relative;flex:calc(1 + 3.2 * var(--ascii-acc-open, 0)) 1 0;min-width:0;margin:0;padding:0;border:0;border-radius:12px;overflow:hidden;background:transparent;color:#fff;font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}\n:where(.ascii-acc-panel[aria-expanded="true"]){cursor:default}\n:where(.ascii-acc-photo){position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:var(--ascii-acc-photo, 0);scale:calc(1.04 - .04 * var(--ascii-acc-open, 0))}\n:where(.ascii-acc-caption){position:absolute;inset:auto 0 0;display:flex;color:#fff;flex-direction:column;gap:2px;padding:28px 12px 11px;background:linear-gradient(to top, rgb(0 0 0 / .62), transparent);white-space:nowrap;opacity:var(--ascii-acc-caption, 0);translate:0 calc(6px - 6px * var(--ascii-acc-caption, 0))}\n:where(.ascii-acc-title){font-size:15px;font-weight:500}\n:where(.ascii-acc-meta){font-size:14px;opacity:.8}\n'),u.dataset.asciiAccordion="",E&&(u.dataset.asciiField="");const X=u.getAttribute("role"),B=u.getAttribute("aria-label");return X||u.setAttribute("role","group"),B||u.setAttribute("aria-label",m.current.label),A.forEach((e,t)=>{F(e,w[t].x),u.appendChild(e)}),L(),A.forEach((e,t)=>{const a=e.querySelector("img");a&&n(a).then(e=>{y[t]=e,k[t]=E?r(e,!E.dark()):null,E?.kick()},()=>{})}),l(()=>E,m,e=>{B||u.setAttribute("aria-label",e.label),E?.refresh()},{select:C,get open(){return x}},()=>{N.forEach(e=>e()),q(),g&&cancelAnimationFrame(g),u.removeEventListener("pointerleave",z),A.forEach(e=>e.remove()),delete u.dataset.asciiAccordion,delete u.dataset.asciiField,X||u.removeAttribute("role"),B||u.removeAttribute("aria-label"),f.restore()})}export{u as accordion};//# sourceMappingURL=chunk-XYLLL2PQ.js.map
1
+ import{imageFor as e,drawCover as t,injectStyle as a,imageReady as n,toneOf as r}from"./chunk-LE53AVKR.js";import{styleKeeper as i,clamp as o,mountSurface as c,smoothstep as s,handle as l,prefersReduced as p}from"./chunk-GF72XM4C.js";var d=e=>"string"==typeof e?{src:e}:e;function u(u,h){const m={current:{open:0,duration:420,label:"Images",...h}},f=i(),v=m.current.images.map(d);let x=o(Math.round(m.current.open),0,Math.max(0,v.length-1)),b=0,g=0;const w=v.map((e,t)=>({x:t===x?1:0,v:0})),y=v.map(()=>null),k=v.map(()=>null);let E=null;const A=v.map(t=>{const a=document.createElement("button");a.type="button",a.className="ascii-acc-panel",a.setAttribute("aria-label",[t.title??t.alt,t.meta].filter(Boolean).join(", ")||t.src);const n=e(t.src);if(n.className="ascii-acc-photo",n.alt="",n.draggable=!1,t.focus&&n.style.setProperty("object-position",`${100*t.focus.x}% ${100*t.focus.y}%`),a.appendChild(n),t.title||t.meta){const e=document.createElement("span");e.className="ascii-acc-caption",e.setAttribute("aria-hidden","true");for(const[a,n]of[["ascii-acc-title",t.title],["ascii-acc-meta",t.meta]]){if(!n)continue;const t=document.createElement("span");t.className=a,t.textContent=n,e.appendChild(t)}a.appendChild(e)}return a});function M(e,t){const a=b?Math.min(.064,(e-b)/1e3):1/60;b=e;const n=5/(Math.max(1,m.current.duration)/1e3),r=Math.max(1,Math.ceil(240*a)),i=a/r;let o=!1;return w.forEach((e,a)=>{const c=a===x?1:0;t&&(e.x=c,e.v=0);for(let t=0;t<r&&(e.x!==c||e.v);t++)e.v+=(-n*n*(e.x-c)-2*n*e.v)*i,e.x+=e.v*i;Math.abs(e.x-c)<.001&&Math.abs(e.v)<.01?(e.x=c,e.v=0):o=!0,L(A[a],e.x)}),o||(b=0),o}function L(e,t){const a=e.style;a.setProperty("--ascii-acc-open",t.toFixed(4)),a.setProperty("--ascii-acc-photo",(E?s(.15,.75,t):.45+.55*t).toFixed(3)),a.setProperty("--ascii-acc-caption",s(.6,1,t).toFixed(3))}E=c({host:u,layer:"under",look:()=>({blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:6,cellAspect:.62,glyphScale:.94,hover:"trail",trail:{strength:.5,radius:.25},...m.current.look}),ink:()=>m.current.ink??"--ascii-ink-strong",kit:m,reducedMotion:()=>m.current.reducedMotion,onFail:()=>{E=null,delete u.dataset.asciiField},onTheme:()=>{y.forEach((e,t)=>{k[t]=e&&E?r(e,!E.dark()):null}),E?.kick()},paint:({pen:e,still:a,now:n,box:r})=>{const i=M(n,a);return A.forEach((a,n)=>{const i=k[n],o=w[n].x,c=1-s(.45,.95,o);if(!i||c<=0)return;const l=r(a),p=parseFloat(getComputedStyle(a).borderTopLeftRadius)||0,d=1.04-.04*o;e.save(),e.beginPath(),e.roundRect(l.x,l.y,l.w,l.h,p),e.clip(),e.globalAlpha=c,t(e,i,l.x-l.w*(d-1)/2,l.y-l.h*(d-1)/2,l.w*d,l.h*d,v[n].focus?.x,v[n].focus?.y),e.restore()}),i}});const F=()=>{A.forEach((e,t)=>{e.setAttribute("aria-expanded",String(t===x)),e.tabIndex=t===x?0:-1})},C=(e,t=!1)=>{e=o(Math.round(e),0,A.length-1),t&&A[e]?.focus(),e!==x&&(x=e,F(),m.current.onChange?.(e),(()=>{if(E)return void E.kick();if(g||"function"!=typeof requestAnimationFrame)return void(g||M(performance.now(),!0));const e=t=>{g=M(t,!!(m.current.reducedMotion??p()))?requestAnimationFrame(e):0};g=requestAnimationFrame(e)})())};let S=0,j=0,P=0,T=0,q=0;const N=()=>{S&&clearTimeout(S),S=0},R=A.map((e,t)=>{const a=e=>{if("mouse"!==e.pointerType)return;const a=e.timeStamp||performance.now(),n=Math.max(1,a-P);if(T=P&&n<100?.5*T+Math.abs(e.clientX-j)/n*.5:0,j=e.clientX,P=a,q!==t&&N(),q=t,t!==x)return T<.3?(N(),void C(t)):void(S||(S=setTimeout(()=>{S=0,C(q)},90)));N()},n=()=>{N(),C(t)},r=()=>{e.matches(":focus-visible")&&C(t)},i=e=>{const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[e.key],n="Home"===e.key?0:"End"===e.key?A.length-1:void 0!==a?(t+a+A.length)%A.length:null;null!==n&&(e.preventDefault(),C(n,!0))};return e.addEventListener("pointermove",a),e.addEventListener("pointerdown",n),e.addEventListener("click",n),e.addEventListener("focus",r),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointermove",a),e.removeEventListener("pointerdown",n),e.removeEventListener("click",n),e.removeEventListener("focus",r),e.removeEventListener("keydown",i)}}),z=()=>{N(),P=0};u.addEventListener("pointerleave",z),a("ascii-kit-accordion",'\n:where([data-ascii-accordion]){display:flex;gap:6px}\n:where(.ascii-acc-panel){position:relative;flex:calc(1 + 3.2 * var(--ascii-acc-open, 0)) 1 0;min-width:0;margin:0;padding:0;border:0;border-radius:12px;overflow:hidden;background:transparent;color:#fff;font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}\n:where(.ascii-acc-panel[aria-expanded="true"]){cursor:default}\n:where(.ascii-acc-photo){position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:var(--ascii-acc-photo, 0);scale:calc(1.04 - .04 * var(--ascii-acc-open, 0))}\n:where(.ascii-acc-caption){position:absolute;inset:auto 0 0;display:flex;color:#fff;flex-direction:column;gap:2px;padding:28px 12px 11px;background:linear-gradient(to top, rgb(0 0 0 / .62), transparent);white-space:nowrap;opacity:var(--ascii-acc-caption, 0);translate:0 calc(6px - 6px * var(--ascii-acc-caption, 0))}\n:where(.ascii-acc-title){font-size:15px;font-weight:500}\n:where(.ascii-acc-meta){font-size:14px;opacity:.8}\n'),u.dataset.asciiAccordion="",E&&(u.dataset.asciiField="");const X=u.getAttribute("role"),D=u.getAttribute("aria-label");return X||u.setAttribute("role","group"),D||u.setAttribute("aria-label",m.current.label),A.forEach((e,t)=>{L(e,w[t].x),u.appendChild(e)}),F(),A.forEach((e,t)=>{const a=e.querySelector("img");a&&n(a).then(e=>{y[t]=e,k[t]=E?r(e,!E.dark()):null,E?.kick()},()=>{})}),l(()=>E,m,e=>{D||u.setAttribute("aria-label",e.label),E?.refresh()},{select:C,get open(){return x}},()=>{R.forEach(e=>e()),N(),g&&cancelAnimationFrame(g),u.removeEventListener("pointerleave",z),A.forEach(e=>e.remove()),delete u.dataset.asciiAccordion,delete u.dataset.asciiField,X||u.removeAttribute("role"),D||u.removeAttribute("aria-label"),f.restore()})}export{u as accordion};//# sourceMappingURL=chunk-7NVKRDKE.js.map
@@ -0,0 +1 @@
1
+ import{parseColor as o,hash2 as t}from"./chunk-ZCHGV2CV.js";import{mountCanvas as l}from"./chunk-3OD5BMF5.js";import{mixHex as e}from"./chunk-GF72XM4C.js";function r(l,e,r,a,i={}){const{fontSize:n=13,baseChars:f="ATCG",bridgeChars:h="-=≡",color:c="#00e5ff",color2:s="#ff4081",bridgeColor:M="#88ffcc",speed:b=1,helixCount:g,lightMode:p=!1}=i,d=.62*n,m=1.4*n,u=Math.ceil(e/d),$=Math.ceil(r/m),x=g??Math.max(1,Math.floor(e/80)),C=u/x,S=o(c)??{r:0,g:229,b:255},k=o(s)??{r:255,g:64,b:129},A=o(M)??{r:136,g:255,b:204};l.clearRect(0,0,e,r),l.font=`${n}px "JetBrains Mono", monospace`,l.textBaseline="top";const z=a*b,T=.35*C;for(let o=0;o<x;o++){const e=C*(o+.5);for(let r=0;r<$;r++){const a=r/$*Math.PI*6-1.8*z,i=e+Math.sin(a)*T,n=e+Math.sin(a+Math.PI)*T,c=Math.round(i),s=Math.round(n);if(c<0||c>=u)continue;const M=t(31*o+7*r,3),b=f[Math.floor(M*f.length)],g=.5*(Math.sin(a)+1),p=.5*(Math.sin(a+Math.PI)+1);if(l.globalAlpha=.35+.65*g,l.fillStyle=`rgb(${S.r},${S.g},${S.b})`,l.fillText(b,c*d,r*m),s>=0&&s<u){const e=t(53*o+11*r,7),a=f[Math.floor(e*f.length)];l.globalAlpha=.35+.65*p,l.fillStyle=`rgb(${k.r},${k.g},${k.b})`,l.fillText(a,s*d,r*m)}if(r%3===0){const e=Math.min(c,s),a=Math.max(c,s);if(a-e>1){const i=t(17*r+43*o,5),n=h[Math.floor(i*h.length)],f=.25*(g+p)+.2;l.globalAlpha=f,l.fillStyle=`rgb(${A.r},${A.g},${A.b})`;for(let o=e+1;o<a;o++)l.fillText(n,o*d,r*m)}}}}l.globalAlpha=1}var a={id:"dna",name:"DNA",description:"Double helices scroll past with base-pair letters.",cellSize:13,speed:1,cursor:!1,mount:o=>l(o,(o,t,l,a,i,n)=>r(o,t,l,a,{fontSize:n.fontSize,color:n.ink,color2:n.accent??e(n.ink,"#ffffff",.55),bridgeColor:e(n.ink,"#0c0d0b",.35)}))};export{a as dna,r as renderDnaBackground};//# sourceMappingURL=chunk-AIGAJMNN.js.map
@@ -1 +1 @@
1
- import{renderMaterial as i}from"./chunk-XPXMCXYI.js";import{mountCanvas as t}from"./chunk-KTYCGGRO.js";var o=(i,t,o,r)=>{const e=.12+.06*Math.sin(.1*r),n=Math.sin(68*i),h=Math.sin(68*(i*Math.cos(e)+t*Math.sin(e)));return.8*Math.pow((n+h+2)/4,3)},r={id:"moire",name:"Moiré",description:"Two fine line fields overlap into broad, shifting bands.",cellSize:12,speed:1,cursor:!1,mount:r=>t(r,(t,r,e,n,h,s)=>i(o,t,r,e,n,{ditherStrength:s.ditherStrength,fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink}))};export{r as moire};//# sourceMappingURL=chunk-XXPDXJMQ.js.map
1
+ import{renderMaterial as i}from"./chunk-XPXMCXYI.js";import{mountCanvas as t}from"./chunk-3OD5BMF5.js";var o=(i,t,o,r)=>{const e=.12+.06*Math.sin(.1*r),n=Math.sin(68*i),h=Math.sin(68*(i*Math.cos(e)+t*Math.sin(e)));return.8*Math.pow((n+h+2)/4,3)},r={id:"moire",name:"Moiré",description:"Two fine line fields overlap into broad, shifting bands.",cellSize:12,speed:1,cursor:!1,mount:r=>t(r,(t,r,e,n,h,s)=>i(o,t,r,e,n,{ditherStrength:s.ditherStrength,fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink}))};export{r as moire};//# sourceMappingURL=chunk-B3TY6UXJ.js.map
@@ -0,0 +1 @@
1
+ import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-3OD5BMF5.js";function n(e,n,c,l,i={}){const{fontSize:r=13,chars:a="0123456789ABCDEF@#$&*+=/<>",accentColor:s,color:f,speed:h=1,density:g=.55,tailLength:d=14,lightMode:$=!1}=i,p=s??($?"#6b8700":"#d4ff00"),M=.62*r,m=1.4*r,u=Math.ceil(n/M),b=Math.ceil(c/m);e.clearRect(0,0,n,c),e.font=`${r}px monospace`,e.textBaseline="top";let C=255,S=255,x=255;if($&&(C=55,S=55,x=55),f){const o=t(f);o&&(C=o.r,S=o.g,x=o.b)}let z=212,k=255,y=0;const B=t(p);B&&(z=B.r,k=B.g,y=B.b);const j=b+d;for(let t=0;t<u;t++){if(o(17*t,3)>g)continue;const n=(.5+1.5*o(31*t,7))*h,c=o(13*t,11)*j,i=Math.floor((l*n*7+c)%j),r=t*M;for(let n=0;n<=d;n++){const c=i-(d-n);if(c<0||c>=b)continue;const s=c*m,f=o(53*t+Math.floor(5*l+n),7*c),h=a[Math.floor(f*a.length)],g=n/d;if(n===d)e.fillStyle=`rgba(${z},${k},${y},${$?.7:.85})`;else{const t=$?.85*g:.15*g;e.fillStyle=`rgba(${C},${S},${x},${t})`}e.fillText(h,r,s)}}}var c={id:"rain",name:"Rain",description:"Columns of falling characters with bright heads.",cellSize:13,speed:1,cursor:!1,mount:t=>e(t,(t,o,e,c,l,i)=>n(t,o,e,c,{fontSize:i.fontSize,chars:i.chars,lightMode:i.lightMode,color:i.ink,accentColor:i.accent}))};export{c as rain,n as renderRainBackground};//# sourceMappingURL=chunk-BFBG3VHI.js.map
@@ -1 +1 @@
1
- import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as r}from"./chunk-KTYCGGRO.js";var e=(t,r,e,o)=>{const i=48*t+4*Math.sin(2.6*r+.08*o)+1.5*Math.sin(7*r-2*t);return Math.pow(.5+.5*Math.sin(i),10)*(.35+.55*Math.pow(Math.sin(2*r+.4),2))},o={id:"etch",name:"Etch",description:"Cut-grain lines follow a slow, sculpted current.",cellSize:12,speed:1,cursor:!1,mount:o=>r(o,(r,o,i,n,h,s)=>t(e,r,o,i,n,{ditherStrength:s.ditherStrength,fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink}))};export{o as etch};//# sourceMappingURL=chunk-6XNIZ52V.js.map
1
+ import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as r}from"./chunk-3OD5BMF5.js";var e=(t,r,e,o)=>{const i=48*t+4*Math.sin(2.6*r+.08*o)+1.5*Math.sin(7*r-2*t);return Math.pow(.5+.5*Math.sin(i),10)*(.35+.55*Math.pow(Math.sin(2*r+.4),2))},o={id:"etch",name:"Etch",description:"Cut-grain lines follow a slow, sculpted current.",cellSize:12,speed:1,cursor:!1,mount:o=>r(o,(r,o,i,n,h,s)=>t(e,r,o,i,n,{ditherStrength:s.ditherStrength,fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink}))};export{o as etch};//# sourceMappingURL=chunk-CG6SGQMY.js.map
@@ -1 +1 @@
1
- import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as i}from"./chunk-KTYCGGRO.js";var o=(t,i,o,r)=>{const e=5.5*(t-.5*o)+.65*Math.sin(3.2*i+.2*r)+.12*r;return Math.pow(.5+.5*Math.cos(e),7)*(.45+.55*Math.sin(2.4*i+.2))},r={id:"veil",name:"Veil",description:"Tall folds of light drifting across a quiet ground.",cellSize:12,speed:1,cursor:!1,mount:r=>i(r,(i,r,e,n,h,s)=>t(o,i,r,e,n,{ditherStrength:s.ditherStrength,fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink}))};export{r as veil};//# sourceMappingURL=chunk-KBXVIAWS.js.map
1
+ import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as i}from"./chunk-3OD5BMF5.js";var o=(t,i,o,r)=>{const e=5.5*(t-.5*o)+.65*Math.sin(3.2*i+.2*r)+.12*r;return Math.pow(.5+.5*Math.cos(e),7)*(.45+.55*Math.sin(2.4*i+.2))},r={id:"veil",name:"Veil",description:"Tall folds of light drifting across a quiet ground.",cellSize:12,speed:1,cursor:!1,mount:r=>i(r,(i,r,e,n,h,s)=>t(o,i,r,e,n,{ditherStrength:s.ditherStrength,fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink}))};export{r as veil};//# sourceMappingURL=chunk-CGSWUO67.js.map
@@ -1 +1 @@
1
- import{injectStyle as t,drawBlocks as e,snapshot as n,blocksOf as o}from"./chunk-PCGRRX5P.js";import{clamp as i,styleKeeper as a,srOnly as r,mountSurface as s,house as c,hash as d,handle as l,hexRgb as p,resolveColor as m,isDark as h}from"./chunk-PFQBEWCF.js";var u={max:3,duration:6e3,label:"Notifications",swipe:!0},f="cubic-bezier(.16, 1, .3, 1)",x=`\n:where(.ascii-toasts){position:relative;margin:0;padding:0;list-style:none;min-height:52px}\n:where(.ascii-toast){position:absolute;left:0;right:0;bottom:0;box-sizing:border-box;display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 8px 8px 10px;border-radius:14px;background:var(--ascii-toast-bg,Canvas);color:var(--ascii-toast-ink,CanvasText);box-shadow:var(--ascii-toast-shadow,0 1px 2px rgb(0 0 0 / .06),0 10px 28px -10px rgb(0 0 0 / .22));z-index:calc(10 - var(--d,0));transform-origin:50% 0;translate:0 calc(var(--d,0) * -12px);scale:calc(1 - var(--d,0) * .05);touch-action:pan-y;transition:translate 380ms ${f},scale 380ms ${f},opacity 220ms ${f},transform 300ms ${f},filter 380ms ${f}}\n:where(.ascii-toast)::after{content:"";position:absolute;left:0;right:0;top:100%;height:10px}\n:where(.ascii-toast) > *{transition:opacity 200ms ${f}}\n:where(.ascii-toast[data-back]) > *{opacity:0}\n:where(.ascii-toasts:not([data-open])) :where(.ascii-toast[data-back]){filter:brightness(calc(1 - var(--d,0) * .04))}\n:where(.ascii-toasts:not([data-open])) :where(.ascii-toast[data-back]) > *{pointer-events:none}\n:where(.ascii-toasts[data-open]) :where(.ascii-toast){translate:0 calc(var(--d,0) * (-100% - 8px));scale:1}\n:where(.ascii-toasts[data-open]) :where(.ascii-toast[data-back]) > *{opacity:1}\n:where(.ascii-toast[data-forming]){animation:ascii-toast-in 420ms ${f} both}\n:where(.ascii-toast[data-forming],.ascii-toast[data-gone]) > *{opacity:0;transition:none}\n:where(.ascii-toast[data-gone]){opacity:0;scale:.97;pointer-events:none}\n:where(.ascii-toast[data-swiping]){transition:translate 380ms ${f},scale 380ms ${f},opacity 220ms ${f}}\n@keyframes ascii-toast-in{from{opacity:0;translate:0 14px}}\n:where(.ascii-toast-icon){display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:9px;background:rgb(128 128 128 / .14)}\n:where(.ascii-toast-text){display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}\n:where(.ascii-toast-title){overflow:hidden;font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}\n:where(.ascii-toast-body){overflow:hidden;font-size:13px;opacity:.68;text-overflow:ellipsis;white-space:nowrap}\n:where(.ascii-toast-action,.ascii-toast-close){flex:none;border:0;background:rgb(128 128 128 / .14);color:inherit;font:inherit;cursor:pointer}\n:where(.ascii-toast-action){height:32px;padding:0 12px;border-radius:999px;font-size:14px;font-weight:500}\n:where(.ascii-toast-close){display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:transparent;font-size:18px;line-height:1;opacity:.6}\n@media (prefers-reduced-motion:reduce){:where(.ascii-toast){transition:none}:where(.ascii-toast[data-forming]){animation:none}}\n`,g=t=>{const[e,n,o]=p(t).map(t=>{const e=t/255;return e<=.04045?e/12.92:((e+.055)/1.055)**2.4});return.2126*e+.7152*n+.0722*o};function b(t,e){const n=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:[\s,/]+([\d.]+%?))?/i.exec(t.trim());if(!n)return!1;if(!((void 0===n[4]?1:n[4].endsWith("%")?parseFloat(n[4])/100:parseFloat(n[4]))>=.5))return!1;const o=`#${[n[1],n[2],n[3]].map(t=>Math.round(i(+t,0,255)).toString(16).padStart(2,"0")).join("")}`,[a,r]=[g(o),g(e)].sort((t,e)=>e-t);return(a+.05)/(r+.05)<3}function v(p,f={}){const g={current:{...u,...f}},v=a(),w=document.createElement("ol"),y=r("",!1);y.setAttribute("role","status");let k=[],E=[],C=0,L=!1,$=!1,P=!1,M=!1,T=null;const z=[];t("ascii-kit-toast",x),w.className="ascii-toasts",w.setAttribute("aria-label",g.current.label),p.append(w,y);const S=new WeakSet,A=t=>{delete t.dataset.forming,S.delete(t)&&(t.style.removeProperty("transition"),t.style.removeProperty("background-color"),t.style.removeProperty("box-shadow"))};T=s({host:p,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:5,cellAspect:.62,glyphScale:.92,...g.current.look}),outset:24,resolution:2,ink:()=>g.current.ink??"--ascii-ink-strong",kit:g,reducedMotion:()=>g.current.reducedMotion,onFail:()=>{T=null,E=[];for(const t of k)A(t.node)},paint:({pen:t,now:n,scale:o,still:a,box:r})=>(t.setTransform(o,0,0,o,0,0),E=E.filter(o=>{const a=(n-o.start)/o.ms;if(o.form&&a>=.62&&A(o.node),a>=1)return!1;if(o.form)e(t,o.snap,o.blocks,o.order,1.04*c(a),(t,e)=>[70*(t.seed-.5)*e,(14+26*d(t.x,t.y))*e],1-i((a-.62)/.28));else{const n=o.dir;e(t,o.snap,o.blocks,o.order,1-1.04*(1-(1-a)**3),(t,e)=>[n*(14+34*t.seed+.5*Math.abs(o.throw))*e,14*(d(t.y,t.x)-.35)*e],1-i((a-.75)/.25))}return!0}),E.length>0)}),T&&(T.canvas.style.zIndex="11");const F=()=>!!T&&T.live&&!T.still(),W=()=>{const t=k.filter(t=>void 0===t.node.dataset.gone);t.forEach((e,n)=>{const o=t.length-1-n;v.set(e.node,"--d",String(o)),0===o?(e.node.dataset.front="",delete e.node.dataset.back):(e.node.dataset.back="",delete e.node.dataset.front)})},I=(t,e,i=0)=>{if(!T)return;const a=T.canvas.clientWidth||p.clientWidth+48,r=T.canvas.clientHeight||p.clientHeight+48,s=n(t,a,r,T.box),c=o(s.rects),d=Math.max(1,...c.map(t=>t.x)),l=i<0?-1:1,m=l>0?t=>t.x/d:t=>1-t.x/d,h=Float32Array.from(c,t=>e?t.x/d*.3+.7*t.seed:.62*m(t)+.38*t.seed);E.push({start:performance.now(),ms:e?340:440,snap:s.canvas,blocks:c,order:h,form:e,node:t,dir:l,throw:i}),T.kick()},X=t=>{t.timer&&clearTimeout(t.timer),t.timer=0,L||t.left<=0||(t.since=performance.now(),t.timer=setTimeout(()=>B(t.id),t.left))},j=()=>(t=>{if(t!==L){L=t,t?w.dataset.open="":delete w.dataset.open;for(const e of k)t&&e.timer&&(clearTimeout(e.timer),e.timer=0,e.left=Math.max(400,e.left-(performance.now()-e.since))),t||X(e)}})($||P),N=()=>{$=!0,j()},G=()=>{$=!1,j()},H=()=>{P=!0,j()},R=t=>{w.contains(t.relatedTarget)||(P=!1,j())};function B(t,e=0){const n=k.find(e=>e.id===t);if(!n||void 0!==n.node.dataset.gone)return;n.timer&&clearTimeout(n.timer);const o=()=>{k=k.filter(t=>t!==n),E=E.filter(t=>t.node!==n.node),n.node.remove(),W(),T?.kick(),k.some(t=>void 0===t.node.dataset.gone)||($=P=!1,j())},i=k[k.length-1]===n;F()&&(i||L||e)?(A(n.node),I(n.node,!1,e),n.node.dataset.gone="",W(),z.push(setTimeout(o,220))):o()}w.addEventListener("pointerenter",N),w.addEventListener("pointerleave",G),w.addEventListener("focusin",H),w.addEventListener("focusout",R);let D=null;const Q=t=>{if(!g.current.swipe||0!==t.button||D)return;const e=t.target;if(e?.closest?.('button, a, input, textarea, select, [role="button"]'))return;const n=e?.closest?.("[data-toast]"),o=n&&k.find(t=>t.node===n);o&&void 0===n.dataset.gone&&void 0===n.dataset.forming&&(D={item:o,id:t.pointerId,x0:t.clientX,dx:0,t:performance.now(),v:0},n.dataset.swiping="",n.setPointerCapture?.(t.pointerId))},q=t=>{if(!D||t.pointerId!==D.id)return;const e=performance.now(),n=t.clientX-D.x0;D.v=(n-D.dx)/Math.max(1,e-D.t),D.dx=n,D.t=e,D.item.node.style.setProperty("transform",`translateX(${n}px)`),D.item.node.style.setProperty("opacity",String(i(1-Math.abs(n)/260,.2)))},J=t=>{if(!D||t.pointerId!==D.id)return;const{item:e,dx:n}=D,o=e.node,i=performance.now()-D.t>90?0:D.v;D=null,delete o.dataset.swiping;const a=Math.abs(n)>64||Math.abs(i)>.45&&Math.abs(n)>8;o.style.removeProperty("opacity"),a?(B(e.id,n||i),o.style.setProperty("transform",`translateX(${n+48*Math.sign(n||i)}px)`)):o.style.removeProperty("transform")};w.addEventListener("pointerdown",Q),w.addEventListener("pointermove",q),w.addEventListener("pointerup",J),w.addEventListener("pointercancel",J);return l(()=>T,g,t=>{w.setAttribute("aria-label",t.label),T?.refresh()},{push:t=>{if(M)return-1;const e=++C,n=k.filter(t=>void 0===t.node.dataset.gone),o=n.length+1-Math.max(1,g.current.max);o>0&&n.slice(0,o).forEach(t=>B(t.id));const i=g.current.render?g.current.render(t,e):function(t,e){const n=(t,e,n)=>{const o=document.createElement(t);return o.className=e,n&&(o.dataset.paint=n),o},o=n("li","ascii-toast");if(void 0!==t.icon){const e=n("span","ascii-toast-icon","tile");e.setAttribute("aria-hidden","true"),"string"==typeof t.icon?e.textContent=t.icon:e.appendChild(t.icon),o.appendChild(e)}const i=n("span","ascii-toast-text"),a=n("b","ascii-toast-title","strong");if(a.textContent=t.title,i.appendChild(a),t.body){const e=n("span","ascii-toast-body","meta");e.textContent=t.body,i.appendChild(e)}if(o.appendChild(i),t.action){const{label:i,onClick:a}=t.action,r=n("button","ascii-toast-action","text");r.type="button",r.textContent=i,r.addEventListener("click",()=>{a(),e()}),o.appendChild(r)}const r=n("button","ascii-toast-close","none");return r.type="button",r.setAttribute("aria-label",`Dismiss ${t.title}`),r.textContent="×",r.addEventListener("click",e),o.appendChild(r),o}(t,()=>B(e));i.dataset.toast=String(e);const a={id:e,node:i,timer:0,left:t.duration??g.current.duration,since:0,born:performance.now()};return k.push(a),w.appendChild(i),W(),y.textContent=t.body?`${t.title}. ${t.body}`:t.title,F()?(i.dataset.forming="",(t=>{const e=m(g.current.ink??"--ascii-ink-strong",p,h(p)?"#d8d6cf":"#1d1d1b");e&&b(getComputedStyle(t).backgroundColor,e)&&(S.add(t),t.style.setProperty("transition","none","important"),t.style.setProperty("background-color","transparent","important"),t.style.setProperty("box-shadow","none","important"))})(i),I(i,!0)):T?.kick(),X(a),e},dismiss:t=>B(t),clear(){[...k].forEach(t=>B(t.id))},get toasts(){return k.filter(t=>void 0===t.node.dataset.gone).map(t=>t.id)}},()=>{M=!0;for(const t of k)t.timer&&clearTimeout(t.timer);z.forEach(clearTimeout),w.removeEventListener("pointerenter",N),w.removeEventListener("pointerleave",G),w.removeEventListener("focusin",H),w.removeEventListener("focusout",R),w.removeEventListener("pointerdown",Q),w.removeEventListener("pointermove",q),w.removeEventListener("pointerup",J),w.removeEventListener("pointercancel",J),k=[],E=[],w.remove(),y.remove(),v.restore()})}var w=u;export{w as TOAST_DEFAULTS,b as hidesInk,v as toastStack};//# sourceMappingURL=chunk-PFNFW4ZI.js.map
1
+ import{injectStyle as t,drawBlocks as e,snapshot as n,blocksOf as o}from"./chunk-LE53AVKR.js";import{clamp as i,styleKeeper as a,srOnly as r,mountSurface as s,house as c,hash as d,handle as l,hexRgb as p,resolveColor as m,isDark as h}from"./chunk-GF72XM4C.js";var u={max:3,duration:6e3,label:"Notifications",swipe:!0},f="cubic-bezier(.16, 1, .3, 1)",x=`\n:where(.ascii-toasts){position:relative;margin:0;padding:0;list-style:none;min-height:52px}\n:where(.ascii-toast){position:absolute;left:0;right:0;bottom:0;box-sizing:border-box;display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 8px 8px 10px;border-radius:14px;background:var(--ascii-toast-bg,Canvas);color:var(--ascii-toast-ink,CanvasText);box-shadow:var(--ascii-toast-shadow,0 1px 2px rgb(0 0 0 / .06),0 10px 28px -10px rgb(0 0 0 / .22));z-index:calc(10 - var(--d,0));transform-origin:50% 0;translate:0 calc(var(--d,0) * -12px);scale:calc(1 - var(--d,0) * .05);touch-action:pan-y;transition:translate 380ms ${f},scale 380ms ${f},opacity 220ms ${f},transform 300ms ${f},filter 380ms ${f}}\n:where(.ascii-toast)::after{content:"";position:absolute;left:0;right:0;top:100%;height:10px}\n:where(.ascii-toast) > *{transition:opacity 200ms ${f}}\n:where(.ascii-toast[data-back]) > *{opacity:0}\n:where(.ascii-toasts:not([data-open])) :where(.ascii-toast[data-back]){filter:brightness(calc(1 - var(--d,0) * .04))}\n:where(.ascii-toasts:not([data-open])) :where(.ascii-toast[data-back]) > *{pointer-events:none}\n:where(.ascii-toasts[data-open]) :where(.ascii-toast){translate:0 calc(var(--d,0) * (-100% - 8px));scale:1}\n:where(.ascii-toasts[data-open]) :where(.ascii-toast[data-back]) > *{opacity:1}\n:where(.ascii-toast[data-forming]){animation:ascii-toast-in 420ms ${f} both}\n:where(.ascii-toast[data-forming],.ascii-toast[data-gone]) > *{opacity:0;transition:none}\n:where(.ascii-toast[data-gone]){opacity:0;scale:.97;pointer-events:none}\n:where(.ascii-toast[data-swiping]){transition:translate 380ms ${f},scale 380ms ${f},opacity 220ms ${f}}\n@keyframes ascii-toast-in{from{opacity:0;translate:0 14px}}\n:where(.ascii-toast-icon){display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:9px;background:rgb(128 128 128 / .14)}\n:where(.ascii-toast-text){display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}\n:where(.ascii-toast-title){overflow:hidden;font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}\n:where(.ascii-toast-body){overflow:hidden;font-size:13px;opacity:.68;text-overflow:ellipsis;white-space:nowrap}\n:where(.ascii-toast-action,.ascii-toast-close){flex:none;border:0;background:rgb(128 128 128 / .14);color:inherit;font:inherit;cursor:pointer}\n:where(.ascii-toast-action){height:32px;padding:0 12px;border-radius:999px;font-size:14px;font-weight:500}\n:where(.ascii-toast-close){display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:transparent;font-size:18px;line-height:1;opacity:.6}\n@media (prefers-reduced-motion:reduce){:where(.ascii-toast){transition:none}:where(.ascii-toast[data-forming]){animation:none}}\n`,g=t=>{const[e,n,o]=p(t).map(t=>{const e=t/255;return e<=.04045?e/12.92:((e+.055)/1.055)**2.4});return.2126*e+.7152*n+.0722*o};function b(t,e){const n=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:[\s,/]+([\d.]+%?))?/i.exec(t.trim());if(!n)return!1;if(!((void 0===n[4]?1:n[4].endsWith("%")?parseFloat(n[4])/100:parseFloat(n[4]))>=.5))return!1;const o=`#${[n[1],n[2],n[3]].map(t=>Math.round(i(+t,0,255)).toString(16).padStart(2,"0")).join("")}`,[a,r]=[g(o),g(e)].sort((t,e)=>e-t);return(a+.05)/(r+.05)<3}function v(p,f={}){const g={current:{...u,...f}},v=a(),w=document.createElement("ol"),y=r("",!1);y.setAttribute("role","status");let k=[],E=[],C=0,L=!1,$=!1,M=!1,P=!1,T=null;const z=[];t("ascii-kit-toast",x),w.className="ascii-toasts",w.setAttribute("aria-label",g.current.label),p.append(w,y);const S=new WeakSet,A=t=>{delete t.dataset.forming,S.delete(t)&&(t.style.removeProperty("transition"),t.style.removeProperty("background-color"),t.style.removeProperty("box-shadow"))};T=s({host:p,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:5,cellAspect:.62,glyphScale:.92,...g.current.look}),outset:24,resolution:2,ink:()=>g.current.ink??"--ascii-ink-strong",kit:g,reducedMotion:()=>g.current.reducedMotion,onFail:()=>{T=null,E=[];for(const t of k)A(t.node)},paint:({pen:t,now:n,scale:o,still:a,box:r})=>(t.setTransform(o,0,0,o,0,0),E=E.filter(o=>{const a=(n-o.start)/o.ms;if(o.form&&a>=.62&&A(o.node),a>=1)return!1;if(o.form)e(t,o.snap,o.blocks,o.order,1.04*c(a),(t,e)=>[70*(t.seed-.5)*e,(14+26*d(t.x,t.y))*e],1-i((a-.62)/.28));else{const n=o.dir;e(t,o.snap,o.blocks,o.order,1-1.04*(1-(1-a)**3),(t,e)=>[n*(14+34*t.seed+.5*Math.abs(o.throw))*e,14*(d(t.y,t.x)-.35)*e],1-i((a-.75)/.25))}return!0}),E.length>0)}),T&&(T.canvas.style.zIndex="11");const F=()=>!!T&&T.live&&!T.still(),I=()=>{const t=k.filter(t=>void 0===t.node.dataset.gone);t.forEach((e,n)=>{const o=t.length-1-n;v.set(e.node,"--d",String(o)),0===o?(e.node.dataset.front="",delete e.node.dataset.back):(e.node.dataset.back="",delete e.node.dataset.front)})},W=(t,e,i=0)=>{if(!T)return;const a=T.canvas.clientWidth||p.clientWidth+48,r=T.canvas.clientHeight||p.clientHeight+48,s=n(t,a,r,T.box),c=o(s.rects),d=Math.max(1,...c.map(t=>t.x)),l=i<0?-1:1,m=l>0?t=>t.x/d:t=>1-t.x/d,h=Float32Array.from(c,t=>e?t.x/d*.3+.7*t.seed:.62*m(t)+.38*t.seed);E.push({start:performance.now(),ms:e?340:440,snap:s.canvas,blocks:c,order:h,form:e,node:t,dir:l,throw:i}),T.kick()},X=t=>{t.timer&&clearTimeout(t.timer),t.timer=0,L||t.left<=0||(t.since=performance.now(),t.timer=setTimeout(()=>K(t.id),t.left))},j=()=>(t=>{if(t!==L){L=t,t?w.dataset.open="":delete w.dataset.open;for(const e of k)t&&e.timer&&(clearTimeout(e.timer),e.timer=0,e.left=Math.max(400,e.left-(performance.now()-e.since))),t||X(e)}})($||M),N=()=>{$=!0,j()},G=()=>{$=!1,j()},H=()=>{M=!0,j()},D=t=>{w.contains(t.relatedTarget)||(M=!1,j())};function K(t,e=0){const n=k.find(e=>e.id===t);if(!n||void 0!==n.node.dataset.gone)return;n.timer&&clearTimeout(n.timer);const o=()=>{k=k.filter(t=>t!==n),E=E.filter(t=>t.node!==n.node),n.node.remove(),I(),T?.kick(),k.some(t=>void 0===t.node.dataset.gone)||($=M=!1,j())},i=k[k.length-1]===n;F()&&(i||L||e)?(A(n.node),W(n.node,!1,e),n.node.dataset.gone="",I(),z.push(setTimeout(o,220))):o()}w.addEventListener("pointerenter",N),w.addEventListener("pointerleave",G),w.addEventListener("focusin",H),w.addEventListener("focusout",D);let R=null;const V=t=>{if(!g.current.swipe||0!==t.button||R)return;const e=t.target;if(e?.closest?.('button, a, input, textarea, select, [role="button"]'))return;const n=e?.closest?.("[data-toast]"),o=n&&k.find(t=>t.node===n);o&&void 0===n.dataset.gone&&void 0===n.dataset.forming&&(R={item:o,id:t.pointerId,x0:t.clientX,dx:0,t:performance.now(),v:0},n.dataset.swiping="",n.setPointerCapture?.(t.pointerId))},q=t=>{if(!R||t.pointerId!==R.id)return;const e=performance.now(),n=t.clientX-R.x0;R.v=(n-R.dx)/Math.max(1,e-R.t),R.dx=n,R.t=e,R.item.node.style.setProperty("transform",`translateX(${n}px)`),R.item.node.style.setProperty("opacity",String(i(1-Math.abs(n)/260,.2)))},B=t=>{if(!R||t.pointerId!==R.id)return;const{item:e,dx:n}=R,o=e.node,i=performance.now()-R.t>90?0:R.v;R=null,delete o.dataset.swiping;const a=Math.abs(n)>64||Math.abs(i)>.45&&Math.abs(n)>8;o.style.removeProperty("opacity"),a?(K(e.id,n||i),o.style.setProperty("transform",`translateX(${n+48*Math.sign(n||i)}px)`)):o.style.removeProperty("transform")};w.addEventListener("pointerdown",V),w.addEventListener("pointermove",q),w.addEventListener("pointerup",B),w.addEventListener("pointercancel",B);return l(()=>T,g,t=>{w.setAttribute("aria-label",t.label),T?.refresh()},{push:t=>{if(P)return-1;const e=++C,n=k.filter(t=>void 0===t.node.dataset.gone),o=n.length+1-Math.max(1,g.current.max);o>0&&n.slice(0,o).forEach(t=>K(t.id));const i=g.current.render?g.current.render(t,e):function(t,e){const n=(t,e,n)=>{const o=document.createElement(t);return o.className=e,n&&(o.dataset.paint=n),o},o=n("li","ascii-toast");if(void 0!==t.icon){const e=n("span","ascii-toast-icon","tile");e.setAttribute("aria-hidden","true"),"string"==typeof t.icon?e.textContent=t.icon:e.appendChild(t.icon),o.appendChild(e)}const i=n("span","ascii-toast-text"),a=n("b","ascii-toast-title","strong");if(a.textContent=t.title,i.appendChild(a),t.body){const e=n("span","ascii-toast-body","meta");e.textContent=t.body,i.appendChild(e)}if(o.appendChild(i),t.action){const{label:i,onClick:a}=t.action,r=n("button","ascii-toast-action","text");r.type="button",r.textContent=i,r.addEventListener("click",()=>{a(),e()}),o.appendChild(r)}const r=n("button","ascii-toast-close","none");return r.type="button",r.setAttribute("aria-label",`Dismiss ${t.title}`),r.textContent="×",r.addEventListener("click",e),o.appendChild(r),o}(t,()=>K(e));i.dataset.toast=String(e);const a={id:e,node:i,timer:0,left:t.duration??g.current.duration,since:0,born:performance.now()};return k.push(a),w.appendChild(i),I(),y.textContent=t.body?`${t.title}. ${t.body}`:t.title,F()?(i.dataset.forming="",(t=>{const e=m(g.current.ink??"--ascii-ink-strong",p,h(p)?"#d8d6cf":"#1d1d1b");e&&b(getComputedStyle(t).backgroundColor,e)&&(S.add(t),t.style.setProperty("transition","none","important"),t.style.setProperty("background-color","transparent","important"),t.style.setProperty("box-shadow","none","important"))})(i),W(i,!0)):T?.kick(),X(a),e},dismiss:t=>K(t),clear(){[...k].forEach(t=>K(t.id))},get toasts(){return k.filter(t=>void 0===t.node.dataset.gone).map(t=>t.id)}},()=>{P=!0;for(const t of k)t.timer&&clearTimeout(t.timer);z.forEach(clearTimeout),w.removeEventListener("pointerenter",N),w.removeEventListener("pointerleave",G),w.removeEventListener("focusin",H),w.removeEventListener("focusout",D),w.removeEventListener("pointerdown",V),w.removeEventListener("pointermove",q),w.removeEventListener("pointerup",B),w.removeEventListener("pointercancel",B),k=[],E=[],w.remove(),y.remove(),v.restore()})}var w=u;export{w as TOAST_DEFAULTS,b as hidesInk,v as toastStack};//# sourceMappingURL=chunk-DCLJHSWM.js.map
@@ -1 +1 @@
1
- import{scenePreset as e,FIELD_GRAPHITE as r,narrow as t}from"./chunk-OVCIHOOS.js";var a=e({id:"halftone",name:"Halftone",description:"The drifting ground drawn as dots, clear around your content.",cellSize:14,scene:"drift",mark:"dot",charset:" .:-=+*#",hover:"lantern",graphite:r,middle:!1,feather:.2,tune:e=>({scale:t()?1.8:1,blend:"auto",dotScale:.64,lantern:{radius:.16,strength:.35,trail:.6,follow:9},trail:{strength:.9,radius:.4},...e.clear?{clear:{element:e.clear,padding:32,feather:.2,shape:"rect"}}:{}})});export{a as halftone};//# sourceMappingURL=chunk-QTVMD62E.js.map
1
+ import{scenePreset as e,FIELD_GRAPHITE as r,narrow as t}from"./chunk-3VEMKDBW.js";var a=e({id:"halftone",name:"Halftone",description:"The drifting ground drawn as dots, clear around your content.",cellSize:14,scene:"drift",mark:"dot",charset:" .:-=+*#",hover:"lantern",graphite:r,middle:!1,feather:.2,tune:e=>({scale:t()?1.8:1,blend:"auto",dotScale:.64,lantern:{radius:.16,strength:.35,trail:.6,follow:9},trail:{strength:.9,radius:.4},...e.clear?{clear:{element:e.clear,padding:32,feather:.2,shape:"rect"}}:{}})});export{a as halftone};//# sourceMappingURL=chunk-DMRPBFLW.js.map
@@ -1 +1 @@
1
- import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-KTYCGGRO.js";import{mixHex as l}from"./chunk-PFQBEWCF.js";var r=1,i=2,n=4,f=8,c={3:"─",12:"│",9:"┌",10:"┐",5:"└",6:"┘",11:"┬",7:"┴",13:"├",14:"┤",15:"┼",[r]:"╶",[i]:"╴",[n]:"╵",[f]:"╷"};function a(e,l,r,i,n={}){const{fontSize:f=13,pulseColor:a="#ffffff",color:s="#00ff88",density:h=.38,speed:g=1,lightMode:p=!1}=n,u=.62*f,b=1.4*f,m=Math.ceil(l/u),d=Math.ceil(r/b),C=t(s)??{r:0,g:255,b:136},M=t(a)??{r:255,g:255,b:255},$=(t,e)=>{if(o(17*t+1,7*e+2)>h)return 0;let l=0;return t+1<m&&o(17*t+1,7*e+2)>.15&&(l|=1),t-1>=0&&o(17*(t-1)+1,7*e+2)>.15&&(l|=2),e+1<d&&o(17*t+1,7*(e+1)+2)>.15&&(l|=8),e-1>=0&&o(17*t+1,7*(e-1)+2)>.15&&(l|=4),l};e.clearRect(0,0,l,r),e.font=`${f}px "JetBrains Mono", monospace`,e.textBaseline="top";const S=i*g;for(let t=0;t<d;t++)for(let l=0;l<m;l++){const r=$(l,t);if(0===r)continue;const i=c[r]??"·",n=(8*S+40*o(l,23*t))%m,f=(6*S+40*o(17*t,11*l))%d,a=(1&r||2&r)&&Math.abs(l-n)<1.5,s=(4&r||8&r)&&Math.abs(t-f)<1.5,h=a||s,g=.25+.35*o(3*l,5*t);h?(e.globalAlpha=.95,e.fillStyle=`rgb(${M.r},${M.g},${M.b})`):(e.globalAlpha=g,e.fillStyle=`rgb(${C.r},${C.g},${C.b})`),e.fillText(i,l*u,t*b)}e.globalAlpha=1}var s={id:"circuit",name:"Circuit",description:"Circuit traces with signals running along them.",cellSize:13,speed:1,cursor:!1,mount:t=>e(t,(t,o,e,r,i,n)=>a(t,o,e,r,{fontSize:n.fontSize,chars:n.chars,lightMode:n.lightMode,color:n.ink,pulseColor:n.accent??l(n.ink,"#ffffff",.7)}))};export{s as circuit,a as renderCircuitBackground};//# sourceMappingURL=chunk-CR7QS3B3.js.map
1
+ import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-3OD5BMF5.js";import{mixHex as l}from"./chunk-GF72XM4C.js";var r=1,i=2,n=4,f=8,c={3:"─",12:"│",9:"┌",10:"┐",5:"└",6:"┘",11:"┬",7:"┴",13:"├",14:"┤",15:"┼",[r]:"╶",[i]:"╴",[n]:"╵",[f]:"╷"};function a(e,l,r,i,n={}){const{fontSize:f=13,pulseColor:a="#ffffff",color:s="#00ff88",density:h=.38,speed:g=1,lightMode:p=!1}=n,u=.62*f,b=1.4*f,m=Math.ceil(l/u),M=Math.ceil(r/b),d=t(s)??{r:0,g:255,b:136},C=t(a)??{r:255,g:255,b:255},$=(t,e)=>{if(o(17*t+1,7*e+2)>h)return 0;let l=0;return t+1<m&&o(17*t+1,7*e+2)>.15&&(l|=1),t-1>=0&&o(17*(t-1)+1,7*e+2)>.15&&(l|=2),e+1<M&&o(17*t+1,7*(e+1)+2)>.15&&(l|=8),e-1>=0&&o(17*t+1,7*(e-1)+2)>.15&&(l|=4),l};e.clearRect(0,0,l,r),e.font=`${f}px "JetBrains Mono", monospace`,e.textBaseline="top";const S=i*g;for(let t=0;t<M;t++)for(let l=0;l<m;l++){const r=$(l,t);if(0===r)continue;const i=c[r]??"·",n=(8*S+40*o(l,23*t))%m,f=(6*S+40*o(17*t,11*l))%M,a=(1&r||2&r)&&Math.abs(l-n)<1.5,s=(4&r||8&r)&&Math.abs(t-f)<1.5,h=a||s,g=.25+.35*o(3*l,5*t);h?(e.globalAlpha=.95,e.fillStyle=`rgb(${C.r},${C.g},${C.b})`):(e.globalAlpha=g,e.fillStyle=`rgb(${d.r},${d.g},${d.b})`),e.fillText(i,l*u,t*b)}e.globalAlpha=1}var s={id:"circuit",name:"Circuit",description:"Circuit traces with signals running along them.",cellSize:13,speed:1,cursor:!1,mount:t=>e(t,(t,o,e,r,i,n)=>a(t,o,e,r,{fontSize:n.fontSize,chars:n.chars,lightMode:n.lightMode,color:n.ink,pulseColor:n.accent??l(n.ink,"#ffffff",.7)}))};export{s as circuit,a as renderCircuitBackground};//# sourceMappingURL=chunk-E3FPFANJ.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-OVCIHOOS.js";var r=e({id:"interference",name:"Interference",description:"Two fine ring grids from slowly orbiting centres; where they cross, moiré bands open and close.",cellSize:11,scene:"interference",charset:" .:-=+*#",hover:"lantern"});export{r as interference};//# sourceMappingURL=chunk-LUOIH2EM.js.map
1
+ import{scenePreset as e}from"./chunk-3VEMKDBW.js";var r=e({id:"interference",name:"Interference",description:"Two fine ring grids from slowly orbiting centres; where they cross, moiré bands open and close.",cellSize:11,scene:"interference",charset:" .:-=+*#",hover:"lantern"});export{r as interference};//# sourceMappingURL=chunk-EKYEA7Z4.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-OVCIHOOS.js";var t=e({id:"caustics",name:"Caustics",description:"Light focused by moving water: fine bright lines that fold, part and meet again.",cellSize:11,scene:"caustics",charset:" .:-=+*#",hover:"lantern",tune:()=>({blend:"off",lantern:{radius:.14,strength:.22,trail:.8,follow:9}})});export{t as caustics};//# sourceMappingURL=chunk-QKZYCROD.js.map
1
+ import{scenePreset as e}from"./chunk-3VEMKDBW.js";var t=e({id:"caustics",name:"Caustics",description:"Light focused by moving water: fine bright lines that fold, part and meet again.",cellSize:11,scene:"caustics",charset:" .:-=+*#",hover:"lantern",tune:()=>({blend:"off",lantern:{radius:.14,strength:.22,trail:.8,follow:9}})});export{t as caustics};//# sourceMappingURL=chunk-F6F2C3RH.js.map
@@ -0,0 +1 @@
1
+ import{currentFieldContext as e,prewarmGlyphAtlas as t,mountGlyphField as r,isSharedFieldCanvas as n}from"../field.js";var o={ascii:{mark:"glyph",charset:" .:-=+*#%@"},blocks:{mark:"glyph",charset:" ░▒▓█"},braille:{mark:"glyph",charset:" ⠁⠃⠇⡇⣇⣧⣷⣿"},dots:{mark:"dot"},lines:{mark:"glyph",charset:" -═╪╬"},cross:{mark:"glyph",charset:" ·+xX#"},diagonal:{mark:"glyph",charset:" /╱╳"},diamond:{mark:"glyph",charset:" ·◇◈◆"},mixed:{mark:"glyph",charset:" .:+/◇#@"},pixel:{mark:"pixel"},mosaic:{mark:"mosaic"},lego:{mark:"lego"},voxel:{mark:"voxel"},disco:{mark:"disco"},dither:{mark:"dither"},hex:{mark:"hex"},led:{mark:"led"},cmyk:{mark:"cmyk"},stipple:{mark:"stipple"},engraving:{mark:"engraving"},crosshatch:{mark:"crosshatch"},woodblock:{mark:"woodblock"},risograph:{mark:"risograph"},pointillism:{mark:"pointillism"}},a=e=>"string"==typeof e&&Object.prototype.hasOwnProperty.call(o,e),s=/\p{L}/u,i=null,l=new Set,c=new Set;function u(e){const{charset:t,style:r}=e??{};i=e?{...t?{charset:t}:{},...a(r)?{style:r}:{}}:null;for(const e of c)e.relook();for(const e of[...l])e(i)}var m=()=>i;function h(e){return l.add(e),()=>{l.delete(e)}}var d=12,f=new Set,p=null,g=null,y=0,v=-1e9,k=0,w=0,b=!1,x=!1,E=()=>{const e=g?.timeline?.currentTime;return"number"==typeof e?e:null};function C(e){d=Number.isFinite(e)&&e>=1?Math.floor(e):12,N()}var S=()=>d,M=()=>"undefined"!=typeof performance?performance.now():Date.now(),A=()=>"number"==typeof innerHeight?innerHeight:0;function P(e,t=e.getBoundingClientRect()){if(!1===e.isConnected)return 1/0;if("function"==typeof e.getClientRects&&0===e.getClientRects().length)return 1/0;const r=t.bottom<0?-t.bottom:t.top-A();return r>0?r:0}function W(){try{const e=g?.querySelectorAll?.("dialog:modal");return e?.length?e[e.length-1]:null}catch{return null}}var L=1e8;function R(e,t){if(e.eager)return void(e.wanted=!0);const r=A(),n=P(e.host,t);!r||n<=2*r?e.wanted=!0:n>3*r&&(e.wanted=!1)}function q(e){let t=!1;for(const r of e)if(r?.target)for(const e of f)e.host===r.target&&(R(e,r.boundingClientRect??void 0),t=!0);t&&N()}var B=()=>N(),F=0,I=0,T=()=>{const e="number"==typeof scrollY?scrollY:0;e!==I&&(F=e>I?1:-1),I=e};function O(e,t){if(!t||!F)return t;return e.getBoundingClientRect().top>0===F>0?t:2*t}var $=null,j=e=>{$!==e&&($?.removeEventListener?.("close",B,!0),$?.removeEventListener?.("scroll",T,!0),e?.addEventListener?.("close",B,!0),e?.addEventListener?.("scroll",T,{capture:!0,passive:!0}),$=e)},z=new WeakSet,Y=0;function D(){Y||"function"!=typeof requestIdleCallback||(Y=requestIdleCallback(X,{timeout:2e3}))}function X(e){Y=0;const t=[...f].filter(e=>!e.live&&e.prewarm&&!z.has(e)).sort((e,t)=>P(e.host)-P(t.host));for(const r of t){if(e.timeRemaining()<2&&!e.didTimeout)return void D();z.add(r);try{r.prewarm()}catch{}}}function H(e){g!==e.doc&&(g=e.doc,f.clear(),y=k=w=F=0,v=-1e9,I="number"==typeof scrollY?scrollY:0),j(g),f.add(e);const t=function(){const e="function"==typeof IntersectionObserver?IntersectionObserver:null;if(!e)return null;if(p?.ctor!==e){p?.list.forEach(e=>e.disconnect()),p={ctor:e,list:["200% 0px","300% 0px","0px"].map(t=>new e(q,{rootMargin:t}))};for(const e of f)p.list.forEach(t=>t.observe(e.host))}return p.list}();t?.forEach(t=>t.observe(e.host)),t?R(e):e.wanted=!0,N(),e.live||D()}function N(t=!1){if(b)x=!0;else{b=!0;try{do{x=!1;const r=M(),n=E();(t||(null===n?r-v>16||r<v:n!==v))&&(v=n??r,k=w=0);for(const e of f)!1===e.host.isConnected&&(e.wanted=!1);for(const e of f)e.live&&!e.wanted&&e.release();const o=[...f].filter(e=>e.live&&!e.shared),a=W(),s=e=>!!a&&!a.contains(e.host),i=e=>P(e.host)+(s(e)?L:0),l=e=>e.eager&&!s(e),c=()=>o.filter(e=>e.live&&!e.shared).map(e=>[e,i(e)+(l(e)?0:1e9)]).sort((e,t)=>t[1]-e[1]);for(let e=o.length-d,t=e>0?c():[];e>0;e--)t.shift()?.[0].release();const u=e(),m=1*A(),h=()=>[...f].filter(e=>e.live&&e.shared&&i(e)>m).sort((e,t)=>i(t)-i(e));if(u?.overBudget)for(const e of h()){if(!u.overBudget)break;e.release()}const p=[...f].filter(e=>e.wanted&&!e.live).map(e=>[e,e.eager?-1:i(e)]).map(([e,t])=>[e,t,t>0?O(e.host,t):t]).sort((e,t)=>e[2]-t[2]);let g=0;for(const[e,r]of p){if(!f.has(e)||e.live)continue;if(u&&!u.roomy){const t=h()[0];if(!t||i(t)<=i(e))break;if(t.release(),!u.roomy)break}if(!e.eager&&(k>=4||w>=2)&&(!t||g)){y||(y=requestAnimationFrame(()=>{y=0,N(!0)}));break}if(o.filter(e=>e.live&&!e.shared).length>=d){const t=c()[0]?.[0];if(!t||(l(t)?!e.eager||i(t)<=i(e):!e.eager&&i(t)<=r))break;t.release()}const n=M();e.mount(),k+=M()-n,g++,e.eager||w++,e.live&&!e.shared&&o.push(e)}}while(x)}finally{b=!1}}}var V='ui-monospace, "SF Mono", Menlo, Consolas, monospace',_=new Map;function G(e,t=V){const r=`${t}\0${e}`,n=_.get(r);if(n)return n;let o={max:1,mean:1};try{const r="undefined"==typeof document?null:Object.assign(document.createElement("canvas"),{width:48,height:48}).getContext("2d",{willReadFrequently:!0});if(r&&"function"==typeof r.getImageData){r.font=`500 36px ${t}`,r.textAlign="center",r.textBaseline="middle";const n=e=>{r.clearRect(0,0,48,48),r.fillStyle="#000",r.fillText(e,24,25);const t=r.getImageData(0,0,48,48).data;let n=0;for(let e=3;e<t.length;e+=4)n+=t[e];return n/255},a=e=>[...e].filter(e=>e.trim()).map(n),s=e=>e.reduce((e,t)=>e+t,0)/Math.max(1,e.length),i=a(e),l=a(".:-=+*#%@"),c=n("@");i.length&&c>0&&s(l)>0&&(o={max:Math.max(...i)/c,mean:s(i)/s(l)})}}catch{}return _.set(r,o),o}function J(e,t){const{max:r,mean:n}=G(e,t.font??V),o=t.glyphScale??.8,a=t.gamma??1,s=t.fontWeight??500;return r>1.15?{glyphScale:Math.max(.3,o*Math.max(.62,r**-.36)),gamma:a,fontWeight:s}:n>1.5?{glyphScale:Math.max(.3,o*n**-.25),gamma:a,fontWeight:s}:r<.85?{glyphScale:Math.min(1.6,o*Math.min(1.3,r**-.3)),gamma:a,fontWeight:r<.6?Math.max(s,700):s}:{glyphScale:o,gamma:a,fontWeight:s}}var K=new WeakMap;function Q(e,t){for(const r of K.get(e)?.keys()??[])r.getAttribute("src")!==t&&(r.src=t)}function U(e){const t=K.get(e);K.delete(e),t?.forEach(e=>e())}function Z(e,t,r,n,o){const a=document.createElement("img");a.alt="",a.decoding="async",a.setAttribute("aria-hidden","true"),a.setAttribute("style",`${r};object-fit:cover`),a.style.opacity="1",a.dataset.asciiPoster="",a.src=t;const s=e.style.getPropertyValue("position"),i="function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position;i&&e.style.setProperty("position","relative");const l=e.style.getPropertyValue("isolation"),c=/z-index:\s*-1/.test(r)&&"function"==typeof getComputedStyle&&"auto"===getComputedStyle(e).isolation;c&&e.style.setProperty("isolation","isolate"),o?.parentElement===e?e.insertBefore(a,o):e.appendChild(a);let u=!1;const m=()=>{u||(u=!0,a.remove(),K.get(n)?.delete(a),i&&(s?e.style.setProperty("position",s):e.style.removeProperty("position")),c&&(l?e.style.setProperty("isolation",l):e.style.removeProperty("isolation")))},h=K.get(n)??new Map;return h.set(a,m),K.set(n,h),{show(e){a.style.opacity=e?"1":"0"},remove:m}}function ee(e){const t=document.createElement("canvas");for(const r of e.getAttributeNames?.()??[])"width"!==r&&"height"!==r&&t.setAttribute(r,e.getAttribute(r));return t.style.cssText=e.style.cssText,Object.assign(t.dataset,e.dataset),e.replaceWith?e.replaceWith(t):e.parentElement&&(e.parentElement.insertBefore(t,e),e.remove()),t}function te(e){const{host:a,kit:l}=e;let u,m=e.canvas,h=null,d=!1,g=!1,y=!1,v=!1,k={},w={},b=e.source,x=!1,E={},C=null,S=null,M=!1,A=null,P=()=>{};const W=!e.ownPoster&&l?.current.poster?Z(a,l.current.poster,e.place,l,m):null,L=()=>{if(!i||!1===l?.current.globalLook||"glyph"!==(w.mark??"glyph")&&!e.glyphs||s.test(w.charset??""))return;const t=i.style?o[i.style]:void 0,r=t?.mark??"glyph",n="glyph"===r?i.charset||(t&&"charset"in t?t.charset:void 0):void 0;return t||n?{mark:r,charset:n}:void 0},R=()=>({...e.glyphs?Object.fromEntries(Object.keys(e.glyphs()).map(e=>[e,w[e]]).filter(([,e])=>void 0!==e)):{},mark:w.mark??"glyph",charset:w.charset??" .,:-=+*#%@",glyphScale:w.glyphScale??.8,gamma:w.gamma??1,fontWeight:w.fontWeight??500}),q=t=>{if(!t.charset)return{...R(),mark:t.mark};const r=e.glyphs&&"glyph"!==(w.mark??"glyph")?e.glyphs():{};return{...r,mark:t.mark,charset:t.charset,...J(t.charset,{...w,...r})}},B=()=>{const e=L(),t=e&&`${e.mark}\0${e.charset??""}`;return t===u?null:(u=t,e?q(e):R())},F={host:a,doc:document,eager:!1===l?.current.lazy,wanted:!1,live:!1,poster:!!W||!!e.ownPoster,mount(){if(g||h)return;d&&(m=e.canvas=ee(m)),d=!0,w={...e.options(),...k},u=void 0;const t=B();let o;try{o=r(m,{...w,...t,...void 0===b?{}:{source:b},onError:()=>{h===o&&I()}})}catch{return void I()}h=o,F.live=!0,F.shared=n(m);const a=m;if(F.shared)P=()=>{};else{let e=0;const t=()=>{h===o&&(W?.show(!0),clearTimeout(e),e=setTimeout(()=>{h===o&&m===a&&(F.release(),N())},1e3))},r=()=>{clearTimeout(e),requestAnimationFrame(()=>requestAnimationFrame(()=>{h===o&&W?.show(!1)}))};a.addEventListener?.("webglcontextlost",t),a.addEventListener?.("webglcontextrestored",r),P=()=>{clearTimeout(e),a.removeEventListener?.("webglcontextlost",t),a.removeEventListener?.("webglcontextrestored",r)}}x&&o.pause(),o.ready.then(()=>{h===o&&(M=!0,W?.show(!1),C?.(),C=S=null)},()=>{}),e.onMount?.(o,m)},release(){if(!h)return;const t=h;h=null,F.live=!1,M=!1,P(),A?.clear(),A=null,E=t.settings,t.destroy(),F.shared?g||(m.width=m.width,d=!1):((e=>{try{const t=e.getContext("webgl2");t&&!t.isContextLost?.()&&t.getExtension("WEBGL_lose_context")?.loseContext()}catch{}})(m),g||(m=e.canvas=ee(m),d=!1)),W?.show(!0),e.onRelease?.()},prewarm(){if(g||h)return;w={...e.options(),...k};const r=L();t(m,{...w,...r?q(r):{}})}};function I(){y||(y=!0,T(),v||e.onFail())}function T(){g||(g=!0,F.release(),function(e){f.delete(e)&&([...f].some(t=>t.host===e.host)||p?.list.forEach(t=>t.unobserve(e.host)),!f.size&&p&&(p.list.forEach(e=>e.disconnect()),p=null),f.size||(j(null),Y&&"function"==typeof cancelIdleCallback&&cancelIdleCallback(Y),Y=0),N())}(F),c.delete(O),m.remove(),y?W?.show(!0):W?.remove())}const O={relook(){h||(e=>{z.delete(e),f.has(e)&&D()})(F);const t=B();if(!t||!h)return;const r=h,n=M&&!(l?.current.reducedMotion??("function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches));A?.clear(),A=null,n&&(r.redraw(),A=function(e,t){if(!e.width||!e.height||"undefined"==typeof document)return null;const r=document.createElement("canvas");r.width=e.width,r.height=e.height;const n=r.getContext("2d");if(!n||"function"!=typeof r.animate)return null;try{n.drawImage(e,0,0)}catch{return null}r.setAttribute("aria-hidden","true"),r.dataset.asciiSweep="",r.setAttribute("style",t);const o=document.createElement("span");let a,s;o.setAttribute("aria-hidden","true"),o.dataset.asciiSweep="",o.setAttribute("style",`${t};right:auto;width:2px;margin-left:-1px;opacity:0;background:var(--ascii-sweep, #f3ba32);box-shadow:0 0 10px 1px color-mix(in srgb, var(--ascii-sweep, #f3ba32) 40%, transparent)`),e.after(r,o);const i=()=>{a?.cancel(),s?.cancel(),r.remove(),o.remove()};return{clear:i,reveal(){if(!r.isConnected)return;const t={duration:200,delay:40,easing:"cubic-bezier(.23,1,.32,1)",fill:"both"};a=r.animate([{clipPath:"inset(0% 0% 0% 0%)"},{clipPath:"inset(0% 0% 0% 100%)"}],t);const n=e.clientWidth||e.getBoundingClientRect().width;s=o.animate([{transform:"translateX(0px)",opacity:.35},{opacity:.35,offset:.7},{transform:`translateX(${n}px)`,opacity:0}],t),a.onfinish=i}}}(m,e.place)),r.update(t);const o=A;o&&requestAnimationFrame(()=>requestAnimationFrame(()=>{A===o&&h===r?o.reveal():o.clear()}))}};return{field:{get canvas(){return m},get ready(){return h?h.ready:S??(S=new Promise(e=>{C=e}))},get settings(){return h?.settings??E},update(e){if(k={...k,...e},w={...w,...e},!h)return;const t=B(),r=L();h.update(r?{...e,...q(r)}:t?{...e,...t}:e)},setSource:e=>(b=e,h?h.setSource(e):Promise.resolve()),pointer(e,t){h?.pointer(e,t)},redraw(){h?.redraw()},pulse(e){h?.pulse(e)},play(){x=!1,h?.play()},pause(){x=!0,h?.pause()},resize(){h?.resize()},destroy(){T()}},get canvas(){return m},get live(){return!!h},get failed(){return y},start(){c.add(O),v=!0;try{H(F)}finally{v=!1}},destroy:T}}export{o as KIT_STYLES,J as balanceCharset,U as disposeKit,S as getFieldBudget,m as getGlobalLook,G as inkWeight,te as liveField,Z as poster,C as setFieldBudget,u as setGlobalLook,Q as setPosterSource,h as subscribeGlobalLook};//# sourceMappingURL=chunk-FEAFQY7O.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-OVCIHOOS.js";var r=e({id:"aurora",name:"Aurora",description:"Curtains of light at three depths hang from the top in tall vertical rays, brightest along their hems.",cellSize:11,scene:"aurora",charset:" .:¦|",hover:"lantern",tune:()=>({blend:"off"}),middle:{x:.2,y:.42,width:.6,height:.5,feather:.3,shape:"ellipse"}});export{r as aurora};//# sourceMappingURL=chunk-A6EDU3UT.js.map
1
+ import{scenePreset as e}from"./chunk-3VEMKDBW.js";var r=e({id:"aurora",name:"Aurora",description:"Curtains of light at three depths hang from the top in tall vertical rays, brightest along their hems.",cellSize:11,scene:"aurora",charset:" .:¦|",hover:"lantern",tune:()=>({blend:"off"}),middle:{x:.2,y:.42,width:.6,height:.5,feather:.3,shape:"ellipse"}});export{r as aurora};//# sourceMappingURL=chunk-FHN3PPSI.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-OVCIHOOS.js";var r=e({id:"contour",name:"Contour",description:"Survey lines over a slowly shifting terrain, every fifth an index line.",cellSize:11,scene:"contour",charset:" .·-~=",hover:"lantern"});export{r as contour};//# sourceMappingURL=chunk-FIWIUXNV.js.map
1
+ import{scenePreset as e}from"./chunk-3VEMKDBW.js";var r=e({id:"contour",name:"Contour",description:"Survey lines over a slowly shifting terrain, every fifth an index line.",cellSize:11,scene:"contour",charset:" .·-~=",hover:"lantern"});export{r as contour};//# sourceMappingURL=chunk-FPCCX4FM.js.map
@@ -1 +1 @@
1
- import{velocity as t,stepSpring as e}from"./chunk-XDNCXCR7.js";import{clamp as r,styleKeeper as n,mountSurface as o,handle as a,prefersReduced as i}from"./chunk-PFQBEWCF.js";var l={cards:"[data-card]",loop:!0,threshold:.4,outset:56},h=(t,e,r)=>t+(e-t)*r,s=(t,e,r)=>({x:t,v:0,to:t,k:e,z:r}),c=Array.from({length:96},(t,e)=>{const r=43758.5453*Math.sin(127.1*e+311.7);return r-Math.floor(r)});function d(t,e,n=.04){if(!t.complete||!t.naturalWidth)return null;const o=Math.min(1,420/Math.max(t.naturalWidth,t.naturalHeight)),a=document.createElement("canvas");a.width=Math.max(1,Math.round(t.naturalWidth*o)),a.height=Math.max(1,Math.round(t.naturalHeight*o));const i=a.getContext("2d",{willReadFrequently:!0});if(!i)return null;try{i.drawImage(t,0,0,a.width,a.height);const o=i.getImageData(0,0,a.width,a.height),l=o.data,h=new Uint32Array(256),s=l.length/4,c=t=>.2126*l[t]+.7152*l[t+1]+.0722*l[t+2];for(let t=0;t<l.length;t+=4)h[Math.round(c(t))]++;let d=0,u=255,g=0;for(let t=0;t<256;t++)if(g+=h[t],g>=.02*s){d=t;break}g=0;for(let t=255;t>=0;t--)if(g+=h[t],g>=.02*s){u=t;break}const m=Math.max(1,u-d);for(let t=0;t<l.length;t+=4){let o=r((c(t)-d)/m);e&&(o=1-o),l[t]=l[t+1]=l[t+2]=Math.round(255*(n+(1-n)*o)),l[t+3]=255}return i.putImageData(o,0,0),a}catch{return null}}function u(u,g={}){const m={current:{...l,...g}},p=n(),f=()=>!!(m.current.reducedMotion??i()),v=()=>[...u.querySelectorAll(m.current.cards)];let x=0,M=s(0,380,.72),w=s(0,380,.8),b=s(0,260,.9),y=!1,k=0,A=0,E=null,L=[],I=0,C=0,S=-1,R=new Map,$=null,F=null;const W=t=>v()[D(t)]??null,q=()=>u.clientWidth||160,D=t=>{const e=v().length;return e?(t%e+e)%e:0},P=(t,e,r,n)=>{const o=W(t);if(!o||!m.current.loop&&t>=v().length)return null;const a="IMG"===o.tagName?o:o.querySelector("img"),i=`${a?.currentSrc||a?.src||""}|${a?.complete}|${Math.round(e)}x${Math.round(r)}|${n}`,l=R.get(o);if(l?.key===i)return l.canvas;const h=document.createElement("canvas");h.width=Math.max(1,Math.round(e)),h.height=Math.max(1,Math.round(r));const s=h.getContext("2d");if(!s)return null;const c=m.current.radius??(parseFloat(getComputedStyle(u).borderTopLeftRadius)||16);s.beginPath(),s.roundRect(0,0,h.width,h.height,Math.min(c,h.width/2,h.height/2)),s.clip();const g=a?d(a,n):null;if(g){const t=Math.max(h.width/g.width,h.height/g.height),e=h.width/t,r=h.height/t;s.drawImage(g,(g.width-e)/2,(g.height-r)/2,e,r,0,0,h.width,h.height)}else s.fillStyle="rgb(60 60 60)",s.fillRect(0,0,h.width,h.height);return s.strokeStyle="rgb(150 150 150)",s.lineWidth=6,s.stroke(),R.set(o,{key:i,canvas:h}),h};function T(){const t=v(),e=x+(E?1:0),r=!m.current.loop&&e>=t.length?null:W(e);t.forEach(t=>{F?(p.set(t,"opacity","0"),t!==r?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")):t.hidden=t!==r}),u.setAttribute("aria-label",r?`${r.getAttribute("aria-label")||r.querySelector("img")?.alt||r.textContent?.trim()||"Card"}. Left arrow to pass, right arrow to keep.`:"No more cards")}F=o({host:u,outset:m.current.outset,look:()=>({blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:4,cellAspect:.62,glyphScale:.94,contrast:1.3,...m.current.look}),ink:()=>m.current.ink??"--ascii-ink-strong",kit:m,reducedMotion:()=>m.current.reducedMotion,onFail:()=>{F=null,p.restore(),T()},onTheme:()=>{R=new Map},paint:({pen:t,w:e,now:n,dark:o,box:a})=>{const i=a(u),l=i.w,s=i.h,d=i.x+l/2,g=i.y+s/2,m=r(b.x),p=(e,r,n,a,i=0)=>{const h=P(e,l,s,!o);!h||a<=0||(t.save(),t.translate(d,g+n),t.scale(r,r),t.globalAlpha=a,t.drawImage(h,-l/2,-s/2),i>0&&(t.globalCompositeOperation="destination-out",t.globalAlpha=i,t.drawImage(((t,e)=>{let r=$;if(!r||r.width!==Math.round(t)||r.height!==Math.round(e)){r=$=document.createElement("canvas"),r.width=Math.max(1,Math.round(t)),r.height=Math.max(1,Math.round(e));const n=r.getContext("2d");if(n)for(let t=0;t<r.height;t+=6)for(let e=0;e<r.width;e+=4){const r=43758.5453*Math.sin(12.9898*e+78.233*t);r-Math.floor(r)<.55&&(n.fillStyle="#000",n.fillRect(e,t,4,6))}}return r})(l,s),-l/2,-s/2)),t.restore())};p(x+2,h(.86,.93,m),h(24,12,m),h(.3,.55,m),.3),p(x+1,h(.93,1,m),h(12,0,m),h(.55,1,m),.4*(1-m));const f=P(x,l,s,!o);if(!f)return!1;const v=E?r((n-E.start)/620):0,y=E?.dir??1,k=E?E.x0+y*l*.9*(1-(1-v)**3):M.x,A=E?E.y0:w.x;if(t.save(),t.translate(d+k,g+A),t.rotate(.22*r(k/l,-1.6,1.6)),!E)return t.drawImage(f,-l/2,-s/2),t.restore(),!1;const L=Math.ceil(s/6);for(let n=0;n<L;n++){const o=c[n%c.length],a=r(1.55*v-.55*o);if(a>=1)continue;const i=y*a*a*l*(.5+.9*o),h=6*n,u=Math.min(6,s-h),g=y>0?d+k+i+.62*l:d+k+i-.62*l,m=y>0?e-4-g:g-4;t.globalAlpha=(1-a*a)*r(m/56),t.drawImage(f,0,h,l,u,-l/2+i,-s/2+h,l,u)}return t.restore(),!1}});const X=t=>{I=0;const n=Math.min(1/30,Math.max(0,(t-C)/1e3));C=t;let o=!1;y||E||(o=e(M,n,.3),o=e(w,n,.3)||o),o=e(b,n,.002)||o,E&&t-E.start>=620&&(E=null,x+=1,j()),(()=>{(m.current.leanTarget??u).style.setProperty("--ascii-lean",String(E?0:r(M.x/(.4*q()),-1,1)));const t=W(x);!F&&t&&p.set(t,"transform",`translate(${M.x}px, ${w.x}px) rotate(${.22*r(M.x/q(),-1.6,1.6)}rad)`)})(),F?.kick(),(o||y||E)&&(I=requestAnimationFrame(X))},N=()=>{I||(C=performance.now(),I=requestAnimationFrame(X))},j=()=>{M=s(0,380,.72),w=s(0,380,.8),b=s(0,260,.9)},z=(t=1)=>{const e=v();if(E||!e.length||!m.current.loop&&x>=e.length)return!1;const r=W(x),n=D(x);return y=!1,f()||!F?(x+=1,j(),F||p.set(r,"transform","")):(E={dir:t,start:performance.now(),x0:M.x,y0:w.x},b.to=1),T(),N(),m.current.onSwipe?.(t,n,r),!0},B=e=>{if(!y||void 0!==e&&void 0!==e.pointerId&&e.pointerId!==S)return;y=!1;const n=t(L,performance.now()),o=q();Math.abs(M.x)>o*m.current.threshold||Math.abs(n)>650&&Math.sign(n)===Math.sign(M.x)&&Math.abs(M.x)>16?z(M.x<0?-1:1):(M.to=0,w.to=0,b.to=0,M.v=.2*r(n,-1600,1600),f()&&(M.x=w.x=b.x=0,M.v=w.v=b.v=0),N())},G=()=>u.getBoundingClientRect().width/(u.clientWidth||1)||1,H=t=>{if(0!==t.button||E)return;try{u.setPointerCapture?.(t.pointerId)}catch{}S=t.pointerId;const e=G();y=!0,k=t.clientX-M.x*e,A=t.clientY-w.x/.3*e,L=[],N()},Y=t=>{if(!y||t.pointerId!==S)return;const e=G();M.x=M.to=(t.clientX-k)/e,w.x=w.to=(t.clientY-A)/e*.3,M.v=w.v=0,b.to=.5*r(Math.abs(M.x)/q()),L.push([M.x,performance.now()]),L.length>8&&L.shift(),N()},O=t=>{"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(t.preventDefault(),z("ArrowRight"===t.key?1:-1))},Q=()=>F?.kick(),U=t=>t.preventDefault();return u.hasAttribute("tabindex")||(u.tabIndex=0),u.setAttribute("role",u.getAttribute("role")??"group"),u.setAttribute("aria-roledescription","card"),p.set(u,"touch-action","none"),T(),u.addEventListener("pointerdown",H),u.addEventListener("pointermove",Y),u.addEventListener("pointerup",B),u.addEventListener("pointercancel",B),u.addEventListener("lostpointercapture",B),u.addEventListener("keydown",O),u.addEventListener("load",Q,!0),u.addEventListener("dragstart",U),a(()=>F,m,()=>{R=new Map,T(),F?.refresh()},{next:z,get index(){return D(x+(E?1:0))}},()=>{I&&cancelAnimationFrame(I),I=0,p.restore(),v().forEach(t=>{t.hidden=!1,t.removeAttribute("aria-hidden")}),(m.current.leanTarget??u).style.removeProperty("--ascii-lean"),u.removeAttribute("aria-roledescription"),u.removeEventListener("pointerdown",H),u.removeEventListener("pointermove",Y),u.removeEventListener("pointerup",B),u.removeEventListener("pointercancel",B),u.removeEventListener("lostpointercapture",B),u.removeEventListener("keydown",O),u.removeEventListener("load",Q,!0),u.removeEventListener("dragstart",U)})}var g=l;export{g as SWIPE_DECK_DEFAULTS,u as swipeDeck,d as toneImage};//# sourceMappingURL=chunk-EHYFSX5K.js.map
1
+ import{velocity as t,stepSpring as e}from"./chunk-K6JX64AS.js";import{clamp as r,styleKeeper as n,mountSurface as o,handle as a,prefersReduced as i}from"./chunk-GF72XM4C.js";var l={cards:"[data-card]",loop:!0,threshold:.4,outset:56},h=(t,e,r)=>t+(e-t)*r,s=(t,e,r)=>({x:t,v:0,to:t,k:e,z:r}),c=Array.from({length:96},(t,e)=>{const r=43758.5453*Math.sin(127.1*e+311.7);return r-Math.floor(r)});function d(t,e,n=.04){if(!t.complete||!t.naturalWidth)return null;const o=Math.min(1,420/Math.max(t.naturalWidth,t.naturalHeight)),a=document.createElement("canvas");a.width=Math.max(1,Math.round(t.naturalWidth*o)),a.height=Math.max(1,Math.round(t.naturalHeight*o));const i=a.getContext("2d",{willReadFrequently:!0});if(!i)return null;try{i.drawImage(t,0,0,a.width,a.height);const o=i.getImageData(0,0,a.width,a.height),l=o.data,h=new Uint32Array(256),s=l.length/4,c=t=>.2126*l[t]+.7152*l[t+1]+.0722*l[t+2];for(let t=0;t<l.length;t+=4)h[Math.round(c(t))]++;let d=0,u=255,g=0;for(let t=0;t<256;t++)if(g+=h[t],g>=.02*s){d=t;break}g=0;for(let t=255;t>=0;t--)if(g+=h[t],g>=.02*s){u=t;break}const m=Math.max(1,u-d);for(let t=0;t<l.length;t+=4){let o=r((c(t)-d)/m);e&&(o=1-o),l[t]=l[t+1]=l[t+2]=Math.round(255*(n+(1-n)*o)),l[t+3]=255}return i.putImageData(o,0,0),a}catch{return null}}function u(u,g={}){const m={current:{...l,...g}},p=n(),f=()=>!!(m.current.reducedMotion??i()),v=()=>[...u.querySelectorAll(m.current.cards)];let x=0,M=s(0,380,.72),w=s(0,380,.8),b=s(0,260,.9),y=!1,k=0,A=0,E=null,L=[],I=0,S=0,C=-1,$=new Map,R=null,F=null;const W=t=>v()[D(t)]??null,q=()=>u.clientWidth||160,D=t=>{const e=v().length;return e?(t%e+e)%e:0},P=(t,e,r,n)=>{const o=W(t);if(!o||!m.current.loop&&t>=v().length)return null;const a="IMG"===o.tagName?o:o.querySelector("img"),i=`${a?.currentSrc||a?.src||""}|${a?.complete}|${Math.round(e)}x${Math.round(r)}|${n}`,l=$.get(o);if(l?.key===i)return l.canvas;const h=document.createElement("canvas");h.width=Math.max(1,Math.round(e)),h.height=Math.max(1,Math.round(r));const s=h.getContext("2d");if(!s)return null;const c=m.current.radius??(parseFloat(getComputedStyle(u).borderTopLeftRadius)||16);s.beginPath(),s.roundRect(0,0,h.width,h.height,Math.min(c,h.width/2,h.height/2)),s.clip();const g=a?d(a,n):null;if(g){const t=Math.max(h.width/g.width,h.height/g.height),e=h.width/t,r=h.height/t;s.drawImage(g,(g.width-e)/2,(g.height-r)/2,e,r,0,0,h.width,h.height)}else s.fillStyle="rgb(60 60 60)",s.fillRect(0,0,h.width,h.height);return s.strokeStyle="rgb(150 150 150)",s.lineWidth=6,s.stroke(),$.set(o,{key:i,canvas:h}),h};function T(){const t=v(),e=x+(E?1:0),r=!m.current.loop&&e>=t.length?null:W(e);t.forEach(t=>{F?(p.set(t,"opacity","0"),t!==r?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")):t.hidden=t!==r}),u.setAttribute("aria-label",r?`${r.getAttribute("aria-label")||r.querySelector("img")?.alt||r.textContent?.trim()||"Card"}. Left arrow to pass, right arrow to keep.`:"No more cards")}F=o({host:u,outset:m.current.outset,look:()=>({blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:4,cellAspect:.62,glyphScale:.94,contrast:1.3,...m.current.look}),ink:()=>m.current.ink??"--ascii-ink-strong",kit:m,reducedMotion:()=>m.current.reducedMotion,onFail:()=>{F=null,p.restore(),T()},onTheme:()=>{$=new Map},paint:({pen:t,w:e,now:n,dark:o,box:a})=>{const i=a(u),l=i.w,s=i.h,d=i.x+l/2,g=i.y+s/2,m=r(b.x),p=(e,r,n,a,i=0)=>{const h=P(e,l,s,!o);!h||a<=0||(t.save(),t.translate(d,g+n),t.scale(r,r),t.globalAlpha=a,t.drawImage(h,-l/2,-s/2),i>0&&(t.globalCompositeOperation="destination-out",t.globalAlpha=i,t.drawImage(((t,e)=>{let r=R;if(!r||r.width!==Math.round(t)||r.height!==Math.round(e)){r=R=document.createElement("canvas"),r.width=Math.max(1,Math.round(t)),r.height=Math.max(1,Math.round(e));const n=r.getContext("2d");if(n)for(let t=0;t<r.height;t+=6)for(let e=0;e<r.width;e+=4){const r=43758.5453*Math.sin(12.9898*e+78.233*t);r-Math.floor(r)<.55&&(n.fillStyle="#000",n.fillRect(e,t,4,6))}}return r})(l,s),-l/2,-s/2)),t.restore())};p(x+2,h(.86,.93,m),h(24,12,m),h(.3,.55,m),.3),p(x+1,h(.93,1,m),h(12,0,m),h(.55,1,m),.4*(1-m));const f=P(x,l,s,!o);if(!f)return!1;const v=E?r((n-E.start)/620):0,y=E?.dir??1,k=E?E.x0+y*l*.9*(1-(1-v)**3):M.x,A=E?E.y0:w.x;if(t.save(),t.translate(d+k,g+A),t.rotate(.22*r(k/l,-1.6,1.6)),!E)return t.drawImage(f,-l/2,-s/2),t.restore(),!1;const L=Math.ceil(s/6);for(let n=0;n<L;n++){const o=c[n%c.length],a=r(1.55*v-.55*o);if(a>=1)continue;const i=y*a*a*l*(.5+.9*o),h=6*n,u=Math.min(6,s-h),g=y>0?d+k+i+.62*l:d+k+i-.62*l,m=y>0?e-4-g:g-4;t.globalAlpha=(1-a*a)*r(m/56),t.drawImage(f,0,h,l,u,-l/2+i,-s/2+h,l,u)}return t.restore(),!1}});const X=t=>{I=0;const n=Math.min(1/30,Math.max(0,(t-S)/1e3));S=t;let o=!1;y||E||(o=e(M,n,.3),o=e(w,n,.3)||o),o=e(b,n,.002)||o,E&&t-E.start>=620&&(E=null,x+=1,j()),(()=>{(m.current.leanTarget??u).style.setProperty("--ascii-lean",String(E?0:r(M.x/(.4*q()),-1,1)));const t=W(x);!F&&t&&p.set(t,"transform",`translate(${M.x}px, ${w.x}px) rotate(${.22*r(M.x/q(),-1.6,1.6)}rad)`)})(),F?.kick(),(o||y||E)&&(I=requestAnimationFrame(X))},G=()=>{I||(S=performance.now(),I=requestAnimationFrame(X))},j=()=>{M=s(0,380,.72),w=s(0,380,.8),b=s(0,260,.9)},z=(t=1)=>{const e=v();if(E||!e.length||!m.current.loop&&x>=e.length)return!1;const r=W(x),n=D(x);return y=!1,f()||!F?(x+=1,j(),F||p.set(r,"transform","")):(E={dir:t,start:performance.now(),x0:M.x,y0:w.x},b.to=1),T(),G(),m.current.onSwipe?.(t,n,r),!0},H=e=>{if(!y||void 0!==e&&void 0!==e.pointerId&&e.pointerId!==C)return;y=!1;const n=t(L,performance.now()),o=q();Math.abs(M.x)>o*m.current.threshold||Math.abs(n)>650&&Math.sign(n)===Math.sign(M.x)&&Math.abs(M.x)>16?z(M.x<0?-1:1):(M.to=0,w.to=0,b.to=0,M.v=.2*r(n,-1600,1600),f()&&(M.x=w.x=b.x=0,M.v=w.v=b.v=0),G())},N=()=>u.getBoundingClientRect().width/(u.clientWidth||1)||1,Y=t=>{if(0!==t.button||E)return;try{u.setPointerCapture?.(t.pointerId)}catch{}C=t.pointerId;const e=N();y=!0,k=t.clientX-M.x*e,A=t.clientY-w.x/.3*e,L=[],G()},B=t=>{if(!y||t.pointerId!==C)return;const e=N();M.x=M.to=(t.clientX-k)/e,w.x=w.to=(t.clientY-A)/e*.3,M.v=w.v=0,b.to=.5*r(Math.abs(M.x)/q()),L.push([M.x,performance.now()]),L.length>8&&L.shift(),G()},J=t=>{"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(t.preventDefault(),z("ArrowRight"===t.key?1:-1))},K=()=>F?.kick(),O=t=>t.preventDefault();return u.hasAttribute("tabindex")||(u.tabIndex=0),u.setAttribute("role",u.getAttribute("role")??"group"),u.setAttribute("aria-roledescription","card"),p.set(u,"touch-action","none"),T(),u.addEventListener("pointerdown",Y),u.addEventListener("pointermove",B),u.addEventListener("pointerup",H),u.addEventListener("pointercancel",H),u.addEventListener("lostpointercapture",H),u.addEventListener("keydown",J),u.addEventListener("load",K,!0),u.addEventListener("dragstart",O),a(()=>F,m,()=>{$=new Map,T(),F?.refresh()},{next:z,get index(){return D(x+(E?1:0))}},()=>{I&&cancelAnimationFrame(I),I=0,p.restore(),v().forEach(t=>{t.hidden=!1,t.removeAttribute("aria-hidden")}),(m.current.leanTarget??u).style.removeProperty("--ascii-lean"),u.removeAttribute("aria-roledescription"),u.removeEventListener("pointerdown",Y),u.removeEventListener("pointermove",B),u.removeEventListener("pointerup",H),u.removeEventListener("pointercancel",H),u.removeEventListener("lostpointercapture",H),u.removeEventListener("keydown",J),u.removeEventListener("load",K,!0),u.removeEventListener("dragstart",O)})}var g=l;export{g as SWIPE_DECK_DEFAULTS,u as swipeDeck,d as toneImage};//# sourceMappingURL=chunk-FWODCYYJ.js.map
@@ -1 +1 @@
1
- import{scenePreset as r,FIELD_GRAPHITE as e,narrow as t}from"./chunk-OVCIHOOS.js";var a=r({id:"drift",name:"Drift",description:"Characters that drift slowly in broad lobes and stay clear around your content.",cellSize:11,scene:"drift",charset:" .:-=+*#",hover:"trail",graphite:e,middle:!1,feather:.2,tune:r=>({scale:t()?"dot"===r.mark?1.8:1.6:1,brightness:"dot"===r.mark?0:.05,blend:"auto",lantern:{radius:.16,strength:.35,trail:.6,follow:9},trail:{strength:.9,radius:"dot"===r.mark?.4:.32},...r.clear?{clear:{element:r.clear,padding:32,feather:.2,shape:"rect"}}:{}})});export{a as drift};//# sourceMappingURL=chunk-PZAQLUAS.js.map
1
+ import{scenePreset as r,FIELD_GRAPHITE as e,narrow as t}from"./chunk-3VEMKDBW.js";var a=r({id:"drift",name:"Drift",description:"Characters that drift slowly in broad lobes and stay clear around your content.",cellSize:11,scene:"drift",charset:" .:-=+*#",hover:"trail",graphite:e,middle:!1,feather:.2,tune:r=>({scale:t()?"dot"===r.mark?1.8:1.6:1,brightness:"dot"===r.mark?0:.05,blend:"auto",lantern:{radius:.16,strength:.35,trail:.6,follow:9},trail:{strength:.9,radius:"dot"===r.mark?.4:.32},...r.clear?{clear:{element:r.clear,padding:32,feather:.2,shape:"rect"}}:{}})});export{a as drift};//# sourceMappingURL=chunk-GBNV3GXG.js.map
@@ -0,0 +1 @@
1
+ import{poster as e,liveField as t,disposeKit as n,setPosterSource as o}from"./chunk-FEAFQY7O.js";import{isGlyphFieldSupported as r,watchPointer as i,requestFieldFrame as a,watchVisibility as s,watchTheme as c,watchMotionPreference as l,cancelFieldFrame as u,ambientFactor as d}from"../field.js";var p,f,h=(e,t=0,n=1)=>Math.min(n,Math.max(t,e)),m=(e,t)=>{const n=43758.5453*Math.sin(127.1*e+311.7*t);return n-Math.floor(n)},g=(e,t=3)=>1-(1-h(e))**t,y=(e,t,n)=>{const o=h((n-e)/(t-e));return o*o*(3-2*o)},v=e=>{if(e<=0)return 0;if(e>=1)return 1;const t=(e,t,n)=>3*t*e*(1-e)**2+3*n*e*e*(1-e)+e**3;let n=0,o=1,r=e;for(let i=0;i<22;i++)r=(n+o)/2,t(r,.16,.3)<e?n=r:o=r;return t(r,1,1)},b=()=>"function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches,x=e=>e??b(),w={scene:"none",background:"transparent",color:"ink",levels:"none",fit:"cover",focus:{x:.5,y:.5},vignette:0,drift:0,hover:"none",shade:0,contrast:1,brightness:0,gamma:1,maxPixelRatio:2,clear:!1};function M(e,t,n){let o=(e??"").trim();const r=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/.exec(o);if(r?o=k(t,r[1])||(r[2]??"").trim():o.startsWith("--")&&(o=k(t,o)),!o)return n?M(n,t):null;if(/^#[\da-f]{6}$/i.test(o))return o.toLowerCase();if(/^#[\da-f]{3}$/i.test(o))return`#${[...o.slice(1)].map(e=>e+e).join("")}`.toLowerCase();const i=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(o);if(i)return C([+i[1],+i[2],+i[3]]);if(void 0===f)try{f="undefined"==typeof document?null:Object.assign(document.createElement("canvas"),{width:1,height:1}).getContext("2d",{willReadFrequently:!0})}catch{f=null}if(!f)return n?M(n,t):null;f.clearRect(0,0,1,1),f.fillStyle="#000",f.fillStyle=o,f.fillRect(0,0,1,1);const[a,s,c]=f.getImageData(0,0,1,1).data;return C([a,s,c])}var k=(e,t)=>"function"==typeof getComputedStyle?getComputedStyle(e).getPropertyValue(t).trim():"",C=e=>`#${e.map(e=>Math.round(h(e,0,255)).toString(16).padStart(2,"0")).join("")}`,R=e=>{const t=parseInt(e.slice(1,7),16);return[t>>16&255,t>>8&255,255&t]},S=(e,t,n)=>{const o=R(e),r=R(t);return C(o.map((e,t)=>e+(r[t]-e)*n))};function $(e){const t="function"==typeof getComputedStyle?getComputedStyle(e):null,n=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?/i.exec(t?.backgroundColor??"");if(n){if((void 0===n[4]?1:n[4].endsWith("%")?parseFloat(n[4])/100:parseFloat(n[4]))>=.5)return.2126*+n[1]+.7152*+n[2]+.0722*+n[3]<128}const o=M(t?.color??"",e);if(!o)return"function"==typeof matchMedia&&matchMedia("(prefers-color-scheme: dark)").matches;const[r,i,a]=R(o);return.2126*r+.7152*i+.0722*a>140}function O(){const e=[];return{set(t,n,o){e.some(([e,o])=>e===t&&o===n)||e.push([t,n,t.style.getPropertyValue(n)]),t.style.setProperty(n,o)},restore(){for(const[t,n,o]of e.reverse())o?t.style.setProperty(n,o):t.style.removeProperty(n);e.length=0}}}function j(e="",t=!1){const n=document.createElement("span");return n.setAttribute("style","position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0"),t&&n.setAttribute("aria-live","polite"),n.textContent=e,n}function E(e,t){const n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=n.width/(e.offsetWidth||n.width||1)||1;return{x:(o.left-n.left)/r,y:(o.top-n.top)/r,w:o.width/r,h:o.height/r}}function F(e,t){const n={...e,...t},o=e.look,r=t.look;return r&&(n.look=Object.fromEntries(Object.entries({...o,...r}).filter(([,e])=>void 0!==e))),n}var P=new WeakMap,W=e=>P.get(e)?.()??null;function A(n){const{host:o,layer:f="over",outset:h=0,kit:m}=n;if("undefined"==typeof document)return null;const g=`position:absolute;left:${-h}px;top:${-h}px;width:calc(100% + ${2*h}px);height:calc(100% + ${2*h}px);pointer-events:none;z-index:${"under"===f?-1:"auto"}`;if(!r())return m?.current.poster&&e(o,m.current.poster,g,m),null;const y=O(),v=document.createElement("canvas"),x=document.createElement("canvas"),k=x.getContext("2d");if(!k)return null;"static"===getComputedStyle(o).position&&y.set(o,"position","relative"),"under"===f&&y.set(o,"isolation","isolate"),v.setAttribute("aria-hidden","true"),v.dataset.asciiKit="";const C=v.style;C.position="absolute",C.left=C.top=-h+"px",C.width=C.height=`calc(100% + ${2*h}px)`,C.pointerEvents="none",C.zIndex="under"===f?"-1":"",o.appendChild(v);const R=()=>{const e=getComputedStyle(o);H.canvas.style.borderRadius=[e.borderTopLeftRadius,e.borderTopRightRadius,e.borderBottomRightRadius,e.borderBottomLeftRadius].map(e=>h&&/^[\d.]+px$/.test(e)?`${parseFloat(e)+h}px`:e).join(" ")};let S=$(o);const j=()=>M(n.ink(S),o)??M(getComputedStyle(o).color,o)??(S?"#d8d6cf":"#1d1d1b");let F=!1,W=!1,A=!0,I=!1,z=-1/0,T=-1/0;const B=i({target:o,move:e=>{T=e.timeStamp},leave(){}}),H=t({host:o,canvas:v,kit:m,place:g,options:()=>({...w,...n.look(),ink:j(),interactionTarget:o,label:""}),onMount:(e,t)=>{P.set(t,K),t.removeAttribute("role"),t.removeAttribute("aria-label"),e.ready.then(Y,()=>{}),Y()},onRelease:()=>{F&&u(Q),F=!1},onFail:()=>{ee(),n.onFail?.()}}),L=H.field;R();const D=()=>!!(n.reducedMotion()??b()),V=e=>E(H.canvas,e),q=e=>{const t=H.canvas,r=Math.max(1,t.clientWidth||o.clientWidth+2*h),i=Math.max(1,t.clientHeight||o.clientHeight+2*h),a=n.resolution??1,[s,c]="function"==typeof a?a(r,i):[Math.max(1,Math.round(r*a)),Math.max(1,Math.round(i*a))];x.width===s&&x.height===c||(x.width=s,x.height=c),k.setTransform(1,0,0,1,0,0),k.globalAlpha=1,k.globalCompositeOperation="source-over",k.filter="none",k.fillStyle="#000",k.fillRect(0,0,s,c);let l=!1;try{l=n.paint({pen:k,width:s,height:c,w:r,h:i,scale:s/r,now:e,still:D(),dark:S,box:V})}catch(e){"undefined"!=typeof console&&console.error(e)}return L.setSource(x),I||L.redraw(),l};function K(){const e=H.canvas,t=Math.max(1,e.clientWidth||o.clientWidth+2*h),r=Math.max(1,e.clientHeight||o.clientHeight+2*h),i=n.resolution??1,[a,s]="function"==typeof i?i(t,r):[Math.max(1,Math.round(t*i)),Math.max(1,Math.round(r*i))],c=document.createElement("canvas");c.width=a,c.height=s;const l=c.getContext("2d");if(!l)return null;l.fillStyle="#000",l.fillRect(0,0,a,s);try{n.paint({pen:l,width:a,height:s,w:t,h:r,scale:a/t,now:performance.now(),still:!0,dark:S,box:V})}catch{return null}return c}function Q(e){if(F=!1,I||W||!H.live)return;if(e-z<(p??(p=(()=>{const e="undefined"==typeof navigator?void 0:navigator;return 1e3/(e&&(e.hardwareConcurrency>0&&e.hardwareConcurrency<=2||e.deviceMemory&&e.deviceMemory<=2||e.connection?.saveData)?30:60)-2})()))*d()&&e-T>1e3)return F=!0,void a(Q);z=e;!q(e)||D()||!A||"undefined"!=typeof document&&document.hidden||(F=!0,a(Q))}function Y(){F||I||W||!H.live||(F=!0,a(Q))}P.set(v,K);const G="function"==typeof ResizeObserver?new ResizeObserver(()=>{R(),L.resize(),!H.live||I||W||q(performance.now()),Y()}):null;G?.observe(o);const J="function"==typeof IntersectionObserver?new IntersectionObserver(([e])=>{A=e.isIntersecting,A&&Y()},{rootMargin:"64px"}):null;J?.observe(o);const N=s(()=>{document.hidden||Y()});let U=!1;const X=()=>{U=!1,I||(S=$(o),L.update({ink:j()}),n.onTheme?.(),Y())},Z=c(()=>{U||I||(U=!0,a(X))}),_=l(Y);function ee(){I||(I=!0,F&&u(Q),U&&u(X),F=U=!1,G?.disconnect(),J?.disconnect(),N(),B(),Z(),_(),H.destroy(),y.restore(),x.width=x.height=1)}return H.start(),H.failed?(ee(),null):{field:L,get canvas(){return H.canvas},get live(){return H.live},kick:Y,refresh(){I||(S=$(o),L.update({...w,...n.look(),ink:j()}),Y())},still:D,dark:()=>S,box:V,play(){W&&(W=!1,L.play(),Y())},pause(){W=!0,F&&u(Q),F=!1,L.pause()},destroy:ee}}function I(e,t,r,i,a=()=>{}){let s=!1;const c={get supported(){return!!e()&&!s},get field(){return s?null:e()?.field??null},update(e){if(s)return;t.current=F(t.current,e);const n=e.poster;n&&o(t,n),r(t.current)},play(){s||e()?.play()},pause(){s||e()?.pause()},destroy(){s||(s=!0,e()?.destroy(),n(t),a())}};return Object.defineProperties(i,Object.getOwnPropertyDescriptors(c))}export{w as BASE_LOOK,E as boxIn,h as clamp,g as easeOut,I as handle,m as hash,R as hexRgb,v as house,$ as isDark,F as mergeOptions,S as mixHex,A as mountSurface,b as prefersReduced,x as reducedFrom,M as resolveColor,W as settledSource,y as smoothstep,j as srOnly,O as styleKeeper,C as toHex};//# sourceMappingURL=chunk-GF72XM4C.js.map
@@ -1 +1 @@
1
- import{parseColor as t,hash2 as e}from"./chunk-ZCHGV2CV.js";import{mountCanvas as o}from"./chunk-KTYCGGRO.js";function r(o,r,c,n,l={}){const{fontSize:i=14,chars:s=" ·∙•:-=+*#",color:a,accentColor:h,speed:f=.5,harmonics:m=3,lightMode:p=!1}=l,g=h??(p?"#6b8700":"#d4ff00"),M=.62*i,d=1.4*i,$=Math.ceil(r/M),u=Math.ceil(c/d);o.clearRect(0,0,r,c),o.font=`${i}px monospace`,o.textBaseline="top";let b=255,C=255,S=255;if(p&&(b=55,C=55,S=55),a){const e=t(a);e&&(b=e.r,C=e.g,S=e.b)}let x=212,z=255,k=0;const y=t(g);y&&(x=y.r,z=y.g,k=y.b);const G=n*f,j=Array.from({length:m},(t,e)=>1/(e+1)).reduce((t,e)=>t+e,0);for(let t=0;t<u;t++)for(let r=0;r<$;r++){let c=0;for(let o=0;o<m;o++){const n=.18+1.4*e(r*(o+3)+7,t*(o+5)+11),l=e(r*(o+7),t*(o+9)+3)*Math.PI*2,i=1/(o+1);c+=Math.sin(G*n+l)*i}const n=.5*(c/j+1);if(n<.28)continue;const l=(n-.28)/.72,i=s[Math.min(s.length-1,Math.floor(l*s.length))],a=n>.88,h=p?.82*l:.13*l;o.fillStyle=a?`rgba(${x},${z},${k},${p?.92:.28})`:`rgba(${b},${C},${S},${h})`,o.fillText(i,r*M,t*d)}}var c={id:"morph",name:"Morph",description:"Every cell shimmers at its own frequencies.",cellSize:14,speed:1,cursor:!1,mount:t=>o(t,(t,e,o,c,n,l)=>r(t,e,o,c,{fontSize:l.fontSize,chars:l.chars,lightMode:l.lightMode,color:l.ink,accentColor:l.accent}))};export{c as morph,r as renderMorphBackground};//# sourceMappingURL=chunk-MRDEO5HZ.js.map
1
+ import{parseColor as t,hash2 as e}from"./chunk-ZCHGV2CV.js";import{mountCanvas as o}from"./chunk-3OD5BMF5.js";function r(o,r,c,n,l={}){const{fontSize:i=14,chars:s=" ·∙•:-=+*#",color:a,accentColor:h,speed:f=.5,harmonics:m=3,lightMode:p=!1}=l,M=h??(p?"#6b8700":"#d4ff00"),g=.62*i,d=1.4*i,$=Math.ceil(r/g),u=Math.ceil(c/d);o.clearRect(0,0,r,c),o.font=`${i}px monospace`,o.textBaseline="top";let b=255,S=255,x=255;if(p&&(b=55,S=55,x=55),a){const e=t(a);e&&(b=e.r,S=e.g,x=e.b)}let z=212,C=255,k=0;const y=t(M);y&&(z=y.r,C=y.g,k=y.b);const j=n*f,v=Array.from({length:m},(t,e)=>1/(e+1)).reduce((t,e)=>t+e,0);for(let t=0;t<u;t++)for(let r=0;r<$;r++){let c=0;for(let o=0;o<m;o++){const n=.18+1.4*e(r*(o+3)+7,t*(o+5)+11),l=e(r*(o+7),t*(o+9)+3)*Math.PI*2,i=1/(o+1);c+=Math.sin(j*n+l)*i}const n=.5*(c/v+1);if(n<.28)continue;const l=(n-.28)/.72,i=s[Math.min(s.length-1,Math.floor(l*s.length))],a=n>.88,h=p?.82*l:.13*l;o.fillStyle=a?`rgba(${z},${C},${k},${p?.92:.28})`:`rgba(${b},${S},${x},${h})`,o.fillText(i,r*g,t*d)}}var c={id:"morph",name:"Morph",description:"Every cell shimmers at its own frequencies.",cellSize:14,speed:1,cursor:!1,mount:t=>o(t,(t,e,o,c,n,l)=>r(t,e,o,c,{fontSize:l.fontSize,chars:l.chars,lightMode:l.lightMode,color:l.ink,accentColor:l.accent}))};export{c as morph,r as renderMorphBackground};//# sourceMappingURL=chunk-GKR3ROYR.js.map
@@ -1 +1 @@
1
- import{styleKeeper as t,mountSurface as e,easeOut as o,handle as n}from"./chunk-PFQBEWCF.js";var a={blocks:"[data-block]",shimmer:1400,resolve:420,stagger:60,develop:640},r=t=>`rgb(${255*t} ${255*t} ${255*t})`,l=(t,e,n)=>t<0?0:o((t-e)/n,3),i=t=>parseFloat(t)||0;function s(t,e,o=1){const n=getComputedStyle(t),a=t.getBoundingClientRect(),r=n.borderTopLeftRadius,l=r.endsWith("%")?i(r)/100*Math.min(a.width,a.height):i(r);if("text"!==e)return{radius:l/o,lines:[]};const s=i(n.fontSize)||14,c="normal"===n.lineHeight?1.2*s:i(n.lineHeight),u=Math.min(c,.62*s),h=new Map,m="undefined"!=typeof document&&"function"==typeof document.createRange?document.createRange():null;m?.selectNodeContents(t);for(const t of m?[...m.getClientRects()]:[]){if(!t.width)continue;const e=Math.round((t.top+t.bottom)/2/Math.max(1,c/2)),o=h.get(e);h.set(e,o?{left:Math.min(o.left,t.left),right:Math.max(o.right,t.right),top:Math.min(o.top,t.top),bottom:Math.max(o.bottom,t.bottom)}:{left:t.left,right:t.right,top:t.top,bottom:t.bottom})}const d=[...h.values()].map(t=>{const e=Math.max(t.left,a.left),n=Math.min(t.right,a.right),r=(t.top+t.bottom)/2;return{x:(e-a.left)/o,y:(r-u/2-a.top)/o,w:Math.max(0,n-e)/o,h:u/o}}).filter(t=>t.w>0);return d.length||d.push({x:0,y:(a.height-u)/2/o,w:a.width/o,h:u/o}),{radius:(l||u/2)/o,lines:d}}function c(t){const e=t.dataset.block;return"text"===e||"photo"===e||"avatar"===e?e:"IMG"===t.tagName||"PICTURE"===t.tagName||"VIDEO"===t.tagName?/^50%|^9999px/.test(getComputedStyle(t).borderTopLeftRadius)?"avatar":"photo":"text"}function u(i,u={}){const h={current:{...a,...u}},m=t();let d=0,f=null,g=null,p=null,b=null;const M=()=>[...i.querySelectorAll(h.current.blocks)].map((t,e)=>({el:t,kind:c(t),delay:void 0!==t.dataset.delay?Number(t.dataset.delay):80+e*h.current.stagger})),y=["mask-image","-webkit-mask-image"],k=()=>{m.restore(),i.removeAttribute("aria-busy"),g?.(),g=null};b=e({host:i,look:()=>({mark:"glyph",charset:" .:-=+*#%@",cellSize:5,cellAspect:.62,glyphScale:.92,font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,contrast:1.15,shade:.35,...h.current.look}),ink:()=>h.current.ink??"--ascii-ink-strong",kit:h,reducedMotion:()=>h.current.reducedMotion,onFail:()=>{b=null,k()},paint:({pen:t,now:e,still:n,box:a,w:i})=>{if(null!==f&&n)return k(),!1;const c=h.current,u=null===f?-1:e-f;if(null!==f&&u>Math.max(h.current.develop,...M().map(t=>t.delay+h.current.resolve))+16)return k(),!1;null!==f&&(t=>{for(const{el:e,kind:o,delay:n}of M()){const a=l(t,n,h.current.resolve);if(m.set(e,"opacity",String("text"===o?Math.min(1,1.6*a):a)),"text"===o){const t=128*a-14;for(const o of y)m.set(e,o,a>=1?"none":`linear-gradient(90deg, #000 ${t-14}%, transparent ${t+14}%)`)}}})(u);const g=Math.max(140,.42*i),p=i+g,b=-g+(n?.4:(e-d)/c.shimmer%1)*p,x=n?1:o((e-d)/280,3),v=t.createLinearGradient(b-p,0,b+p,.08*p);for(let t=0;t<=32;t++){const e=Math.abs(t/16-1)*p,o=Math.min(e,Math.abs(p-e)),n=o<g?.5+.5*Math.cos(o/g*Math.PI):0;v.addColorStop(t/32,r(.24+(.54-.24)*n))}const w=(e,o,n,a,r)=>{t.beginPath(),t.roundRect(e,o,Math.max(0,n),a,Math.min(r,a/2,Math.max(0,n)/2))};for(const{el:e,kind:n,delay:r}of M()){const{x:i,y:h,w:m,h:d}=a(e),f=e.getBoundingClientRect().width,g=s(e,n,f&&m?f/m:1),p=l(u,r,c.resolve);if(t.fillStyle=v,"photo"===n){const n=u<0?0:o(u/c.develop,4);t.globalAlpha=(1-p)*x,w(i,h,m,d,g.radius),t.fill();const a=e instanceof HTMLImageElement?e:e.querySelector("img");if(n>0&&a?.complete&&a.naturalWidth){const e=Math.max(m/a.naturalWidth,d/a.naturalHeight),o=a.naturalWidth*e,r=a.naturalHeight*e;t.save(),w(i,h,m,d,g.radius),t.clip(),t.globalAlpha=n*(1-p),t.drawImage(a,i+(m-o)/2,h+(d-r)/2,o,r),t.restore()}}else if("avatar"===n)t.globalAlpha=(1-p)*x,t.beginPath(),t.arc(i+m/2,h+d/2,Math.min(m,d)/2,0,2*Math.PI),t.fill();else{t.globalAlpha=x*(1-p);for(const e of g.lines){const o=i+e.x,n=o+e.w*p;w(n,h+e.y,o+e.w-n,e.h,g.radius),t.fill()}}t.globalAlpha=1}return!0}});const x=()=>{const t=null!==f;if(d=performance.now(),f=null,i.setAttribute("aria-busy","true"),b){if(t&&!b.still())for(const{el:t}of M())t.animate?.([{opacity:1},{opacity:0}],{duration:240,easing:"cubic-bezier(.16, 1, .3, 1)"});(()=>{for(const{el:t}of M()){m.set(t,"opacity","0");for(const e of y)t.style.removeProperty(e)}})(),b.kick()}};return x(),n(()=>b,h,()=>b?.refresh(),{resolve:()=>b?(null!==f&&p||(f=performance.now(),p=new Promise(t=>{g=t}),b.kick()),p):(i.removeAttribute("aria-busy"),Promise.resolve()),reset(){g?.(),g=null,p=null,x()},get loading(){return null===f}},()=>{k()})}var h=a;export{h as SKELETON_DEFAULTS,c as blockKind,s as blockShape,u as skeleton};//# sourceMappingURL=chunk-D4KCZSIP.js.map
1
+ import{styleKeeper as t,mountSurface as e,easeOut as o,handle as n}from"./chunk-GF72XM4C.js";var a={blocks:"[data-block]",shimmer:1400,resolve:420,stagger:60,develop:640},r=t=>`rgb(${255*t} ${255*t} ${255*t})`,l=(t,e,n)=>t<0?0:o((t-e)/n,3),i=t=>parseFloat(t)||0;function s(t,e,o=1){const n=getComputedStyle(t),a=t.getBoundingClientRect(),r=n.borderTopLeftRadius,l=r.endsWith("%")?i(r)/100*Math.min(a.width,a.height):i(r);if("text"!==e)return{radius:l/o,lines:[]};const s=i(n.fontSize)||14,c="normal"===n.lineHeight?1.2*s:i(n.lineHeight),u=Math.min(c,.62*s),h=new Map,m="undefined"!=typeof document&&"function"==typeof document.createRange?document.createRange():null;m?.selectNodeContents(t);for(const t of m?[...m.getClientRects()]:[]){if(!t.width)continue;const e=Math.round((t.top+t.bottom)/2/Math.max(1,c/2)),o=h.get(e);h.set(e,o?{left:Math.min(o.left,t.left),right:Math.max(o.right,t.right),top:Math.min(o.top,t.top),bottom:Math.max(o.bottom,t.bottom)}:{left:t.left,right:t.right,top:t.top,bottom:t.bottom})}const d=[...h.values()].map(t=>{const e=Math.max(t.left,a.left),n=Math.min(t.right,a.right),r=(t.top+t.bottom)/2;return{x:(e-a.left)/o,y:(r-u/2-a.top)/o,w:Math.max(0,n-e)/o,h:u/o}}).filter(t=>t.w>0);return d.length||d.push({x:0,y:(a.height-u)/2/o,w:a.width/o,h:u/o}),{radius:(l||u/2)/o,lines:d}}function c(t){const e=t.dataset.block;return"text"===e||"photo"===e||"avatar"===e?e:"IMG"===t.tagName||"PICTURE"===t.tagName||"VIDEO"===t.tagName?/^50%|^9999px/.test(getComputedStyle(t).borderTopLeftRadius)?"avatar":"photo":"text"}function u(i,u={}){const h={current:{...a,...u}},m=t();let d=0,f=null,g=null,p=null,b=null;const M=()=>[...i.querySelectorAll(h.current.blocks)].map((t,e)=>({el:t,kind:c(t),delay:void 0!==t.dataset.delay?Number(t.dataset.delay):80+e*h.current.stagger})),y=["mask-image","-webkit-mask-image"],k=()=>{m.restore(),i.removeAttribute("aria-busy"),g?.(),g=null};b=e({host:i,look:()=>({mark:"glyph",charset:" .:-=+*#%@",cellSize:5,cellAspect:.62,glyphScale:.92,font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,contrast:1.15,shade:.35,...h.current.look}),ink:()=>h.current.ink??"--ascii-ink-strong",kit:h,reducedMotion:()=>h.current.reducedMotion,onFail:()=>{b=null,k()},paint:({pen:t,now:e,still:n,box:a,w:i})=>{if(null!==f&&n)return k(),!1;const c=h.current,u=null===f?-1:e-f;if(null!==f&&u>Math.max(h.current.develop,...M().map(t=>t.delay+h.current.resolve))+16)return k(),!1;null!==f&&(t=>{for(const{el:e,kind:o,delay:n}of M()){const a=l(t,n,h.current.resolve);if(m.set(e,"opacity",String("text"===o?Math.min(1,1.6*a):a)),"text"===o){const t=128*a-14;for(const o of y)m.set(e,o,a>=1?"none":`linear-gradient(90deg, #000 ${t-14}%, transparent ${t+14}%)`)}}})(u);const g=Math.max(140,.42*i),p=i+g,b=-g+(n?.4:(e-d)/c.shimmer%1)*p,x=n?1:o((e-d)/280,3),v=t.createLinearGradient(b-p,0,b+p,.08*p);for(let t=0;t<=32;t++){const e=Math.abs(t/16-1)*p,o=Math.min(e,Math.abs(p-e)),n=o<g?.5+.5*Math.cos(o/g*Math.PI):0;v.addColorStop(t/32,r(.24+(.54-.24)*n))}const w=(e,o,n,a,r)=>{t.beginPath(),t.roundRect(e,o,Math.max(0,n),a,Math.min(r,a/2,Math.max(0,n)/2))};for(const{el:e,kind:n,delay:r}of M()){const{x:i,y:h,w:m,h:d}=a(e),f=e.getBoundingClientRect().width,g=s(e,n,f&&m?f/m:1),p=l(u,r,c.resolve);if(t.fillStyle=v,"photo"===n){const n=u<0?0:o(u/c.develop,4);t.globalAlpha=(1-p)*x,w(i,h,m,d,g.radius),t.fill();const a=e instanceof HTMLImageElement?e:e.querySelector("img");if(n>0&&a?.complete&&a.naturalWidth){const e=Math.max(m/a.naturalWidth,d/a.naturalHeight),o=a.naturalWidth*e,r=a.naturalHeight*e;t.save(),w(i,h,m,d,g.radius),t.clip(),t.globalAlpha=n*(1-p),t.drawImage(a,i+(m-o)/2,h+(d-r)/2,o,r),t.restore()}}else if("avatar"===n)t.globalAlpha=(1-p)*x,t.beginPath(),t.arc(i+m/2,h+d/2,Math.min(m,d)/2,0,2*Math.PI),t.fill();else{t.globalAlpha=x*(1-p);for(const e of g.lines){const o=i+e.x,n=o+e.w*p;w(n,h+e.y,o+e.w-n,e.h,g.radius),t.fill()}}t.globalAlpha=1}return!0}});const x=()=>{const t=null!==f;if(d=performance.now(),f=null,i.setAttribute("aria-busy","true"),b){if(t&&!b.still())for(const{el:t}of M())t.animate?.([{opacity:1},{opacity:0}],{duration:240,easing:"cubic-bezier(.16, 1, .3, 1)"});(()=>{for(const{el:t}of M()){m.set(t,"opacity","0");for(const e of y)t.style.removeProperty(e)}})(),b.kick()}};return x(),n(()=>b,h,()=>b?.refresh(),{resolve:()=>b?(null!==f&&p||(f=performance.now(),p=new Promise(t=>{g=t}),b.kick()),p):(i.removeAttribute("aria-busy"),Promise.resolve()),reset(){g?.(),g=null,p=null,x()},get loading(){return null===f}},()=>{k()})}var h=a;export{h as SKELETON_DEFAULTS,c as blockKind,s as blockShape,u as skeleton};//# sourceMappingURL=chunk-H5KHXZWR.js.map
@@ -1 +1 @@
1
- import{blank as t,mountPageField as e,pageHandle as n}from"./chunk-4SHQA3CO.js";import{styleKeeper as r}from"./chunk-PFQBEWCF.js";var o={font:'Georgia, "Times New Roman", serif',fontWeight:600};function i(e,n=o.font,r=o.fontWeight,i=520){const{canvas:c,pen:l}=t(1800,Math.max(1,Math.round(i))),s=Math.min(400,1700/Math.max(3,.56*[...e].length));return l.fillStyle="#fff",l.textAlign="center",l.textBaseline="middle",l.font=`${r} ${s}px ${n}`,l.fillText(e||" ",c.width/2,c.height/2+.05*s),c}function c(t,c={}){const l=(t.textContent??"").trim(),s={current:{...o,...c}};let a=s.current.text??l;const u=r(),f=()=>i(a,s.current.font,s.current.fontWeight,s.current.artHeight),d=!l;let h=null;h=e({host:t,layer:"over",look:()=>({mark:"glyph",scene:"none",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:7,cellAspect:.8,glyphScale:.8,color:"ink",shade:0,contrast:1.3,levels:"auto",fit:"contain",focus:{x:.5,y:.5},hover:"trail",trail:{strength:.62,radius:.22},...s.current.look}),ink:()=>s.current.ink??"--ascii-ink-strong",source:f(),label:d?s.current.label??a:void 0,kit:s,reducedMotion:()=>s.current.reducedMotion,onFail:()=>{h=null,u.restore()}}),h&&l&&u.set(t,"color","transparent"),h&&document.fonts?.load?.(`${s.current.fontWeight} 100px ${s.current.font}`).then(()=>{h&&h.field.setSource(f())},()=>{});const x=e=>{if(e!==a)if(a=e,void 0!==s.current.text&&(s.current={...s.current,text:a}),h)if(h.field.setSource(f()),d)h.field.update({label:s.current.label??(a||" ")});else{for(const e of[...t.childNodes])e!==h.canvas&&e.remove();t.prepend(document.createTextNode(a))}else l&&(t.textContent=a)};return n(()=>h,s,t=>{void 0!==t.text&&t.text!==a?x(t.text):h&&h.field.setSource(f())},{setText:x,get text(){return a}},()=>u.restore())}export{i as wordArt,c as wordmark};//# sourceMappingURL=chunk-EJ3W4FN6.js.map
1
+ import{blank as t,mountPageField as e,pageHandle as n}from"./chunk-7DXSG526.js";import{styleKeeper as r}from"./chunk-GF72XM4C.js";var o={font:'Georgia, "Times New Roman", serif',fontWeight:600};function i(e,n=o.font,r=o.fontWeight,i=520){const{canvas:c,pen:l}=t(1800,Math.max(1,Math.round(i))),s=Math.min(400,1700/Math.max(3,.56*[...e].length));return l.fillStyle="#fff",l.textAlign="center",l.textBaseline="middle",l.font=`${r} ${s}px ${n}`,l.fillText(e||" ",c.width/2,c.height/2+.05*s),c}function c(t,c={}){const l=(t.textContent??"").trim(),s={current:{...o,...c}};let a=s.current.text??l;const u=r(),f=()=>i(a,s.current.font,s.current.fontWeight,s.current.artHeight),d=!l;let h=null;h=e({host:t,layer:"over",look:()=>({mark:"glyph",scene:"none",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:7,cellAspect:.8,glyphScale:.8,color:"ink",shade:0,contrast:1.3,levels:"auto",fit:"contain",focus:{x:.5,y:.5},hover:"trail",trail:{strength:.62,radius:.22},...s.current.look}),ink:()=>s.current.ink??"--ascii-ink-strong",source:f(),label:d?s.current.label??a:void 0,kit:s,reducedMotion:()=>s.current.reducedMotion,onFail:()=>{h=null,u.restore()}}),h&&l&&u.set(t,"color","transparent"),h&&document.fonts?.load?.(`${s.current.fontWeight} 100px ${s.current.font}`).then(()=>{h&&h.field.setSource(f())},()=>{});const x=e=>{if(e!==a)if(a=e,void 0!==s.current.text&&(s.current={...s.current,text:a}),h)if(h.field.setSource(f()),d)h.field.update({label:s.current.label??(a||" ")});else{for(const e of[...t.childNodes])e!==h.canvas&&e.remove();t.prepend(document.createTextNode(a))}else l&&(t.textContent=a)};return n(()=>h,s,t=>{void 0!==t.text&&t.text!==a?x(t.text):h&&h.field.setSource(f())},{setText:x,get text(){return a}},()=>u.restore())}export{i as wordArt,c as wordmark};//# sourceMappingURL=chunk-I5R2347P.js.map
@@ -1 +1 @@
1
- import{injectStyle as e,imageReady as t,imageFor as n,drawCover as a}from"./chunk-PCGRRX5P.js";import{srOnly as o,mountSurface as r,handle as i,isDark as l,clamp as s}from"./chunk-PFQBEWCF.js";var c={maxBytes:10485760,develop:900};function d(e,t,n=Math.min(2,"number"==typeof devicePixelRatio&&devicePixelRatio>0?devicePixelRatio:1)){const a=Math.max(2,Math.round(6*n)),o=Math.max(2,Math.round(1*a)),r=(e,t)=>{const a=Math.floor(e*n/t);for(let e=a;e>1;e--){const o=e*t/n;if(Math.abs(o-Math.round(o))<.01||e<a-8)return{n:e,css:Math.round(o)}}return{n:1,css:Math.round(t/n)}},i=r(e,o),l=r(t,a);return{cols:i.n,rows:l.n,w:i.css,h:l.css,cw:o/n,ch:a/n}}function p(e,t,n,a){const{cols:o,rows:r}=t,i=e.createImageData(2*o,2*r),l=i.data,{tone:s,glow:c=0,phase:d=0,near:p=null}=a,h=Math.max(1,n/t.cw),u=Math.max(1,n/t.ch),m=o-2,f=r-2,g=Math.max(0,m-1-2*h),x=Math.max(0,f-1-2*u),v=Math.PI/4*(h+u),y=.45*Math.hypot(o,r);for(let e=0;e<r;e++)for(let t=0;t<o;t++){const n=Math.max(1+h-t,0,t-(m-h)),a=Math.max(1+u-e,0,e-(f-u));let r;if(n>0&&a>0){const e=Math.hypot(n/h,a/u);r=Math.hypot(n,a)*(1-1/e)}else r=-Math.min(t-1,m-t,e-1,f-e);let i=0;if(Math.abs(r)<.5){if(i=s,c>0){const o=t>m-h,r=e>f-u,l=t<1+h,p=e<1+u,y=(e,t)=>Math.atan2(e,t)/(Math.PI/2);let M;M=!p||l||o?p&&o?g+v*y(n/h,a/u):!o||p||r?r&&o?g+v+x+v*y(a/u,n/h):r&&!l?g+2*v+x+(m-h-t):r&&l?2*g+2*v+x+v*y(n/h,a/u):l&&!p?2*g+3*v+x+(f-u-e):2*g+3*v+2*x+v*y(a/u,n/h):g+v+(e-(1+u)):t-(1+h);const b=((M-d)%9+9)%9;i=s+c*(.2+.32*Math.max(0,1-Math.abs(b-4.5)/2.2))}}else if(c>0&&r<-.5&&r>-3.5){i=c*(1-(-r-.5)/3)**1.6*(.1+.32*(p?Math.max(0,1-Math.hypot(t-p.x,e-p.y)/y):.4))}const M=Math.round(255*Math.min(1,i));for(let n=0;n<4;n++){const a=4*((2*e+(n>>1))*o*2+2*t+(1&n));l[a]=l[a+1]=l[a+2]=M,l[a+3]=255}}e.putImageData(i,0,0)}function h(h,u={}){const m={current:{...c,...u}};let f="empty",g=null,x="",v="",y="image",M=0,b=0,w=!1,k=0,C=0,E=0,L=0,R=null,S=null,z=null,$=null,P=null;const U=o("",!0),j=["left","top","width","height"],O=()=>{const e=$?.canvas;if(!e||!h.offsetWidth)return null;const t="empty"===f?d(h.offsetWidth,h.offsetHeight):null,n=t?[`${Math.round((h.offsetWidth-t.w)/2)}px`,`${Math.round((h.offsetHeight-t.h)/2)}px`,`${t.w}px`,`${t.h}px`]:["0px","0px","100%","100%"];let a=!1;return j.forEach((t,o)=>{e.style[t]!==n[o]&&(e.style[t]=n[o],a=!0)}),P=t,a?($?.field.resize(),$?.kick(),null):t},B=document.createElement("input"),D=[U,B];let I=null;const W=!h.children.length;$=r({host:h,layer:"under",look:()=>"empty"===f?{mark:"glyph",charset:" .:+*#",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:6,cellAspect:1,glyphScale:.9,...m.current.look}:{blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:6,cellAspect:.8,glyphScale:.8,background:l(h)?"transparent":"#0b0b0a",color:"source",saturation:1.15,contrast:1.15,levels:"auto",brightness:.08,hover:"trail",trail:{strength:.6,radius:.3},...m.current.look},ink:e=>m.current.ink??`var(--ascii-ink, ${e?"#7a7872":"#76746e"})`,kit:m,reducedMotion:()=>m.current.reducedMotion,resolution:(e,t)=>"empty"===f&&P?[2*P.cols,2*P.rows]:[Math.max(1,Math.round(e)),Math.max(1,Math.round(t))],onFail:()=>{$=null,x&&N(x)},paint:({pen:e,w:t,h:n,now:o,still:r})=>{if("empty"!==f){if(!g)return!1;const i=r?1:s((o-M)/m.current.develop),l=1-(1-i)**2;return a(e,g,0,0,t,n),"developing"===f&&l<1&&function(e,t,n,a,o){const r=Math.max(Math.hypot(a.x,a.y),Math.hypot(t-a.x,a.y),Math.hypot(a.x,n-a.y),Math.hypot(t-a.x,n-a.y)),i=Math.max(24,.22*Math.min(t,n)),l=o*(r+i),s=Math.max(0,l-i),c=e.createRadialGradient(a.x,a.y,s,a.x,a.y,Math.max(s+1,l));c.addColorStop(0,"rgb(0 0 0 / 0)"),c.addColorStop(1,"rgb(0 0 0 / 1)"),e.globalCompositeOperation="source-over",e.fillStyle=c,e.fillRect(0,0,t,n);const d=e.createRadialGradient(a.x,a.y,s,a.x,a.y,Math.max(s+1,l)),p=1-o*o;d.addColorStop(0,"rgb(255 255 255 / 0)"),d.addColorStop(.55,`rgb(255 255 255 / ${.5*p})`),d.addColorStop(1,"rgb(255 255 255 / 0)"),e.globalCompositeOperation="lighter",e.fillStyle=d,e.fillRect(0,0,t,n),e.globalCompositeOperation="source-over"}(e,t,n,z??{x:t/2,y:n/2},l),i>=1&&"developing"===f&&F(),i<1}const i=E?Math.min(64,o-E):16;E=o;const l=w?1:0;C=r?l:C+(l-C)*(1-Math.exp(-i/90)),!r&&C>.004&&(L+=i/1e3*14);const c=Math.max(4,(parseFloat(getComputedStyle(h).borderTopLeftRadius)||16)-6),d=O();if(d){const t=$.canvas.getBoundingClientRect(),n=S&&t.width?{x:(S.x-t.left)/t.width*d.cols,y:(S.y-t.top)/t.height*d.rows}:null;p(e,d,c,{tone:.3,glow:C,phase:L,near:n})}const u=!r&&(w||Math.abs(l-C)>.004);return u||(E=0),u}});const G=e=>{const t=f;f=e,h.dataset.state=e,"empty"===t!=("empty"===e)&&(O(),$?.refresh()),t!==e&&m.current.onState?.(e,"empty"===e?"":y)},F=()=>{G("done"),U.textContent=`${y} ready`,g&&m.current.onImage?.({file:R,src:x,width:g.width,height:g.height})};function N(e){I??(I=Object.assign(document.createElement("img"),{className:"ascii-drop-img",alt:""})),I.src=e,I.parentElement!==h&&(h.prepend(I),D.push(I))}const A=async(e,a=null,o=null)=>{const r=++b;let i;z=o,v&&URL.revokeObjectURL(v),v="string"==typeof e?"":URL.createObjectURL(e),x=v||e,R=a??("undefined"!=typeof File&&e instanceof File?e:null),y=R?.name??("string"==typeof e&&e.split("/").pop()?.split("?")[0]||"image"),U.textContent=`Converting ${y}`;try{i=await t(n(x))}catch{return void(r===b&&(U.textContent=`Could not load ${y}`))}if(r===b){if(g=i,!$)return N(x),G("done"),void F();M=performance.now(),G($.still()?"done":"developing"),$.field.pulse({strength:1}),$.kick(),"done"===f&&F()}},T=(e,t=null)=>{const n=t=>{U.textContent=t,m.current.onError?.(t,e)};return e.type.startsWith("image/")?e.size>m.current.maxBytes?n(`${e.name} is over ${Math.round(m.current.maxBytes/1024/1024)} MB.`):void A(e,e,t):n(`${e.name} isn’t an image.`)},X=()=>{b++,g=null,x="",R=null,v&&URL.revokeObjectURL(v),v="",I?.remove(),G("empty"),U.textContent="",$?.kick()},Y=()=>B.click(),H=e=>new Promise(t=>{const n=$?.field;if(!n||!g||"done"!==f)return void t(null);const a=document.createElement("canvas");a.width=n.canvas.width,a.height=n.canvas.height;const o=a.getContext("2d");o?(o.fillStyle=getComputedStyle(h).backgroundColor||"#000",o.fillRect(0,0,a.width,a.height),n.redraw(),o.drawImage(n.canvas,0,0),a.toBlob(n=>{if(n){const t=document.createElement("a");t.href=URL.createObjectURL(n),t.download=e??m.current.filename??`${y.replace(/\.[^.]+$/,"")}-ascii.png`,t.click(),setTimeout(()=>URL.revokeObjectURL(t.href),1e3)}t(n)},"image/png")):t(null)}),J=()=>{E=0,$?.kick()},Q=e=>{e.preventDefault(),k++,S={x:e.clientX,y:e.clientY},w||(w=!0,h.dataset.over="",J())},q=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy"),S={x:e.clientX,y:e.clientY}},K=()=>{k=Math.max(0,k-1),!k&&w&&(w=!1,S=null,delete h.dataset.over,J())},V=e=>{e.preventDefault(),k=0,w=!1,S=null,delete h.dataset.over;const t=h.getBoundingClientRect(),n={x:e.clientX-t.left,y:e.clientY-t.top};$?.field.pulse({...n,strength:1});const a=e.dataTransfer?.files?.[0];a?T(a,n):J()},Z=e=>{const t=e.target?.closest?.("[data-dropzone]")?.getAttribute("data-dropzone");"pick"===t?Y():"clear"===t?X():"download"===t&&H()},_=()=>{const e=B.files?.[0];B.value="",e&&T(e)};e("ascii-kit-dropzone",'\n:where(.ascii-drop-empty){position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:100%;min-height:inherit;padding:24px;box-sizing:border-box;text-align:center}\n:where([data-ascii-dropzone]:not([data-state="empty"])) :where(.ascii-drop-empty){display:none}\n:where(.ascii-drop-title){margin:0;font-weight:500}\n:where(.ascii-drop-hint){margin:0;font-size:14px;opacity:.65}\n:where(.ascii-drop-pick){margin-top:8px;height:34px;padding:0 14px;border:0;border-radius:999px;background:currentColor;font:inherit;font-size:14px;cursor:pointer}\n:where(.ascii-drop-pick) > span{color:Canvas}\n:where(.ascii-drop-img){position:absolute;inset:0;width:100%;height:100%;object-fit:cover}\n'),h.dataset.asciiDropzone="",B.type="file",B.accept="image/*",B.tabIndex=-1,B.hidden=!0,B.setAttribute("aria-hidden","true"),W&&D.push(function(){const e=document.createElement("div"),t=document.createElement("p"),n=document.createElement("p"),a=document.createElement("button"),o=document.createElement("span");return e.className="ascii-drop-empty",t.className="ascii-drop-title",t.textContent="Drop an image",n.className="ascii-drop-hint",n.textContent="PNG, JPG or WebP",a.type="button",a.className="ascii-drop-pick",a.dataset.dropzone="pick",o.textContent="Choose file",a.appendChild(o),e.append(t,n,a),e}());for(const e of D)h.appendChild(e);return G("empty"),h.addEventListener("dragenter",Q),h.addEventListener("dragover",q),h.addEventListener("dragleave",K),h.addEventListener("drop",V),h.addEventListener("click",Z),B.addEventListener("change",_),i(()=>$,m,()=>$?.refresh(),{setImage:e=>A(e),clear:X,pick:Y,download:H,get state(){return f}},()=>{b++,v&&URL.revokeObjectURL(v),h.removeEventListener("dragenter",Q),h.removeEventListener("dragover",q),h.removeEventListener("dragleave",K),h.removeEventListener("drop",V),h.removeEventListener("click",Z),B.removeEventListener("change",_),D.forEach(e=>e.remove()),delete h.dataset.asciiDropzone,delete h.dataset.state,delete h.dataset.over})}var u=c;export{u as DROPZONE_DEFAULTS,h as dropzone,p as paintRing,d as ringGrid};//# sourceMappingURL=chunk-ZYYLWSPY.js.map
1
+ import{injectStyle as e,imageReady as t,imageFor as n,drawCover as a}from"./chunk-LE53AVKR.js";import{srOnly as o,mountSurface as r,handle as i,isDark as l,clamp as s}from"./chunk-GF72XM4C.js";var c={maxBytes:10485760,develop:900};function d(e,t,n=Math.min(2,"number"==typeof devicePixelRatio&&devicePixelRatio>0?devicePixelRatio:1)){const a=Math.max(2,Math.round(6*n)),o=Math.max(2,Math.round(1*a)),r=(e,t)=>{const a=Math.floor(e*n/t);for(let e=a;e>1;e--){const o=e*t/n;if(Math.abs(o-Math.round(o))<.01||e<a-8)return{n:e,css:Math.round(o)}}return{n:1,css:Math.round(t/n)}},i=r(e,o),l=r(t,a);return{cols:i.n,rows:l.n,w:i.css,h:l.css,cw:o/n,ch:a/n}}function p(e,t,n,a){const{cols:o,rows:r}=t,i=e.createImageData(2*o,2*r),l=i.data,{tone:s,glow:c=0,phase:d=0,near:p=null}=a,h=Math.max(1,n/t.cw),u=Math.max(1,n/t.ch),m=o-2,f=r-2,g=Math.max(0,m-1-2*h),x=Math.max(0,f-1-2*u),v=Math.PI/4*(h+u),y=.45*Math.hypot(o,r);for(let e=0;e<r;e++)for(let t=0;t<o;t++){const n=Math.max(1+h-t,0,t-(m-h)),a=Math.max(1+u-e,0,e-(f-u));let r;if(n>0&&a>0){const e=Math.hypot(n/h,a/u);r=Math.hypot(n,a)*(1-1/e)}else r=-Math.min(t-1,m-t,e-1,f-e);let i=0;if(Math.abs(r)<.5){if(i=s,c>0){const o=t>m-h,r=e>f-u,l=t<1+h,p=e<1+u,y=(e,t)=>Math.atan2(e,t)/(Math.PI/2);let M;M=!p||l||o?p&&o?g+v*y(n/h,a/u):!o||p||r?r&&o?g+v+x+v*y(a/u,n/h):r&&!l?g+2*v+x+(m-h-t):r&&l?2*g+2*v+x+v*y(n/h,a/u):l&&!p?2*g+3*v+x+(f-u-e):2*g+3*v+2*x+v*y(a/u,n/h):g+v+(e-(1+u)):t-(1+h);const b=((M-d)%9+9)%9;i=s+c*(.2+.32*Math.max(0,1-Math.abs(b-4.5)/2.2))}}else if(c>0&&r<-.5&&r>-3.5){i=c*(1-(-r-.5)/3)**1.6*(.1+.32*(p?Math.max(0,1-Math.hypot(t-p.x,e-p.y)/y):.4))}const M=Math.round(255*Math.min(1,i));for(let n=0;n<4;n++){const a=4*((2*e+(n>>1))*o*2+2*t+(1&n));l[a]=l[a+1]=l[a+2]=M,l[a+3]=255}}e.putImageData(i,0,0)}function h(h,u={}){const m={current:{...c,...u}};let f="empty",g=null,x="",v="",y="image",M=0,b=0,w=!1,k=0,C=0,E=0,L=0,R=null,S=null,z=null,$=null,U=null;const j=o("",!0),O=["left","top","width","height"],P=()=>{const e=$?.canvas;if(!e||!h.offsetWidth)return null;const t="empty"===f?d(h.offsetWidth,h.offsetHeight):null,n=t?[`${Math.round((h.offsetWidth-t.w)/2)}px`,`${Math.round((h.offsetHeight-t.h)/2)}px`,`${t.w}px`,`${t.h}px`]:["0px","0px","100%","100%"];let a=!1;return O.forEach((t,o)=>{e.style[t]!==n[o]&&(e.style[t]=n[o],a=!0)}),U=t,a?($?.field.resize(),$?.kick(),null):t},D=document.createElement("input"),I=[j,D];let B=null;const G=!h.children.length;$=r({host:h,layer:"under",look:()=>"empty"===f?{mark:"glyph",charset:" .:+*#",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:6,cellAspect:1,glyphScale:.9,...m.current.look}:{blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:6,cellAspect:.8,glyphScale:.8,background:l(h)?"transparent":"#0b0b0a",color:"source",saturation:1.15,contrast:1.15,levels:"auto",brightness:.08,hover:"trail",trail:{strength:.6,radius:.3},...m.current.look},ink:e=>m.current.ink??`var(--ascii-ink, ${e?"#7a7872":"#76746e"})`,kit:m,reducedMotion:()=>m.current.reducedMotion,resolution:(e,t)=>"empty"===f&&U?[2*U.cols,2*U.rows]:[Math.max(1,Math.round(e)),Math.max(1,Math.round(t))],onFail:()=>{$=null,x&&N(x)},paint:({pen:e,w:t,h:n,now:o,still:r})=>{if("empty"!==f){if(!g)return!1;const i=r?1:s((o-M)/m.current.develop),l=1-(1-i)**2;return a(e,g,0,0,t,n),"developing"===f&&l<1&&function(e,t,n,a,o){const r=Math.max(Math.hypot(a.x,a.y),Math.hypot(t-a.x,a.y),Math.hypot(a.x,n-a.y),Math.hypot(t-a.x,n-a.y)),i=Math.max(24,.22*Math.min(t,n)),l=o*(r+i),s=Math.max(0,l-i),c=e.createRadialGradient(a.x,a.y,s,a.x,a.y,Math.max(s+1,l));c.addColorStop(0,"rgb(0 0 0 / 0)"),c.addColorStop(1,"rgb(0 0 0 / 1)"),e.globalCompositeOperation="source-over",e.fillStyle=c,e.fillRect(0,0,t,n);const d=e.createRadialGradient(a.x,a.y,s,a.x,a.y,Math.max(s+1,l)),p=1-o*o;d.addColorStop(0,"rgb(255 255 255 / 0)"),d.addColorStop(.55,`rgb(255 255 255 / ${.5*p})`),d.addColorStop(1,"rgb(255 255 255 / 0)"),e.globalCompositeOperation="lighter",e.fillStyle=d,e.fillRect(0,0,t,n),e.globalCompositeOperation="source-over"}(e,t,n,z??{x:t/2,y:n/2},l),i>=1&&"developing"===f&&A(),i<1}const i=E?Math.min(64,o-E):16;E=o;const l=w?1:0;C=r?l:C+(l-C)*(1-Math.exp(-i/90)),!r&&C>.004&&(L+=i/1e3*14);const c=Math.max(4,(parseFloat(getComputedStyle(h).borderTopLeftRadius)||16)-6),d=P();if(d){const t=$.canvas.getBoundingClientRect(),n=S&&t.width?{x:(S.x-t.left)/t.width*d.cols,y:(S.y-t.top)/t.height*d.rows}:null;p(e,d,c,{tone:.3,glow:C,phase:L,near:n})}const u=!r&&(w||Math.abs(l-C)>.004);return u||(E=0),u}});const W=e=>{const t=f;f=e,h.dataset.state=e,"empty"===t!=("empty"===e)&&(P(),$?.refresh()),t!==e&&m.current.onState?.(e,"empty"===e?"":y)},A=()=>{W("done"),j.textContent=`${y} ready`,g&&m.current.onImage?.({file:R,src:x,width:g.width,height:g.height})};function N(e){B??(B=Object.assign(document.createElement("img"),{className:"ascii-drop-img",alt:""})),B.src=e,B.parentElement!==h&&(h.prepend(B),I.push(B))}const F=async(e,a=null,o=null)=>{const r=++b;let i;z=o,v&&URL.revokeObjectURL(v),v="string"==typeof e?"":URL.createObjectURL(e),x=v||e,R=a??("undefined"!=typeof File&&e instanceof File?e:null),y=R?.name??("string"==typeof e&&e.split("/").pop()?.split("?")[0]||"image"),j.textContent=`Converting ${y}`;try{i=await t(n(x))}catch{return void(r===b&&(j.textContent=`Could not load ${y}`))}if(r===b){if(g=i,!$)return N(x),W("done"),void A();M=performance.now(),W($.still()?"done":"developing"),$.field.pulse({strength:1}),$.kick(),"done"===f&&A()}},T=(e,t=null)=>{const n=t=>{j.textContent=t,m.current.onError?.(t,e)};return e.type.startsWith("image/")?e.size>m.current.maxBytes?n(`${e.name} is over ${Math.round(m.current.maxBytes/1024/1024)} MB.`):void F(e,e,t):n(`${e.name} isn’t an image.`)},X=()=>{b++,g=null,x="",R=null,v&&URL.revokeObjectURL(v),v="",B?.remove(),W("empty"),j.textContent="",$?.kick()},Y=()=>D.click(),H=e=>new Promise(t=>{const n=$?.field;if(!n||!g||"done"!==f)return void t(null);const a=document.createElement("canvas");a.width=n.canvas.width,a.height=n.canvas.height;const o=a.getContext("2d");o?(o.fillStyle=getComputedStyle(h).backgroundColor||"#000",o.fillRect(0,0,a.width,a.height),n.redraw(),o.drawImage(n.canvas,0,0),a.toBlob(n=>{if(n){const t=document.createElement("a");t.href=URL.createObjectURL(n),t.download=e??m.current.filename??`${y.replace(/\.[^.]+$/,"")}-ascii.png`,t.click(),setTimeout(()=>URL.revokeObjectURL(t.href),1e3)}t(n)},"image/png")):t(null)}),J=()=>{E=0,$?.kick()},K=e=>{e.preventDefault(),k++,S={x:e.clientX,y:e.clientY},w||(w=!0,h.dataset.over="",J())},V=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy"),S={x:e.clientX,y:e.clientY}},q=()=>{k=Math.max(0,k-1),!k&&w&&(w=!1,S=null,delete h.dataset.over,J())},Q=e=>{e.preventDefault(),k=0,w=!1,S=null,delete h.dataset.over;const t=h.getBoundingClientRect(),n={x:e.clientX-t.left,y:e.clientY-t.top};$?.field.pulse({...n,strength:1});const a=e.dataTransfer?.files?.[0];a?T(a,n):J()},Z=e=>{const t=e.target?.closest?.("[data-dropzone]")?.getAttribute("data-dropzone");"pick"===t?Y():"clear"===t?X():"download"===t&&H()},_=()=>{const e=D.files?.[0];D.value="",e&&T(e)};e("ascii-kit-dropzone",'\n:where(.ascii-drop-empty){position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:100%;min-height:inherit;padding:24px;box-sizing:border-box;text-align:center}\n:where([data-ascii-dropzone]:not([data-state="empty"])) :where(.ascii-drop-empty){display:none}\n:where(.ascii-drop-title){margin:0;font-weight:500}\n:where(.ascii-drop-hint){margin:0;font-size:14px;opacity:.65}\n:where(.ascii-drop-pick){margin-top:8px;height:34px;padding:0 14px;border:0;border-radius:999px;background:currentColor;font:inherit;font-size:14px;cursor:pointer}\n:where(.ascii-drop-pick) > span{color:Canvas}\n:where(.ascii-drop-img){position:absolute;inset:0;width:100%;height:100%;object-fit:cover}\n'),h.dataset.asciiDropzone="",D.type="file",D.accept="image/*",D.tabIndex=-1,D.hidden=!0,D.setAttribute("aria-hidden","true"),G&&I.push(function(){const e=document.createElement("div"),t=document.createElement("p"),n=document.createElement("p"),a=document.createElement("button"),o=document.createElement("span");return e.className="ascii-drop-empty",t.className="ascii-drop-title",t.textContent="Drop an image",n.className="ascii-drop-hint",n.textContent="PNG, JPG or WebP",a.type="button",a.className="ascii-drop-pick",a.dataset.dropzone="pick",o.textContent="Choose file",a.appendChild(o),e.append(t,n,a),e}());for(const e of I)h.appendChild(e);return W("empty"),h.addEventListener("dragenter",K),h.addEventListener("dragover",V),h.addEventListener("dragleave",q),h.addEventListener("drop",Q),h.addEventListener("click",Z),D.addEventListener("change",_),i(()=>$,m,()=>$?.refresh(),{setImage:e=>F(e),clear:X,pick:Y,download:H,get state(){return f}},()=>{b++,v&&URL.revokeObjectURL(v),h.removeEventListener("dragenter",K),h.removeEventListener("dragover",V),h.removeEventListener("dragleave",q),h.removeEventListener("drop",Q),h.removeEventListener("click",Z),D.removeEventListener("change",_),I.forEach(e=>e.remove()),delete h.dataset.asciiDropzone,delete h.dataset.state,delete h.dataset.over})}var u=c;export{u as DROPZONE_DEFAULTS,h as dropzone,p as paintRing,d as ringGrid};//# sourceMappingURL=chunk-IBNDCKEX.js.map
@@ -1 +1 @@
1
- import{blank as e,mountPageField as t,pageHandle as n,pulseAt as r,sleep as o}from"./chunk-4SHQA3CO.js";import{hash as l}from"./chunk-PFQBEWCF.js";var a={preset:"hero",clear:!1,text:"404",ripple:!0},i=28,c='600 440px "Geist", Arial, sans-serif',s=()=>"number"==typeof innerWidth&&innerWidth<760,d=e=>({mark:"glyph",scene:"drift",levels:"auto",charset:" .:+*#",font:'"Geist Mono", ui-monospace, monospace',fontWeight:400,cellSize:10,cellAspect:.62,glyphScale:.86,color:"ink",shade:0,hover:"trail",trail:{strength:.9,radius:.32},...e}),h={mark:"glyph",scene:"none",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:7,cellAspect:.8,glyphScale:.8,color:"ink",shade:0,contrast:1.4,fit:"contain",clear:!1,focus:{x:.5,y:.5},drift:.8,speed:.7,levels:"auto",hover:"trail",trail:{strength:1,radius:.42}};function f(t){const n=document.createElement("canvas").getContext("2d");n.font=c;const r=Math.max(320,Math.ceil(n.measureText(t).width)+160),{canvas:o,pen:l}=e(r,560);return l.fillStyle="#fff",l.textAlign="center",l.textBaseline="middle",l.font=c,l.letterSpacing="-10px",l.fillText(t,r/2,296),o}function u(e){const t=e.getContext("2d").getImageData(0,0,e.width,e.height).data,n=[];for(let r=0;r<e.height;r+=i)for(let o=0;o<e.width;o+=i){let a=!1;for(let n=0;n<i&&!a;n+=4)for(let l=0;l<i&&!a;l+=4)a=(t[4*((r+n)*e.width+o+l)]??0)>40;if(!a)continue;const c=n.length,s=l(c,1)*Math.PI*2,d=120+420*l(c,2);n.push({x:o,y:r,dx:Math.cos(s)*d+.5*(o-e.width/2),dy:Math.sin(s)*d*.6,lag:.35*l(c,3)})}return n}var p=[...Array.from({length:10},(e,t)=>(t+1)/10),1,1,1,...Array.from({length:14},(e,t)=>1-(t+1)/14)];function g(e,t,n,r){const o=t.getContext("2d");o.globalAlpha=1,o.fillStyle="#000",o.fillRect(0,0,t.width,t.height);for(const t of n){const n=Math.min(1,Math.max(0,(r-t.lag*(1-r))/(1-.5*t.lag))),l=n*n*(3-2*n);o.globalAlpha=1-.72*l,o.drawImage(e,t.x,t.y,i,i,t.x+t.dx*l,t.y+t.dy*l,i,i)}o.globalAlpha=1}function m(l,i={}){const m={current:{...a,...i}},x=()=>"notFound"===m.current.preset;let y=0,v=!1,b=0;const w={x:-1e4,y:-1e4,at:-1e6},k=()=>f(m.current.text);let M=null;M=t({host:l,look:()=>{const e=m.current,t=e.clear,n=e=>!!t&&{element:t,padding:-14,feather:e,shape:"ellipse"};return{..."notFound"===e.preset?h:"brand"===e.preset?d({scale:s()?1.4:1.6,brightness:.24,contrast:1.1,clear:n(.3)}):d({scale:s()?1.6:1.9,brightness:.26,contrast:1.15,clear:n(.22)}),...e.look}},ink:e=>{const t=m.current,n=t.palette,r="string"==typeof n?n:n?.[e?"dark":"light"];return r??t.ink?r??t.ink:"notFound"===t.preset?e?"#d8d6cf":"#1d1d1b":"brand"===t.preset?`var(--brand, ${e?"#8f80ff":"#5b4bd1"})`:e?"#8a8881":"#6b6964"},source:x()?k():null,label:m.current.label??(x()?m.current.text:void 0),kit:m,reducedMotion:()=>m.current.reducedMotion,onFail:()=>{M=null}}),M&&x()&&document.fonts?.load?.(c).then(()=>{M&&x()&&!v&&M.field.setSource(k())},()=>{});const S=(e,t=1.4)=>{M&&!M.still()&&(b=performance.now()+1400,r(M.field,e,t))},A=e=>{const t=m.current,n=performance.now();!M||x()||!t.ripple||M.still()||n<b||n-w.at<520||Math.hypot(e.clientX-w.x,e.clientY-w.y)<36||(Object.assign(w,{x:e.clientX,y:e.clientY,at:n}),r(M.field,{x:e.clientX,y:e.clientY},.65))};M&&l.addEventListener("pointermove",A);let F=m.current.preset,C=m.current.text;return n(()=>M,m,e=>{M&&((e.preset!==F||"notFound"===e.preset&&e.text!==C)&&(y++,v=!1,M.field.setSource("notFound"===e.preset?k():null)),F=e.preset,C=e.text)},{pulse:S,scatter:async t=>{const n=M?.field;if(!n)return;if(!x())return void S(t);if(t&&S(t,1.2),v||M.still())return;v=!0;const r=++y,l=k(),a=u(l),i=e(l.width,l.height).canvas;for(const e of p){const t=performance.now();if(g(l,i,a,e),await n.setSource(i),await o(Math.max(0,44-(performance.now()-t))),r!==y||!M)return void(v=!1)}await n.setSource(l),v=!1}},()=>{y++,l.removeEventListener("pointermove",A)})}var x=a;export{x as FIELD_BACKGROUND_DEFAULTS,p as SCATTER_STEPS,m as fieldBackground,f as lostArt,u as lostTiles};//# sourceMappingURL=chunk-A73S2BCE.js.map
1
+ import{blank as e,mountPageField as t,pageHandle as n,pulseAt as r,sleep as o}from"./chunk-7DXSG526.js";import{hash as l}from"./chunk-GF72XM4C.js";var a={preset:"hero",clear:!1,text:"404",ripple:!0},i=28,c='600 440px "Geist", Arial, sans-serif',s=()=>"number"==typeof innerWidth&&innerWidth<760,d=e=>({mark:"glyph",scene:"drift",levels:"auto",charset:" .:+*#",font:'"Geist Mono", ui-monospace, monospace',fontWeight:400,cellSize:10,cellAspect:.62,glyphScale:.86,color:"ink",shade:0,hover:"trail",trail:{strength:.9,radius:.32},...e}),h={mark:"glyph",scene:"none",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:7,cellAspect:.8,glyphScale:.8,color:"ink",shade:0,contrast:1.4,fit:"contain",clear:!1,focus:{x:.5,y:.5},drift:.8,speed:.7,levels:"auto",hover:"trail",trail:{strength:1,radius:.42}};function f(t){const n=document.createElement("canvas").getContext("2d");n.font=c;const r=Math.max(320,Math.ceil(n.measureText(t).width)+160),{canvas:o,pen:l}=e(r,560);return l.fillStyle="#fff",l.textAlign="center",l.textBaseline="middle",l.font=c,l.letterSpacing="-10px",l.fillText(t,r/2,296),o}function u(e){const t=e.getContext("2d").getImageData(0,0,e.width,e.height).data,n=[];for(let r=0;r<e.height;r+=i)for(let o=0;o<e.width;o+=i){let a=!1;for(let n=0;n<i&&!a;n+=4)for(let l=0;l<i&&!a;l+=4)a=(t[4*((r+n)*e.width+o+l)]??0)>40;if(!a)continue;const c=n.length,s=l(c,1)*Math.PI*2,d=120+420*l(c,2);n.push({x:o,y:r,dx:Math.cos(s)*d+.5*(o-e.width/2),dy:Math.sin(s)*d*.6,lag:.35*l(c,3)})}return n}var p=[...Array.from({length:10},(e,t)=>(t+1)/10),1,1,1,...Array.from({length:14},(e,t)=>1-(t+1)/14)];function g(e,t,n,r){const o=t.getContext("2d");o.globalAlpha=1,o.fillStyle="#000",o.fillRect(0,0,t.width,t.height);for(const t of n){const n=Math.min(1,Math.max(0,(r-t.lag*(1-r))/(1-.5*t.lag))),l=n*n*(3-2*n);o.globalAlpha=1-.72*l,o.drawImage(e,t.x,t.y,i,i,t.x+t.dx*l,t.y+t.dy*l,i,i)}o.globalAlpha=1}function m(l,i={}){const m={current:{...a,...i}},x=()=>"notFound"===m.current.preset;let y=0,v=!1,b=0;const w={x:-1e4,y:-1e4,at:-1e6},k=()=>f(m.current.text);let M=null;M=t({host:l,look:()=>{const e=m.current,t=e.clear,n=e=>!!t&&{element:t,padding:-14,feather:e,shape:"ellipse"};return{..."notFound"===e.preset?h:"brand"===e.preset?d({scale:s()?1.4:1.6,brightness:.24,contrast:1.1,clear:n(.3)}):d({scale:s()?1.6:1.9,brightness:.26,contrast:1.15,clear:n(.22)}),...e.look}},ink:e=>{const t=m.current,n=t.palette,r="string"==typeof n?n:n?.[e?"dark":"light"];return r??t.ink?r??t.ink:"notFound"===t.preset?e?"#d8d6cf":"#1d1d1b":"brand"===t.preset?`var(--brand, ${e?"#8f80ff":"#5b4bd1"})`:e?"#8a8881":"#6b6964"},source:x()?k():null,label:m.current.label??(x()?m.current.text:void 0),kit:m,reducedMotion:()=>m.current.reducedMotion,onFail:()=>{M=null}}),M&&x()&&document.fonts?.load?.(c).then(()=>{M&&x()&&!v&&M.field.setSource(k())},()=>{});const S=(e,t=1.4)=>{M&&!M.still()&&(b=performance.now()+1400,r(M.field,e,t))},A=e=>{const t=m.current,n=performance.now();!M||x()||!t.ripple||M.still()||n<b||n-w.at<520||Math.hypot(e.clientX-w.x,e.clientY-w.y)<36||(Object.assign(w,{x:e.clientX,y:e.clientY,at:n}),r(M.field,{x:e.clientX,y:e.clientY},.65))};M&&l.addEventListener("pointermove",A);let F=m.current.preset,G=m.current.text;return n(()=>M,m,e=>{M&&((e.preset!==F||"notFound"===e.preset&&e.text!==G)&&(y++,v=!1,M.field.setSource("notFound"===e.preset?k():null)),F=e.preset,G=e.text)},{pulse:S,scatter:async t=>{const n=M?.field;if(!n)return;if(!x())return void S(t);if(t&&S(t,1.2),v||M.still())return;v=!0;const r=++y,l=k(),a=u(l),i=e(l.width,l.height).canvas;for(const e of p){const t=performance.now();if(g(l,i,a,e),await n.setSource(i),await o(Math.max(0,44-(performance.now()-t))),r!==y||!M)return void(v=!1)}await n.setSource(l),v=!1}},()=>{y++,l.removeEventListener("pointermove",A)})}var x=a;export{x as FIELD_BACKGROUND_DEFAULTS,p as SCATTER_STEPS,m as fieldBackground,f as lostArt,u as lostTiles};//# sourceMappingURL=chunk-ILXVBO7M.js.map
@@ -1 +1 @@
1
- import{snapshot as e}from"./chunk-PCGRRX5P.js";import{styleKeeper as t,mountSurface as o,clamp as r,house as n}from"./chunk-PFQBEWCF.js";var a={duration:620,collapse:!0,remove:!1},i=16,l=new WeakMap;function s(s,c={}){const d=l.get(s);if(d)return d;const h={...a,...c},p=t(),u=s.offsetHeight,g=()=>{for(const e of s.children)p.set(e,"opacity","0");p.set(s,"color","transparent"),p.set(s,"pointer-events","none"),s.setAttribute("aria-hidden","true")},f=e=>{h.collapse&&(p.set(s,"box-sizing","border-box"),p.set(s,"overflow","hidden"),p.set(s,"min-height","0"),p.set(s,"height",`${(u*(1-e)).toFixed(2)}px`),e>=1&&(p.set(s,"padding-block","0"),p.set(s,"margin-block","0"),p.set(s,"border-width","0")))},m=h.host??s.parentElement??s;let k=0,b=!1,w=null,v={x:0,y:0,w:0,h:0},x=()=>{};const y=o({host:m,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:5,cellAspect:.62,glyphScale:.92,contrast:1.6,drift:5,...h.look}),outset:i,resolution:2,ink:()=>h.ink??"--ascii-ink-strong",kit:{current:{lazy:!1,globalLook:h.globalLook}},reducedMotion:()=>h.reducedMotion,onFail:()=>x(),paint:({pen:e,now:t,still:o,scale:a})=>{if(o)return queueMicrotask(x),!1;if(!w||!b)return!1;const l=t-k,s=r(l/h.duration);e.setTransform(a,0,0,a,0,0),l>=300&&f(n(r((l-300)/260))),e.save(),e.globalAlpha=r(2.2*(1-s))*(1-.9*s*s),e.translate(8*s,-14*s),e.drawImage(w,0,0,w.width/2,w.height/2),e.globalCompositeOperation="destination-out";const c=v.x+v.w,d=c-(1.3*s-.3)*v.w,p=c-1.3*s*v.w,u=e.createLinearGradient(p,0,Math.max(p+1,d),0);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),e.globalAlpha=1,e.fillStyle=u,e.fillRect(v.x-i,v.y-i,v.w+32,v.h+32),e.restore();const g=l>=Math.max(h.duration,h.collapse?560:0);return g&&queueMicrotask(x),!g}}),M=new Promise(t=>{let o=!1;if(x=()=>{o||(o=!0,y?.destroy(),f(1),h.remove&&s.remove(),l.delete(s),t())},!y||y.still())return g(),void x();v=y.box(s),w=e(s,y.canvas.clientWidth||v.w+32,y.canvas.clientHeight||v.h+32,y.box).canvas;y.field.ready.then(()=>{o||b||(g(),b=!0,k=performance.now(),y.kick())},()=>{g(),x()})});return l.set(s,M),M}var c=a;export{c as DISINTEGRATE_DEFAULTS,s as disintegrate};//# sourceMappingURL=chunk-QZHZWO7N.js.map
1
+ import{snapshot as e}from"./chunk-LE53AVKR.js";import{styleKeeper as t,mountSurface as o,clamp as r,house as n}from"./chunk-GF72XM4C.js";var a={duration:620,collapse:!0,remove:!1},i=16,l=new WeakMap;function s(s,c={}){const d=l.get(s);if(d)return d;const h={...a,...c},p=t(),u=s.offsetHeight,g=()=>{for(const e of s.children)p.set(e,"opacity","0");p.set(s,"color","transparent"),p.set(s,"pointer-events","none"),s.setAttribute("aria-hidden","true")},f=e=>{h.collapse&&(p.set(s,"box-sizing","border-box"),p.set(s,"overflow","hidden"),p.set(s,"min-height","0"),p.set(s,"height",`${(u*(1-e)).toFixed(2)}px`),e>=1&&(p.set(s,"padding-block","0"),p.set(s,"margin-block","0"),p.set(s,"border-width","0")))},m=h.host??s.parentElement??s;let k=0,b=!1,w=null,v={x:0,y:0,w:0,h:0},x=()=>{};const y=o({host:m,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:5,cellAspect:.62,glyphScale:.92,contrast:1.6,drift:5,...h.look}),outset:i,resolution:2,ink:()=>h.ink??"--ascii-ink-strong",kit:{current:{lazy:!1,globalLook:h.globalLook}},reducedMotion:()=>h.reducedMotion,onFail:()=>x(),paint:({pen:e,now:t,still:o,scale:a})=>{if(o)return queueMicrotask(x),!1;if(!w||!b)return!1;const l=t-k,s=r(l/h.duration);e.setTransform(a,0,0,a,0,0),l>=300&&f(n(r((l-300)/260))),e.save(),e.globalAlpha=r(2.2*(1-s))*(1-.9*s*s),e.translate(8*s,-14*s),e.drawImage(w,0,0,w.width/2,w.height/2),e.globalCompositeOperation="destination-out";const c=v.x+v.w,d=c-(1.3*s-.3)*v.w,p=c-1.3*s*v.w,u=e.createLinearGradient(p,0,Math.max(p+1,d),0);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),e.globalAlpha=1,e.fillStyle=u,e.fillRect(v.x-i,v.y-i,v.w+32,v.h+32),e.restore();const g=l>=Math.max(h.duration,h.collapse?560:0);return g&&queueMicrotask(x),!g}}),M=new Promise(t=>{let o=!1;if(x=()=>{o||(o=!0,y?.destroy(),f(1),h.remove&&s.remove(),l.delete(s),t())},!y||y.still())return g(),void x();v=y.box(s),w=e(s,y.canvas.clientWidth||v.w+32,y.canvas.clientHeight||v.h+32,y.box).canvas;y.field.ready.then(()=>{o||b||(g(),b=!0,k=performance.now(),y.kick())},()=>{g(),x()})});return l.set(s,M),M}var c=a;export{c as DISINTEGRATE_DEFAULTS,s as disintegrate};//# sourceMappingURL=chunk-JELJEEJO.js.map