for-humanity 0.7.0 → 0.8.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.8.0 — 2026-10-13
6
+
7
+ - Add a `cursorFace` site setting for the pixel face that follows the mouse on desktop. It is off by default; this documentation site turns it on.
8
+ - Add an optional `port` site setting for the `dev` and `preview` servers, defaulting to 4321, so two document projects can run side by side; `preview` now reads and validates the site configuration too.
9
+
10
+ ## 0.7.1 — 2026-10-11
11
+
12
+ - Set Hangul in body text, labels, inline code and the site name in bundled IBM Plex Sans KR, the source of Monoplex KR's Hangul, at its natural width; Latin stays in Monoplex KR, and code blocks and flowcharts keep two-cell Hangul for the grid.
13
+ - Tighten letter spacing to -0.03em for body text, labels and inline code, -0.04em for h2 and parts and -0.045em for h1; code blocks and flowcharts stay at 0 for the grid.
14
+ - Narrow the document navigation and outline sidebars from 240px to 200px and let the body fill the rest of a page up to 1920px instead of a 900px column, keeping the 32px gaps; show the outline from 1360px so the body stays about 800px or wider.
15
+
5
16
  ## 0.7.0 — 2026-10-06
6
17
 
7
18
  - Replace Pretendard and JetBrains Mono with bundled Monoplex KR for body text, labels, code and flowcharts; align the flowchart grid to its 1:2 Latin–Hangul widths.
package/README.md CHANGED
@@ -33,7 +33,7 @@ Write Markdown. Keep the context. Share a static site.
33
33
  Node.js 22 or later and pnpm. Install the CLI in your document project:
34
34
 
35
35
  ```sh
36
- pnpm add -D --save-exact for-humanity@0.7.0
36
+ pnpm add -D --save-exact for-humanity@0.8.0
37
37
  mkdir docs
38
38
  ```
39
39
 
@@ -52,7 +52,7 @@ pnpm exec for-humanity preview docs
52
52
 
53
53
  If your Markdown files are in the project root, use `.` instead of `docs`. The root `README.md` becomes the home page; root `AGENTS.md` and `CLAUDE.md` stay out of the site.
54
54
 
