1import{$ as y,A as ye,B as _,C as Ge,D as Be,E as Pt,F as Bt,G,H as M,I as D,K,L as ce,O as He,P as qt,Q as We,S as L,T as Et,U as Mt,V as ae,W as P,X as de,Y as fe,_ as pe,a as Dt,b as ne,c as N,d as Xe,et as Ut,f as H,g as Nt,i as se,j as d,k as ze,l as be,m as jt,n as Vt,o as Oe,p as Wt,s as Xt,u as re,v as St,w as O,x as W,y as Yt,z as $t}from"../chunks/BpvyT-Kf.js";import"../chunks/DwdwGuwu.js";var Oi=Ut({prerender:()=>!0});var Gt={url:"https://shiroxapp.github.io"},Ht={url:"https://github.com/xibrox/Shirox",authorUrl:"https://github.com/xibrox",licenseUrl:"https://github.com/xibrox/Shirox/blob/main/LICENSE",rawSourceUrl:"https://raw.githubusercontent.com/xibrox/Shirox/refs/heads/main/apps.json",apiRepoUrl:"https://api.github.com/repos/xibrox/Shirox",apiCommitsUrl:"https://api.github.com/repos/xibrox/Shirox/commits?per_page=1"},Zt={inviteUrl:"https://discord.com/invite/b9tZSuJj73",apiInviteUrl:"https://discord.com/api/v9/invites/b9tZSuJj73?with_counts=true"},Qt={url:"https://ko-fi.com/xibrox"},Kt={installs:256,url:"https://testflight.apple.com/join/jvGzcXYh"},Jt={url:"https://nightly.link/xibrox/Shirox/workflows/nightly.yaml/main?preview"},er={url:"altstore://source?url=https%3A%2F%2Fraw.githubusercontent.com%2Fxibrox%2FShirox%2Frefs%2Fheads%2Fmain%2Fapps.json"},tr={url:"sidestore://source?url=https%3A%2F%2Fraw.githubusercontent.com%2Fxibrox%2FShirox%2Frefs%2Fheads%2Fmain%2Fapps.json"},te={safeMode:!1,site:Gt,github:Ht,discord:Zt,kofi:Qt,testflight:Kt,nightly:Jt,altstore:er,sidestore:tr},Ee={version:"1.0.3",minOS:"iOS 15+",size:"~9 MB",ipaUrl:"https://github.com/xibrox/Shirox/releases/download/beta/Shirox.ipa"},Me={features:{title:"What it does.",sub:"No accounts required, no ads, no upsell."},stats:{title:"By the numbers.",sub:"Live from GitHub, Discord and more."},install:{title:"Install it.",sub:"Sideload it today. On the App Store soon."}},ke={githubStars:"GitHub stars",discordMembers:"Discord members",testflightInstalls:"Testflight installs",version:"Current version",lastCommit:"Last commit"},ue={github:te.github.url,discord:te.discord.inviteUrl,kofi:te.kofi.url,license:te.github.licenseUrl,author:te.github.authorUrl,testflight:te.testflight.url},rt={year:2026,licenseLabel:"License"},Re={headline:"Your anime library,",headlineAccent:"entirely yours.",sub:"A free, source-available library manager for anime and manga on iOS.",meta:`v${Ee.version} · ${Ee.minOS}`},rr=[{n:"01",title:"Community modules",body:te.safeMode?"Bring your own catalog sources.":"Add a source, search it, watch it."},{n:"02",title:"Anime and manga",body:"One library for both, with a real reader."},{n:"03",title:"Tracking",body:"AniList and MyAnimeList. Offline edits catch up."},{n:"04",title:"Player",body:"Picture-in-Picture, AirPlay, Chromecast, subtitles."},{n:"05",title:"Downloads",body:"Episodes and chapters, kept for no signal."},{n:"06",title:"Your own files",body:"Local video, or a Jellyfin server."}],st=[{label:"Home",caption:"Pick up where you left off.",frames:[{src:"/screenshots/home-dark.webp",srcLight:"/screenshots/home-light.webp",alt:"The Shirox home screen, with a featured series banner and the start of a Continue Watching row."}]},{label:"Discover",caption:"Trending, seasonal, top rated.",frames:[{src:"/screenshots/discover-1-dark.webp",srcLight:"/screenshots/discover-1-light.webp",alt:"Continue Watching and Continue Reading rows, with Trending Now starting below."},{src:"/screenshots/discover-2-dark.webp",srcLight:"/screenshots/discover-2-light.webp",alt:"Rows of anime posters under Trending Now and This Season, each with a rating."},{src:"/screenshots/discover-3-dark.webp",srcLight:"/screenshots/discover-3-light.webp",alt:"Rows of anime posters under All-Time Popular and Top Rated, each with a rating."}]},{label:"Search",caption:"Every entry, every season.",frames:[{src:"/screenshots/search-dark.webp",srcLight:"/screenshots/search-light.webp",alt:"Search results for Clannad, shown as a grid of rated poster cards."},{src:"/screenshots/trending-dark.webp",srcLight:"/screenshots/trending-light.webp",alt:"The full Trending Now list, shown as a grid of rated poster cards."}]},{label:"Series",caption:"Synopsis, episodes, downloads.",frames:[{src:"/screenshots/series-dark.webp",srcLight:"/screenshots/series-light.webp",alt:"The Clannad series page, with synopsis, genres and a list of 23 episodes."}]},{label:"Library",caption:"Everything you track, in one list.",frames:[{src:"/screenshots/library-dark.webp",srcLight:"/screenshots/library-light.webp",alt:"The library, filtered to Watching, showing episode progress and ratings for each series."}]},{label:"Settings",caption:"Everything you need to make it yours.",frames:[{src:"/screenshots/settings-dark.webp",srcLight:"/screenshots/settings-light.webp",alt:"The settings screen, with linked AniList and MyAnimeList providers and player preferences like skip duration."}]},{label:"Player",caption:"Picture-in-Picture, AirPlay, Chromecast, subtitles.",landscape:!0,frames:[{src:"/screenshots/player.webp",alt:"The video player, playing episode 5 with a skip-intro control and a scrubber."}],narrowFrames:[{src:"/screenshots/player-portrait.webp",alt:"The video player, playing episode 5 with a skip-intro control and a scrubber."},{src:"/screenshots/episode-selector-dark.webp",srcLight:"/screenshots/episode-selector-light.webp",alt:"A sheet for picking which source to stream an episode from, showing AniDB and Animepahe results with poster thumbnails."},{src:"/screenshots/stream-selector-dark.webp",srcLight:"/screenshots/stream-selector-light.webp",alt:"A sheet for picking the stream, listing AniDB English and Japanese options."}]},{label:"AppleTV",caption:"Under active development.",landscape:!0,bare:!0,frames:[{src:"/screenshots/tvos.png",alt:"Shirox running on tvOS, showing the Apple TV interface."}]}],it=te.safeMode?st.filter(e=>e.label!=="Player"):st,sr=[{n:"01",kind:"join",title:"TestFlight",tagline:"Public beta, straight from Apple.",url:te.testflight.url,recommended:!0,action:"Join the beta",meta:"~21 MB
1· iOS 15+",icon:"/icons/testflight.jpg"},{n:"02",kind:"pending",title:"App Store",tagline:"The official listing. Release planned soon.",status:"Planned",icon:"/icons/app-store.webp"},{n:"03",kind:"source",title:"AltStore / SideStore",tagline:"Add the source once. Updates arrive on their own.",url:te.github.rawSourceUrl,apps:[{name:"AltStore",icon:"/icons/altstore.jpg"},{name:"SideStore",icon:"/icons/sidestore.jpg"}],deepLinks:[{label:"Add to AltStore",href:te.altstore.url},{label:"Add to SideStore",href:te.sidestore.url}]},{n:"04",kind:"download",title:"Stable IPA",tagline:"Sideload it by hand.",url:Ee.ipaUrl,action:"Download",meta:`${Ee.size} · ${Ee.minOS}`,icon:"/icons/github.jpg"},{n:"05",kind:"download",title:"Nightly",tagline:"Latest build from main. May be unstable.",url:te.nightly.url,action:"Download",icon:"/icons/github.jpg"}],Ze=()=>matchMedia("(prefers-reduced-motion: reduce)").matches,At=e=>{const{top:t,bottom:r}=e.getBoundingClientRect();return t<innerHeight&&r>0};function kt(e,t){const r=new IntersectionObserver(s=>{const i=s.filter(n=>n.isIntersecting).map(n=>n.target);if(i.length){for(const n of i)r.unobserve(n);t(i)}},{rootMargin:"0px 0px -12% 0px"});for(const s of e)r.observe(s);return{destroy:()=>r.disconnect()}}function Qe(e,t=0){if(!(Ze()||At(e)))return e.classList.add("rise"),t&&e.style.setProperty("--delay",`${t}ms`),kt([e],([r])=>r.classList.add("in"))}function Pe(e,t=70){if(Ze())return;const r=[...e.children].filter(s=>!At(s));if(r.length){for(const s of r)s.classList.add("rise");return kt(r,s=>{s.sort((i,n)=>r.indexOf(i)-r.indexOf(n));for(const[i,n]of s.entries())n.style.setProperty("--delay",`${i*t}ms`),n.classList.add("in")})}}function ir(e,t=5){if(Ze())return;let r=0;const s=i=>{cancelAnimationFrame(r),r=requestAnimationFrame(()=>{const{innerWidth:n,innerHeight:a}=window,l=(i.clientX/n-.5)*2,o=(i.clientY/a-.5)*2;e.style.setProperty("--tilt-y",`${l*t}deg`),e.style.setProperty("--tilt-x",`${-o*(t*.6)}deg`)})};return matchMedia("(pointer: fine)").matches&&window.addEventListener("pointermove",s,{passive:!0}),{destroy(){cancelAnimationFrame(r),window.removeEventListener("pointermove",s)}}}function Ke(e){if(!matchMedia("(pointer: fine)").matches)return;const t=[...e.children];let r=[],s=0;const i=()=>{const c=e.getBoundingClientRect();r=t.map(h=>{const u=h.getBoundingClientRect();return[u.left-c.left,u.top-c.top]})},n=c=>{const h=e.getBoundingClientRect(),u=c.clientX-h.left,f=c.clientY-h.top;for(const[p,m]of t.entries())m.style.setProperty("--gx",`${u-r[p][0]}px`),m.style.setProperty("--gy",`${f-r[p][1]}px`)},a=c=>{i();for(const h of t)h.style.setProperty("--glow-track","0s");n(c),requestAnimationFrame(()=>{for(const h of t)h.style.removeProperty("--glow-track")})},l=c=>{cancelAnimationFrame(s),s=requestAnimationFrame(()=>n(c))},o=new ResizeObserver(i);return o.observe(e),e.addEventListener("pointerenter",a),e.addEventListener("pointermove",l,{passive:!0}),{destroy(){cancelAnimationFrame(s),o.disconnect(),e.removeEventListener("pointerenter",a),e.removeEventListener("pointermove",l)}}}function qe(e,t){const r=()=>t(!0),s=()=>t(!1);return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",s),{destroy(){e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",s)}}}function Ft(e,t){const r=new IntersectionObserver(([s])=>t(s.isIntersecting),{threshold:.3});return r.observe(e),{destroy:()=>r.disconnect()}}function nr(e,t,r=40){let s=0,i=!1;const n=o=>{o.pointerType!=="mouse"&&(s=o.clientX,i=!0)},a=o=>{if(!i)return;i=!1;const c=o.clientX-s;Math.abs(c)>r&&t(c<0?1:-1)},l=()=>i=!1;return e.addEventListener("pointerdown",n,{passive:!0}),e.addEventListener("pointerup",a,{passive:!0}),e.addEventListener("pointercancel",l,{passive:!0}),{destroy(){e.removeEventListener("pointerdown",n),e.removeEventListener("pointerup",a),e.removeEventListener("pointercancel",l)}}}function ar(e){let t=0;const r=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{const s=document.documentElement.scrollHeight-innerHeight;e.style.setProperty("--progress",s>0?`${scrollY/s}`:"0")})};return r(),addEventListener("scroll",r,{passive:!0}),addEventListener("resize",r,{passive:!0}),{destroy(){cancelAnimationFrame(t),removeEventListener("scroll",r),removeEventListener("resize",r)}}}var nt=new Set;function Je(e){const t=()=>{let r;try{r=new URL(e.href).origin}catch{return}if(!r.startsWith("http")||nt.has(r))return;nt.add(r);const s=document.createElement("link");
1s.rel="preconnect",s.href=r,document.head.appendChild(s)};return e.addEventListener("pointerenter",t),{destroy(){e.removeEventListener("pointerenter",t)}}}var lr=O('<span class="inline-block"> </span> ',1),or=O("<h2></h2>");function et(e,t){de(t,!0);let r=se(t,"class",3,"");const s=K(()=>t.text.split(" "));var i=or();pe(i,21,()=>d(s),St,(n,a)=>{var l=lr(),o=ae(l),c=_(o,!0);y(o);var h=M(o,1,!0);h.nodeValue=" ",D(()=>W(c,d(a))),L(n,l)}),y(i),H(i,(n,a)=>Pe?.(n,a),()=>45),D(()=>{N(i,"id",t.id),re(i,1,Xe(r()))}),L(e,i),fe()}var hr=O('<article class="card glow relative overflow-hidden rounded-2xl p-7 md:p-8 svelte-1dpem8h"><h3 class="text-[1.25rem] font-medium tracking-tight md:text-[1.375rem]"> </h3> <p class="mt-3 text-[0.9375rem] leading-relaxed" style="color: var(--muted); text-wrap: pretty;"> </p></article>'),cr=O('<section id="features" class="mx-auto max-w-5xl px-6 py-24 md:py-32" aria-labelledby="features-heading"><!> <p class="mt-5 max-w-[38ch] text-[1.0625rem]" style="color: var(--muted); text-wrap: pretty;"> </p> <div class="glow-field mt-12 grid gap-4 sm:grid-cols-2 md:mt-16 lg:grid-cols-3"></div></section>');function dr(e,t){de(t,!0);var r=cr(),s=_(r);et(s,{id:"features-heading",get text(){return Me.features.title},class:"display text-[clamp(2.25rem,5.4vw,3.5rem)]"});var i=M(s,2),n=_(i,!0);y(i),H(i,(l,o)=>Qe?.(l,o),()=>70);var a=M(i,2);pe(a,21,()=>rr,l=>l.title,(l,o)=>{var c=hr(),h=_(c),u=_(h,!0);y(h);var f=M(h,2),p=_(f,!0);y(f),y(c),D(()=>{W(u,d(o).title),W(p,d(o).body)}),L(l,c)}),y(a),H(a,(l,o)=>Pe?.(l,o),()=>70),H(a,l=>Ke?.(l)),y(r),D(()=>W(n,Me.features.sub)),L(e,r),fe()}var fr=O('<a target="_blank" rel="noreferrer" class="ul transition-colors hover:text-(--fg)" style="color: var(--muted);"> </a>'),ur=O('<footer class="border-t backdrop-blur-xl" style="border-color: var(--rule); background: var(--glass);"><div class="mx-auto flex max-w-5xl flex-col gap-6 px-6 py-10 sm:flex-row sm:items-center sm:justify-between"><p class="flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[0.8125rem]"><span style="color: var(--muted);"> <a target="_blank" rel="noreferrer" class="ul">xibrox</a> · <a target="_blank" rel="noreferrer" class="ul"> </a></span></p> <nav aria-label="Elsewhere" class="flex gap-6 text-[0.8125rem]"></nav></div></footer>');function pr(e,t){de(t,!0);const r=[{label:"GitHub",href:ue.github},{label:"Discord",href:ue.discord},{label:"Ko-fi",href:ue.kofi}];var s=ur(),i=_(s),n=_(i),a=_(n),l=_(a),o=M(l),c=M(o,2),h=_(c,!0);y(c),y(a),y(n);var u=M(n,2);pe(u,21,()=>r,f=>f.label,(f,p)=>{var m=fr(),g=_(m,!0);y(m),D(()=>{N(m,"href",d(p).href),W(g,d(p).label)}),L(f,m)}),y(u),y(i),y(s),D(()=>{W(l,`Shirox ${rt.year??""} · by `),N(o,"href",ue.author),N(c,"href",ue.license),W(h,rt.licenseLabel)}),L(e,s),fe()}var gr=Et('<svg viewBox="0 0 1024 1024" fill="currentColor" aria-hidden="true"><g><path d="M447 106 L537 122 L505 245 L406 245 Z"></path><rect x="200" y="245" width="625" height="75"></rect><rect x="200" y="245" width="85" height="670"></rect><rect x="740" y="245" width="85" height="670"></rect><rect x="285" y="500" width="455" height="75"></rect><rect x="285" y="775" width="455" height="80"></rect></g></svg>');function Ct(e,t){let r=se(t,"class",3,""),s=se(t,"draw",3,!1);var i=gr(),n=_(i);y(i),D(()=>{re(i,0,Xe(r())),re(n,0,Xe(s()?"load-stroke":""))}),L(e,i)}var at=O('<span class="load-rise inline-block"> </span> ',1),mr=O('<section class="mx-auto max-w-5xl px-6 pt-24 pb-12 sm:pt-32 md:pt-44 md:pb-16"><!> <h1 class="display mt-8 lg:mt-9 text-[clamp(2.5rem,7.6vw,5.25rem)] md:mt-12"><!> <span class="block"></span></h1> <p class="load-rise mt-8 max-w-[46ch] text-[1.0625rem] leading-relaxed md:text-lg" style="--base: 400ms; color: var(--muted); text-wrap: pretty"> </p> <div class="load-rise mt-10 flex items-center gap-7" style="--base: 470ms"><a href="#install" class="cta press rounded-full px-6 py-3 text-[0.9375rem] font-medium" style="background: var(--color-accent); color: var(--color-paper);">Install</a> <a target="_blank" rel="noreferrer" class="ul text-[0.9375rem] transition-colors hover:text-(--fg)" style="color: var(--muted)">Source</a></div> <p class="mono load-rise mt-9 text-[0.8125rem]" style="--base: 530ms; color: var(--muted)"> </p></section>');function vr(e,t){de(t,!0);const r=Re.headline.split(" "),s=Re.headlineAccent.split(" ");var i=mr(),n=_(i);Ct(n,{draw:!0,class:"load-rise h-12 lg:h-25 w-12 lg:w-25 transition-transform duration-500 hover:-rotate-6"});var a=M(n,2),l=_(a);pe(l,18,()=>r,g=>g,(g,v,x)=>{var F=at(),b=ae(F),S=_(b,!0);y(b);var w=M(b,1,!0);w.nodeValue=" ",D(()=>{be(b,`--i: ${d(x)??""}; --base: 130ms; --step: 42ms`),W(S,v)}),L(g,F)});var o=M(l,2);pe(o,22,()=>s,g=>g,(g,v,x)=>{var F=at(),b=ae(F),S=_(b,!0);y(b);var w=M(b,1,!0);w.nodeValue=" ",D(()=>{be(b,`--i: ${r.length+d(x)}; --base: 130ms; --step: 42ms; color: var(--muted)`),W(S,v)}),L(g,F)}),y(o),y(a);var c=M(a,2),h=_(c,!0);y(c);var u=M(c,2),f=M(_(u),2);H(f,g=>Je?.(g)),y(u);var p=M(u,2),m=_(p,!0);y(p),y(i),D(()=>{W(h,Re.sub),N(f,"href",ue.github),W(m,Re.meta)}),L(e,i),fe()}var xr=O('<div class="flex items-center gap-1 rounded-xl py-1 pr-1 pl-3.5" style="background: var(--sunken);"><code class="url mono no-scrollbar min-w-0 flex-1 overflow-x-auto py-1.5 text-[0.6875rem] whitespace-nowrap sm:text-[0.75rem] svelte-1j960j"> </code> <button type="button"><span class="faces svelte-1j960j" aria-hidden="true"><span> </span> <span><svg class="h-3 w-3" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.8"><path class="check svelte-1j960j" d="M1.5 6.5 4.5 9.5 10.5 2.5" stroke-linecap="round" stroke-linejoin="round"></path></svg> </span> <span> </span></span></button></div>
1 <span class="sr-only" aria-live="polite"> </span>',1);function yr(e,t){const r=Pt();de(t,!0);let s=G("idle"),i,n=G(void 0);const a={idle:"Copy",copied:"Copied",manual:"âC"},l={idle:"Copy URL",copied:"Copied",manual:"Copy failed â press Command C"},o={idle:"",copied:"Copied to clipboard",manual:"Copy failed â the URL is selected, press Command C"};function c(){const k=document.getElementById(r);if(!k)return;const Z=document.createRange();Z.selectNodeContents(k);const U=getSelection();U?.removeAllRanges(),U?.addRange(Z)}function h(){matchMedia("(prefers-reduced-motion: reduce)").matches||d(n)?.animate([{scale:"1"},{scale:"1.055",offset:.32},{scale:"1"}],{duration:420,easing:"cubic-bezier(0.16, 1, 0.3, 1)"})}async function u(){clearTimeout(i);try{await navigator.clipboard.writeText(t.value),P(s,"copied"),h()}catch{P(s,"manual"),c()}i=setTimeout(()=>P(s,"idle"),2400)}var f=xr(),p=ae(f),m=_(p),g=_(m,!0);y(m);var v=M(m,2);let x;var F=_(v),b=_(F);let S;var w=_(b,!0);y(b);var A=M(b,2);let C;var R=M(_(A));y(A);var I=M(A,2);let B;var j=_(I,!0);y(I),y(F),y(v),Oe(v,k=>P(n,k),()=>d(n)),y(p);var q=M(p,2),V=_(q,!0);y(q),D(()=>{N(m,"id",r),W(g,t.value),N(v,"aria-label",l[d(s)]),x=re(v,1,"copy press grid shrink-0 rounded-lg px-3 py-2 text-[0.8125rem] font-medium svelte-1j960j",null,x,{copied:d(s)==="copied"}),S=re(b,1,"face svelte-1j960j",null,S,{on:d(s)==="idle"}),W(w,a.idle),C=re(A,1,"face svelte-1j960j",null,C,{on:d(s)==="copied"}),W(R,` ${a.copied??""}`),B=re(I,1,"face svelte-1j960j",null,B,{on:d(s)==="manual"}),W(j,a.manual),W(V,o[d(s)])}),ze("click",v,u),L(e,f),fe()}He(["click"]);var lt=O('<span class="edge svelte-1yoj9db" aria-hidden="true"></span>'),br=O('<span aria-hidden="true">/</span>'),_r=O('<!><span role="presentation"> </span>',1),wr=O('<div class="relative h-[29px] w-[29px] shrink-0 overflow-hidden" style="border-radius: 8px; corner-shape: squircle;"><img alt="" aria-hidden="true" class="absolute inset-0 h-full w-full object-cover svelte-1yoj9db"/> <img alt="" aria-hidden="true" class="absolute inset-0 h-full w-full object-cover svelte-1yoj9db"/></div> <h3 class="text-[1.5rem] font-medium tracking-tight md:text-[1.875rem]"></h3>',1),Er=O('<img alt="" aria-hidden="true" class="h-[29px] w-[29px] shrink-0 object-cover svelte-1yoj9db" style="border-radius: 8px; corner-shape: squircle;"/>'),Mr=O('<!> <h3 class="text-[1.5rem] font-medium tracking-tight md:text-[1.875rem]"> </h3>',1),Sr=O('<span class="mono rounded-full px-2.5 py-1 text-[0.6875rem] tracking-[0.12em] uppercase" style="background: var(--color-accent); color: var(--color-paper);">Recommended</span>'),Ar=O('<a class="group/link inline-flex items-center gap-2 text-[0.9375rem] font-medium"><span class="ul"> </span></a>'),kr=O('<div class="mt-5 flex flex-wrap items-center gap-x-6 gap-y-2"><!> <span class="text-[0.8125rem]" style="color: var(--muted);">on device</span></div>'),Fr=O('<article><!> <div class="flex flex-wrap items-center gap-x-4 gap-y-3"><!> <!></div> <p class="mt-3 max-w-[46ch] text-[1rem] leading-relaxed" style="color: var(--muted);"> </p> <div class="mt-8 max-w-152"><!></div> <!></article>'),Cr=O('<img alt="" aria-hidden="true" class="h-[25px] w-[25px] shrink-0 object-cover svelte-1yoj9db" style="border-radius: 7px; corner-shape: squircle;"/>'),Lr=O('<span class="mono rounded-full px-2 py-0.5 text-[0.625rem] tracking-[0.12em] uppercase" style="background: var(--color-accent); color: var(--color-paper);">Recommended</span>'),Rr=O('<span class="text-[0.9375rem] font-medium" style="color: var(--muted);"> </span>'),Tr=Et('<svg class="mt-0.5 h-3 w-3 transition-transform duration-300 ease-out group-hover/link:translate-y-0.5" viewB
1ox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 1v8M2.5 5.5 6 9l3.5-3.5"></path></svg>'),zr=O('<span class="mono text-[0.8125rem]" style="color: var(--muted);"> </span>'),Or=O('<a target="_blank" rel="noreferrer" class="group/link inline-flex items-center gap-2 text-[0.9375rem] font-medium"><span class="ul"> </span> <!></a> <!>',1),Ir=O('<article><!> <div class="flex items-center gap-2.5"><!> <h3 class="text-[1.25rem] font-medium tracking-tight md:text-[1.375rem]"> </h3> <!></div> <p class="mt-3 text-[0.9375rem] leading-relaxed" style="color: var(--muted);"> </p> <div class="mt-7 flex flex-wrap items-center gap-x-5 gap-y-2"><!></div></article>'),Pr=O('<section id="install" class="mx-auto max-w-5xl px-6 py-24 md:py-32" style="scroll-margin-top: 6rem;" aria-labelledby="install-heading"><!> <p class="mt-5 max-w-[38ch] text-[1.0625rem]" style="color: var(--muted); text-wrap: pretty;"> </p> <div class="glow-field mt-12 grid gap-4 md:mt-16 md:grid-cols-2"></div></section>');function Br(e,t){de(t,!0);let r=G(null);const s=K(()=>d(r)===0?[100,100]:d(r)===1?[0,0]:[70,30]);var i=Pr(),n=_(i);et(n,{id:"install-heading",get text(){return Me.install.title},class:"display text-[clamp(2.25rem,5.4vw,3.5rem)]"});var a=M(n,2),l=_(a,!0);y(a),H(a,(c,h)=>Qe?.(c,h),()=>70);var o=M(a,2);pe(o,21,()=>sr,c=>c.title,(c,h)=>{var u=Ge(),f=ae(u),p=g=>{var v=Fr();let x;var F=_(v),b=U=>{var T=lt();L(U,T)};ne(F,U=>{d(h).recommended&&U(b)});var S=M(F,2),w=_(S),A=U=>{var T=wr(),X=ae(T),$=_(X),Q=M($,2);y(X);var ie=M(X,2);pe(ie,23,()=>d(h).apps,J=>J.name,(J,E,z)=>{var ee=_r(),Y=ae(ee),le=he=>{var ge=br();L(he,ge)};ne(Y,he=>{d(z)>0&&he(le)});var oe=M(Y),_e=_(oe,!0);y(oe),D(()=>W(_e,d(E).name)),ye("mouseenter",oe,()=>P(r,d(z),!0)),ye("mouseleave",oe,()=>P(r,null)),L(J,ee)}),y(ie),D(()=>{N($,"src",d(h).apps[0].icon),be($,`clip-path: polygon(0 0, ${d(s)[0]??""}% 0, ${d(s)[1]??""}% 100%, 0 100%);`),N(Q,"src",d(h).apps[1].icon),be(Q,`clip-path: polygon( 2 ${d(s)[0]??""}% 0, 3 100% 0, 4 100% 100%, 5 ${d(s)[1]??""}% 100% 6 );`)}),L(U,T)},C=U=>
6{var T=Mr(),X=ae(T),$=J=>{var E=Er();D(()=>N(E,"src",d(h).icon)),L(J,E)};ne(X,J=>{d(h).icon&&J($)});var Q=M(X,2),ie=_(Q,!0);y(Q),D(()=>W(ie,d(h).title)),L(U,T)};ne(w,U=>{d(h).apps?U(A):U(C,-1)});var R=M(w,2),I=U=>{var T=Sr();L(U,T)};ne(R,U=>{d(h).recommended&&U(I)}),y(S);var B=M(S,2),j=_(B,!0);y(B);var q=M(B,2),V=_(q);{let U=K(()=>d(h).url??"");yr(V,{get value(){return d(U)}})}y(q);var k=M(q,2),Z=U=>{var T=kr(),X=_(T);pe(X,19,()=>d(h).deepLinks,$=>$.label,($,Q,ie)=>{var J=Ar(),E=_(J),z=_(E,!0);y(E),y(J),D(()=>{N(J,"href",d(Q).href),W(z,d(Q).label)}),ye("mouseenter",J,()=>P(r,d(ie),!0)),ye("mouseleave",J,()=>P(r,null)),L($,J)}),We(2),y(T),L(U,T)};ne(k,U=>{d(h).deepLinks&&U(Z)}),y(v),D(()=>{x=re(v,1,"card lead glow relative overflow-hidden rounded-2xl p-7 md:col-span-2 md:p-10 svelte-1yoj9db",null,x,{recommended:d(h).recommended}),W(j,d(h).tagline)}),L(g,v)},m=g=>{var v=Ir();let x;var F=_(v),b=T=>{var X=lt();L(T,X)};ne(F,T=>{d(h).recommended&&T(b)});var S=M(F,2),w=_(S),A=T=>{var X=Cr();D(()=>N(X,"src",d(h).icon)),L(T,X)};ne(w,T=>{d(h).icon&&T(A)});var C=M(w,2),R=_(C,!0);y(C);var I=M(C,2),B=T=>{var X=Lr();L(T,X)};ne(I,T=>{d(h).recommended&&T(B)}),y(S);var j=M(S,2),q=_(j,!0);y(j);var V=M(j,2),k=_(V),Z=T=>{var X=Rr(),$=_(X,!0);y(X),D(()=>W($,d(h).status)),L(T,X)},U=T=>{var X=Or(),$=ae(X),Q=_($),ie=_(Q,!0);y(Q);var J=M(Q,2),E=Y=>{var le=Tr();L(Y,le)};ne(J,Y=>{d(h).kind!=="join"&&Y(E)}),y($),H($,Y=>Je?.(Y));var z=M($,2),ee=Y=>{var le=zr(),oe=_(le,!0);y(le),D(()=>W(oe,d(h).meta)),L(Y,le)};ne(z,Y=>{d(h).meta&&Y(ee)}),D(()=>{N($,"href",d(h).url),W(ie,d(h).action)}),L(T,X)};ne(k,T=>{d(h).kind==="pending"?T(Z):T(U,-1)}),y(V),y(v),D(()=>{x=re(v,1,"card glow relative flex flex-col overflow-hidden rounded-2xl p-7 md:p-8 svelte-1yoj9db",null,x,{recommended:d(h).recommended}),W(R,d(h).title),W(q,d(h).tagline)}),L(g,v)};ne(f,g=>{d(h).kind==="source"?g(p):g(m,-1)}),L(c,u)}),y(o),H(o,(c,h)=>Pe?.(c,h),()=>80),H(o,c=>Ke?.(c)),y(i),D(()=>W(l,Me.install.sub)),L(e,i),fe()}var Lt="shirox-theme",qr={light:"#fafaf9",dark:"#0b0b0c"},Te=G("light");function Dr(){try{const e=localStorage.getItem(Lt);return e==="dark"||e==="light"?e:null}catch{return null}}function ot(e,t=!0){if(P(Te,e,!0),e==="dark"?document.documentElement.dataset.theme="dark":delete document.documentElement.dataset.theme,document.querySelector('meta[name="theme-color"]')?.setAttribute("content",qr[e]),!!t)try{localStorage.setItem(Lt,e)}catch{}}var ve={get current(){return d(Te)},sync(){P(Te,document.documentElement.dataset.theme==="dark"?"dark":"light",!0)},toggle(){ot(d(Te)==="dark"?"light":"dark")},followSystem(){if(Dr())return()=>{};const e=matchMedia("(prefers-color-scheme: dark)"),t=()=>ot(e.matches?"dark":"light",!1);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}},Ur=O('<button type="button" class="toggle press grid h-10 w-10 shrink-0 place-items-center rounded-full svelte-1cmi4dh"><svg viewBox="0 0 20 20" class="h-5 w-5" aria-hidden="true"><mask id="shirox-moon"><rect x="0" y="0" width="20" height="20" fill="#fff"></rect><circle cx="10" cy="10" r="6" fill="#000"></circle></mask><circle cx="10" cy="10" r="6" fill="currentColor" mask="url(#shirox-moon)"></circle><g stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 1.5v1.6"></path><path d="M10 16.9v1.6"></path><path d="M1.5 10h1.6"></path><path d="M16.9 10h1.6"></path><path d="m4.2 4.2 1.1 1.1"></path><path d="m14.7 14.7 1.1 1.1"></path><path d="m15.8 4.2-1.1 1.1"></path><path d="m5.3 14.7-1.1 1.1"></path></g></svg></button>');function Nr(e,t){de(t,!0),ce(()=>ve.sync()),ce(()=>ve.followSystem());const r=K(()=>ve.current==="dark");var s=Ur(),i=_(s),n=_(i),a=M(_(n));let l;y(n);var o=M(n);let c;var h=M(o);let u;y(i),y(s),D(()=>{N(s,"aria-label",d(r)?"Switch to the light theme":"Switch to the dark theme"),N(s,"aria-pressed",d(r)),N(s,"title",d(r)?"Light theme":"Dark theme"),l=re(a,0,"cutter svelte-1cmi4dh",null,l,{dark:d(r)}),c=re(o,0,"disc svelte-1cmi4dh",null,c,{dark:d(r)}),u=re(h,0,"rays svelte-1cmi4dh",null,u,{dark:d(r)})}),ze("click",s,()=>ve.toggle()),L(e,s),fe()}He(["click"]);var jr=O('<div class="progress fixed inset-x-0 top-0 z-50 hidden h-0.5 sm:block" aria-hidden="true"><div class="h-full origin-left" style="background: var(--color-accent); transform: scaleX(var(--progress, 0));"></div></div> <header class="fixed inset-x-0 top-0 z-50 flex justify-center sm:top-3 sm:px-4 md:top-5"><div class="dock flex w-full items-center gap-1.5 border-b px-4 backdrop-blur-xl sm:w-auto
6sm:rounded-full sm:border sm:py-2 sm:pr-2 sm:pl-4 svelte-1h32yp1" style="border-color: var(--rule); background: var(--glass);"><a href="#top" class="group flex items-center gap-2.5 rounded-full py-2 pr-2" aria-label="Shirox, back to top"><!> <span class="text-[1.0625rem] font-semibold tracking-[-0.02em]">Shirox</span></a> <span class="mx-1.5 hidden h-5 w-px shrink-0 sm:block" style="background: var(--rule);" aria-hidden="true"></span> <nav aria-label="Primary" class="ml-auto flex items-center gap-1 sm:ml-0"><a href="#features" class="link press hidden rounded-full px-4 py-2.5 text-[0.9375rem] sm:block svelte-1h32yp1" style="color: var(--muted);">Features</a> <a target="_blank" rel="noreferrer" class="link press hidden rounded-full px-4 py-2.5 text-[0.9375rem] sm:block svelte-1h32yp1" style="color: var(--muted);">Source</a> <a href="#install" class="cta press rounded-full px-5 py-2.5 text-[0.9375rem] font-medium" style="background: var(--color-accent); color: var(--color-paper);">Install</a></nav> <span class="mx-1.5 hidden h-5 w-px shrink-0 sm:block" style="background: var(--rule);" aria-hidden="true"></span> <!></div></header>',1);function Vr(e,t){de(t,!0);var r=jr(),s=ae(r),i=_(s);H(i,f=>ar?.(f)),y(s);var n=M(s,2),a=_(n),l=_(a),o=_(l);Ct(o,{class:"h-[1.3rem] w-[1.3rem] transition-transform duration-500 group-hover:-rotate-6"}),We(2),y(l);var c=M(l,4),h=M(_(c),2);H(h,f=>Je?.(f)),We(2),y(c);var u=M(c,4);Nr(u,{}),y(a),y(n),D(()=>N(h,"href",ue.github)),L(e,r),fe()}var Wr=O("<div><!></div>");function Xr(e,t){let r=se(t,"landscape",3,!1);var s=Wr();let i;var n=_(s);Nt(n,()=>t.children),y(s),D(()=>i=re(s,1,"frame shrink-0 overflow-hidden svelte-z7lbej",null,i,{landscape:r()})),L(e,s)}var Yr=O('<img decoding="async" draggable="false"/>'),$r=O('<div id="app-screens" role="tabpanel" class="absolute inset-0"></div>'),Gr=O('<span class="segment svelte-9nngpf"><span></span></span>'),Hr=O('<span class="segments svelte-9nngpf"></span>'),Zr=O('<button type="button" role="tab" aria-controls="app-screens" class="tab press mono shrink-0 px-3 py-2.5 text-[0.6875rem] tracking-[0.14em] uppercase svelte-9nngpf"> <span class="track svelte-9nngpf"></span> <!></button>'),Qr=O('<p class="load-rise text-center text-[0.9375rem]" style="color: var(--muted);"> </p>'),Kr=O('<section class="px-6 pb-20 md:pb-28" aria-label="What Shirox looks like"><div class="mx-auto flex max-w-5xl flex-col items-center"><div class="stage svelte-9nngpf"><div class="device load-rise" style="perspective: 1400px; --base: 420ms;"><div class="float"><div class="transition-transform duration-500 ease-out" style="transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));"><!></div></div></div></div> <div role="tablist" aria-label="App screens"></div> <div class="mt-5"><!></div></div></section>');function Jr(e,t){de(t,!0);function r(E){return ve.current==="light"&&E.srcLight?E.srcLight:E.src}let s=G(0),i=G(0),n=G(!1),a=G(!1),l=G(!1),o=G(!1),c=G(!0),h=G(0);const u=1e4;let f=G(!0),p=G(!1),m=G(!1),g=G(!0),v=Mt([]),x=G(void 0);K(()=>d(c)&&!d(f));const F=K(()=>d(n)||d(a)||d(l)||d(o)||!d(p)),b=K(()=>d(g)?it:it.filter(E=>!E.bare));K(()=>!!d(b)[d(s)]?.bare);const S=K(()=>!!d(b)[d(s)]?.landscape&&d(g));function w(E){return!d(g)&&E.narrowFrames?E.narrowFrames:E.frames}const A=K(()=>w(d(b)[d(s)])),C=K(()=>(d(A).length>1||d(c))&&!d(f));ce(()=>{d(s)>=d(b).length&&(P(s,0),P(i,0))}),ce(()=>{d(i)>=d(A).length&&P(i,0)});function R(){d(i)+1<d(A).length?P(i,d(i)+1):d(c)?B(d(s)+1):P(i,0)}ce(()=>{P(f,matchMedia("(prefers-reduced-motion: reduce)").matches,!0)}),ce(()=>{if(d(h),d(c))return;const E=setTimeout(()=>P(c,!0),u);return()=>clearTimeout(E)}),ce(()=>{const E=matchMedia("(min-width: 44rem)"),z=()=>P(g,E.matches,!0);return z(),E.addEventListener("change",z),()=>E.removeEventListener("change",z)}),ce(()=>{if(!d(x))return;const E=d(x),z=new ResizeObserver(()=>{P(m,E.scrollWidth>E.clientWidth)});return z.observe(E),()=>z.disconnect()}),ce(()=>{const E=v[d(s)];!E||!d(x)||d(x).scrollWidth<=d(x).clientWidth||d(x).scrollTo({left:E.offsetLeft-(d(x).clientWidth-E.offsetWidth)/2,behavior:d(f)?"auto":"smooth"})});function I(E){const z=d(b).length;return(E%z+z)%z}function B(E,z=!1){P(s,I(E),!0),P(i,0),z&&(P(c,!1),P(h,Date.now(),!0))}function j(E){const z={ArrowRight:d(s)+1,ArrowLeft:d(s)-1,Home:0,End:d(b).length-1}[E.key];z!==void 0&&(E.preventDefault(),B(z,!0),v[I(z)]?.focus())}var q=Kr(),V=_(q),k=_(V),Z=_(k),U=_(Z),T=_(U),X=_(T);Xr(X,{get landscape(){return d(S)},children:(E,z)=>{var ee=$r();pe(ee,23,()=>d(b),Y=>Y.label,(Y,le,oe)=>{var _e=Ge(),he=ae(_e);pe(he,19,()=>w(d(le)),ge=>ge.src,(ge,Le,Se)=>{var me=Yr();let we;D(Ae=>{N(me,"src",Ae),N(me,"alt",d(Le).alt),N(me,"aria-hidden",!(d(s)===d(oe)&&d(i)===d(Se))),N(me,"loading",d(oe)===0&&d(Se)===0?"eager":"lazy"),we=re(me,1,"screen svelte-9nngpf",null,we,{contain:d(le).bare}),be(me,`opacity: ${d(s)===d(oe)&&d(i)===d(Se)?1:0}; transform: scale(${d(s)===d(oe)&&d(i)===d(Se)?1:1.015});`)},[()=>r(d(Le))]),L(ge,me)}),L(Y,_e)}),y(ee),D(()=>N(ee,"aria-labelledby",`tab-${d(s)??""}`)),L(E,ee)},$$slots:{default:!0}}),y(T),H(T,E=>ir?.(E)),H(T,(E,z)=>nr?.(E,z),()=>E=>B(d(s)+E,!0)),H(T,(E,z)=>qe?.(E,z),()=>E=>P(n,E,!0)),y(U),y(Z),y(k),H(k,(E,z)=>Ft?.(E,z),()=>E=>P(p,E,!0));var $=M(k,2);let Q;pe($,23,()=>d(b),E=>E.label,(E,z,ee)=>{var Y=Zr(),le=_(Y),oe=M(le,3),_e=he=>{var ge=Hr();pe(ge,21,()=>w(d(z)),St,(Le,Se,me)=>{var we=Gr(),Ae=_(we);let tt;y(we),D(()=>{tt=re(Ae,1,"fill svelte-9nngpf",null,tt,{cycling:d(C)&&d(i)===me,filled:d(i)>me}),be(Ae,`animation-play-state: ${d(F)?"paused":"running"};`)}),ye("animationend",Ae,R),L(Le,we)}),y(ge),L(he,ge)};ne(oe,he=>{d(s)===d(ee)&&he(_e)}),y(Y),Oe(Y,(he,ge)=>v[ge]=he,he=>v?.[he],()=>[d(ee)]),D(()=>{N(Y,"id",`tab-${d(ee)??""}`),N(Y,"aria-selected",d(s)===d(ee)),N(Y,"tabindex",d(s)===d(ee)?0:-1),W(le,`${d(z).label??""} `)}),ze("click",Y,()=>B(d(ee),!0)),ze("keydown",Y,j),ye("focus",Y,()=>P(o,!0)),ye("blur",Y,()=>P(o,!1)),L(E,Y)}
6),y($),Oe($,E=>P(x,E),()=>d(x)),H($,(E,z)=>qe?.(E,z),()=>E=>P(a,E,!0));var ie=M($,2),J=_(ie);Yt(J,()=>d(s),E=>{var z=Qr(),ee=_(z,!0);y(z),D(()=>W(ee,d(b)[d(s)]?.caption)),L(E,z)}),y(ie),H(ie,(E,z)=>qe?.(E,z),()=>E=>P(l,E,!0)),y(V),y(q),D(()=>Q=re($,1,"no-scrollbar mt-8 flex max-w-full gap-1 overflow-x-auto svelte-9nngpf",null,Q,{faded:d(m)})),L(e,q),fe()}He(["click","keydown"]);function Ce(e){let t=e[0],r=e[1],s=e[2];return Math.sqrt(t*t+r*r+s*s)}function Ye(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function es(e,t,r,s){return e[0]=t,e[1]=r,e[2]=s,e}function ht(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function ct(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function ts(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function rs(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function De(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function ss(e,t){let r=t[0]-e[0],s=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+s*s+i*i)}function is(e,t){let r=t[0]-e[0],s=t[1]-e[1],i=t[2]-e[2];return r*r+s*s+i*i}function dt(e){let t=e[0],r=e[1],s=e[2];return t*t+r*r+s*s}function ns(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function as(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function $e(e,t){let r=t[0],s=t[1],i=t[2],n=r*r+s*s+i*i;return n>0&&(n=1/Math.sqrt(n)),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function Rt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ft(e,t,r){let s=t[0],i=t[1],n=t[2],a=r[0],l=r[1],o=r[2];return e[0]=i*o-n*l,e[1]=n*a-s*o,e[2]=s*l-i*a,e}function ls(e,t,r,s){let i=t[0],n=t[1],a=t[2];return e[0]=i+s*(r[0]-i),e[1]=n+s*(r[1]-n),e[2]=a+s*(r[2]-a),e}function os(e,t,r,s,i){const n=Math.exp(-s*i);let a=t[0],l=t[1],o=t[2];return e[0]=r[0]+(a-r[0])*n,e[1]=r[1]+(l-r[1])*n,e[2]=r[2]+(o-r[2])*n,e}function hs(e,t,r){let s=t[0],i=t[1],n=t[2],a=r[3]*s+r[7]*i+r[11]*n+r[15];return a=a||1,e[0]=(r[0]*s+r[4]*i+r[8]*n+r[12])/a,e[1]=(r[1]*s+r[5]*i+r[9]*n+r[13])/a,e[2]=(r[2]*s+r[6]*i+r[10]*n+r[14])/a,e}function cs(e,t,r){let s=t[0],i=t[1],n=t[2],a=r[3]*s+r[7]*i+r[11]*n+r[15];return a=a||1,e[0]=(r[0]*s+r[4]*i+r[8]*n)/a,e[1]=(r[1]*s+r[5]*i+r[9]*n)/a,e[2]=(r[2]*s+r[6]*i+r[10]*n)/a,e}function ds(e,t,r){let s=t[0],i=t[1],n=t[2];return e[0]=s*r[0]+i*r[3]+n*r[6],e[1]=s*r[1]+i*r[4]+n*r[7],e[2]=s*r[2]+i*r[5]+n*r[8],e}function fs(e,t,r){let s=t[0],i=t[1],n=t[2],a=r[0],l=r[1],o=r[2],c=r[3],h=l*n-o*i,u=o*s-a*n,f=a*i-l*s,p=l*f-o*u,m=o*h-a*f,g=a*u-l*h,v=c*2;return h*=v,u*=v,f*=v,p*=2,m*=2,g*=2,e[0]=s+h+p,e[1]=i+u+m,e[2]=n+f+g,e}var us=(function(){const e=[0,0,0],t=[0,0,0];return function(r,s){Ye(e,r),Ye(t,s),$e(e,e),$e(t,t);let i=Rt(e,t);return i>1?0:i<-1?Math.PI:Math.acos(i)}})();function ps(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}var xe=class Tt extends Array{constructor(t=0,r=t,s=t){return super(t,r,s),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,r=t,s=t){return t.length?this.copy(t):(es(this,t,r,s),this)}copy(t){return Ye(this,t),this}add(t,r){return r?ht(this,t,r):ht(this,this,t),this}sub(t,r){return r?ct(this,t,r):ct(this,this,t),this}multiply(t){return t.length?ts(this,this,t):De(this,this,t),this}divide(t){return t.length?rs(this,this,t):De(this,this,1/t),this}inverse(t=this){return as(this,t),this}len(){return Ce(this)}distance(t){return t?ss(this,t):Ce(this)}squaredLen(){return dt(this)}squaredDistance(t){return t?is(this,t):dt(this)}negate(t=this){return ns(this,t),this}cross(t,r){return r?ft(this,t,r):ft(this,this,t),this}scale(t){return De(this,this,t),this}normalize(){return $e(this,this),this}dot(t){return Rt(this,t)}equals(t){return ps(this,t)}
6applyMatrix3(t){return ds(this,this,t),this}applyMatrix4(t){return hs(this,this,t),this}scaleRotateMatrix4(t){return cs(this,this,t),this}applyQuaternion(t){return fs(this,this,t),this}angle(t){return us(this,t)}lerp(t,r){return ls(this,this,t,r),this}smoothLerp(t,r,s){return os(this,this,t,r,s),this}clone(){return new Tt(this[0],this[1],this[2])}fromArray(t,r=0){return this[0]=t[r],this[1]=t[r+1],this[2]=t[r+2],this}toArray(t=[],r=0){return t[r]=this[0],t[r+1]=this[1],t[r+2]=this[2],t}transformDirection(t){const r=this[0],s=this[1],i=this[2];return this[0]=t[0]*r+t[4]*s+t[8]*i,this[1]=t[1]*r+t[5]*s+t[9]*i,this[2]=t[2]*r+t[6]*s+t[10]*i,this.normalize()}},ut=new xe,gs=1,ms=1,pt=!1,vs=class{constructor(e,t={}){e.canvas,this.gl=e,this.attributes=t,this.id=gs++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let r in t)this.addAttribute(r,t[r])}addAttribute(e,t){if(this.attributes[e]=t,t.id=ms++,t.size=t.size||1,t.type=t.type||(t.data.constructor===Float32Array?this.gl.FLOAT:t.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),t.target=e==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,t.normalized=t.normalized||!1,t.stride=t.stride||0,t.offset=t.offset||0,t.count=t.count||(t.stride?t.data.byteLength/t.stride:t.data.length/t.size),t.divisor=t.instanced||0,t.needsUpdate=!1,t.usage=t.usage||this.gl.STATIC_DRAW,t.buffer||this.updateAttribute(t),t.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==t.count*t.divisor)return this.instancedCount=Math.min(this.instancedCount,t.count*t.divisor);this.instancedCount=t.count*t.divisor}else e==="index"?this.drawRange.count=t.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,t.count))}updateAttribute(e){const t=!e.buffer;t&&(e.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==e.buffer&&(this.gl.bindBuffer(e.target,e.buffer),this.glState.boundBuffer=e.buffer),t?this.gl.bufferData(e.target,e.data,e.usage):this.gl.bufferSubData(e.target,0,e.data),e.needsUpdate=!1}setIndex(e){this.addAttribute("index",e)}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}setInstancedCount(e){this.instancedCount=e}createVAO(e){this.VAOs[e.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.bindAttributes(e)}bindAttributes(e){e.attributeLocations.forEach((t,{name:r,type:s})=>{if(!this.attributes[r])return;const i=this.attributes[r];this.gl.bindBuffer(i.target,i.buffer),this.glState.boundBuffer=i.buffer;let n=1;s===35674&&(n=2),s===35675&&(n=3),s===35676&&(n=4);const a=i.size/n,l=n===1?0:n*n*4,o=n===1?0:n*4;for(let c=0;c<n;c++)this.gl.vertexAttribPointer(t+c,a,i.type,i.normalized,i.stride+l,i.offset+c*o),this.gl.enableVertexAttribArray(t+c),this.gl.renderer.vertexAttribDivisor(t+c,i.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:e,mode:t=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${e.attributeOrder}`&&(this.VAOs[e.attributeOrder]||this.createVAO(e),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${e.attributeOrder}`),e.attributeLocations.forEach((s,{name:i})=>{const n=this.attributes[i];n.needsUpdate&&this.updateAttribute(n)});let r=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(r=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(t,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r,this.instancedCount):this.gl.renderer.drawArraysInstanced(t,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(t,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r):this.gl.drawArrays(t,this.drawRange.start,this.drawRange.count)}getPosition(){const e=this.attributes.position;if(e.data)return e;if(!pt)return pt=!0}computeBoundingBox(e){e||(e=this.getPosition());const t=e.data,r=e.size;this.bounds||(this.bounds={min:new xe,max:new xe,center:new xe,scale:new xe,radiu
6s:1/0});const s=this.bounds.min,i=this.bounds.max,n=this.bounds.center,a=this.bounds.scale;s.set(1/0),i.set(-1/0);for(let l=0,o=t.length;l<o;l+=r){const c=t[l],h=t[l+1],u=t[l+2];s.x=Math.min(c,s.x),s.y=Math.min(h,s.y),s.z=Math.min(u,s.z),i.x=Math.max(c,i.x),i.y=Math.max(h,i.y),i.z=Math.max(u,i.z)}a.sub(i,s),n.add(s,i).divide(2)}computeBoundingSphere(e){e||(e=this.getPosition());const t=e.data,r=e.size;this.bounds||this.computeBoundingBox(e);let s=0;for(let i=0,n=t.length;i<n;i+=r)ut.fromArray(t,i),s=Math.max(s,this.bounds.center.squaredDistance(ut));this.bounds.radius=Math.sqrt(s)}remove(){for(let e in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[e]),delete this.VAOs[e];for(let e in this.attributes)this.gl.deleteBuffer(this.attributes[e].buffer),delete this.attributes[e]}},xs=1,gt={},ys=class{constructor(e,{vertex:t,fragment:r,uniforms:s={},transparent:i=!1,cullFace:n=e.BACK,frontFace:a=e.CCW,depthTest:l=!0,depthWrite:o=!0,depthFunc:c=e.LEQUAL}={}){e.canvas,this.gl=e,this.uniforms=s,this.id=xs++,this.transparent=i,this.cullFace=n,this.frontFace=a,this.depthTest=l,this.depthWrite=o,this.depthFunc=c,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=e.createShader(e.VERTEX_SHADER),this.fragmentShader=e.createShader(e.FRAGMENT_SHADER),this.program=e.createProgram(),e.attachShader(this.program,this.vertexShader),e.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:t,fragment:r})}setShaders({vertex:e,fragment:t}){if(e&&(this.gl.shaderSource(this.vertexShader,e),this.gl.compileShader(this.vertexShader),this.gl.getShaderInfoLog(this.vertexShader)),t&&(this.gl.shaderSource(this.fragmentShader,t),this.gl.compileShader(this.fragmentShader),this.gl.getShaderInfoLog(this.fragmentShader)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return;this.uniformLocations=new Map;let r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let n=0;n<r;n++){let a=this.gl.getActiveUniform(this.program,n);this.uniformLocations.set(a,this.gl.getUniformLocation(this.program,a.name));const l=a.name.match(/(\w+)/g);a.uniformName=l[0],a.nameComponents=l.slice(1)}this.attributeLocations=new Map;const s=[],i=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let n=0;n<i;n++){const a=this.gl.getActiveAttrib(this.program,n),l=this.gl.getAttribLocation(this.program,a.name);l!==-1&&(s[l]=a.name,this.attributeLocations.set(a,l))}this.attributeOrder=s.join("")}setBlendFunc(e,t,r,s){this.blendFunc.src=e,this.blendFunc.dst=t,this.blendFunc.srcAlpha=r,this.blendFunc.dstAlpha=s,e&&(this.transparent=!0)}setBlendEquation(e,t){this.blendEquation.modeRGB=e,this.blendEquation.modeAlpha=t}setStencilFunc(e,t,r){this.stencilRef=t,this.stencilFunc.func=e,this.stencilFunc.ref=t,this.stencilFunc.mask=r}setStencilOp(e,t,r){this.stencilOp.stencilFail=e,this.stencilOp.depthFail=t,this.stencilOp.depthPass=r}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:e=!1}={}){let t=-1;this.gl.renderer.state.currentProgram!==this.id&&(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id
6),this.uniformLocations.forEach((r,s)=>{let i=this.uniforms[s.uniformName];for(const n of s.nameComponents){if(!i)break;if(n in i)i=i[n];else{if(Array.isArray(i.value))break;i=void 0;break}}if(!i)return mt(`Active uniform ${s.name} has not been supplied`);if(i&&i.value===void 0)return mt(`${s.name} uniform is missing a value parameter`);if(i.value.texture)return t=t+1,i.value.update(t),Ue(this.gl,s.type,r,t);if(i.value.length&&i.value[0].texture){const n=[];return i.value.forEach(a=>{t=t+1,a.update(t),n.push(t)}),Ue(this.gl,s.type,r,n)}Ue(this.gl,s.type,r,i.value)}),this.applyState(),e&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}};function Ue(e,t,r,s){s=s.length?bs(s):s;const i=e.renderer.state.uniformLocations.get(r);if(s.length)if(i===void 0||i.length!==s.length)e.renderer.state.uniformLocations.set(r,s.slice(0));else{if(_s(i,s))return;i.set?i.set(s):ws(i,s),e.renderer.state.uniformLocations.set(r,i)}else{if(i===s)return;e.renderer.state.uniformLocations.set(r,s)}switch(t){case 5126:return s.length?e.uniform1fv(r,s):e.uniform1f(r,s);case 35664:return e.uniform2fv(r,s);case 35665:return e.uniform3fv(r,s);case 35666:return e.uniform4fv(r,s);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return s.length?e.uniform1iv(r,s):e.uniform1i(r,s);case 35671:case 35667:return e.uniform2iv(r,s);case 35672:case 35668:return e.uniform3iv(r,s);case 35673:case 35669:return e.uniform4iv(r,s);case 35674:return e.uniformMatrix2fv(r,!1,s);case 35675:return e.uniformMatrix3fv(r,!1,s);case 35676:return e.uniformMatrix4fv(r,!1,s)}}function bs(e){const t=e.length,r=e[0].length;if(r===void 0)return e;const s=t*r;let i=gt[s];i||(gt[s]=i=new Float32Array(s));for(let n=0;n<t;n++)i.set(e[n],n*r);return i}function _s(e,t){if(e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(e[r]!==t[r])return!1;return!0}function ws(e,t){for(let r=0,s=e.length;r<s;r++)e[r]=t[r]}var Ne=0;function mt(e){Ne>100||(Ne++,Ne>100)}var je=new xe,Es=1,Ms=class{constructor({canvas:e=document.createElement("canvas"),width:t=300,height:r=150,dpr:s=1,alpha:i=!1,depth:n=!0,stencil:a=!1,antialias:l=!1,premultipliedAlpha:o=!1,preserveDrawingBuffer:c=!1,powerPreference:h="default",autoClear:u=!0,webgl:f=2}={}){const p={alpha:i,depth:n,stencil:a,antialias:l,premultipliedAlpha:o,preserveDrawingBuffer:c,powerPreference:h};this.dpr=s,this.alpha=i,this.color=!0,this.depth=n,this.stencil=a,this.premultipliedAlpha=o,this.autoClear=u,this.id=Es++,f===2&&(this.gl=e.getContext("webgl2",p)),this.isWebgl2=!!this.gl,this.gl||(this.gl=e.getContext("webgl",p)),this.gl,this.gl.renderer=this,this.setSize(t,r),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(e,t){this.width=e,this.height=t,this.gl.canvas.width=e*this.dpr,this.gl.canvas.height=t*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:e+"px",height:t+"px"})}setViewport(e,t,r=0,s=0){this.state.viewport.width===e&&this.state.viewport.height===t||(this.state.viewport.width=e,this.state.viewport.height=t,this.state.viewport.x=r,this.state.viewport.y=s,this.gl.viewport(r,s,e,t))}setScissor(e,t,r=0,s=0){this.gl.scissor(r,s,e,t)}enable(e){this.state[e]!==!0&&(this.gl.enable(e),this.state[e]=!0)}disable(e){this.state[e]!==!1&&(this.gl.disable(e),this.state[e]=!1)}setBlendFunc(e,t,r,s){this.state.blendFunc.src===e&&this.state.blendFunc.dst===t&&this.state.blendFunc.srcAlpha===r&&this.state.blendFunc.dstAlpha===s||(this.state.blendFunc.src=e,this.state.blendFunc.dst=t,this.state.blendFunc.srcAlpha=r,this.state.blendFunc.dstAlpha=s,r!==void 0?this.gl.blendFuncSeparate(e,t,r,s):this.gl.blendFunc(e,t))}setBlendEquation(e,t){e=e||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===e&&this.state.blendEquation.modeAlpha===t)&&(this.state.blendEquation.modeRGB=e,this.state.blendEquation.modeAlpha=t,t!==void 0?this.gl.blendEquationSeparate(e,t):this.gl.blendEquation(e))}setCullFace(e){this.state.cullFace!==e&&(this.state.cullFace=e,this.gl.cullFace(e))}setFrontFace(e){this.state.frontFace!==e&&(this.state.frontFace=e,this.gl.frontFace(e))}setDepthMask(e){this.state.depthMask!==e&&(this.state.depthMask=e,this.gl.depthMask(e))}setDepthFunc(e){this.state.depthFunc!==e&&(this.state.depthFunc=e,this.gl.depthFunc(e))}setStencilMask(e){this.state.stencilMask!==e&&(this.state.stencilMask=e,this.gl.stencilMask(e))}setStencilFunc(e,t,r){this.state.stencilFunc===e&&this.state.stencilRef===t&&this.state.stencilFuncMask===r||(this.state.stencilFunc=e||this.gl.ALWAYS,this.state.stencilRef=t||0,this.state.stencilFuncMask=r||0,this.gl.stencilFunc(e||this.gl.ALWAYS,t||0,r||0))}setStencilOp(e,t,r){this.state.stencilFail===e&&this.state.stencilDepthFail===t&&this.state.stencilDepthPass===r||(this.state.stencilFail=e,this.state.stencilDepthFail=t,this.state.stencilDepthPass=r,this.gl.stencilOp(e,t,r))}activeTexture(e){this.state.activeTextureUnit!==e&&(this.state.activeTextureUnit=e,this.gl.activeTexture(this.gl.TEXTURE0+e))}bindFramebuffer({target:e=this.gl.FRAMEBUFFER,buffer:t=null}={}){this.state.framebuffer!==t&&(this.state.framebuffer=t,this.gl.bindFramebuffer(e,t))}getExtension(e,t,r){return t&&this.gl[t]?this.gl[t].bind(this.gl):(this.extensions[e]||(this.extensions[e]=this.gl.getExtension(e)),t?this.extensions[e]?this.extensions[e][r].bind(this.extensions[e]):null:this.extensions[e])}sortOpaque(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program.id!==t.program.id?e.program.id-t.program.id:e.zDepth!==t.zDepth?e.zDepth-t.zDepth:t.id-e.id}
6sortTransparent(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.zDepth!==t.zDepth?t.zDepth-e.zDepth:t.id-e.id}sortUI(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program.id!==t.program.id?e.program.id-t.program.id:t.id-e.id}getRenderList({scene:e,camera:t,frustumCull:r,sort:s}){let i=[];if(t&&r&&t.updateFrustum(),e.traverse(n=>{if(!n.visible)return!0;n.draw&&(r&&n.frustumCulled&&t&&!t.frustumIntersectsMesh(n)||i.push(n))}),s){const n=[],a=[],l=[];i.forEach(o=>{o.program.transparent?o.program.depthTest?a.push(o):l.push(o):n.push(o),o.zDepth=0,!(o.renderOrder!==0||!o.program.depthTest||!t)&&(o.worldMatrix.getTranslation(je),je.applyMatrix4(t.projectionViewMatrix),o.zDepth=je.z)}),n.sort(this.sortOpaque),a.sort(this.sortTransparent),l.sort(this.sortUI),i=n.concat(a,l)}return i}render({scene:e,camera:t,target:r=null,update:s=!0,sort:i=!0,frustumCull:n=!0,clear:a}){r===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(r),this.setViewport(r.width,r.height)),(a||this.autoClear&&a!==!1)&&(this.depth&&(!r||r.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!r||r.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),s&&e.updateMatrixWorld(),t&&t.updateMatrixWorld(),this.getRenderList({scene:e,camera:t,frustumCull:n,sort:i}).forEach(l=>{l.draw({camera:t})})}};function Ss(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function As(e,t,r,s,i){return e[0]=t,e[1]=r,e[2]=s,e[3]=i,e}function ks(e,t){let r=t[0],s=t[1],i=t[2],n=t[3],a=r*r+s*s+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),e[0]=r*a,e[1]=s*a,e[2]=i*a,e[3]=n*a,e}function Fs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Cs(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function Ls(e,t,r){r=r*.5;let s=Math.sin(r);return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=Math.cos(r),e}function vt(e,t,r){let s=t[0],i=t[1],n=t[2],a=t[3],l=r[0],o=r[1],c=r[2],h=r[3];return e[0]=s*h+a*l+i*c-n*o,e[1]=i*h+a*o+n*l-s*c,e[2]=n*h+a*c+s*o-i*l,e[3]=a*h-s*l-i*o-n*c,e}function Rs(e,t,r){r*=.5;let s=t[0],i=t[1],n=t[2],a=t[3],l=Math.sin(r),o=Math.cos(r);return e[0]=s*o+a*l,e[1]=i*o+n*l,e[2]=n*o-i*l,e[3]=a*o-s*l,e}function Ts(e,t,r){r*=.5;let s=t[0],i=t[1],n=t[2],a=t[3],l=Math.sin(r),o=Math.cos(r);return e[0]=s*o-n*l,e[1]=i*o+a*l,e[2]=n*o+s*l,e[3]=a*o-i*l,e}function zs(e,t,r){r*=.5;let s=t[0],i=t[1],n=t[2],a=t[3],l=Math.sin(r),o=Math.cos(r);return e[0]=s*o+i*l,e[1]=i*o-s*l,e[2]=n*o+a*l,e[3]=a*o-n*l,e}function Os(e,t,r,s){let i=t[0],n=t[1],a=t[2],l=t[3],o=r[0],c=r[1],h=r[2],u=r[3],f,p,m,g,v;return p=i*o+n*c+a*h+l*u,p<0&&(p=-p,o=-o,c=-c,h=-h,u=-u),1-p>1e-6?(f=Math.acos(p),m=Math.sin(f),g=Math.sin((1-s)*f)/m,v=Math.sin(s*f)/m):(g=1-s,v=s),e[0]=g*i+v*o,e[1]=g*n+v*c,e[2]=g*a+v*h,e[3]=g*l+v*u,e}function Is(e,t){let r=t[0],s=t[1],i=t[2],n=t[3],a=r*r+s*s+i*i+n*n,l=a?1/a:0;return e[0]=-r*l,e[1]=-s*l,e[2]=-i*l,e[3]=n*l,e}function Ps(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Bs(e,t){let r=t[0]+t[4]+t[8],s;if(r>0)s=Math.sqrt(r+1),e[3]=.5*s,s=.5/s,e[0]=(t[5]-t[7])*s,e[1]=(t[6]-t[2])*s,e[2]=(t[1]-t[3])*s;else{let i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);let n=(i+1)%3,a=(i+2)%3;s=Math.sqrt(t[i*3+i]-t[n*3+n]-t[a*3+a]+1),e[i]=.5*s,s=.5/s,e[3]=(t[n*3+a]-t[a*3+n])*s,e[n]=(t[n*3+i]+t[i*3+n])*s,e[a]=(t[a*3+i]+t[i*3+a])*s}return e}function qs(e,t,r="YXZ"){let s=Math.sin(t[0]*.5),i=Math.cos(t[0]*.5),n=Math.sin(t[1]*.5),a=Math.cos(t[1]*.5),l=Math.sin(t[2]*.5),o=Math.cos(t[2]*.5);return r==="XYZ"?(e[0]=s*a*o+i*n*l,e[1]=i*n*o-s*a*l,e[2]=i*a*l+s*n*o,e[3]=i*a*o-s*n*l):r==="YXZ"?(e[0]=s*a*o+i*n*l,e[1]=i*n*o-s*a*l,e[2]=i*a*l-s*n*o,e[3]=i*a*o+s*n*l):r==="ZXY"?(e[0]=s*a*o-i*n*l,e[1]=i*n*o+s*a*l,e[2]=i*a*l+s*n*o,e[3]=i*a*o-s*n*l):r==="ZYX"?(e[0]=s*a*o-i*n*l,e[1]=i*n*o+s*a*l,e[2]=i*a*l-s*n*o,e[3]=i*a*o+s*n*l):r==="YZX"?(e[0]=s*a*o+i*n*l,e[1]=i*n*o+s*a*l,e[2]=i*a*l-s*n*o,e[3]=i*a*o-s*n*l):r==="XZY"&&(e[0]=s*a*o-i*n*l,e[1]=i*n*o-s*a*l,e[2]=i*a*l+s*n*o,e[3]=i*a*o+s*n*l),e}var Ds=Ss,Us=As,Ns=Fs,js=ks,Vs=class extends Array{constructor(e=0,t=0,r=0,s=1){super(e,t,r,s),this.onChange=()=>{},this._target=this;const i=["0","1","2","3"];return new Proxy(this,{set(n,a){const l=Reflect.set(...arguments);return l&&i.includes(a)&&n.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set w(e){this._target[3]=e,this.onChange()}identity(){return Cs(this._target),this.onChange(),this}set(e,t,r,s){return e.length?this.copy(e):(Us(this._target,e,t,r,s),this.onChange(),this)}rotateX(e){return Rs(this._target,this._target,e),this.onChange(),this}rotateY(e){return Ts(this._target,this._target,e),this.onChange(),this}rotateZ(e){return zs(this._target,this._target,e),this.onChange(),this}inverse(e=this._target){return Is(this._target,e),this.onChange(),this}conjugate(e=this._target){return Ps(this._target,e),this.onChange(),this}copy(e){return Ds(this._target,e),this.onChange(),this}normalize(e=this._target){return js(this._target,e),this.onChange(),this}multiply(e,t){return t?vt(this._target,e,t):vt(this._target,this._target,e),this.onChange(),this}dot(e){return Ns(this._target,e)}fromMatrix3(e){return Bs(this._target,e),this.onChange(),this}fromEuler(e,t){return qs(this._target,e,e.order),t||this.onChange(),this}fromAxisAngle(e,t){return Ls(this._target,e,t),this.onChange(),this}slerp(e,t){return Os(this._target,this._target,e,t),this.onChange(),this}fromArray(e,t=0){return this._target[0]=e[t],this._target[1]=e[t+1],this._target[2]=e[t+2],this._target[3]=e[t+3],this.onChange(),this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e[t+3]=this[3],e}},Ws=1e-6;function Xs(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Ys(e,t,r,s,i,n,a,l,o,c,h,u,f,p,m,g,v){return e[0]=t,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=a,e[6]=l,e[7]=o,e[8]=c,e[9]=h,e[10]=u,e[11]=f,e[12]=p,e[13]=m,e[14]=g,e[15]=v,e}function $s(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
6]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Gs(e,t){let r=t[0],s=t[1],i=t[2],n=t[3],a=t[4],l=t[5],o=t[6],c=t[7],h=t[8],u=t[9],f=t[10],p=t[11],m=t[12],g=t[13],v=t[14],x=t[15],F=r*l-s*a,b=r*o-i*a,S=r*c-n*a,w=s*o-i*l,A=s*c-n*l,C=i*c-n*o,R=h*g-u*m,I=h*v-f*m,B=h*x-p*m,j=u*v-f*g,q=u*x-p*g,V=f*x-p*v,k=F*V-b*q+S*j+w*B-A*I+C*R;return k?(k=1/k,e[0]=(l*V-o*q+c*j)*k,e[1]=(i*q-s*V-n*j)*k,e[2]=(g*C-v*A+x*w)*k,e[3]=(f*A-u*C-p*w)*k,e[4]=(o*B-a*V-c*I)*k,e[5]=(r*V-i*B+n*I)*k,e[6]=(v*S-m*C-x*b)*k,e[7]=(h*C-f*S+p*b)*k,e[8]=(a*q-l*B+c*R)*k,e[9]=(s*B-r*q-n*R)*k,e[10]=(m*A-g*S+x*F)*k,e[11]=(u*S-h*A-p*F)*k,e[12]=(l*I-a*j-o*R)*k,e[13]=(r*j-s*I+i*R)*k,e[14]=(g*b-m*w-v*F)*k,e[15]=(h*w-u*b+f*F)*k,e):null}function zt(e){let t=e[0],r=e[1],s=e[2],i=e[3],n=e[4],a=e[5],l=e[6],o=e[7],c=e[8],h=e[9],u=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15],x=t*a-r*n,F=t*l-s*n,b=t*o-i*n,S=r*l-s*a,w=r*o-i*a,A=s*o-i*l,C=c*m-h*p,R=c*g-u*p,I=c*v-f*p,B=h*g-u*m,j=h*v-f*m;return x*(u*v-f*g)-F*j+b*B+S*I-w*R+A*C}function xt(e,t,r){let s=t[0],i=t[1],n=t[2],a=t[3],l=t[4],o=t[5],c=t[6],h=t[7],u=t[8],f=t[9],p=t[10],m=t[11],g=t[12],v=t[13],x=t[14],F=t[15],b=r[0],S=r[1],w=r[2],A=r[3];return e[0]=b*s+S*l+w*u+A*g,e[1]=b*i+S*o+w*f+A*v,e[2]=b*n+S*c+w*p+A*x,e[3]=b*a+S*h+w*m+A*F,b=r[4],S=r[5],w=r[6],A=r[7],e[4]=b*s+S*l+w*u+A*g,e[5]=b*i+S*o+w*f+A*v,e[6]=b*n+S*c+w*p+A*x,e[7]=b*a+S*h+w*m+A*F,b=r[8],S=r[9],w=r[10],A=r[11],e[8]=b*s+S*l+w*u+A*g,e[9]=b*i+S*o+w*f+A*v,e[10]=b*n+S*c+w*p+A*x,e[11]=b*a+S*h+w*m+A*F,b=r[12],S=r[13],w=r[14],A=r[15],e[12]=b*s+S*l+w*u+A*g,e[13]=b*i+S*o+w*f+A*v,e[14]=b*n+S*c+w*p+A*x,e[15]=b*a+S*h+w*m+A*F,e}function Hs(e,t,r){let s=r[0],i=r[1],n=r[2],a,l,o,c,h,u,f,p,m,g,v,x;return t===e?(e[12]=t[0]*s+t[4]*i+t[8]*n+t[12],e[13]=t[1]*s+t[5]*i+t[9]*n+t[13],e[14]=t[2]*s+t[6]*i+t[10]*n+t[14],e[15]=t[3]*s+t[7]*i+t[11]*n+t[15]):(a=t[0],l=t[1],o=t[2],c=t[3],h=t[4],u=t[5],f=t[6],p=t[7],m=t[8],g=t[9],v=t[10],x=t[11],e[0]=a,e[1]=l,e[2]=o,e[3]=c,e[4]=h,e[5]=u,e[6]=f,e[7]=p,e[8]=m,e[9]=g,e[10]=v,e[11]=x,e[12]=a*s+h*i+m*n+t[12],e[13]=l*s+u*i+g*n+t[13],e[14]=o*s+f*i+v*n+t[14],e[15]=c*s+p*i+x*n+t[15]),e}function Zs(e,t,r){let s=r[0],i=r[1],n=r[2];return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Qs(e,t,r,s){let i=s[0],n=s[1],a=s[2],l=Math.hypot(i,n,a),o,c,h,u,f,p,m,g,v,x,F,b,S,w,A,C,R,I,B,j,q,V,k,Z;return Math.abs(l)<Ws?null:(l=1/l,i*=l,n*=l,a*=l,o=Math.sin(r),c=Math.cos(r),h=1-c,u=t[0],f=t[1],p=t[2],m=t[3],g=t[4],v=t[5],x=t[6],F=t[7],b=t[8],S=t[9],w=t[10],A=t[11],C=i*i*h+c,R=n*i*h+a*o,I=a*i*h-n*o,B=i*n*h-a*o,j=n*n*h+c,q=a*n*h+i*o,V=i*a*h+n*o,k=n*a*h-i*o,Z=a*a*h+c,e[0]=u*C+g*R+b*I,e[1]=f*C+v*R+S*I,e[2]=p*C+x*R+w*I,e[3]=m*C+F*R+A*I,e[4]=u*B+g*j+b*q,e[5]=f*B+v*j+S*q,e[6]=p*B+x*j+w*q,e[7]=m*B+F*j+A*q,e[8]=u*V+g*k+b*Z,e[9]=f*V+v*k+S*Z,e[10]=p*V+x*k+w*Z,e[11]=m*V+F*k+A*Z,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function Ks(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function Ot(e,t){let r=t[0],s=t[1],i=t[2],n=t[4],a=t[5],l=t[6],o=t[8],c=t[9],h=t[10];return e[0]=Math.hypot(r,s,i),e[1]=Math.hypot(n,a,l),e[2]=Math.hypot(o,c,h),e}function Js(e){let t=e[0],r=e[1],s=e[2],i=e[4],n=e[5],a=e[6],l=e[8],o=e[9],c=e[10];const h=t*t+r*r+s*s,u=i*i+n*n+a*a,f=l*l+o*o+c*c;return Math.sqrt(Math.max(h,u,f))}var It=(function(){const e=[1,1,1];return function(t,r){let s=e;Ot(s,r);let i=1/s[0],n=1/s[1],a=1/s[2],l=r[0]*i,o=r[1]*n,c=r[2]*a,h=r[4]*i,u=r[5]*n,f=r[6]*a,p=r[8]*i,m=r[9]*n,g=r[10]*a,v=l+u+g,x=0;return v>0?(x=Math.sqrt(v+1)*2,t[3]=.25*x,t[0]=(f-m)/x,t[1]=(p-c)/x,t[2]=(o-h)/x):l>u&&l>g?(x=Math.sqrt(1+l-u-g)*2,t[3]=(f-m)/x,t[0]=.25*x,t[1]=(o+h)/x,t[2]=(p+c)/x):u>g?(x=Math.sqrt(1+u-l-g)*2,t[3]=(p-c)/x,t[0]=(o+h)/x,t[1]=.25*x,t[2]=(f+m)/x):(x=Math.sqrt(1+g-l-u)*2,t[3]=(o-h)/x,t[0]=(p+c)/x,t[1]=(f+m)/x,t[2]=.25*x),t}})();function ei(e,t,r,s){let i=Ce([e[0],e[1],e[2]]);const n=Ce([e[4],e[5],e[6]]),a=Ce([e[8],e[9],e[10]]);zt(e)<0&&(i=-i),r[0]=e[12],r[1]=e[13],r[2]=e[14];const l=e.slice(),o=1/i,c=1/n,h=1/a;l[0]*=o,l[1]*=o,l[2]*=o,l[4]*=c,l[5]*=c,l[6]*=c,l[8]*=h,l[9]*=h,l[10]*=h,It(t,l),s[0]=i,s[1]=n,s[2]=a}function ti(e,t,r,s){const i=e,n=t[0],a=t[1],l=t[2],o=t[3],c=n+n,h=a+a,u=l+l,f=n*c,p=n*h,m=n*u,g=a*h,v=a*u,x=l*u,F=o*c,b=o*h,S=o*u,w=s[0],A=s[1],C=s[2];return i[0]=(1-(g+x))*w,i[1]=(p+S)*w,i[2]=(m-b)*w,i[3]=0,i[4]=(p-S)*A,i[5]=(1-(f+x))*A,i[6]=(v+F)*A,i[7]=0,i[8]=(m+b)*C,i[9]=(v-F)*C,i[10]=(1-(f+g))*C,i[11]=0,i[12]=r[0],i[13]=r[1],i[14]=r[2],i[15]=1,i}function ri(e,t){let r=t[0],s=t[1],i=t[2],n=t[3],a=r+r,l=s+s,o=i+i,c=r*a,h=s*a,u=s*l,f=i*a,p=i*l,m=i*o,g=n*a,v=n*l,x=n*o;return e[0]=1-u-m,e[1]=h+x,e[2]=f-v,e[3]=0,e[4]=h-x,e[5]=1-c-m,e[6]=p+g,e[7]=0,e[8]=f+v,e[9]=p-g,e[10]=1-c-u,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function si(e,t,r,s,i){let n=1/Math.tan(t/2),a=1/(s-i);return e[0]=n/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
6]=(i+s)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*s*a,e[15]=0,e}function ii(e,t,r,s,i,n,a){let l=1/(t-r),o=1/(s-i),c=1/(n-a);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*l,e[13]=(i+s)*o,e[14]=(a+n)*c,e[15]=1,e}function ni(e,t,r,s){let i=t[0],n=t[1],a=t[2],l=s[0],o=s[1],c=s[2],h=i-r[0],u=n-r[1],f=a-r[2],p=h*h+u*u+f*f;p===0?f=1:(p=1/Math.sqrt(p),h*=p,u*=p,f*=p);let m=o*f-c*u,g=c*h-l*f,v=l*u-o*h;return p=m*m+g*g+v*v,p===0&&(c?l+=1e-6:o?c+=1e-6:o+=1e-6,m=o*f-c*u,g=c*h-l*f,v=l*u-o*h,p=m*m+g*g+v*v),p=1/Math.sqrt(p),m*=p,g*=p,v*=p,e[0]=m,e[1]=g,e[2]=v,e[3]=0,e[4]=u*v-f*g,e[5]=f*m-h*v,e[6]=h*g-u*m,e[7]=0,e[8]=h,e[9]=u,e[10]=f,e[11]=0,e[12]=i,e[13]=n,e[14]=a,e[15]=1,e}function yt(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e}function bt(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function ai(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e}var Ie=class extends Array{constructor(e=1,t=0,r=0,s=0,i=0,n=1,a=0,l=0,o=0,c=0,h=1,u=0,f=0,p=0,m=0,g=1){return super(e,t,r,s,i,n,a,l,o,c,h,u,f,p,m,g),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(e){this[12]=e}set y(e){this[13]=e}set z(e){this[14]=e}set w(e){this[15]=e}set(e,t,r,s,i,n,a,l,o,c,h,u,f,p,m,g){return e.length?this.copy(e):(Ys(this,e,t,r,s,i,n,a,l,o,c,h,u,f,p,m,g),this)}translate(e,t=this){return Hs(this,t,e),this}rotate(e,t,r=this){return Qs(this,r,e,t),this}scale(e,t=this){return Zs(this,t,typeof e=="number"?[e,e,e]:e),this}add(e,t){return t?yt(this,e,t):yt(this,this,e),this}sub(e,t){return t?bt(this,e,t):bt(this,this,e),this}multiply(e,t){return e.length?t?xt(this,e,t):xt(this,this,e):ai(this,this,e),this}identity(){return $s(this),this}copy(e){return Xs(this,e),this}fromPerspective({fov:e,aspect:t,near:r,far:s}={}){return si(this,e,t,r,s),this}fromOrthogonal({left:e,right:t,bottom:r,top:s,near:i,far:n}){return ii(this,e,t,r,s,i,n),this}fromQuaternion(e){return ri(this,e),this}setPosition(e){return this.x=e[0],this.y=e[1],this.z=e[2],this}inverse(e=this){return Gs(this,e),this}compose(e,t,r){return ti(this,e,t,r),this}decompose(e,t,r){return ei(this,e,t,r),this}getRotation(e){return It(e,this),this}getTranslation(e){return Ks(e,this),this}getScaling(e){return Ot(e,this),this}getMaxScaleOnAxis(){return Js(this)}lookAt(e,t,r){return ni(this,e,t,r),this}determinant(){return zt(this)}fromArray(e,t=0){return this[0]=e[t],this[1]=e[t+1],this[2]=e[t+2],this[3]=e[t+3],this[4]=e[t+4],this[5]=e[t+5],this[6]=e[t+6],this[7]=e[t+7],this[8]=e[t+8],this[9]=e[t+9],this[10]=e[t+10],this[11]=e[t+11],this[12]=e[t+12],this[13]=e[t+13],this[14]=e[t+14],this[15]=e[t+15],this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e[t+3]=this[3],e[t+4]=this[4],e[t+5]=this[5],e[t+6]=this[6],e[t+7]=this[7],e[t+8]=this[8],e[t+9]=this[9],e[t+10]=this[10],e[t+11]=this[11],e[t+12]=this[12],e[t+13]=this[13],e[t+14]=this[14],e[t+15]=this[15],e}};function li(e,t,r="YXZ"){return r==="XYZ"?(e[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(e[0]=Math.atan2(-t[9],t[10]),e[2]=Math.atan2(-t[4],t[0])):(e[0]=Math.atan2(t[6],t[5]),e[2]=0)):r==="YXZ"?(e[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(e[1]=Math.atan2(t[8],t[10]),e[2]=Math.atan2(t[1],t[5])):(e[1]=Math.atan2(-t[2],t[0]),e[2]=0)):r==="ZXY"?(e[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(e[1]=Math.atan2(-t[2],t[10]),e[2]=Math.atan2(-t[4],t[5])):(e[1]=0,e[2]=Math.atan2(t[1],t[0]))):r==="ZYX"?(e[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(e[0]=Math.atan2(t[6],t[10]),e[2]=Math.atan2(t[1],t[0])):(e[0]=0,e[2]=Math.atan2(-t[4],t[5]))):r==="YZX"?(e[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(e[0]=Math.atan2(-t[9],t[5]),e[1]=Math.atan2(-t[2],t[0])):(e[0]=0,e[1]=Math.atan2(t[8],t[10]))):r==="XZY"&&(e[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(e[0]=Math.atan2(t[6],t[5]),e[1]=Math.atan2(t[8],t[0])):(e[0]=Math.atan2(-t[9],t[10]),e[1]=0)),e}var _t=new Ie,oi=class extends Array{constructor(e=0,t=e,r=e,s="YXZ"){super(e,t,r),this.order=s,this.onChange=()=>{},this._target=this;const i=["0","1","2"];return new Proxy(this,{set(n,a){const l=Reflect.set(...arguments);return l&&i.includes(a)&&n.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set(e,t=e,r=e){return e.length?this.copy(e):(this._target[0]=e,this._target[1]=t,this._target[2]=r,this.onChange(),this)}copy(e){return this._target[0]=e[0],this._target[1]=e[1],this._target[2]=e[2],this.onChange(),this}reorder(e){return this._target.order=e,this.onChange(),this}fromRotationMatrix(e,t=this.order){return li(this._target,e,t),this.onChange(),this}fromQuaternion(e,t=this.order,r){return _t.fromQuaternion(e),this._target.fromRotationMatrix(_t,t),r||this.onChange(),this}fromArray(e,t=0){return this._target[0]=e[t],this._target[1]=e[t+1],this._target[2]=e[t+2],this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e}},hi=class{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new Ie,this.worldMatrix=new Ie,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new xe,this.quaternion=new Vs,this.scale=new xe(1),this.rotation=new oi,this.up=new xe(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}
6setParent(e,t=!0){this.parent&&e!==this.parent&&this.parent.removeChild(this,!1),this.parent=e,t&&e&&e.addChild(this,!1)}addChild(e,t=!0){~this.children.indexOf(e)||this.children.push(e),t&&e.setParent(this,!1)}removeChild(e,t=!0){~this.children.indexOf(e)&&this.children.splice(this.children.indexOf(e),1),t&&e.setParent(null,!1)}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||e)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,e=!0);for(let t=0,r=this.children.length;t<r;t++)this.children[t].updateMatrixWorld(e)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(e){if(!e(this))for(let t=0,r=this.children.length;t<r;t++)this.children[t].traverse(e)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(e,t=!1){t?this.matrix.lookAt(this.position,e,this.up):this.matrix.lookAt(e,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}};function ci(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function di(e,t){let r=t[0],s=t[1],i=t[2],n=t[3],a=r+r,l=s+s,o=i+i,c=r*a,h=s*a,u=s*l,f=i*a,p=i*l,m=i*o,g=n*a,v=n*l,x=n*o;return e[0]=1-u-m,e[3]=h-x,e[6]=f+v,e[1]=h+x,e[4]=1-c-m,e[7]=p-g,e[2]=f-v,e[5]=p+g,e[8]=1-c-u,e}function fi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function ui(e,t,r,s,i,n,a,l,o,c){return e[0]=t,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=a,e[6]=l,e[7]=o,e[8]=c,e}function pi(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function gi(e,t){let r=t[0],s=t[1],i=t[2],n=t[3],a=t[4],l=t[5],o=t[6],c=t[7],h=t[8],u=h*a-l*c,f=-h*n+l*o,p=c*n-a*o,m=r*u+s*f+i*p;return m?(m=1/m,e[0]=u*m,e[1]=(-h*s+i*c)*m,e[2]=(l*s-i*a)*m,e[3]=f*m,e[4]=(h*r-i*o)*m,e[5]=(-l*r+i*n)*m,e[6]=p*m,e[7]=(-c*r+s*o)*m,e[8]=(a*r-s*n)*m,e):null}function wt(e,t,r){let s=t[0],i=t[1],n=t[2],a=t[3],l=t[4],o=t[5],c=t[6],h=t[7],u=t[8],f=r[0],p=r[1],m=r[2],g=r[3],v=r[4],x=r[5],F=r[6],b=r[7],S=r[8];return e[0]=f*s+p*a+m*c,e[1]=f*i+p*l+m*h,e[2]=f*n+p*o+m*u,e[3]=g*s+v*a+x*c,e[4]=g*i+v*l+x*h,e[5]=g*n+v*o+x*u,e[6]=F*s+b*a+S*c,e[7]=F*i+b*l+S*h,e[8]=F*n+b*o+S*u,e}function mi(e,t,r){let s=t[0],i=t[1],n=t[2],a=t[3],l=t[4],o=t[5],c=t[6],h=t[7],u=t[8],f=r[0],p=r[1];return e[0]=s,e[1]=i,e[2]=n,e[3]=a,e[4]=l,e[5]=o,e[6]=f*s+p*a+c,e[7]=f*i+p*l+h,e[8]=f*n+p*o+u,e}function vi(e,t,r){let s=t[0],i=t[1],n=t[2],a=t[3],l=t[4],o=t[5],c=t[6],h=t[7],u=t[8],f=Math.sin(r),p=Math.cos(r);return e[0]=p*s+f*a,e[1]=p*i+f*l,e[2]=p*n+f*o,e[3]=p*a-f*s,e[4]=p*l
6-f*i,e[5]=p*o-f*n,e[6]=c,e[7]=h,e[8]=u,e}function xi(e,t,r){let s=r[0],i=r[1];return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function yi(e,t){let r=t[0],s=t[1],i=t[2],n=t[3],a=t[4],l=t[5],o=t[6],c=t[7],h=t[8],u=t[9],f=t[10],p=t[11],m=t[12],g=t[13],v=t[14],x=t[15],F=r*l-s*a,b=r*o-i*a,S=r*c-n*a,w=s*o-i*l,A=s*c-n*l,C=i*c-n*o,R=h*g-u*m,I=h*v-f*m,B=h*x-p*m,j=u*v-f*g,q=u*x-p*g,V=f*x-p*v,k=F*V-b*q+S*j+w*B-A*I+C*R;return k?(k=1/k,e[0]=(l*V-o*q+c*j)*k,e[1]=(o*B-a*V-c*I)*k,e[2]=(a*q-l*B+c*R)*k,e[3]=(i*q-s*V-n*j)*k,e[4]=(r*V-i*B+n*I)*k,e[5]=(s*B-r*q-n*R)*k,e[6]=(g*C-v*A+x*w)*k,e[7]=(v*S-m*C-x*b)*k,e[8]=(m*A-g*S+x*F)*k,e):null}var bi=class extends Array{constructor(e=1,t=0,r=0,s=0,i=1,n=0,a=0,l=0,o=1){return super(e,t,r,s,i,n,a,l,o),this}set(e,t,r,s,i,n,a,l,o){return e.length?this.copy(e):(ui(this,e,t,r,s,i,n,a,l,o),this)}translate(e,t=this){return mi(this,t,e),this}rotate(e,t=this){return vi(this,t,e),this}scale(e,t=this){return xi(this,t,e),this}multiply(e,t){return t?wt(this,e,t):wt(this,this,e),this}identity(){return pi(this),this}copy(e){return fi(this,e),this}fromMatrix4(e){return ci(this,e),this}fromQuaternion(e){return di(this,e),this}fromBasis(e,t,r){return this.set(e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]),this}inverse(e=this){return gi(this,e),this}getNormalMatrix(e){return yi(this,e),this}},_i=0,wi=class extends hi{constructor(e,{geometry:t,program:r,mode:s=e.TRIANGLES,frustumCulled:i=!0,renderOrder:n=0}={}){super(),e.canvas,this.gl=e,this.id=_i++,this.geometry=t,this.program=r,this.mode=s,this.frustumCulled=i,this.renderOrder=n,this.modelViewMatrix=new Ie,this.normalMatrix=new bi,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(e){return this.beforeRenderCallbacks.push(e),this}onAfterRender(e){return this.afterRenderCallbacks.push(e),this}draw({camera:e}={}){e&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=e.projectionMatrix,this.program.uniforms.cameraPosition.value=e.worldPosition,this.program.uniforms.viewMatrix.value=e.viewMatrix,this.modelViewMatrix.multiply(e.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:e}));let t=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:t}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:e}))}},Ei=class extends vs{constructor(e,{attributes:t={}}={}){Object.assign(t,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(e,t)}},Mi=O("<div></div>");function Si(e,t){de(t,!0);let r=se(t,"speed",3,2.5),s=se(t,"rayColor1",3,"#ffffff"),i=se(t,"rayColor2",3,"#8a8a8a"),n=se(t,"intensity",3,2),a=se(t,"spread",3,2),l=se(t,"origin",3,"top-right"),o=se(t,"tilt",3,0),c=se(t,"saturation",3,.15),h=se(t,"blend",3,.75),u=se(t,"falloff",3,2),f=se(t,"opacity",3,1),p=se(t,"class",3,"");const m=C=>{const R=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(C);return R?[parseInt(R[1],16)/255,parseInt(R[2],16)/255,parseInt(R[3],16)/255]:[1,1,1]},g=C=>{switch(C){case"top-left":return[1,0];case"bottom-right":return[0,1];case"bottom-left":return[1,1];default:return[0,0]}},v=` 7attribute vec2 position; 8void main() { 9 gl_Position = vec4(position, 0.0, 1.0); 10}`,x=`precision highp float; 11 12uniform float iTime; 13uniform vec2 iResolution; 14uniform float iSpeed; 15uniform vec3 iRayColor1; 16uniform vec3 iRayColor2; 17uniform float iIntensity; 18uniform float iSpread; 19uniform float iFlipX; 20uniform float iFlipY; 21uniform float iTilt; 22uniform float iSaturation; 23uniform float iBlend; 24uniform float iFalloff; 25uniform float iOpacity; 26 27float rayStrength(vec2 raySource, vec2 rayRefDirection, vec2 coord, float seedA, float seedB, float speed, float refW) { 28 vec2 sourceToCoord = coord - raySource; 29 float cosAngle = dot(normalize(sourceToCoord), rayRefDirection); 30 return clamp( 31 (0.45 + 0.15 * sin(cosAngle * seedA + iTime * speed)) + 32 (0.3 + 0.2 * cos(-cosAngle * seedB + iTime * speed)), 33 0.0, 1.0) * 34 clamp((refW - length(sourceToCoord)) / refW, 0.5, 1.0); 35} 36 37void main() { 38 vec2 fragCoord = gl_FragCoord.xy; 39 if (iFlipX > 0.5) fragCoord.x = iResolution.x - fragCoord.x; 40 if (iFlipY > 0.5) fragCoord.y = iResolution.y - fragCoord.y; 41
42 /* Every length below is measured in "unit" rather than in the viewport's own 43 width and height, because those two swap roles between a desktop and a 44 phone. The port placed the light 1.1 widths to the right and half a HEIGHT 45 above the top, then divided the falloff by the height â so on a 0.46:1 46 phone the vertical standoff grew while the horizontal one collapsed, and 47 the distance field spanned only 0.50..1.58 units instead of the desktop's 48 0.52..2.31. That left every pixel in the near field of the 1/distance^falloff 49 curve: measured, 37% of a phone screen came out above 0.2 alpha against 11% 50 of a desktop's, which is the wash that covered the whole screen. 51 52 "unit" is the diagonal scaled to equal iResolution.y at REF_ASPECT, so the 53 light's standoff now shrinks with the viewport and the field stays similar 54 at any shape. At REF_ASPECT itself it IS iResolution.y, which keeps the 55 tuning below (and the intensity/falloff pairs the page passes in) meaning 56 exactly what it meant when they were chosen on a 16:10 screen. */ 57 const float REF_ASPECT = 1.6; 58 float unit = length(iResolution) / sqrt(REF_ASPECT * REF_ASPECT + 1.0); 59 float refW = REF_ASPECT * unit; 60 61 vec2 coord = vec2(fragCoord.x, iResolution.y - fragCoord.y); 62 vec2 rayPos = vec2(iResolution.x + 0.1 * refW, -0.5 * unit); 63 64 float tiltRad = iTilt * 3.14159265 / 180.0; 65 float cs = cos(tiltRad); 66 float sn = sin(tiltRad); 67 vec2 rel = coord - rayPos; 68 vec2 tiltedCoord = vec2(rel.x * cs - rel.y * sn, rel.x * sn + rel.y * cs) + rayPos; 69 70 float halfSpread = iSpread * 0.275; 71 vec2 rayRefDir1 = normalize(vec2(cos(0.785398 + halfSpread), sin(0.785398 + halfSpread))); 72 vec2 rayRefDir2 = normalize(vec2(cos(0.785398 - halfSpread), sin(0.785398 - halfSpread))); 73 74 vec4 rays1 = vec4(iRayColor1, 1.0) * rayStrength(rayPos, rayRefDir1, tiltedCoord, 36.2214, 21.11349, iSpeed, refW); 75 vec4 rays2 = vec4(iRayColor2, 1.0) * rayStrength(rayPos, rayRefDir2, tiltedCoord, 22.3991, 18.0234, iSpeed * 0.2, refW); 76 77 vec4 color = rays1 * (1.0 - iBlend) * 0.9 + rays2 * iBlend * 0.9; 78 79 float distanceToLight = length(fragCoord.xy - vec2(rayPos.x, iResolution.y - rayPos.y)) / unit; 80 float brightness = iIntensity * 0.4 / pow(max(distanceToLight, 0.001), iFalloff); 81 color.rgb *= brightness; 82 83 float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114)); 84 color.rgb = mix(vec3(gray), color.rgb, iSaturation); 85 86 color.a = max(color.r, max(color.g, color.b)) * iOpacity; 87 gl_FragColor = color; 88}`;let F=G(void 0),b=G(!1),S=G(!1),w=null;ce(()=>{if(!d(F))return;const C=new IntersectionObserver(([R])=>P(b,R.isIntersecting,!0),{threshold:.1});return C.observe(d(F)),()=>C.disconnect()}),ce(()=>{if(!d(b)||!d(F))return;const C=d(F);return qt(()=>{const R=new Ms({dpr:Math.min(window.devicePixelRatio,2),alpha:!0}),I=R.gl;for(I.canvas.style.width="100%",I.canvas.style.height="100%";C.firstChild;)C.removeChild(C.firstChild);C.appendChild(I.canvas);const[B,j]=g(l()),q={iTime:{value:0},iResolution:{value:[1,1]},iSpeed:{value:r()},iRayColor1:{value:m(s())},iRayColor2:{value:m(i())},iIntensity:{value:n()},iSpread:{value:a()},iFlipX:{value:B},iFlipY:{value:j},iTilt:{value:o()},iSaturation:{value:c()},iBlend:{value:h()},iFalloff:{value:u()},iOpacity:{value:f()}};w=q;const V=new Ei(I),k=new ys(I,{vertex:v,fragment:x,uniforms:q}),Z=new wi(I,{geometry:V,program:k});let U=0,T=!1;const X=()=>{R.dpr=Math.min(window.devicePixelRatio,2);const{clientWidth:Q,clientHeight:ie}=C;R.setSize(Q,ie),q.iResolution.value=[Q*R.dpr,ie*R.dpr]},$=Q=>{T||(q.iTime.value=Q*.001,R.render({scene:Z}),P(S,!0),U=requestAnimationFrame($))};return window.addEventListener("resize",X),X(),U=requestAnimationFrame($),()=>{T=!0,w=null,P(S,!1),cancelAnimationFrame(U),window.removeEventListener("resize",X),I.getExtension("WEBGL_lose_context")?.loseContext(),I.canvas.remove()}})}),ce(()=>{if(!w)return;const[C,R]=g(l());w.iSpeed.value=r(),w.iRayColor1.value=m(s()),w.iRayColor2.value=m(i()),w.iIntensity.value=n(),w.iSpread.value=a(),w.iFlipX.value=C,w.iFlipY.value=R,w.iTilt.value=o(),w.iSaturation.value=c(),w.iBlend.value=h(),w.iFalloff.value=u(),w.iOpacity.value=f()});var A=Mi();Oe(A,C=>P(F,C),()=>d(F)),D(()=>{re(A,1,`fade pointer-events-none relative h-full w-full overflow-hidden ${p()??""}`,"svelte-nkxaje"),be(A,`opacity: ${d(S)?1:0};`)}
88),L(e,A),fe()}async function Ve(e){try{const t=await fetch(e);return t.ok?await t.json():null}catch{return null}}async function Ai(){const[e,t,r]=await Promise.all([Ve(te.github.apiRepoUrl),Ve(te.github.apiCommitsUrl),Ve(te.discord.apiInviteUrl)]);return{githubStars:e?.stargazers_count??null,discordMembers:r?.approximate_member_count??null,testflightInstalls:te.testflight.installs,lastCommit:t?.[0]?.commit.committer.date??null}}var ki=O('<p class="mono display text-nowrap text-[clamp(1.75rem,3.6vw,2.5rem)]"><!></p> <p class="mt-2 text-nowrap text-[0.8125rem]" style="color: var(--muted);"> </p>',1);function Fe(e,t){de(t,!0);let r=G(0),s=0;ce(()=>{if(typeof t.value!="number")return;const a=t.visible?t.value:0;if(matchMedia("(prefers-reduced-motion: reduce)").matches){s=a,P(r,a,!0);return}const l=s,o=performance.now(),c=900;let h=0;const u=f=>{const p=Math.min((f-o)/c,1),m=1-(1-p)**3;s=l+(a-l)*m,P(r,Math.round(s),!0),p<1&&(h=requestAnimationFrame(u))};return h=requestAnimationFrame(u),()=>cancelAnimationFrame(h)});var i=Ge(),n=ae(i);jt(n,()=>t.href?"a":"article",!1,(a,l)=>{Xt(a,()=>({href:t.href,target:t.href?"_blank":void 0,rel:t.href?"noreferrer":void 0,class:"card glow reveal surface relative overflow-hidden rounded-2xl p-7 text-center md:p-8"}),void 0,void 0,void 0,"svelte-40uvou");var o=ki(),c=ae(o),h=_(c),u=v=>{var x=Be("â");L(v,x)},f=v=>{var x=Be();D(F=>W(x,F),[()=>d(r).toLocaleString()]),L(v,x)},p=v=>{var x=Be();D(()=>W(x,t.value)),L(v,x)};ne(h,v=>{t.value===null?v(u):typeof t.value=="number"?v(f,1):v(p,-1)}),y(c);var m=M(c,2),g=_(m,!0);y(m),D(()=>W(g,t.label)),L(l,o)}),L(e,i),fe()}var Fi=O('<section class="mx-auto max-w-5xl px-6 py-24 md:py-32" aria-labelledby="stats-heading"><!> <p class="reveal mt-5 max-w-[38ch] text-[1.0625rem]" style="--i: 1; color: var(--muted); text-wrap: pretty;"> </p> <div class="glow-field mt-12 grid grid-cols-2 gap-4 md:mt-16 md:grid-cols-5"><!> <!> <!> <!> <!></div></section>');function Ci(e,t){de(t,!0);let r=G(!1),s=G(Mt({githubStars:null,discordMembers:null,testflightInstalls:null,lastCommit:null}));Vt(async()=>{P(s,await Ai(),!0)});const i=K(()=>d(s).lastCommit?new Intl.DateTimeFormat("en",{day:"numeric",month:"short"}).format(new Date(d(s).lastCommit)):null);var n=Fi(),a=_(n);et(a,{id:"stats-heading",get text(){return Me.stats.title},class:"display text-[clamp(2.25rem,5.4vw,3.5rem)]"});var l=M(a,2),o=_(l,!0);y(l),H(l,(g,v)=>Qe?.(g,v),()=>70);var c=M(l,2),h=_(c);Fe(h,{get label(){return ke.githubStars},get value(){return d(s).githubStars},get visible(){return d(r)},get href(){return ue.github}});var u=M(h,2);Fe(u,{get label(){return ke.discordMembers},get value(){return d(s).discordMembers},get visible(){return d(r)},get href(){return ue.discord}});var f=M(u,2);Fe(f,{get label(){return ke.testflightInstalls},get value(){return d(s).testflightInstalls},get visible(){return d(r)},get href(){return ue.testflight}});var p=M(f,2);{let g=K(()=>`v${Ee.version}`);Fe(p,{get label(){return ke.version},get value(){return d(g)},get visible(){return d(r)},get href(){return ue.testflight}})}var m=M(p,2);{let g=K(()=>d(i)??"â");Fe(m,{get label(){return ke.lastCommit},get value(){return d(g)},get visible(){return d(r)},get href(){return ue.github}})}y(c),H(c,(g,v)=>Pe?.(g,v),()=>70),H(c,g=>Ke?.(g)),y(n),H(n,(g,v)=>Ft?.(g,v),()=>g=>P(r,g,!0)),D(()=>W(o,Me.stats.sub)),L(e,n),fe()}var Li=O('<meta name="description"/> <meta name="keywords" content="anime, manga, library manager, iOS, AltStore, SideStore, AniList, MyAnimeList"/> <meta name="author" content="xibrox"/> <link rel="canonical"/> <meta property="og:title"/> <meta property="og:description"/> <meta property="og:type" content="website"/> <meta property="og:url"/> <meta property="og:site_name" content="Shirox"/> <meta property="og:locale" content="en_US"/> <meta property="og:image"/> <meta property="og:image:width" content="1200"/> <meta property="og:image:height" content="630"/> <meta property="og:image:alt" content="Shirox â your anime library, entirely yours."/> <meta name="twitter:card" content="summary_large_image"/> <meta name="twitter:title"/> <meta name="twitter:description"/> <meta name="twitter:image"/>',1),Ri=O('<div class="rays pointer-events-none fixed inset-0 -z-10 svelte-1uha8ag" aria-hidden="true"><!></div> <!>
88 <main id="top"><!> <!> <!> <!> <!></main> <!>',1);function Ii(e,t){de(t,!0);const r="Shirox â Anime & manga library manager for iOS",s="A free, source-available library manager for anime and manga on iOS 15+. Community modules, AniList and MyAnimeList sync, and offline downloads.",i=te.site.url,n=`${i}/og-image.png`,a=K(()=>ve.current==="light"?"#8a8a8a":"#ffffff"),l=K(()=>ve.current==="light"?"#3f3f3f":"#8a8a8a");let o=G(0);const c=K(()=>d(o)>0&&d(o)<640),h=K(()=>(ve.current==="light"?6:2)*(d(c)?.32:1)),u=K(()=>(ve.current==="light"?1.3:1.6)+(d(c)?.4:0));var f=Ri();Wt("1uha8ag",C=>{var R=Li(),I=ae(R);N(I,"content",s);var B=M(I,6),j=M(B,2);N(j,"content",r);var q=M(j,2);N(q,"content",s);var V=M(q,4),k=M(V,6),Z=M(k,10);N(Z,"content",r);var U=M(Z,2);N(U,"content",s);var T=M(U,2);D(()=>{N(B,"href",i),N(V,"content",i),N(k,"content",n),N(T,"content",n)}),Bt(()=>{$t.title="Shirox â Anime & manga library manager for iOS"}),L(C,R)});var p=ae(f),m=_(p);Si(m,{speed:2.5,get rayColor1(){return d(a)},get rayColor2(){return d(l)},get intensity(){return d(h)},spread:2,origin:"top-right",tilt:0,saturation:.15,blend:.75,get falloff(){return d(u)},opacity:1}),y(p);var g=M(p,2);Vr(g,{});var v=M(g,2),x=_(v);vr(x,{});var F=M(x,2);Jr(F,{});var b=M(F,2);dr(b,{});var S=M(b,2);Ci(S,{});var w=M(S,2);Br(w,{}),y(v);var A=M(v,2);pr(A,{}),Dt("innerWidth",C=>P(o,C,!0)),L(e,f),fe()}export{Ii as component,Oi as universal};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.