@stacksjs/components 0.2.531 → 0.2.533
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.
- package/dist/Audio-ay34sh1f.stx +73 -0
- package/dist/{Image-6d7ssp75.stx → Image-68hcqnkg.stx} +31 -12
- package/dist/{Video-nnac6rat.stx → Video-sc26cz9v.stx} +3 -2
- package/dist/index.js +2 -2
- package/dist/ui/audio/index.d.ts +9 -0
- package/dist/ui/image/index.d.ts +9 -1
- package/dist/ui/video/index.d.ts +7 -0
- package/package.json +3 -3
- package/src/ui/audio/Audio.stx +67 -44
- package/src/ui/audio/README.md +12 -4
- package/src/ui/audio/index.ts +10 -0
- package/src/ui/image/Image.stx +31 -12
- package/src/ui/image/README.md +10 -4
- package/src/ui/image/index.ts +10 -1
- package/src/ui/video/README.md +21 -0
- package/src/ui/video/Video.stx +3 -2
- package/src/ui/video/index.ts +8 -0
- package/dist/Audio-byv8kkvt.stx +0 -50
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
const src = $props.src || ''
|
|
3
|
+
const sources = Array.isArray($props.sources) ? $props.sources : []
|
|
4
|
+
const tracks = Array.isArray($props.tracks) ? $props.tracks : []
|
|
5
|
+
const title = $props.title || 'Audio player'
|
|
6
|
+
const artist = $props.artist || ''
|
|
7
|
+
const artwork = $props.artwork || ''
|
|
8
|
+
const waveform = $props.waveform || ''
|
|
9
|
+
const controls = $bool($props.controls, true)
|
|
10
|
+
const preload = $props.preload || 'metadata'
|
|
11
|
+
const crossorigin = $props.crossorigin || ''
|
|
12
|
+
const className = $props.className || $props.class || ''
|
|
13
|
+
const playerSources = (sources.length ? sources : src ? [{ src }] : []).map(source => $props.drm && (source.type === 'application/dash+xml' || source.src.split(/[?#]/, 1)[0].toLowerCase().endsWith('.mpd')) ? { ...source, type: 'application/dash+xml', drm: $props.drm } : source)
|
|
14
|
+
const playerTracks = tracks.map(track => ({ ...track, language: track.srclang }))
|
|
15
|
+
const playerConfig = JSON.stringify({ sources: playerSources, tracks: playerTracks, ...($props.drm ? { drm: $props.drm } : {}) }).replaceAll('<', '\\u003c').replaceAll('>', '\\u003e').replaceAll('&', '\\u0026')
|
|
16
|
+
const autoplay = $bool($props.autoplay)
|
|
17
|
+
const loop = $bool($props.loop)
|
|
18
|
+
const muted = $bool($props.muted)
|
|
19
|
+
const showWaveform = $bool($props.showWaveform)
|
|
20
|
+
const waveformBars = [20, 35, 60, 90, 55, 25, 45, 70, 40, 25]
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<script client>
|
|
24
|
+
import { registerElements } from 'ts-video-player/elements'
|
|
25
|
+
registerElements()
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<figure class="m-0 overflow-hidden rounded-2xl bg-panel shadow-sm ring-1 ring-line {{ className }}">
|
|
29
|
+
<div class="flex gap-4 items-center p-4 sm:p-5">
|
|
30
|
+
@if(artwork)
|
|
31
|
+
<img src="{{ artwork }}" alt="" width="72" height="72" loading="lazy" decoding="async" class="object-cover shrink-0 h-18 w-18 ring-1 ring-line rounded-control">
|
|
32
|
+
@else
|
|
33
|
+
<div class="flex items-center justify-center shrink-0 h-18 w-18 text-fg-muted bg-surface-raised rounded-xl" aria-hidden="true"><span class="h-7 w-7 i-hugeicons-music-note-01"></span></div>
|
|
34
|
+
@endif
|
|
35
|
+
<div class="flex-1 min-w-0">
|
|
36
|
+
<figcaption class="font-semibold text-sm text-fg truncate">{{ title }}</figcaption>
|
|
37
|
+
@if(artist)<p class="mt-0.5 text-sm text-fg-muted truncate">{{ artist }}</p>@endif
|
|
38
|
+
@if(showWaveform && !waveform)<div aria-hidden="true" class="flex items-center gap-1 mt-3 h-10 rounded bg-surface-raised">@foreach(waveformBars as bar)<span class="flex-1 bg-current opacity-40" style="height: {{ bar }}%"></span>@endforeach</div>@endif
|
|
39
|
+
@if(waveform)<img src="{{ waveform }}" alt="" loading="lazy" decoding="async" class="object-cover mt-3 h-10 w-full opacity-70 dark:opacity-80">@endif
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="p-3 bg-surface border-line border-t">
|
|
43
|
+
<video-player @if(src) src="{{ src }}" @endif title="{{ title }}" data-media-config="{{ playerConfig }}" @if(controls) controls @endif @if(autoplay) autoplay @endif @if(loop) loop @endif @if(muted) muted @endif preload="{{ preload }}" @if(crossorigin) crossorigin="{{ crossorigin }}" @endif keep-alive aria-label="{{ title }}" class="block overflow-hidden relative h-16 w-full text-white rounded-xl focus-within:ring-2 focus-within:ring-accent">
|
|
44
|
+
<media-error-display></media-error-display>
|
|
45
|
+
<audio data-native-fallback @if(src) src="{{ src }}" @endif @if(controls) controls @endif @if(loop) loop @endif @if(muted) muted @endif preload="none" @if(crossorigin) crossorigin="{{ crossorigin }}" @endif aria-label="{{ title }}" class="block h-16 w-full accent-accent">
|
|
46
|
+
@foreach (sources as source)<source src="{{ source.src }}" @if(source.type) type="{{ source.type }}" @endif>@endforeach
|
|
47
|
+
@foreach (tracks as track)<track src="{{ track.src }}" kind="{{ track.kind }}" @if(track.srclang) srclang="{{ track.srclang }}" @endif @if(track.label) label="{{ track.label }}" @endif @if(track.default) default @endif>@endforeach
|
|
48
|
+
Your browser does not support audio playback.
|
|
49
|
+
</audio>
|
|
50
|
+
@if(controls)
|
|
51
|
+
<video-skin>
|
|
52
|
+
<media-seek-button slot="left" seconds="-10"></media-seek-button>
|
|
53
|
+
<media-play-button slot="left"></media-play-button>
|
|
54
|
+
<media-seek-button slot="left" seconds="10"></media-seek-button>
|
|
55
|
+
<media-time-group slot="center" class="font-mono tabular-nums text-xs"></media-time-group>
|
|
56
|
+
<media-progress-bar slot="center" @if(waveform) waveform="{{ waveform }}" @endif></media-progress-bar>
|
|
57
|
+
<media-mute-button slot="right"></media-mute-button>
|
|
58
|
+
<media-volume-slider slot="right"></media-volume-slider>
|
|
59
|
+
<media-playback-rate-button slot="right" rates="0.5,0.75,1,1.25,1.5,2"></media-playback-rate-button>
|
|
60
|
+
<media-settings-menu slot="right"></media-settings-menu>
|
|
61
|
+
<media-airplay-button slot="right"></media-airplay-button>
|
|
62
|
+
<media-remote-playback-button slot="right"></media-remote-playback-button>
|
|
63
|
+
</video-skin>
|
|
64
|
+
@endif
|
|
65
|
+
</video-player>
|
|
66
|
+
</div>
|
|
67
|
+
</figure>
|
|
68
|
+
|
|
69
|
+
<style>
|
|
70
|
+
video-player:not(:defined) video-skin { display: none; }
|
|
71
|
+
video-player:defined > [data-native-fallback] { display: none; }
|
|
72
|
+
@media (prefers-reduced-motion: reduce) { video-player, video-player * { transition-duration: 0.01ms !important; } }
|
|
73
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script server>
|
|
2
|
-
import { deliveredImage } from '@stacksjs/stx'
|
|
2
|
+
import { deliveredImage, getImagePlaceholder } from '@stacksjs/stx'
|
|
3
3
|
|
|
4
4
|
export const webpSrc = $props.webpSrc || ''
|
|
5
5
|
export const webpSrcSet = $props.webpSrcSet || ''
|
|
@@ -15,19 +15,25 @@ export const webpSrcSet = $props.webpSrcSet || ''
|
|
|
15
15
|
* a bare `<Image>` tag resolves to, and every image in the app went out as the
|
|
16
16
|
* original full-size file.
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
18
|
+
const explicitSources = Array.isArray($props.sources) ? $props.sources : []
|
|
19
|
+
const explicitSrcSet = $props.srcSet || $props.srcset || ''
|
|
20
|
+
const delivered = !explicitSrcSet && !explicitSources.length && !webpSrc && !webpSrcSet ? deliveredImage($props.src || '') : undefined
|
|
19
21
|
|
|
20
22
|
export const src = delivered ? delivered.src : ($props.src || '')
|
|
21
|
-
export const srcSet = delivered ? delivered.srcset :
|
|
23
|
+
export const srcSet = delivered ? delivered.srcset : explicitSrcSet
|
|
22
24
|
// Width descriptors mean nothing without `sizes`; 100vw is what a browser
|
|
23
25
|
// assumes anyway, said out loud.
|
|
24
26
|
export const sizes = $props.sizes || (delivered ? '100vw' : '')
|
|
25
|
-
export const sources = delivered ? delivered.sources : []
|
|
26
|
-
export const
|
|
27
|
+
export const sources = explicitSources.length ? explicitSources : (delivered ? delivered.sources : [])
|
|
28
|
+
export const decorative = $bool($props.decorative)
|
|
29
|
+
if (!decorative && !$props.alt?.trim())
|
|
30
|
+
throw new TypeError('Image alt text is required unless decorative is true')
|
|
31
|
+
export const alt = decorative ? '' : $props.alt
|
|
27
32
|
export const width = $props.width || delivered?.width
|
|
28
33
|
export const height = $props.height || delivered?.height
|
|
29
34
|
export const priority = $bool($props.priority)
|
|
30
|
-
export const lazy =
|
|
35
|
+
export const lazy = $bool($props.lazy, true)
|
|
36
|
+
export const loading = priority ? 'eager' : ($props.loading || (lazy ? 'lazy' : 'eager'))
|
|
31
37
|
export const decoding = $props.decoding || 'async'
|
|
32
38
|
export const fetchpriority = priority ? 'high' : ($props.fetchpriority || 'auto')
|
|
33
39
|
|
|
@@ -40,13 +46,20 @@ export const fetchpriority = priority ? 'high' : ($props.fetchpriority || 'auto'
|
|
|
40
46
|
* through anything transparent in it and stays there once it has loaded,
|
|
41
47
|
* which is a permanent artefact on every PNG with an alpha channel.
|
|
42
48
|
*/
|
|
43
|
-
|
|
49
|
+
const placeholderMode = $props.placeholder
|
|
50
|
+
const imagePlaceholder = getImagePlaceholder($props.src || '')
|
|
51
|
+
const placeholderColor = $props.placeholderColor || imagePlaceholder?.color || '#e5e7eb'
|
|
52
|
+
const preview = delivered?.placeholder || imagePlaceholder?.dataUrl
|
|
53
|
+
export const placeholder = placeholderMode === 'empty' || placeholderMode === 'none' ? ''
|
|
54
|
+
: placeholderMode === 'color' ? (imagePlaceholder?.transparent ? '' : placeholderColor)
|
|
55
|
+
: placeholderMode === 'blur' || placeholderMode === 'thumbhash' ? (imagePlaceholder?.transparent ? '' : preview ? `url("${preview}")` : placeholderColor)
|
|
56
|
+
: placeholderMode || (delivered?.placeholder ? `url("${delivered.placeholder}")` : '')
|
|
44
57
|
export const aspectRatio = $props.aspectRatio
|
|
45
|
-
export const objectFit = $props.objectFit || 'cover'
|
|
46
|
-
export const objectPosition = $props.objectPosition || 'center'
|
|
58
|
+
export const objectFit = $props.objectFit || $props.fit || 'cover'
|
|
59
|
+
export const objectPosition = $props.objectPosition || $props.position || 'center'
|
|
47
60
|
export const rounded = $bool($props.rounded)
|
|
48
61
|
export const zoomOnHover = $bool($props.zoomOnHover)
|
|
49
|
-
export const className = $props.className || ''
|
|
62
|
+
export const className = $props.className || $props.class || ''
|
|
50
63
|
|
|
51
64
|
export const hasWebP = !!(webpSrc || webpSrcSet)
|
|
52
65
|
|
|
@@ -109,7 +122,12 @@ export const imageStyle = [
|
|
|
109
122
|
|
|
110
123
|
<picture class="{{ className }}" style="{{ frameStyle }}">
|
|
111
124
|
@foreach(sources as source)
|
|
112
|
-
<source
|
|
125
|
+
<source
|
|
126
|
+
@if(source.type)type="{{ source.type }}"@endif
|
|
127
|
+
@if(source.media)media="{{ source.media }}"@endif
|
|
128
|
+
srcset="{{ source.srcset }}"
|
|
129
|
+
@if(source.sizes || sizes)sizes="{{ source.sizes || sizes }}"@endif
|
|
130
|
+
/>
|
|
113
131
|
@endforeach
|
|
114
132
|
@if(hasWebP)
|
|
115
133
|
<source
|
|
@@ -136,7 +154,8 @@ export const imageStyle = [
|
|
|
136
154
|
alt="{{ alt }}"
|
|
137
155
|
@if(width)width="{{ width }}"@endif
|
|
138
156
|
@if(height)height="{{ height }}"@endif
|
|
139
|
-
loading="{{
|
|
157
|
+
loading="{{ loading }}"
|
|
158
|
+
@if(decorative)aria-hidden="true"@endif
|
|
140
159
|
decoding="{{ decoding }}"
|
|
141
160
|
fetchpriority="{{ fetchpriority }}"
|
|
142
161
|
style="{{ imageStyle }}"
|
|
@@ -52,9 +52,10 @@ export const aspectRatio = ratio($props.aspectRatio)
|
|
|
52
52
|
|
|
53
53
|
const sources = Array.isArray($props.sources) ? $props.sources : []
|
|
54
54
|
const tracks = Array.isArray($props.tracks) ? $props.tracks : []
|
|
55
|
-
const
|
|
55
|
+
const drm = $props.drm
|
|
56
|
+
const playerSources = (sources.length ? sources : src ? [{ src }] : []).map(source => drm && (source.type === 'application/dash+xml' || source.src.split(/[?#]/, 1)[0].toLowerCase().endsWith('.mpd')) ? { ...source, type: 'application/dash+xml', drm } : source)
|
|
56
57
|
const playerTracks = tracks.map(track => ({ ...track, language: track.srclang }))
|
|
57
|
-
export const playerConfig = JSON.stringify({ sources: playerSources, tracks: playerTracks })
|
|
58
|
+
export const playerConfig = JSON.stringify({ sources: playerSources, tracks: playerTracks, ...(drm ? { drm } : {}) })
|
|
58
59
|
.replaceAll('<', '\\u003c').replaceAll('>', '\\u003e').replaceAll('&', '\\u0026')
|
|
59
60
|
|
|
60
61
|
/*
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var Ke={__stx:!0,src:"./components/CodeBlock.stx"};var _e={__stx:!0,src:"./components/Footer.stx"};var Ue={__stx:!0,src:"./components/Hero.stx"};var Je={__stx:!0,src:"./components/Installation.stx"};function mr(e){let{code:t,onSuccess:s,onError:o,timeout:n=2000}=e,a=!1,r=null;return{copied:a,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),a=!0,s?.(),r=setTimeout(()=>{a=!1,r=null},n)}catch(p){let u=p instanceof Error?p:Error("Failed to copy code");o?.(u),console.error("Failed to copy code:",u)}},reset:()=>{if(a=!1,r)clearTimeout(r),r=null}}}async function gr(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function Ge(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function be(e){return e==="system"?Ge():e}function xr(e={}){let{storageKey:t="theme",defaultTheme:s="system"}=e,o=s;if(typeof window<"u"&&typeof localStorage<"u"){let c=localStorage.getItem(t);if(c)o=c}let n=be(o)==="dark",a=(c)=>{let p=be(c);if(typeof document<"u")if(p==="dark")document.documentElement.classList.add("dark");else document.documentElement.classList.remove("dark");if(typeof localStorage<"u")localStorage.setItem(t,c)},r=(c)=>{o=c,a(c)},i=()=>{let p=be(o)==="dark"?"light":"dark";r(p)};if(a(o),typeof window<"u"&&o==="system")window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(c)=>{if(o==="system")a("system")});return{isDark:n,theme:o,toggle:i,setTheme:r}}function Ye(e,t){if(typeof document>"u")return;document.title=t?t.replace("%s",e):e}function O(e,t,s=!1){if(typeof document>"u")return;let o=s?"property":"name",n=document.querySelector(`meta[${o}="${e}"]`);if(!n)n=document.createElement("meta"),n.setAttribute(o,e),document.head.appendChild(n);n.setAttribute("content",t)}function Xe(e,t){if(typeof document>"u")return;let s=document.querySelector(`link[rel="${e}"]`);if(!s)s=document.createElement("link"),s.setAttribute("rel",e),document.head.appendChild(s);s.setAttribute("href",t)}function wr(e){let{title:t,description:s,author:o,keywords:n,ogImage:a,ogImageWidth:r,ogImageHeight:i,twitterCard:c="summary_large_image",twitterSite:p,twitterCreator:u,canonical:d}=e;if(t)Ye(t),O("og:title",t,!0),O("twitter:title",t);if(s)O("description",s),O("og:description",s,!0),O("twitter:description",s);if(o)O("author",o);if(n&&n.length>0)O("keywords",n.join(", "));if(a)O("og:image",a,!0),O("twitter:image",a);if(r)O("og:image:width",r,!0);if(i)O("og:image:height",i,!0);if(O("twitter:card",c),p)O("twitter:site",p);if(u)O("twitter:creator",u);if(d)Xe("canonical",d);if(O("og:type","website",!0),typeof window<"u")O("og:url",window.location.href,!0)}function yr(e){let t=[],{title:s,description:o,author:n,keywords:a,ogImage:r,ogImageWidth:i,ogImageHeight:c,twitterCard:p="summary_large_image",twitterSite:u,twitterCreator:d,canonical:g}=e;if(s)t.push(`<title>${N(s)}</title>`),t.push(`<meta property="og:title" content="${N(s)}" />`),t.push(`<meta name="twitter:title" content="${N(s)}" />`);if(o)t.push(`<meta name="description" content="${N(o)}" />`),t.push(`<meta property="og:description" content="${N(o)}" />`),t.push(`<meta name="twitter:description" content="${N(o)}" />`);if(n)t.push(`<meta name="author" content="${N(n)}" />`);if(a&&a.length>0)t.push(`<meta name="keywords" content="${N(a.join(", "))}" />`);if(r)t.push(`<meta property="og:image" content="${N(r)}" />`),t.push(`<meta name="twitter:image" content="${N(r)}" />`);if(i)t.push(`<meta property="og:image:width" content="${N(i)}" />`);if(c)t.push(`<meta property="og:image:height" content="${N(c)}" />`);if(t.push(`<meta name="twitter:card" content="${N(p)}" />`),u)t.push(`<meta name="twitter:site" content="${N(u)}" />`);if(d)t.push(`<meta name="twitter:creator" content="${N(d)}" />`);if(g)t.push(`<link rel="canonical" href="${N(g)}" />`);return t.push('<meta property="og:type" content="website" />'),t.join(`
|
|
3
|
-
`)}function N(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Cr(e,t,s={}){let{enabled:o=!0,ignore:n=[]}=s,a=(r)=>{if(!o||!e)return;let i=r.target;if(!e.contains(i)){if(!n.some((p)=>{let u=document.querySelectorAll(p);return Array.from(u).some((d)=>d.contains(i))}))t(r)}};if(typeof document<"u")document.addEventListener("mousedown",a),document.addEventListener("touchstart",a);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}}function Sr(e,t={}){let{enabled:s=!0,initialFocus:o=null,returnFocus:n=!0,fallbackFocus:a=null}=t,r=null,i=!1;function c(){if(!e)return[];let f=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(f))}function p(f){if(!s||!i||!e)return;let y=c();if(y.length===0){f.preventDefault();return}let C=y[0],k=y[y.length-1];if(f.shiftKey){if(document.activeElement===C||document.activeElement===e)f.preventDefault(),k.focus()}else if(document.activeElement===k)f.preventDefault(),C.focus()}function u(f){if(f.key==="Escape"&&s&&i)g()}function d(){if(!s||!e||i)return;if(r=document.activeElement,o)o.focus();else{let f=c();if(f.length>0)f[0].focus();else if(a)a.focus();else e.focus()}document.addEventListener("keydown",p),document.addEventListener("keydown",u),i=!0}function g(){if(!i)return;if(document.removeEventListener("keydown",p),document.removeEventListener("keydown",u),n&&r)r.focus();i=!1}return{activate:d,deactivate:g}}function Er(e,t={}){let{enabled:s=!0,preventDefault:o=!0,stopPropagation:n=!1,target:a=typeof document<"u"?document:null}=t,r=Array.isArray(e)?e:[e],i=(c)=>{if(!s)return;r.forEach((p)=>{if(!(Array.isArray(p.key)?p.key:[p.key]).some((g)=>g.toLowerCase()===c.key.toLowerCase()))return;if(p.ctrl!==void 0&&p.ctrl!==c.ctrlKey)return;if(p.shift!==void 0&&p.shift!==c.shiftKey)return;if(p.alt!==void 0&&p.alt!==c.altKey)return;if(p.meta!==void 0&&p.meta!==c.metaKey)return;if(o)c.preventDefault();if(n)c.stopPropagation();p.handler(c)})};if(a)a.addEventListener("keydown",i);return()=>{if(a)a.removeEventListener("keydown",i)}}var Ir={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function Pr(e,t,s={}){let{serializer:o=JSON.stringify,deserializer:n=JSON.parse,onError:a=console.error}=s,r=t;try{if(typeof window<"u"){let d=window.localStorage.getItem(e);if(d!==null)r=n(d)}}catch(d){a(d)}let i=r,c=new Set;function p(d){try{let g=typeof d==="function"?d(i):d;if(i=g,typeof window<"u")window.localStorage.setItem(e,o(g));c.forEach((f)=>f(g))}catch(g){a(g)}}function u(){try{if(i=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((d)=>d(t))}catch(d){a(d)}}if(typeof window<"u"){let d=(g)=>{if(g.key===e&&g.newValue!==null)try{let f=n(g.newValue);i=f,c.forEach((y)=>y(f))}catch(f){a(f)}else if(g.key===e&&g.newValue===null)i=t,c.forEach((f)=>f(t))};window.addEventListener("storage",d)}return{value:i,setValue:p,removeValue:u}}function Y(e,t={}){let{defaultValue:s=!1}=t,o=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),o=n.matches;let r=(i)=>{o=i.matches};if(n.addEventListener)n.addEventListener("change",r);else n.addListener(r)}function a(){if(n)o=n.matches}return{matches:o,updateMatches:a}}var X={xs:"(min-width: 320px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)",mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",reducedMotion:"(prefers-reduced-motion: reduce)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Or(e){return Y(X[e])}function Nr(){return Y(X.mobile)}function Dr(){return Y(X.desktop)}function Mr(){return Y(X.dark)}function Rr(){return Y(X.reducedMotion)}function te(){return globalThis.stx?.overlays}function jr(e,t){te()?.open(e,t)}function Hr(e){te()?.close(e)}function Fr(e){return te()?.isTop(e)??!1}function Vr(){return te()?.list()??[]}var Ee=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],qr="--stx-color";function Qe(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function Wr(e={}){let t={};for(let s of Ee){let o=e[s];if(!o||typeof o==="string")continue;let n={};for(let[a,r]of Object.entries(o))n[a]=Qe(`--stx-color-${s}-${a}`,r);t[s]=n}return t}function Kr(e={}){let t=[];for(let s of Ee){let o=e[s];if(!o||typeof o==="string")continue;for(let n of Object.keys(o))t.push(`--stx-color-${s}-${n}`)}return t}var et="./Accordion-ehpymjam.stx";var st="./AccordionItem-fc4ekdqf.stx";var nt="./Audio-
|
|
3
|
+
`)}function N(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Cr(e,t,s={}){let{enabled:o=!0,ignore:n=[]}=s,a=(r)=>{if(!o||!e)return;let i=r.target;if(!e.contains(i)){if(!n.some((p)=>{let u=document.querySelectorAll(p);return Array.from(u).some((d)=>d.contains(i))}))t(r)}};if(typeof document<"u")document.addEventListener("mousedown",a),document.addEventListener("touchstart",a);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}}function Sr(e,t={}){let{enabled:s=!0,initialFocus:o=null,returnFocus:n=!0,fallbackFocus:a=null}=t,r=null,i=!1;function c(){if(!e)return[];let f=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(f))}function p(f){if(!s||!i||!e)return;let y=c();if(y.length===0){f.preventDefault();return}let C=y[0],k=y[y.length-1];if(f.shiftKey){if(document.activeElement===C||document.activeElement===e)f.preventDefault(),k.focus()}else if(document.activeElement===k)f.preventDefault(),C.focus()}function u(f){if(f.key==="Escape"&&s&&i)g()}function d(){if(!s||!e||i)return;if(r=document.activeElement,o)o.focus();else{let f=c();if(f.length>0)f[0].focus();else if(a)a.focus();else e.focus()}document.addEventListener("keydown",p),document.addEventListener("keydown",u),i=!0}function g(){if(!i)return;if(document.removeEventListener("keydown",p),document.removeEventListener("keydown",u),n&&r)r.focus();i=!1}return{activate:d,deactivate:g}}function Er(e,t={}){let{enabled:s=!0,preventDefault:o=!0,stopPropagation:n=!1,target:a=typeof document<"u"?document:null}=t,r=Array.isArray(e)?e:[e],i=(c)=>{if(!s)return;r.forEach((p)=>{if(!(Array.isArray(p.key)?p.key:[p.key]).some((g)=>g.toLowerCase()===c.key.toLowerCase()))return;if(p.ctrl!==void 0&&p.ctrl!==c.ctrlKey)return;if(p.shift!==void 0&&p.shift!==c.shiftKey)return;if(p.alt!==void 0&&p.alt!==c.altKey)return;if(p.meta!==void 0&&p.meta!==c.metaKey)return;if(o)c.preventDefault();if(n)c.stopPropagation();p.handler(c)})};if(a)a.addEventListener("keydown",i);return()=>{if(a)a.removeEventListener("keydown",i)}}var Ir={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function Pr(e,t,s={}){let{serializer:o=JSON.stringify,deserializer:n=JSON.parse,onError:a=console.error}=s,r=t;try{if(typeof window<"u"){let d=window.localStorage.getItem(e);if(d!==null)r=n(d)}}catch(d){a(d)}let i=r,c=new Set;function p(d){try{let g=typeof d==="function"?d(i):d;if(i=g,typeof window<"u")window.localStorage.setItem(e,o(g));c.forEach((f)=>f(g))}catch(g){a(g)}}function u(){try{if(i=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((d)=>d(t))}catch(d){a(d)}}if(typeof window<"u"){let d=(g)=>{if(g.key===e&&g.newValue!==null)try{let f=n(g.newValue);i=f,c.forEach((y)=>y(f))}catch(f){a(f)}else if(g.key===e&&g.newValue===null)i=t,c.forEach((f)=>f(t))};window.addEventListener("storage",d)}return{value:i,setValue:p,removeValue:u}}function Y(e,t={}){let{defaultValue:s=!1}=t,o=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),o=n.matches;let r=(i)=>{o=i.matches};if(n.addEventListener)n.addEventListener("change",r);else n.addListener(r)}function a(){if(n)o=n.matches}return{matches:o,updateMatches:a}}var X={xs:"(min-width: 320px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)",mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",reducedMotion:"(prefers-reduced-motion: reduce)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Or(e){return Y(X[e])}function Nr(){return Y(X.mobile)}function Dr(){return Y(X.desktop)}function Mr(){return Y(X.dark)}function Rr(){return Y(X.reducedMotion)}function te(){return globalThis.stx?.overlays}function jr(e,t){te()?.open(e,t)}function Hr(e){te()?.close(e)}function Fr(e){return te()?.isTop(e)??!1}function Vr(){return te()?.list()??[]}var Ee=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],qr="--stx-color";function Qe(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function Wr(e={}){let t={};for(let s of Ee){let o=e[s];if(!o||typeof o==="string")continue;let n={};for(let[a,r]of Object.entries(o))n[a]=Qe(`--stx-color-${s}-${a}`,r);t[s]=n}return t}function Kr(e={}){let t=[];for(let s of Ee){let o=e[s];if(!o||typeof o==="string")continue;for(let n of Object.keys(o))t.push(`--stx-color-${s}-${n}`)}return t}var et="./Accordion-ehpymjam.stx";var st="./AccordionItem-fc4ekdqf.stx";var nt="./Audio-ay34sh1f.stx";var rt="./Login-4666t7j4.stx";var lt="./Signup-pm2r0f2m.stx";var dt="./TwoFactorChallenge-3tsbfdsd.stx";var ut="./Avatar-6gexb2xv.stx";var ft="./Badge-33phrqza.stx";var gt="./Breadcrumb-cgw1bb6s.stx";class R extends Error{component;context;constructor(e,t,s={}){let o=R.formatMessage(e,t,s);super(o);if(this.name="ComponentError",this.component=e,this.context={component:e,...s},Error.captureStackTrace)Error.captureStackTrace(this,R)}static formatMessage(e,t,s){let o=`[${e}] ${t}`;if(s.prop)o+=`
|
|
4
4
|
Prop: "${s.prop}"`;if(s.received!==void 0)o+=`
|
|
5
5
|
Received: ${JSON.stringify(s.received)}`;if(s.expected!==void 0){let n=Array.isArray(s.expected)?s.expected.map((a)=>JSON.stringify(a)).join(", "):JSON.stringify(s.expected);o+=`
|
|
6
6
|
Expected: ${n}`}if(s.details)o+=`
|
|
@@ -8,7 +8,7 @@ var Ke={__stx:!0,src:"./components/CodeBlock.stx"};var _e={__stx:!0,src:"./compo
|
|
|
8
8
|
Documentation: ${s.docsUrl}`;else if(e)o+=`
|
|
9
9
|
Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return o}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var J={invalidProp(e,t,s,o){return new R(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:o,details:Array.isArray(o)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new R(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,o){return new R(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:o,details:`Expected "${t}" to be of type ${o}, but received ${typeof s}`})},componentNotFound(e){return new R("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new R(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new R(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new R(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new R(e,"Failed to render component",{details:t.message})}},se=null;function bi(e){se=e}function xi(){se=null}function oe(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof R)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(se)try{se(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function Ie(e,t,s){return(...o)=>{try{let n=e(...o);if(n instanceof Promise)return n.catch((a)=>{let r=J.eventHandler(t,s,a);throw oe(r,{throwError:!1}),r});return n}catch(n){let a=J.eventHandler(t,s,n);throw oe(a,{throwError:!1}),a}}}function bt(e,t){if(!e)throw t}function xt(e,t,s={}){let o=R.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${o}`)}function vi(e,t){bt(e,t)}function wi(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,o){xt(e,s,o)},error(s,o){let n=new R(e,s,o);oe(n,{throwError:!1})}}}function yi(e,t,s){try{return t()}catch(o){let n=J.render(e,o);return oe(n,{throwError:!1}),s}}class L{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new L(this.validate,this.message,!0)}}var l={string:new L((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new L((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new L((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new L((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new L((e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`object\`.`),array:new L((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new L(()=>!0,()=>""),oneOf(e){return new L((t)=>e.includes(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected one of [${e.map((n)=>JSON.stringify(n)).join(", ")}].`)},oneOfType(e){return new L((t,s,o)=>e.some((n)=>n.validate(t,s,o)),(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected one of the specified types.`)},arrayOf(e){return new L((t,s,o)=>{if(!Array.isArray(t))return!1;return t.every((n,a)=>e.validate(n,`${s}[${a}]`,o))},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected array of specified type.`)},shape(e){return new L((t,s,o)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[n,a]of Object.entries(e)){if(a.isRequired&&!(n in t))return!1;if(n in t&&!a.validate(t[n],`${s}.${n}`,o))return!1}return!0},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected object matching specified shape.`)},instanceOf(e){return new L((t)=>t instanceof e,(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new L(e,typeof t==="string"?()=>t:t)},min(e){return new L((t)=>typeof t==="number"&&t>=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value >= ${e}.`)},max(e){return new L((t)=>typeof t==="number"&&t<=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value <= ${e}.`)},range(e,t){return new L((s)=>typeof s==="number"&&s>=e&&s<=t,(s,o,n)=>`Invalid prop \`${o}\` of value \`${s}\` supplied to \`${n}\`, expected value between ${e} and ${t}.`)},pattern(e){return new L((t)=>typeof t==="string"&&e.test(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value matching pattern ${e}.`)},email:new L((e)=>typeof e==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid email address.`),url:new L((e)=>{if(typeof e!=="string")return!1;try{let t=new URL(e);return!0}catch{return!1}},(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid URL.`)};function vt(e,t,s,o={}){let{throwOnError:n=!1,logWarnings:a=!0}=o,r=[];for(let[i,c]of Object.entries(s)){let p=t[i],u=p===void 0;if(c.isRequired&&u){let d=`Required prop \`${i}\` was not specified in \`${e}\`.`;r.push(d);continue}if(u)continue;if(!c.validate(p,i,e)){let d=c.message(p,i,e);r.push(d)}}if(r.length>0){if(a)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),r.forEach((i)=>console.warn(i)),console.groupEnd();if(n)throw Error(`Prop validation failed for \`${e}\`:
|
|
10
10
|
${r.join(`
|
|
11
|
-
`)}`)}return{valid:r.length===0,errors:r}}function H(e,t,s){return(o)=>vt(e,o,t,s)}function Ci(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function $i(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var yt="./Button-bpjmfkq6.stx";var kt={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Ai=H("Button",kt);function Pi(e){return Ie(e,"Button","onClick")}function Li(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Oi(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var $t="./Calendar-5vs6x7gj.stx";var Tt="./DateRangePicker-4zmf34e4.stx";var It="./EmptyState-s790dbym.stx";var Pt="./ThemeToggle-4wm9zare.stx";var Ot="./Card-r55zpjqh.stx";var Dt="./Checkbox-kepzk3h5.stx";var Rt="./Combobox-9n04ec5w.stx";var jt="./ComboboxButton-4r6a45s1.stx";var Ft="./ComboboxInput-1gyfpnca.stx";var Bt="./ComboboxOption-wkw70js7.stx";var Wt="./ComboboxOptions-zhr9b6rx.stx";var _t="./CommandPalette-qqjdbcyg.stx";var Jt="./CommandPaletteItem-7290ce1z.stx";var Yt="./Dialog-pdq8rxvy.stx";var Qt="./DialogBackdrop-de5m5m4w.stx";var es="./DialogDescription-gth4c2kx.stx";var ss="./DialogPanel-vhdqymc2.stx";var ns="./DialogTitle-ke58hh68.stx";var rs="./Drawer-nmq100vy.stx";var ls="./Dropdown-hb8ks69x.stx";var ds="./DropdownButton-wxc25hsy.stx";var us="./DropdownItem-af0vzc8a.stx";var fs="./DropdownItems-bkz7jkyz.stx";var gs="./Form-ewzy10ye.stx";var bs={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},Fl=H("Form",bs);var vs="./Image-6d7ssp75.stx";var ys="./EmailInput-57626391.stx";var Cs="./NumberInput-pq4k2k4k.stx";var Ss="./PasswordInput-dg41ktgd.stx";var Es="./SearchInput-w15r5t95.stx";var As="./TextInput-nknmz9md.stx";var Ps={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Ls={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},Os={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Ns={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},Ds={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Ql=H("TextInput",Ls),Zl=H("EmailInput",Ps),ec=H("PasswordInput",Ns),tc=H("NumberInput",Os),sc=H("SearchInput",Ds);var Rs="./Listbox-83j2q4x6.stx";var js="./ListboxButton-gan8e3nw.stx";var Fs="./ListboxLabel-ka0hfm7b.stx";var Bs="./ListboxOption-gpaqvk3s.stx";var Ws="./ListboxOptions-2928864k.stx";var _s="./FilterChip-00ja5jhz.stx";var Js="./FilterChips-7pnzycfd.stx";var Ys="./ListRow-8d3e1yxh.stx";var Qs="./NavBar-qqrrhdnk.stx";var eo="./SectionCard-8ctdacjr.stx";var so="./TabBar-8143650x.stx";var no="./TabBarItem-kddfnhk3.stx";var ro="./Navigator-1yk1c3pp.stx";var lo="./Notification-b3cz24f0.stx";var po="./Pager-kh6s65t2.stx";var ho="./PagerDots-076w890y.stx";var mo="./Pagination-8bhbkpcp.stx";var bo="./Checkout-crbegxyv.stx";var vo="./DefaultPaymentMethod-ss3x61tr.stx";var yo="./PaymentMethods-z4hhr0kv.stx";var Co="./SubscriptionCheckout-rdcv32n1.stx";var So="./Popover-khtvagcs.stx";var Eo="./PopoverButton-3w6550hv.stx";var Ao="./PopoverPanel-d84gk1w1.stx";var Lo="./Portal-m73vz879.stx";var No="./Progress-2qzb77kc.stx";var Mo="./Radio-8153x74w.stx";var zo="./RadioGroup-smqcqgds.stx";var Ho="./RadioGroupDescription-z34r9avr.stx";var Vo="./RadioGroupLabel-ka0hfm7b.stx";var qo="./RadioGroupOption-twcw1b2a.stx";var Ko="./Select-61zv5tr7.stx";var Uo="./Sidebar-8dygywjv.stx";var Go="./SidebarFooter-s7skj92y.stx";var Xo="./SidebarHeader-x7jdhmyr.stx";var Zo="./SidebarItem-r4f2pref.stx";var tn="./SidebarPinned-48kyk193.stx";var on="./SidebarSection-5sqza2j6.stx";var an="./SidebarSpace-bwv98azf.stx";var ln="./SidebarSpaces-mdtrynr2.stx";var dn="./SidebarSpaceSwitcher-1mycft2g.stx";var ne={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},pn={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},un={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},hn={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},fn={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},mn={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},gn={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ae={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:hn,workspace:pn,desktop:un,solid:fn,transparent:mn,vibrancy:gn};function Vd(e){return Ae[e||"macos"]||Ae.macos}function Bd(e){if(!e)return;return ne[e]||e}var bn=ne.gray;function q(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Pe(e){return{light:{from:q(e,35,"#ffffff"),to:q(e,12.5,"#ffffff"),ink:q(e,22,"#17171b"),accent:q(e,88,"#2a2a30")},dark:{from:q(e,27,"#101014"),to:q(e,10,"#08080b"),ink:q(e,12,"#f4f4f7"),accent:q(e,74,"#ffffff")}}}function Kd(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function xn(e){if(!e)return Pe(bn);if(typeof e!=="string")return e;return Pe(ne[e]||e)}function vn(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Le(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function wn(e){let t=xn(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Le(e.action,e.id,"action","i-f7-plus"),clear:Le(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:vn(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function _d(e){return(e||[]).map(wn)}function Ud(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Jd(e){return e.map((t)=>t.tint)}var kn="./Skeleton-m4p66zcs.stx";var $n="./Spinner-vhnc3y03.stx";var Tn="./Stepper-68gxcmej.stx";var In="./StepperStep-zf4pq1s0.stx";class ae{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((a)=>a(n,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],n="";for(let a=0;a<e.length;a++){let r=e.charAt(a),i=n+r;if(t[i]!==void 0)n=i;else o.push(n.length>1?t[n]:n.charCodeAt(0)),t[i]=s++,n=r}if(n!=="")o.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,n=String.fromCharCode(t[0]),a=n;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=n+n.charAt(0);else return e;a+=c,s[o++]=n+c.charAt(0),n=c}return a}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),n=this.get(e),a={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(a);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,n)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let n=this.storage.getItem(o)||"";e+=o.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var wp={local:new ae("local"),session:new ae("session")};function yp(e="local",t){return new ae(e,t)}var Pn="./Switch-acwd7n07.stx";var On="./Table-0a4y46vd.stx";var Dn="./TableBody-y49bqb1p.stx";var Rn="./TableCell-jhvsxw8b.stx";var jn="./TableHead-e9xvjx2j.stx";var Fn="./TableHeader-krzcx4sv.stx";var Bn="./TableRow-dt8e11aj.stx";var Wn="./Tab-46mxm7f8.stx";var _n="./TabList-76bpx5fp.stx";var Jn="./TabPanel-5htevsq6.stx";var Yn="./Tabs-1swcxmfb.stx";var Qn="./Teleport-vqs75x36.stx";var ea="./Textarea-9xmhjqp8.stx";var sa="./Tooltip-rg1c2zrc.stx";var na="./Transition-7m0mk45s.stx";var ra="./Video-nnac6rat.stx";var la="./VirtualList-fa7v5a3h.stx";var da="./VirtualTable-kp7b3wyv.stx";var pa=0;function Oe(e="a11y"){return`${e}-${++pa}-${Date.now()}`}function mu(e,t,s={}){let{visible:o=!1,id:n=Oe("label")}=s,a=document.createElement(o?"label":"span");if(a.id=n,a.textContent=e,!o)Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return n}function gu(e,t){let s=Oe("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function bu(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function xe(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function xu(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:n=!0,clickOutsideDeactivates:a=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,p=!1,u=!1,d=null,g=(x)=>{if(u)return;if(n&&x.key==="Escape"){x.preventDefault(),C();return}if(x.key==="Tab"){let E=xe(e);if(E.length===0){x.preventDefault();return}let A=E[0],S=E[E.length-1];if(x.shiftKey){if(document.activeElement===A)x.preventDefault(),S.focus()}else if(document.activeElement===S)x.preventDefault(),A.focus()}},f=(x)=>{if(u)return;if(!e.contains(x.target)){if(typeof r==="function"){if(!r(x)&&a)C()}else if(!r&&a)C()}};function y(){if(p)return;p=!0,d=document.activeElement;let x=s||xe(e)[0];if(x&&typeof x.focus==="function")x.focus();document.addEventListener("keydown",g),document.addEventListener("click",f),i?.()}function C(){if(!p)return;p=!1;let x=o||d;if(x&&typeof x.focus==="function")x.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",f),c?.()}function k(){u=!0}function b(){u=!1}return{activate:y,deactivate:C,pause:k,unpause:b}}function vu(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:n="both",loop:a=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),p=(d)=>{let g=c();if(d<0||d>=g.length)return;g.forEach((f,y)=>{if(y===d){if(f.setAttribute("tabindex","0"),typeof f.focus==="function")f.focus()}else f.setAttribute("tabindex","-1")}),i=d,r?.(d,g[d])},u=(d)=>{let f=c().length-1,y=!1,C=i;switch(d.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(C=i+1,C>f)C=a?0:f;y=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(C=i-1,C<0)C=a?f:0;y=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(C=i+1,C>f)C=a?0:f;y=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(C=i-1,C<0)C=a?f:0;y=!0}break;case"Home":C=0,y=!0;break;case"End":C=f,y=!0;break}if(y)d.preventDefault(),p(C)};return p(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var wu={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function yu(e){return document.activeElement===e}function ku(e,t){let s=t||document.activeElement,o=xe(document.body),n=o.indexOf(s);if(n===-1)return;let a=e==="next"?n+1:n-1,r=o[a];if(r)r.focus()}function Cu(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var $u={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function Su(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function Tu(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function Eu(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function Iu(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function Au(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function Pu(e){let t=[],s=(o)=>{let n=e.getAttribute(o);if(n){let a=n.split(" ");for(let r of a)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var ua=(e,t,s,o)=>s*e/o+t,ha=(e,t,s,o)=>(e/=o,s*e*e+t),fa=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),ma=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},ga=(e,t,s,o)=>(e/=o,s*e*e*e+t),ba=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),xa=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},va=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),wa=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),ya=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},ka=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),Ca=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),$a=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Sa=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,Ta=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,Ea=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,Ia=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,Aa=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,Pa=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},La=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),Oa=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),Na=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Da=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t},Ma=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)+s+t},Ra=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!a)a=o*0.44999999999999996;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)*0.5+s+t},za=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),ja=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Ha=(e,t,s,o)=>{let n=1.70158;if(e/=o/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},ve=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},Ne=(e,t,s,o)=>s-ve(o-e,0,s,o)+t,Fa=(e,t,s,o)=>{if(e<o/2)return Ne(e*2,0,s,o)*0.5+t;return ve(e*2-o,0,s,o)*0.5+s*0.5+t},Ou={linear:ua,easeInQuad:ha,easeOutQuad:fa,easeInOutQuad:ma,easeInCubic:ga,easeOutCubic:ba,easeInOutCubic:xa,easeInQuart:va,easeOutQuart:wa,easeInOutQuart:ya,easeInQuint:ka,easeOutQuint:Ca,easeInOutQuint:$a,easeInSine:Sa,easeOutSine:Ta,easeInOutSine:Ea,easeInExpo:Ia,easeOutExpo:Aa,easeInOutExpo:Pa,easeInCirc:La,easeOutCirc:Oa,easeInOutCirc:Na,easeInElastic:Da,easeOutElastic:Ma,easeInOutElastic:Ra,easeInBack:za,easeOutBack:ja,easeInOutBack:Ha,easeInBounce:Ne,easeOutBounce:ve,easeInOutBounce:Fa};function Va(e,t={}){let{duration:s="1s",timing:o="ease",delay:n="0s",iteration:a="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${n} ${a} ${r} ${i} ${c}`}function De(e,t,s={}){e.style.animation=Va(t,s)}function Du(e){e.style.animation=""}function Ba(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function Mu(e,t,s={}){let{stagger:o=100,...n}=s;e.forEach((a,r)=>{let i=`${r*o}ms`;De(a,t,{...n,delay:i})})}async function Ru(e,t){for(let s of t)De(e,s.name,s.options),await Ba(e)}var zu={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function ju(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function Hu(e,t){let s=`
|
|
11
|
+
`)}`)}return{valid:r.length===0,errors:r}}function H(e,t,s){return(o)=>vt(e,o,t,s)}function Ci(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function $i(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var yt="./Button-bpjmfkq6.stx";var kt={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Ai=H("Button",kt);function Pi(e){return Ie(e,"Button","onClick")}function Li(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Oi(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var $t="./Calendar-5vs6x7gj.stx";var Tt="./DateRangePicker-4zmf34e4.stx";var It="./EmptyState-s790dbym.stx";var Pt="./ThemeToggle-4wm9zare.stx";var Ot="./Card-r55zpjqh.stx";var Dt="./Checkbox-kepzk3h5.stx";var Rt="./Combobox-9n04ec5w.stx";var jt="./ComboboxButton-4r6a45s1.stx";var Ft="./ComboboxInput-1gyfpnca.stx";var Bt="./ComboboxOption-wkw70js7.stx";var Wt="./ComboboxOptions-zhr9b6rx.stx";var _t="./CommandPalette-qqjdbcyg.stx";var Jt="./CommandPaletteItem-7290ce1z.stx";var Yt="./Dialog-pdq8rxvy.stx";var Qt="./DialogBackdrop-de5m5m4w.stx";var es="./DialogDescription-gth4c2kx.stx";var ss="./DialogPanel-vhdqymc2.stx";var ns="./DialogTitle-ke58hh68.stx";var rs="./Drawer-nmq100vy.stx";var ls="./Dropdown-hb8ks69x.stx";var ds="./DropdownButton-wxc25hsy.stx";var us="./DropdownItem-af0vzc8a.stx";var fs="./DropdownItems-bkz7jkyz.stx";var gs="./Form-ewzy10ye.stx";var bs={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},Fl=H("Form",bs);var vs="./Image-68hcqnkg.stx";var ys="./EmailInput-57626391.stx";var Cs="./NumberInput-pq4k2k4k.stx";var Ss="./PasswordInput-dg41ktgd.stx";var Es="./SearchInput-w15r5t95.stx";var As="./TextInput-nknmz9md.stx";var Ps={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Ls={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},Os={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Ns={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},Ds={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Ql=H("TextInput",Ls),Zl=H("EmailInput",Ps),ec=H("PasswordInput",Ns),tc=H("NumberInput",Os),sc=H("SearchInput",Ds);var Rs="./Listbox-83j2q4x6.stx";var js="./ListboxButton-gan8e3nw.stx";var Fs="./ListboxLabel-ka0hfm7b.stx";var Bs="./ListboxOption-gpaqvk3s.stx";var Ws="./ListboxOptions-2928864k.stx";var _s="./FilterChip-00ja5jhz.stx";var Js="./FilterChips-7pnzycfd.stx";var Ys="./ListRow-8d3e1yxh.stx";var Qs="./NavBar-qqrrhdnk.stx";var eo="./SectionCard-8ctdacjr.stx";var so="./TabBar-8143650x.stx";var no="./TabBarItem-kddfnhk3.stx";var ro="./Navigator-1yk1c3pp.stx";var lo="./Notification-b3cz24f0.stx";var po="./Pager-kh6s65t2.stx";var ho="./PagerDots-076w890y.stx";var mo="./Pagination-8bhbkpcp.stx";var bo="./Checkout-crbegxyv.stx";var vo="./DefaultPaymentMethod-ss3x61tr.stx";var yo="./PaymentMethods-z4hhr0kv.stx";var Co="./SubscriptionCheckout-rdcv32n1.stx";var So="./Popover-khtvagcs.stx";var Eo="./PopoverButton-3w6550hv.stx";var Ao="./PopoverPanel-d84gk1w1.stx";var Lo="./Portal-m73vz879.stx";var No="./Progress-2qzb77kc.stx";var Mo="./Radio-8153x74w.stx";var zo="./RadioGroup-smqcqgds.stx";var Ho="./RadioGroupDescription-z34r9avr.stx";var Vo="./RadioGroupLabel-ka0hfm7b.stx";var qo="./RadioGroupOption-twcw1b2a.stx";var Ko="./Select-61zv5tr7.stx";var Uo="./Sidebar-8dygywjv.stx";var Go="./SidebarFooter-s7skj92y.stx";var Xo="./SidebarHeader-x7jdhmyr.stx";var Zo="./SidebarItem-r4f2pref.stx";var tn="./SidebarPinned-48kyk193.stx";var on="./SidebarSection-5sqza2j6.stx";var an="./SidebarSpace-bwv98azf.stx";var ln="./SidebarSpaces-mdtrynr2.stx";var dn="./SidebarSpaceSwitcher-1mycft2g.stx";var ne={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},pn={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},un={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},hn={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},fn={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},mn={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},gn={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ae={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:hn,workspace:pn,desktop:un,solid:fn,transparent:mn,vibrancy:gn};function Vd(e){return Ae[e||"macos"]||Ae.macos}function Bd(e){if(!e)return;return ne[e]||e}var bn=ne.gray;function q(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Pe(e){return{light:{from:q(e,35,"#ffffff"),to:q(e,12.5,"#ffffff"),ink:q(e,22,"#17171b"),accent:q(e,88,"#2a2a30")},dark:{from:q(e,27,"#101014"),to:q(e,10,"#08080b"),ink:q(e,12,"#f4f4f7"),accent:q(e,74,"#ffffff")}}}function Kd(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function xn(e){if(!e)return Pe(bn);if(typeof e!=="string")return e;return Pe(ne[e]||e)}function vn(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Le(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function wn(e){let t=xn(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Le(e.action,e.id,"action","i-f7-plus"),clear:Le(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:vn(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function _d(e){return(e||[]).map(wn)}function Ud(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Jd(e){return e.map((t)=>t.tint)}var kn="./Skeleton-m4p66zcs.stx";var $n="./Spinner-vhnc3y03.stx";var Tn="./Stepper-68gxcmej.stx";var In="./StepperStep-zf4pq1s0.stx";class ae{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((a)=>a(n,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],n="";for(let a=0;a<e.length;a++){let r=e.charAt(a),i=n+r;if(t[i]!==void 0)n=i;else o.push(n.length>1?t[n]:n.charCodeAt(0)),t[i]=s++,n=r}if(n!=="")o.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,n=String.fromCharCode(t[0]),a=n;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=n+n.charAt(0);else return e;a+=c,s[o++]=n+c.charAt(0),n=c}return a}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),n=this.get(e),a={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(a);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,n)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let n=this.storage.getItem(o)||"";e+=o.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var wp={local:new ae("local"),session:new ae("session")};function yp(e="local",t){return new ae(e,t)}var Pn="./Switch-acwd7n07.stx";var On="./Table-0a4y46vd.stx";var Dn="./TableBody-y49bqb1p.stx";var Rn="./TableCell-jhvsxw8b.stx";var jn="./TableHead-e9xvjx2j.stx";var Fn="./TableHeader-krzcx4sv.stx";var Bn="./TableRow-dt8e11aj.stx";var Wn="./Tab-46mxm7f8.stx";var _n="./TabList-76bpx5fp.stx";var Jn="./TabPanel-5htevsq6.stx";var Yn="./Tabs-1swcxmfb.stx";var Qn="./Teleport-vqs75x36.stx";var ea="./Textarea-9xmhjqp8.stx";var sa="./Tooltip-rg1c2zrc.stx";var na="./Transition-7m0mk45s.stx";var ra="./Video-sc26cz9v.stx";var la="./VirtualList-fa7v5a3h.stx";var da="./VirtualTable-kp7b3wyv.stx";var pa=0;function Oe(e="a11y"){return`${e}-${++pa}-${Date.now()}`}function mu(e,t,s={}){let{visible:o=!1,id:n=Oe("label")}=s,a=document.createElement(o?"label":"span");if(a.id=n,a.textContent=e,!o)Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return n}function gu(e,t){let s=Oe("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function bu(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function xe(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function xu(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:n=!0,clickOutsideDeactivates:a=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,p=!1,u=!1,d=null,g=(x)=>{if(u)return;if(n&&x.key==="Escape"){x.preventDefault(),C();return}if(x.key==="Tab"){let E=xe(e);if(E.length===0){x.preventDefault();return}let A=E[0],S=E[E.length-1];if(x.shiftKey){if(document.activeElement===A)x.preventDefault(),S.focus()}else if(document.activeElement===S)x.preventDefault(),A.focus()}},f=(x)=>{if(u)return;if(!e.contains(x.target)){if(typeof r==="function"){if(!r(x)&&a)C()}else if(!r&&a)C()}};function y(){if(p)return;p=!0,d=document.activeElement;let x=s||xe(e)[0];if(x&&typeof x.focus==="function")x.focus();document.addEventListener("keydown",g),document.addEventListener("click",f),i?.()}function C(){if(!p)return;p=!1;let x=o||d;if(x&&typeof x.focus==="function")x.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",f),c?.()}function k(){u=!0}function b(){u=!1}return{activate:y,deactivate:C,pause:k,unpause:b}}function vu(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:n="both",loop:a=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),p=(d)=>{let g=c();if(d<0||d>=g.length)return;g.forEach((f,y)=>{if(y===d){if(f.setAttribute("tabindex","0"),typeof f.focus==="function")f.focus()}else f.setAttribute("tabindex","-1")}),i=d,r?.(d,g[d])},u=(d)=>{let f=c().length-1,y=!1,C=i;switch(d.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(C=i+1,C>f)C=a?0:f;y=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(C=i-1,C<0)C=a?f:0;y=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(C=i+1,C>f)C=a?0:f;y=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(C=i-1,C<0)C=a?f:0;y=!0}break;case"Home":C=0,y=!0;break;case"End":C=f,y=!0;break}if(y)d.preventDefault(),p(C)};return p(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var wu={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function yu(e){return document.activeElement===e}function ku(e,t){let s=t||document.activeElement,o=xe(document.body),n=o.indexOf(s);if(n===-1)return;let a=e==="next"?n+1:n-1,r=o[a];if(r)r.focus()}function Cu(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var $u={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function Su(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function Tu(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function Eu(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function Iu(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function Au(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function Pu(e){let t=[],s=(o)=>{let n=e.getAttribute(o);if(n){let a=n.split(" ");for(let r of a)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var ua=(e,t,s,o)=>s*e/o+t,ha=(e,t,s,o)=>(e/=o,s*e*e+t),fa=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),ma=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},ga=(e,t,s,o)=>(e/=o,s*e*e*e+t),ba=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),xa=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},va=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),wa=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),ya=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},ka=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),Ca=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),$a=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Sa=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,Ta=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,Ea=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,Ia=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,Aa=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,Pa=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},La=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),Oa=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),Na=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Da=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t},Ma=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)+s+t},Ra=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!a)a=o*0.44999999999999996;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)*0.5+s+t},za=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),ja=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Ha=(e,t,s,o)=>{let n=1.70158;if(e/=o/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},ve=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},Ne=(e,t,s,o)=>s-ve(o-e,0,s,o)+t,Fa=(e,t,s,o)=>{if(e<o/2)return Ne(e*2,0,s,o)*0.5+t;return ve(e*2-o,0,s,o)*0.5+s*0.5+t},Ou={linear:ua,easeInQuad:ha,easeOutQuad:fa,easeInOutQuad:ma,easeInCubic:ga,easeOutCubic:ba,easeInOutCubic:xa,easeInQuart:va,easeOutQuart:wa,easeInOutQuart:ya,easeInQuint:ka,easeOutQuint:Ca,easeInOutQuint:$a,easeInSine:Sa,easeOutSine:Ta,easeInOutSine:Ea,easeInExpo:Ia,easeOutExpo:Aa,easeInOutExpo:Pa,easeInCirc:La,easeOutCirc:Oa,easeInOutCirc:Na,easeInElastic:Da,easeOutElastic:Ma,easeInOutElastic:Ra,easeInBack:za,easeOutBack:ja,easeInOutBack:Ha,easeInBounce:Ne,easeOutBounce:ve,easeInOutBounce:Fa};function Va(e,t={}){let{duration:s="1s",timing:o="ease",delay:n="0s",iteration:a="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${n} ${a} ${r} ${i} ${c}`}function De(e,t,s={}){e.style.animation=Va(t,s)}function Du(e){e.style.animation=""}function Ba(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function Mu(e,t,s={}){let{stagger:o=100,...n}=s;e.forEach((a,r)=>{let i=`${r*o}ms`;De(a,t,{...n,delay:i})})}async function Ru(e,t){for(let s of t)De(e,s.name,s.options),await Ba(e)}var zu={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function ju(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function Hu(e,t){let s=`
|
|
12
12
|
@keyframes ${e} {
|
|
13
13
|
${Object.entries(t).map(([n,a])=>{let r=Object.entries(a).map(([i,c])=>`${i}: ${c};`).join(" ");return`${n} { ${r} }`}).join(`
|
|
14
14
|
`)}
|
package/dist/ui/audio/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import type { MediaDrm } from '../video/index';
|
|
1
2
|
export declare interface AudioProps {
|
|
2
3
|
src: string
|
|
4
|
+
sources?: Array<{ src: string, type?: string }>
|
|
5
|
+
drm?: MediaDrm
|
|
6
|
+
tracks?: Array<{ src: string, kind: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata', srclang?: string, label?: string, default?: boolean }>
|
|
7
|
+
artist?: string
|
|
8
|
+
artwork?: string
|
|
9
|
+
waveform?: string
|
|
10
|
+
crossorigin?: 'anonymous' | 'use-credentials'
|
|
11
|
+
class?: string
|
|
3
12
|
autoplay?: boolean
|
|
4
13
|
loop?: boolean
|
|
5
14
|
muted?: boolean
|
package/dist/ui/image/index.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
export declare interface ImageProps {
|
|
2
2
|
src: string
|
|
3
3
|
srcSet?: string
|
|
4
|
+
srcset?: string
|
|
5
|
+
sources?: Array<{ srcset: string, type?: string, media?: string, sizes?: string }>
|
|
6
|
+
loading?: 'lazy' | 'eager'
|
|
7
|
+
decorative?: boolean
|
|
8
|
+
placeholderColor?: string
|
|
9
|
+
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
|
|
10
|
+
position?: string
|
|
11
|
+
class?: string
|
|
4
12
|
sizes?: string
|
|
5
13
|
webpSrc?: string
|
|
6
14
|
webpSrcSet?: string
|
|
7
|
-
alt
|
|
15
|
+
alt?: string
|
|
8
16
|
width?: number | string
|
|
9
17
|
height?: number | string
|
|
10
18
|
lazy?: boolean
|
package/dist/ui/video/index.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
/** License endpoints for already encrypted media. */
|
|
2
|
+
export declare interface MediaDrm {
|
|
3
|
+
widevine?: { url: string, headers?: Record<string, string> }
|
|
4
|
+
playready?: { url: string, headers?: Record<string, string> }
|
|
5
|
+
fairplay?: { url: string, certificateUrl: string, headers?: Record<string, string> }
|
|
6
|
+
}
|
|
1
7
|
export declare interface VideoProps {
|
|
2
8
|
src: string
|
|
3
9
|
poster?: string
|
|
10
|
+
drm?: MediaDrm
|
|
4
11
|
label?: string
|
|
5
12
|
sources?: Array<{ src: string, type?: string }>
|
|
6
13
|
tracks?: Array<{ src: string, kind: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata', srclang?: string, label?: string, default?: boolean }>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.533",
|
|
5
5
|
"description": "A modern component library built with STX, featuring headwind utility classes and TypeScript syntax highlighting.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@iconify-json/f7": "^1.2.2",
|
|
79
79
|
"@stacksjs/ts-css": "^0.3.11",
|
|
80
|
-
"@stacksjs/stx": "0.2.
|
|
81
|
-
"bun-plugin-stx": "0.2.
|
|
80
|
+
"@stacksjs/stx": "0.2.533",
|
|
81
|
+
"bun-plugin-stx": "0.2.533",
|
|
82
82
|
"ts-syntax-highlighter": "^0.2.17",
|
|
83
83
|
"ts-video-player": "^0.1.9"
|
|
84
84
|
},
|
package/src/ui/audio/Audio.stx
CHANGED
|
@@ -1,50 +1,73 @@
|
|
|
1
1
|
<script server>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
const src = $props.src || ''
|
|
3
|
+
const sources = Array.isArray($props.sources) ? $props.sources : []
|
|
4
|
+
const tracks = Array.isArray($props.tracks) ? $props.tracks : []
|
|
5
|
+
const title = $props.title || 'Audio player'
|
|
6
|
+
const artist = $props.artist || ''
|
|
7
|
+
const artwork = $props.artwork || ''
|
|
8
|
+
const waveform = $props.waveform || ''
|
|
9
|
+
const controls = $bool($props.controls, true)
|
|
10
|
+
const preload = $props.preload || 'metadata'
|
|
11
|
+
const crossorigin = $props.crossorigin || ''
|
|
12
|
+
const className = $props.className || $props.class || ''
|
|
13
|
+
const playerSources = (sources.length ? sources : src ? [{ src }] : []).map(source => $props.drm && (source.type === 'application/dash+xml' || source.src.split(/[?#]/, 1)[0].toLowerCase().endsWith('.mpd')) ? { ...source, type: 'application/dash+xml', drm: $props.drm } : source)
|
|
14
|
+
const playerTracks = tracks.map(track => ({ ...track, language: track.srclang }))
|
|
15
|
+
const playerConfig = JSON.stringify({ sources: playerSources, tracks: playerTracks, ...($props.drm ? { drm: $props.drm } : {}) }).replaceAll('<', '\\u003c').replaceAll('>', '\\u003e').replaceAll('&', '\\u0026')
|
|
16
|
+
const autoplay = $bool($props.autoplay)
|
|
17
|
+
const loop = $bool($props.loop)
|
|
18
|
+
const muted = $bool($props.muted)
|
|
19
|
+
const showWaveform = $bool($props.showWaveform)
|
|
20
|
+
const waveformBars = [20, 35, 60, 90, 55, 25, 45, 70, 40, 25]
|
|
21
|
+
</script>
|
|
11
22
|
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
<script client>
|
|
24
|
+
import { registerElements } from 'ts-video-player/elements'
|
|
25
|
+
registerElements()
|
|
14
26
|
</script>
|
|
15
27
|
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
<figure class="m-0 overflow-hidden rounded-2xl bg-panel shadow-sm ring-1 ring-line {{ className }}">
|
|
29
|
+
<div class="flex gap-4 items-center p-4 sm:p-5">
|
|
30
|
+
@if(artwork)
|
|
31
|
+
<img src="{{ artwork }}" alt="" width="72" height="72" loading="lazy" decoding="async" class="object-cover shrink-0 h-18 w-18 ring-1 ring-line rounded-control">
|
|
32
|
+
@else
|
|
33
|
+
<div class="flex items-center justify-center shrink-0 h-18 w-18 text-fg-muted bg-surface-raised rounded-xl" aria-hidden="true"><span class="h-7 w-7 i-hugeicons-music-note-01"></span></div>
|
|
34
|
+
@endif
|
|
35
|
+
<div class="flex-1 min-w-0">
|
|
36
|
+
<figcaption class="font-semibold text-sm text-fg truncate">{{ title }}</figcaption>
|
|
37
|
+
@if(artist)<p class="mt-0.5 text-sm text-fg-muted truncate">{{ artist }}</p>@endif
|
|
38
|
+
@if(showWaveform && !waveform)<div aria-hidden="true" class="flex items-center gap-1 mt-3 h-10 rounded bg-surface-raised">@foreach(waveformBars as bar)<span class="flex-1 bg-current opacity-40" style="height: {{ bar }}%"></span>@endforeach</div>@endif
|
|
39
|
+
@if(waveform)<img src="{{ waveform }}" alt="" loading="lazy" decoding="async" class="object-cover mt-3 h-10 w-full opacity-70 dark:opacity-80">@endif
|
|
22
40
|
</div>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
</div>
|
|
42
|
+
<div class="p-3 bg-surface border-line border-t">
|
|
43
|
+
<video-player @if(src) src="{{ src }}" @endif title="{{ title }}" data-media-config="{{ playerConfig }}" @if(controls) controls @endif @if(autoplay) autoplay @endif @if(loop) loop @endif @if(muted) muted @endif preload="{{ preload }}" @if(crossorigin) crossorigin="{{ crossorigin }}" @endif keep-alive aria-label="{{ title }}" class="block overflow-hidden relative h-16 w-full text-white rounded-xl focus-within:ring-2 focus-within:ring-accent">
|
|
44
|
+
<media-error-display></media-error-display>
|
|
45
|
+
<audio data-native-fallback @if(src) src="{{ src }}" @endif @if(controls) controls @endif @if(loop) loop @endif @if(muted) muted @endif preload="none" @if(crossorigin) crossorigin="{{ crossorigin }}" @endif aria-label="{{ title }}" class="block h-16 w-full accent-accent">
|
|
46
|
+
@foreach (sources as source)<source src="{{ source.src }}" @if(source.type) type="{{ source.type }}" @endif>@endforeach
|
|
47
|
+
@foreach (tracks as track)<track src="{{ track.src }}" kind="{{ track.kind }}" @if(track.srclang) srclang="{{ track.srclang }}" @endif @if(track.label) label="{{ track.label }}" @endif @if(track.default) default @endif>@endforeach
|
|
48
|
+
Your browser does not support audio playback.
|
|
49
|
+
</audio>
|
|
50
|
+
@if(controls)
|
|
51
|
+
<video-skin>
|
|
52
|
+
<media-seek-button slot="left" seconds="-10"></media-seek-button>
|
|
53
|
+
<media-play-button slot="left"></media-play-button>
|
|
54
|
+
<media-seek-button slot="left" seconds="10"></media-seek-button>
|
|
55
|
+
<media-time-group slot="center" class="font-mono tabular-nums text-xs"></media-time-group>
|
|
56
|
+
<media-progress-bar slot="center" @if(waveform) waveform="{{ waveform }}" @endif></media-progress-bar>
|
|
57
|
+
<media-mute-button slot="right"></media-mute-button>
|
|
58
|
+
<media-volume-slider slot="right"></media-volume-slider>
|
|
59
|
+
<media-playback-rate-button slot="right" rates="0.5,0.75,1,1.25,1.5,2"></media-playback-rate-button>
|
|
60
|
+
<media-settings-menu slot="right"></media-settings-menu>
|
|
61
|
+
<media-airplay-button slot="right"></media-airplay-button>
|
|
62
|
+
<media-remote-playback-button slot="right"></media-remote-playback-button>
|
|
63
|
+
</video-skin>
|
|
64
|
+
@endif
|
|
65
|
+
</video-player>
|
|
66
|
+
</div>
|
|
67
|
+
</figure>
|
|
36
68
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
fill="none"
|
|
43
|
-
stroke="currentColor"
|
|
44
|
-
stroke-width="2"
|
|
45
|
-
class="text-accent"
|
|
46
|
-
/>
|
|
47
|
-
</svg>
|
|
48
|
-
</div>
|
|
49
|
-
@endif
|
|
50
|
-
</div>
|
|
69
|
+
<style>
|
|
70
|
+
video-player:not(:defined) video-skin { display: none; }
|
|
71
|
+
video-player:defined > [data-native-fallback] { display: none; }
|
|
72
|
+
@media (prefers-reduced-motion: reduce) { video-player, video-player * { transition-duration: 0.01ms !important; } }
|
|
73
|
+
</style>
|
package/src/ui/audio/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Audio Component
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
ts-video-player's audio player with seek, time, volume, speed, settings, AirPlay, Remote Playback and a native fallback.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -26,16 +26,24 @@ bun add @stacksjs/components
|
|
|
26
26
|
| `autoplay` | `boolean` | `false` | Auto-play on load |
|
|
27
27
|
| `loop` | `boolean` | `false` | Loop playback |
|
|
28
28
|
| `muted` | `boolean` | `false` | Start muted |
|
|
29
|
-
| `controls` | `boolean` | `true` | Show
|
|
29
|
+
| `controls` | `boolean` | `true` | Show player controls |
|
|
30
30
|
| `preload` | `'none' \| 'metadata' \| 'auto'` | `'metadata'` | Preload strategy |
|
|
31
31
|
| `className` | `string` | `''` | Additional CSS classes |
|
|
32
32
|
| `showWaveform` | `boolean` | `false` | Show waveform visualization |
|
|
33
|
+
| `sources` | `{ src, type? }[]` | - | File, HLS or DASH candidates |
|
|
34
|
+
| `tracks` | `{ src, kind, srclang?, label?, default? }[]` | - | Chapter and transcript tracks |
|
|
35
|
+
| `drm` | `MediaDrm` | - | Same Widevine, PlayReady and FairPlay descriptors as Video; applied to DASH |
|
|
36
|
+
| `artist` | `string` | `''` | Artist below the title |
|
|
37
|
+
| `artwork` | `string` | `''` | Cover image URL |
|
|
38
|
+
| `waveform` | `string` | `''` | Waveform image URL, also used on the seek bar |
|
|
39
|
+
| `crossorigin` | `'anonymous' \| 'use-credentials'` | - | Media CORS mode |
|
|
40
|
+
| `class` | `string` | `''` | Alias for className |
|
|
33
41
|
| `title` | `string` | `''` | Optional title above player |
|
|
34
42
|
|
|
35
43
|
## Features
|
|
36
44
|
|
|
37
|
-
- **
|
|
45
|
+
- **Progressive enhancement** - Native audio before custom elements load or with scripts disabled
|
|
38
46
|
- **Dark mode** - Styled for dark mode
|
|
39
|
-
- **Waveform** -
|
|
47
|
+
- **Waveform** - Supply a waveform image for the display and seek bar
|
|
40
48
|
- **Accessible** - Proper fallback text
|
|
41
49
|
- **Responsive** - Full-width design
|
package/src/ui/audio/index.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import type { MediaDrm } from '../video'
|
|
2
|
+
|
|
1
3
|
export { default as Audio } from './Audio.stx'
|
|
2
4
|
|
|
3
5
|
export interface AudioProps {
|
|
4
6
|
src: string
|
|
7
|
+
sources?: Array<{ src: string, type?: string }>
|
|
8
|
+
drm?: MediaDrm
|
|
9
|
+
tracks?: Array<{ src: string, kind: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata', srclang?: string, label?: string, default?: boolean }>
|
|
10
|
+
artist?: string
|
|
11
|
+
artwork?: string
|
|
12
|
+
waveform?: string
|
|
13
|
+
crossorigin?: 'anonymous' | 'use-credentials'
|
|
14
|
+
class?: string
|
|
5
15
|
autoplay?: boolean
|
|
6
16
|
loop?: boolean
|
|
7
17
|
muted?: boolean
|
package/src/ui/image/Image.stx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script server>
|
|
2
|
-
import { deliveredImage } from '@stacksjs/stx'
|
|
2
|
+
import { deliveredImage, getImagePlaceholder } from '@stacksjs/stx'
|
|
3
3
|
|
|
4
4
|
export const webpSrc = $props.webpSrc || ''
|
|
5
5
|
export const webpSrcSet = $props.webpSrcSet || ''
|
|
@@ -15,19 +15,25 @@ export const webpSrcSet = $props.webpSrcSet || ''
|
|
|
15
15
|
* a bare `<Image>` tag resolves to, and every image in the app went out as the
|
|
16
16
|
* original full-size file.
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
18
|
+
const explicitSources = Array.isArray($props.sources) ? $props.sources : []
|
|
19
|
+
const explicitSrcSet = $props.srcSet || $props.srcset || ''
|
|
20
|
+
const delivered = !explicitSrcSet && !explicitSources.length && !webpSrc && !webpSrcSet ? deliveredImage($props.src || '') : undefined
|
|
19
21
|
|
|
20
22
|
export const src = delivered ? delivered.src : ($props.src || '')
|
|
21
|
-
export const srcSet = delivered ? delivered.srcset :
|
|
23
|
+
export const srcSet = delivered ? delivered.srcset : explicitSrcSet
|
|
22
24
|
// Width descriptors mean nothing without `sizes`; 100vw is what a browser
|
|
23
25
|
// assumes anyway, said out loud.
|
|
24
26
|
export const sizes = $props.sizes || (delivered ? '100vw' : '')
|
|
25
|
-
export const sources = delivered ? delivered.sources : []
|
|
26
|
-
export const
|
|
27
|
+
export const sources = explicitSources.length ? explicitSources : (delivered ? delivered.sources : [])
|
|
28
|
+
export const decorative = $bool($props.decorative)
|
|
29
|
+
if (!decorative && !$props.alt?.trim())
|
|
30
|
+
throw new TypeError('Image alt text is required unless decorative is true')
|
|
31
|
+
export const alt = decorative ? '' : $props.alt
|
|
27
32
|
export const width = $props.width || delivered?.width
|
|
28
33
|
export const height = $props.height || delivered?.height
|
|
29
34
|
export const priority = $bool($props.priority)
|
|
30
|
-
export const lazy =
|
|
35
|
+
export const lazy = $bool($props.lazy, true)
|
|
36
|
+
export const loading = priority ? 'eager' : ($props.loading || (lazy ? 'lazy' : 'eager'))
|
|
31
37
|
export const decoding = $props.decoding || 'async'
|
|
32
38
|
export const fetchpriority = priority ? 'high' : ($props.fetchpriority || 'auto')
|
|
33
39
|
|
|
@@ -40,13 +46,20 @@ export const fetchpriority = priority ? 'high' : ($props.fetchpriority || 'auto'
|
|
|
40
46
|
* through anything transparent in it and stays there once it has loaded,
|
|
41
47
|
* which is a permanent artefact on every PNG with an alpha channel.
|
|
42
48
|
*/
|
|
43
|
-
|
|
49
|
+
const placeholderMode = $props.placeholder
|
|
50
|
+
const imagePlaceholder = getImagePlaceholder($props.src || '')
|
|
51
|
+
const placeholderColor = $props.placeholderColor || imagePlaceholder?.color || '#e5e7eb'
|
|
52
|
+
const preview = delivered?.placeholder || imagePlaceholder?.dataUrl
|
|
53
|
+
export const placeholder = placeholderMode === 'empty' || placeholderMode === 'none' ? ''
|
|
54
|
+
: placeholderMode === 'color' ? (imagePlaceholder?.transparent ? '' : placeholderColor)
|
|
55
|
+
: placeholderMode === 'blur' || placeholderMode === 'thumbhash' ? (imagePlaceholder?.transparent ? '' : preview ? `url("${preview}")` : placeholderColor)
|
|
56
|
+
: placeholderMode || (delivered?.placeholder ? `url("${delivered.placeholder}")` : '')
|
|
44
57
|
export const aspectRatio = $props.aspectRatio
|
|
45
|
-
export const objectFit = $props.objectFit || 'cover'
|
|
46
|
-
export const objectPosition = $props.objectPosition || 'center'
|
|
58
|
+
export const objectFit = $props.objectFit || $props.fit || 'cover'
|
|
59
|
+
export const objectPosition = $props.objectPosition || $props.position || 'center'
|
|
47
60
|
export const rounded = $bool($props.rounded)
|
|
48
61
|
export const zoomOnHover = $bool($props.zoomOnHover)
|
|
49
|
-
export const className = $props.className || ''
|
|
62
|
+
export const className = $props.className || $props.class || ''
|
|
50
63
|
|
|
51
64
|
export const hasWebP = !!(webpSrc || webpSrcSet)
|
|
52
65
|
|
|
@@ -109,7 +122,12 @@ export const imageStyle = [
|
|
|
109
122
|
|
|
110
123
|
<picture class="{{ className }}" style="{{ frameStyle }}">
|
|
111
124
|
@foreach(sources as source)
|
|
112
|
-
<source
|
|
125
|
+
<source
|
|
126
|
+
@if(source.type)type="{{ source.type }}"@endif
|
|
127
|
+
@if(source.media)media="{{ source.media }}"@endif
|
|
128
|
+
srcset="{{ source.srcset }}"
|
|
129
|
+
@if(source.sizes || sizes)sizes="{{ source.sizes || sizes }}"@endif
|
|
130
|
+
/>
|
|
113
131
|
@endforeach
|
|
114
132
|
@if(hasWebP)
|
|
115
133
|
<source
|
|
@@ -136,7 +154,8 @@ export const imageStyle = [
|
|
|
136
154
|
alt="{{ alt }}"
|
|
137
155
|
@if(width)width="{{ width }}"@endif
|
|
138
156
|
@if(height)height="{{ height }}"@endif
|
|
139
|
-
loading="{{
|
|
157
|
+
loading="{{ loading }}"
|
|
158
|
+
@if(decorative)aria-hidden="true"@endif
|
|
140
159
|
decoding="{{ decoding }}"
|
|
141
160
|
fetchpriority="{{ fetchpriority }}"
|
|
142
161
|
style="{{ imageStyle }}"
|
package/src/ui/image/README.md
CHANGED
|
@@ -92,7 +92,11 @@ opts out: your sources are used as written.
|
|
|
92
92
|
| Prop | Type | Default | Description |
|
|
93
93
|
|------|------|---------|-------------|
|
|
94
94
|
| `src` | `string` | - | Image source URL (required) |
|
|
95
|
-
| `alt` | `string` | - |
|
|
95
|
+
| `alt` | `string` | - | Meaningful alt text, required unless decorative |
|
|
96
|
+
| `decorative` | `boolean` | `false` | Empty alt and aria-hidden |
|
|
97
|
+
| `srcset` | `string` | - | Alias for srcSet |
|
|
98
|
+
| `sources` | `{ srcset, type?, media?, sizes? }[]` | - | Explicit picture sources for art direction |
|
|
99
|
+
| `loading` | `'lazy' \| 'eager'` | - | Overrides lazy; priority still loads eagerly |
|
|
96
100
|
| `srcSet` | `string` | - | Responsive candidates, e.g. `"a.jpg 320w, b.jpg 640w"` |
|
|
97
101
|
| `sizes` | `string` | - | How wide the slot is. Pair it with a `w` srcset |
|
|
98
102
|
| `width` | `number \| string` | - | Intrinsic width, to reserve space |
|
|
@@ -101,12 +105,15 @@ opts out: your sources are used as written.
|
|
|
101
105
|
| `priority` | `boolean` | `false` | Above the fold: eager, `fetchpriority="high"` |
|
|
102
106
|
| `decoding` | `'async' \| 'sync' \| 'auto'` | `'async'` | Decode hint |
|
|
103
107
|
| `fetchpriority` | `'high' \| 'low' \| 'auto'` | `'auto'` | Priority hint |
|
|
104
|
-
| `placeholder` | `string` | - | CSS
|
|
108
|
+
| `placeholder` | `string` | - | CSS background, or blur / thumbhash / color / empty / none |
|
|
109
|
+
| `placeholderColor` | `string` | `#e5e7eb` | Color when a derived preview is unavailable |
|
|
105
110
|
| `aspectRatio` | `number \| string` | - | Only when you want one — see below |
|
|
106
111
|
| `objectFit` | `'contain' \| 'cover' \| 'fill' \| 'none' \| 'scale-down'` | `'cover'` | How the image fills its box |
|
|
107
112
|
| `objectPosition` | `string` | `'center'` | Focal point of the crop |
|
|
108
113
|
| `rounded` | `boolean \| 'full' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'` | `false` | Corner radius |
|
|
109
114
|
| `zoomOnHover` | `boolean` | `false` | Transition hook for a hover scale |
|
|
115
|
+
| `fit` / `position` | `string` | - | Aliases for objectFit / objectPosition |
|
|
116
|
+
| `class` | `string` | - | Alias for className |
|
|
110
117
|
| `className` | `string` | `''` | Extra classes on the `<picture>` |
|
|
111
118
|
|
|
112
119
|
### Blur-up placeholders
|
|
@@ -174,8 +181,7 @@ images come out the wrong shape.
|
|
|
174
181
|
## Accessibility
|
|
175
182
|
|
|
176
183
|
- Always provide meaningful `alt` text
|
|
177
|
-
-
|
|
178
|
-
- Error states show user-friendly fallback
|
|
184
|
+
- Use `decorative` for images that convey no content
|
|
179
185
|
- Works without JavaScript (progressive enhancement)
|
|
180
186
|
|
|
181
187
|
## Performance Tips
|
package/src/ui/image/index.ts
CHANGED
|
@@ -3,10 +3,19 @@ export { default as Image } from './Image.stx'
|
|
|
3
3
|
export interface ImageProps {
|
|
4
4
|
src: string
|
|
5
5
|
srcSet?: string
|
|
6
|
+
srcset?: string
|
|
7
|
+
sources?: Array<{ srcset: string, type?: string, media?: string, sizes?: string }>
|
|
8
|
+
loading?: 'lazy' | 'eager'
|
|
9
|
+
decorative?: boolean
|
|
10
|
+
placeholderColor?: string
|
|
11
|
+
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
|
|
12
|
+
position?: string
|
|
13
|
+
class?: string
|
|
6
14
|
sizes?: string
|
|
7
15
|
webpSrc?: string
|
|
8
16
|
webpSrcSet?: string
|
|
9
|
-
|
|
17
|
+
/** Required unless decorative is true. */
|
|
18
|
+
alt?: string
|
|
10
19
|
width?: number | string
|
|
11
20
|
height?: number | string
|
|
12
21
|
/** Native lazy loading. Ignored when `priority` is set. Defaults to true. */
|
package/src/ui/video/README.md
CHANGED
|
@@ -48,6 +48,7 @@ itself, muted only where the browser refuses sound:
|
|
|
48
48
|
| `playsinline` | `boolean` | `true` | Play inline on iOS |
|
|
49
49
|
| `preload` | `'none' \| 'metadata' \| 'auto'` | `'metadata'` | Preload strategy |
|
|
50
50
|
| `sources` | `{ src, type? }[]` | - | Several sources for the browser to choose from |
|
|
51
|
+
| `drm` | `MediaDrm` | - | Widevine / PlayReady license URLs and optional headers; FairPlay also requires `certificateUrl`. Applied to DASH sources |
|
|
51
52
|
| `tracks` | `{ src, kind, srclang?, label?, default? }[]` | - | Captions and subtitles (WebVTT) |
|
|
52
53
|
| `crossorigin` | `'anonymous' \| 'use-credentials'` | - | CORS mode |
|
|
53
54
|
| `controlslist` | `string` | `'nodownload'` | Native controls list |
|
|
@@ -63,3 +64,23 @@ itself, muted only where the browser refuses sound:
|
|
|
63
64
|
- **Any shape**: a Short is tall, a landscape clip wide, and the shape can change with the video
|
|
64
65
|
- **Accessible**: named controls and announcements in the page's language, keyboard shortcuts
|
|
65
66
|
- **Captions**: WebVTT tracks through `tracks`
|
|
67
|
+
|
|
68
|
+
## Protected DASH
|
|
69
|
+
|
|
70
|
+
Pass license descriptors for media that is already encrypted:
|
|
71
|
+
|
|
72
|
+
```stx
|
|
73
|
+
<Video src="/media/manifest.mpd" label="Protected lesson" :drm="licenses" />
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const licenses = {
|
|
78
|
+
widevine: { url: '/licenses/widevine', headers: { Authorization: token } },
|
|
79
|
+
playready: { url: '/licenses/playready' },
|
|
80
|
+
fairplay: { url: '/licenses/fairplay', certificateUrl: '/licenses/certificate' },
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The player config contains `drm` and attaches it to DASH sources, recognized by
|
|
85
|
+
MIME type or a `.mpd` URL, including query strings. Progressive fallbacks keep
|
|
86
|
+
their original configuration. License routes must authorize the viewer.
|
package/src/ui/video/Video.stx
CHANGED
|
@@ -52,9 +52,10 @@ export const aspectRatio = ratio($props.aspectRatio)
|
|
|
52
52
|
|
|
53
53
|
const sources = Array.isArray($props.sources) ? $props.sources : []
|
|
54
54
|
const tracks = Array.isArray($props.tracks) ? $props.tracks : []
|
|
55
|
-
const
|
|
55
|
+
const drm = $props.drm
|
|
56
|
+
const playerSources = (sources.length ? sources : src ? [{ src }] : []).map(source => drm && (source.type === 'application/dash+xml' || source.src.split(/[?#]/, 1)[0].toLowerCase().endsWith('.mpd')) ? { ...source, type: 'application/dash+xml', drm } : source)
|
|
56
57
|
const playerTracks = tracks.map(track => ({ ...track, language: track.srclang }))
|
|
57
|
-
export const playerConfig = JSON.stringify({ sources: playerSources, tracks: playerTracks })
|
|
58
|
+
export const playerConfig = JSON.stringify({ sources: playerSources, tracks: playerTracks, ...(drm ? { drm } : {}) })
|
|
58
59
|
.replaceAll('<', '\\u003c').replaceAll('>', '\\u003e').replaceAll('&', '\\u0026')
|
|
59
60
|
|
|
60
61
|
/*
|
package/src/ui/video/index.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
export { default as Video } from './Video.stx'
|
|
2
2
|
|
|
3
|
+
/** License endpoints for already encrypted media. */
|
|
4
|
+
export interface MediaDrm {
|
|
5
|
+
widevine?: { url: string, headers?: Record<string, string> }
|
|
6
|
+
playready?: { url: string, headers?: Record<string, string> }
|
|
7
|
+
fairplay?: { url: string, certificateUrl: string, headers?: Record<string, string> }
|
|
8
|
+
}
|
|
9
|
+
|
|
3
10
|
export interface VideoProps {
|
|
4
11
|
src: string
|
|
5
12
|
poster?: string
|
|
13
|
+
drm?: MediaDrm
|
|
6
14
|
/** The player's accessible name. Follows a binding. */
|
|
7
15
|
label?: string
|
|
8
16
|
sources?: Array<{ src: string, type?: string }>
|
package/dist/Audio-byv8kkvt.stx
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<script server>
|
|
2
|
-
export const src = $props.src || ''
|
|
3
|
-
export const autoplay = $bool($props.autoplay)
|
|
4
|
-
export const loop = $bool($props.loop)
|
|
5
|
-
export const muted = $bool($props.muted)
|
|
6
|
-
export const controls = $bool($props.controls, true)
|
|
7
|
-
export const preload = $props.preload || 'metadata'
|
|
8
|
-
export const className = $props.className || ''
|
|
9
|
-
export const showWaveform = $bool($props.showWaveform)
|
|
10
|
-
export const title = $props.title || ''
|
|
11
|
-
|
|
12
|
-
export const containerClasses = `relative w-full ${className}`.trim()
|
|
13
|
-
export const audioClasses = 'w-full rounded-control bg-surface-raised'
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<div class="{{ containerClasses }}">
|
|
17
|
-
@if(title)
|
|
18
|
-
<div class="mb-2 px-1">
|
|
19
|
-
<h3 class="text-sm font-medium text-fg">
|
|
20
|
-
{{ title }}
|
|
21
|
-
</h3>
|
|
22
|
-
</div>
|
|
23
|
-
@endif
|
|
24
|
-
|
|
25
|
-
<audio
|
|
26
|
-
class="{{ audioClasses }}"
|
|
27
|
-
src="{{ src }}"
|
|
28
|
-
@if(controls)controls@endif
|
|
29
|
-
@if(autoplay)autoplay@endif
|
|
30
|
-
@if(loop)loop@endif
|
|
31
|
-
@if(muted)muted@endif
|
|
32
|
-
preload="{{ preload }}"
|
|
33
|
-
>
|
|
34
|
-
Your browser does not support the audio element.
|
|
35
|
-
</audio>
|
|
36
|
-
|
|
37
|
-
@if(showWaveform)
|
|
38
|
-
<div class="mt-2 h-16 bg-surface-raised rounded-control flex items-center justify-center">
|
|
39
|
-
<svg class="w-full h-full px-4" viewBox="0 0 100 40" preserveAspectRatio="none">
|
|
40
|
-
<path
|
|
41
|
-
d="M 0,20 L 10,15 L 20,10 L 30,5 L 40,15 L 50,20 L 60,25 L 70,30 L 80,20 L 90,15 L 100,20"
|
|
42
|
-
fill="none"
|
|
43
|
-
stroke="currentColor"
|
|
44
|
-
stroke-width="2"
|
|
45
|
-
class="text-accent"
|
|
46
|
-
/>
|
|
47
|
-
</svg>
|
|
48
|
-
</div>
|
|
49
|
-
@endif
|
|
50
|
-
</div>
|