55
- Version `0.7.0` supports `dev`, `build` and `preview`. `init` is planned; see the [Roadmap](https://github.com/minu-ha/for-humanity/blob/main/templates/document/roadmap.md) and [Changelog](https://github.com/minu-ha/for-humanity/blob/main/CHANGELOG.md).
55
+ Version `0.8.0` supports `dev`, `build` and `preview`. `init` is planned; see the [Roadmap](https://github.com/minu-ha/for-humanity/blob/main/templates/document/roadmap.md) and [Changelog](https://github.com/minu-ha/for-humanity/blob/main/CHANGELOG.md).
56
56
  Cloudflare Pages can host the generated site. See [Deployment](https://github.com/minu-ha/for-humanity/blob/main/templates/document/deployment.md) for the build settings.
57
57
  Set an optional public root `url` in the site configuration to generate `robots.txt` and `sitemap.xml`; projects without a URL emit neither file. See [Crawling](https://github.com/minu-ha/for-humanity/blob/main/templates/document/crawling.md).
58
58
 
@@ -75,12 +75,12 @@ pnpm preview # Preview the static site
75
75
  pnpm build:pages # Add Cloudflare Pages headers and a 404 page
76
76
  ```
77
77
 
78
- Changes pushed to `main` update the documentation site. A stable version tag such as `v0.7.0` runs checks, publishes the package to npm, then creates a GitHub Release with the same package file.
78
+ Changes pushed to `main` update the documentation site. A stable version tag such as `v0.8.0` runs checks, publishes the package to npm, then creates a GitHub Release with the same package file.
79
79
  The npm README updates with each package release. See [Maintenance](https://github.com/minu-ha/for-humanity/blob/main/templates/document/maintenance.md#packaging-and-release) for the release steps.
80
80
 
81
81
  ## Make it yours
82
82
 
83
- A document folder is enough to get started. Without a site configuration, the sidebar shows **for humanity**. The pixel face appears in the browser tab and follows the mouse on desktop.
83
+ A document folder is enough to get started. Without a site configuration, the sidebar shows **for humanity**. The pixel face appears in the browser tab, and follows the mouse on desktop when the site sets `cursorFace: true`.
84
84
  The folder's `README.md` becomes the home page at `/`, with no frontmatter required. Click the site name to return home.
85
85
  This repository generates [the documentation home](https://github.com/minu-ha/for-humanity/blob/main/templates/document/README.md) from its root README.md and [the site changelog](https://github.com/minu-ha/for-humanity/blob/main/templates/document/changelog.md) from CHANGELOG.md. Edit those source files, then run `pnpm sync:docs`; `pnpm dev` and `pnpm build` also sync them on startup.
86
86
  Set your own name in `for-humanity.config.mjs`:
package/dist/browser.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var U=Symbol("RENDERER"),ee=Symbol("ERROR_HANDLER"),S=Symbol("STASH"),qe=Symbol("INTERNAL"),Xe=Symbol("MEMO"),_e=Symbol("PERMALINK");var bt=e=>(e[qe]=!0,e);var W={Stringify:1,BeforeStream:2,Stream:3},k=(e,t)=>{let n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},zo=/[&<>'"]/,ve=async(e,t)=>{let n="";t||=[];let r=await Promise.all(e);for(let o=r.length-1;n+=r[o],o--,!(o<0);o--){let i=r[o];typeof i=="object"&&t.push(...i.callbacks||[]);let a=i.isEscaped;if(i=await(typeof i=="object"?i.toString():i),typeof i=="object"&&t.push(...i.callbacks||[]),i.isEscaped??a)n+=i;else{let c=[n];G(i,c),n=c[0]}}return k(n,t)},G=(e,t)=>{let n=e.search(zo);if(n===-1){t[0]+=e;return}let r,o,i=0;for(o=n;o<e.length;o++){switch(e.charCodeAt(o)){case 34:r="&quot;";break;case 39:r="&#39;";break;case 38:r="&amp;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}t[0]+=e.substring(i,o)+r,i=o+1}t[0]+=e.substring(i,o)},wt=e=>{let t=e.callbacks;if(!t?.length)return e;let n=[e],r={};return t.forEach(o=>o({phase:W.Stringify,buffer:n,context:r})),n[0]},ke=async(e,t,n,r,o)=>{typeof e=="object"&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let i=e.callbacks;if(!i?.length)return Promise.resolve(e);o?o[0]+=e:o=[e];let a=Promise.all(i.map(c=>c({phase:t,buffer:o,context:r}))).then(c=>Promise.all(c.filter(Boolean).map(f=>ke(f,t,!1,r,o))).then(()=>o[0]));return n?k(await a,i):a};var ye={title:[],script:["src"],style:["data-href"],link:["href"],meta:["name","httpEquiv","charset","itemProp"]},Ee={},Ze="data-precedence",Je=e=>e.rel==="stylesheet"&&"precedence"in e,Ye=(e,t)=>e==="link"?t:ye[e].length>0;var xn=Object.defineProperty,Qe=(e,t)=>{let n={};for(var r in e)xn(n,r,{get:e[r],enumerable:!0});return t||xn(n,Symbol.toStringTag,{value:"Module"}),n};var ue=e=>Array.isArray(e)?e:[e];var et=Qe({button:()=>To,form:()=>Ao,input:()=>Mo,link:()=>Po,meta:()=>Co,script:()=>Eo,style:()=>Zo,title:()=>ko}),bn=new WeakMap,wn=(e,t,n,r)=>({buffer:o,context:i})=>{if(!o)return;let a=bn.get(i)||{};bn.set(i,a);let c=a[e]||=[],f=!1,u=ye[e],p=Ye(e,r!==void 0);if(p){e:for(let[,s]of c)if(!(e==="link"&&!(s.rel==="stylesheet"&&s["data-precedence"]!==void 0))){for(let l of u)if((s?.[l]??null)===n?.[l]){f=!0;break e}}}if(f?o[0]=o[0].replaceAll(t,""):p||e==="link"?c.push([t,n,r]):c.unshift([t,n,r]),o[0].indexOf("</head>")!==-1){let s;if(e==="link"||r!==void 0){let l=[];s=c.map(([d,,m],h)=>{if(m===void 0)return[d,Number.MAX_SAFE_INTEGER,h];let _=l.indexOf(m);return _===-1&&(l.push(m),_=l.length-1),[d,_,h]}).sort((d,m)=>d[1]-m[1]||d[2]-m[2]).map(([d])=>d)}else s=c.map(([l])=>l);s.forEach(l=>{o[0]=o[0].replaceAll(l,"")}),o[0]=o[0].replace(/(?=<\/head>)/,()=>s.join(""))}},Pe=(e,t,n)=>F([new N(e,n,ue(t??[]))]),Ce=(e,t,n,r)=>{if("itemProp"in n)return Pe(e,t,n);let{precedence:o,blocking:i,...a}=n;o=r?o??"":void 0,r&&(a[Ze]=o);let c=new N(e,a,ue(t||[])).toString();return c instanceof Promise?c.then(f=>k(f,[...f.callbacks||[],wn(e,f,a,o)])):k(c,[wn(e,c,a,o)])},ko=({children:e,...t})=>{let n=tt();if(n){let r=M(n);if(r==="svg"||r==="head")return new N("title",t,ue(e??[]))}return Ce("title",e,t,!1)},Eo=({children:e,...t})=>{let n=tt();return["src","async"].some(r=>!t[r])||n&&M(n)==="head"?Pe("script",e,t):Ce("script",e,t,!1)},Zo=({children:e,...t})=>["href","precedence"].every(n=>n in t)?(t["data-href"]=t.href,delete t.href,Ce("style",e,t,!0)):Pe("style",e,t),Po=({children:e,...t})=>["onLoad","onError"].some(n=>n in t)||t.rel==="stylesheet"&&(!("precedence"in t)||"disabled"in t)?Pe("link",e,t):Ce("link",e,t,Je(t)),Co=({children:e,...t})=>{let n=tt();return n&&M(n)==="head"?Pe("meta",e,t):Ce("meta",e,t,!1)},$n=(e,{children:t,...n})=>new N(e,n,ue(t??[])),Ao=e=>(typeof e.action=="function"&&(e.action=_e in e.action?e.action[_e]:void 0),$n("form",e)),Sn=(e,t)=>(typeof t.formAction=="function"&&(t.formAction=_e in t.formAction?t.formAction[_e]:void 0),$n(e,t)),Mo=e=>Sn("input",e),To=e=>Sn("button",e);var No=new Map([["className","class"],["htmlFor","for"],["crossOrigin","crossorigin"],["httpEquiv","http-equiv"],["itemProp","itemprop"],["fetchPriority","fetchpriority"],["noModule","nomodule"],["formAction","formaction"]]),xe=e=>No.get(e)||e,Ro=/[\s"'<>/=`\\\x00-\x1f\x7f-\x9f]/,$t=new Set,zn=1024,Oo=/^[!?]|[\s"'<>/=`\\\x00-\x1f\x7f-\x9f]/,kn=new Set,Io=256,Ae=(e,t,n)=>{e.size>=t&&e.clear(),e.add(n)},Zn=e=>kn.has(e)?!0:typeof e!="string"?!1:e.length===0?!0:Oo.test(e)?!1:(Ae(kn,Io,e),!0),zt=e=>{if($t.has(e))return!0;let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(!(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===95||r===46||r===58))return Ro.test(e)?!1:(Ae($t,zn,e),!0)}return Ae($t,zn,e),!0},Lo=/[\s"'():;\\/\[\]{}\x00-\x1f\x7f-\x9f]/,St=new Set,En=1024,Do=e=>{if(St.has(e))return!0;let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(!(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===95))return Lo.test(e)?!1:(Ae(St,En,e),!0)}return Ae(St,En,e),!0},jo=/[;"'\\/\[\](){}]/,Fo=e=>{if(!jo.test(e))return!1;let t=0,n=[];for(let r=0,o=e.length;r<o;r++){let i=e.charCodeAt(r);if(i===92){if(r===o-1)return!0;r++}else if(t!==0){if(i===10||i===12||i===13)return!0;i===t&&(t=0)}else if(i===47&&e.charCodeAt(r+1)===42){let a=e.indexOf("*/",r+2);if(a===-1)return!0;r=a+1}else if(i===34||i===39)t=i;else if(i===40)n.push(41);else if(i===91)n.push(93);else{if(i===123||i===125)return!0;if(i===41||i===93){if(n[n.length-1]!==i)return!0;n.pop()}else if(i===59&&n.length===0)return!0}}return t!==0||n.length!==0},Me=(e,t)=>{for(let[n,r]of Object.entries(e)){let o=n[0]==="-"||!/[A-Z]/.test(n)?n:n.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`);if(!Do(o))continue;if(r==null){t(o,null);continue}let i;if(typeof r=="number")i=o.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?!.*gap)(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/)?`${r}`:`${r}px`;else if(typeof r=="string"){if(Fo(r))continue;i=r}else continue;t(o,i)}};var Te,tt=()=>Te,Bo=e=>/[A-Z]/.test(e)&&e.match(/^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e,Uo=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ho=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],Pn=(e,t)=>e.then(n=>{if(typeof n!="string"&&!Array.isArray(n)&&!(n instanceof N))return n;let r=Array.isArray(n)?n:[n],o=()=>{let i=[""];return be(r,i),i.length===1?k(i[0],i.callbacks):ve(i,i.callbacks)};return t?t(o):Re(o)}),be=(e,t)=>{for(let n=0,r=e.length;n<r;n++){let o=e[n];if(typeof o=="string")G(o,t);else{if(typeof o=="boolean"||o===null||o===void 0)continue;if(o instanceof N)o.toStringToBuffer(t);else if(typeof o=="number")t[0]+=o;else if(o.isEscaped){t[0]+=o;let i=o.callbacks;i&&(t.callbacks||=[],t.callbacks.push(...i))}else o instanceof Promise?t.unshift("",o):be(o,t)}}},F=e=>Re(()=>{let t=[""];return be(e,t),t.length===1?k(t[0],t.callbacks):ve(t,t.callbacks)}),te=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof N)&&!(e instanceof Promise)&&!e.isEscaped&&typeof e.toString=="function",ne=e=>{let t=e.toString(),n=r=>F([String(r)]);return t instanceof Promise?t.then(n):n(t)},N=class{tag;props;key;children;isEscaped=!0;constructor(e,t,n){if(typeof e!="function"&&!Zn(e))throw new Error(`Invalid JSX tag name: ${e}`);this.tag=e,this.props=t,this.children=n}get type(){return this.tag}get ref(){return this.props.ref||null}toString(){return Re(()=>{let t=[""];return this.toStringToBuffer(t),t.length===1?"callbacks"in t?wt(k(t[0],t.callbacks)).toString():t[0]:ve(t,t.callbacks)})}toStringToBuffer(e){let t=this.tag,n=this.props,{children:r}=this;e[0]+=`<${t}`;let o=t==="svg"||Te&&M(Te)==="svg"?i=>Bo(xe(i)):i=>xe(i);for(let[i,a]of Object.entries(n))if(i=o(i),!!zt(i)&&i!=="children"){if(i==="style"&&typeof a=="object"){let c="";Me(a,(f,u)=>{u!=null&&(c+=`${c?";":""}${f}:${u}`)}),e[0]+=' style="',G(c,e),e[0]+='"'}else if(typeof a=="string")e[0]+=` ${i}="`,G(a,e),e[0]+='"';else if(a!=null)if(typeof a=="number"||a.isEscaped)e[0]+=` ${i}="${a}"`;else if(typeof a=="boolean"&&Ho.includes(i))a&&(e[0]+=` ${i}=""`);else if(i==="dangerouslySetInnerHTML"){if(r.length>0)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r=[k(a.__html)]}else if(a instanceof Promise)e[0]+=` ${i}="`,e.unshift('"',a);else if(typeof a=="function"){if(!i.startsWith("on")&&i!=="ref")throw new Error(`Invalid prop '${i}' of type 'function' supplied to '${t}'.`)}else e[0]+=` ${i}="`,G(a.toString(),e),e[0]+='"'}if(Uo.includes(t)&&r.length===0){e[0]+="/>";return}e[0]+=">",be(r,e),e[0]+=`</${t}>`}},kt=class extends N{toStringToBuffer(e){let{children:t}=this,n={...this.props};t.length&&(n.children=t.length===1?t[0]:t);let r=this.tag.call(null,n);typeof r=="boolean"||r==null||(r instanceof Promise?H.length===0?e.unshift("",Pn(r)):e.unshift("",Pn(r,le())):r instanceof N?r.toStringToBuffer(e):Array.isArray(r)?be(r,e):typeof r=="number"||r.isEscaped?(e[0]+=r,r.callbacks&&(e.callbacks||=[],e.callbacks.push(...r.callbacks))):G(r,e))}},Et=class extends N{toStringToBuffer(e){be(this.children,e)}},Zt=(e,t,...n)=>{t??={},n.length&&(t.children=n.length===1?n[0]:n);let r=t.key;delete t.key;let o=Ne(e,t,n);return o.key=r,o},Cn=!1,Ne=(e,t,n)=>{if(!Cn){for(let r in Ee)et[r][U]=Ee[r];Cn=!0}return typeof e=="function"?new kt(e,t,n):et[e]?new kt(et[e],t,n):e==="svg"||e==="head"?(Te||=Oe(""),new N(e,t,[new kt(Te,{value:e},n)])):new N(e,t,n)};var R=({children:e})=>new Et("",{children:e},Array.isArray(e)?e:e?[e]:[]);var H=[],An=!1,Pt,Ct,At=0,Mt=!1,Mn=()=>{if(An)return Pt;An=!0;let e=globalThis,t;for(let n of[()=>e.process?.getBuiltinModule?.("node:async_hooks")?.AsyncLocalStorage,()=>e.process?.mainModule?.require?.("node:async_hooks")?.AsyncLocalStorage]){try{t=n()}catch{}if(t)break}return t&&(Pt=new t),Pt},Ie=()=>Mn()?.getStore()||Ct,Tn=()=>{At>0&&!Mt&&(Mt=!0,console.warn("hono/jsx: AsyncLocalStorage is unavailable in this runtime, so useContext() after an await in an async component falls back to the context default value during server-side rendering. To get provided values across await boundaries, use a runtime with AsyncLocalStorage (Node.js >= 20.16, Deno, Bun, or Cloudflare Workers with the nodejs_compat flag)."))},Nn=(e,t)=>{if(!e)return Tn(),t.values;let n=e.get(t);return n||(n=[t.values[0]],e.set(t,n)),n},Rn=(e,t)=>{if(!e)return Tn(),t.values.at(-1);let n=e.get(t);return n?.length?n.at(-1):t.values[0]},Vo=e=>(e?H.filter(t=>e.has(t)):H).map(t=>[t,Rn(e,t)]),Ko=(e,t,n)=>Re(()=>{let r=Ie(),o=n.map(([a,c])=>{let f=Nn(r,a);return f.push(c),f}),i=()=>{o.forEach(a=>{a.pop()})};try{let a=e();return a instanceof Promise?a.finally(i):(i(),a)}catch(a){throw i(),a}},t),Re=(e,t)=>{if(Ie())return e();let n=t??new WeakMap,r=Mn();if(r)return r.run(n,e);Ct=n;let o;try{o=e()}finally{Ct=void 0}return!Mt&&o instanceof Promise&&(At++,o=o.finally(()=>{At--})),o},le=()=>{let e=Ie(),t=Vo(e);return n=>Ko(n,e,t)},Oe=e=>{let t=[e],n=(r=>{let o=Nn(Ie(),n);o.push(r.value);let i;try{i=typeof r.children=="string"?F([r.children]):te(r.children)?ne(r.children):r.children?(Array.isArray(r.children)?new Et("",{},r.children):r.children).toString():k("")}catch(a){throw o.pop(),a}return i instanceof Promise?i.finally(()=>o.pop()).then(a=>k(a,a.callbacks)):(o.pop(),k(i))});return n.values=t,n.Provider=n,n[U]=Tt(t),H.push(n),n},M=e=>Rn(Ie(),e);var Tt=e=>({value:t,children:n})=>{if(!n)return;let r={children:[{tag:bt(()=>{e.push(t)}),props:{}}]};Array.isArray(n)?r.children.push(...n.flat()):r.children.push(n),r.children.push({tag:bt(()=>{e.pop()}),props:{}});let o={tag:"",props:r,type:""};return o[ee]=i=>{throw e.pop(),i},o},Le=e=>{let t=[e],n=Tt(t);return n.values=t,n.Provider=n,H.push(n),n};var Wo=0;var Go=2,qo=3,Xo=4,Nt=new WeakMap,Rt=(e,t)=>!e||!t||e.length!==t.length||t.some((n,r)=>n!==e[r]);var Jo;var On=[];var O=e=>{let t=()=>typeof e=="function"?e():e,n=D.at(-1);if(!n)return[t(),()=>{}];let[,r]=n,o=r[S][1][Wo]||=[],i=r[S][0]++;return o[i]||=[t(),a=>{let c=Jo,f=o[i];if(typeof a=="function"&&(a=a(f[0])),!Object.is(a,f[0]))if(f[0]=a,On.length){let[u,p]=On.at(-1);Promise.all([u===3?r:De([u,!1,c],r),p]).then(([s])=>{if(!s||!(u===2||u===3))return;let l=s.vC;requestAnimationFrame(()=>{setTimeout(()=>{l===s.vC&&De([u===3?1:0,!1,c],s)})})})}else De([0,!1,c],r)}]};var In=(e,t,n)=>{let r=D.at(-1);if(!r)return;let[,o]=r,i=o[S][1][1]||=[],a=o[S][0]++,[c,,f]=i[a]||=[];if(Rt(c,n)){f&&f();let u=()=>{p[e]=void 0,p[2]=t()},p=[n,void 0,void 0,void 0,void 0];p[e]=u,i[a]=p}},nt=(e,t)=>In(3,e,t),I=(e,t)=>In(1,e,t);var fe=(e,t)=>{let n=D.at(-1);if(!n)return e;let[,r]=n,o=r[S][1][Go]||=[],i=r[S][0]++,a=o[i];return Rt(a?.[1],t)?o[i]=[e,t]:e=o[i][0],e};function E(e){let t=D.at(-1);if(!t)return{current:e};let[,n]=t,r=n[S][1][Xo]||=[],o=n[S][0]++;return r[o]||={current:e}}var rt=e=>{let t=Nt.get(e);if(t){if(t.length===2)throw t[1];return t[0]}throw e.then(n=>Nt.set(e,[n]),n=>Nt.set(e,[void 0,n])),e},ot=(e,t)=>{let n=D.at(-1);if(!n)return e();let[,r]=n,o=r[S][1][qo]||=[],i=r[S][0]++,a=o[i];return Rt(a?.[1],t)&&(o[i]=[e(),t]),o[i][0]};var Fe="_hp",Yo={Change:"Input",DoubleClick:"DblClick"},Qo={svg:"2000/svg",math:"1998/Math/MathML"},D=[],je=new WeakMap,we,Hn=()=>we,T=e=>"t"in e,Ot={onClick:["click",!1]},Ln=e=>{if(!e.startsWith("on"))return;if(Ot[e])return Ot[e];let t=e.match(/^on([A-Z][a-zA-Z]+?(?:PointerCapture)?)(Capture)?$/);if(t){let[,n,r]=t;return Ot[e]=[(Yo[n]||n).toLowerCase(),!!r]}},Dn=(e,t)=>we&&e instanceof SVGElement&&/[A-Z]/.test(t)&&(t in e.style||t.match(/^(?:o|pai|str|u|ve)/))?t.replace(/([A-Z])/g,"-$1").toLowerCase():t,Vn=e=>e==null||e===!1?null:e,ei=(e,t)=>{"value"in t&&(e.value=Vn(t.value),!e.multiple&&e.selectedIndex===-1&&(e.selectedIndex=0))},jn=e=>e instanceof DOMException&&e.name==="InvalidCharacterError",ti=(e,t,n)=>{t||={};for(let r in t){let o=t[r];if(r!=="children"&&(!n||n[r]!==o)){r=xe(r);let i=Ln(r);if(i){if(n?.[r]!==o&&(n&&e.removeEventListener(i[0],n[r],i[1]),o!=null)){if(typeof o!="function")throw new Error(`Event handler for "${r}" is not a function`);e.addEventListener(i[0],o,i[1])}}else if(r==="dangerouslySetInnerHTML"&&o)e.innerHTML=o.__html;else if(r==="ref"){je.get(e)?.();let a;typeof o=="function"?a=o(e)||(()=>o(null)):o&&"current"in o&&(o.current=e,a=()=>o.current=null),je.set(e,a)}else if(r==="style"){let a=e.style;typeof o=="string"?a.cssText=o:(a.cssText="",o!=null&&Me(o,a.setProperty.bind(a)))}else{if(r==="value"){let c=e.nodeName;if(c==="SELECT")continue;if((c==="INPUT"||c==="TEXTAREA")&&(e.value=Vn(o),c==="TEXTAREA")){e.textContent=o;continue}}else(r==="checked"&&e.nodeName==="INPUT"||r==="selected"&&e.nodeName==="OPTION")&&(e[r]=o);let a=Dn(e,r);try{o==null||o===!1?e.removeAttribute(a):o===!0?e.setAttribute(a,""):typeof o=="string"||typeof o=="number"?e.setAttribute(a,o):e.setAttribute(a,o.toString())}catch(c){if(!jn(c))throw c}}}}if(n)for(let r in n){let o=n[r];if(r!=="children"&&!(r in t)){r=xe(r);let i=Ln(r);if(i)e.removeEventListener(i[0],o,i[1]);else if(r==="ref")je.get(e)?.(),je.delete(e);else try{e.removeAttribute(Dn(e,r))}catch(a){if(!jn(a))throw a}}}},ni=(e,t)=>{t[S][0]=0,D.push([e,t]);let n=t.tag[U]||t.tag,r=n.defaultProps?{...n.defaultProps,...t.props}:t.props;try{return[n.call(null,r)]}finally{D.pop()}},Kn=(e,t,n,r,o)=>{e.vR?.length&&(r.push(...e.vR),delete e.vR),typeof e.tag=="function"&&e[S][1][1]?.forEach(i=>o.push(i)),e.vC.forEach(i=>{if(T(i))n.push(i);else if(typeof i.tag=="function"||i.tag===""){i.c=t;let a=n.length;if(Kn(i,t,n,r,o),i.s){for(let c=a;c<n.length;c++)n[c].s=!0;i.s=!1}}else n.push(i),i.vR?.length&&(r.push(...i.vR),delete i.vR)})},ri=e=>{for(;e&&(e.tag===Fe||!e.e);)e=e.tag===Fe||!e.vC?.[0]?e.nN:e.vC[0];return e?.e},Wn=e=>{T(e)||(e[S]?.[1][1]?.forEach(t=>t[2]?.()),je.get(e.e)?.(),e.p===2&&e.vC?.forEach(t=>t.p=2),e.vC?.forEach(Wn)),e.p||(e.e?.remove(),delete e.e),typeof e.tag=="function"&&(pe.delete(e),it.delete(e),delete e[S][3],e.a=!0)},It=(e,t,n)=>{e.c=t,Gn(e,t,n)},Fn=(e,t)=>{if(t){for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n}},Bn=Symbol(),Gn=(e,t,n)=>{let r=[],o=[],i=[];Kn(e,t,r,o,i),o.forEach(Wn);let a=n?void 0:t.childNodes,c,f=null;if(n)c=-1;else if(!a.length)c=0;else{let u=Fn(a,ri(e.nN));u!==void 0?(f=a[u],c=u):c=Fn(a,r.find(p=>p.tag!==Fe&&p.e)?.e)??-1,c===-1&&(n=!0)}for(let u=0,p=r.length;u<p;u++,c++){let s=r[u],l;if(s.s&&s.e)l=s.e,s.s=!1;else{let d=n||!s.e;T(s)?(s.e&&s.d&&(s.e.textContent=s.t),s.d=!1,l=s.e||=document.createTextNode(s.t)):(l=s.e||=s.n?document.createElementNS(s.n,s.tag):document.createElement(s.tag),ti(l,s.props,s.pP),Gn(s,l,d),s.tag==="select"&&ei(l,s.props))}s.tag===Fe?c--:n?l.parentNode||t.appendChild(l):a[c]!==l&&a[c-1]!==l&&(a[c+1]===l?t.appendChild(a[c]):t.insertBefore(l,f||a[c]||null))}if(e.pP&&(e.pP=void 0),i.length){let u=[],p=[];i.forEach(([,s,,l,d])=>{s&&u.push(s),l&&p.push(l),d?.()}),u.forEach(s=>s()),p.length&&requestAnimationFrame(()=>{p.forEach(s=>s())})}},oi=(e,t)=>!!(e&&e.length===t.length&&e.every((n,r)=>n[1]===t[r][1])),ii=e=>{let t=new Map;for(let n of e){let r=n.key;if(t.has(r))return;t.set(r,n)}return t},it=new WeakMap,st=(e,t,n)=>{let r=!n&&t.pC;n&&(t.pC||=t.vC);let o;try{n||=typeof t.tag=="function"?ni(e,t):ue(t.props.children),n[0]?.tag===""&&n[0][ee]&&(o=n[0][ee],e[5].push([e,o,t]));let i=r?[...t.pC]:t.vC?[...t.vC]:void 0,a=[],c,f=(i?.length||0)*2,u;for(let p=0;p<n.length;p++){if(Array.isArray(n[p])){n.splice(p,1,...n[p].flat(1/0)),p--;continue}let s=Lt(n[p]);if(s){typeof s.tag=="function"&&!s.tag[qe]&&(H.length>0&&(s[S][2]=H.map(d=>[d,d.values.at(-1)])),e[5]?.length&&(s[S][3]=e[5].at(-1)));let l;if(u&&s.key===void 0&&!T(s)&&(i=[...u.values()],u=void 0),u){let d=s.key,m=u.get(d);m&&(T(s)?T(m):m.tag===s.tag&&m.key===d)&&(l=m,u.delete(d))}else if(i&&i.length){let d=i[0];if(T(s)?T(d):!T(d)&&(s.key!==void 0?d.key===s.key&&d.tag===s.tag:d.tag===s.tag))l=i.shift();else{let m=i.findIndex(T(s)?h=>T(h):s.key!==void 0?h=>h.key===s.key&&h.tag===s.tag:h=>h.tag===s.tag);f-=m===-1?i.length:m,m!==-1&&(l=i[m],i.splice(m,1)),f<0&&(f=1/0,u=ii(i))}}if(l)if(T(s))l.t!==s.t&&(l.t=s.t,l.d=!0),s=l;else{let d=l.pP=l.props;if(l.props=s.props,l.f||=s.f||t.f,typeof s.tag=="function"){let m=l[S][2];l[S][2]=s[S][2]||[],l[S][3]=s[S][3],!l.f&&((l.o||l)===s.o||l.tag[Xe]?.(d,l.props))&&oi(m,l[S][2])&&(l.s=!0)}s=l}else if(!T(s)&&we){let d=M(we);d&&(s.n=d)}if(!T(s)&&!s.s&&(st(e,s),delete s.f),a.push(s),c&&!c.s&&!s.s)for(let d=c;d&&!T(d);d=d.vC?.at(-1))d.nN=s;c=s}}i=u?[...u.values()]:i,t.vR=r?[...t.vC,...i||[]]:i||[],t.vC=a,r&&delete t.pC}catch(i){if(t.f=!0,i===Bn){if(o)return;throw i}let[a,c,f]=t[S]?.[3]||[];if(c){let u=()=>De([0,!1,e[2]],f),p=it.get(f)||[];p.push(u),it.set(f,p);let s=c(i,()=>{let l=it.get(f);if(l){let d=l.indexOf(u);if(d!==-1)return l.splice(d,1),u()}});if(s){if(e[0]===1)e[1]=!0;else if(st(e,f,[s]),(c.length===1||e!==a)&&f.c){It(f,f.c,!1);return}throw Bn}}throw i}finally{o&&e[5].pop()}},Lt=e=>{if(!(e==null||typeof e=="boolean")){if(typeof e=="string"||typeof e=="number")return{t:e.toString(),d:!0};if("vR"in e&&(e={tag:e.tag,props:e.props,key:e.key,f:e.f,type:e.tag,ref:e.props.ref,o:e.o||e}),typeof e.tag=="function")e[S]=[0,[]];else{let t=Qo[e.tag];t&&(we||=Le(""),e.props.children=[{tag:we,props:{value:e.n=`http://www.w3.org/${t}`,children:e.props.children}}])}return e}},qn=(e,t,n)=>{e.c===t&&(e.c=n,e.vC.forEach(r=>qn(r,t,n)))},Un=(e,t)=>{t[S][2]?.forEach(([n,r])=>{n.values.push(r)});try{st(e,t,void 0)}catch{return}if(t.a){delete t.a;return}t[S][2]?.forEach(([n])=>{n.values.pop()}),(e[0]!==1||!e[1])&&It(t,t.c,!1)},pe=new WeakMap,ct=[],De=async(e,t)=>{e[5]||=[];let n=pe.get(t);n&&n[0](void 0);let r,o=new Promise(i=>r=i);if(pe.set(t,[r,()=>{e[2]?e[2](e,t,i=>{Un(i,t)}).then(()=>r(t)):(Un(e,t),r(t))}]),ct.length)ct.at(-1).add(t);else{await Promise.resolve();let i=pe.get(t);i&&(pe.delete(t),i[1]())}return o},Xn=(e,t)=>{let n=[];n[5]=[],n[4]=!0,st(n,e,void 0),n[4]=!1;let r=document.createDocumentFragment();It(e,r,!0),qn(e,r,t),t.replaceChildren(r)};var at=e=>{let t=new Set;ct.push(t),e(),t.forEach(n=>{let r=pe.get(n);r&&(pe.delete(n),r[1]())}),ct.pop()},Dt=(e,t,n)=>({tag:Fe,props:{children:e},key:n,e:t,p:1});var Jn=(e,t={})=>{let n;return Object.keys(t).length>0&&console.warn("createRoot options are not supported yet"),{render(r){if(n===null)throw new Error("Cannot update an unmounted root");n?n(r):Xn(Lt({tag:()=>{let[o,i]=O(r);return n=i,o},props:{}}),e)},unmount(){n?.(null),n=null}}};function Qn(e,t){return typeof t=="bigint"?t.toString():t}var Ft=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function er(e){return new Ft(e)}function tr(e){return e==null}function nr(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}var Yn=Symbol("evaluating");function rr(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Yn)return r===void 0&&(r=Yn,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function or(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}var Bt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ut(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function oe(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function sr(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}function ie(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function cr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function lt(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Be(e){return typeof e=="string"?e:e?.message}function Ut(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function $e(e,t,n){var r;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Be(e.inst?._zod.def?.error?.(e))??Be(i?.(e))??Be(t?.error?.(e))??Be(n.customError?.(e))??Be(n.localeError?.(e))??"Invalid input",c={};for(let f of Object.keys(e))f==="inst"||f==="schema"||f==="continue"||f==="input"||f==="__proto__"||(c[f]=e[f]);return c.path??(c.path=[]),c.message=a,t?.reportInput&&(c.input=e.input),c}var si=/[\uD800-\uDBFF]/;function ar(e){let t=e.length;if(!si.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function lr(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ci(e,n,r.value)}}function de(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ht(e,t,n){return de(e,t,n,!1)}function ci(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:de(this,t,n.bind(this))},set(r){de(this,t,r)}})}function ai(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var jt,re=!1,ui={configurable:!0,get(){re=!0}};function q(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&jt!==e._zod){jt=void 0;return}jt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ui);let o=re;re=!1;try{let i=n(this);return re?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),re=re||o,i}catch(i){throw delete this[t],re=re||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function fr(e,t,n,r){let o=ai(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}var pr;var Vt={value:void 0,enumerable:!1},dr="captureStackTrace"in Error?Error:null;function li(e){let t=dr;if(t){let n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return dr=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(e,t,n,r){let o={};function i(l){this.def=l,this.constr=s,this.traits=new Set}i.prototype=o;let a=n,c=a&&new WeakSet;function f(l,d){if(l._zod){if(l._zod.traits.has(e))return}else{Vt.value=new i(d);try{Object.defineProperty(l,"_zod",Vt)}finally{Vt.value=void 0}}if(l._zod.traits.add(e),t(l,d),c){let h=Object.getPrototypeOf(l),_=l._zod.constr.prototype,z=h;for(;z&&z!==_;)z=Object.getPrototypeOf(z);let w=z??h;c.has(w)||(c.add(w),lr(w,a))}let m=s.prototype;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(h in l||(l[h]=m[h].bind(l)))}let u=r?.Parent??Object;class p extends u{}Object.defineProperty(p,"name",{value:e});function s(l){let d=r?.Parent?li(p):this;f(d,l);let m=d._zod.deferred;if(m){for(let _ of m)_();d._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(d),d}return Object.defineProperty(s,"init",{value:f}),Object.defineProperty(s,Symbol.hasInstance,{value:l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var X=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};(pr=globalThis).__zod_globalConfig??(pr.__zod_globalConfig={});var Ue=globalThis.__zod_globalConfig;function Se(e){return e&&Object.assign(Ue,e),Ue}function fi(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Qn,2)),e.message}function pi(e){this._zod.message=e}var di={get:fi,set:pi,enumerable:!0,configurable:!0},Wt={value:void 0,enumerable:!1},mr=new WeakSet([Object.prototype,Error.prototype]),hr=(e,t)=>{e.name="$ZodError",Wt.value=t,Object.defineProperty(e,"issues",Wt),Wt.value=void 0,Object.defineProperty(e,"message",di);let n=Object.getPrototypeOf(e);mr.has(n)||(mr.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},cc=C("$ZodError",hr),He=C("$ZodError",hr,void 0,{Parent:Error});var hi=e=>{let t=(n,r,o,i)=>{let a=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise)throw new X;if(c.issues.length){let f=new(i?.Err??e)(c.issues.map(u=>$e(u,a,Se())));throw Bt(f,i?.callee??t),f}return c.value};return t},Gt=hi(He),gi=e=>{let t=async(n,r,o,i)=>{let a=o?{...o,async:!0}:{async:!0},c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise&&(c=await c),c.issues.length){let f=new(i?.Err??e)(c.issues.map(u=>$e(u,a,Se())));throw Bt(f,i?.callee??t),f}return c.value};return t},qt=gi(He),_i=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new X;return i.issues.length?gr(e,i.issues,o):{success:!0,data:i.value}},Xt=_i(He);function gr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>$e(o,n,Se()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}var vi=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?gr(e,i.issues,o):{success:!0,data:i.value}},Jt=vi(He);var _r=/^[\s\S]{0,}$/;var vr=/^-?\d+(?:\.\d+)?$/,yr=/^(?:true|false)$/i;var Yt=C("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])});var xi=e=>{let t=e.value;return!tr(t)&&t.length!==void 0};var br=C("$ZodCheckMinLength",(e,t)=>{var n;Yt.init(e,t),(n=e._zod.def).when??(n.when=xi),e._zod.check=r=>{let o=r.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?ar(o):i)>=t.minimum)return;let c=ur(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var wr={major:4,minor:6,patch:5};var J=C("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wr;let r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(let i of o)for(let a of i._zod.onattach)a(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(c,f,u)=>{if(c.memo)return c;let p=ie(c),s;for(let l of f){if(l._zod.def.when){if(cr(c)||!l._zod.def.when(c))continue}else if(p)continue;let d=c.issues.length,m=l._zod.check(c);if(m instanceof Promise&&u?.async===!1)throw new X;if(s||m instanceof Promise)s=(s??Promise.resolve()).then(async()=>{await m,c.issues.length!==d&&(Ut(c.issues,d,e),p||(p=ie(c,d)))});else{if(c.issues.length===d)continue;Ut(c.issues,d,e),p||(p=ie(c,d))}}return s?s.then(()=>c):c},a=(c,f,u)=>{if(ie(c))return c.aborted=!0,c;let p=i(f,o,u);if(p instanceof Promise){if(u.async===!1)throw new X;return p.then(s=>e._zod.parse(s,u))}return e._zod.parse(p,u)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){let p=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return p instanceof Promise?p.then(s=>a(s,c,f)):a(p,c,f)}let u=e._zod.parse(c,f);if(u instanceof Promise){if(f.async===!1)throw new X;return u.then(p=>i(p,o,f))}return i(u,o,f)}}},{get"~standard"(){return Ht(this,"~standard",Si(this))},set"~standard"(e){de(this,"~standard",e)}}),zr=(e,t)=>e.issues.length?{issues:e.issues.map(n=>$e(n,t,Se()))}:{value:e.value};async function $i(e,t){let n={async:!0};return zr(await e._zod.run({value:t,issues:[]},n),n)}function Si(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return zr(r,n)}catch{}return $i(e,t)},vendor:"zod",version:1}}var kr=C("$ZodString",(e,t)=>{J.init(e,t),e._zod.pattern=t.pattern??_r,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}});var Er=C("$ZodNumber",(e,t)=>{J.init(e,t),e._zod.pattern=vr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}});var Zr=C("$ZodBoolean",(e,t)=>{J.init(e,t),e._zod.pattern=yr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}});function $r(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}var Pr=C("$ZodArray",(e,t)=>{J.init(e,t);let n=Ue.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=n?n.alloc(e,r,Array(i.length),o):Array(i.length);let a=[],c=o?.abortEarly;for(let f=0;f<i.length;f++){let u=i[f],p=t.element._zod.run({value:u,issues:[]},o);if(p instanceof Promise)a.push(p.then(s=>$r(s,r,f)));else if($r(p,r,f),c&&p.issues.length!==0&&ie(p))break}return a.length?Promise.all(a).then(()=>r):r}});function ft(e,t,n,r,o,i){let a=n in r,c=i==="optional";if(!(!a&&c&&o==="optional")){if(e.issues.length){if(o!==void 0&&c&&!a)return;t.issues.push(...lt(n,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(a||o==="defaulted"&&!c)&&(t.value[n]=void 0):t.value[n]=e.value}}var zi=[];function ki(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:zi,o=r.length?[...t,...r]:t;for(let a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let i=sr(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function Ei(e,t,n,r,o,i,a){let c=[],f=o.keySet,u=o.catchall._zod,p=u.def.type,s=u.optin,l=u.optout,d=0;for(let m in t){if(a&&n.issues.length!==d){if(ie(n,d))break;d=n.issues.length}if(f.has(m))continue;if(m==="__proto__"){p==="never"&&c.push(m);continue}if(p==="never"){c.push(m);continue}let h=u.run({value:t[m],issues:[]},r);h instanceof Promise?e.push(h.then(_=>ft(_,n,m,t,s,l))):ft(h,n,m,t,s,l)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Cr=C("$ZodObject",(e,t)=>{J.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){let u=()=>{let p={...r};return Object.defineProperty(t,"shape",{value:p}),u.raw=p,p};u.raw=r,Object.defineProperty(t,"shape",{get:u})}let o=er(()=>ki(t));q(e,"propValues",u=>{let p=u.def.shape,s={};for(let l in p){let d=p[l]._zod;if(d.values){Object.prototype.hasOwnProperty.call(s,l)||or(s,l,new Set);for(let m of d.values)s[l].add(m);d.optin!==void 0&&s[l].add(void 0)}}return s});let i=ir,a=t.catchall,c,f=Ue.memoizer;f?.attach(e),e._zod.parse=(u,p)=>{c??(c=o.value);let s=u.value;if(!i(s))return u.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),u;u.value=f?f.alloc(e,u,{},p):{};let l=[],d=c.shape,m=p?.abortEarly,h=u.issues.length;for(let _ of c.allKeys){if(m&&u.issues.length!==h){if(ie(u,h))break;h=u.issues.length}if(_==="__proto__")continue;let z=d[_],w=z._zod.optin,A=z._zod.optout,v=z._zod.run({value:s[_],issues:[]},p);v instanceof Promise?l.push(v.then($=>ft($,u,_,s,w,A))):ft(v,u,_,s,w,A)}return a?Ei(l,s,u,p,o.value,e,m===!0):l.length?Promise.all(l).then(()=>u):u}});function Sr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ar=C("$ZodOptional",(e,t)=>{J.init(e,t),q(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",q(e,"values",n=>{let r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),q(e,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${nr(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;let o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(i=>Sr(n,i)):Sr(n,o)}return t.innerType._zod.run(n,r)}});var Mr=C("$ZodLazy",(e,t)=>{J.init(e,t),rr(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),q(e,"pattern",n=>n.innerType?._zod?.pattern),q(e,"propValues",n=>n.innerType?._zod?.propValues),q(e,"optin",n=>n.innerType?._zod?.optin??void 0),q(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)});function Tr(e){return e.checks&&(e.checks=[...e.checks]),e}function Nr(e,t){return new e(Tr({type:"string",...oe(t)}))}function Rr(e,t){return new e(Tr({type:"number",checks:[],...oe(t)}))}function Or(e,t){return new e({type:"boolean",...oe(t)})}function Qt(e,t){return new br({check:"min_length",...oe(t),minimum:e})}var he=C("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");J.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){de(this,"with",e)},parse(e,t){return Gt(this,e,t,{callee:this.parse})},parseAsync(e,t){return qt(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return Xt(this,e,t)},safeParseAsync(e,t){return Jt(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0})},clone(e,t){return ut(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),Ci=C("ZodMiniString",(e,t)=>{kr.init(e,t),he.init(e,t)});function B(e){return Nr(Ci,e)}var Ai=C("ZodMiniNumber",(e,t)=>{Er.init(e,t),he.init(e,t)});function Ir(e){return Rr(Ai,e)}var Mi=C("ZodMiniBoolean",(e,t)=>{Zr.init(e,t),he.init(e,t)});function en(e){return Or(Mi,e)}var Ti=C("ZodMiniArray",(e,t)=>{Pr.init(e,t),he.init(e,t)});function Y(e,t){return new Ti({type:"array",element:e,...oe(t)})}var Ni=C("ZodMiniObject",(e,t)=>{Cr.init(e,t),he.init(e,t),fr(e,"shape",n=>n._zod.def.shape,!1)});function se(e,t){let n={type:"object",shape:e??{},...oe(t)};return new Ni(n)}var Ri=C("ZodMiniOptional",(e,t)=>{Ar.init(e,t),he.init(e,t)});function tn(e){return new Ri({type:"optional",innerType:e})}var Oi=C("ZodMiniLazy",(e,t)=>{Mr.init(e,t),he.init(e,t)});function nn(e){return new Oi({type:"lazy",getter:e})}var Dr=se({id:B(),name:B(),label:B(),active:en(),children:nn(()=>Y(Dr))}),jr=se({name:B(),path:Y(B()),docs:Y(Dr),groups:nn(()=>Y(jr))}),Lr=se({depth:Ir(),slug:B(),text:B()}),Fr=se({title:B(),groups:Y(jr),outline:Y(se({part:tn(B()),sections:Y(se({heading:Lr,part:tn(B()),subs:Y(se({heading:Lr}))})).check(Qt(1))})),home:en()});function Br(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Br(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Di(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Br(e))&&(r&&(r+=" "),r+=t);return r}var x=Di;var Hr=Le({pending:!1,data:null,method:null,action:null}),Ur=new Set,Vr=e=>{Ur.add(e),e.finally(()=>Ur.delete(e))};var sn=Qe({button:()=>to,clearCache:()=>ji,composeRef:()=>pt,form:()=>Yr,input:()=>eo,link:()=>qr,meta:()=>Xr,script:()=>Wr,style:()=>Gr,title:()=>Kr}),ji=()=>{rn=Object.create(null),on=Object.create(null)},pt=(e,t)=>ot(()=>n=>{let r;e&&(typeof e=="function"?r=e(n)||(()=>{e(null)}):e&&"current"in e&&(e.current=n,r=()=>{e.current=null}));let o=t(n);return()=>{o?.(),r?.()}},[e]),rn=Object.create(null),on=Object.create(null),Ve=(e,t,n,r,o)=>{if(t?.itemProp)return{tag:e,props:t,type:e,ref:t.ref};let i=document.head,{onLoad:a,onError:c,precedence:f,blocking:u,...p}=t,s=null,l=!1,d=ye[e],m=Ye(e,r),h=v=>v.getAttribute("rel")==="stylesheet"&&v.getAttribute("data-precedence")!==null,_;if(m){let v=i.querySelectorAll(e);e:for(let $ of v)if(!(e==="link"&&!h($))){for(let y of d)if($.getAttribute(y)===t[y]){s=$;break e}}if(!s){let $=d.reduce((y,P)=>t[P]===void 0?y:`${y}-${P}-${t[P]}`,e);l=!on[$],s=on[$]||=(()=>{let y=document.createElement(e);for(let P of d)t[P]!==void 0&&y.setAttribute(P,t[P]);return t.rel&&y.setAttribute("rel",t.rel),y})()}}else _=i.querySelectorAll(e);f=r?f??"":void 0,r&&(p[Ze]=f);let z=fe(v=>{if(m){if(e==="link"&&f!==void 0){let y=!1;for(let P of i.querySelectorAll(e)){let L=P.getAttribute(Ze);if(L===null){i.insertBefore(v,P);return}if(y&&L!==f){i.insertBefore(v,P);return}L===f&&(y=!0)}i.appendChild(v);return}let $=!1;for(let y of i.querySelectorAll(e)){if($&&y.getAttribute("data-precedence")!==f){i.insertBefore(v,y);return}y.getAttribute("data-precedence")===f&&($=!0)}i.appendChild(v)}else if(e==="link")i.contains(v)||i.appendChild(v);else if(_){let $=!1;for(let y of _)if(y===v){$=!0;break}$||i.insertBefore(v,i.contains(_[0])?_[0]:i.querySelector(e)),_=void 0}},[m,f,e]),w=pt(t.ref,v=>{let $=d[0];if(n===2&&(v.innerHTML=""),(l||_)&&z(v),!c&&!a||!$)return;let y=rn[v.getAttribute($)]||=new Promise((P,L)=>{v.addEventListener("load",P),v.addEventListener("error",L)});a&&(y=y.then(a)),c&&(y=y.catch(c)),y.catch(()=>{})});if(o&&u==="render"){let v=ye[e][0];if(v&&t[v]){let $=t[v],y=rn[$]||=new Promise((P,L)=>{z(s),s.addEventListener("load",P),s.addEventListener("error",L)});rt(y)}}let A={tag:e,type:e,props:{...p,ref:w},ref:w};return A.p=n,s&&(A.e=s),Dt(A,i)},Kr=e=>{let t=Hn();return(t&&M(t))?.endsWith("svg")?{tag:"title",props:e,type:"title",ref:e.ref}:Ve("title",e,void 0,!1,!1)},Wr=e=>!e||["src","async"].some(t=>!e[t])?{tag:"script",props:e,type:"script",ref:e.ref}:Ve("script",e,1,!1,!0),Gr=e=>!e||!["href","precedence"].every(t=>t in e)?{tag:"style",props:e,type:"style",ref:e.ref}:(e["data-href"]=e.href,delete e.href,Ve("style",e,2,!0,!0)),qr=e=>!e||["onLoad","onError"].some(t=>t in e)||e.rel==="stylesheet"&&(!("precedence"in e)||"disabled"in e)?{tag:"link",props:e,type:"link",ref:e.ref}:Ve("link",e,1,Je(e),!0),Xr=e=>Ve("meta",e,void 0,!1,!1),Jr=Symbol(),Yr=e=>{let{action:t,...n}=e;typeof t!="function"&&(n.action=t);let[r,o]=O([null,!1]),i=fe(async u=>{let p=u.isTrusted?t:u.detail[Jr];if(typeof p!="function")return;u.preventDefault();let s=new FormData(u.target);o([s,!0]);let l=p(s);l instanceof Promise&&(Vr(l),await l),o([null,!0])},[]),a=pt(e.ref,u=>(u.addEventListener("submit",i),()=>{u.removeEventListener("submit",i)})),[c,f]=r;return r[1]=!1,{tag:Hr,props:{value:{pending:c!==null,data:c,method:c?"post":null,action:c?t:null},children:{tag:"form",props:{...n,ref:a},type:"form",ref:a}},f}},Qr=(e,{formAction:t,...n})=>{if(typeof t=="function"){let r=fe(o=>{o.preventDefault(),o.currentTarget.form.dispatchEvent(new CustomEvent("submit",{detail:{[Jr]:t}}))},[]);n.ref=pt(n.ref,o=>(o.addEventListener("click",r),()=>{o.removeEventListener("click",r)}))}return{tag:e,props:n,type:e,ref:n.ref}},eo=e=>Qr("input",e),to=e=>Qr("button",e);Object.assign(Ee,{title:Kr,script:Wr,style:Gr,link:qr,meta:Xr,form:Yr,input:eo,button:to});var cn=(e,t,n)=>(typeof e=="string"&&sn[e]&&(e=sn[e]),{tag:e,type:e,props:t,key:n,ref:t.ref}),Ke=e=>cn("",e,void 0);var an=(({children:e,fallback:t,fallbackRender:n,onError:r})=>{let o=Ke({children:e});return o[ee]=i=>{if(i instanceof Promise)throw i;return r?.(i),n?.(i)||t},o}),un=(({children:e,fallback:t})=>{let n=Ke({children:e});return n[ee]=(r,o)=>{if(!(r instanceof Promise))throw r;return r.finally(o),t},n});var Fi=0,dt=async e=>{try{return e.flat().map(no)}catch(t){if(t instanceof Promise){let n=le();return await t,n(()=>dt(e))}else throw t}},no=e=>{if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||Array.isArray(e))return F([e]);if(te(e))return ne(e);{let t=e.toString();return t instanceof Promise?t:k(t)}},ro=async({children:e,fallback:t,fallbackRender:n,onError:r})=>{if(!e)return k("");Array.isArray(e)||(e=[e]);let o=M(ln)?.scriptNonce,i,a=()=>i||=le(),c,f=()=>c||=(async()=>{let s=await t;if(s==null)return;if(typeof s=="string"||Array.isArray(s))return a()(()=>F([s]));if(te(s))return a()(()=>ne(s));let l=await a()(()=>s.toString());return k(l,l.callbacks||s.callbacks)})(),u=async s=>{let l=await f();return a()(async()=>{r?.(s);let d=l!==void 0?l:n&&Zt(R,{},n(s))||"",m=await R({children:d}).toString();return k(m,m.callbacks||d.callbacks)})},p=[];try{p=e.map(no)}catch(s){let l=a();s instanceof Promise?p=[s.then(()=>l(()=>dt(e))).catch(d=>u(d))]:p=[await u(s)]}if(p.some(s=>s instanceof Promise)){a();let s=Fi++,l=RegExp(`(<template id="E:${s}"></template>)(.*?)(<!--E:${s}-->)`,"s"),d=!1,m=async({error:z,buffer:w})=>{if(d)return"";d=!0;let A=await u(z),v=A.callbacks;return w?(w[0]=w[0].replace(l,()=>A),v?.length?k("",v):""):k(`<template data-hono-target="E:${s}">${A}</template><script>
1
+ "use strict";(()=>{var U=Symbol("RENDERER"),ee=Symbol("ERROR_HANDLER"),S=Symbol("STASH"),qe=Symbol("INTERNAL"),Xe=Symbol("MEMO"),_e=Symbol("PERMALINK");var wt=e=>(e[qe]=!0,e);var W={Stringify:1,BeforeStream:2,Stream:3},k=(e,t)=>{let n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},zo=/[&<>'"]/,ve=async(e,t)=>{let n="";t||=[];let r=await Promise.all(e);for(let o=r.length-1;n+=r[o],o--,!(o<0);o--){let i=r[o];typeof i=="object"&&t.push(...i.callbacks||[]);let a=i.isEscaped;if(i=await(typeof i=="object"?i.toString():i),typeof i=="object"&&t.push(...i.callbacks||[]),i.isEscaped??a)n+=i;else{let c=[n];G(i,c),n=c[0]}}return k(n,t)},G=(e,t)=>{let n=e.search(zo);if(n===-1){t[0]+=e;return}let r,o,i=0;for(o=n;o<e.length;o++){switch(e.charCodeAt(o)){case 34:r="&quot;";break;case 39:r="&#39;";break;case 38:r="&amp;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}t[0]+=e.substring(i,o)+r,i=o+1}t[0]+=e.substring(i,o)},$t=e=>{let t=e.callbacks;if(!t?.length)return e;let n=[e],r={};return t.forEach(o=>o({phase:W.Stringify,buffer:n,context:r})),n[0]},ke=async(e,t,n,r,o)=>{typeof e=="object"&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let i=e.callbacks;if(!i?.length)return Promise.resolve(e);o?o[0]+=e:o=[e];let a=Promise.all(i.map(c=>c({phase:t,buffer:o,context:r}))).then(c=>Promise.all(c.filter(Boolean).map(f=>ke(f,t,!1,r,o))).then(()=>o[0]));return n?k(await a,i):a};var ye={title:[],script:["src"],style:["data-href"],link:["href"],meta:["name","httpEquiv","charset","itemProp"]},Ee={},Ze="data-precedence",Je=e=>e.rel==="stylesheet"&&"precedence"in e,Ye=(e,t)=>e==="link"?t:ye[e].length>0;var xn=Object.defineProperty,Qe=(e,t)=>{let n={};for(var r in e)xn(n,r,{get:e[r],enumerable:!0});return t||xn(n,Symbol.toStringTag,{value:"Module"}),n};var ue=e=>Array.isArray(e)?e:[e];var et=Qe({button:()=>To,form:()=>Ao,input:()=>Mo,link:()=>Po,meta:()=>Co,script:()=>Eo,style:()=>Zo,title:()=>ko}),bn=new WeakMap,wn=(e,t,n,r)=>({buffer:o,context:i})=>{if(!o)return;let a=bn.get(i)||{};bn.set(i,a);let c=a[e]||=[],f=!1,u=ye[e],p=Ye(e,r!==void 0);if(p){e:for(let[,s]of c)if(!(e==="link"&&!(s.rel==="stylesheet"&&s["data-precedence"]!==void 0))){for(let l of u)if((s?.[l]??null)===n?.[l]){f=!0;break e}}}if(f?o[0]=o[0].replaceAll(t,""):p||e==="link"?c.push([t,n,r]):c.unshift([t,n,r]),o[0].indexOf("</head>")!==-1){let s;if(e==="link"||r!==void 0){let l=[];s=c.map(([d,,m],h)=>{if(m===void 0)return[d,Number.MAX_SAFE_INTEGER,h];let _=l.indexOf(m);return _===-1&&(l.push(m),_=l.length-1),[d,_,h]}).sort((d,m)=>d[1]-m[1]||d[2]-m[2]).map(([d])=>d)}else s=c.map(([l])=>l);s.forEach(l=>{o[0]=o[0].replaceAll(l,"")}),o[0]=o[0].replace(/(?=<\/head>)/,()=>s.join(""))}},Pe=(e,t,n)=>F([new N(e,n,ue(t??[]))]),Ce=(e,t,n,r)=>{if("itemProp"in n)return Pe(e,t,n);let{precedence:o,blocking:i,...a}=n;o=r?o??"":void 0,r&&(a[Ze]=o);let c=new N(e,a,ue(t||[])).toString();return c instanceof Promise?c.then(f=>k(f,[...f.callbacks||[],wn(e,f,a,o)])):k(c,[wn(e,c,a,o)])},ko=({children:e,...t})=>{let n=tt();if(n){let r=M(n);if(r==="svg"||r==="head")return new N("title",t,ue(e??[]))}return Ce("title",e,t,!1)},Eo=({children:e,...t})=>{let n=tt();return["src","async"].some(r=>!t[r])||n&&M(n)==="head"?Pe("script",e,t):Ce("script",e,t,!1)},Zo=({children:e,...t})=>["href","precedence"].every(n=>n in t)?(t["data-href"]=t.href,delete t.href,Ce("style",e,t,!0)):Pe("style",e,t),Po=({children:e,...t})=>["onLoad","onError"].some(n=>n in t)||t.rel==="stylesheet"&&(!("precedence"in t)||"disabled"in t)?Pe("link",e,t):Ce("link",e,t,Je(t)),Co=({children:e,...t})=>{let n=tt();return n&&M(n)==="head"?Pe("meta",e,t):Ce("meta",e,t,!1)},$n=(e,{children:t,...n})=>new N(e,n,ue(t??[])),Ao=e=>(typeof e.action=="function"&&(e.action=_e in e.action?e.action[_e]:void 0),$n("form",e)),Sn=(e,t)=>(typeof t.formAction=="function"&&(t.formAction=_e in t.formAction?t.formAction[_e]:void 0),$n(e,t)),Mo=e=>Sn("input",e),To=e=>Sn("button",e);var No=new Map([["className","class"],["htmlFor","for"],["crossOrigin","crossorigin"],["httpEquiv","http-equiv"],["itemProp","itemprop"],["fetchPriority","fetchpriority"],["noModule","nomodule"],["formAction","formaction"]]),xe=e=>No.get(e)||e,Ro=/[\s"'<>/=`\\\x00-\x1f\x7f-\x9f]/,St=new Set,zn=1024,Oo=/^[!?]|[\s"'<>/=`\\\x00-\x1f\x7f-\x9f]/,kn=new Set,Io=256,Ae=(e,t,n)=>{e.size>=t&&e.clear(),e.add(n)},Zn=e=>kn.has(e)?!0:typeof e!="string"?!1:e.length===0?!0:Oo.test(e)?!1:(Ae(kn,Io,e),!0),kt=e=>{if(St.has(e))return!0;let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(!(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===95||r===46||r===58))return Ro.test(e)?!1:(Ae(St,zn,e),!0)}return Ae(St,zn,e),!0},Lo=/[\s"'():;\\/\[\]{}\x00-\x1f\x7f-\x9f]/,zt=new Set,En=1024,Do=e=>{if(zt.has(e))return!0;let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(!(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===95))return Lo.test(e)?!1:(Ae(zt,En,e),!0)}return Ae(zt,En,e),!0},jo=/[;"'\\/\[\](){}]/,Fo=e=>{if(!jo.test(e))return!1;let t=0,n=[];for(let r=0,o=e.length;r<o;r++){let i=e.charCodeAt(r);if(i===92){if(r===o-1)return!0;r++}else if(t!==0){if(i===10||i===12||i===13)return!0;i===t&&(t=0)}else if(i===47&&e.charCodeAt(r+1)===42){let a=e.indexOf("*/",r+2);if(a===-1)return!0;r=a+1}else if(i===34||i===39)t=i;else if(i===40)n.push(41);else if(i===91)n.push(93);else{if(i===123||i===125)return!0;if(i===41||i===93){if(n[n.length-1]!==i)return!0;n.pop()}else if(i===59&&n.length===0)return!0}}return t!==0||n.length!==0},Me=(e,t)=>{for(let[n,r]of Object.entries(e)){let o=n[0]==="-"||!/[A-Z]/.test(n)?n:n.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`);if(!Do(o))continue;if(r==null){t(o,null);continue}let i;if(typeof r=="number")i=o.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?!.*gap)(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/)?`${r}`:`${r}px`;else if(typeof r=="string"){if(Fo(r))continue;i=r}else continue;t(o,i)}};var Te,tt=()=>Te,Bo=e=>/[A-Z]/.test(e)&&e.match(/^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e,Uo=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ho=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],Pn=(e,t)=>e.then(n=>{if(typeof n!="string"&&!Array.isArray(n)&&!(n instanceof N))return n;let r=Array.isArray(n)?n:[n],o=()=>{let i=[""];return be(r,i),i.length===1?k(i[0],i.callbacks):ve(i,i.callbacks)};return t?t(o):Re(o)}),be=(e,t)=>{for(let n=0,r=e.length;n<r;n++){let o=e[n];if(typeof o=="string")G(o,t);else{if(typeof o=="boolean"||o===null||o===void 0)continue;if(o instanceof N)o.toStringToBuffer(t);else if(typeof o=="number")t[0]+=o;else if(o.isEscaped){t[0]+=o;let i=o.callbacks;i&&(t.callbacks||=[],t.callbacks.push(...i))}else o instanceof Promise?t.unshift("",o):be(o,t)}}},F=e=>Re(()=>{let t=[""];return be(e,t),t.length===1?k(t[0],t.callbacks):ve(t,t.callbacks)}),te=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof N)&&!(e instanceof Promise)&&!e.isEscaped&&typeof e.toString=="function",ne=e=>{let t=e.toString(),n=r=>F([String(r)]);return t instanceof Promise?t.then(n):n(t)},N=class{tag;props;key;children;isEscaped=!0;constructor(e,t,n){if(typeof e!="function"&&!Zn(e))throw new Error(`Invalid JSX tag name: ${e}`);this.tag=e,this.props=t,this.children=n}get type(){return this.tag}get ref(){return this.props.ref||null}toString(){return Re(()=>{let t=[""];return this.toStringToBuffer(t),t.length===1?"callbacks"in t?$t(k(t[0],t.callbacks)).toString():t[0]:ve(t,t.callbacks)})}toStringToBuffer(e){let t=this.tag,n=this.props,{children:r}=this;e[0]+=`<${t}`;let o=t==="svg"||Te&&M(Te)==="svg"?i=>Bo(xe(i)):i=>xe(i);for(let[i,a]of Object.entries(n))if(i=o(i),!!kt(i)&&i!=="children"){if(i==="style"&&typeof a=="object"){let c="";Me(a,(f,u)=>{u!=null&&(c+=`${c?";":""}${f}:${u}`)}),e[0]+=' style="',G(c,e),e[0]+='"'}else if(typeof a=="string")e[0]+=` ${i}="`,G(a,e),e[0]+='"';else if(a!=null)if(typeof a=="number"||a.isEscaped)e[0]+=` ${i}="${a}"`;else if(typeof a=="boolean"&&Ho.includes(i))a&&(e[0]+=` ${i}=""`);else if(i==="dangerouslySetInnerHTML"){if(r.length>0)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r=[k(a.__html)]}else if(a instanceof Promise)e[0]+=` ${i}="`,e.unshift('"',a);else if(typeof a=="function"){if(!i.startsWith("on")&&i!=="ref")throw new Error(`Invalid prop '${i}' of type 'function' supplied to '${t}'.`)}else e[0]+=` ${i}="`,G(a.toString(),e),e[0]+='"'}if(Uo.includes(t)&&r.length===0){e[0]+="/>";return}e[0]+=">",be(r,e),e[0]+=`</${t}>`}},Et=class extends N{toStringToBuffer(e){let{children:t}=this,n={...this.props};t.length&&(n.children=t.length===1?t[0]:t);let r=this.tag.call(null,n);typeof r=="boolean"||r==null||(r instanceof Promise?H.length===0?e.unshift("",Pn(r)):e.unshift("",Pn(r,le())):r instanceof N?r.toStringToBuffer(e):Array.isArray(r)?be(r,e):typeof r=="number"||r.isEscaped?(e[0]+=r,r.callbacks&&(e.callbacks||=[],e.callbacks.push(...r.callbacks))):G(r,e))}},Zt=class extends N{toStringToBuffer(e){be(this.children,e)}},Pt=(e,t,...n)=>{t??={},n.length&&(t.children=n.length===1?n[0]:n);let r=t.key;delete t.key;let o=Ne(e,t,n);return o.key=r,o},Cn=!1,Ne=(e,t,n)=>{if(!Cn){for(let r in Ee)et[r][U]=Ee[r];Cn=!0}return typeof e=="function"?new Et(e,t,n):et[e]?new Et(et[e],t,n):e==="svg"||e==="head"?(Te||=Oe(""),new N(e,t,[new Et(Te,{value:e},n)])):new N(e,t,n)};var R=({children:e})=>new Zt("",{children:e},Array.isArray(e)?e:e?[e]:[]);var H=[],An=!1,Ct,At,Mt=0,Tt=!1,Mn=()=>{if(An)return Ct;An=!0;let e=globalThis,t;for(let n of[()=>e.process?.getBuiltinModule?.("node:async_hooks")?.AsyncLocalStorage,()=>e.process?.mainModule?.require?.("node:async_hooks")?.AsyncLocalStorage]){try{t=n()}catch{}if(t)break}return t&&(Ct=new t),Ct},Ie=()=>Mn()?.getStore()||At,Tn=()=>{Mt>0&&!Tt&&(Tt=!0,console.warn("hono/jsx: AsyncLocalStorage is unavailable in this runtime, so useContext() after an await in an async component falls back to the context default value during server-side rendering. To get provided values across await boundaries, use a runtime with AsyncLocalStorage (Node.js >= 20.16, Deno, Bun, or Cloudflare Workers with the nodejs_compat flag)."))},Nn=(e,t)=>{if(!e)return Tn(),t.values;let n=e.get(t);return n||(n=[t.values[0]],e.set(t,n)),n},Rn=(e,t)=>{if(!e)return Tn(),t.values.at(-1);let n=e.get(t);return n?.length?n.at(-1):t.values[0]},Vo=e=>(e?H.filter(t=>e.has(t)):H).map(t=>[t,Rn(e,t)]),Ko=(e,t,n)=>Re(()=>{let r=Ie(),o=n.map(([a,c])=>{let f=Nn(r,a);return f.push(c),f}),i=()=>{o.forEach(a=>{a.pop()})};try{let a=e();return a instanceof Promise?a.finally(i):(i(),a)}catch(a){throw i(),a}},t),Re=(e,t)=>{if(Ie())return e();let n=t??new WeakMap,r=Mn();if(r)return r.run(n,e);At=n;let o;try{o=e()}finally{At=void 0}return!Tt&&o instanceof Promise&&(Mt++,o=o.finally(()=>{Mt--})),o},le=()=>{let e=Ie(),t=Vo(e);return n=>Ko(n,e,t)},Oe=e=>{let t=[e],n=(r=>{let o=Nn(Ie(),n);o.push(r.value);let i;try{i=typeof r.children=="string"?F([r.children]):te(r.children)?ne(r.children):r.children?(Array.isArray(r.children)?new Zt("",{},r.children):r.children).toString():k("")}catch(a){throw o.pop(),a}return i instanceof Promise?i.finally(()=>o.pop()).then(a=>k(a,a.callbacks)):(o.pop(),k(i))});return n.values=t,n.Provider=n,n[U]=Nt(t),H.push(n),n},M=e=>Rn(Ie(),e);var Nt=e=>({value:t,children:n})=>{if(!n)return;let r={children:[{tag:wt(()=>{e.push(t)}),props:{}}]};Array.isArray(n)?r.children.push(...n.flat()):r.children.push(n),r.children.push({tag:wt(()=>{e.pop()}),props:{}});let o={tag:"",props:r,type:""};return o[ee]=i=>{throw e.pop(),i},o},Le=e=>{let t=[e],n=Nt(t);return n.values=t,n.Provider=n,H.push(n),n};var Wo=0;var Go=2,qo=3,Xo=4,Rt=new WeakMap,Ot=(e,t)=>!e||!t||e.length!==t.length||t.some((n,r)=>n!==e[r]);var Jo;var On=[];var O=e=>{let t=()=>typeof e=="function"?e():e,n=D.at(-1);if(!n)return[t(),()=>{}];let[,r]=n,o=r[S][1][Wo]||=[],i=r[S][0]++;return o[i]||=[t(),a=>{let c=Jo,f=o[i];if(typeof a=="function"&&(a=a(f[0])),!Object.is(a,f[0]))if(f[0]=a,On.length){let[u,p]=On.at(-1);Promise.all([u===3?r:De([u,!1,c],r),p]).then(([s])=>{if(!s||!(u===2||u===3))return;let l=s.vC;requestAnimationFrame(()=>{setTimeout(()=>{l===s.vC&&De([u===3?1:0,!1,c],s)})})})}else De([0,!1,c],r)}]};var In=(e,t,n)=>{let r=D.at(-1);if(!r)return;let[,o]=r,i=o[S][1][1]||=[],a=o[S][0]++,[c,,f]=i[a]||=[];if(Ot(c,n)){f&&f();let u=()=>{p[e]=void 0,p[2]=t()},p=[n,void 0,void 0,void 0,void 0];p[e]=u,i[a]=p}},nt=(e,t)=>In(3,e,t),I=(e,t)=>In(1,e,t);var fe=(e,t)=>{let n=D.at(-1);if(!n)return e;let[,r]=n,o=r[S][1][Go]||=[],i=r[S][0]++,a=o[i];return Ot(a?.[1],t)?o[i]=[e,t]:e=o[i][0],e};function E(e){let t=D.at(-1);if(!t)return{current:e};let[,n]=t,r=n[S][1][Xo]||=[],o=n[S][0]++;return r[o]||={current:e}}var rt=e=>{let t=Rt.get(e);if(t){if(t.length===2)throw t[1];return t[0]}throw e.then(n=>Rt.set(e,[n]),n=>Rt.set(e,[void 0,n])),e},ot=(e,t)=>{let n=D.at(-1);if(!n)return e();let[,r]=n,o=r[S][1][qo]||=[],i=r[S][0]++,a=o[i];return Ot(a?.[1],t)&&(o[i]=[e(),t]),o[i][0]};var Fe="_hp",Yo={Change:"Input",DoubleClick:"DblClick"},Qo={svg:"2000/svg",math:"1998/Math/MathML"},D=[],je=new WeakMap,we,Hn=()=>we,T=e=>"t"in e,It={onClick:["click",!1]},Ln=e=>{if(!e.startsWith("on"))return;if(It[e])return It[e];let t=e.match(/^on([A-Z][a-zA-Z]+?(?:PointerCapture)?)(Capture)?$/);if(t){let[,n,r]=t;return It[e]=[(Yo[n]||n).toLowerCase(),!!r]}},Dn=(e,t)=>we&&e instanceof SVGElement&&/[A-Z]/.test(t)&&(t in e.style||t.match(/^(?:o|pai|str|u|ve)/))?t.replace(/([A-Z])/g,"-$1").toLowerCase():t,Vn=e=>e==null||e===!1?null:e,ei=(e,t)=>{"value"in t&&(e.value=Vn(t.value),!e.multiple&&e.selectedIndex===-1&&(e.selectedIndex=0))},jn=e=>e instanceof DOMException&&e.name==="InvalidCharacterError",ti=(e,t,n)=>{t||={};for(let r in t){let o=t[r];if(r!=="children"&&(!n||n[r]!==o)){r=xe(r);let i=Ln(r);if(i){if(n?.[r]!==o&&(n&&e.removeEventListener(i[0],n[r],i[1]),o!=null)){if(typeof o!="function")throw new Error(`Event handler for "${r}" is not a function`);e.addEventListener(i[0],o,i[1])}}else if(r==="dangerouslySetInnerHTML"&&o)e.innerHTML=o.__html;else if(r==="ref"){je.get(e)?.();let a;typeof o=="function"?a=o(e)||(()=>o(null)):o&&"current"in o&&(o.current=e,a=()=>o.current=null),je.set(e,a)}else if(r==="style"){let a=e.style;typeof o=="string"?a.cssText=o:(a.cssText="",o!=null&&Me(o,a.setProperty.bind(a)))}else{if(r==="value"){let c=e.nodeName;if(c==="SELECT")continue;if((c==="INPUT"||c==="TEXTAREA")&&(e.value=Vn(o),c==="TEXTAREA")){e.textContent=o;continue}}else(r==="checked"&&e.nodeName==="INPUT"||r==="selected"&&e.nodeName==="OPTION")&&(e[r]=o);let a=Dn(e,r);try{o==null||o===!1?e.removeAttribute(a):o===!0?e.setAttribute(a,""):typeof o=="string"||typeof o=="number"?e.setAttribute(a,o):e.setAttribute(a,o.toString())}catch(c){if(!jn(c))throw c}}}}if(n)for(let r in n){let o=n[r];if(r!=="children"&&!(r in t)){r=xe(r);let i=Ln(r);if(i)e.removeEventListener(i[0],o,i[1]);else if(r==="ref")je.get(e)?.(),je.delete(e);else try{e.removeAttribute(Dn(e,r))}catch(a){if(!jn(a))throw a}}}},ni=(e,t)=>{t[S][0]=0,D.push([e,t]);let n=t.tag[U]||t.tag,r=n.defaultProps?{...n.defaultProps,...t.props}:t.props;try{return[n.call(null,r)]}finally{D.pop()}},Kn=(e,t,n,r,o)=>{e.vR?.length&&(r.push(...e.vR),delete e.vR),typeof e.tag=="function"&&e[S][1][1]?.forEach(i=>o.push(i)),e.vC.forEach(i=>{if(T(i))n.push(i);else if(typeof i.tag=="function"||i.tag===""){i.c=t;let a=n.length;if(Kn(i,t,n,r,o),i.s){for(let c=a;c<n.length;c++)n[c].s=!0;i.s=!1}}else n.push(i),i.vR?.length&&(r.push(...i.vR),delete i.vR)})},ri=e=>{for(;e&&(e.tag===Fe||!e.e);)e=e.tag===Fe||!e.vC?.[0]?e.nN:e.vC[0];return e?.e},Wn=e=>{T(e)||(e[S]?.[1][1]?.forEach(t=>t[2]?.()),je.get(e.e)?.(),e.p===2&&e.vC?.forEach(t=>t.p=2),e.vC?.forEach(Wn)),e.p||(e.e?.remove(),delete e.e),typeof e.tag=="function"&&(pe.delete(e),it.delete(e),delete e[S][3],e.a=!0)},Lt=(e,t,n)=>{e.c=t,Gn(e,t,n)},Fn=(e,t)=>{if(t){for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n}},Bn=Symbol(),Gn=(e,t,n)=>{let r=[],o=[],i=[];Kn(e,t,r,o,i),o.forEach(Wn);let a=n?void 0:t.childNodes,c,f=null;if(n)c=-1;else if(!a.length)c=0;else{let u=Fn(a,ri(e.nN));u!==void 0?(f=a[u],c=u):c=Fn(a,r.find(p=>p.tag!==Fe&&p.e)?.e)??-1,c===-1&&(n=!0)}for(let u=0,p=r.length;u<p;u++,c++){let s=r[u],l;if(s.s&&s.e)l=s.e,s.s=!1;else{let d=n||!s.e;T(s)?(s.e&&s.d&&(s.e.textContent=s.t),s.d=!1,l=s.e||=document.createTextNode(s.t)):(l=s.e||=s.n?document.createElementNS(s.n,s.tag):document.createElement(s.tag),ti(l,s.props,s.pP),Gn(s,l,d),s.tag==="select"&&ei(l,s.props))}s.tag===Fe?c--:n?l.parentNode||t.appendChild(l):a[c]!==l&&a[c-1]!==l&&(a[c+1]===l?t.appendChild(a[c]):t.insertBefore(l,f||a[c]||null))}if(e.pP&&(e.pP=void 0),i.length){let u=[],p=[];i.forEach(([,s,,l,d])=>{s&&u.push(s),l&&p.push(l),d?.()}),u.forEach(s=>s()),p.length&&requestAnimationFrame(()=>{p.forEach(s=>s())})}},oi=(e,t)=>!!(e&&e.length===t.length&&e.every((n,r)=>n[1]===t[r][1])),ii=e=>{let t=new Map;for(let n of e){let r=n.key;if(t.has(r))return;t.set(r,n)}return t},it=new WeakMap,st=(e,t,n)=>{let r=!n&&t.pC;n&&(t.pC||=t.vC);let o;try{n||=typeof t.tag=="function"?ni(e,t):ue(t.props.children),n[0]?.tag===""&&n[0][ee]&&(o=n[0][ee],e[5].push([e,o,t]));let i=r?[...t.pC]:t.vC?[...t.vC]:void 0,a=[],c,f=(i?.length||0)*2,u;for(let p=0;p<n.length;p++){if(Array.isArray(n[p])){n.splice(p,1,...n[p].flat(1/0)),p--;continue}let s=Dt(n[p]);if(s){typeof s.tag=="function"&&!s.tag[qe]&&(H.length>0&&(s[S][2]=H.map(d=>[d,d.values.at(-1)])),e[5]?.length&&(s[S][3]=e[5].at(-1)));let l;if(u&&s.key===void 0&&!T(s)&&(i=[...u.values()],u=void 0),u){let d=s.key,m=u.get(d);m&&(T(s)?T(m):m.tag===s.tag&&m.key===d)&&(l=m,u.delete(d))}else if(i&&i.length){let d=i[0];if(T(s)?T(d):!T(d)&&(s.key!==void 0?d.key===s.key&&d.tag===s.tag:d.tag===s.tag))l=i.shift();else{let m=i.findIndex(T(s)?h=>T(h):s.key!==void 0?h=>h.key===s.key&&h.tag===s.tag:h=>h.tag===s.tag);f-=m===-1?i.length:m,m!==-1&&(l=i[m],i.splice(m,1)),f<0&&(f=1/0,u=ii(i))}}if(l)if(T(s))l.t!==s.t&&(l.t=s.t,l.d=!0),s=l;else{let d=l.pP=l.props;if(l.props=s.props,l.f||=s.f||t.f,typeof s.tag=="function"){let m=l[S][2];l[S][2]=s[S][2]||[],l[S][3]=s[S][3],!l.f&&((l.o||l)===s.o||l.tag[Xe]?.(d,l.props))&&oi(m,l[S][2])&&(l.s=!0)}s=l}else if(!T(s)&&we){let d=M(we);d&&(s.n=d)}if(!T(s)&&!s.s&&(st(e,s),delete s.f),a.push(s),c&&!c.s&&!s.s)for(let d=c;d&&!T(d);d=d.vC?.at(-1))d.nN=s;c=s}}i=u?[...u.values()]:i,t.vR=r?[...t.vC,...i||[]]:i||[],t.vC=a,r&&delete t.pC}catch(i){if(t.f=!0,i===Bn){if(o)return;throw i}let[a,c,f]=t[S]?.[3]||[];if(c){let u=()=>De([0,!1,e[2]],f),p=it.get(f)||[];p.push(u),it.set(f,p);let s=c(i,()=>{let l=it.get(f);if(l){let d=l.indexOf(u);if(d!==-1)return l.splice(d,1),u()}});if(s){if(e[0]===1)e[1]=!0;else if(st(e,f,[s]),(c.length===1||e!==a)&&f.c){Lt(f,f.c,!1);return}throw Bn}}throw i}finally{o&&e[5].pop()}},Dt=e=>{if(!(e==null||typeof e=="boolean")){if(typeof e=="string"||typeof e=="number")return{t:e.toString(),d:!0};if("vR"in e&&(e={tag:e.tag,props:e.props,key:e.key,f:e.f,type:e.tag,ref:e.props.ref,o:e.o||e}),typeof e.tag=="function")e[S]=[0,[]];else{let t=Qo[e.tag];t&&(we||=Le(""),e.props.children=[{tag:we,props:{value:e.n=`http://www.w3.org/${t}`,children:e.props.children}}])}return e}},qn=(e,t,n)=>{e.c===t&&(e.c=n,e.vC.forEach(r=>qn(r,t,n)))},Un=(e,t)=>{t[S][2]?.forEach(([n,r])=>{n.values.push(r)});try{st(e,t,void 0)}catch{return}if(t.a){delete t.a;return}t[S][2]?.forEach(([n])=>{n.values.pop()}),(e[0]!==1||!e[1])&&Lt(t,t.c,!1)},pe=new WeakMap,ct=[],De=async(e,t)=>{e[5]||=[];let n=pe.get(t);n&&n[0](void 0);let r,o=new Promise(i=>r=i);if(pe.set(t,[r,()=>{e[2]?e[2](e,t,i=>{Un(i,t)}).then(()=>r(t)):(Un(e,t),r(t))}]),ct.length)ct.at(-1).add(t);else{await Promise.resolve();let i=pe.get(t);i&&(pe.delete(t),i[1]())}return o},Xn=(e,t)=>{let n=[];n[5]=[],n[4]=!0,st(n,e,void 0),n[4]=!1;let r=document.createDocumentFragment();Lt(e,r,!0),qn(e,r,t),t.replaceChildren(r)};var at=e=>{let t=new Set;ct.push(t),e(),t.forEach(n=>{let r=pe.get(n);r&&(pe.delete(n),r[1]())}),ct.pop()},jt=(e,t,n)=>({tag:Fe,props:{children:e},key:n,e:t,p:1});var Jn=(e,t={})=>{let n;return Object.keys(t).length>0&&console.warn("createRoot options are not supported yet"),{render(r){if(n===null)throw new Error("Cannot update an unmounted root");n?n(r):Xn(Dt({tag:()=>{let[o,i]=O(r);return n=i,o},props:{}}),e)},unmount(){n?.(null),n=null}}};function Qn(e,t){return typeof t=="bigint"?t.toString():t}var Bt=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function er(e){return new Bt(e)}function tr(e){return e==null}function nr(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}var Yn=Symbol("evaluating");function rr(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Yn)return r===void 0&&(r=Yn,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function or(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}var Ut="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ut(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function oe(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function sr(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}function ie(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function cr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function lt(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Be(e){return typeof e=="string"?e:e?.message}function Ht(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function $e(e,t,n){var r;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Be(e.inst?._zod.def?.error?.(e))??Be(i?.(e))??Be(t?.error?.(e))??Be(n.customError?.(e))??Be(n.localeError?.(e))??"Invalid input",c={};for(let f of Object.keys(e))f==="inst"||f==="schema"||f==="continue"||f==="input"||f==="__proto__"||(c[f]=e[f]);return c.path??(c.path=[]),c.message=a,t?.reportInput&&(c.input=e.input),c}var si=/[\uD800-\uDBFF]/;function ar(e){let t=e.length;if(!si.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function lr(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ci(e,n,r.value)}}function de(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Vt(e,t,n){return de(e,t,n,!1)}function ci(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:de(this,t,n.bind(this))},set(r){de(this,t,r)}})}function ai(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ft,re=!1,ui={configurable:!0,get(){re=!0}};function q(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Ft!==e._zod){Ft=void 0;return}Ft=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ui);let o=re;re=!1;try{let i=n(this);return re?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),re=re||o,i}catch(i){throw delete this[t],re=re||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function fr(e,t,n,r){let o=ai(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}var pr;var Kt={value:void 0,enumerable:!1},dr="captureStackTrace"in Error?Error:null;function li(e){let t=dr;if(t){let n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return dr=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(e,t,n,r){let o={};function i(l){this.def=l,this.constr=s,this.traits=new Set}i.prototype=o;let a=n,c=a&&new WeakSet;function f(l,d){if(l._zod){if(l._zod.traits.has(e))return}else{Kt.value=new i(d);try{Object.defineProperty(l,"_zod",Kt)}finally{Kt.value=void 0}}if(l._zod.traits.add(e),t(l,d),c){let h=Object.getPrototypeOf(l),_=l._zod.constr.prototype,z=h;for(;z&&z!==_;)z=Object.getPrototypeOf(z);let w=z??h;c.has(w)||(c.add(w),lr(w,a))}let m=s.prototype;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(h in l||(l[h]=m[h].bind(l)))}let u=r?.Parent??Object;class p extends u{}Object.defineProperty(p,"name",{value:e});function s(l){let d=r?.Parent?li(p):this;f(d,l);let m=d._zod.deferred;if(m){for(let _ of m)_();d._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(d),d}return Object.defineProperty(s,"init",{value:f}),Object.defineProperty(s,Symbol.hasInstance,{value:l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var X=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};(pr=globalThis).__zod_globalConfig??(pr.__zod_globalConfig={});var Ue=globalThis.__zod_globalConfig;function Se(e){return e&&Object.assign(Ue,e),Ue}function fi(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Qn,2)),e.message}function pi(e){this._zod.message=e}var di={get:fi,set:pi,enumerable:!0,configurable:!0},Gt={value:void 0,enumerable:!1},mr=new WeakSet([Object.prototype,Error.prototype]),hr=(e,t)=>{e.name="$ZodError",Gt.value=t,Object.defineProperty(e,"issues",Gt),Gt.value=void 0,Object.defineProperty(e,"message",di);let n=Object.getPrototypeOf(e);mr.has(n)||(mr.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},cc=C("$ZodError",hr),He=C("$ZodError",hr,void 0,{Parent:Error});var hi=e=>{let t=(n,r,o,i)=>{let a=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise)throw new X;if(c.issues.length){let f=new(i?.Err??e)(c.issues.map(u=>$e(u,a,Se())));throw Ut(f,i?.callee??t),f}return c.value};return t},qt=hi(He),gi=e=>{let t=async(n,r,o,i)=>{let a=o?{...o,async:!0}:{async:!0},c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise&&(c=await c),c.issues.length){let f=new(i?.Err??e)(c.issues.map(u=>$e(u,a,Se())));throw Ut(f,i?.callee??t),f}return c.value};return t},Xt=gi(He),_i=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new X;return i.issues.length?gr(e,i.issues,o):{success:!0,data:i.value}},Jt=_i(He);function gr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>$e(o,n,Se()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}var vi=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?gr(e,i.issues,o):{success:!0,data:i.value}},Yt=vi(He);var _r=/^[\s\S]{0,}$/;var vr=/^-?\d+(?:\.\d+)?$/,yr=/^(?:true|false)$/i;var Qt=C("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])});var xi=e=>{let t=e.value;return!tr(t)&&t.length!==void 0};var br=C("$ZodCheckMinLength",(e,t)=>{var n;Qt.init(e,t),(n=e._zod.def).when??(n.when=xi),e._zod.check=r=>{let o=r.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?ar(o):i)>=t.minimum)return;let c=ur(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var wr={major:4,minor:6,patch:5};var J=C("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wr;let r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(let i of o)for(let a of i._zod.onattach)a(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(c,f,u)=>{if(c.memo)return c;let p=ie(c),s;for(let l of f){if(l._zod.def.when){if(cr(c)||!l._zod.def.when(c))continue}else if(p)continue;let d=c.issues.length,m=l._zod.check(c);if(m instanceof Promise&&u?.async===!1)throw new X;if(s||m instanceof Promise)s=(s??Promise.resolve()).then(async()=>{await m,c.issues.length!==d&&(Ht(c.issues,d,e),p||(p=ie(c,d)))});else{if(c.issues.length===d)continue;Ht(c.issues,d,e),p||(p=ie(c,d))}}return s?s.then(()=>c):c},a=(c,f,u)=>{if(ie(c))return c.aborted=!0,c;let p=i(f,o,u);if(p instanceof Promise){if(u.async===!1)throw new X;return p.then(s=>e._zod.parse(s,u))}return e._zod.parse(p,u)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){let p=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return p instanceof Promise?p.then(s=>a(s,c,f)):a(p,c,f)}let u=e._zod.parse(c,f);if(u instanceof Promise){if(f.async===!1)throw new X;return u.then(p=>i(p,o,f))}return i(u,o,f)}}},{get"~standard"(){return Vt(this,"~standard",Si(this))},set"~standard"(e){de(this,"~standard",e)}}),zr=(e,t)=>e.issues.length?{issues:e.issues.map(n=>$e(n,t,Se()))}:{value:e.value};async function $i(e,t){let n={async:!0};return zr(await e._zod.run({value:t,issues:[]},n),n)}function Si(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return zr(r,n)}catch{}return $i(e,t)},vendor:"zod",version:1}}var kr=C("$ZodString",(e,t)=>{J.init(e,t),e._zod.pattern=t.pattern??_r,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}});var Er=C("$ZodNumber",(e,t)=>{J.init(e,t),e._zod.pattern=vr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}});var Zr=C("$ZodBoolean",(e,t)=>{J.init(e,t),e._zod.pattern=yr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}});function $r(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}var Pr=C("$ZodArray",(e,t)=>{J.init(e,t);let n=Ue.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=n?n.alloc(e,r,Array(i.length),o):Array(i.length);let a=[],c=o?.abortEarly;for(let f=0;f<i.length;f++){let u=i[f],p=t.element._zod.run({value:u,issues:[]},o);if(p instanceof Promise)a.push(p.then(s=>$r(s,r,f)));else if($r(p,r,f),c&&p.issues.length!==0&&ie(p))break}return a.length?Promise.all(a).then(()=>r):r}});function ft(e,t,n,r,o,i){let a=n in r,c=i==="optional";if(!(!a&&c&&o==="optional")){if(e.issues.length){if(o!==void 0&&c&&!a)return;t.issues.push(...lt(n,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(a||o==="defaulted"&&!c)&&(t.value[n]=void 0):t.value[n]=e.value}}var zi=[];function ki(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:zi,o=r.length?[...t,...r]:t;for(let a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let i=sr(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function Ei(e,t,n,r,o,i,a){let c=[],f=o.keySet,u=o.catchall._zod,p=u.def.type,s=u.optin,l=u.optout,d=0;for(let m in t){if(a&&n.issues.length!==d){if(ie(n,d))break;d=n.issues.length}if(f.has(m))continue;if(m==="__proto__"){p==="never"&&c.push(m);continue}if(p==="never"){c.push(m);continue}let h=u.run({value:t[m],issues:[]},r);h instanceof Promise?e.push(h.then(_=>ft(_,n,m,t,s,l))):ft(h,n,m,t,s,l)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Cr=C("$ZodObject",(e,t)=>{J.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){let u=()=>{let p={...r};return Object.defineProperty(t,"shape",{value:p}),u.raw=p,p};u.raw=r,Object.defineProperty(t,"shape",{get:u})}let o=er(()=>ki(t));q(e,"propValues",u=>{let p=u.def.shape,s={};for(let l in p){let d=p[l]._zod;if(d.values){Object.prototype.hasOwnProperty.call(s,l)||or(s,l,new Set);for(let m of d.values)s[l].add(m);d.optin!==void 0&&s[l].add(void 0)}}return s});let i=ir,a=t.catchall,c,f=Ue.memoizer;f?.attach(e),e._zod.parse=(u,p)=>{c??(c=o.value);let s=u.value;if(!i(s))return u.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),u;u.value=f?f.alloc(e,u,{},p):{};let l=[],d=c.shape,m=p?.abortEarly,h=u.issues.length;for(let _ of c.allKeys){if(m&&u.issues.length!==h){if(ie(u,h))break;h=u.issues.length}if(_==="__proto__")continue;let z=d[_],w=z._zod.optin,A=z._zod.optout,v=z._zod.run({value:s[_],issues:[]},p);v instanceof Promise?l.push(v.then($=>ft($,u,_,s,w,A))):ft(v,u,_,s,w,A)}return a?Ei(l,s,u,p,o.value,e,m===!0):l.length?Promise.all(l).then(()=>u):u}});function Sr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ar=C("$ZodOptional",(e,t)=>{J.init(e,t),q(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",q(e,"values",n=>{let r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),q(e,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${nr(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;let o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(i=>Sr(n,i)):Sr(n,o)}return t.innerType._zod.run(n,r)}});var Mr=C("$ZodLazy",(e,t)=>{J.init(e,t),rr(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),q(e,"pattern",n=>n.innerType?._zod?.pattern),q(e,"propValues",n=>n.innerType?._zod?.propValues),q(e,"optin",n=>n.innerType?._zod?.optin??void 0),q(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)});function Tr(e){return e.checks&&(e.checks=[...e.checks]),e}function Nr(e,t){return new e(Tr({type:"string",...oe(t)}))}function Rr(e,t){return new e(Tr({type:"number",checks:[],...oe(t)}))}function Or(e,t){return new e({type:"boolean",...oe(t)})}function en(e,t){return new br({check:"min_length",...oe(t),minimum:e})}var he=C("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");J.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){de(this,"with",e)},parse(e,t){return qt(this,e,t,{callee:this.parse})},parseAsync(e,t){return Xt(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return Jt(this,e,t)},safeParseAsync(e,t){return Yt(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0})},clone(e,t){return ut(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),Ci=C("ZodMiniString",(e,t)=>{kr.init(e,t),he.init(e,t)});function B(e){return Nr(Ci,e)}var Ai=C("ZodMiniNumber",(e,t)=>{Er.init(e,t),he.init(e,t)});function Ir(e){return Rr(Ai,e)}var Mi=C("ZodMiniBoolean",(e,t)=>{Zr.init(e,t),he.init(e,t)});function pt(e){return Or(Mi,e)}var Ti=C("ZodMiniArray",(e,t)=>{Pr.init(e,t),he.init(e,t)});function Y(e,t){return new Ti({type:"array",element:e,...oe(t)})}var Ni=C("ZodMiniObject",(e,t)=>{Cr.init(e,t),he.init(e,t),fr(e,"shape",n=>n._zod.def.shape,!1)});function se(e,t){let n={type:"object",shape:e??{},...oe(t)};return new Ni(n)}var Ri=C("ZodMiniOptional",(e,t)=>{Ar.init(e,t),he.init(e,t)});function tn(e){return new Ri({type:"optional",innerType:e})}var Oi=C("ZodMiniLazy",(e,t)=>{Mr.init(e,t),he.init(e,t)});function nn(e){return new Oi({type:"lazy",getter:e})}var Dr=se({id:B(),name:B(),label:B(),active:pt(),children:nn(()=>Y(Dr))}),jr=se({name:B(),path:Y(B()),docs:Y(Dr),groups:nn(()=>Y(jr))}),Lr=se({depth:Ir(),slug:B(),text:B()}),Fr=se({title:B(),groups:Y(jr),outline:Y(se({part:tn(B()),sections:Y(se({heading:Lr,part:tn(B()),subs:Y(se({heading:Lr}))})).check(en(1))})),home:pt(),cursorFace:pt()});function Br(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Br(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Di(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Br(e))&&(r&&(r+=" "),r+=t);return r}var x=Di;var Hr=Le({pending:!1,data:null,method:null,action:null}),Ur=new Set,Vr=e=>{Ur.add(e),e.finally(()=>Ur.delete(e))};var sn=Qe({button:()=>to,clearCache:()=>ji,composeRef:()=>dt,form:()=>Yr,input:()=>eo,link:()=>qr,meta:()=>Xr,script:()=>Wr,style:()=>Gr,title:()=>Kr}),ji=()=>{rn=Object.create(null),on=Object.create(null)},dt=(e,t)=>ot(()=>n=>{let r;e&&(typeof e=="function"?r=e(n)||(()=>{e(null)}):e&&"current"in e&&(e.current=n,r=()=>{e.current=null}));let o=t(n);return()=>{o?.(),r?.()}},[e]),rn=Object.create(null),on=Object.create(null),Ve=(e,t,n,r,o)=>{if(t?.itemProp)return{tag:e,props:t,type:e,ref:t.ref};let i=document.head,{onLoad:a,onError:c,precedence:f,blocking:u,...p}=t,s=null,l=!1,d=ye[e],m=Ye(e,r),h=v=>v.getAttribute("rel")==="stylesheet"&&v.getAttribute("data-precedence")!==null,_;if(m){let v=i.querySelectorAll(e);e:for(let $ of v)if(!(e==="link"&&!h($))){for(let y of d)if($.getAttribute(y)===t[y]){s=$;break e}}if(!s){let $=d.reduce((y,P)=>t[P]===void 0?y:`${y}-${P}-${t[P]}`,e);l=!on[$],s=on[$]||=(()=>{let y=document.createElement(e);for(let P of d)t[P]!==void 0&&y.setAttribute(P,t[P]);return t.rel&&y.setAttribute("rel",t.rel),y})()}}else _=i.querySelectorAll(e);f=r?f??"":void 0,r&&(p[Ze]=f);let z=fe(v=>{if(m){if(e==="link"&&f!==void 0){let y=!1;for(let P of i.querySelectorAll(e)){let L=P.getAttribute(Ze);if(L===null){i.insertBefore(v,P);return}if(y&&L!==f){i.insertBefore(v,P);return}L===f&&(y=!0)}i.appendChild(v);return}let $=!1;for(let y of i.querySelectorAll(e)){if($&&y.getAttribute("data-precedence")!==f){i.insertBefore(v,y);return}y.getAttribute("data-precedence")===f&&($=!0)}i.appendChild(v)}else if(e==="link")i.contains(v)||i.appendChild(v);else if(_){let $=!1;for(let y of _)if(y===v){$=!0;break}$||i.insertBefore(v,i.contains(_[0])?_[0]:i.querySelector(e)),_=void 0}},[m,f,e]),w=dt(t.ref,v=>{let $=d[0];if(n===2&&(v.innerHTML=""),(l||_)&&z(v),!c&&!a||!$)return;let y=rn[v.getAttribute($)]||=new Promise((P,L)=>{v.addEventListener("load",P),v.addEventListener("error",L)});a&&(y=y.then(a)),c&&(y=y.catch(c)),y.catch(()=>{})});if(o&&u==="render"){let v=ye[e][0];if(v&&t[v]){let $=t[v],y=rn[$]||=new Promise((P,L)=>{z(s),s.addEventListener("load",P),s.addEventListener("error",L)});rt(y)}}let A={tag:e,type:e,props:{...p,ref:w},ref:w};return A.p=n,s&&(A.e=s),jt(A,i)},Kr=e=>{let t=Hn();return(t&&M(t))?.endsWith("svg")?{tag:"title",props:e,type:"title",ref:e.ref}:Ve("title",e,void 0,!1,!1)},Wr=e=>!e||["src","async"].some(t=>!e[t])?{tag:"script",props:e,type:"script",ref:e.ref}:Ve("script",e,1,!1,!0),Gr=e=>!e||!["href","precedence"].every(t=>t in e)?{tag:"style",props:e,type:"style",ref:e.ref}:(e["data-href"]=e.href,delete e.href,Ve("style",e,2,!0,!0)),qr=e=>!e||["onLoad","onError"].some(t=>t in e)||e.rel==="stylesheet"&&(!("precedence"in e)||"disabled"in e)?{tag:"link",props:e,type:"link",ref:e.ref}:Ve("link",e,1,Je(e),!0),Xr=e=>Ve("meta",e,void 0,!1,!1),Jr=Symbol(),Yr=e=>{let{action:t,...n}=e;typeof t!="function"&&(n.action=t);let[r,o]=O([null,!1]),i=fe(async u=>{let p=u.isTrusted?t:u.detail[Jr];if(typeof p!="function")return;u.preventDefault();let s=new FormData(u.target);o([s,!0]);let l=p(s);l instanceof Promise&&(Vr(l),await l),o([null,!0])},[]),a=dt(e.ref,u=>(u.addEventListener("submit",i),()=>{u.removeEventListener("submit",i)})),[c,f]=r;return r[1]=!1,{tag:Hr,props:{value:{pending:c!==null,data:c,method:c?"post":null,action:c?t:null},children:{tag:"form",props:{...n,ref:a},type:"form",ref:a}},f}},Qr=(e,{formAction:t,...n})=>{if(typeof t=="function"){let r=fe(o=>{o.preventDefault(),o.currentTarget.form.dispatchEvent(new CustomEvent("submit",{detail:{[Jr]:t}}))},[]);n.ref=dt(n.ref,o=>(o.addEventListener("click",r),()=>{o.removeEventListener("click",r)}))}return{tag:e,props:n,type:e,ref:n.ref}},eo=e=>Qr("input",e),to=e=>Qr("button",e);Object.assign(Ee,{title:Kr,script:Wr,style:Gr,link:qr,meta:Xr,form:Yr,input:eo,button:to});var cn=(e,t,n)=>(typeof e=="string"&&sn[e]&&(e=sn[e]),{tag:e,type:e,props:t,key:n,ref:t.ref}),Ke=e=>cn("",e,void 0);var an=(({children:e,fallback:t,fallbackRender:n,onError:r})=>{let o=Ke({children:e});return o[ee]=i=>{if(i instanceof Promise)throw i;return r?.(i),n?.(i)||t},o}),un=(({children:e,fallback:t})=>{let n=Ke({children:e});return n[ee]=(r,o)=>{if(!(r instanceof Promise))throw r;return r.finally(o),t},n});var Fi=0,mt=async e=>{try{return e.flat().map(no)}catch(t){if(t instanceof Promise){let n=le();return await t,n(()=>mt(e))}else throw t}},no=e=>{if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||Array.isArray(e))return F([e]);if(te(e))return ne(e);{let t=e.toString();return t instanceof Promise?t:k(t)}},ro=async({children:e,fallback:t,fallbackRender:n,onError:r})=>{if(!e)return k("");Array.isArray(e)||(e=[e]);let o=M(ln)?.scriptNonce,i,a=()=>i||=le(),c,f=()=>c||=(async()=>{let s=await t;if(s==null)return;if(typeof s=="string"||Array.isArray(s))return a()(()=>F([s]));if(te(s))return a()(()=>ne(s));let l=await a()(()=>s.toString());return k(l,l.callbacks||s.callbacks)})(),u=async s=>{let l=await f();return a()(async()=>{r?.(s);let d=l!==void 0?l:n&&Pt(R,{},n(s))||"",m=await R({children:d}).toString();return k(m,m.callbacks||d.callbacks)})},p=[];try{p=e.map(no)}catch(s){let l=a();s instanceof Promise?p=[s.then(()=>l(()=>mt(e))).catch(d=>u(d))]:p=[await u(s)]}if(p.some(s=>s instanceof Promise)){a();let s=Fi++,l=RegExp(`(<template id="E:${s}"></template>)(.*?)(<!--E:${s}-->)`,"s"),d=!1,m=async({error:z,buffer:w})=>{if(d)return"";d=!0;let A=await u(z),v=A.callbacks;return w?(w[0]=w[0].replace(l,()=>A),v?.length?k("",v):""):k(`<template data-hono-target="E:${s}">${A}</template><script>
2
2
  ((d,c,n) => {
3
3
  c=d.currentScript.previousSibling
4
4
  d=d.getElementById('E:${s}')
@@ -22,7 +22,7 @@ while(n.nodeType!=8||n.nodeValue!='E:${s}'){n=n.nextSibling}
22
22
  n.remove()
23
23
  d.remove()
24
24
  })(document)
25
- <\/script>`),V.callbacks))).catch(V=>m({error:V,buffer:w})));return k(y,ce)}).catch(v=>m({error:v,buffer:w}))}])}else return R({children:p})};ro[U]=an;var ln=Oe(null),Bi=0,Ui=e=>typeof e=="string"||Array.isArray(e)?F([e]):e==null||typeof e=="boolean"?"":te(e)?ne(e):e.toString(),oo=async({children:e,fallback:t})=>{Array.isArray(e)||(e=[e]);let n=M(ln)?.scriptNonce,r=[],o={[S]:[0,[]]},i=()=>{D.pop()};try{o[S][0]=0,D.push([[],o]),r=e.map(Ui)}catch(a){if(a instanceof Promise){let c=le();r=[a.then(()=>c(()=>(o[S][0]=0,D.push([[],o]),dt(e).finally(i))))]}else throw a}finally{i()}if(r.some(a=>a instanceof Promise)){let a=Bi++,c=await(typeof t=="string"||Array.isArray(t)?F([t]):te(t)?ne(t):t.toString());return k(`<template id="H:${a}"></template>${c}<!--/$-->`,[...c.callbacks||[],({phase:f,buffer:u,context:p})=>{if(f!==W.BeforeStream)return Promise.all(r).then(async s=>{s=s.flat();let l=s.join("");u&&(u[0]=u[0].replace(new RegExp(`<template id="H:${a}"></template>.*?<!--/\\$-->`,"s"),()=>l));let d=u?"":`<template data-hono-target="H:${a}">${l}</template><script${n?` nonce="${n}"`:""}>
25
+ <\/script>`),V.callbacks))).catch(V=>m({error:V,buffer:w})));return k(y,ce)}).catch(v=>m({error:v,buffer:w}))}])}else return R({children:p})};ro[U]=an;var ln=Oe(null),Bi=0,Ui=e=>typeof e=="string"||Array.isArray(e)?F([e]):e==null||typeof e=="boolean"?"":te(e)?ne(e):e.toString(),oo=async({children:e,fallback:t})=>{Array.isArray(e)||(e=[e]);let n=M(ln)?.scriptNonce,r=[],o={[S]:[0,[]]},i=()=>{D.pop()};try{o[S][0]=0,D.push([[],o]),r=e.map(Ui)}catch(a){if(a instanceof Promise){let c=le();r=[a.then(()=>c(()=>(o[S][0]=0,D.push([[],o]),mt(e).finally(i))))]}else throw a}finally{i()}if(r.some(a=>a instanceof Promise)){let a=Bi++,c=await(typeof t=="string"||Array.isArray(t)?F([t]):te(t)?ne(t):t.toString());return k(`<template id="H:${a}"></template>${c}<!--/$-->`,[...c.callbacks||[],({phase:f,buffer:u,context:p})=>{if(f!==W.BeforeStream)return Promise.all(r).then(async s=>{s=s.flat();let l=s.join("");u&&(u[0]=u[0].replace(new RegExp(`<template id="H:${a}"></template>.*?<!--/\\$-->`,"s"),()=>l));let d=u?"":`<template data-hono-target="H:${a}">${l}</template><script${n?` nonce="${n}"`:""}>
26
26
  ((d,c,n) => {
27
27
  c=d.currentScript.previousSibling
28
28
  d=d.getElementById('H:${a}')
@@ -30,10 +30,10 @@ if(!d)return
30
30
  do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='/$')
31
31
  d.replaceWith(c.content)
32
32
  })(document)
33
- <\/script>`,m=s.map(h=>h.callbacks||[]).flat();return m.length?(f===W.Stream&&(d=await ke(d,W.BeforeStream,!0,p)),k(d,m)):d})}])}else return k(r.join(""))};oo[U]=un;var op=new TextEncoder;var mt="fh-cursor-face";var io="/_fh/reload",so="/favicon.svg";function g(e,t,n){let r;if(!t||!("children"in t))r=Ne(e,t,[]);else{let o=t.children;r=Array.isArray(o)?Ne(e,t,o):Ne(e,t,[o])}return r.key=n,r}var ao=e=>{let t=E(null),n=E(null),r=E({x:0,y:0,frame:0}),o=()=>{cancelAnimationFrame(r.current.frame),r.current.frame=0,t.current?.classList.remove("wg_cursorFace__root--visible")},i=()=>{n.current?.matches||o()},a=()=>{r.current.frame===0&&(r.current.frame=requestAnimationFrame(()=>{r.current.frame=0;let s=t.current;s!==null&&(s.style.transform=`translate3d(
33
+ <\/script>`,m=s.map(h=>h.callbacks||[]).flat();return m.length?(f===W.Stream&&(d=await ke(d,W.BeforeStream,!0,p)),k(d,m)):d})}])}else return k(r.join(""))};oo[U]=un;var op=new TextEncoder;var ht="fh-cursor-face";var io="/_fh/reload",so="/favicon.svg";function g(e,t,n){let r;if(!t||!("children"in t))r=Ne(e,t,[]);else{let o=t.children;r=Array.isArray(o)?Ne(e,t,o):Ne(e,t,[o])}return r.key=n,r}var ao=e=>{let t=E(null),n=E(null),r=E({x:0,y:0,frame:0}),o=()=>{cancelAnimationFrame(r.current.frame),r.current.frame=0,t.current?.classList.remove("wg_cursorFace__root--visible")},i=()=>{n.current?.matches||o()},a=()=>{r.current.frame===0&&(r.current.frame=requestAnimationFrame(()=>{r.current.frame=0;let s=t.current;s!==null&&(s.style.transform=`translate3d(
34
34
  ${Math.max(0,Math.min(r.current.x+16,document.documentElement.clientWidth-s.width-16))}px,
35
35
  ${Math.max(0,Math.min(r.current.y+16,document.documentElement.clientHeight-s.height-16))}px,
36
36
  0
37
- )`,s.classList.add("wg_cursorFace__root--visible"))}))},c=s=>{if(!n.current?.matches||s.pointerType!=="mouse"){o();return}r.current.x=s.clientX,r.current.y=s.clientY,a()},f=()=>{t.current?.classList.contains("wg_cursorFace__root--visible")&&a()},u=()=>{if(t.current?.classList.contains("wg_cursorFace__root--visible"))try{sessionStorage.setItem(mt,JSON.stringify({x:r.current.x,y:r.current.y}))}catch{}},p=()=>{try{let s=sessionStorage.getItem(mt);if(sessionStorage.removeItem(mt),s===null||!n.current?.matches)return;let l=JSON.parse(s);typeof l=="object"&&l!==null&&"x"in l&&"y"in l&&typeof l.x=="number"&&typeof l.y=="number"&&Number.isFinite(l.x)&&Number.isFinite(l.y)&&(r.current.x=l.x,r.current.y=l.y,a())}catch{}};return I(()=>{if(!e.ready)return;let s=new AbortController,l=matchMedia("(hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference)");return n.current=l,p(),document.addEventListener("pointermove",c,{passive:!0,signal:s.signal}),document.addEventListener("pointerdown",c,{passive:!0,signal:s.signal}),document.documentElement.addEventListener("pointerleave",o,{signal:s.signal}),addEventListener("blur",o,{signal:s.signal}),addEventListener("resize",f,{signal:s.signal}),addEventListener("pagehide",u,{signal:s.signal}),addEventListener("pageshow",p,{signal:s.signal}),l.addEventListener("change",i,{signal:s.signal}),()=>{s.abort(),n.current=null,o()}},[e.ready]),g("img",{ref:e.ready?t:void 0,className:x("wg_cursorFace__root"),src:so,width:24,height:24,alt:"","aria-hidden":"true",draggable:!1,"data-cursor-face":""})};var fn="(width < 1024px)",pn="(width >= 1536px)";var uo=e=>{let t=document.querySelector("[data-navigation]"),n=document.querySelector('[data-navigation-scroll="documents"]'),r=document.querySelector('[data-navigation-scroll="outline"]');if(!(!t||!n||!r)){t.dataset.navigationLayout=e.layout;try{let o=sessionStorage.getItem(e.key),i=o===null?void 0:JSON.parse(o),a=typeof i=="object"&&i!==null&&"version"in i&&i.version===e.version&&"state"in i?e.toState(i.state):{positions:{}},c=sessionStorage.getItem(`${e.key}:${e.layout==="drawer"?"drawer":"desktop"}`),f=a.positions[e.layout]===void 0&&c!==null?e.toState({positions:{[e.layout]:JSON.parse(c)}}).positions[e.layout]:void 0,u=a.positions[e.layout]??f,p=[...t.querySelectorAll(".wg_navigationNav__root a[href]")].map(s=>`${s.pathname}:${s.textContent}`).join(`
38
- `);if(u===void 0||u.navigation!==p)return;n.scrollTop=u.documents,u.pathname===location.pathname&&(r.scrollTop=u.outline)}catch{}}};var gt=e=>{let t=[...e.group.docs.map(n=>({kind:"document",key:`doc:${n.id}`,doc:n})),...e.group.groups.map(n=>({kind:"group",key:`group:${JSON.stringify(n.path)}`,group:n}))];return g("ul",{className:x("wg_navigationNavList__root"),"aria-label":e.group.name,children:t.map(n=>g("li",{className:x("wg_navigationNavList__item"),children:[n.kind==="document"&&g(R,{children:[g("a",{className:x("wg_navigationNavList__link",{"wg_navigationNavList__link--active":n.doc.active}),href:`/${n.doc.id}/`,title:n.doc.label,"aria-current":n.doc.active?"page":void 0,children:n.doc.name}),n.doc.children.length>0&&g(gt,{group:{name:n.doc.name,path:e.group.path,docs:n.doc.children,groups:[]}})]}),n.kind==="group"&&g(R,{children:[g("span",{className:x("wg_navigationNavList__branch"),children:n.group.name}),g(gt,{group:n.group})]})]},n.key))})};var lo="Document navigation",fo="Open navigation",po="Close navigation",mo="Navigation";var dn="On this page";var mn=e=>g("nav",{className:x("wg_navigationNav__root"),"aria-label":lo,children:g("div",{className:x("wg_navigationNav__docs"),children:e.groups.map(t=>g("section",{className:x("wg_navigationNav__docGroup"),"aria-label":t.name,children:[g("div",{className:x("wg_navigationNav__group"),children:t.name}),g(gt,{group:t})]},JSON.stringify(t.path)))})});var _t=e=>{let[t,n]=O({above:!1,below:!1}),r=E(0),o=()=>{if(r.current=0,e.portRef.current===null)return;let c=e.portRef.current.scrollTop>1,f=e.portRef.current.scrollHeight-e.portRef.current.clientHeight-e.portRef.current.scrollTop>1;n(u=>u.above===c&&u.below===f?u:{above:c,below:f})},i=()=>{r.current===0&&(r.current=requestAnimationFrame(o))},a=c=>{e.onScroll?.(),i()};return I(()=>{if(!e.ready||e.portRef.current===null)return;let c=new ResizeObserver(i);c.observe(e.portRef.current),e.portRef.current.firstElementChild!==null&&c.observe(e.portRef.current.firstElementChild);let f=!0;return addEventListener("pageshow",i),e.portRef.current.isConnected?o():queueMicrotask(()=>{f&&o()}),()=>{f=!1,c.disconnect(),removeEventListener("pageshow",i),cancelAnimationFrame(r.current),r.current=0}},[e.portRef,e.ready]),I(()=>{e.ready&&e.portRef.current?.isConnected&&o()},[e.children,e.ready]),g("div",{ref:e.ready?e.portRef:void 0,className:x("wg_navigation__scroll",e.kind==="documents"&&"wg_navigation__documents",e.kind==="outline"&&"wg_navigation__headings",e.ready&&"wg_navigation__scroll--ready",e.ready&&t.above&&"wg_navigation__scroll--above",e.ready&&t.below&&"wg_navigation__scroll--below"),"data-navigation-scroll":e.kind,onClick:e.onClick,onScroll:a,children:e.children})};var vt=e=>{if(!e)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch(t){if(t instanceof URIError)return null;throw t}};var ho=e=>{let[t,n]=O();return I(()=>{let o=e.groups.flatMap(f=>f.sections).flatMap(f=>[f.heading,...f.subs.map(u=>u.heading)]),i={id:0},a=()=>{i.id=0;let f=o.flatMap(u=>{let p=vt(`#${u.slug}`);return p?.checkVisibility()?[{slug:u.slug,top:p.getBoundingClientRect().top-Number.parseFloat(getComputedStyle(p).scrollMarginTop)}]:[]});n(f.findLast(u=>u.top<=1)?.slug??f[0]?.slug)},c=()=>{i.id===0&&(i.id=requestAnimationFrame(a))};return addEventListener("scroll",c,{passive:!0}),addEventListener("resize",c),addEventListener("toggle",c,!0),addEventListener("pageshow",c),document.addEventListener("DOMContentLoaded",c),document.readyState!=="loading"&&a(),()=>{cancelAnimationFrame(i.id),removeEventListener("scroll",c),removeEventListener("resize",c),removeEventListener("toggle",c,!0),removeEventListener("pageshow",c),document.removeEventListener("DOMContentLoaded",c)}},[e.groups]),g("nav",{className:x("wg_navigationToc__root"),"aria-label":dn,children:[g("div",{className:x("wg_navigationToc__label"),children:dn}),e.groups.map(r=>g("div",{className:x("wg_navigationToc__groupSection",{"wg_navigationToc__groupSection--named":r.part!==void 0}),children:[r.part!==void 0&&g("div",{className:x("wg_navigationToc__group"),children:r.part}),g("ul",{className:x("wg_navigationToc__list"),children:r.sections.map(o=>g("li",{className:x("wg_navigationToc__item"),children:[g("a",{className:x("wg_navigationToc__link",{"wg_navigationToc__link--active":o.heading.slug===t}),href:`#${o.heading.slug}`,"data-toc-link":"","aria-current":o.heading.slug===t?"location":void 0,children:o.heading.text}),o.subs.length>0&&g("ul",{className:x("wg_navigationToc__sub"),children:o.subs.map(i=>g("li",{className:x("wg_navigationToc__subItem"),children:g("a",{className:x("wg_navigationToc__subLink",{"wg_navigationToc__subLink--active":i.heading.slug===t}),href:`#${i.heading.slug}`,"data-toc-sub-link":"","aria-current":i.heading.slug===t?"location":void 0,children:i.heading.text})},i.heading.slug))})]},o.heading.slug))})]},r.sections[0].heading.slug))]})};var yt="for-humanity:navigation-scroll";var xt=e=>{let t=r=>{if(!(typeof r!="object"||r===null||!("navigation"in r)||typeof r.navigation!="string"||!("pathname"in r)||typeof r.pathname!="string"||!("documents"in r)||typeof r.documents!="number"||!Number.isFinite(r.documents)||r.documents<0||!("outline"in r)||typeof r.outline!="number"||!Number.isFinite(r.outline)||r.outline<0))return{navigation:r.navigation,pathname:r.pathname,documents:r.documents,outline:r.outline}};if(typeof e!="object"||e===null||!("positions"in e)||typeof e.positions!="object"||e.positions===null)return{positions:{}};let n={wide:t("wide"in e.positions?e.positions.wide:void 0),desktop:t("desktop"in e.positions?e.positions.desktop:void 0),drawer:t("drawer"in e.positions?e.positions.drawer:void 0)};return{positions:Object.fromEntries(Object.entries(n).filter(r=>r[1]!==void 0))}};var ge=e=>{let t=vt(e);for(let n=t?.closest("details");n;n=n.parentElement?.closest("details"))n.open=!0;return t};var go=e=>{let[t,n]=O(()=>e.stores===void 0?"desktop":matchMedia(fn).matches?"drawer":matchMedia(pn).matches?"wide":"desktop"),[r,o]=O(!1),i=E(null),a=E(null),c=E(null),f=E(null),u=E(null),p=E(null),s=E(null),l=E(null),d=E(null),m=E(null),h=E(t),_=E(null),z=E(!0),w=()=>d.current===null||m.current===null?h.current:d.current.matches?"drawer":m.current.matches?"wide":"desktop",A=()=>h.current==="drawer"?c.current:i.current,v=()=>h.current==="drawer"?f.current:a.current,$=()=>{let b=A();if(b!==null)return[...b.querySelectorAll(".wg_navigationNav__root a[href]")].map(Z=>`${Z.pathname}:${Z.textContent}`).join(`
39
- `)},y=()=>{let b=v();if(e.stores===void 0||b===null||u.current===null||z.current||h.current!==w()||h.current==="drawer"&&p.current?.open!==!0)return;let Z=$();if(Z===void 0)return;let j={navigation:Z,pathname:location.pathname,documents:b.scrollTop,outline:u.current.scrollTop};e.stores.scroll.setState(K=>({positions:{...K.positions,[h.current]:j}}))},P=()=>{h.current=w();let b=v(),Z=A();if(e.stores===void 0||b===null||u.current===null||Z===null||h.current==="drawer"&&p.current?.open!==!0)return;let j=$();if(j===void 0)return;let K=e.stores.scroll.getState().positions[h.current];b.scrollTop=0,u.current.scrollTop=0,K===void 0?uo({key:yt,version:1,layout:h.current,toState:xt}):K.navigation===j&&(b.scrollTop=K.documents,K.pathname===location.pathname&&(u.current.scrollTop=K.outline)),Z.dataset.navigationLayout=h.current,z.current=!1,y(),b.dispatchEvent(new Event("scroll")),u.current.dispatchEvent(new Event("scroll"))},L=b=>{p.current?.open!==!0&&(document.body.classList.remove("wg_shell__root--drawerOpen"),o(!1))},ce=()=>{y(),p.current?.close(),document.body.classList.remove("wg_shell__root--drawerOpen"),o(!1)},Q=b=>{w()!=="drawer"||p.current===null||p.current.open||(p.current.showModal(),document.body.classList.add("wg_shell__root--drawerOpen"),o(!0),P())},ze=b=>{ce()},V=b=>{b.preventDefault(),ce()},We=b=>{if(p.current===null||b.target!==p.current)return;let Z=p.current.getBoundingClientRect();(b.clientX<Z.left||b.clientX>Z.right||b.clientY<Z.top||b.clientY>Z.bottom)&&ce()},Ge=b=>{if(y(),p.current?.open!==!0||b.defaultPrevented||b.button!==0||b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||!(b.target instanceof Element))return;let Z=b.target.closest("a[href]");if(!(!(Z instanceof HTMLAnchorElement)||Z.target!==""&&Z.target!=="_self"||Z.hasAttribute("download"))&&(ce(),Z.origin===location.origin&&Z.pathname===location.pathname&&Z.search===location.search&&Z.hash)){let j=ge(Z.hash);j!==null&&(j.tabIndex=-1,j.focus({preventScroll:!0}))}},ae=()=>{let b=w();b!==h.current&&(document.activeElement instanceof HTMLElement&&(_.current={navigation:document.activeElement.closest("[data-navigation]")!==null,drawer:document.activeElement===s.current||document.activeElement.closest("[data-navigation-drawer]")!==null,href:document.activeElement.getAttribute("href")}),b!=="drawer"&&ce(),z.current=!0,h.current=b,at(()=>n(b)))},yn=b=>{!b.persisted||e.stores===void 0||(z.current=!0,at(()=>e.stores?.scroll.persist.rehydrate()),ae(),P())};return I(()=>{if(e.stores!==void 0)return d.current=matchMedia(fn),m.current=matchMedia(pn),d.current.addEventListener("change",ae),m.current.addEventListener("change",ae),addEventListener("pagehide",y),addEventListener("pageshow",yn),()=>{d.current?.removeEventListener("change",ae),m.current?.removeEventListener("change",ae),d.current=null,m.current=null,removeEventListener("pagehide",y),removeEventListener("pageshow",yn),document.body.classList.remove("wg_shell__root--drawerOpen")}},[e.stores]),I(()=>{if(e.stores===void 0)return;let b=!0,Z=()=>{if(!b||(P(),_.current===null))return;let j=A();if(t==="drawer")_.current.navigation&&s.current?.focus({preventScroll:!0});else if(_.current.navigation&&j!==null){let K=_.current.href;[...j.querySelectorAll("a[href]")].find(So=>So.getAttribute("href")===K)?.focus({preventScroll:!0})}else _.current.drawer&&l.current?.focus({preventScroll:!0});_.current=null};return v()?.isConnected?Z():queueMicrotask(Z),()=>{b=!1}},[t,e.stores]),g(R,{children:[g("div",{className:x("wg_navigation__sidebar",e.stores!==void 0&&"wg_navigation__sidebar--navigationReady"),children:[g("div",{className:x("wg_navigation__brandRow"),children:[g("a",{ref:e.stores===void 0?void 0:l,className:x("wg_navigation__brand"),href:"/","aria-current":e.data.home?"page":void 0,children:e.data.title}),g("button",{ref:e.stores===void 0?void 0:s,className:x("wg_navigation__menuToggle",e.stores!==void 0&&t==="drawer"&&"wg_navigation__menuToggle--visible"),type:"button","aria-label":fo,"aria-controls":"fh-navigation-drawer","aria-expanded":String(r),"data-navigation-open":"",onClick:Q,children:g("svg",{className:x("wg_navigation__menuIcon"),viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:g("path",{d:"M4 6h16M4 12h16M4 18h16"})})})]}),t!=="drawer"&&g("div",{ref:e.stores===void 0?void 0:i,className:x("wg_navigation__navigation"),"data-navigation":"",children:g(_t,{portRef:a,kind:"documents",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:g(mn,{groups:e.data.groups})})})]}),g("aside",{className:x("wg_navigation__tocRail"),"data-navigation-rail":"",children:g("div",{className:x("wg_navigation__outline"),"data-navigation-outline":"",children:g(_t,{portRef:u,kind:"outline",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:e.data.outline.length>0&&g(ho,{groups:e.data.outline})})})}),g("dialog",{ref:e.stores===void 0?void 0:p,className:x("wg_navigation__drawer"),id:"fh-navigation-drawer","aria-labelledby":"fh-navigation-title","data-navigation-drawer":"",onClose:L,onCancel:V,onClick:We,children:[g("div",{className:x("wg_navigation__drawerHeader"),children:[g("h2",{className:x("wg_navigation__drawerTitle"),id:"fh-navigation-title",children:mo}),g("button",{className:x("wg_navigation__drawerClose"),type:"button","aria-label":po,"data-navigation-close":"",onClick:ze,children:g("svg",{className:x("wg_navigation__menuIcon"),viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:g("path",{d:"m6 6 12 12M18 6 6 18"})})})]}),g("div",{className:x("wg_navigation__drawerContent"),"data-navigation-content":"",children:t==="drawer"&&g("div",{ref:e.stores===void 0?void 0:c,className:x("wg_navigation__navigation"),"data-navigation":"",children:g(_t,{portRef:f,kind:"documents",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:g(mn,{groups:e.data.groups})})})})]})]})};var vo=e=>{let t=E(null),n=E(0),r=E(null),o=E(null),i=E(null),a=()=>{clearTimeout(n.current),n.current=0,r.current?.abort(),r.current=null,t.current?.classList.remove("wg_prose__headingText--highlighted"),t.current=null},c=m=>{m.target===document&&(clearTimeout(n.current),r.current?.abort(),r.current=null,n.current=window.setTimeout(a,3e3))},f=m=>{a(),t.current=m===null?null:m.querySelector(".wg_prose__headingText"),t.current!==null&&(t.current.classList.add("wg_prose__headingText--highlighted"),n.current=window.setTimeout(a,3e3),r.current=new AbortController,document.addEventListener("scrollend",c,{signal:r.current.signal}))},u=m=>{if(m.defaultPrevented||m.button!==0||m.metaKey||m.ctrlKey||m.shiftKey||m.altKey)return;let h=m.target instanceof Element?m.target.closest("a[href]"):null;if(h instanceof HTMLAnchorElement&&(h.target===""||h.target==="_self")&&!h.hasAttribute("download")&&h.origin===location.origin&&h.pathname===location.pathname&&h.search===location.search&&h.hash){let _=ge(h.hash);h.hash===location.hash&&f(_)}},p=()=>{let m=ge(location.hash);m?.scrollIntoView(),f(m)},s=()=>{i.current?.abort()},l=async()=>{let m=o.current,h=location.hash,_=ge(h);await document.fonts.ready,!(m===null||m.signal.aborted)&&(_!==null&&!i.current?.signal.aborted&&h===location.hash&&(_.scrollIntoView({behavior:"instant"}),f(_)),document.documentElement.style.removeProperty("scroll-behavior"))},d=()=>{ge(location.hash),document.readyState==="complete"&&l()};return I(()=>{let m=new AbortController;o.current=m,i.current=new AbortController,document.documentElement.style.scrollBehavior="auto",document.addEventListener("click",u,{signal:m.signal}),addEventListener("hashchange",p,{signal:m.signal}),addEventListener("load",l,{once:!0,signal:m.signal});for(let h of["wheel","touchmove","keydown","mousedown"])addEventListener(h,s,{once:!0,passive:!0,signal:m.signal});return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",d,{once:!0,signal:m.signal}):d(),()=>{m.abort(),o.current=null,i.current?.abort(),i.current=null,a(),document.documentElement.style.removeProperty("scroll-behavior")}},[]),nt(()=>{if(!e.reload||o.current===null)return;let m=new EventSource(io);return m.onmessage=()=>location.reload(),()=>m.close()},[e.reload]),g(R,{children:[g("div",{className:x("wg_shellControls__navigation"),children:g(go,{data:e.data,stores:e.stores})}),g(ao,{ready:e.stores!==void 0})]})};function _n(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;let a=f=>f===null?null:JSON.parse(f,t?.reviver),c=(i=n.getItem(o))!=null?i:null;return c instanceof Promise?c.then(a):a(c)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t?.replacer)),removeItem:o=>n.removeItem(o)}}var gn=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(r){return gn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return gn(r)(n)}}}},us=(e,t)=>(n,r,o)=>{let i={storage:_n(()=>window.localStorage),partialize:_=>_,version:0,merge:(_,z)=>({...z,..._}),...t},a=!1,c=0,f=new Set,u=new Set,p=i.storage;if(!p)return e((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(..._)},r,o);let s=()=>{let _=i.partialize({...r()});return p.setItem(i.name,{state:_,version:i.version})},l=o.setState;o.setState=(_,z)=>(l(_,z),s());let d=e((..._)=>(n(..._),s()),r,o);o.getInitialState=()=>d;let m,h=()=>{var _,z;if(!p)return;let w=++c;a=!1,f.forEach(v=>{var $;return v(($=r())!=null?$:d)});let A=((z=i.onRehydrateStorage)==null?void 0:z.call(i,(_=r())!=null?_:d))||void 0;return gn(p.getItem.bind(p))(i.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==i.version){if(i.migrate){let $=i.migrate(v.state,v.version);return $ instanceof Promise?$.then(y=>[!0,y]):[!0,$]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var $;if(w!==c)return;let[y,P]=v;if(m=i.merge(P,($=r())!=null?$:d),n(m,!0),y)return s()}).then(()=>{w===c&&(A?.(r(),void 0),m=r(),a=!0,u.forEach(v=>v(m)))}).catch(v=>{w===c&&A?.(void 0,v)})};return o.persist={setOptions:_=>{i={...i,..._},_.storage&&(p=_.storage)},clearStorage:()=>{++c,p?.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:_=>(f.add(_),()=>{f.delete(_)}),onFinishHydration:_=>(u.add(_),()=>{u.delete(_)})},i.skipHydration||h(),m||d},yo=us;var xo=e=>{let t,n=new Set,r=(u,p)=>{let s=typeof u=="function"?u(t):u;if(!Object.is(s,t)){let l=t;t=p??(typeof s!="object"||s===null)?s:Object.assign({},t,s),n.forEach(d=>d(t,l))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>f,subscribe:u=>(n.add(u),()=>n.delete(u))},f=t=e(r,o,c);return c},bo=(e=>e?xo(e):xo);var wo=e=>{let t=n=>({getItem:r=>n().getItem(r),setItem:(r,o)=>{try{return n().setItem(r,o)}catch{}},removeItem:r=>{try{return n().removeItem(r)}catch{}}});return{scroll:bo()(yo(()=>({positions:{}}),{name:yt,version:1,storage:_n(()=>t(e.session)),merge:n=>xt(n),migrate:()=>({positions:{}})}))}};var vn=document.querySelector("[data-shell-browser-root]"),$o=document.getElementById("fh-navigation-data");if(vn!==null&&$o!==null)try{let e=JSON.parse($o.textContent),t=Fr.parse(e),n=wo({session:()=>sessionStorage});Jn(vn).render(g(vo,{data:t,stores:n,reload:vn.hasAttribute("data-shell-reload")}))}catch(e){console.error("for-humanity browser initialization failed",e)}})();
37
+ )`,s.classList.add("wg_cursorFace__root--visible"))}))},c=s=>{if(!n.current?.matches||s.pointerType!=="mouse"){o();return}r.current.x=s.clientX,r.current.y=s.clientY,a()},f=()=>{t.current?.classList.contains("wg_cursorFace__root--visible")&&a()},u=()=>{if(t.current?.classList.contains("wg_cursorFace__root--visible"))try{sessionStorage.setItem(ht,JSON.stringify({x:r.current.x,y:r.current.y}))}catch{}},p=()=>{try{let s=sessionStorage.getItem(ht);if(sessionStorage.removeItem(ht),s===null||!n.current?.matches)return;let l=JSON.parse(s);typeof l=="object"&&l!==null&&"x"in l&&"y"in l&&typeof l.x=="number"&&typeof l.y=="number"&&Number.isFinite(l.x)&&Number.isFinite(l.y)&&(r.current.x=l.x,r.current.y=l.y,a())}catch{}};return I(()=>{if(!e.ready)return;let s=new AbortController,l=matchMedia("(hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference)");return n.current=l,p(),document.addEventListener("pointermove",c,{passive:!0,signal:s.signal}),document.addEventListener("pointerdown",c,{passive:!0,signal:s.signal}),document.documentElement.addEventListener("pointerleave",o,{signal:s.signal}),addEventListener("blur",o,{signal:s.signal}),addEventListener("resize",f,{signal:s.signal}),addEventListener("pagehide",u,{signal:s.signal}),addEventListener("pageshow",p,{signal:s.signal}),l.addEventListener("change",i,{signal:s.signal}),()=>{s.abort(),n.current=null,o()}},[e.ready]),g("img",{ref:e.ready?t:void 0,className:x("wg_cursorFace__root"),src:so,width:24,height:24,alt:"","aria-hidden":"true",draggable:!1,"data-cursor-face":""})};var fn="(width < 1024px)",pn="(width >= 1360px)";var uo=e=>{let t=document.querySelector("[data-navigation]"),n=document.querySelector('[data-navigation-scroll="documents"]'),r=document.querySelector('[data-navigation-scroll="outline"]');if(!(!t||!n||!r)){t.dataset.navigationLayout=e.layout;try{let o=sessionStorage.getItem(e.key),i=o===null?void 0:JSON.parse(o),a=typeof i=="object"&&i!==null&&"version"in i&&i.version===e.version&&"state"in i?e.toState(i.state):{positions:{}},c=sessionStorage.getItem(`${e.key}:${e.layout==="drawer"?"drawer":"desktop"}`),f=a.positions[e.layout]===void 0&&c!==null?e.toState({positions:{[e.layout]:JSON.parse(c)}}).positions[e.layout]:void 0,u=a.positions[e.layout]??f,p=[...t.querySelectorAll(".wg_navigationNav__root a[href]")].map(s=>`${s.pathname}:${s.textContent}`).join(`
38
+ `);if(u===void 0||u.navigation!==p)return;n.scrollTop=u.documents,u.pathname===location.pathname&&(r.scrollTop=u.outline)}catch{}}};var _t=e=>{let t=[...e.group.docs.map(n=>({kind:"document",key:`doc:${n.id}`,doc:n})),...e.group.groups.map(n=>({kind:"group",key:`group:${JSON.stringify(n.path)}`,group:n}))];return g("ul",{className:x("wg_navigationNavList__root"),"aria-label":e.group.name,children:t.map(n=>g("li",{className:x("wg_navigationNavList__item"),children:[n.kind==="document"&&g(R,{children:[g("a",{className:x("wg_navigationNavList__link",{"wg_navigationNavList__link--active":n.doc.active}),href:`/${n.doc.id}/`,title:n.doc.label,"aria-current":n.doc.active?"page":void 0,children:n.doc.name}),n.doc.children.length>0&&g(_t,{group:{name:n.doc.name,path:e.group.path,docs:n.doc.children,groups:[]}})]}),n.kind==="group"&&g(R,{children:[g("span",{className:x("wg_navigationNavList__branch"),children:n.group.name}),g(_t,{group:n.group})]})]},n.key))})};var lo="Document navigation",fo="Open navigation",po="Close navigation",mo="Navigation";var dn="On this page";var mn=e=>g("nav",{className:x("wg_navigationNav__root"),"aria-label":lo,children:g("div",{className:x("wg_navigationNav__docs"),children:e.groups.map(t=>g("section",{className:x("wg_navigationNav__docGroup"),"aria-label":t.name,children:[g("div",{className:x("wg_navigationNav__group"),children:t.name}),g(_t,{group:t})]},JSON.stringify(t.path)))})});var vt=e=>{let[t,n]=O({above:!1,below:!1}),r=E(0),o=()=>{if(r.current=0,e.portRef.current===null)return;let c=e.portRef.current.scrollTop>1,f=e.portRef.current.scrollHeight-e.portRef.current.clientHeight-e.portRef.current.scrollTop>1;n(u=>u.above===c&&u.below===f?u:{above:c,below:f})},i=()=>{r.current===0&&(r.current=requestAnimationFrame(o))},a=c=>{e.onScroll?.(),i()};return I(()=>{if(!e.ready||e.portRef.current===null)return;let c=new ResizeObserver(i);c.observe(e.portRef.current),e.portRef.current.firstElementChild!==null&&c.observe(e.portRef.current.firstElementChild);let f=!0;return addEventListener("pageshow",i),e.portRef.current.isConnected?o():queueMicrotask(()=>{f&&o()}),()=>{f=!1,c.disconnect(),removeEventListener("pageshow",i),cancelAnimationFrame(r.current),r.current=0}},[e.portRef,e.ready]),I(()=>{e.ready&&e.portRef.current?.isConnected&&o()},[e.children,e.ready]),g("div",{ref:e.ready?e.portRef:void 0,className:x("wg_navigation__scroll",e.kind==="documents"&&"wg_navigation__documents",e.kind==="outline"&&"wg_navigation__headings",e.ready&&"wg_navigation__scroll--ready",e.ready&&t.above&&"wg_navigation__scroll--above",e.ready&&t.below&&"wg_navigation__scroll--below"),"data-navigation-scroll":e.kind,onClick:e.onClick,onScroll:a,children:e.children})};var yt=e=>{if(!e)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch(t){if(t instanceof URIError)return null;throw t}};var ho=e=>{let[t,n]=O();return I(()=>{let o=e.groups.flatMap(f=>f.sections).flatMap(f=>[f.heading,...f.subs.map(u=>u.heading)]),i={id:0},a=()=>{i.id=0;let f=o.flatMap(u=>{let p=yt(`#${u.slug}`);return p?.checkVisibility()?[{slug:u.slug,top:p.getBoundingClientRect().top-Number.parseFloat(getComputedStyle(p).scrollMarginTop)}]:[]});n(f.findLast(u=>u.top<=1)?.slug??f[0]?.slug)},c=()=>{i.id===0&&(i.id=requestAnimationFrame(a))};return addEventListener("scroll",c,{passive:!0}),addEventListener("resize",c),addEventListener("toggle",c,!0),addEventListener("pageshow",c),document.addEventListener("DOMContentLoaded",c),document.readyState!=="loading"&&a(),()=>{cancelAnimationFrame(i.id),removeEventListener("scroll",c),removeEventListener("resize",c),removeEventListener("toggle",c,!0),removeEventListener("pageshow",c),document.removeEventListener("DOMContentLoaded",c)}},[e.groups]),g("nav",{className:x("wg_navigationToc__root"),"aria-label":dn,children:[g("div",{className:x("wg_navigationToc__label"),children:dn}),e.groups.map(r=>g("div",{className:x("wg_navigationToc__groupSection",{"wg_navigationToc__groupSection--named":r.part!==void 0}),children:[r.part!==void 0&&g("div",{className:x("wg_navigationToc__group"),children:r.part}),g("ul",{className:x("wg_navigationToc__list"),children:r.sections.map(o=>g("li",{className:x("wg_navigationToc__item"),children:[g("a",{className:x("wg_navigationToc__link",{"wg_navigationToc__link--active":o.heading.slug===t}),href:`#${o.heading.slug}`,"data-toc-link":"","aria-current":o.heading.slug===t?"location":void 0,children:o.heading.text}),o.subs.length>0&&g("ul",{className:x("wg_navigationToc__sub"),children:o.subs.map(i=>g("li",{className:x("wg_navigationToc__subItem"),children:g("a",{className:x("wg_navigationToc__subLink",{"wg_navigationToc__subLink--active":i.heading.slug===t}),href:`#${i.heading.slug}`,"data-toc-sub-link":"","aria-current":i.heading.slug===t?"location":void 0,children:i.heading.text})},i.heading.slug))})]},o.heading.slug))})]},r.sections[0].heading.slug))]})};var xt="for-humanity:navigation-scroll";var bt=e=>{let t=r=>{if(!(typeof r!="object"||r===null||!("navigation"in r)||typeof r.navigation!="string"||!("pathname"in r)||typeof r.pathname!="string"||!("documents"in r)||typeof r.documents!="number"||!Number.isFinite(r.documents)||r.documents<0||!("outline"in r)||typeof r.outline!="number"||!Number.isFinite(r.outline)||r.outline<0))return{navigation:r.navigation,pathname:r.pathname,documents:r.documents,outline:r.outline}};if(typeof e!="object"||e===null||!("positions"in e)||typeof e.positions!="object"||e.positions===null)return{positions:{}};let n={wide:t("wide"in e.positions?e.positions.wide:void 0),desktop:t("desktop"in e.positions?e.positions.desktop:void 0),drawer:t("drawer"in e.positions?e.positions.drawer:void 0)};return{positions:Object.fromEntries(Object.entries(n).filter(r=>r[1]!==void 0))}};var ge=e=>{let t=yt(e);for(let n=t?.closest("details");n;n=n.parentElement?.closest("details"))n.open=!0;return t};var go=e=>{let[t,n]=O(()=>e.stores===void 0?"desktop":matchMedia(fn).matches?"drawer":matchMedia(pn).matches?"wide":"desktop"),[r,o]=O(!1),i=E(null),a=E(null),c=E(null),f=E(null),u=E(null),p=E(null),s=E(null),l=E(null),d=E(null),m=E(null),h=E(t),_=E(null),z=E(!0),w=()=>d.current===null||m.current===null?h.current:d.current.matches?"drawer":m.current.matches?"wide":"desktop",A=()=>h.current==="drawer"?c.current:i.current,v=()=>h.current==="drawer"?f.current:a.current,$=()=>{let b=A();if(b!==null)return[...b.querySelectorAll(".wg_navigationNav__root a[href]")].map(Z=>`${Z.pathname}:${Z.textContent}`).join(`
39
+ `)},y=()=>{let b=v();if(e.stores===void 0||b===null||u.current===null||z.current||h.current!==w()||h.current==="drawer"&&p.current?.open!==!0)return;let Z=$();if(Z===void 0)return;let j={navigation:Z,pathname:location.pathname,documents:b.scrollTop,outline:u.current.scrollTop};e.stores.scroll.setState(K=>({positions:{...K.positions,[h.current]:j}}))},P=()=>{h.current=w();let b=v(),Z=A();if(e.stores===void 0||b===null||u.current===null||Z===null||h.current==="drawer"&&p.current?.open!==!0)return;let j=$();if(j===void 0)return;let K=e.stores.scroll.getState().positions[h.current];b.scrollTop=0,u.current.scrollTop=0,K===void 0?uo({key:xt,version:1,layout:h.current,toState:bt}):K.navigation===j&&(b.scrollTop=K.documents,K.pathname===location.pathname&&(u.current.scrollTop=K.outline)),Z.dataset.navigationLayout=h.current,z.current=!1,y(),b.dispatchEvent(new Event("scroll")),u.current.dispatchEvent(new Event("scroll"))},L=b=>{p.current?.open!==!0&&(document.body.classList.remove("wg_shell__root--drawerOpen"),o(!1))},ce=()=>{y(),p.current?.close(),document.body.classList.remove("wg_shell__root--drawerOpen"),o(!1)},Q=b=>{w()!=="drawer"||p.current===null||p.current.open||(p.current.showModal(),document.body.classList.add("wg_shell__root--drawerOpen"),o(!0),P())},ze=b=>{ce()},V=b=>{b.preventDefault(),ce()},We=b=>{if(p.current===null||b.target!==p.current)return;let Z=p.current.getBoundingClientRect();(b.clientX<Z.left||b.clientX>Z.right||b.clientY<Z.top||b.clientY>Z.bottom)&&ce()},Ge=b=>{if(y(),p.current?.open!==!0||b.defaultPrevented||b.button!==0||b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||!(b.target instanceof Element))return;let Z=b.target.closest("a[href]");if(!(!(Z instanceof HTMLAnchorElement)||Z.target!==""&&Z.target!=="_self"||Z.hasAttribute("download"))&&(ce(),Z.origin===location.origin&&Z.pathname===location.pathname&&Z.search===location.search&&Z.hash)){let j=ge(Z.hash);j!==null&&(j.tabIndex=-1,j.focus({preventScroll:!0}))}},ae=()=>{let b=w();b!==h.current&&(document.activeElement instanceof HTMLElement&&(_.current={navigation:document.activeElement.closest("[data-navigation]")!==null,drawer:document.activeElement===s.current||document.activeElement.closest("[data-navigation-drawer]")!==null,href:document.activeElement.getAttribute("href")}),b!=="drawer"&&ce(),z.current=!0,h.current=b,at(()=>n(b)))},yn=b=>{!b.persisted||e.stores===void 0||(z.current=!0,at(()=>e.stores?.scroll.persist.rehydrate()),ae(),P())};return I(()=>{if(e.stores!==void 0)return d.current=matchMedia(fn),m.current=matchMedia(pn),d.current.addEventListener("change",ae),m.current.addEventListener("change",ae),addEventListener("pagehide",y),addEventListener("pageshow",yn),()=>{d.current?.removeEventListener("change",ae),m.current?.removeEventListener("change",ae),d.current=null,m.current=null,removeEventListener("pagehide",y),removeEventListener("pageshow",yn),document.body.classList.remove("wg_shell__root--drawerOpen")}},[e.stores]),I(()=>{if(e.stores===void 0)return;let b=!0,Z=()=>{if(!b||(P(),_.current===null))return;let j=A();if(t==="drawer")_.current.navigation&&s.current?.focus({preventScroll:!0});else if(_.current.navigation&&j!==null){let K=_.current.href;[...j.querySelectorAll("a[href]")].find(So=>So.getAttribute("href")===K)?.focus({preventScroll:!0})}else _.current.drawer&&l.current?.focus({preventScroll:!0});_.current=null};return v()?.isConnected?Z():queueMicrotask(Z),()=>{b=!1}},[t,e.stores]),g(R,{children:[g("div",{className:x("wg_navigation__sidebar",e.stores!==void 0&&"wg_navigation__sidebar--navigationReady"),children:[g("div",{className:x("wg_navigation__brandRow"),children:[g("a",{ref:e.stores===void 0?void 0:l,className:x("wg_navigation__brand"),href:"/","aria-current":e.data.home?"page":void 0,children:e.data.title}),g("button",{ref:e.stores===void 0?void 0:s,className:x("wg_navigation__menuToggle",e.stores!==void 0&&t==="drawer"&&"wg_navigation__menuToggle--visible"),type:"button","aria-label":fo,"aria-controls":"fh-navigation-drawer","aria-expanded":String(r),"data-navigation-open":"",onClick:Q,children:g("svg",{className:x("wg_navigation__menuIcon"),viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:g("path",{d:"M4 6h16M4 12h16M4 18h16"})})})]}),t!=="drawer"&&g("div",{ref:e.stores===void 0?void 0:i,className:x("wg_navigation__navigation"),"data-navigation":"",children:g(vt,{portRef:a,kind:"documents",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:g(mn,{groups:e.data.groups})})})]}),g("aside",{className:x("wg_navigation__tocRail"),"data-navigation-rail":"",children:g("div",{className:x("wg_navigation__outline"),"data-navigation-outline":"",children:g(vt,{portRef:u,kind:"outline",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:e.data.outline.length>0&&g(ho,{groups:e.data.outline})})})}),g("dialog",{ref:e.stores===void 0?void 0:p,className:x("wg_navigation__drawer"),id:"fh-navigation-drawer","aria-labelledby":"fh-navigation-title","data-navigation-drawer":"",onClose:L,onCancel:V,onClick:We,children:[g("div",{className:x("wg_navigation__drawerHeader"),children:[g("h2",{className:x("wg_navigation__drawerTitle"),id:"fh-navigation-title",children:mo}),g("button",{className:x("wg_navigation__drawerClose"),type:"button","aria-label":po,"data-navigation-close":"",onClick:ze,children:g("svg",{className:x("wg_navigation__menuIcon"),viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:g("path",{d:"m6 6 12 12M18 6 6 18"})})})]}),g("div",{className:x("wg_navigation__drawerContent"),"data-navigation-content":"",children:t==="drawer"&&g("div",{ref:e.stores===void 0?void 0:c,className:x("wg_navigation__navigation"),"data-navigation":"",children:g(vt,{portRef:f,kind:"documents",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:g(mn,{groups:e.data.groups})})})})]})]})};var vo=e=>{let t=E(null),n=E(0),r=E(null),o=E(null),i=E(null),a=()=>{clearTimeout(n.current),n.current=0,r.current?.abort(),r.current=null,t.current?.classList.remove("wg_prose__headingText--highlighted"),t.current=null},c=m=>{m.target===document&&(clearTimeout(n.current),r.current?.abort(),r.current=null,n.current=window.setTimeout(a,3e3))},f=m=>{a(),t.current=m===null?null:m.querySelector(".wg_prose__headingText"),t.current!==null&&(t.current.classList.add("wg_prose__headingText--highlighted"),n.current=window.setTimeout(a,3e3),r.current=new AbortController,document.addEventListener("scrollend",c,{signal:r.current.signal}))},u=m=>{if(m.defaultPrevented||m.button!==0||m.metaKey||m.ctrlKey||m.shiftKey||m.altKey)return;let h=m.target instanceof Element?m.target.closest("a[href]"):null;if(h instanceof HTMLAnchorElement&&(h.target===""||h.target==="_self")&&!h.hasAttribute("download")&&h.origin===location.origin&&h.pathname===location.pathname&&h.search===location.search&&h.hash){let _=ge(h.hash);h.hash===location.hash&&f(_)}},p=()=>{let m=ge(location.hash);m?.scrollIntoView(),f(m)},s=()=>{i.current?.abort()},l=async()=>{let m=o.current,h=location.hash,_=ge(h);await document.fonts.ready,!(m===null||m.signal.aborted)&&(_!==null&&!i.current?.signal.aborted&&h===location.hash&&(_.scrollIntoView({behavior:"instant"}),f(_)),document.documentElement.style.removeProperty("scroll-behavior"))},d=()=>{ge(location.hash),document.readyState==="complete"&&l()};return I(()=>{let m=new AbortController;o.current=m,i.current=new AbortController,document.documentElement.style.scrollBehavior="auto",document.addEventListener("click",u,{signal:m.signal}),addEventListener("hashchange",p,{signal:m.signal}),addEventListener("load",l,{once:!0,signal:m.signal});for(let h of["wheel","touchmove","keydown","mousedown"])addEventListener(h,s,{once:!0,passive:!0,signal:m.signal});return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",d,{once:!0,signal:m.signal}):d(),()=>{m.abort(),o.current=null,i.current?.abort(),i.current=null,a(),document.documentElement.style.removeProperty("scroll-behavior")}},[]),nt(()=>{if(!e.reload||o.current===null)return;let m=new EventSource(io);return m.onmessage=()=>location.reload(),()=>m.close()},[e.reload]),g(R,{children:[g("div",{className:x("wg_shellControls__navigation"),children:g(go,{data:e.data,stores:e.stores})}),e.data.cursorFace&&g(ao,{ready:e.stores!==void 0})]})};function _n(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;let a=f=>f===null?null:JSON.parse(f,t?.reviver),c=(i=n.getItem(o))!=null?i:null;return c instanceof Promise?c.then(a):a(c)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t?.replacer)),removeItem:o=>n.removeItem(o)}}var gn=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(r){return gn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return gn(r)(n)}}}},us=(e,t)=>(n,r,o)=>{let i={storage:_n(()=>window.localStorage),partialize:_=>_,version:0,merge:(_,z)=>({...z,..._}),...t},a=!1,c=0,f=new Set,u=new Set,p=i.storage;if(!p)return e((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(..._)},r,o);let s=()=>{let _=i.partialize({...r()});return p.setItem(i.name,{state:_,version:i.version})},l=o.setState;o.setState=(_,z)=>(l(_,z),s());let d=e((..._)=>(n(..._),s()),r,o);o.getInitialState=()=>d;let m,h=()=>{var _,z;if(!p)return;let w=++c;a=!1,f.forEach(v=>{var $;return v(($=r())!=null?$:d)});let A=((z=i.onRehydrateStorage)==null?void 0:z.call(i,(_=r())!=null?_:d))||void 0;return gn(p.getItem.bind(p))(i.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==i.version){if(i.migrate){let $=i.migrate(v.state,v.version);return $ instanceof Promise?$.then(y=>[!0,y]):[!0,$]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var $;if(w!==c)return;let[y,P]=v;if(m=i.merge(P,($=r())!=null?$:d),n(m,!0),y)return s()}).then(()=>{w===c&&(A?.(r(),void 0),m=r(),a=!0,u.forEach(v=>v(m)))}).catch(v=>{w===c&&A?.(void 0,v)})};return o.persist={setOptions:_=>{i={...i,..._},_.storage&&(p=_.storage)},clearStorage:()=>{++c,p?.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:_=>(f.add(_),()=>{f.delete(_)}),onFinishHydration:_=>(u.add(_),()=>{u.delete(_)})},i.skipHydration||h(),m||d},yo=us;var xo=e=>{let t,n=new Set,r=(u,p)=>{let s=typeof u=="function"?u(t):u;if(!Object.is(s,t)){let l=t;t=p??(typeof s!="object"||s===null)?s:Object.assign({},t,s),n.forEach(d=>d(t,l))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>f,subscribe:u=>(n.add(u),()=>n.delete(u))},f=t=e(r,o,c);return c},bo=(e=>e?xo(e):xo);var wo=e=>{let t=n=>({getItem:r=>n().getItem(r),setItem:(r,o)=>{try{return n().setItem(r,o)}catch{}},removeItem:r=>{try{return n().removeItem(r)}catch{}}});return{scroll:bo()(yo(()=>({positions:{}}),{name:xt,version:1,storage:_n(()=>t(e.session)),merge:n=>bt(n),migrate:()=>({positions:{}})}))}};var vn=document.querySelector("[data-shell-browser-root]"),$o=document.getElementById("fh-navigation-data");if(vn!==null&&$o!==null)try{let e=JSON.parse($o.textContent),t=Fr.parse(e),n=wo({session:()=>sessionStorage});Jn(vn).render(g(vo,{data:t,stores:n,reload:vn.hasAttribute("data-shell-reload")}))}catch(e){console.error("for-humanity browser initialization failed",e)}})();
package/dist/cli.css CHANGED
@@ -106,7 +106,7 @@
106
106
  border-radius: var(--app-radius-inline);
107
107
  background: var(--app-color-code);
108
108
  color: var(--app-color-text-strong);
109
- font-family: var(--app-font-mono);
109
+ font-family: inherit;
110
110
  font-size: 1em;
111
111
  }
112
112
  & pre {
@@ -119,6 +119,7 @@
119
119
  font-family: var(--app-font-mono);
120
120
  font-size: var(--app-font-size-detail);
121
121
  line-height: var(--app-line-height-code);
122
+ letter-spacing: 0;
122
123
  }
123
124
  & pre code {
124
125
  padding: 0;
@@ -247,6 +248,7 @@
247
248
  overflow-x: auto;
248
249
  margin: var(--app-space-block) 0;
249
250
  padding: var(--app-space-block) 0;
251
+ letter-spacing: 0;
250
252
  & svg {
251
253
  display: block;
252
254
  max-width: 100%;
@@ -656,7 +658,7 @@
656
658
  scrollbar-color: auto;
657
659
  }
658
660
  }
659
- @media (width < 1536px) {
661
+ @media (width < 1360px) {
660
662
  .wg_navigation__tocRail {
661
663
  display: none;
662
664
  }
@@ -745,7 +747,8 @@
745
747
  "Monoplex KR",
746
748
  ui-monospace,
747
749
  monospace;
748
- --app-font-brand: "Architects Daughter", var(--app-font-mono);
750
+ --app-font-body: "IBM Plex Sans KR", var(--app-font-mono);
751
+ --app-font-brand: "Architects Daughter", var(--app-font-body);
749
752
  --app-font-size-group: 11px;
750
753
  --app-font-size-detail: 12px;
751
754
  --app-font-size-dense: 12px;
@@ -763,9 +766,10 @@
763
766
  --app-line-height-tight: 1.4;
764
767
  --app-line-height-code: 1.65;
765
768
  --app-line-height-body: 1.7;
769
+ --app-letter-spacing-body: -0.03em;
766
770
  --app-letter-spacing-brand: 0;
767
- --app-letter-spacing-heading: -0.01em;
768
- --app-letter-spacing-title: -0.015em;
771
+ --app-letter-spacing-heading: -0.04em;
772
+ --app-letter-spacing-title: -0.045em;
769
773
  --app-space-inline: 6px;
770
774
  --app-space-stack: 10px;
771
775
  --app-space-block: 14px;
@@ -779,9 +783,8 @@
779
783
  --app-space-gutter: 28px;
780
784
  --app-space-column: 32px;
781
785
  --app-space-sidebar-gap: 32px;
782
- --app-size-sidebar: 240px;
783
- --app-size-main: 900px;
784
- --app-size-page: calc(var(--app-size-main) + (var(--app-size-sidebar) + var(--app-space-sidebar-gap) + var(--app-space-gutter)) * 2);
786
+ --app-size-sidebar: 200px;
787
+ --app-size-page: 1920px;
785
788
  --app-size-brand: calc(var(--app-font-size-title) * var(--app-line-height-title) + var(--app-space-page-top) + var(--app-space-group));
786
789
  --app-size-mobile-header: 56px;
787
790
  --app-size-menu-button: 44px;
@@ -830,12 +833,13 @@
830
833
  max-width: var(--app-size-page);
831
834
  margin: 0 auto;
832
835
  padding: 0 var(--app-space-gutter);
833
- grid-template: "nav main outline" 1fr / calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap)) minmax(0, var(--app-size-main)) calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap));
836
+ grid-template: "nav main outline" 1fr / calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap)) minmax(0, 1fr) calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap));
834
837
  background: var(--app-color-ground);
