@possibleworlds/tender 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE.md +68 -0
- package/assets/builtin-user-guide.md +1206 -0
- package/dist/cli.js +6339 -0
- package/dist/preview-ui/assets/JetBrainsMono-Bold.woff2 +0 -0
- package/dist/preview-ui/assets/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/preview-ui/assets/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/preview-ui/assets/LibreBaskerville-Bold.woff2 +0 -0
- package/dist/preview-ui/assets/LibreBaskerville-Italic.woff2 +0 -0
- package/dist/preview-ui/assets/LibreBaskerville-Regular.woff2 +0 -0
- package/dist/preview-ui/assets/Reglo-Bold.otf +0 -0
- package/dist/preview-ui/assets/index.css +1 -0
- package/dist/preview-ui/assets/index.js +4 -0
- package/dist/preview-ui/index.html +13 -0
- package/package.json +82 -0
- package/skill/SKILL.md +442 -0
- package/skill/examples/callout.tender +15 -0
- package/skill/examples/content-restructure-after.md +13 -0
- package/skill/examples/content-restructure-before.md +9 -0
- package/skill/examples/row.tender +12 -0
- package/skill/examples/synthetic-project/components/callout.tender +15 -0
- package/skill/examples/synthetic-project/components/row.tender +12 -0
- package/skill/examples/synthetic-project/content.md +15 -0
- package/skill/examples/synthetic-project/project.yaml +7 -0
- package/skill/examples/synthetic-project/styles.css +14 -0
- package/templates/default/components/README.md +32 -0
- package/templates/default/content.md +13 -0
- package/templates/default/project.yaml +27 -0
- package/templates/default/styles.css +39 -0
- package/templates/open-circle/assets/images/check.png +0 -0
- package/templates/open-circle/assets/images/clock.png +0 -0
- package/templates/open-circle/assets/images/pointer.png +0 -0
- package/templates/open-circle/assets/images/speaker.png +0 -0
- package/templates/open-circle/assets/images/spiral.png +0 -0
- package/templates/open-circle/components/ad-lib.tender +8 -0
- package/templates/open-circle/components/cover-byline.tender +1 -0
- package/templates/open-circle/components/cover-spiral.tender +1 -0
- package/templates/open-circle/components/cover-tagline.tender +1 -0
- package/templates/open-circle/components/margin-label.tender +5 -0
- package/templates/open-circle/components/participant-name.tender +5 -0
- package/templates/open-circle/components/row.tender +12 -0
- package/templates/open-circle/components/spanning-row.tender +1 -0
- package/templates/open-circle/components/speaker-name.tender +5 -0
- package/templates/open-circle/components/stage-direction.tender +5 -0
- package/templates/open-circle/components/yellow-tag.tender +5 -0
- package/templates/open-circle/content.md +157 -0
- package/templates/open-circle/project.yaml +40 -0
- package/templates/open-circle/styles.css +216 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.orb-cluster{position:absolute;top:50%;left:50%;width:180%;height:320%;transform:translate(-50%,-50%);pointer-events:none;z-index:-1}.orb{position:absolute;top:50%;left:50%;border-radius:50%;opacity:0;transition:opacity .45s ease,transform .6s ease,filter .6s ease,width .6s ease,height .6s ease}.orb--magenta{width:70px;height:70px;background:var(--orb-magenta);transform:translate(-50%,-50%);filter:blur(14px)}.orb--lime{width:46px;height:46px;background:var(--orb-lime);transform:translate(-120%,-32%);filter:blur(12px)}.orb--cyan{width:46px;height:46px;background:var(--orb-cyan);transform:translate(24%,-68%);filter:blur(12px)}.tender-logo:hover .orb--magenta{opacity:.55;width:80px;height:80px;filter:blur(20px);animation:orb-drift-1 4s ease-in-out infinite}.tender-logo:hover .orb--lime{opacity:.42;filter:blur(16px);animation:orb-drift-2 5s ease-in-out infinite}.tender-logo:hover .orb--cyan{opacity:.42;filter:blur(16px);animation:orb-drift-3 4.5s ease-in-out infinite}@keyframes orb-drift-1{0%,to{transform:translate(-50%,-50%)}50%{transform:translate(-50%,-58%)}}@keyframes orb-drift-2{0%,to{transform:translate(-118%,-32%)}50%{transform:translate(-128%,-24%)}}@keyframes orb-drift-3{0%,to{transform:translate(24%,-68%)}50%{transform:translate(34%,-76%)}}@media (prefers-reduced-motion: reduce){.tender-logo:hover .orb{animation:none}}:root[data-theme=light] .tender-logo:hover .orb--magenta{opacity:.4}:root[data-theme=light] .tender-logo:hover .orb--lime,:root[data-theme=light] .tender-logo:hover .orb--cyan{opacity:.3}.topnav{position:fixed;top:var(--nav-gutter);left:var(--nav-gutter);right:var(--nav-gutter);height:var(--nav-height);z-index:1000;display:flex;align-items:center;gap:16px;padding:0 14px 0 18px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px dotted var(--border-strong);border-radius:var(--radius)}.tender-logo{position:relative;display:inline-flex;align-items:center;height:100%;text-decoration:none;isolation:isolate;padding:0 6px}.tender-wordmark{display:inline-block;font:700 16px/1 var(--font-headline);letter-spacing:.18em;color:var(--text);transition:color .2s;transform:translateY(-1px)}.tender-logo:hover .tender-wordmark{color:var(--accent)}.topnav-links{display:flex;align-items:center;gap:6px;margin-left:4px}.topnav-link{font:10px var(--font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);text-decoration:none;padding:6px 12px;border:1px solid transparent;border-radius:var(--radius);transition:color .2s,border-color .2s,background .2s}.topnav-link:hover{color:var(--accent);border-color:var(--border-strong)}.topnav-link[aria-current=page]{color:var(--accent);border-color:var(--accent);background:var(--accent-faint)}.topnav-trailing{margin-left:auto;display:flex;align-items:center}@media (max-width: 720px){.topnav{gap:8px;padding:0 8px 0 12px}.topnav-link{padding:5px 8px}.tender-wordmark{letter-spacing:.14em}}.error-banner{display:flex;align-items:center;gap:10px;margin:0 var(--nav-gutter) 12px;padding:10px 14px;background:var(--danger-dim);border:1px solid var(--danger);border-radius:var(--radius);color:var(--text);font:12px var(--font-ui)}.error-banner-icon{color:var(--danger);font-size:14px}.error-banner-message{flex:1;font:11px var(--font-mono);line-height:1.5;white-space:pre-wrap;word-break:break-word}.error-banner-dismiss{background:none;border:0;font-size:18px;line-height:1;cursor:pointer;color:var(--text-faint);padding:0 4px;transition:color .2s}.error-banner-dismiss:hover{color:var(--text)}.doc-switcher{display:flex;align-items:center;gap:6px;font:10px var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--text-faint)}.doc-switcher-label{color:var(--text-faint)}.doc-switcher-select{font:10px var(--font-mono);letter-spacing:.04em;padding:5px 8px;border:1px solid var(--border-strong);border-radius:var(--radius);background:var(--bg-elevated);color:var(--text);cursor:pointer;transition:border-color .2s}.doc-switcher-select:hover{border-color:var(--text-faint)}.doc-switcher-select:focus-visible{outline:1px solid var(--accent);outline-offset:1px}.preview-iframe{width:100%;height:100%;border:0;display:block}.preview-iframe.hidden{display:none}.tile{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-elevated);margin-bottom:24px;overflow:hidden}.tile-header{padding:12px 16px;background:var(--bg-card);border-bottom:1px solid var(--border)}.tile-name{margin:0;font:700 13px var(--font-mono);letter-spacing:.04em;color:var(--text)}.tile-meta{display:grid;grid-template-columns:auto 1fr;gap:3px 14px;margin:8px 0 0;font:11px var(--font-mono);color:var(--text-faint)}.tile-meta dt{font-weight:600;color:var(--text-muted)}.tile-meta dd{margin:0}.tile-renders{padding:16px;background:var(--bg-elevated)}.tile-render-row{margin-bottom:14px}.tile-render-row:last-child{margin-bottom:0}.tile-render-label{display:block;font:600 10px var(--font-mono);color:var(--text-faint);text-transform:uppercase;letter-spacing:.08em;margin-bottom:6px}.tile-render-host{border:1px dashed var(--border-strong);border-radius:var(--radius-sm);padding:14px;background:#fff;color:#000}.tile-footer{padding:12px 16px;border-top:1px solid var(--border);background:var(--bg-card)}.snippet{display:flex;align-items:flex-start;gap:12px;margin-bottom:10px}.snippet:last-child{margin-bottom:0}.snippet-label{font:600 10px var(--font-mono);color:var(--text-faint);min-width:80px;padding-top:8px}.snippet pre{flex:1;margin:0;padding:8px 10px;font:11px var(--font-mono);line-height:1.55;white-space:pre-wrap;background:var(--bg-card-2);border:1px solid var(--border);border-radius:var(--radius-xs);color:var(--text);overflow-x:auto}.snippet button{flex-shrink:0}.palette{max-width:920px;margin:0 auto;padding:36px 32px 80px}.palette-section{font:700 1.5em var(--font-headline);letter-spacing:.01em;color:var(--text);margin:40px 0 18px;padding-bottom:.35em;border-bottom:1px solid var(--border)}.palette-section:first-child{margin-top:0}.palette-loading{padding:60px;text-align:center;color:var(--text-faint);font:12px var(--font-mono);letter-spacing:.08em}.help{display:grid;grid-template-columns:260px minmax(0,1fr);gap:48px;max-width:1120px;margin:0 auto;padding:36px 32px 80px;box-sizing:border-box}.help-loading{grid-column:1 / -1;padding:60px;text-align:center;color:var(--text-faint);font:12px var(--font-mono);letter-spacing:.08em}.help-toc{position:sticky;top:calc(var(--topnav-clearance) + 16px);align-self:start;max-height:calc(100vh - var(--topnav-clearance) - 48px);overflow-y:auto;padding-right:18px;border-right:1px solid var(--border)}.help-toc ul{list-style:none;margin:0;padding:0}.help-toc li{margin:2px 0}.help-toc a{display:block;padding:6px 0 6px 12px;margin-left:-14px;font:13px var(--font-mono);line-height:1.45;letter-spacing:.02em;color:var(--text-faint);text-decoration:none;border-left:2px solid transparent;transition:color .15s,border-color .15s}.help-toc-l2 a{color:var(--text-muted);font-size:14px}.help-toc-l3 a{padding-left:28px}.help-toc a:hover{color:var(--accent);border-left-color:var(--accent)}.help-main{min-width:0;max-width:70ch}.help-content{font-family:var(--font-body);font-size:16px;line-height:1.8;color:var(--text-muted);font-feature-settings:"kern" 1,"liga" 1}.help-content>:first-child{margin-top:0}.help-content h1{font:700 2em var(--font-headline);line-height:1.15;color:var(--text);margin:0 0 .5em;letter-spacing:.01em}.help-content h2{font:700 1.55em var(--font-headline);line-height:1.2;color:var(--text);margin:2.2em 0 .7em;padding-bottom:.3em;border-bottom:1px solid var(--border);letter-spacing:.01em;scroll-margin-top:calc(var(--topnav-clearance) + 12px)}.help-content h3{font:700 .85em var(--font-mono);line-height:1.35;color:var(--text);text-transform:uppercase;letter-spacing:.08em;margin:2em 0 .6em;scroll-margin-top:calc(var(--topnav-clearance) + 12px)}.help-content h4{font:700 .85em var(--font-mono);text-transform:uppercase;letter-spacing:.06em;color:var(--text);margin:1.6em 0 .5em;scroll-margin-top:calc(var(--topnav-clearance) + 12px)}.help-content p{margin:1.1em 0}.help-content a{color:var(--accent);text-decoration:none;border-bottom:1px solid transparent;transition:border-color .2s}.help-content a:hover{border-bottom-color:var(--accent)}.help-content strong{color:var(--text);font-weight:700}.help-content em{font-style:italic}.help-content ul,.help-content ol{margin:1.1em 0;padding-left:1.5em}.help-content li{margin:.35em 0}.help-content li::marker{color:var(--text-ghost)}.help-content ul ul,.help-content ol ol,.help-content ul ol,.help-content ol ul{margin:.35em 0}.help-content blockquote{margin:1.6em 0;padding:0 0 0 1.3em;border-left:2px solid var(--accent);font-style:italic;color:var(--text)}.help-content hr{border:0;border-top:1px dotted var(--border-strong);margin:2.5em 0}.help-content code{font:.85em var(--font-mono);background:var(--bg-card);border:1px solid var(--border);padding:.1em .4em;border-radius:var(--radius-xs);color:var(--text)}.help-content pre{font:13px var(--font-mono);line-height:1.6;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);padding:16px 18px;margin:1.6em 0;overflow-x:auto}.help-content pre code{background:none;border:0;padding:0;font-size:inherit}.help-content table{width:100%;margin:1.8em 0;border-collapse:collapse;font-family:var(--font-ui);font-size:.85em}.help-content th,.help-content td{padding:.6em .9em;text-align:left;border-bottom:1px solid var(--border);vertical-align:top}.help-content th{font:600 .95em var(--font-mono);text-transform:uppercase;letter-spacing:.04em;color:var(--text-faint);border-bottom:1px solid var(--border-strong)}.help-content tbody tr:hover{background:var(--bg-elevated)}.help-content td code{font-size:.95em}.help-content img{max-width:100%;height:auto;border-radius:var(--radius-sm)}.help-content .task-list-item{list-style:none}.help-content .task-list-item input{margin-right:.5em}.help-content del{color:var(--text-faint)}.help-content sup a{border-bottom:0}.help-content .footnotes{margin-top:3em;padding-top:1.5em;border-top:1px dotted var(--border-strong);font-size:.85em}.example-loader{margin:0 0 32px;padding:16px 18px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);font:13px var(--font-ui);color:var(--text-muted);line-height:1.6}.example-loader-head h3{font:700 .85em var(--font-mono);text-transform:uppercase;letter-spacing:.08em;color:var(--text);margin:0 0 .4em}.example-loader-head p{margin:0 0 12px;color:var(--text-faint)}.example-loader-head code{font:.92em var(--font-mono);background:var(--bg-elevated);border:1px solid var(--border);padding:.05em .35em;border-radius:var(--radius-xs);color:var(--text)}.example-loader-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-top:1px solid var(--border)}.example-loader-row:last-of-type{border-bottom:1px solid var(--border)}.example-loader-name{font:12px var(--font-mono);color:var(--text);flex:1}.example-loader-conflicts,.example-loader-done,.example-loader-error{margin-top:12px;padding:10px 12px;border-radius:var(--radius-xs);font-size:12px;line-height:1.5}.example-loader-conflicts{background:var(--accent-faint);border:1px solid var(--accent-dim);border-left:2px solid var(--accent);color:var(--text-muted)}.example-loader-conflicts p{margin:0 0 8px}.example-loader-conflicts ul{margin:0 0 12px;padding-left:1.2em}.example-loader-conflicts li{margin:2px 0}.example-loader-conflicts code{font:.95em var(--font-mono);color:var(--text)}.example-loader-actions{display:flex;gap:8px;justify-content:flex-end}.example-loader-done{background:var(--bg-elevated);border:1px solid var(--border);border-left:2px solid var(--success, var(--accent));color:var(--text-muted)}.example-loader-done code{font:.95em var(--font-mono);color:var(--text)}.example-loader-error{background:var(--bg-elevated);border:1px solid var(--border);border-left:2px solid var(--danger, var(--accent));color:var(--text)}@media (max-width: 880px){.help{grid-template-columns:1fr;gap:24px}.help-toc{position:static;max-height:none;border-right:0;border-bottom:1px solid var(--border);padding-right:0;padding-bottom:12px}}.export{max-width:780px;margin:0 auto;padding:36px 32px 80px;font:13px var(--font-ui);color:var(--text-muted)}.export-header h2{font:700 1.55em var(--font-headline);letter-spacing:.01em;color:var(--text);margin:0 0 .5em}.export-blurb{color:var(--text-faint);line-height:1.6;margin:0 0 18px;max-width:60ch}.export-blurb code{font:.88em var(--font-mono);background:var(--bg-card);border:1px solid var(--border);padding:.1em .35em;border-radius:var(--radius-xs);color:var(--text)}.export-build-all{margin-bottom:22px}.export-loading,.export-empty{color:var(--text-faint);font:12px var(--font-mono);letter-spacing:.06em;padding:28px 0}.export-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--border)}.export-row{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--border)}.export-doc{font:12px var(--font-mono);color:var(--text);min-width:170px;flex-shrink:0}.export-result{display:flex;align-items:center;gap:8px;min-width:0;flex:1}.export-arrow{color:var(--text-ghost)}.export-path{font:11px var(--font-mono);background:var(--bg-card);border:1px solid var(--border);padding:.15em .45em;border-radius:var(--radius-xs);color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.export-size{font:11px var(--font-mono);color:var(--text-faint);white-space:nowrap}.export-download{font:11px var(--font-mono);letter-spacing:.04em;color:var(--accent);text-decoration:none;border-bottom:1px solid transparent;white-space:nowrap;transition:border-color .2s}.export-download:hover{border-bottom-color:var(--accent)}.export-row.is-done .export-arrow{color:var(--success)}.export-row.is-error .export-error-msg{font:11px var(--font-mono);color:var(--danger);line-height:1.5}:root{--topnav-clearance: calc(var(--nav-gutter) + var(--nav-height) + var(--nav-gutter))}.app{display:flex;flex-direction:column;height:100%;padding-top:var(--topnav-clearance)}.content{flex:1;min-height:0;overflow:auto}.content--preview{overflow:hidden}.tab-content{height:100%;overflow:auto}.tab-content.hidden{display:none}@font-face{font-family:JetBrains Mono;src:url(/_ui/assets/JetBrainsMono-Regular.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:JetBrains Mono;src:url(/_ui/assets/JetBrainsMono-Medium.woff2) format("woff2");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:JetBrains Mono;src:url(/_ui/assets/JetBrainsMono-Bold.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Reglo;src:url(/_ui/assets/Reglo-Bold.otf) format("opentype");font-weight:400 700;font-style:normal;font-display:swap}@font-face{font-family:Libre Baskerville;src:url(/_ui/assets/LibreBaskerville-Regular.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Libre Baskerville;src:url(/_ui/assets/LibreBaskerville-Bold.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Libre Baskerville;src:url(/_ui/assets/LibreBaskerville-Italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}:root{--bg: #030305;--bg-elevated: #0d1117;--bg-card: #161b22;--bg-card-2: #1c2230;--text: #e6edf3;--text-muted: #a8b2bd;--text-faint: #8b949e;--text-ghost: #3d444d;--accent: #d670d6;--accent-strong: #e596e5;--accent-dim: rgba(214, 112, 214, .18);--accent-faint: rgba(214, 112, 214, .08);--border: #21262d;--border-strong: #30363d;--success: #3fb950;--warning: #d29922;--danger: #f85149;--danger-dim: rgba(248, 81, 73, .12);--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;--font-headline: "Reglo", "JetBrains Mono", ui-monospace, monospace;--font-body: "Libre Baskerville", Georgia, "Times New Roman", serif;--font-ui: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, ui-sans-serif, system-ui, sans-serif;--radius: 8px;--radius-sm: 6px;--radius-xs: 4px;--nav-height: 50px;--nav-gutter: 10px;--orb-magenta: #e879f9;--orb-lime: #a3e635;--orb-cyan: #22d3ee;color-scheme:dark;font-family:var(--font-ui)}:root[data-theme=light]{--bg: #fafafa;--bg-elevated: #ffffff;--bg-card: #f5f5f5;--bg-card-2: #ececec;--text: #1a1a1a;--text-muted: #525252;--text-faint: #737373;--text-ghost: #d4d4d4;--accent: #b048b0;--accent-strong: #8f3a8f;--accent-dim: rgba(176, 72, 176, .15);--accent-faint: rgba(176, 72, 176, .07);--border: #e5e5e5;--border-strong: #d4d4d4;--danger: #d1242f;--danger-dim: rgba(209, 36, 47, .1);color-scheme:light}*{box-sizing:border-box}html,body{margin:0;height:100%}body{background:var(--bg);color:var(--text);font-family:var(--font-ui);-webkit-font-smoothing:antialiased}#root{height:100%}::selection{background:var(--accent-dim);color:var(--text)}*{scrollbar-width:thin;scrollbar-color:var(--border-strong) var(--bg)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--bg)}::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:var(--radius)}::-webkit-scrollbar-thumb:hover{background:var(--text-faint)}::-webkit-scrollbar-corner{background:var(--bg)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 16px;font:11px var(--font-mono);letter-spacing:.04em;border:1px solid var(--border-strong);border-radius:var(--radius);background:transparent;color:var(--text);text-decoration:none;cursor:pointer;transition:background .2s,border-color .2s,color .2s}.btn:hover:not(:disabled){border-color:var(--text-faint);background:var(--bg-elevated)}.btn:disabled{opacity:.5;cursor:default}.btn--primary{border-color:var(--accent);color:var(--accent)}.btn--primary:hover:not(:disabled){background:var(--accent);border-color:var(--accent);color:var(--bg)}.btn--ghost{border-color:transparent}.btn--ghost:hover:not(:disabled){border-color:var(--border-strong);background:var(--bg-elevated)}.btn--sm{padding:5px 12px;font-size:10px}.code-chip{font:.85em var(--font-mono);background:var(--bg-card);border:1px solid var(--border);padding:.1em .4em;border-radius:var(--radius-xs)}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();const St=!1,Et=(e,t)=>e===t,ge=Symbol("solid-proxy"),tt=typeof Proxy=="function",Pt=Symbol("solid-track"),me={equals:Et};let nt=it;const K=1,pe=2,rt={owned:null,cleanups:null,context:null,owner:null},Pe={};var x=null;let Ae=null,At=null,P=null,M=null,W=null,ye=0;function oe(e,t){const n=P,s=x,r=e.length===0,o=t===void 0?s:t,i=r?rt:{owned:null,cleanups:null,context:o?o.context:null,owner:o},l=r?e:()=>e(()=>F(()=>le(i)));x=i,P=null;try{return H(l,!0)}finally{P=n,x=s}}function D(e,t){t=t?Object.assign({},me,t):me;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},s=r=>(typeof r=="function"&&(r=r(n.value)),lt(n,r));return[ot.bind(n),s]}function Ct(e,t,n){const s=xe(e,t,!0,K);te(s)}function I(e,t,n){const s=xe(e,t,!1,K);te(s)}function Ne(e,t,n){nt=It;const s=xe(e,t,!1,K);s.user=!0,W?W.push(s):te(s)}function O(e,t,n){n=n?Object.assign({},me,n):me;const s=xe(e,t,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,te(s),ot.bind(s)}function kt(e){return e&&typeof e=="object"&&"then"in e}function $e(e,t,n){let s,r,o;typeof t=="function"?(s=e,r=t,o={}):(s=!0,r=e,o=t||{});let i=null,l=Pe,a=!1,u="initialValue"in o,d=typeof s=="function"&&O(s);const c=new Set,[h,f]=(o.storage||D)(o.initialValue),[p,m]=D(void 0),[b,v]=D(void 0,{equals:!1}),[$,A]=D(u?"ready":"unresolved");function _(k,E,V,N){return i===k&&(i=null,N!==void 0&&(u=!0),(k===l||E===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(N,{value:E})),l=Pe,j(E,V)),E}function j(k,E){H(()=>{E===void 0&&f(()=>k),A(E!==void 0?"errored":u?"ready":"unresolved"),m(E);for(const V of c.keys())V.decrement();c.clear()},!1)}function S(){const k=Tt,E=h(),V=p();if(V!==void 0&&!i)throw V;return P&&P.user,E}function T(k=!0){if(k!==!1&&a)return;a=!1;const E=d?d():s;if(E==null||E===!1){_(i,F(h));return}let V;const N=l!==Pe?l:F(()=>{try{return r(E,{value:h(),refetching:k})}catch(X){V=X}});if(V!==void 0){_(i,void 0,de(V),E);return}else if(!kt(N))return _(i,N,void 0,E),N;return i=N,"v"in N?(N.s===1?_(i,N.v,void 0,E):_(i,void 0,de(N.v),E),N):(a=!0,queueMicrotask(()=>a=!1),H(()=>{A(u?"refreshing":"pending"),v()},!1),N.then(X=>_(N,X,void 0,E),X=>_(N,void 0,de(X),E)))}Object.defineProperties(S,{state:{get:()=>$()},error:{get:()=>p()},loading:{get(){const k=$();return k==="pending"||k==="refreshing"}},latest:{get(){if(!u)return S();const k=p();if(k&&!i)throw k;return h()}}});let B=x;return d?Ct(()=>(B=x,T(!1))):T(!1),[S,{refetch:k=>Fe(B,()=>T(k)),mutate:f}]}function Lt(e){return H(e,!1)}function F(e){if(P===null)return e();const t=P;P=null;try{return e()}finally{P=t}}function Me(e,t,n){const s=Array.isArray(e);let r,o=n&&n.defer;return i=>{let l;if(s){l=Array(e.length);for(let u=0;u<e.length;u++)l[u]=e[u]()}else l=e();if(o)return o=!1,i;const a=F(()=>t(l,r,i));return r=l,a}}function Ot(e){Ne(()=>F(e))}function ve(e){return x===null||(x.cleanups===null?x.cleanups=[e]:x.cleanups.push(e)),e}function st(){return x}function Fe(e,t){const n=x,s=P;x=e,P=null;try{return H(t,!0)}catch(r){Ve(r)}finally{x=n,P=s}}function Rt(e){const t=P,n=x;return Promise.resolve().then(()=>{P=t,x=n;let s;return H(e,!1),P=x=null,s?s.done:void 0})}const[Zr,es]=D(!1);function Be(e,t){const n=Symbol("context");return{id:n,Provider:Nt(n),defaultValue:e}}function _e(e){let t;return x&&x.context&&(t=x.context[e.id])!==void 0?t:e.defaultValue}function Ue(e){const t=O(e),n=O(()=>Oe(t()));return n.toArray=()=>{const s=n();return Array.isArray(s)?s:s!=null?[s]:[]},n}let Tt;function ot(){if(this.sources&&this.state)if(this.state===K)te(this);else{const e=M;M=null,H(()=>we(this),!1),M=e}if(P){const e=this.observers?this.observers.length:0;P.sources?(P.sources.push(this),P.sourceSlots.push(e)):(P.sources=[this],P.sourceSlots=[e]),this.observers?(this.observers.push(P),this.observerSlots.push(P.sources.length-1)):(this.observers=[P],this.observerSlots=[P.sources.length-1])}return this.value}function lt(e,t,n){let s=e.value;return(!e.comparator||!e.comparator(s,t))&&(e.value=t,e.observers&&e.observers.length&&H(()=>{for(let r=0;r<e.observers.length;r+=1){const o=e.observers[r],i=Ae&&Ae.running;i&&Ae.disposed.has(o),(i?!o.tState:!o.state)&&(o.pure?M.push(o):W.push(o),o.observers&&at(o)),i||(o.state=K)}if(M.length>1e6)throw M=[],new Error},!1)),t}function te(e){if(!e.fn)return;le(e);const t=ye;jt(e,e.value,t)}function jt(e,t,n){let s;const r=x,o=P;P=x=e;try{s=e.fn(t)}catch(i){return e.pure&&(e.state=K,e.owned&&e.owned.forEach(le),e.owned=null),e.updatedAt=n+1,Ve(i)}finally{P=o,x=r}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?lt(e,s):e.value=s,e.updatedAt=n)}function xe(e,t,n,s=K,r){const o={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:x,context:x?x.context:null,pure:n};return x===null||x!==rt&&(x.owned?x.owned.push(o):x.owned=[o]),o}function be(e){if(e.state===0)return;if(e.state===pe)return we(e);if(e.suspense&&F(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ye);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===K)te(e);else if(e.state===pe){const s=M;M=null,H(()=>we(e,t[0]),!1),M=s}}function H(e,t){if(M)return e();let n=!1;t||(M=[]),W?n=!0:W=[],ye++;try{const s=e();return Dt(n),s}catch(s){n||(W=null),M=null,Ve(s)}}function Dt(e){if(M&&(it(M),M=null),e)return;const t=W;W=null,t.length&&H(()=>nt(t),!1)}function it(e){for(let t=0;t<e.length;t++)be(e[t])}function It(e){let t,n=0;for(t=0;t<e.length;t++){const s=e[t];s.user?e[n++]=s:be(s)}for(t=0;t<n;t++)be(e[t])}function we(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const s=e.sources[n];if(s.sources){const r=s.state;r===K?s!==t&&(!s.updatedAt||s.updatedAt<ye)&&be(s):r===pe&&we(s,t)}}}function at(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=pe,n.pure?M.push(n):W.push(n),n.observers&&at(n))}}function le(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),r=n.observers;if(r&&r.length){const o=r.pop(),i=n.observerSlots.pop();s<r.length&&(o.sourceSlots[i]=s,r[s]=o,n.observerSlots[s]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)le(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)le(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function de(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Ve(e,t=x){throw de(e)}function Oe(e){if(typeof e=="function"&&!e.length)return Oe(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=Oe(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Nt(e,t){return function(s){let r;return I(()=>r=F(()=>(x.context={...x.context,[e]:s.value},Ue(()=>s.children))),void 0),r}}const Mt=Symbol("fallback");function Ge(e){for(let t=0;t<e.length;t++)e[t]()}function Ft(e,t,n={}){let s=[],r=[],o=[],i=0,l=t.length>1?[]:null;return ve(()=>Ge(o)),()=>{let a=e()||[],u=a.length,d,c;return a[Pt],F(()=>{let f,p,m,b,v,$,A,_,j;if(u===0)i!==0&&(Ge(o),o=[],s=[],r=[],i=0,l&&(l=[])),n.fallback&&(s=[Mt],r[0]=oe(S=>(o[0]=S,n.fallback())),i=1);else if(i===0){for(r=new Array(u),c=0;c<u;c++)s[c]=a[c],r[c]=oe(h);i=u}else{for(m=new Array(u),b=new Array(u),l&&(v=new Array(u)),$=0,A=Math.min(i,u);$<A&&s[$]===a[$];$++);for(A=i-1,_=u-1;A>=$&&_>=$&&s[A]===a[_];A--,_--)m[_]=r[A],b[_]=o[A],l&&(v[_]=l[A]);for(f=new Map,p=new Array(_+1),c=_;c>=$;c--)j=a[c],d=f.get(j),p[c]=d===void 0?-1:d,f.set(j,c);for(d=$;d<=A;d++)j=s[d],c=f.get(j),c!==void 0&&c!==-1?(m[c]=r[d],b[c]=o[d],l&&(v[c]=l[d]),c=p[c],f.set(j,c)):o[d]();for(c=$;c<u;c++)c in m?(r[c]=m[c],o[c]=b[c],l&&(l[c]=v[c],l[c](c))):r[c]=oe(h);r=r.slice(0,i=u),s=a.slice(0)}return r});function h(f){if(o[c]=f,l){const[p,m]=D(c);return l[c]=m,t(a[c],p)}return t(a[c])}}}function w(e,t){return F(()=>e(t||{}))}function ce(){return!0}const Re={get(e,t,n){return t===ge?n:e.get(t)},has(e,t){return t===ge?!0:e.has(t)},set:ce,deleteProperty:ce,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ce,deleteProperty:ce}},ownKeys(e){return e.keys()}};function Ce(e){return(e=typeof e=="function"?e():e)?e:{}}function Bt(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Te(...e){let t=!1;for(let i=0;i<e.length;i++){const l=e[i];t=t||!!l&&ge in l,e[i]=typeof l=="function"?(t=!0,O(l)):l}if(tt&&t)return new Proxy({get(i){for(let l=e.length-1;l>=0;l--){const a=Ce(e[l])[i];if(a!==void 0)return a}},has(i){for(let l=e.length-1;l>=0;l--)if(i in Ce(e[l]))return!0;return!1},keys(){const i=[];for(let l=0;l<e.length;l++)i.push(...Object.keys(Ce(e[l])));return[...new Set(i)]}},Re);const n={},s=Object.create(null);for(let i=e.length-1;i>=0;i--){const l=e[i];if(!l)continue;const a=Object.getOwnPropertyNames(l);for(let u=a.length-1;u>=0;u--){const d=a[u];if(d==="__proto__"||d==="constructor")continue;const c=Object.getOwnPropertyDescriptor(l,d);if(!s[d])s[d]=c.get?{enumerable:!0,configurable:!0,get:Bt.bind(n[d]=[c.get.bind(l)])}:c.value!==void 0?c:void 0;else{const h=n[d];h&&(c.get?h.push(c.get.bind(l)):c.value!==void 0&&h.push(()=>c.value))}}}const r={},o=Object.keys(s);for(let i=o.length-1;i>=0;i--){const l=o[i],a=s[l];a&&a.get?Object.defineProperty(r,l,a):r[l]=a?a.value:void 0}return r}function Ut(e,...t){const n=t.length;if(tt&&ge in e){const r=n>1?t.flat():t[0],o=t.map(i=>new Proxy({get(l){return i.includes(l)?e[l]:void 0},has(l){return i.includes(l)&&l in e},keys(){return i.filter(l=>l in e)}},Re));return o.push(new Proxy({get(i){return r.includes(i)?void 0:e[i]},has(i){return r.includes(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!r.includes(i))}},Re)),o}const s=[];for(let r=0;r<=n;r++)s[r]={};for(const r of Object.getOwnPropertyNames(e)){let o=n;for(let a=0;a<t.length;a++)if(t[a].includes(r)){o=a;break}const i=Object.getOwnPropertyDescriptor(e,r);!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable?s[o][r]=i.value:Object.defineProperty(s[o],r,i)}return s}const Vt=e=>`Stale read from <${e}>.`;function q(e){const t="fallback"in e&&{fallback:()=>e.fallback};return O(Ft(()=>e.each,e.children,t||void 0))}function R(e){const t=e.keyed,n=O(()=>e.when,void 0,void 0),s=t?n:O(n,void 0,{equals:(r,o)=>!r==!o});return O(()=>{const r=s();if(r){const o=e.children;return typeof o=="function"&&o.length>0?F(()=>o(t?r:()=>{if(!F(s))throw Vt("Show");return n()})):o}return e.fallback},void 0,void 0)}const Ht=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Wt=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Ht]),qt=new Set(["innerHTML","textContent","innerText","children"]),Kt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Gt=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function zt(e,t){const n=Gt[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Xt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),G=e=>O(()=>e());function Jt(e,t,n){let s=n.length,r=t.length,o=s,i=0,l=0,a=t[r-1].nextSibling,u=null;for(;i<r||l<o;){if(t[i]===n[l]){i++,l++;continue}for(;t[r-1]===n[o-1];)r--,o--;if(r===i){const d=o<s?l?n[l-1].nextSibling:n[o-l]:a;for(;l<o;)e.insertBefore(n[l++],d)}else if(o===l)for(;i<r;)(!u||!u.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[o-1]&&n[l]===t[r-1]){const d=t[--r].nextSibling;e.insertBefore(n[l++],t[i++].nextSibling),e.insertBefore(n[--o],d),t[r]=n[o]}else{if(!u){u=new Map;let c=l;for(;c<o;)u.set(n[c],c++)}const d=u.get(t[i]);if(d!=null)if(l<d&&d<o){let c=i,h=1,f;for(;++c<r&&c<o&&!((f=u.get(t[c]))==null||f!==d+h);)h++;if(h>d-l){const p=t[i];for(;l<d;)e.insertBefore(n[l++],p)}else e.replaceChild(n[l++],t[i++])}else i++;else t[i++].remove()}}}const ze="_$DX_DELEGATE";function Yt(e,t,n,s={}){let r;return oe(o=>{r=o,t===document?e():g(t,e(),t.firstChild?null:void 0,n)},s.owner),()=>{r(),t.textContent=""}}function y(e,t,n,s){let r;const o=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},i=()=>(r||(r=o())).cloneNode(!0);return i.cloneNode=i,i}function ne(e,t=window.document){const n=t[ze]||(t[ze]=new Set);for(let s=0,r=e.length;s<r;s++){const o=e[s];n.has(o)||(n.add(o),t.addEventListener(o,sn))}}function z(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Qt(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}function ct(e,t){t==null?e.removeAttribute("class"):e.className=t}function ut(e,t,n,s){if(s)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=o=>r.call(e,n[1],o))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Zt(e,t,n={}){const s=Object.keys(t||{}),r=Object.keys(n);let o,i;for(o=0,i=r.length;o<i;o++){const l=r[o];!l||l==="undefined"||t[l]||(Xe(e,l,!1),delete n[l])}for(o=0,i=s.length;o<i;o++){const l=s[o],a=!!t[l];!l||l==="undefined"||n[l]===a||!a||(Xe(e,l,!0),n[l]=a)}return n}function en(e,t,n){if(!t)return n?z(e,"style"):t;const s=e.style;if(typeof t=="string")return s.cssText=t;typeof n=="string"&&(s.cssText=n=void 0),n||(n={}),t||(t={});let r,o;for(o in n)t[o]==null&&s.removeProperty(o),delete n[o];for(o in t)r=t[o],r!==n[o]&&(s.setProperty(o,r),n[o]=r);return n}function tn(e,t={},n,s){const r={};return I(()=>r.children=ie(e,t.children,r.children)),I(()=>typeof t.ref=="function"&&ft(t.ref,e)),I(()=>nn(e,t,n,!0,r,!0)),r}function ft(e,t,n){return F(()=>e(t,n))}function g(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")return ie(e,t,s,n);I(r=>ie(e,t(),r,n),s)}function nn(e,t,n,s,r={},o=!1){t||(t={});for(const i in r)if(!(i in t)){if(i==="children")continue;r[i]=Je(e,i,null,r[i],n,o,t)}for(const i in t){if(i==="children")continue;const l=t[i];r[i]=Je(e,i,l,r[i],n,o,t)}}function rn(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Xe(e,t,n){const s=t.trim().split(/\s+/);for(let r=0,o=s.length;r<o;r++)e.classList.toggle(s[r],n)}function Je(e,t,n,s,r,o,i){let l,a,u,d,c;if(t==="style")return en(e,n,s);if(t==="classList")return Zt(e,n,s);if(n===s)return s;if(t==="ref")o||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);s&&e.removeEventListener(h,s,typeof s!="function"&&s),n&&e.addEventListener(h,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);s&&e.removeEventListener(h,s,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),f=Xt.has(h);if(!f&&s){const p=Array.isArray(s)?s[0]:s;e.removeEventListener(h,p)}(f||n)&&(ut(e,h,n,f),f&&ne([h]))}else t.slice(0,5)==="attr:"?z(e,t.slice(5),n):t.slice(0,5)==="bool:"?Qt(e,t.slice(5),n):(c=t.slice(0,5)==="prop:")||(u=qt.has(t))||(d=zt(t,e.tagName))||(a=Wt.has(t))||(l=e.nodeName.includes("-")||"is"in i)?(c&&(t=t.slice(5),a=!0),t==="class"||t==="className"?ct(e,n):l&&!a&&!u?e[rn(t)]=n:e[d||t]=n):z(e,Kt[t]||t,n);return n}function sn(e){let t=e.target;const n=`$$${e.type}`,s=e.target,r=e.currentTarget,o=a=>Object.defineProperty(e,"target",{configurable:!0,value:a}),i=()=>{const a=t[n];if(a&&!t.disabled){const u=t[`${n}Data`];if(u!==void 0?a.call(t,u,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},l=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const a=e.composedPath();o(a[0]);for(let u=0;u<a.length-2&&(t=a[u],!!i());u++){if(t._$host){t=t._$host,l();break}if(t.parentNode===r)break}}else l();o(s)}function ie(e,t,n,s,r){for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,i=s!==void 0;if(e=i&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(o==="number"&&(t=t.toString(),t===n))return n;if(i){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=ee(e,n,s,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean")n=ee(e,n,s);else{if(o==="function")return I(()=>{let l=t();for(;typeof l=="function";)l=l();n=ie(e,l,n,s)}),()=>n;if(Array.isArray(t)){const l=[],a=n&&Array.isArray(n);if(je(l,t,n,r))return I(()=>n=ie(e,l,n,s,!0)),()=>n;if(l.length===0){if(n=ee(e,n,s),i)return n}else a?n.length===0?Ye(e,l,s):Jt(e,n,l):(n&&ee(e),Ye(e,l));n=l}else if(t.nodeType){if(Array.isArray(n)){if(i)return n=ee(e,n,s,t);ee(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function je(e,t,n,s){let r=!1;for(let o=0,i=t.length;o<i;o++){let l=t[o],a=n&&n[e.length],u;if(!(l==null||l===!0||l===!1))if((u=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))r=je(e,l,a)||r;else if(u==="function")if(s){for(;typeof l=="function";)l=l();r=je(e,Array.isArray(l)?l:[l],Array.isArray(a)?a:[a])||r}else e.push(l),r=!0;else{const d=String(l);a&&a.nodeType===3&&a.data===d?e.push(a):e.push(document.createTextNode(d))}}return r}function Ye(e,t,n=null){for(let s=0,r=t.length;s<r;s++)e.insertBefore(t[s],n)}function ee(e,t,n,s){if(n===void 0)return e.textContent="";const r=s||document.createTextNode("");if(t.length){let o=!1;for(let i=t.length-1;i>=0;i--){const l=t[i];if(r!==l){const a=l.parentNode===e;!o&&!i?a?e.replaceChild(r,l):e.insertBefore(r,n):a&&l.remove()}else o=!0}}else e.insertBefore(r,n);return[r]}const on=!1;function dt(){let e=new Set;function t(r){return e.add(r),()=>e.delete(r)}let n=!1;function s(r,o){if(n)return!(n=!1);const i={to:r,options:o,defaultPrevented:!1,preventDefault:()=>i.defaultPrevented=!0};for(const l of e)l.listener({...i,from:l.location,retry:a=>{a&&(n=!0),l.navigate(r,{...o,resolve:!1})}});return!i.defaultPrevented}return{subscribe:t,confirm:s}}let De;function He(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),De=window.history.state._depth}He();function ln(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function an(e,t){let n=!1;return()=>{const s=De;He();const r=s==null?null:De-s;if(n){n=!1;return}r&&t(r)?(n=!0,window.history.go(-r)):e()}}const cn=/^(?:[a-z0-9]+:)?\/\//i,un=/^\/+|(\/)\/+$/g,ht="http://sr";function Y(e,t=!1){const n=e.replace(un,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function he(e,t,n){if(cn.test(t))return;const s=Y(e),r=n&&Y(n);let o="";return!r||t.startsWith("/")?o=s:r.toLowerCase().indexOf(s.toLowerCase())!==0?o=s+r:o=r,(o||"/")+Y(t,!o)}function fn(e,t){if(e==null)throw new Error(t);return e}function dn(e,t){return Y(e).replace(/\/*(\*.*)?$/g,"")+Y(t)}function gt(e){const t={};return e.searchParams.forEach((n,s)=>{s in t?Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]:t[s]=n}),t}function hn(e,t,n){const[s,r]=e.split("/*",2),o=s.split("/").filter(Boolean),i=o.length;return l=>{const a=l.split("/").filter(Boolean),u=a.length-i;if(u<0||u>0&&r===void 0&&!t)return null;const d={path:i?"":"/",params:{}},c=h=>n===void 0?void 0:n[h];for(let h=0;h<i;h++){const f=o[h],p=f[0]===":",m=p?a[h]:a[h].toLowerCase(),b=p?f.slice(1):f.toLowerCase();if(p&&ke(m,c(b)))d.params[b]=m;else if(p||!ke(m,b))return null;d.path+=`/${m}`}if(r){const h=u?a.slice(-u).join("/"):"";if(ke(h,c(r)))d.params[r]=h;else return null}return d}}function ke(e,t){const n=s=>s===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function gn(e){const[t,n]=e.pattern.split("/*",2),s=t.split("/").filter(Boolean);return s.reduce((r,o)=>r+(o.startsWith(":")?2:3),s.length-(n===void 0?0:1))}function mt(e){const t=new Map,n=st();return new Proxy({},{get(s,r){return t.has(r)||Fe(n,()=>t.set(r,O(()=>e()[r]))),t.get(r)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(s,r){return r in e()}})}function pt(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),s=e.slice(t.index+t[0].length);const r=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(s);)r.push(n+=t[1]),s=s.slice(t[0].length);return pt(s).reduce((o,i)=>[...o,...r.map(l=>l+i)],[])}const mn=100,bt=Be(),We=Be(),qe=()=>fn(_e(bt),"<A> and 'use' router primitives can be only used inside a Route."),pn=()=>_e(We)||qe().base,bn=e=>{const t=pn();return O(()=>t.resolvePath(e()))},wn=e=>{const t=qe();return O(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},wt=()=>qe().location;function yn(e,t=""){const{component:n,preload:s,load:r,children:o,info:i}=e,l=!o||Array.isArray(o)&&!o.length,a={key:e,component:n,preload:s||r,info:i};return yt(e.path).reduce((u,d)=>{for(const c of pt(d)){const h=dn(t,c);let f=l?h:h.split("/*",1)[0];f=f.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),u.push({...a,originalPath:d,pattern:f,matcher:hn(f,!l,e.matchFilters)})}return u},[])}function $n(e,t=0){return{routes:e,score:gn(e[e.length-1])*1e4-t,matcher(n){const s=[];for(let r=e.length-1;r>=0;r--){const o=e[r],i=o.matcher(n);if(!i)return null;s.unshift({...i,route:o})}return s}}}function yt(e){return Array.isArray(e)?e:[e]}function $t(e,t="",n=[],s=[]){const r=yt(e);for(let o=0,i=r.length;o<i;o++){const l=r[o];if(l&&typeof l=="object"){l.hasOwnProperty("path")||(l.path="");const a=yn(l,t);for(const u of a){n.push(u);const d=Array.isArray(l.children)&&l.children.length===0;if(l.children&&!d)$t(l.children,u.pattern,n,s);else{const c=$n([...n],s.length);s.push(c)}n.pop()}}}return n.length?s:s.sort((o,i)=>i.score-o.score)}function Le(e,t){for(let n=0,s=e.length;n<s;n++){const r=e[n].matcher(t);if(r)return r}return[]}function vn(e,t,n){const s=new URL(ht),r=O(d=>{const c=e();try{return new URL(c,s)}catch{return console.error(`Invalid path ${c}`),d}},s,{equals:(d,c)=>d.href===c.href}),o=O(()=>r().pathname),i=O(()=>r().search,!0),l=O(()=>r().hash),a=()=>"",u=Me(i,()=>gt(r()));return{get pathname(){return o()},get search(){return i()},get hash(){return l()},get state(){return t()},get key(){return a()},query:n?n(u):mt(u)}}let J;function _n(){return J}function xn(e,t,n,s={}){const{signal:[r,o],utils:i={}}=e,l=i.parsePath||(C=>C),a=i.renderPath||(C=>C),u=i.beforeLeave||dt(),d=he("",s.base||"");if(d===void 0)throw new Error(`${d} is not a valid base path`);d&&!r().value&&o({value:d,replace:!0,scroll:!1});const[c,h]=D(!1);let f;const p=(C,L)=>{L.value===m()&&L.state===v()||(f===void 0&&h(!0),J=C,f=L,Rt(()=>{f===L&&(b(f.value),$(f.state),j[1](U=>U.filter(Q=>Q.pending)))}).finally(()=>{f===L&&Lt(()=>{J=void 0,C==="navigate"&&N(f),h(!1),f=void 0})}))},[m,b]=D(r().value),[v,$]=D(r().state),A=vn(m,v,i.queryWrapper),_=[],j=D([]),S=O(()=>typeof s.transformUrl=="function"?Le(t(),s.transformUrl(A.pathname)):Le(t(),A.pathname)),T=()=>{const C=S(),L={};for(let U=0;U<C.length;U++)Object.assign(L,C[U].params);return L},B=i.paramsWrapper?i.paramsWrapper(T,t):mt(T),k={pattern:d,path:()=>d,outlet:()=>null,resolvePath(C){return he(d,C)}};return I(Me(r,C=>p("native",C),{defer:!0})),{base:k,location:A,params:B,isRouting:c,renderPath:a,parsePath:l,navigatorFactory:V,matches:S,beforeLeave:u,preloadRoute:X,singleFlight:s.singleFlight===void 0?!0:s.singleFlight,submissions:j};function E(C,L,U){F(()=>{if(typeof L=="number"){L&&(i.go?i.go(L):console.warn("Router integration does not support relative routing"));return}const Q=!L||L[0]==="?",{replace:Se,resolve:Z,scroll:Ee,state:re}={replace:!1,resolve:!Q,scroll:!0,...U},ae=Z?C.resolvePath(L):he(Q&&A.pathname||"",L);if(ae===void 0)throw new Error(`Path '${L}' is not a routable path`);if(_.length>=mn)throw new Error("Too many redirects");const Ke=m();(ae!==Ke||re!==v())&&(on||u.confirm(ae,U)&&(_.push({value:Ke,replace:Se,scroll:Ee,state:v()}),p("navigate",{value:ae,state:re})))})}function V(C){return C=C||_e(We)||k,(L,U)=>E(C,L,U)}function N(C){const L=_[0];L&&(o({...C,replace:L.replace,scroll:L.scroll}),_.length=0)}function X(C,L){const U=Le(t(),C.pathname),Q=J;J="preload";for(let Se in U){const{route:Z,params:Ee}=U[Se];Z.component&&Z.component.preload&&Z.component.preload();const{preload:re}=Z;L&&re&&Fe(n(),()=>re({params:Ee,location:{pathname:C.pathname,search:C.search,hash:C.hash,query:gt(C),state:null,key:""},intent:"preload"}))}J=Q}}function Sn(e,t,n,s){const{base:r,location:o,params:i}=e,{pattern:l,component:a,preload:u}=s().route,d=O(()=>s().path);a&&a.preload&&a.preload();const c=u?u({params:i,location:o,intent:J||"initial"}):void 0;return{parent:t,pattern:l,path:d,outlet:()=>a?w(a,{params:i,location:o,data:c,get children(){return n()}}):n(),resolvePath(f){return he(r.path(),f,d())}}}const En=e=>t=>{const{base:n}=t,s=Ue(()=>t.children),r=O(()=>$t(s(),t.base||""));let o;const i=xn(e,r,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(i),w(bt.Provider,{value:i,get children(){return w(Pn,{routerState:i,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[G(()=>(o=st())&&null),w(An,{routerState:i,get branches(){return r()}})]}})}})};function Pn(e){const t=e.routerState.location,n=e.routerState.params,s=O(()=>e.preload&&F(()=>{e.preload({params:n,location:t,intent:_n()||"initial"})}));return w(R,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:r=>w(r,{params:n,location:t,get data(){return s()},get children(){return e.children}})})}function An(e){const t=[];let n;const s=O(Me(e.routerState.matches,(r,o,i)=>{let l=o&&r.length===o.length;const a=[];for(let u=0,d=r.length;u<d;u++){const c=o&&o[u],h=r[u];i&&c&&h.route.key===c.route.key?a[u]=i[u]:(l=!1,t[u]&&t[u](),oe(f=>{t[u]=f,a[u]=Sn(e.routerState,a[u-1]||e.routerState.base,Qe(()=>s()[u+1]),()=>{const p=e.routerState.matches();return p[u]??p[0]})}))}return t.splice(r.length).forEach(u=>u()),i&&l?i:(n=a[0],a)}));return Qe(()=>s()&&n)()}const Qe=e=>()=>w(R,{get when(){return e()},keyed:!0,children:t=>w(We.Provider,{value:t,get children(){return t.outlet()}})}),ue=e=>{const t=Ue(()=>e.children);return Te(e,{get children(){return t()}})};function Cn([e,t],n,s){return[e,s?r=>t(s(r)):t]}function kn(e){let t=!1;const n=r=>typeof r=="string"?{value:r}:r,s=Cn(D(n(e.get()),{equals:(r,o)=>r.value===o.value&&r.state===o.state}),void 0,r=>(!t&&e.set(r),r));return e.init&&ve(e.init((r=e.get())=>{t=!0,s[1](n(r)),t=!1})),En({signal:s,create:e.create,utils:e.utils})}function Ln(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function On(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Rn=new Map;function Tn(e=!0,t=!1,n="/_server",s){return r=>{const o=r.base.path(),i=r.navigatorFactory(r.base);let l,a;function u(m){return m.namespaceURI==="http://www.w3.org/2000/svg"}function d(m){if(m.defaultPrevented||m.button!==0||m.metaKey||m.altKey||m.ctrlKey||m.shiftKey)return;const b=m.composedPath().find(S=>S instanceof Node&&S.nodeName.toUpperCase()==="A");if(!b||t&&!b.hasAttribute("link"))return;const v=u(b),$=v?b.href.baseVal:b.href;if((v?b.target.baseVal:b.target)||!$&&!b.hasAttribute("state"))return;const _=(b.getAttribute("rel")||"").split(/\s+/);if(b.hasAttribute("download")||_&&_.includes("external"))return;const j=v?new URL($,document.baseURI):new URL($);if(!(j.origin!==window.location.origin||o&&j.pathname&&!j.pathname.toLowerCase().startsWith(o.toLowerCase())))return[b,j]}function c(m){const b=d(m);if(!b)return;const[v,$]=b,A=r.parsePath($.pathname+$.search+$.hash),_=v.getAttribute("state");m.preventDefault(),i(A,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:_?JSON.parse(_):void 0})}function h(m){const b=d(m);if(!b)return;const[v,$]=b;s&&($.pathname=s($.pathname)),r.preloadRoute($,v.getAttribute("preload")!=="false")}function f(m){clearTimeout(l);const b=d(m);if(!b)return a=null;const[v,$]=b;a!==v&&(s&&($.pathname=s($.pathname)),l=setTimeout(()=>{r.preloadRoute($,v.getAttribute("preload")!=="false"),a=v},20))}function p(m){if(m.defaultPrevented)return;let b=m.submitter&&m.submitter.hasAttribute("formaction")?m.submitter.getAttribute("formaction"):m.target.getAttribute("action");if(!b)return;if(!b.startsWith("https://action/")){const $=new URL(b,ht);if(b=r.parsePath($.pathname+$.search),!b.startsWith(n))return}if(m.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=Rn.get(b);if(v){m.preventDefault();const $=new FormData(m.target,m.submitter);v.call({r,f:m.target},m.target.enctype==="multipart/form-data"?$:new URLSearchParams($))}}ne(["click","submit"]),document.addEventListener("click",c),e&&(document.addEventListener("mousemove",f,{passive:!0}),document.addEventListener("focusin",h,{passive:!0}),document.addEventListener("touchstart",h,{passive:!0})),document.addEventListener("submit",p),ve(()=>{document.removeEventListener("click",c),e&&(document.removeEventListener("mousemove",f),document.removeEventListener("focusin",h),document.removeEventListener("touchstart",h)),document.removeEventListener("submit",p)})}}function jn(e){const t=()=>{const s=window.location.pathname.replace(/^\/+/,"/")+window.location.search,r=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:s+window.location.hash,state:r}},n=dt();return kn({get:t,set({value:s,replace:r,scroll:o,state:i}){r?window.history.replaceState(ln(i),"",s):window.history.pushState(i,"",s),On(decodeURIComponent(window.location.hash.slice(1)),o),He()},init:s=>Ln(window,"popstate",an(s,r=>{if(r)return!n.confirm(r);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:Tn(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:s=>window.history.go(s),beforeLeave:n}})(e)}var Dn=y("<a>");function fe(e){e=Te({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=Ut(e,["href","state","class","activeClass","inactiveClass","end"]),n=bn(()=>e.href),s=wn(n),r=wt(),o=O(()=>{const i=n();if(i===void 0)return[!1,!1];const l=Y(i.split(/[?#]/,1)[0]).toLowerCase(),a=decodeURI(Y(r.pathname).toLowerCase());return[e.end?l===a:a.startsWith(l+"/")||a===l,l===a]});return(()=>{var i=Dn();return tn(i,Te(t,{get href(){return s()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!o()[0],[e.activeClass]:o()[0],...t.classList}},link:"",get"aria-current"(){return o()[1]?"page":void 0}}),!1),i})()}var In=y('<span class=orb-cluster aria-hidden=true><span class="orb orb--magenta"></span><span class="orb orb--lime"></span><span class="orb orb--cyan">');function Nn(){return In()}var Mn=y("<nav class=topnav><a href=https://possibleworlds.space/tools/tender class=tender-logo target=_blank rel=noreferrer><span class=tender-wordmark>TENDER</span></a><div class=topnav-links></div><div class=topnav-trailing>");function Fn(e){return(()=>{var t=Mn(),n=t.firstChild,s=n.firstChild,r=n.nextSibling,o=r.nextSibling;return g(n,w(Nn,{}),s),g(r,w(fe,{href:"/",end:!0,class:"topnav-link",children:"Preview"}),null),g(r,w(fe,{href:"/palette",class:"topnav-link",children:"Palette"}),null),g(r,w(fe,{href:"/help",class:"topnav-link",children:"Help"}),null),g(r,w(fe,{href:"/export",class:"topnav-link",children:"Export"}),null),g(o,()=>e.children),t})()}var Bn=y("<div class=error-banner role=alert><span class=error-banner-icon>⚠</span><span class=error-banner-message></span><button class=error-banner-dismiss aria-label=Dismiss>×");function Un(e){return(()=>{var t=Bn(),n=t.firstChild,s=n.nextSibling,r=s.nextSibling;return g(s,()=>e.message),ut(r,"click",e.onDismiss,!0),t})()}ne(["click"]);var Vn=y("<label class=doc-switcher><span class=doc-switcher-label>Doc</span><select class=doc-switcher-select>"),Hn=y("<option>");function Wn(e){return w(R,{get when(){return e.docs.length>1},get children(){var t=Vn(),n=t.firstChild,s=n.nextSibling;return s.addEventListener("change",r=>e.onChange(r.currentTarget.value)),g(s,w(q,{get each(){return e.docs},children:r=>(()=>{var o=Hn();return g(o,()=>r.basename),I(()=>o.value=r.basename),o})()})),I(()=>s.value=e.current??""),t}})}var qn=y("<iframe id=preview-iframe class=preview-iframe title=Preview>");function Kn(e){const t=()=>e.doc?`/_preview?doc=${encodeURIComponent(e.doc)}`:"/_preview";return(()=>{var n=qn();return I(s=>{var r=t(),o=!e.visible;return r!==s.e&&z(n,"src",s.e=r),o!==s.t&&n.classList.toggle("hidden",s.t=o),s},{e:void 0,t:void 0}),n})()}async function Ie(){const e=await fetch("/_api/docs");if(!e.ok)throw new Error(`/_api/docs ${e.status}`);return e.json()}async function Ze(e){const t=e?`/_api/build?doc=${encodeURIComponent(e)}`:"/_api/build",n=await fetch(t,{method:"POST"});if(!n.ok){let s="";try{s=(await n.json()).error??""}catch{}throw new Error(s||`build failed: ${n.status}`)}return n.json()}async function Gn(){const e=await fetch("/_api/examples");if(!e.ok)throw new Error(`/_api/examples ${e.status}`);return e.json()}async function zn(e,t=!1){const n=await fetch("/_api/examples/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,force:t})});if(!n.ok){let s="";try{s=(await n.json()).error??""}catch{}throw new Error(s||`loadExample failed: ${n.status}`)}return n.json()}async function Xn(){const e=await fetch("/_api/palette");if(!e.ok)throw new Error(`palette fetch failed: ${e.status}`);return e.json()}async function Jn(){const e=await fetch("/_api/help");if(!e.ok)throw new Error(`help fetch failed: ${e.status}`);return e.json()}async function Yn(){const e=await fetch("/_api/styles.css");if(!e.ok)throw new Error(`styles.css fetch failed: ${e.status}`);return e.text()}async function Qn(){const e=await fetch("/_api/_project.css");if(!e.ok)throw new Error(`_project.css fetch failed: ${e.status}`);return e.text()}async function Zn(){const e=await fetch("/_api/_components.css");if(!e.ok)throw new Error(`_components.css fetch failed: ${e.status}`);return e.text()}function er(e){let t=null,n=!1,s=500;const r=()=>{if(n)return;const o=location.protocol==="https:"?"wss:":"ws:";t=new WebSocket(`${o}//${location.host}/_tender`),t.onmessage=i=>{try{e(JSON.parse(i.data))}catch{}},t.onclose=()=>{n||(setTimeout(r,s),s=Math.min(s*2,5e3))}};return r(),()=>{n=!0,t==null||t.close()}}function tr(e){const t=/:root\s*\{([^{}]*)\}/g,n=[];let s;for(;(s=t.exec(e))!==null;)n.push(s[1]);return n.length===0?"":`:host { ${n.join(" ")} }`}var nr=y("<footer class=tile-footer>"),rr=y("<article class=tile><header class=tile-header><h3 class=tile-name></h3><dl class=tile-meta></dl></header><div class=tile-renders>"),sr=y("<dt>tag"),se=y("<dd>"),or=y("<dt>class"),lr=y("<dt>attrs"),ir=y("<dt>params"),ar=y("<dt>slots"),cr=y('<div class=snippet><pre><code></code></pre><button class="btn btn--sm">Copy'),ur=y("<span class=snippet-label>"),fr=y("<div class=tile-render-row><div class=tile-render-host>"),dr=y("<span class=tile-render-label>");function et(e){return(()=>{var t=rr(),n=t.firstChild,s=n.firstChild,r=s.nextSibling,o=n.nextSibling;return g(s,()=>e.title),g(r,(()=>{var i=G(()=>!!e.meta.tag);return()=>i()?[sr(),(()=>{var l=se();return g(l,()=>e.meta.tag),l})()]:null})(),null),g(r,(()=>{var i=G(()=>!!e.meta.class);return()=>i()?[or(),(()=>{var l=se();return g(l,()=>e.meta.class),l})()]:null})(),null),g(r,(()=>{var i=G(()=>{var l;return!!((l=e.meta.attrs)!=null&&l.length)});return()=>i()?[lr(),(()=>{var l=se();return g(l,()=>e.meta.attrs.join(", ")),l})()]:null})(),null),g(r,(()=>{var i=G(()=>{var l;return!!((l=e.meta.params)!=null&&l.length)});return()=>i()?[ir(),(()=>{var l=se();return g(l,()=>e.meta.params.join(", ")),l})()]:null})(),null),g(r,(()=>{var i=G(()=>{var l;return!!((l=e.meta.slots)!=null&&l.length)});return()=>i()?[ar(),(()=>{var l=se();return g(l,()=>e.meta.slots.join(", ")),l})()]:null})(),null),g(o,w(q,{get each(){return e.renders},children:i=>w(hr,{get html(){return i.html},get label(){return i.label},get css(){return e.css}})})),g(t,w(R,{get when(){return e.renders.some(i=>i.snippet)},get children(){var i=nr();return g(i,w(q,{get each(){return e.renders},children:l=>w(R,{get when(){return l.snippet},get children(){var a=cr(),u=a.firstChild,d=u.firstChild,c=u.nextSibling;return g(a,(()=>{var h=G(()=>!!l.label);return()=>h()?(()=>{var f=ur();return g(f,()=>l.label),f})():null})(),u),g(d,()=>l.snippet),c.$$click=()=>navigator.clipboard.writeText(l.snippet),a}})})),i}}),null),t})()}function hr(e){let t;return Ne(()=>{if(!t)return;let n=t.shadowRoot;n||(n=t.attachShadow({mode:"open"}));const s=tr(e.css);n.innerHTML=`<style>${s}
|
|
2
|
+
${e.css}</style>${e.html}`}),(()=>{var n=fr(),s=n.firstChild;g(n,(()=>{var o=G(()=>!!e.label);return()=>o()?(()=>{var i=dr();return g(i,()=>e.label),i})():null})(),s);var r=t;return typeof r=="function"?ft(r,s):t=s,n})()}ne(["click"]);function gr(e){const t=[],n=/@font-face\s*\{[^{}]*\}/g;let s;for(;(s=n.exec(e))!==null;)t.push(s[0]);return t.join(`
|
|
3
|
+
`)}function mr(e){const t=gr(e);if(!t)return;let n=document.head.querySelector("style[data-tender-fonts]");n||(n=document.createElement("style"),n.setAttribute("data-tender-fonts",""),document.head.appendChild(n)),n.textContent=t}const vt=Be();function _t(){const e=_e(vt);if(!e){const t=()=>0;return{paletteVersion:t,docsVersion:t}}return e}var pr=y("<div class=palette>"),br=y("<div class=palette-loading>Loading…"),wr=y("<h2 class=palette-section>Components"),yr=y("<h2 class=palette-section>Typography specimen");async function $r(){const[e,t,n,s]=await Promise.all([Xn(),Yn(),Qn(),Zn()]);return{palette:e,css:[n,s,t].join(`
|
|
4
|
+
`)}}function vr(){const e=_t(),[t]=$e(e.paletteVersion,$r);return Ne(()=>{const n=t();n&&mr(n.css)}),(()=>{var n=pr();return g(n,w(R,{get when(){return t()},get fallback(){return br()},children:s=>[w(R,{get when(){return s().palette.components.length>0},get children(){return[wr(),w(q,{get each(){return s().palette.components},children:r=>w(et,{get title(){return r.name},get meta(){return r.meta},get renders(){return r.renders},get css(){return s().css}})})]}}),yr(),w(q,{get each(){return s().palette.typography},children:r=>w(et,{get title(){return r.label},meta:{},get renders(){return[{html:r.html,snippet:""}]},get css(){return s().css}})})]})),n})()}function _r(e){var r;const t=new DOMParser().parseFromString(e,"text/html"),n=[],s=new Map;for(const o of Array.from(t.querySelectorAll("h2, h3"))){const i=((r=o.textContent)==null?void 0:r.trim())??"";if(!i)continue;let l=i.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-");if(!l)continue;const a=(s.get(l)??0)+1;s.set(l,a),a>1&&(l=`${l}-${a}`),o.setAttribute("id",l),n.push({level:o.tagName==="H2"?2:3,text:i,slug:l})}return{html:t.body.innerHTML,toc:n}}var xr=y("<div class=example-loader-error>"),Sr=y(`<aside class=example-loader aria-label="Worked examples"><div class=example-loader-head><h3>Worked examples</h3><p>Load a complete example project into the current directory — components, tokens, page templates, and a populated <code>content.md</code> — to see Tender's full feature set in one place.`),Er=y('<div class=example-loader-row><span class=example-loader-name></span><button class="btn btn--sm">'),Pr=y('<div class=example-loader-conflicts><p>Refused to install <code></code>: <!> file<!> in this project. Loading the example would overwrite:</p><ul></ul><div class=example-loader-actions><button class="btn btn--sm">Cancel</button><button class="btn btn--primary btn--sm">Overwrite and load'),Ar=y("<li><code>"),Cr=y("<div class=example-loader-done>Loaded <code></code> — <!> file<!> created<!>. The preview is reloading."),kr=y("<div class=help>"),Lr=y("<div class=help-loading>Loading…"),Or=y('<nav class=help-toc aria-label="Help table of contents"><ul>'),Rr=y("<div class=help-main><article class=help-content>"),Tr=y("<li><a>");function jr(){const[e]=$e(async()=>(await Gn()).examples),[t,n]=D({kind:"idle"});async function s(r,o){n({kind:"loading"});try{const i=await zn(r,o);i.conflicts.length>0?n({kind:"conflicts",name:r,conflicts:i.conflicts}):n({kind:"done",result:i})}catch(i){n({kind:"error",message:i instanceof Error?i.message:String(i)})}}return w(R,{get when(){return(e()??[]).length>0},get children(){var r=Sr();return r.firstChild,g(r,w(q,{get each(){return e()},children:o=>(()=>{var i=Er(),l=i.firstChild,a=l.nextSibling;return g(l,o),a.$$click=()=>void s(o,!1),g(a,()=>t().kind==="loading"?"Loading…":"Load example"),I(()=>a.disabled=t().kind==="loading"),i})()}),null),g(r,w(R,{get when(){return t().kind==="conflicts"},get children(){return(()=>{const o=t();return(()=>{var i=Pr(),l=i.firstChild,a=l.firstChild,u=a.nextSibling,d=u.nextSibling,c=d.nextSibling,h=c.nextSibling,f=h.nextSibling;f.nextSibling;var p=l.nextSibling,m=p.nextSibling,b=m.firstChild,v=b.nextSibling;return g(u,()=>o.name),g(l,()=>o.conflicts.length,c),g(l,()=>o.conflicts.length===1?"":"s",f),g(l,()=>o.conflicts.length===1?" already exists":" already exist",f),g(p,w(q,{get each(){return o.conflicts},children:$=>(()=>{var A=Ar(),_=A.firstChild;return g(_,$),A})()})),b.$$click=()=>n({kind:"idle"}),v.$$click=()=>void s(o.name,!0),i})()})()}}),null),g(r,w(R,{get when(){return t().kind==="done"},get children(){return(()=>{const o=t(),i=o.result.files.filter(a=>a.action==="created").length,l=o.result.files.filter(a=>a.action==="overwritten").length;return(()=>{var a=Cr(),u=a.firstChild,d=u.nextSibling,c=d.nextSibling,h=c.nextSibling,f=h.nextSibling,p=f.nextSibling,m=p.nextSibling,b=m.nextSibling;return b.nextSibling,g(d,()=>o.result.template),g(a,i,h),g(a,i===1?"":"s",p),g(a,l>0?`, ${l} overwritten`:"",b),a})()})()}}),null),g(r,w(R,{get when(){return t().kind==="error"},get children(){var o=xr();return g(o,()=>t().message),o}}),null),r}})}function Dr(){const[e]=$e(Jn),t=O(()=>{const n=e();return n?{...n,..._r(n.html)}:null});return(()=>{var n=kr();return g(n,w(R,{get when(){return t()},get fallback(){return Lr()},children:s=>[w(R,{get when(){return s().toc.length>0},get children(){var r=Or(),o=r.firstChild;return g(o,w(q,{get each(){return s().toc},children:i=>(()=>{var l=Tr(),a=l.firstChild;return g(a,()=>i.text),I(u=>{var d=`help-toc-l${i.level}`,c=`#${i.slug}`;return d!==u.e&&ct(l,u.e=d),c!==u.t&&z(a,"href",u.t=c),u},{e:void 0,t:void 0}),l})()})),r}}),(()=>{var r=Rr(),o=r.firstChild;return g(r,w(jr,{}),o),I(()=>o.innerHTML=s().html),r})()]})),n})()}ne(["click"]);var Ir=y('<button class="btn btn--primary export-build-all">'),Nr=y("<div class=export><header class=export-header><h2>Export PDF</h2><p class=export-blurb>Builds PDF(s) into the project's <code>out/</code> directory — the same place<code>tender build</code> writes them. The HTML mirror isn't produced here; run<code>tender build</code> for that."),Mr=y("<div class=export-loading>Loading documents…"),Fr=y("<ul class=export-list>"),Br=y("<div class=export-empty>No documents in this project."),Ur=y("<span class=export-error-msg>"),Vr=y('<li class=export-row><span class=export-doc></span><button class="btn btn--sm export-build-one"></button><span class=export-result>'),Hr=y("<span class=export-arrow>→"),Wr=y("<code class=export-path>"),qr=y("<span class=export-size>"),Kr=y("<a class=export-download>Download");function Gr(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function zr(){const e=_t(),[t]=$e(e.docsVersion,async()=>(await Ie()).docs),[n,s]=D({}),[r,o]=D(!1),i=(c,h)=>s(f=>({...f,[c]:h}));function l(c){return n()[c]??{state:"idle"}}async function a(c){i(c,{state:"building"});try{const f=(await Ze(c)).results.find(p=>p.doc===c);f?f.ok?i(c,{state:"done",result:f}):i(c,{state:"error",message:f.error??"build failed"}):i(c,{state:"error",message:"no result returned"})}catch(h){i(c,{state:"error",message:h instanceof Error?h.message:String(h)})}}async function u(){const c=t()??[];if(c.length!==0){o(!0),s(Object.fromEntries(c.map(h=>[h.basename,{state:"building"}])));try{const h=await Ze(),f=new Map(h.results.map(p=>[p.doc,p]));s(Object.fromEntries(c.map(p=>{const m=f.get(p.basename);return m?[p.basename,m.ok?{state:"done",result:m}:{state:"error",message:m.error??"build failed"}]:[p.basename,{state:"error",message:"no result returned"}]})))}catch(h){const f=h instanceof Error?h.message:String(h);s(Object.fromEntries(c.map(p=>[p.basename,{state:"error",message:f}])))}finally{o(!1)}}}const d=()=>r()||Object.values(n()).some(c=>c.state==="building");return(()=>{var c=Nr(),h=c.firstChild,f=h.firstChild;return f.nextSibling,g(h,w(R,{get when(){return(t()??[]).length>1},get children(){var p=Ir();return p.$$click=()=>void u(),g(p,()=>r()?"Building all…":"Build all PDFs"),I(()=>p.disabled=d()),p}}),null),g(c,w(R,{get when(){return t()},get fallback(){return Mr()},children:p=>w(R,{get when(){return p().length>0},get fallback(){return Br()},get children(){var m=Fr();return g(m,w(q,{get each(){return p()},children:b=>{const v=()=>l(b.basename);return(()=>{var $=Vr(),A=$.firstChild,_=A.nextSibling,j=_.nextSibling;return g(A,()=>b.filename),_.$$click=()=>void a(b.basename),g(_,()=>v().state==="building"?"Building…":"Build PDF"),g(j,w(R,{get when(){return v().state==="done"},get children(){return(()=>{const S=v().result;return[Hr(),(()=>{var T=Wr();return g(T,()=>Xr(S.path)),I(()=>z(T,"title",S.path)),T})(),w(R,{get when(){return S.bytes!==void 0},get children(){var T=qr();return g(T,()=>Gr(S.bytes)),T}}),w(R,{get when(){return S.downloadUrl},get children(){var T=Kr();return I(B=>{var k=S.downloadUrl,E=`${S.doc}.pdf`;return k!==B.e&&z(T,"href",B.e=k),E!==B.t&&z(T,"download",B.t=E),B},{e:void 0,t:void 0}),T}})]})()}}),null),g(j,w(R,{get when(){return v().state==="error"},get children(){var S=Ur();return g(S,()=>v().message),S}}),null),I(S=>{var T=v().state==="building",B=v().state==="done",k=v().state==="error",E=v().state==="building"||r();return T!==S.e&&$.classList.toggle("is-building",S.e=T),B!==S.t&&$.classList.toggle("is-done",S.t=B),k!==S.a&&$.classList.toggle("is-error",S.a=k),E!==S.o&&(_.disabled=S.o=E),S},{e:void 0,t:void 0,a:void 0,o:void 0}),$})()}})),m}})}),null),c})()}function Xr(e){if(!e)return"";const t=e.replace(/\\/g,"/"),n=t.lastIndexOf("/out/");return n>=0?t.slice(n+1):t}ne(["click"]);var Jr=y("<div class=app><main class=content><div class=tab-content>");const Yr=e=>t=>{const n=wt(),s=O(()=>n.pathname==="/");return(()=>{var r=Jr(),o=r.firstChild,i=o.firstChild;return g(r,w(Fn,{get children(){return w(Wn,{get docs(){return e.docs()},get current(){return e.currentDoc()},get onChange(){return e.onDocChange}})}}),o),g(r,w(R,{get when(){return e.errorMessage()},get children(){return w(Un,{get message(){return e.errorMessage()},get onDismiss(){return e.onDismissError}})}}),o),g(o,w(Kn,{get visible(){return s()},get doc(){return e.currentDoc()}}),i),g(i,()=>t.children),I(l=>{var a=!!s(),u=!!s();return a!==l.e&&o.classList.toggle("content--preview",l.e=a),u!==l.t&&i.classList.toggle("hidden",l.t=u),l},{e:void 0,t:void 0}),r})()};function Qr(){const[e,t]=D(0),[n,s]=D(0),[r,o]=D(null),[i,l]=D([]),[a,u]=D(null);Ot(async()=>{try{const f=await Ie();l(f.docs),u(f.default)}catch(f){console.error("Failed to fetch /_api/docs:",f)}});async function d(){try{const f=await Ie();l(f.docs);const p=a();p&&!f.docs.some(m=>m.basename===p)&&u(f.default)}catch(f){console.error("Failed to refresh /_api/docs:",f)}}const c=er(f=>{var p,m;if(f.kind==="error"){o(f.message);return}if(r()&&o(null),f.kind==="docs"){d(),s(b=>b+1);return}if(f.kind==="content"){if(f.doc!==a())return;const b=document.getElementById("preview-iframe");(p=b==null?void 0:b.contentWindow)==null||p.location.reload();return}if(f.kind==="project"||f.kind==="components"||f.kind==="styles"||f.kind==="assets"){const b=document.getElementById("preview-iframe");(m=b==null?void 0:b.contentWindow)==null||m.location.reload()}(f.kind==="project"||f.kind==="components"||f.kind==="styles")&&t(b=>b+1)});ve(c);const h=Yr({errorMessage:r,onDismissError:()=>o(null),docs:i,currentDoc:a,onDocChange:f=>u(f)});return w(vt.Provider,{value:{paletteVersion:e,docsVersion:n},get children(){return w(jn,{root:h,get children(){return[w(ue,{path:"/",component:()=>null}),w(ue,{path:"/palette",component:vr}),w(ue,{path:"/help",component:Dr}),w(ue,{path:"/export",component:zr})]}})}})}const xt=document.getElementById("root");if(!xt)throw new Error("#root not found");Yt(()=>w(Qr,{}),xt);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" data-theme="dark">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Tender Preview</title>
|
|
7
|
+
<script type="module" crossorigin src="/_ui/assets/index.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/_ui/assets/index.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@possibleworlds/tender",
|
|
3
|
+
"version": "0.1.0-rc.1",
|
|
4
|
+
"description": "Layout-as-code for print PDFs. Markdown + components + design tokens, rendered through CSS Paged Media and headless Chromium.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Possible Worlds",
|
|
7
|
+
"homepage": "https://github.com/PossibleWorldsDotSpace/tender#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/PossibleWorldsDotSpace/tender.git",
|
|
11
|
+
"directory": "packages/cli"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/PossibleWorldsDotSpace/tender/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"pdf",
|
|
18
|
+
"print",
|
|
19
|
+
"layout",
|
|
20
|
+
"typography",
|
|
21
|
+
"markdown",
|
|
22
|
+
"paged-media",
|
|
23
|
+
"pagedjs"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=20"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"bin": {
|
|
30
|
+
"tender": "./dist/cli.js"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"templates",
|
|
35
|
+
"assets",
|
|
36
|
+
"skill",
|
|
37
|
+
"NOTICE.md"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "pnpm --filter @tender/core --filter @tender/render --filter @tender/preview-ui build && tsup && chmod +x dist/cli.js",
|
|
41
|
+
"build:tsc": "tsc -p tsconfig.json && chmod +x dist/cli.js",
|
|
42
|
+
"pretest": "node scripts/copy-skill.mjs",
|
|
43
|
+
"test": "vitest run --passWithNoTests",
|
|
44
|
+
"test:watch": "vitest",
|
|
45
|
+
"preview:configurator": "tsx scripts/preview-configurator.mts",
|
|
46
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
47
|
+
"prepack": "cp package.json package.json.prepack.bak && npm pkg delete 'devDependencies.@tender/core' 'devDependencies.@tender/render' 'devDependencies.@tender/preview-ui'",
|
|
48
|
+
"postpack": "mv package.json.prepack.bak package.json"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"chokidar": "^5.0.0",
|
|
52
|
+
"commander": "^12.0.0",
|
|
53
|
+
"express": "^5.2.1",
|
|
54
|
+
"handlebars": "^4.7.9",
|
|
55
|
+
"htmlparser2": "^12.0.0",
|
|
56
|
+
"js-yaml": "^4.1.1",
|
|
57
|
+
"pagedjs": "^0.4.3",
|
|
58
|
+
"puppeteer": "^24.43.0",
|
|
59
|
+
"rehype-stringify": "^10.0.1",
|
|
60
|
+
"remark-directive": "^4.0.0",
|
|
61
|
+
"remark-gfm": "^4.0.1",
|
|
62
|
+
"remark-parse": "^11.0.0",
|
|
63
|
+
"remark-rehype": "^11.1.2",
|
|
64
|
+
"retext": "^9.0.0",
|
|
65
|
+
"retext-english": "^5.0.0",
|
|
66
|
+
"retext-smartypants": "^6.2.0",
|
|
67
|
+
"retext-stringify": "^4.0.0",
|
|
68
|
+
"unified": "^11.0.5",
|
|
69
|
+
"unist-util-visit": "^5.1.0",
|
|
70
|
+
"ws": "^8.20.1",
|
|
71
|
+
"yaml": "^2.6.0",
|
|
72
|
+
"zod": "^4.4.3"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@types/express": "^5.0.6",
|
|
76
|
+
"@types/ws": "^8.18.1",
|
|
77
|
+
"tsup": "^8.5.1",
|
|
78
|
+
"tsx": "^4.19.0",
|
|
79
|
+
"typescript": "^5.4.0",
|
|
80
|
+
"vitest": "^1.6.0"
|
|
81
|
+
}
|
|
82
|
+
}
|