835
838
  color: var(--app-color-text);
836
- font-family: var(--app-font-mono);
839
+ font-family: var(--app-font-body);
837
840
  font-size: var(--app-font-size-body);
838
841
  line-height: var(--app-line-height-body);
842
+ letter-spacing: var(--app-letter-spacing-body);
839
843
  word-break: keep-all;
840
844
  overflow-wrap: break-word;
841
845
  text-wrap: pretty;
@@ -850,19 +854,17 @@
850
854
  .wg_shell__main {
851
855
  grid-area: main;
852
856
  min-width: 0;
853
- max-width: var(--app-size-main);
854
857
  border-inline: 1px solid var(--app-color-border-layout);
855
858
  padding-block: var(--app-size-brand) calc(100vh - var(--app-space-anchor));
856
859
  padding-inline: var(--app-space-column);
857
860
  }
858
- @media (width < 1536px) {
861
+ @media (width < 1360px) {
859
862
  .wg_shell__root {
860
- grid-template: "nav main ." 1fr / calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap)) minmax(0, var(--app-size-main)) minmax(0, 1fr);
863
+ grid-template: "nav main" 1fr / calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap)) minmax(0, 1fr);
861
864
  }
862
865
  }
863
866
  @media (width < 1024px) {
864
867
  .wg_shell__root {
865
- max-width: calc(var(--app-size-main) + var(--app-space-gutter) * 2);
866
868
  grid-template: "nav" auto "main" 1fr / minmax(0, 1fr);
867
869
  }
868
870
  .wg_shell__main {
package/dist/cli.js CHANGED
@@ -67,6 +67,7 @@ var copy_error_asset = "\uC790\uC6D0\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uB2E4
67
67
 
68
68
  // src/constant/font.ts
69
69
  var font_mono_css = "src/asset/font/monoplex-kr/monoplex-kr.css";
70
+ var font_body_css = "src/asset/font/ibm-plex-sans-kr/ibm-plex-sans-kr.css";
70
71
  var font_brand_css = "src/asset/font/architects-daughter/architects-daughter.css";
71
72
  var font_display_strategy = "optional";
72
73
  var font_hash_length = 12;
@@ -75,12 +76,14 @@ var font_cache_control = "public, max-age=31536000, immutable";
75
76
  // src/constant/site.ts
76
77
  var site_config_absent = {};
77
78
  var site_navigation_default = [];
79
+ var site_port_default = 4321;
80
+ var site_port_min = 1;
81
+ var site_port_max = 65535;
78
82
 
79
83
  // src/entry/cli/_constant/cli.ts
80
84
  var cli_default_command = "dev";
81
85
  var cli_default_docs_dir = ".";
82
86
  var cli_config_file_name = "for-humanity.config.mjs";
83
- var cli_dev_port = 4321;
84
87
  var cli_reload_delay_ms = 150;
85
88
 
86
89
  // src/entry/cli/_constant/crawling.ts
@@ -217,7 +220,8 @@ var toNavigationData = (options) => ({
217
220
  title: options.site.title,
218
221
  groups: toDocGroups({ docs: options.docs, navigation: options.site.navigation }).map((group) => toNavigationGroup({ group, current: options.current })),
219
222
  outline: options.outline === void 0 ? [] : toTocGroups(options.outline),
220
- home: options.current === void 0
223
+ home: options.current === void 0,
224
+ cursorFace: options.site.cursorFace
221
225
  });
222
226
 
223
227
  // src/component/widget/navigation/_function/to-navigation-json.ts
@@ -342,7 +346,7 @@ import { flushSync } from "hono/jsx/dom";
342
346
 
343
347
  // src/component/widget/navigation/_constant/navigation.ts
344
348
  var navigation_mobile_query = "(width < 1024px)";
345
- var navigation_wide_query = "(width >= 1536px)";
349
+ var navigation_wide_query = "(width >= 1360px)";
346
350
 
347
351
  // src/component/widget/navigation/_function/restore-navigation-scroll.ts
348
352
  var restoreNavigationScroll = (options) => {
@@ -954,7 +958,7 @@ var WgShellControls = (props) => {
954
958
  }, [props.reload]);
955
959
  return /* @__PURE__ */ jsxs6(Fragment3, { children: [
956
960
  /* @__PURE__ */ jsx8("div", { className: clsx8("wg_shellControls__navigation"), children: /* @__PURE__ */ jsx8(WgNavigation, { data: props.data, stores: props.stores }) }),
957
- /* @__PURE__ */ jsx8(WgCursorFace, { ready: props.stores !== void 0 })
961
+ props.data.cursorFace && /* @__PURE__ */ jsx8(WgCursorFace, { ready: props.stores !== void 0 })
958
962
  ] });
959
963
  };
960
964
 
@@ -1944,6 +1948,14 @@ var siteConfigSchema = z3.object({
1944
1948
  * 공개 사이트 루트 URL · 지정할 때만 robots.txt와 sitemap.xml 생성
1945
1949
  */
1946
1950
  url: z3.url({ protocol: /^https?$/ }).transform((value) => new URL(value)).refine((value) => value.username === "" && value.password === "" && value.pathname === "/" && value.search === "" && value.hash === "", copy_error_site_url).transform((value) => value.origin).optional(),
1951
+ /**
1952
+ * dev·preview 서버 포트 · 같은 기계에서 문서 프로젝트 둘을 나란히 띄울 때 한쪽에 지정
1953
+ */
1954
+ port: z3.int().min(site_port_min).max(site_port_max).default(site_port_default),
1955
+ /**
1956
+ * 데스크톱 커서 옆 픽셀 얼굴 · 기본 꺼짐 · favicon 은 설정과 무관
1957
+ */
1958
+ cursorFace: z3.boolean().default(false),
1947
1959
  /**
1948
1960
  * 탐색 묶음 경로의 읽는 순서 · 미지정 형제 묶음은 뒤에서 이름순
1949
1961
  */
@@ -2032,6 +2044,12 @@ var main = async () => {
2032
2044
  const kitRoot = fileURLToPath(new URL("../", import.meta.url));
2033
2045
  const docsRoot = resolve3(docsDir);
2034
2046
  const outDir = join4(docsRoot, "dist");
2047
+ const configFile = join4(docsRoot, cli_config_file_name);
2048
+ const parsedConfig = siteConfigSchema.safeParse(existsSync3(configFile) ? (await import(pathToFileURL(configFile).href)).default : site_config_absent);
2049
+ if (!parsedConfig.success) {
2050
+ throw new Error(`${copy_error_config}: ${parsedConfig.error.issues.map((issue) => `${issue.path.join(".")} ${issue.message}`).join(", ")}`);
2051
+ }
2052
+ const siteConfig = parsedConfig.data;
2035
2053
  if (command === "preview") {
2036
2054
  const app2 = new Hono4();
2037
2055
  app2.use(
@@ -2045,21 +2063,22 @@ var main = async () => {
2045
2063
  }
2046
2064
  })
2047
2065
  );
2048
- serve({ fetch: app2.fetch, port: cli_dev_port }, (info) => console.log(`http://localhost:${info.port}/`));
2066
+ serve({ fetch: app2.fetch, port: siteConfig.port }, (info) => console.log(`http://localhost:${info.port}/`));
2049
2067
  return;
2050
2068
  }
2051
- const configFile = join4(docsRoot, cli_config_file_name);
2052
- const parsedConfig = siteConfigSchema.safeParse(existsSync3(configFile) ? (await import(pathToFileURL(configFile).href)).default : site_config_absent);
2053
- if (!parsedConfig.success) {
2054
- throw new Error(`${copy_error_config}: ${parsedConfig.error.issues.map((issue) => `${issue.path.join(".")} ${issue.message}`).join(", ")}`);
2055
- }
2056
- const siteConfig = parsedConfig.data;
2057
2069
  const mono = toFontCss({ css: join4(kitRoot, font_mono_css), fontDir: asset_font_dir });
2070
+ const body = toFontCss({ css: join4(kitRoot, font_body_css), fontDir: asset_font_dir });
2058
2071
  const brand = toFontCss({ css: join4(kitRoot, font_brand_css), fontDir: asset_font_dir });
2059
- const fontCss = [mono.css, brand.css].join("\n");
2072
+ const fontCss = [mono.css, body.css, brand.css].join("\n");
2060
2073
  const stylePath = toAssetPath({ path: asset_style_path, file: join4(kitRoot, "dist/cli.css") });
2061
2074
  const browserScript = readFileSync3(join4(kitRoot, "dist/browser.js"), "utf8");
2062
- const kitFiles = new Map([[stylePath, join4(kitRoot, "dist/cli.css")], [asset_favicon_path, join4(kitRoot, "src/asset/favicon.svg")], ...mono.files, ...brand.files]);
2075
+ const kitFiles = new Map([
2076
+ [stylePath, join4(kitRoot, "dist/cli.css")],
2077
+ [asset_favicon_path, join4(kitRoot, "src/asset/favicon.svg")],
2078
+ ...mono.files,
2079
+ ...body.files,
2080
+ ...brand.files
2081
+ ]);
2063
2082
  const files = new Map(kitFiles);
2064
2083
  const processor = createProcessor({ site: siteConfig, root: docsRoot, files });
2065
2084
  const [docs, home] = await Promise.all([
@@ -2071,7 +2090,7 @@ var main = async () => {
2071
2090
  const app = createApp({
2072
2091
  site: siteConfig,
2073
2092
  store,
2074
- assets: { stylePath, browserScript, fontCss, preload: [...brand.files.keys(), ...mono.files.keys()], reload: command === "dev" }
2093
+ assets: { stylePath, browserScript, fontCss, preload: [...brand.files.keys(), ...mono.files.keys(), ...body.files.keys()], reload: command === "dev" }
2075
2094
  });
2076
2095
  if (command === "build") {
2077
2096
  await rm(outDir, { recursive: true, force: true });
@@ -2094,7 +2113,7 @@ var main = async () => {
2094
2113
  }
2095
2114
  const reload = new EventEmitter();
2096
2115
  let generation = 0;
2097
- serve({ fetch: createDevApp({ pages: app, crawling, files, reload }).fetch, port: cli_dev_port }, (info) => console.log(`http://localhost:${info.port}/`));
2116
+ serve({ fetch: createDevApp({ pages: app, crawling, files, reload }).fetch, port: siteConfig.port }, (info) => console.log(`http://localhost:${info.port}/`));
2098
2117
  const reloadDocs = debounce(
2099
2118
  toChangeQueue({
2100
2119
  run: async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "for-humanity",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Documents written for humans to read: a docs kit with a sidebar, parts, sections and flowcharts, built on Hono JSX",
5
5
  "keywords": [
6
6
  "docs",
@@ -0,0 +1,93 @@
1
+ Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+
5
+ This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,22 @@
1
+ /*
2
+ * IBM Plex Sans KR 1.003 · npm @ibm/plex-sans-kr 1.1.0 · https://github.com/IBM/plex
3
+ * 배포 WOFF2(fonts/complete/woff2/hinted) 원본 그대로 · 라이선스는 옆의 LICENSE.txt
4
+ * 본문의 한글 음절·호환 자모만 담당 · Monoplex KR 한글과 같은 글자의 원래 폭
5
+ */
6
+ @font-face {
7
+ font-family: "IBM Plex Sans KR";
8
+ font-style: normal;
9
+ font-display: swap;
10
+ font-weight: 400;
11
+ src: url(./IBMPlexSansKR-Regular.woff2) format("woff2");
12
+ unicode-range: U+3131-318E, U+AC00-D7A3;
13
+ }
14
+
15
+ @font-face {
16
+ font-family: "IBM Plex Sans KR";
17
+ font-style: normal;
18
+ font-display: swap;
19
+ font-weight: 600;
20
+ src: url(./IBMPlexSansKR-SemiBold.woff2) format("woff2");
21
+ unicode-range: U+3131-318E, U+AC00-D7A3;
22
+ }
@@ -29,4 +29,5 @@ export const navigationDataSchema: ZodMiniType<NavigationData> = object({
29
29
  }),
30
30
  ),
31
31
  home: boolean(),
32
+ cursorFace: boolean(),
32
33
  });
@@ -4,6 +4,6 @@
4
4
  export const navigation_mobile_query = "(width < 1024px)";
5
5
 
6
6
  /**
7
- * 양쪽 240px 탐색·본문 900px·간격 120px와 스크롤바가 들어가는 3열 기준
7
+ * 양쪽 200px 탐색·간격 120px·최소 800px 본문과 스크롤바가 들어가는 3열 기준
8
8
  */
9
- export const navigation_wide_query = "(width >= 1536px)";
9
+ export const navigation_wide_query = "(width >= 1360px)";
@@ -14,4 +14,5 @@ export const toNavigationData = (options: {site: SiteConfig; docs: Doc[]; curren
14
14
  groups: toDocGroups({docs: options.docs, navigation: options.site.navigation}).map((group) => toNavigationGroup({group, current: options.current})),
15
15
  outline: options.outline === undefined ? [] : toTocGroups(options.outline),
16
16
  home: options.current === undefined,
17
+ cursorFace: options.site.cursorFace,
17
18
  });
@@ -68,4 +68,8 @@ export interface NavigationData {
68
68
  * README 홈 여부
69
69
  */
70
70
  home: boolean;
71
+ /**
72
+ * 커서 옆 픽셀 얼굴 표시 여부 · 사이트 설정 `cursorFace`
73
+ */
74
+ cursorFace: boolean;
71
75
  }
@@ -242,7 +242,7 @@
242
242
  }
243
243
 
244
244
  /* 와이드 화면에서만 현재 문서 목차 표시 */
245
- @media (width < 1536px) {
245
+ @media (width < 1360px) {
246
246
  .wg_navigation__tocRail {
247
247
  display: none;
248
248
  }
@@ -135,7 +135,9 @@
135
135
  border-radius: var(--app-radius-inline);
136
136
  background: var(--app-color-code);
137
137
  color: var(--app-color-text-strong);
138
- font-family: var(--app-font-mono);
138
+
139
+ /* UA monospace 대신 부모 글꼴 · 문단은 본문 정책, 코드 블록은 pre의 고정폭·자간 0 */
140
+ font-family: inherit;
139
141
  font-size: 1em;
140
142
  }
141
143
 
@@ -150,6 +152,7 @@
150
152
  font-family: var(--app-font-mono);
151
153
  font-size: var(--app-font-size-detail);
152
154
  line-height: var(--app-line-height-code);
155
+ letter-spacing: 0;
153
156
  }
154
157
 
155
158
  & pre code {
@@ -320,6 +323,9 @@
320
323
  margin: var(--app-space-block) 0;
321
324
  padding: var(--app-space-block) 0;
322
325
 
326
+ /* 라벨 위치는 자간 0의 격자로 계산 */
327
+ letter-spacing: 0;
328
+
323
329
  /* stylelint-disable-next-line selector-disallowed-list -- 외부 렌더러 생성 SVG */
324
330
  & svg {
325
331
  display: block;
@@ -1,20 +1,18 @@
1
1
  /*
2
- * 넓은 화면은 같은 폭의 양쪽 탐색 · 좁은 화면은 문서 탐색만 표시
2
+ * 넓은 화면은 같은 폭의 양쪽 탐색 사이를 본문이 채움 · 좁은 화면은 문서 탐색만 표시
3
3
  */
4
4
  .wg_shell__root {
5
5
  display: grid;
6
6
  max-width: var(--app-size-page);
7
7
  margin: 0 auto;
8
8
  padding: 0 var(--app-space-gutter);
9
- grid-template: "nav main outline" 1fr / calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap)) minmax(0, var(--app-size-main)) calc(
10
- var(--app-size-sidebar) +
11
- var(--app-space-sidebar-gap)
12
- );
9
+ grid-template: "nav main outline" 1fr / calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap)) minmax(0, 1fr) calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap));
13
10
  background: var(--app-color-ground);
14
11
  color: var(--app-color-text);
15
- font-family: var(--app-font-mono);
12
+ font-family: var(--app-font-body);
16
13
  font-size: var(--app-font-size-body);
17
14
  line-height: var(--app-line-height-body);
15
+ letter-spacing: var(--app-letter-spacing-body);
18
16
 
19
17
  /* 한국어 낱말 단위 줄바꿈 · 긴 식별자만 예외 */
20
18
  word-break: keep-all;
@@ -35,7 +33,6 @@
35
33
  .wg_shell__main {
36
34
  grid-area: main;
37
35
  min-width: 0;
38
- max-width: var(--app-size-main);
39
36
  border-inline: 1px solid var(--app-color-border-layout);
40
37
 
41
38
  /* 문서 목록의 시작선 · 마지막 절도 읽는 선까지 이동 가능한 끝 여백 */
@@ -43,17 +40,16 @@
43
40
  padding-inline: var(--app-space-column);
44
41
  }
45
42
 
46
- /* 오른쪽 목차를 숨기는 화면에서 본문과 문서 목록의 간격 유지 */
47
- @media (width < 1536px) {
43
+ /* 본문 최소 약 800px을 남기도록 목차 숨김 · 본문이 오른쪽 여백까지 채움 */
44
+ @media (width < 1360px) {
48
45
  .wg_shell__root {
49
- grid-template: "nav main ." 1fr / calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap)) minmax(0, var(--app-size-main)) minmax(0, 1fr);
46
+ grid-template: "nav main" 1fr / calc(var(--app-size-sidebar) + var(--app-space-sidebar-gap)) minmax(0, 1fr);
50
47
  }
51
48
  }
52
49
 
53
50
  /* 모바일의 브랜드·본문은 한 열 배치 */
54
51
  @media (width < 1024px) {
55
52
  .wg_shell__root {
56
- max-width: calc(var(--app-size-main) + var(--app-space-gutter) * 2);
57
53
  grid-template:
58
54
  "nav" auto
59
55
  "main" 1fr / minmax(0, 1fr);
@@ -164,7 +164,7 @@ export const WgShellControls = (props: WgShellControlsProps) => {
164
164
  <div className={clsx("wg_shellControls__navigation")}>
165
165
  <WgNavigation data={props.data} stores={props.stores} />
166
166
  </div>
167
- <WgCursorFace ready={props.stores !== undefined} />
167
+ {props.data.cursorFace && <WgCursorFace ready={props.stores !== undefined} />}
168
168
  </Fragment>
169
169
  );
170
170
  };
@@ -4,10 +4,15 @@
4
4
  */
5
5
 
6
6
  /**
7
- * 본문·코드 글꼴 CSS · 패키지 기준 경로 · Regular·SemiBold 두 파일
7
+ * 본문 영문·코드·흐름도 글꼴 CSS · 패키지 기준 경로 · Regular·SemiBold 두 파일
8
8
  */
9
9
  export const font_mono_css = "src/asset/font/monoplex-kr/monoplex-kr.css";
10
10
 
11
+ /**
12
+ * 본문 한글 글꼴 CSS · IBM Plex Sans KR Regular·SemiBold · 한글 unicode-range
13
+ */
14
+ export const font_body_css = "src/asset/font/ibm-plex-sans-kr/ibm-plex-sans-kr.css";
15
+
11
16
  /**
12
17
  * 사이트 이름 글꼴 CSS · Architects Daughter Regular · 라틴 subset
13
18
  */
@@ -7,3 +7,18 @@ export const site_config_absent = {};
7
7
  * 탐색 순서 생략 시 모든 묶음을 이름순 배치
8
8
  */
9
9
  export const site_navigation_default: readonly string[] = [];
10
+
11
+ /**
12
+ * dev·preview 서버 기본 포트
13
+ */
14
+ export const site_port_default = 4321;
15
+
16
+ /**
17
+ * 포트 번호 하한 · TCP
18
+ */
19
+ export const site_port_min = 1;
20
+
21
+ /**
22
+ * 포트 번호 상한 · TCP
23
+ */
24
+ export const site_port_max = 65535;
@@ -13,11 +13,6 @@ export const cli_default_docs_dir = ".";
13
13
  */
14
14
  export const cli_config_file_name = "for-humanity.config.mjs";
15
15
 
16
- /**
17
- * dev·preview 공통 포트
18
- */
19
- export const cli_dev_port = 4321;
20
-
21
16
  /**
22
17
  * 연속 저장을 하나의 문서 갱신으로 합치는 대기 시간 · ms
23
18
  */
@@ -64,6 +64,21 @@ test("public site URL is opt-in and normalizes an HTTP(S) root URL", () => {
64
64
  assert.equal("url" in siteConfigSchema.parse({}), false);
65
65
  });
66
66
 
67
+ test("site port defaults to 4321 and accepts only integers in the TCP range", () => {
68
+ assert.equal(siteConfigSchema.parse({}).port, 4321);
69
+ assert.equal(siteConfigSchema.parse({port: 4322}).port, 4322);
70
+
71
+ for (const port of [0, 65536, 4321.5, "4321"]) {
72
+ assert.equal(siteConfigSchema.safeParse({port}).success, false, String(port));
73
+ }
74
+ });
75
+
76
+ test("cursor face is off unless the site turns it on", () => {
77
+ assert.equal(siteConfigSchema.parse({}).cursorFace, false);
78
+ assert.equal(siteConfigSchema.parse({cursorFace: true}).cursorFace, true);
79
+ assert.equal(siteConfigSchema.safeParse({cursorFace: "true"}).success, false);
80
+ });
81
+
67
82
  test("public site URL rejects unsupported protocols, credentials and non-root URLs", () => {
68
83
  for (const url of [
69
84
  "",
@@ -16,9 +16,9 @@ import {Hono} from "hono";
16
16
  import {toSSG} from "hono/ssg";
17
17
  import {asset_favicon_path, asset_font_dir, asset_media_extensions, asset_style_path} from "@/constant/asset";
18
18
  import {copy_error_config, copy_error_prefix, copy_error_unknown_command} from "@/constant/copy";
19
- import {font_brand_css, font_cache_control, font_mono_css} from "@/constant/font";
19
+ import {font_body_css, font_brand_css, font_cache_control, font_mono_css} from "@/constant/font";
20
20
  import {site_config_absent} from "@/constant/site";
21
- import {cli_config_file_name, cli_default_command, cli_default_docs_dir, cli_dev_port, cli_reload_delay_ms} from "@/entry/cli/_constant/cli";
21
+ import {cli_config_file_name, cli_default_command, cli_default_docs_dir, cli_reload_delay_ms} from "@/entry/cli/_constant/cli";
22
22
  import {crawling_reserved_roots} from "@/entry/cli/_constant/crawling";
23
23
  import {createApp} from "@/entry/cli/_function/create-app";
24
24
  import {createDevApp} from "@/entry/cli/_function/create-dev-app";
@@ -48,6 +48,14 @@ const main = async () => {
48
48
  const kitRoot = fileURLToPath(new URL("../", import.meta.url));
49
49
  const docsRoot = resolve(docsDir);
50
50
  const outDir = join(docsRoot, "dist");
51
+ const configFile = join(docsRoot, cli_config_file_name);
52
+ const parsedConfig = siteConfigSchema.safeParse(existsSync(configFile) ? (await import(pathToFileURL(configFile).href)).default : site_config_absent);
53
+
54
+ if (!parsedConfig.success) {
55
+ throw new Error(`${copy_error_config}: ${parsedConfig.error.issues.map((issue) => `${issue.path.join(".")} ${issue.message}`).join(", ")}`);
56
+ }
57
+
58
+ const siteConfig = parsedConfig.data;
51
59
 
52
60
  if (command === "preview") {
53
61
  const app = new Hono();
@@ -63,27 +71,26 @@ const main = async () => {
63
71
  },
64
72
  }),
65
73
  );
66
- serve({fetch: app.fetch, port: cli_dev_port}, (info) => console.log(`http://localhost:${info.port}/`));
74
+ serve({fetch: app.fetch, port: siteConfig.port}, (info) => console.log(`http://localhost:${info.port}/`));
67
75
 
68
76
  return;
69
77
  }
70
78
 
71
- const configFile = join(docsRoot, cli_config_file_name);
72
- const parsedConfig = siteConfigSchema.safeParse(existsSync(configFile) ? (await import(pathToFileURL(configFile).href)).default : site_config_absent);
73
-
74
- if (!parsedConfig.success) {
75
- throw new Error(`${copy_error_config}: ${parsedConfig.error.issues.map((issue) => `${issue.path.join(".")} ${issue.message}`).join(", ")}`);
76
- }
77
-
78
- const siteConfig = parsedConfig.data;
79
79
  // 내장 @font-face와 파일 수집 · font-family는 token.css 소유
80
80
  const mono = toFontCss({css: join(kitRoot, font_mono_css), fontDir: asset_font_dir});
81
+ const body = toFontCss({css: join(kitRoot, font_body_css), fontDir: asset_font_dir});
81
82
  const brand = toFontCss({css: join(kitRoot, font_brand_css), fontDir: asset_font_dir});
82
83
 
83
- const fontCss = [mono.css, brand.css].join("\n");
84
+ const fontCss = [mono.css, body.css, brand.css].join("\n");
84
85
  const stylePath = toAssetPath({path: asset_style_path, file: join(kitRoot, "dist/cli.css")});
85
86
  const browserScript = readFileSync(join(kitRoot, "dist/browser.js"), "utf8");
86
- const kitFiles = new Map([[stylePath, join(kitRoot, "dist/cli.css")], [asset_favicon_path, join(kitRoot, "src/asset/favicon.svg")], ...mono.files, ...brand.files]);
87
+ const kitFiles = new Map([
88
+ [stylePath, join(kitRoot, "dist/cli.css")],
89
+ [asset_favicon_path, join(kitRoot, "src/asset/favicon.svg")],
90
+ ...mono.files,
91
+ ...body.files,
92
+ ...brand.files,
93
+ ]);
87
94
  const files = new Map(kitFiles);
88
95
  const processor = createProcessor({site: siteConfig, root: docsRoot, files});
89
96
  const [docs, home] = await Promise.all([
@@ -95,7 +102,7 @@ const main = async () => {
95
102
  const app = createApp({
96
103
  site: siteConfig,
97
104
  store,
98
- assets: {stylePath, browserScript, fontCss, preload: [...brand.files.keys(), ...mono.files.keys()], reload: command === "dev"},
105
+ assets: {stylePath, browserScript, fontCss, preload: [...brand.files.keys(), ...mono.files.keys(), ...body.files.keys()], reload: command === "dev"},
99
106
  });
100
107
 
101
108
  if (command === "build") {
@@ -129,7 +136,7 @@ const main = async () => {
129
136
  const reload = new EventEmitter();
130
137
  let generation = 0;
131
138
 
132
- serve({fetch: createDevApp({pages: app, crawling, files, reload}).fetch, port: cli_dev_port}, (info) => console.log(`http://localhost:${info.port}/`));
139
+ serve({fetch: createDevApp({pages: app, crawling, files, reload}).fetch, port: siteConfig.port}, (info) => console.log(`http://localhost:${info.port}/`));
133
140
 
134
141
  /**
135
142
  * 갱신은 하나씩 실행 · 연속 저장 합치기 · 최신 변경만 적용
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * 공통 토큰의 단일 출처 · --app-종류-쓰임
3
3
  * 사용 기준: templates/document/design.md · 테마 분기는 color-scheme에 한정
4
- * 폭 기준 1536px·1024px·640px · 양쪽 탐색과 본문 배치
4
+ * 폭 기준 1360px·1024px·640px · 양쪽 탐색과 본문 배치
5
5
  */
6
6
 
7
7
  :root {
@@ -48,11 +48,13 @@
48
48
 
49
49
  /*
50
50
  * 내장 글꼴 · CLI는 @font-face와 자원 URL 생성
51
- * 본문·라벨·코드·흐름도 Monoplex KR · 사이트 이름 Architects Daughter
52
- * 영문 폭 0.528em = 흐름도 12px 격자의 6.336px · 한글은 정확히 2칸
51
+ * 본문·라벨·인라인 코드 한글 IBM Plex Sans KR·영문 Monoplex KR · 코드 블록·흐름도 Monoplex KR · 사이트 이름 Architects Daughter
52
+ * 영문 폭 0.528em = 흐름도 12px 격자의 6.336px · 코드 블록·흐름도의 한글은 정확히 2칸
53
+ * 본문 맨 앞의 IBM Plex Sans KR은 한글 unicode-range만 담당 · 영문·숫자·기호는 다음 순서의 Monoplex KR
53
54
  */
54
55
  --app-font-mono: "Monoplex KR", ui-monospace, monospace;
55
- --app-font-brand: "Architects Daughter", var(--app-font-mono);
56
+ --app-font-body: "IBM Plex Sans KR", var(--app-font-mono);
57
+ --app-font-brand: "Architects Daughter", var(--app-font-body);
56
58
 
57
59
  /* 글자 크기 · 11px 비상호작용 묶음 · 12px 기본과 역할별 제목 크기 */
58
60
  --app-font-size-group: 11px;
@@ -77,10 +79,11 @@
77
79
  --app-line-height-code: 1.65;
78
80
  --app-line-height-body: 1.7;
79
81
 
80
- /* 자간 · 사이트 이름은 기본 폭, 제목만 미세하게 조임 */
82
+ /* 자간 · 본문·라벨·인라인 코드를 조이고 제목은 그보다 조금 더 · 사이트 이름은 기본 폭 · 코드 블록·흐름도는 격자를 위해 0 */
83
+ --app-letter-spacing-body: -0.03em;
81
84
  --app-letter-spacing-brand: 0;
82
- --app-letter-spacing-heading: -0.01em;
83
- --app-letter-spacing-title: -0.015em;
85
+ --app-letter-spacing-heading: -0.04em;
86
+ --app-letter-spacing-title: -0.045em;
84
87
 
85
88
  /* 공통 간격 · margin·padding·gap의 리듬 · 단독 보정은 지역 값 */
86
89
  --app-space-inline: 6px;
@@ -100,9 +103,10 @@
100
103
  --app-space-gutter: 28px;
101
104
  --app-space-column: 32px;
102
105
  --app-space-sidebar-gap: 32px;
103
- --app-size-sidebar: 240px;
104
- --app-size-main: 900px;
105
- --app-size-page: calc(var(--app-size-main) + (var(--app-size-sidebar) + var(--app-space-sidebar-gap) + var(--app-space-gutter)) * 2);
106
+ --app-size-sidebar: 200px;
107
+
108
+ /* 페이지 최대 폭 · 본문은 사이드바·간격을 뺀 나머지 전체 */
109
+ --app-size-page: 1920px;
106
110
  --app-size-brand: calc(var(--app-font-size-title) * var(--app-line-height-title) + var(--app-space-page-top) + var(--app-space-group));
107
111
  --app-size-mobile-header: 56px;
108
112
  --app-size-menu-button: 44px;
@@ -1,6 +1,6 @@
1
1
  import {z} from "zod";
2
2
  import {copy_error_navigation_clash, copy_error_site_url, copy_site_title_default} from "@/constant/copy";
3
- import {site_navigation_default} from "@/constant/site";
3
+ import {site_navigation_default, site_port_default, site_port_max, site_port_min} from "@/constant/site";
4
4
  import {status_default_phrases, status_kind} from "@/constant/status";
5
5
  import {groupPathSchema} from "@/type/group-path";
6
6
 
@@ -26,6 +26,14 @@ export const siteConfigSchema = z.object({
26
26
  .refine((value) => value.username === "" && value.password === "" && value.pathname === "/" && value.search === "" && value.hash === "", copy_error_site_url)
27
27
  .transform((value) => value.origin)
28
28
  .optional(),
29
+ /**
30
+ * dev·preview 서버 포트 · 같은 기계에서 문서 프로젝트 둘을 나란히 띄울 때 한쪽에 지정
31
+ */
32
+ port: z.int().min(site_port_min).max(site_port_max).default(site_port_default),
33
+ /**
34
+ * 데스크톱 커서 옆 픽셀 얼굴 · 기본 꺼짐 · favicon 은 설정과 무관
35
+ */
36
+ cursorFace: z.boolean().default(false),
29
37
  /**
30
38
  * 탐색 묶음 경로의 읽는 순서 · 미지정 형제 묶음은 뒤에서 이름순
31
39
  */
@@ -4,11 +4,11 @@ import {tmpdir} from "node:os";
4
4
  import {join} from "node:path";
5
5
  import {test} from "node:test";
6
6
  import {asset_font_dir} from "@/constant/asset";
7
- import {font_brand_css, font_mono_css} from "@/constant/font";
7
+ import {font_body_css, font_brand_css, font_mono_css} from "@/constant/font";
8
8
  import {toFontCss} from "@/util/font/to-font-css";
9
9
 
10
10
  test("bundled fonts prevent a late swap after fallback text is visible", () => {
11
- for (const css of [font_mono_css, font_brand_css]) {
11
+ for (const css of [font_mono_css, font_body_css, font_brand_css]) {
12
12
  const result = toFontCss({css: join(process.cwd(), css), fontDir: asset_font_dir});
13
13
 
14
14
  assert.match(result.css, /font-display:\s*optional;/);