@infodb/p3 0.6.0 → 0.7.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/dist/web/assets/{TagInput-DkuISbfK.js → TagInput-cIIwXAHA.js} +1 -1
- package/dist/web/assets/{TaskDrawer-CysOMAjG.js → TaskDrawer-CSZ7Z0JC.js} +1 -1
- package/dist/web/assets/{_requestId-BQCwOAbs.js → _requestId-C8WYk2kC.js} +1 -1
- package/dist/web/assets/{_requestId-DgSOUH78.js → _requestId-Z3CBhTIL.js} +1 -1
- package/dist/web/assets/{board-BsntpZXP.js → board-DyfGX5h0.js} +1 -1
- package/dist/web/assets/{index-BTuEPzgc.js → index-Bt13tvIX.js} +2 -2
- package/dist/web/assets/{new-BwknRX3V.js → new-BRsIUNIb.js} +1 -1
- package/dist/web/assets/{release-notes-AgwbykyG.js → release-notes-C3FdiM36.js} +1 -1
- package/dist/web/assets/{routes-Bu3bhOaC.js → routes-QNgQHe48.js} +1 -1
- package/dist/web/assets/{settings-BkV8KeQk.js → settings-CoKJahEe.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/architecture.md +7 -1
- package/docs/development.md +1 -1
- package/docs/how-to-use.md +8 -2
- package/docs/installation.md +9 -6
- package/docs/publishing.md +3 -4
- package/lib/cli/project.js +1 -1
- package/lib/core/hierarchy.js +20 -0
- package/lib/core/store/collection.js +17 -6
- package/package.json +1 -1
- package/skills/p3/SKILL.md +7 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,G as n,d as r,f as i,g as a,l as o,lt as s,n as c,o as l,r as u,u as d,x as f}from"./appCtx-DCiGJFAe.js";import{c as p,n as m,r as h}from"./index-BTuEPzgc.js";var g=e(s(),1),_=(e,n,r)=>`${t()}/requests/${encodeURIComponent(e)}/preflight/${encodeURIComponent(n)}/ui/${encodeURIComponent(r)}`,v=(e,n)=>`${t()}/requests/${encodeURIComponent(e)}/attachments/${encodeURIComponent(n)}`,y=(e,n,r,i=!1)=>`${t()}/requests/${encodeURIComponent(e)}/preflight/${encodeURIComponent(n)}/attachments/${encodeURIComponent(r)}${i?`/extract`:``}`,b=e=>`draft-${e}`,x={proposal:`indigo`,current:`slate`,spec:`emerald`},S=e=>p[e];function C(e){let t=e.ui;return t?t.status===`generating`||e.status===`running`?{label:`評価中`,tone:`indigo`,message:`評価が終わると、画面イメージを取り込みます`}:t.status===`not_needed`?{label:`不要`,tone:`slate`,message:t.reason}:t.status===`ready`?{label:`そろっています`,tone:`emerald`}:{label:`足りません`,tone:`amber`,message:t.reason}:{label:`記録なし`,tone:`slate`,message:`以前の run なので、画面資料の記録がありません`}}function w(e){let t=e.ui;if(t&&t.status===`missing`&&t.needed===!0)return`画面イメージが足りないままです(${t.reason??`理由不明`})。タスク化する前に画像を確かめるか、メモで再評価してください`}function T(e){let t=[`proposal`,`current`,`spec`];return[...e].sort((e,n)=>t.indexOf(e.kind)-t.indexOf(n.kind))}var E=e=>e>=1048576?`${(e/1024/1024).toFixed(1)}MB`:`${Math.max(1,Math.ceil(e/1024))}KB`,D=e=>h[e.format],O=()=>({file:null,description:``,source:``,busy:!1,error:null});async function k(e,t){if(!e.file)return{...e,error:`ファイルを選んでください`};try{return await t({file:e.file,description:e.description,source:e.source}),O()}catch(t){return{...e,busy:!1,error:t.message}}}var A=`.png,.jpg,.jpeg,.xlsx,image/png,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`;function j(e){let t=e.toLowerCase().split(`.`).pop();return t===`png`?`png`:t===`jpg`||t===`jpeg`?`jpeg`:t===`xlsx`?`xlsx`:void 0}function M(e){let t=m,n=e.map(e=>{let n=j(e.name);if(!n)return`PNG / JPEG / xlsx だけ添付できます`;let r=n===`xlsx`?t.xlsxBytes:t.imageBytes;return e.size>r?`大きすぎます(上限 ${E(r)})`:void 0}),r=e.reduce((e,t)=>e+t.size,0),i=e.length>t.count?`添付は1つの要望に ${t.count} 件までです`:r>t.totalBytes?`添付の合計が上限(${E(t.totalBytes)})を超えます`:void 0;return{items:n,...i?{total:i}:{}}}async function N(e,t,n){let r=[];for(let[i,a]of e.entries()){try{await t({file:a.file,description:a.description,source:a.source})}catch(e){r.push({...a,error:e.message})}n?.(i+1)}return r}var P=new Map,F=e=>P.get(e)??[];function I(e,t){t.length?P.set(e,t):P.delete(e)}var L=n();function R({requestId:e,tick:t}){let[n,r]=(0,g.useState)(null),[s,p]=(0,g.useState)(null),[m,h]=(0,g.useState)(O),[_,y]=(0,g.useState)(null),[b,x]=(0,g.useState)(()=>F(e)),[S,C]=(0,g.useState)(null),w=(0,g.useRef)(null),T=t=>(x(t),I(e,t));async function j(t){C(t.key);try{await f.addAttachment(e,{file:t.file,description:t.description,source:t.source}),T(b.filter(e=>e.key!==t.key)),M()}catch(e){T(b.map(n=>n.key===t.key?{...n,error:e.message}:n))}finally{C(null)}}let M=()=>void f.attachments(e).then(e=>(r(e),p(null)),e=>p(`添付の一覧を取れません: ${e.message}`));(0,g.useEffect)(M,[e,t]),a(t=>{t.type===`changed`&&t.kind===`attachment`&&t.request===e&&M()});async function N(){h(e=>({...e,busy:!0,error:null}));let t=await k(m,t=>f.addAttachment(e,t));h(t),t.error||(w.current&&(w.current.value=``),M())}async function P(t){if(window.confirm(`${t.name} を外しますか?(実行済みの Preflight に固定した資料は残ります)`)){y(t.id);try{await f.removeAttachment(e,t.id),M()}catch(e){p(`外せませんでした: ${e.message}`)}finally{y(null)}}}let R=n?.items??[];return(0,L.jsx)(o,{title:`添付(次の Preflight に渡す)${R.length?` ${R.length}`:``}`,children:(0,L.jsxs)(`div`,{className:`space-y-3 rounded-lg bg-white p-4 ring-1 ring-slate-200 dark:bg-slate-900 dark:ring-slate-800`,children:[(0,L.jsxs)(`p`,{className:`text-sm text-slate-600 dark:text-slate-400`,children:[`Preflight を始めるときに、その時点の添付を run に固定して Codex に渡します。実行済みの run の資料は変わりません。 今の画面が要るときは、撮った画像を添付してください。PNG / JPEG / xlsx`,n?`(${n.limits.count} 件・合計 ${E(n.limits.totalBytes)} まで)`:``]}),R.length>0&&(0,L.jsx)(`ul`,{className:`divide-y divide-slate-100 dark:divide-slate-800`,children:R.map(t=>(0,L.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2 py-2`,children:[(0,L.jsx)(c,{children:D(t)}),(0,L.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:t.name}),(0,L.jsx)(`span`,{className:`min-w-0 break-words text-sm text-slate-500`,children:[t.description,t.source&&`出典: ${t.source}`,E(t.bytes),t.createdBy].filter(Boolean).join(` · `)}),(0,L.jsxs)(`span`,{className:`ml-auto flex gap-2`,children:[(0,L.jsx)(`a`,{href:v(e,t.id),className:d(`ghost`),...t.format===`xlsx`?{download:t.name}:{target:`_blank`,rel:`noreferrer`},children:`原本`}),(0,L.jsx)(u,{variant:`ghost`,disabled:_===t.id,onClick:()=>void P(t),children:`外す`})]})]},t.id))}),b.length>0&&(0,L.jsxs)(`div`,{role:`alert`,className:`space-y-2 rounded-md bg-amber-50 p-3 text-sm text-amber-900 dark:bg-amber-950 dark:text-amber-200`,children:[(0,L.jsx)(`p`,{className:`font-medium`,children:`作成時に添付できなかったファイルがあります(要望は作成済みです)`}),(0,L.jsx)(`ul`,{className:`space-y-1.5`,children:b.map(e=>(0,L.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:e.file.name}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.error?.replace(`${e.file.name}: `,``)}),(0,L.jsxs)(`span`,{className:`flex gap-2`,children:[(0,L.jsx)(u,{disabled:S===e.key,onClick:()=>void j(e),children:S===e.key?`添付中…`:`付け直す`}),(0,L.jsx)(u,{variant:`ghost`,onClick:()=>T(b.filter(t=>t.key!==e.key)),children:`やめる`})]})]},e.key))}),(0,L.jsx)(`p`,{className:`text-amber-800 dark:text-amber-300`,children:`この一覧はページを再読み込みすると消えます。そのときは下の欄から選び直してください`})]}),n?.invalid.map(e=>(0,L.jsxs)(`p`,{className:`text-sm text-rose-600`,children:[`読めない添付: `,e.id,`(`,e.error,`)`]},e.id)),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-1 text-sm sm:w-auto`,children:[(0,L.jsx)(`span`,{className:`text-slate-500`,children:`ファイル`}),(0,L.jsx)(l,{inputRef:w,accept:A,"aria-label":`添付するファイルを選ぶ`,chosen:m.file?.name??``,onChange:e=>h(t=>({...t,file:e.target.files?.[0]??null,error:null}))})]}),(0,L.jsxs)(`label`,{className:`flex min-w-40 flex-1 flex-col gap-1 text-sm sm:max-w-xs`,children:[(0,L.jsx)(`span`,{className:`text-slate-500`,children:`説明`}),(0,L.jsx)(`input`,{className:i,value:m.description,placeholder:`例: 今の一覧画面`,onChange:e=>h(t=>({...t,description:e.target.value}))})]}),(0,L.jsxs)(`label`,{className:`flex min-w-40 flex-1 flex-col gap-1 text-sm sm:max-w-xs`,children:[(0,L.jsx)(`span`,{className:`text-slate-500`,children:`出典`}),(0,L.jsx)(`input`,{className:i,value:m.source,placeholder:`例: 本番の画面`,onChange:e=>h(t=>({...t,source:e.target.value}))})]}),(0,L.jsx)(u,{variant:`primary`,disabled:!m.file||m.busy,onClick:()=>void N(),children:m.busy?`添付中…`:`添付する`})]}),m.error&&(0,L.jsxs)(`p`,{role:`alert`,className:`text-sm text-rose-600`,children:[`添付できませんでした: `,m.error,`(入力は残しています。直してもう一度押してください)`]}),s&&(0,L.jsx)(`p`,{className:`text-sm text-rose-600`,children:s})]})})}function z({items:e,onChange:t,check:n,disabled:r}){let i=(0,g.useRef)(0),a=(n,r)=>t(e.map(e=>e.key===n?{...e,...r}:e));return(0,L.jsxs)(`fieldset`,{className:`space-y-2`,disabled:r,children:[(0,L.jsx)(`legend`,{className:`text-sm font-medium text-slate-500 dark:text-slate-400`,children:`添付(任意。PNG / JPEG / xlsx。今の画面のスクリーンショットや仕様書など。Preflight に渡します)`}),e.length>0&&(0,L.jsx)(`ul`,{className:`divide-y divide-slate-100 rounded-lg bg-white px-3 ring-1 ring-slate-200 dark:divide-slate-800 dark:bg-slate-900 dark:ring-slate-800`,children:e.map((r,i)=>(0,L.jsxs)(`li`,{className:`space-y-2 py-2`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:r.file.name}),(0,L.jsx)(`span`,{className:`text-sm text-slate-500`,children:E(r.file.size)}),(0,L.jsx)(u,{variant:`ghost`,className:`ml-auto`,onClick:()=>t(e.filter(e=>e.key!==r.key)),children:`外す`})]}),n.items[i]&&(0,L.jsx)(`p`,{className:`text-sm text-rose-600`,children:n.items[i]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(`input`,{className:`w-full rounded-md border-0 bg-white px-2.5 py-1.5 text-base ring-1 ring-slate-300 ring-inset focus:ring-2 focus:ring-indigo-500 focus:outline-none dark:bg-slate-900 dark:ring-slate-700 min-w-0 flex-1`,"aria-label":`${r.file.name} の説明`,placeholder:`説明(例: 今の一覧画面)`,value:r.description,onChange:e=>a(r.key,{description:e.target.value})}),(0,L.jsx)(`input`,{className:`w-full rounded-md border-0 bg-white px-2.5 py-1.5 text-base ring-1 ring-slate-300 ring-inset focus:ring-2 focus:ring-indigo-500 focus:outline-none dark:bg-slate-900 dark:ring-slate-700 min-w-0 flex-1`,"aria-label":`${r.file.name} の出典`,placeholder:`出典(例: 本番の画面)`,value:r.source,onChange:e=>a(r.key,{source:e.target.value})})]})]},r.key))}),n.total&&(0,L.jsx)(`p`,{className:`text-sm text-rose-600`,children:n.total}),(0,L.jsx)(l,{label:e.length?`ファイルを追加`:`ファイルを選ぶ(複数可)`,multiple:!0,accept:A,"aria-label":`添付するファイルを選ぶ`,onChange:n=>{let r=[...n.target.files??[]].map(e=>({key:`f${++i.current}`,file:e,description:``,source:``}));t([...e,...r]),n.target.value=``}})]})}function B(e){return e.trim()||null}function V(e,t){let n=B(t);return n===null||e.includes(n)?e:[...e,n]}var H=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]);function U({tags:e,onChange:t,disabled:n,text:a,onText:o,id:s}){let[c,l]=(0,g.useState)(``),d=a??c,f=o??l,[p,m]=(0,g.useState)(null),h=()=>{let n=B(d);if(n!==null){if(e.includes(n))return m(`「${n}」は付いています`);m(null),t([...V(e,n)]),f(``)}};return(0,L.jsxs)(`div`,{className:`space-y-2`,children:[e.length>0&&(0,L.jsx)(`ul`,{className:`flex flex-wrap gap-1.5`,"aria-label":`付いているタグ`,children:e.map(r=>(0,L.jsxs)(`li`,{className:`inline-flex max-w-full items-start gap-1 rounded bg-slate-100 py-0.5 pr-0.5 pl-2 text-sm ring-1 ring-slate-200 ring-inset dark:bg-slate-800 dark:ring-slate-700`,children:[(0,L.jsx)(`span`,{className:`min-w-0 break-all whitespace-pre-wrap`,children:r}),(0,L.jsx)(`button`,{type:`button`,disabled:n,"aria-label":`タグ「${r}」を外す`,title:`外す`,onClick:()=>t(e.filter(e=>e!==r)),className:`shrink-0 rounded px-1 text-slate-500 hover:bg-slate-200 hover:text-slate-800 focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:outline-none disabled:opacity-50 dark:hover:bg-slate-700 dark:hover:text-slate-200`,children:`×`})]},r))}),(0,L.jsxs)(`div`,{className:`flex max-w-md gap-2`,children:[(0,L.jsx)(`input`,{id:s,className:r(i,`min-w-0 flex-1`),value:d,disabled:n,placeholder:`例: jira:PROJ-123、group:顧客A`,onChange:e=>(f(e.target.value),m(null)),onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),h())}}),(0,L.jsx)(u,{type:`button`,disabled:n||B(d)===null,onClick:h,children:`追加`})]}),p&&(0,L.jsx)(`p`,{role:`status`,className:`text-sm text-slate-500`,children:p})]})}export{C as _,z as a,b as c,S as d,_ as f,w as g,T as h,R as i,y as l,I as m,V as n,x as o,N as p,H as r,M as s,U as t,E as u};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,G as n,d as r,f as i,g as a,l as o,lt as s,n as c,o as l,r as u,u as d,x as f}from"./appCtx-DCiGJFAe.js";import{c as p,n as m,r as h}from"./index-Bt13tvIX.js";var g=e(s(),1),_=(e,n,r)=>`${t()}/requests/${encodeURIComponent(e)}/preflight/${encodeURIComponent(n)}/ui/${encodeURIComponent(r)}`,v=(e,n)=>`${t()}/requests/${encodeURIComponent(e)}/attachments/${encodeURIComponent(n)}`,y=(e,n,r,i=!1)=>`${t()}/requests/${encodeURIComponent(e)}/preflight/${encodeURIComponent(n)}/attachments/${encodeURIComponent(r)}${i?`/extract`:``}`,b=e=>`draft-${e}`,x={proposal:`indigo`,current:`slate`,spec:`emerald`},S=e=>p[e];function C(e){let t=e.ui;return t?t.status===`generating`||e.status===`running`?{label:`評価中`,tone:`indigo`,message:`評価が終わると、画面イメージを取り込みます`}:t.status===`not_needed`?{label:`不要`,tone:`slate`,message:t.reason}:t.status===`ready`?{label:`そろっています`,tone:`emerald`}:{label:`足りません`,tone:`amber`,message:t.reason}:{label:`記録なし`,tone:`slate`,message:`以前の run なので、画面資料の記録がありません`}}function w(e){let t=e.ui;if(t&&t.status===`missing`&&t.needed===!0)return`画面イメージが足りないままです(${t.reason??`理由不明`})。タスク化する前に画像を確かめるか、メモで再評価してください`}function T(e){let t=[`proposal`,`current`,`spec`];return[...e].sort((e,n)=>t.indexOf(e.kind)-t.indexOf(n.kind))}var E=e=>e>=1048576?`${(e/1024/1024).toFixed(1)}MB`:`${Math.max(1,Math.ceil(e/1024))}KB`,D=e=>h[e.format],O=()=>({file:null,description:``,source:``,busy:!1,error:null});async function k(e,t){if(!e.file)return{...e,error:`ファイルを選んでください`};try{return await t({file:e.file,description:e.description,source:e.source}),O()}catch(t){return{...e,busy:!1,error:t.message}}}var A=`.png,.jpg,.jpeg,.xlsx,image/png,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`;function j(e){let t=e.toLowerCase().split(`.`).pop();return t===`png`?`png`:t===`jpg`||t===`jpeg`?`jpeg`:t===`xlsx`?`xlsx`:void 0}function M(e){let t=m,n=e.map(e=>{let n=j(e.name);if(!n)return`PNG / JPEG / xlsx だけ添付できます`;let r=n===`xlsx`?t.xlsxBytes:t.imageBytes;return e.size>r?`大きすぎます(上限 ${E(r)})`:void 0}),r=e.reduce((e,t)=>e+t.size,0),i=e.length>t.count?`添付は1つの要望に ${t.count} 件までです`:r>t.totalBytes?`添付の合計が上限(${E(t.totalBytes)})を超えます`:void 0;return{items:n,...i?{total:i}:{}}}async function N(e,t,n){let r=[];for(let[i,a]of e.entries()){try{await t({file:a.file,description:a.description,source:a.source})}catch(e){r.push({...a,error:e.message})}n?.(i+1)}return r}var P=new Map,F=e=>P.get(e)??[];function I(e,t){t.length?P.set(e,t):P.delete(e)}var L=n();function R({requestId:e,tick:t}){let[n,r]=(0,g.useState)(null),[s,p]=(0,g.useState)(null),[m,h]=(0,g.useState)(O),[_,y]=(0,g.useState)(null),[b,x]=(0,g.useState)(()=>F(e)),[S,C]=(0,g.useState)(null),w=(0,g.useRef)(null),T=t=>(x(t),I(e,t));async function j(t){C(t.key);try{await f.addAttachment(e,{file:t.file,description:t.description,source:t.source}),T(b.filter(e=>e.key!==t.key)),M()}catch(e){T(b.map(n=>n.key===t.key?{...n,error:e.message}:n))}finally{C(null)}}let M=()=>void f.attachments(e).then(e=>(r(e),p(null)),e=>p(`添付の一覧を取れません: ${e.message}`));(0,g.useEffect)(M,[e,t]),a(t=>{t.type===`changed`&&t.kind===`attachment`&&t.request===e&&M()});async function N(){h(e=>({...e,busy:!0,error:null}));let t=await k(m,t=>f.addAttachment(e,t));h(t),t.error||(w.current&&(w.current.value=``),M())}async function P(t){if(window.confirm(`${t.name} を外しますか?(実行済みの Preflight に固定した資料は残ります)`)){y(t.id);try{await f.removeAttachment(e,t.id),M()}catch(e){p(`外せませんでした: ${e.message}`)}finally{y(null)}}}let R=n?.items??[];return(0,L.jsx)(o,{title:`添付(次の Preflight に渡す)${R.length?` ${R.length}`:``}`,children:(0,L.jsxs)(`div`,{className:`space-y-3 rounded-lg bg-white p-4 ring-1 ring-slate-200 dark:bg-slate-900 dark:ring-slate-800`,children:[(0,L.jsxs)(`p`,{className:`text-sm text-slate-600 dark:text-slate-400`,children:[`Preflight を始めるときに、その時点の添付を run に固定して Codex に渡します。実行済みの run の資料は変わりません。 今の画面が要るときは、撮った画像を添付してください。PNG / JPEG / xlsx`,n?`(${n.limits.count} 件・合計 ${E(n.limits.totalBytes)} まで)`:``]}),R.length>0&&(0,L.jsx)(`ul`,{className:`divide-y divide-slate-100 dark:divide-slate-800`,children:R.map(t=>(0,L.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2 py-2`,children:[(0,L.jsx)(c,{children:D(t)}),(0,L.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:t.name}),(0,L.jsx)(`span`,{className:`min-w-0 break-words text-sm text-slate-500`,children:[t.description,t.source&&`出典: ${t.source}`,E(t.bytes),t.createdBy].filter(Boolean).join(` · `)}),(0,L.jsxs)(`span`,{className:`ml-auto flex gap-2`,children:[(0,L.jsx)(`a`,{href:v(e,t.id),className:d(`ghost`),...t.format===`xlsx`?{download:t.name}:{target:`_blank`,rel:`noreferrer`},children:`原本`}),(0,L.jsx)(u,{variant:`ghost`,disabled:_===t.id,onClick:()=>void P(t),children:`外す`})]})]},t.id))}),b.length>0&&(0,L.jsxs)(`div`,{role:`alert`,className:`space-y-2 rounded-md bg-amber-50 p-3 text-sm text-amber-900 dark:bg-amber-950 dark:text-amber-200`,children:[(0,L.jsx)(`p`,{className:`font-medium`,children:`作成時に添付できなかったファイルがあります(要望は作成済みです)`}),(0,L.jsx)(`ul`,{className:`space-y-1.5`,children:b.map(e=>(0,L.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:e.file.name}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.error?.replace(`${e.file.name}: `,``)}),(0,L.jsxs)(`span`,{className:`flex gap-2`,children:[(0,L.jsx)(u,{disabled:S===e.key,onClick:()=>void j(e),children:S===e.key?`添付中…`:`付け直す`}),(0,L.jsx)(u,{variant:`ghost`,onClick:()=>T(b.filter(t=>t.key!==e.key)),children:`やめる`})]})]},e.key))}),(0,L.jsx)(`p`,{className:`text-amber-800 dark:text-amber-300`,children:`この一覧はページを再読み込みすると消えます。そのときは下の欄から選び直してください`})]}),n?.invalid.map(e=>(0,L.jsxs)(`p`,{className:`text-sm text-rose-600`,children:[`読めない添付: `,e.id,`(`,e.error,`)`]},e.id)),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-1 text-sm sm:w-auto`,children:[(0,L.jsx)(`span`,{className:`text-slate-500`,children:`ファイル`}),(0,L.jsx)(l,{inputRef:w,accept:A,"aria-label":`添付するファイルを選ぶ`,chosen:m.file?.name??``,onChange:e=>h(t=>({...t,file:e.target.files?.[0]??null,error:null}))})]}),(0,L.jsxs)(`label`,{className:`flex min-w-40 flex-1 flex-col gap-1 text-sm sm:max-w-xs`,children:[(0,L.jsx)(`span`,{className:`text-slate-500`,children:`説明`}),(0,L.jsx)(`input`,{className:i,value:m.description,placeholder:`例: 今の一覧画面`,onChange:e=>h(t=>({...t,description:e.target.value}))})]}),(0,L.jsxs)(`label`,{className:`flex min-w-40 flex-1 flex-col gap-1 text-sm sm:max-w-xs`,children:[(0,L.jsx)(`span`,{className:`text-slate-500`,children:`出典`}),(0,L.jsx)(`input`,{className:i,value:m.source,placeholder:`例: 本番の画面`,onChange:e=>h(t=>({...t,source:e.target.value}))})]}),(0,L.jsx)(u,{variant:`primary`,disabled:!m.file||m.busy,onClick:()=>void N(),children:m.busy?`添付中…`:`添付する`})]}),m.error&&(0,L.jsxs)(`p`,{role:`alert`,className:`text-sm text-rose-600`,children:[`添付できませんでした: `,m.error,`(入力は残しています。直してもう一度押してください)`]}),s&&(0,L.jsx)(`p`,{className:`text-sm text-rose-600`,children:s})]})})}function z({items:e,onChange:t,check:n,disabled:r}){let i=(0,g.useRef)(0),a=(n,r)=>t(e.map(e=>e.key===n?{...e,...r}:e));return(0,L.jsxs)(`fieldset`,{className:`space-y-2`,disabled:r,children:[(0,L.jsx)(`legend`,{className:`text-sm font-medium text-slate-500 dark:text-slate-400`,children:`添付(任意。PNG / JPEG / xlsx。今の画面のスクリーンショットや仕様書など。Preflight に渡します)`}),e.length>0&&(0,L.jsx)(`ul`,{className:`divide-y divide-slate-100 rounded-lg bg-white px-3 ring-1 ring-slate-200 dark:divide-slate-800 dark:bg-slate-900 dark:ring-slate-800`,children:e.map((r,i)=>(0,L.jsxs)(`li`,{className:`space-y-2 py-2`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:r.file.name}),(0,L.jsx)(`span`,{className:`text-sm text-slate-500`,children:E(r.file.size)}),(0,L.jsx)(u,{variant:`ghost`,className:`ml-auto`,onClick:()=>t(e.filter(e=>e.key!==r.key)),children:`外す`})]}),n.items[i]&&(0,L.jsx)(`p`,{className:`text-sm text-rose-600`,children:n.items[i]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(`input`,{className:`w-full rounded-md border-0 bg-white px-2.5 py-1.5 text-base ring-1 ring-slate-300 ring-inset focus:ring-2 focus:ring-indigo-500 focus:outline-none dark:bg-slate-900 dark:ring-slate-700 min-w-0 flex-1`,"aria-label":`${r.file.name} の説明`,placeholder:`説明(例: 今の一覧画面)`,value:r.description,onChange:e=>a(r.key,{description:e.target.value})}),(0,L.jsx)(`input`,{className:`w-full rounded-md border-0 bg-white px-2.5 py-1.5 text-base ring-1 ring-slate-300 ring-inset focus:ring-2 focus:ring-indigo-500 focus:outline-none dark:bg-slate-900 dark:ring-slate-700 min-w-0 flex-1`,"aria-label":`${r.file.name} の出典`,placeholder:`出典(例: 本番の画面)`,value:r.source,onChange:e=>a(r.key,{source:e.target.value})})]})]},r.key))}),n.total&&(0,L.jsx)(`p`,{className:`text-sm text-rose-600`,children:n.total}),(0,L.jsx)(l,{label:e.length?`ファイルを追加`:`ファイルを選ぶ(複数可)`,multiple:!0,accept:A,"aria-label":`添付するファイルを選ぶ`,onChange:n=>{let r=[...n.target.files??[]].map(e=>({key:`f${++i.current}`,file:e,description:``,source:``}));t([...e,...r]),n.target.value=``}})]})}function B(e){return e.trim()||null}function V(e,t){let n=B(t);return n===null||e.includes(n)?e:[...e,n]}var H=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]);function U({tags:e,onChange:t,disabled:n,text:a,onText:o,id:s}){let[c,l]=(0,g.useState)(``),d=a??c,f=o??l,[p,m]=(0,g.useState)(null),h=()=>{let n=B(d);if(n!==null){if(e.includes(n))return m(`「${n}」は付いています`);m(null),t([...V(e,n)]),f(``)}};return(0,L.jsxs)(`div`,{className:`space-y-2`,children:[e.length>0&&(0,L.jsx)(`ul`,{className:`flex flex-wrap gap-1.5`,"aria-label":`付いているタグ`,children:e.map(r=>(0,L.jsxs)(`li`,{className:`inline-flex max-w-full items-start gap-1 rounded bg-slate-100 py-0.5 pr-0.5 pl-2 text-sm ring-1 ring-slate-200 ring-inset dark:bg-slate-800 dark:ring-slate-700`,children:[(0,L.jsx)(`span`,{className:`min-w-0 break-all whitespace-pre-wrap`,children:r}),(0,L.jsx)(`button`,{type:`button`,disabled:n,"aria-label":`タグ「${r}」を外す`,title:`外す`,onClick:()=>t(e.filter(e=>e!==r)),className:`shrink-0 rounded px-1 text-slate-500 hover:bg-slate-200 hover:text-slate-800 focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:outline-none disabled:opacity-50 dark:hover:bg-slate-700 dark:hover:text-slate-200`,children:`×`})]},r))}),(0,L.jsxs)(`div`,{className:`flex max-w-md gap-2`,children:[(0,L.jsx)(`input`,{id:s,className:r(i,`min-w-0 flex-1`),value:d,disabled:n,placeholder:`例: jira:PROJ-123、group:顧客A`,onChange:e=>(f(e.target.value),m(null)),onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),h())}}),(0,L.jsx)(u,{type:`button`,disabled:n||B(d)===null,onClick:h,children:`追加`})]}),p&&(0,L.jsx)(`p`,{role:`status`,className:`text-sm text-slate-500`,children:p})]})}export{C as _,z as a,b as c,S as d,_ as f,w as g,T as h,R as i,y as l,I as m,V as n,x as o,N as p,H as r,M as s,U as t,E as u};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,G as n,O as r,_ as i,a,f as o,i as s,l as c,lt as l,r as u,s as d,v as f,x as p}from"./appCtx-DCiGJFAe.js";import{a as m,l as h,o as g}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,G as n,O as r,_ as i,a,f as o,i as s,l as c,lt as l,r as u,s as d,v as f,x as p}from"./appCtx-DCiGJFAe.js";import{a as m,l as h,o as g}from"./index-Bt13tvIX.js";import{r as _,t as v}from"./Outputs-CQi0oba1.js";import{a as y,n as b,r as x,s as S}from"./workTarget-Cijqq4yH.js";import{t as C}from"./format-DuK6P1hb.js";import{a as w,i as ee,n as T,o as E,r as D,t as O}from"./draft-CfJeyLOl.js";var k=e(l(),1);function A(e){return`T${String(e).padStart(3,`0`)}`}function j(e){let t=/^t?0*(\d+)$/i.exec(e.trim());return t?A(Number(t[1])):void 0}var M=n(),N=e=>({title:e.title,status:e.status,body:e.body,labels:e.labels.join(`, `),areas:e.areas.join(`, `),outputs:e.outputs.join(`
|
|
2
2
|
`),record:e.record??``}),P=e=>e.split(`,`).map(e=>e.trim()).filter(Boolean);function F({ctx:e,data:n,id:l,onClose:b}){let x=n.request.id,A=`${x}/${j(l)??l}`,[F,R]=(0,k.useState)(),[z,B]=(0,k.useState)([]),[V,H]=(0,k.useState)(),[U,W]=(0,k.useState)(!1),[G,K]=(0,k.useState)(null),te=(0,k.useRef)(f()),q=!!V&&ee(V,w);r(q);let J=async(e=!1,n=!1)=>{try{let t=await te.current.run(()=>p.task(A));if(t===i)return;R(t.task),B(t.superseded),W(!1);let r=N(t.task);H(i=>e||!i?T(r,t.task.rev):n&&w(i.base,r)?{...i,baseRev:t.task.rev,external:null}:E(i,r,t.task.rev,w))}catch(e){t(e)===`not_found`?W(!0):K(`最新の内容を読み込めませんでした(表示は前の内容のまま): ${e.message}`)}};if((0,k.useEffect)(()=>{H(void 0),W(!1),K(null),J(!0)},[A]),(0,k.useEffect)(()=>{F&&J()},[e.tick]),(0,k.useEffect)(()=>{let e=e=>e.key===`Escape`&&b();return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]),!F||!V)return null;let Y=V.value,X=e.info.project.repos.length>0,Z=(e,t)=>H(n=>n&&D(n,{...n.value,[e]:t})),ne=e=>n.tasks.find(t=>t.id===e)?.title??``,Q=[...F.relations.map(e=>({key:`out-${e.type}-${e.target}`,role:h(e.type,`out`),target:e.target})),...n.tasks.flatMap(e=>e.relations.filter(e=>e.target===F.id).map(t=>({key:`in-${t.type}-${e.id}`,role:h(t.type,`in`),target:e.id})))],$=t=>e.open(t);async function re(){if(U)return K(`このタスクは見つからないので保存しません。入力は残してあります`);try{let t=await p.patchTask(A,{...Y,labels:P(Y.labels),areas:P(Y.areas),outputs:Y.outputs.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(Boolean),record:Y.record.trim()||null,rev:V.baseRev});H(T(N(t),t.rev));let r=S(t);K(r?`警告: ${r}`:null),await J(),n.reload(),e.reload()}catch(e){t(e)===`rev_conflict`?(K(`競合: 他で更新されています。入力は残してあります。「破棄」で最新を表示します。`),J()):t(e)===`not_found`?W(!0):K(String(e.message))}}async function ie(){try{await p.patchTask(A,{checked:!F.checkedAt,rev:F.rev}),await J(!1,!0),n.reload(),e.reload()}catch(e){K(e.message)}}return(0,M.jsx)(`div`,{className:`fixed inset-0 z-40 flex justify-end bg-slate-900/20`,onClick:b,children:(0,M.jsxs)(`aside`,{onClick:e=>e.stopPropagation(),className:`flex h-full w-full max-w-2xl flex-col bg-white shadow-xl dark:bg-slate-900`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-slate-200 px-5 py-3 dark:border-slate-800`,children:[(0,M.jsx)(d,{id:F.id}),(0,M.jsxs)(`span`,{className:`text-sm text-slate-400`,children:[`rev `,F.rev,` · `,F.updatedBy??`?`]}),(0,M.jsxs)(`div`,{className:`ml-auto flex gap-2`,children:[q&&(0,M.jsx)(u,{variant:`ghost`,onClick:()=>(H(e=>e&&O(e)),K(null),void J()),children:`破棄`}),(0,M.jsx)(u,{variant:`primary`,disabled:!q||U,onClick:()=>void re(),children:`保存`}),(0,M.jsx)(u,{variant:`ghost`,onClick:b,children:`✕`})]})]}),U&&(0,M.jsx)(`div`,{role:`alert`,className:`bg-rose-50 px-5 py-2 text-rose-800 dark:bg-rose-950 dark:text-rose-300`,children:`このタスクは見つかりません(外で削除・アーカイブされました)。保存はしません。入力は残っているので、必要なら写してから閉じてください。`}),q&&V.external&&(0,M.jsxs)(`div`,{role:`status`,className:`bg-amber-50 px-5 py-2 text-amber-800 dark:bg-amber-950 dark:text-amber-300`,children:[`編集中に他で更新されました(rev `,V.external.rev,`)。このまま保存すると競合になります。入力を捨てて最新にするには「破棄」。`]}),G&&(0,M.jsx)(`div`,{className:`bg-amber-50 px-5 py-2 text-amber-800 dark:bg-amber-950 dark:text-amber-300`,children:G}),z.length>0&&F.status!==`done`&&(0,M.jsxs)(`div`,{className:`bg-rose-50 px-5 py-2 text-rose-800 dark:bg-rose-950 dark:text-rose-300`,children:[`このタスクは置き換えられています:`,` `,z.map((e,t)=>(0,M.jsxs)(`span`,{children:[t>0&&` / `,e.from===x?`要望の再評価`:(0,M.jsx)(`button`,{className:`font-mono underline`,onClick:()=>$(e.from),children:y(e,x)}),e.note?`(${e.note})`:``]},e.from)),`。着手する前に確かめ、不要ならアーカイブしてください。`]}),(0,M.jsxs)(`div`,{className:`flex-1 space-y-6 overflow-y-auto p-5`,children:[(0,M.jsx)(`input`,{className:`${o} text-lg font-semibold`,value:Y.title,onChange:e=>Z(`title`,e.target.value)}),(0,M.jsxs)(`div`,{className:`grid grid-cols-[1fr_2fr] items-end gap-3`,children:[(0,M.jsx)(a,{label:`ステータス`,children:(0,M.jsx)(`select`,{className:o,value:Y.status,onChange:e=>Z(`status`,e.target.value),children:m.map(e=>(0,M.jsx)(`option`,{value:e,children:g[e]},e))})}),(0,M.jsxs)(`dl`,{className:`grid grid-cols-3 gap-2 pb-1.5 text-sm`,title:`ステータスを変えたときに p3 が記録する日時`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`dt`,{className:`text-slate-500`,children:`作成`}),(0,M.jsx)(`dd`,{children:C(F.createdAt)})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`dt`,{className:`text-slate-500`,children:`作業中にした`}),(0,M.jsx)(`dd`,{children:C(F.startedAt)||`—`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`dt`,{className:`text-slate-500`,children:`完了にした`}),(0,M.jsx)(`dd`,{children:C(F.doneAt)||`—`})]})]})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,M.jsx)(a,{label:`ラベル (カンマ区切り)`,children:(0,M.jsx)(`input`,{className:o,value:Y.labels,onChange:e=>Z(`labels`,e.target.value)})}),(0,M.jsx)(a,{label:`影響領域 areas (カンマ区切り)`,children:(0,M.jsx)(`input`,{className:`${o} font-mono`,value:Y.areas,onChange:e=>Z(`areas`,e.target.value)})})]}),F.doneAt&&(0,M.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg bg-emerald-50 px-4 py-2.5 dark:bg-emerald-950/40`,children:[(0,M.jsx)(_,{checked:!!F.checkedAt}),(0,M.jsx)(`span`,{className:`flex-1`,children:F.checkedAt?`済み(${C(F.checkedAt)} に確認)`:`完了しています。成果物を確認したら済みにしてください`}),(0,M.jsx)(u,{variant:F.checkedAt?`ghost`:`primary`,onClick:()=>void ie(),children:F.checkedAt?`済みを外す`:`済みにする`})]}),X&&(0,M.jsx)(I,{ctx:e,data:n,task:F,disabled:U,onSaved:()=>(J(!1,!0),n.reload()),onError:K}),(0,M.jsxs)(c,{title:`成果物`,children:[F.outputs.length||F.repoOutputs?.length?(0,M.jsx)(v,{outputs:F.outputs,repoOutputs:F.repoOutputs}):(0,M.jsx)(`p`,{className:`text-sm text-slate-400`,children:`まだありません`}),X&&(0,M.jsx)(L,{ctx:e,task:F,disabled:U,onSaved:()=>(J(!1,!0),n.reload()),onError:K})]}),(0,M.jsx)(a,{label:`成果物を編集(1行に1つ。PR / MR の URL・文章・ドキュメントのパスを混ぜてよい。http(s) の URL はリンクになる)`,children:(0,M.jsx)(`textarea`,{rows:3,className:o,value:Y.outputs,onChange:e=>Z(`outputs`,e.target.value)})}),(0,M.jsx)(a,{label:`本文 (Markdown)`,children:(0,M.jsx)(`textarea`,{rows:6,className:`${o} font-mono`,value:Y.body,onChange:e=>Z(`body`,e.target.value)})}),(0,M.jsx)(a,{label:`変更の記録 (Markdown。完了したら: 何を変えたか・なぜ・入れた決まり・やめたもの)`,children:(0,M.jsx)(`textarea`,{rows:4,className:`${o} font-mono`,value:Y.record,placeholder:F.status===`done`?`まだ書かれていません`:`完了にするときに書きます`,onChange:e=>Z(`record`,e.target.value)})}),(0,M.jsx)(c,{title:`関係(Preflight のタスク化で張ったもの)`,children:Q.length===0?(0,M.jsx)(s,{children:`関係はありません`}):(0,M.jsx)(`ul`,{className:`space-y-1`,children:Q.map(e=>(0,M.jsxs)(`li`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`w-14 shrink-0 text-sm text-slate-500`,children:e.role}),(0,M.jsx)(d,{id:e.target,onClick:()=>$(`${x}/${e.target}`)}),(0,M.jsx)(`span`,{className:`min-w-0 truncate`,children:ne(e.target)})]},e.key))})}),(0,M.jsxs)(`p`,{className:`font-mono text-sm text-slate-400`,children:[e.info.dataDir,`/requests/`,x,`/tasks/`,F.id,`.md`]})]})]})})}function I({ctx:e,data:t,task:n,disabled:r,onSaved:i,onError:s}){let c=n.repo,l=c?x(t.request)[c]:void 0,u=async e=>{try{await p.patchTask(`${n.request}/${n.id}`,{repo:e===``?null:e,rev:n.rev}),i()}catch(e){s(e.message)}};return(0,M.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,M.jsx)(a,{label:`作業先(すぐ保存)`,children:(0,M.jsx)(`select`,{className:`${o} !w-56`,value:c??``,disabled:r,onChange:e=>void u(e.target.value),children:b(e.info.project,c).map(e=>(0,M.jsx)(`option`,{value:e.value,disabled:e.invalid,children:e.label},e.value))})}),(0,M.jsx)(`p`,{className:`pb-2 text-sm text-slate-500`,children:c?l?(0,M.jsxs)(M.Fragment,{children:[`ブランチ `,(0,M.jsx)(`code`,{className:`font-mono break-all`,children:l.branch})]}):`ブランチなし(git でないフォルダ・まだ割り当てていない)`:`作業先なし(調査・人の判断など)`})]})}function L({ctx:e,task:t,disabled:n,onSaved:r,onError:i}){let a=b(e.info.project,null).filter(e=>e.value!==``),[s,c]=(0,k.useState)(t.repo??a[0]?.value??``),[l,d]=(0,k.useState)(``),f=async e=>{try{await p.patchTask(`${t.request}/${t.id}`,{repoOutputs:e,rev:t.rev}),d(``),r()}catch(e){i(e.message)}},m=t.repoOutputs??[];return(0,M.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[m.length>0&&(0,M.jsx)(`ul`,{className:`flex flex-wrap gap-1.5`,"aria-label":`リポジトリごとの成果物`,children:m.map((e,t)=>(0,M.jsxs)(`li`,{className:`inline-flex max-w-full items-center gap-1 rounded bg-slate-100 py-0.5 pr-0.5 pl-2 text-sm dark:bg-slate-800`,children:[(0,M.jsxs)(`span`,{className:`min-w-0 break-all`,children:[e.repo,`: `,e.output]}),(0,M.jsx)(`button`,{type:`button`,disabled:n,"aria-label":`${e.repo} の成果物「${e.output}」を外す`,onClick:()=>void f(m.filter((e,n)=>n!==t)),className:`shrink-0 rounded px-1 text-slate-500 hover:bg-slate-200 dark:hover:bg-slate-700`,children:`×`})]},`${t}:${e.repo}:${e.output}`))}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(`select`,{className:`${o} !w-40`,value:s,disabled:n,"aria-label":`成果物のリポジトリ`,onChange:e=>c(e.target.value),children:a.map(e=>(0,M.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,M.jsx)(`input`,{className:`${o} min-w-0 flex-1`,value:l,disabled:n,placeholder:`リポジトリごとの成果物(PR の URL など)`,"aria-label":`リポジトリごとの成果物`,onChange:e=>d(e.target.value)}),(0,M.jsx)(u,{disabled:n||!s||!l.trim(),onClick:()=>void f([...m,{repo:s,output:l.trim()}]),children:`足す`})]})]})}export{F as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{C as r,G as i,O as a,_ as o,a as s,c,d as l,f as u,g as d,i as f,l as p,lt as m,n as h,p as g,r as _,s as v,t as y,u as b,v as x,x as S,y as C}from"./appCtx-DCiGJFAe.js";import{a as w}from"./preload-helper-B40dBmwL.js";import{d as T,i as E,l as D,r as O}from"./index-BTuEPzgc.js";import{n as k,t as A}from"./RequestStatus-grC0F_SQ.js";import{i as ee,n as j,r as M}from"./workTarget-Cijqq4yH.js";import{n as N,r as te}from"./requestData-w6fhCYmh.js";import{n as P,r as ne,t as F}from"./preflightInput-BAeEJYUK.js";import{i as I,n as L,r as re,s as ie,t as R}from"./draft-CfJeyLOl.js";import{t as ae}from"./progressTree-DgrdDFih.js";import{n as oe}from"./milestoneOrder-N7b5XFJP.js";import{n as se}from"./directTask-Dk3H5Q2B.js";import{t as ce}from"./action-CMjATXqv.js";import{_ as le,c as ue,d as de,f as fe,g as pe,h as me,i as he,l as ge,o as _e,r as ve,t as ye,u as be}from"./TagInput-DkuISbfK.js";var z=t(m(),1);function xe(e){let t=e.notes.filter(e=>e.pending).length;return`次の Preflight: ${e.previous?`前回 ${e.previous} の結果を引き継ぎます`:e.previousSkipped?`前回の結果は引き継ぎません(${e.previousSkipped})`:`最初の評価です`}。メモ ${t} 件を渡します。`}async function Se(e,t,n,r){let i=n.trim();if(!i)throw Error(`メモが空です`);if(!r)return{kind:`saved`,note:await e.addNote(t,i)};try{return{kind:`started`,run:await e.startPreflight(t,{note:i})}}catch(e){let t=e instanceof C?e.body.note:void 0;if(t)return{kind:`not-started`,note:t,error:e instanceof Error?e.message:String(e)};throw e}}function Ce(e){if(!e.hasHistory)return{mode:`intro`,canSaveAndRun:!1,canSaveOnly:!1,blockPlainRun:!1,hint:e.pending>0?`保存済みのメモ ${e.pending} 件を、最初の Preflight に渡します。`:void 0};let t=e.draft.trim()!==``;return{mode:`input`,canSaveAndRun:t&&!e.busy&&!e.running&&e.engineOk,canSaveOnly:t&&!e.busy,blockPlainRun:t,hint:e.running?`実行中です。ここで保存したメモは、実行中の評価ではなく次の Preflight に渡ります。`:e.engineOk?void 0:`評価エンジンが使えないため、メモの保存だけできます。`}}var we=e=>({name:`codex`,ok:!1,unknown:!0,detail:`Preflight のエンジンの状態を確かめられません(${e})。「再読み込み」でもう一度確かめます`});function Te(e){let[t,n]=(0,z.useState)(),r=(0,z.useRef)(x());return(0,z.useEffect)(()=>{let e=!0;return r.current.run(()=>S.engine()).then(t=>e&&t!==o&&n(t),t=>e&&n(we(t.message))),()=>{e=!1}},[e]),t}var Ee=`タイトルか本文が未保存です。保存するかキャンセルしてください`;function De(e){return[...e.title?[`タイトル`]:[],...e.body?[`本文`]:[]]}function Oe(e,t){if(!e||e.status===`same`)return null;let n=e.status===`changed`?`この評価のあとで要望の${F(e.changed)}が変わりました。`:`この評価が何を評価したか確かめられません(${e.reason??`不明`})。`;return t.done?{title:`表示中の評価は、今の要望とは違う内容に対するものです`,text:`${n}この評価からのタスク化は済んでいます(作ったタスクはそのまま残ります)。今の内容で見直すなら、もう一度 Preflight を実行してください。`}:{title:`表示中の評価と今の要望が違います`,text:`${n}古い評価からはタスク化できません。もう一度 Preflight を実行してください(既存のタスク・過去の評価・メモは残ります)。この評価のままタスク化するなら、要望を評価した時点の内容に戻してください。`}}function ke(e){return r(e)===`rev_conflict`?`置き換えられるタスクが他で更新されました。内容を確かめて、もう一度タスク化してください`:e.message}function Ae(e){return r(e)===`rev_conflict`?`保存できませんでした: 本文が他で更新されています。入力は残してあります。最新の本文を確かめて取り込んでください`:r(e)===`not_found`?`この要望は見つからないので保存しません。入力は残してあります(必要ならコピーしてください)`:`保存できませんでした: ${e.message}。入力は残してあります`}function je(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n||`(空)`}var Me=[`文脈選定`,`評価・細分化`,`レビュー`,`タスク化`];function Ne(e){let t=e.status===`running`?e.log.length>1?2:1:e.materialized?.length||e.adoption?.done?4:e.status===`completed`?3:2;return Me.map((n,r)=>{let i=r+1;return{label:n,state:i<t||i===t&&t===4?`done`:i===t?e.status===`failed`?`failed`:`current`:`todo`,current:i===t}})}var Pe={ok:`読んだ`,unregistered:`見ていない(このマシンのパスが未登録)`,missing:`見ていない(パスが無い)`,notdir:`見ていない(フォルダでない)`},Fe=e=>[e.repo&&e.file?`${e.repo}:${e.file}${e.location?` ${e.location}`:``}`:``,e.commit?`commit ${e.commit}`:``].filter(Boolean).join(` / `),Ie=e=>e?e.status===`ok`?`git の履歴あり`:e.status===`shallow`?`git の履歴は途中まで(${e.reason??`浅い clone`})`:`git の履歴なし(${e.reason??`不明`})`:``,B=i();function Le({scope:e,repos:t,evidence:n}){return(0,B.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,B.jsx)(p,{title:`調べた範囲(参照先)`,children:e?e.length?(0,B.jsx)(`ul`,{className:`space-y-2`,children:e.map(e=>{let n=t.find(t=>t.name===e.name);return(0,B.jsxs)(`li`,{className:`space-y-1 rounded-lg bg-white p-3 ring-1 ring-slate-200 dark:bg-slate-900 dark:ring-slate-800`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsx)(`span`,{className:`font-medium break-all`,children:e.name}),e.role&&(0,B.jsx)(`span`,{className:`text-sm text-slate-500`,children:e.role}),e.readFirst&&(0,B.jsx)(h,{tone:`indigo`,children:`最初に読む`}),(0,B.jsx)(h,{tone:e.status===`ok`?`emerald`:`rose`,children:Pe[e.status]}),e.history&&(0,B.jsx)(h,{tone:e.history.status===`ok`?`slate`:`amber`,title:e.history.reason,children:e.history.status===`ok`?`git の履歴あり`:e.history.status===`shallow`?`git の履歴は途中まで`:`git の履歴なし`})]}),e.history&&e.history.status!==`ok`&&(0,B.jsx)(`p`,{className:`text-sm break-words text-amber-700 dark:text-amber-400`,children:Ie(e.history)}),e.status!==`ok`&&(0,B.jsxs)(`p`,{className:`text-sm break-words text-rose-700 dark:text-rose-300`,children:[e.reason??Pe[e.status],`。中身は確かめていないので、関わる判断は推測です`]}),n&&n.map.length>0&&(0,B.jsxs)(`details`,{className:`text-sm`,children:[(0,B.jsx)(`summary`,{className:`cursor-pointer text-slate-500`,children:`主なフォルダ(今の設定)`}),(0,B.jsx)(`ul`,{className:`mt-1 space-y-0.5 pl-4`,children:n.map.map(e=>(0,B.jsxs)(`li`,{className:`break-words`,children:[(0,B.jsx)(`code`,{className:`font-mono break-all`,children:e.path}),` — `,e.role||`(役割なし)`,e.entry&&(0,B.jsxs)(B.Fragment,{children:[`(入口 `,(0,B.jsx)(`code`,{className:`font-mono break-all`,children:e.entry}),`)`]})]},e.path))})]})]},e.name)})}):(0,B.jsx)(`p`,{className:`text-sm text-slate-500`,children:`参照先なし`}):(0,B.jsx)(`p`,{className:`text-sm text-slate-500`,children:`記録なし(以前の評価)`})}),n!==null&&(0,B.jsx)(p,{title:`判断の根拠`,children:n===void 0?(0,B.jsx)(`p`,{className:`text-sm text-slate-500`,children:`記録なし(以前の評価)`}):n.length?(0,B.jsx)(`ul`,{className:`space-y-1.5`,children:n.map((e,t)=>(0,B.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,B.jsx)(h,{tone:e.kind===`verified`?`emerald`:`amber`,className:`mt-0.5`,children:e.kind===`verified`?`確かめた`:`推測`}),(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(`p`,{className:`break-words`,children:e.claim}),Fe(e)&&(0,B.jsx)(`p`,{className:l(`font-mono text-sm break-all`,e.kind===`verified`?`text-slate-500`:`text-slate-400`),children:Fe(e)}),e.note&&(0,B.jsxs)(`p`,{className:`text-sm text-amber-700 dark:text-amber-300`,children:[`※ `,e.note]})]})]},t))}):(0,B.jsx)(`p`,{className:`text-sm text-slate-500`,children:`なし`})})]})}function Re({requestId:e,run:t}){let n=le(t),r=me(t.ui?.items??[]),[i,a]=(0,z.useState)(null),o=(0,z.useRef)(null),s=e=>{a(e),o.current?.showModal()};return(0,B.jsxs)(p,{title:`画面資料`,aside:(0,B.jsx)(h,{tone:n.tone,children:n.label}),children:[(0,B.jsxs)(`div`,{className:`space-y-3`,children:[n.message&&(0,B.jsx)(`p`,{className:`break-words text-sm text-slate-600 dark:text-slate-400`,children:n.message}),t.ui?.verdictAdjusted&&(0,B.jsx)(`p`,{className:`rounded-md bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:bg-amber-950 dark:text-amber-300`,children:`必要な画面イメージが足りないので、判定を go から clarify にしました`}),r.length>0?(0,B.jsx)(`ul`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3`,children:r.map(n=>(0,B.jsxs)(`li`,{className:`flex min-w-0 flex-col overflow-hidden rounded-lg bg-white ring-1 ring-slate-200 dark:bg-slate-900 dark:ring-slate-800`,children:[(0,B.jsx)(`button`,{type:`button`,className:`block h-44 w-full overflow-hidden border-b border-slate-200 bg-slate-50 dark:border-slate-800 dark:bg-slate-950`,onClick:()=>s(n),"aria-label":`${n.title} を拡大`,children:(0,B.jsx)(`img`,{src:fe(e,t.id,n.id),alt:n.title,loading:`lazy`,className:`h-full w-full object-contain object-top`})}),(0,B.jsxs)(`div`,{className:`flex flex-1 flex-col gap-1.5 p-3 text-sm`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsx)(h,{tone:_e[n.kind],children:de(n.kind)}),(0,B.jsx)(`span`,{className:`min-w-0 break-words font-medium`,children:n.title})]}),(0,B.jsxs)(`p`,{className:`text-slate-500`,children:[n.drafts.length>0&&(0,B.jsxs)(B.Fragment,{children:[`対象`,` `,n.drafts.map(e=>(0,B.jsx)(`a`,{href:`#${ue(e)}`,className:`mr-1 font-mono text-indigo-600 underline dark:text-indigo-400`,children:e},e)),`·`,` `]}),n.viewport?`幅 ${n.viewport} · `:``,n.width,`x`,n.height,` · `,be(n.bytes)]}),n.source&&(0,B.jsxs)(`p`,{className:`break-words text-slate-500`,children:[`出典: `,n.source]}),n.assumptions.length>0&&(0,B.jsxs)(`p`,{className:`break-words text-slate-500`,children:[`前提: `,n.assumptions.join(` / `)]}),n.rendered&&(0,B.jsxs)(`p`,{className:`text-amber-700 dark:text-amber-400`,children:[`P3 が原稿から描いた画像です(Codex は画像を見ていません。読めるかを確かめてください)`,n.rendered.clipped?`。縦に長いので上から切っています`:``]}),n.kind===`proposal`&&(0,B.jsx)(`p`,{className:`text-slate-400`,children:`提案のイメージです(今の画面ではありません)`}),(0,B.jsxs)(`div`,{className:`mt-auto flex flex-wrap gap-2 pt-1`,children:[(0,B.jsx)(_,{onClick:()=>s(n),children:`拡大`}),(0,B.jsx)(`a`,{href:fe(e,t.id,n.id),target:`_blank`,rel:`noreferrer`,className:b(`ghost`),children:`画像を開く`})]})]})]},n.id))}):t.ui&&t.ui.status!==`generating`&&(0,B.jsx)(f,{children:`画像はありません`}),t.ui&&t.ui.problems.length>0&&(0,B.jsxs)(`details`,{className:`text-sm`,children:[(0,B.jsxs)(`summary`,{className:`cursor-pointer text-slate-500`,children:[`取り込めなかった資料 `,t.ui.problems.length,` 件`]}),(0,B.jsx)(`ul`,{className:`mt-1 list-disc space-y-0.5 pl-5 break-words text-slate-600 dark:text-slate-400`,children:t.ui.problems.map(e=>(0,B.jsx)(`li`,{children:e},e))})]}),(0,B.jsx)(ze,{requestId:e,run:t})]}),(0,B.jsx)(`dialog`,{ref:o,onClose:()=>a(null),className:`m-auto max-h-[95vh] w-[min(96vw,1400px)] max-w-none rounded-lg bg-white p-0 text-slate-900 backdrop:bg-black/60 dark:bg-slate-900 dark:text-slate-100`,"aria-label":i?.title??`画像`,children:i&&(0,B.jsxs)(`div`,{className:`flex max-h-[95vh] flex-col`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-slate-200 p-3 dark:border-slate-800`,children:[(0,B.jsx)(h,{tone:_e[i.kind],children:de(i.kind)}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:i.title}),(0,B.jsx)(`a`,{href:fe(e,t.id,i.id),target:`_blank`,rel:`noreferrer`,className:b(`ghost`),children:`画像を開く`}),(0,B.jsx)(_,{autoFocus:!0,onClick:()=>o.current?.close(),children:`閉じる`})]}),(0,B.jsx)(`div`,{className:`overflow-auto bg-slate-50 p-3 dark:bg-slate-950`,children:(0,B.jsx)(`img`,{src:fe(e,t.id,i.id),alt:i.title,className:`mx-auto max-w-full`})})]})})]})}function ze({requestId:e,run:t}){let n=t.attachments??[];return n.length?(0,B.jsxs)(`div`,{className:`space-y-1 rounded-md bg-slate-50 p-3 text-sm dark:bg-slate-950`,children:[(0,B.jsx)(`p`,{className:`font-medium`,children:`この run に固定した添付(Codex に渡したもの)`}),(0,B.jsx)(`ul`,{className:`space-y-1.5`,children:n.map(n=>{let r=n.extract;return(0,B.jsxs)(`li`,{className:`break-words`,children:[(0,B.jsx)(`span`,{className:`text-slate-500`,children:O[n.format]}),` `,n.name,n.description?` — ${n.description}`:``,` `,(0,B.jsx)(`a`,{href:ge(e,t.id,n.id),className:`text-indigo-600 underline dark:text-indigo-400`,children:`原本`}),n.format===`xlsx`&&(0,B.jsxs)(`span`,{className:`block text-slate-500`,children:[r?r.error?`中身を取り出せませんでした(未読): ${r.error}`:`シート ${r.sheets}・セル ${r.cells}・画像 ${r.images.length} を取り出しました`:`まだ取り出していません`,r?.unknownCells?` · 値が保存されていない数式 ${r.unknownCells}(未確認)`:``,r?.truncated.length?` · 打ち切り: ${r.truncated.join(` / `)}`:``,r?.unsupported.length?` · 扱っていないもの(未確認): ${r.unsupported.join(` / `)}`:``,r?.text&&(0,B.jsxs)(B.Fragment,{children:[` `,(0,B.jsx)(`a`,{href:ge(e,t.id,n.id,!0),target:`_blank`,rel:`noreferrer`,className:`text-indigo-600 underline dark:text-indigo-400`,children:`取り出した内容`})]})]})]},n.id)})})]}):null}var Be=`preflight-note`;function Ve(e){let t=document.getElementById(Be);t&&(e.preventDefault(),t.scrollIntoView({block:`center`,behavior:`smooth`}),t.focus({preventScroll:!0}))}function He({ctx:e,request:t,gone:n,hasHistory:r,running:i,engineOk:a,draft:o,onDraft:s,onStarted:c,blocked:l}){let[u,d]=(0,z.useState)(),[f,m]=(0,z.useState)(!1),[g,v]=(0,z.useState)(null),y=Ce({hasHistory:r,running:i,engineOk:a,draft:o,busy:f,pending:u?.notes.filter(e=>e.pending).length??0});(0,z.useEffect)(()=>{S.notes(t.id).then(d,()=>void 0)},[t.id,e.tick]);async function b(e){if(!f){if(n)return v({error:!0,text:`この要望は見つからないので保存しません。入力は残してあります`});m(!0),v(null);try{let n=o,r=await Se(S,t.id,n,e);s(e=>e===n?``:e),r.kind===`started`?v({error:!1,text:`メモを保存して、Preflight を始めました`}):r.kind===`not-started`?v({error:!0,text:`メモ ${r.note.id} は保存済みです(書き直しは不要)。Preflight を始められませんでした: ${r.error}`}):v({error:!1,text:`メモ ${r.note.id} を保存しました。${i?`実行中の評価ではなく、`:``}次の Preflight に渡します`}),r.kind===`started`&&c(r.run),d(await S.notes(t.id))}catch(e){v({error:!0,text:e.message})}finally{m(!1)}}}return y.mode===`intro`&&!u?.notes.length&&!u?.invalid.length?null:(0,B.jsx)(p,{title:`メモ(確認事項への回答・方針の変更)`,aside:(0,B.jsxs)(`span`,{className:`font-mono text-sm text-slate-400`,children:[`requests/`,t.id,`/notes/*.md`]}),children:(0,B.jsxs)(`div`,{className:`space-y-3 rounded-lg bg-white p-4 ring-1 ring-slate-200 dark:bg-slate-900 dark:ring-slate-800`,children:[u&&(0,B.jsxs)(B.Fragment,{children:[u.notes.length>0&&(0,B.jsx)(`ul`,{className:`space-y-2`,children:u.notes.map(e=>(0,B.jsxs)(`li`,{className:`space-y-1`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm text-slate-500`,children:[(0,B.jsx)(h,{tone:e.pending?`amber`:`slate`,children:e.pending?`次に渡す`:`渡し済み`}),(0,B.jsx)(`span`,{className:`font-mono`,children:e.id}),(0,B.jsx)(`span`,{children:e.createdBy??`不明`}),(0,B.jsx)(`span`,{children:e.createdAt.slice(0,16).replace(`T`,` `)})]}),(0,B.jsx)(`p`,{className:`break-words whitespace-pre-wrap`,children:e.body})]},e.id))}),u.invalid.map(e=>(0,B.jsxs)(`p`,{className:`text-sm text-rose-600`,children:[`読めないメモ(渡しません): `,e.file,` — `,e.error]},e.file)),y.mode===`input`&&(0,B.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-400`,children:xe(u)})]}),y.hint&&(0,B.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-400`,children:y.hint}),y.mode===`input`&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`textarea`,{id:`preflight-note`,rows:3,className:`w-full rounded-md border-0 bg-white px-2.5 py-1.5 text-base ring-1 ring-slate-300 ring-inset focus:ring-2 focus:ring-indigo-500 focus:outline-none dark:bg-slate-900 dark:ring-slate-700`,value:o,"aria-label":`Preflight へのメモ`,placeholder:`確認事項への回答や、方針の変更を書きます(例: 対象は CLI だけ。Web は不要)`,onChange:e=>s(e.target.value)}),(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,B.jsx)(_,{variant:`primary`,disabled:!y.canSaveAndRun||n||!!l,title:l??void 0,onClick:()=>void b(!0),children:`保存して再実行`}),(0,B.jsx)(_,{disabled:!y.canSaveOnly||n,onClick:()=>void b(!1),children:i?`メモだけ保存(次回に渡す)`:`メモだけ保存`})]})]}),g&&(0,B.jsx)(`p`,{className:g.error?`text-rose-600`:`text-emerald-700 dark:text-emerald-400`,children:g.text})]})})}var Ue=e=>te(e);function We(){let e=t=>{t.type===`html`&&(t.type=`text`),t.children?.forEach(e)};return e}function Ge(e,t){return!e||e.runId!==t.id?null:t.drafts.find(t=>t.key===e.key)??null}function Ke(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var qe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Je=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ye={};function Xe(e,t){return((t||Ye).jsx?Je:qe).test(e)}var Ze=/[ \t\n\f\r]/g;function Qe(e){return typeof e==`object`?e.type===`text`&&$e(e.value):$e(e)}function $e(e){return e.replace(Ze,``)===``}var et=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};et.prototype.normal={},et.prototype.property={},et.prototype.space=void 0;function tt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new et(n,r,t)}function nt(e){return e.toLowerCase()}var V=class{constructor(e,t){this.attribute=t,this.property=e}};V.prototype.attribute=``,V.prototype.booleanish=!1,V.prototype.boolean=!1,V.prototype.commaOrSpaceSeparated=!1,V.prototype.commaSeparated=!1,V.prototype.defined=!1,V.prototype.mustUseProperty=!1,V.prototype.number=!1,V.prototype.overloadedBoolean=!1,V.prototype.property=``,V.prototype.spaceSeparated=!1,V.prototype.space=void 0;var rt=e({boolean:()=>H,booleanish:()=>U,commaOrSpaceSeparated:()=>st,commaSeparated:()=>ot,number:()=>W,overloadedBoolean:()=>at,spaceSeparated:()=>G}),it=0,H=ct(),U=ct(),at=ct(),W=ct(),G=ct(),ot=ct(),st=ct();function ct(){return 2**++it}var lt=Object.keys(rt),ut=class extends V{constructor(e,t,n,r){let i=-1;if(super(e,t),dt(this,`space`,r),typeof n==`number`)for(;++i<lt.length;){let e=lt[i];dt(this,lt[i],(n&rt[e])===rt[e])}}};ut.prototype.defined=!0;function dt(e,t,n){n&&(e[t]=n)}function ft(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ut(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[nt(r)]=r,n[nt(a.attribute)]=r}return new et(t,n,e.space)}var pt=ft({properties:{ariaActiveDescendant:null,ariaAtomic:U,ariaAutoComplete:null,ariaBusy:U,ariaChecked:U,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:U,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:U,ariaFlowTo:G,ariaGrabbed:U,ariaHasPopup:null,ariaHidden:U,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:W,ariaLive:null,ariaModal:U,ariaMultiLine:U,ariaMultiSelectable:U,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:U,ariaReadOnly:U,ariaRelevant:null,ariaRequired:U,ariaRoleDescription:G,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:U,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function mt(e,t){return t in e?e[t]:t}function ht(e,t){return mt(e,t.toLowerCase())}var gt=ft({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ot,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alpha:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:G,autoFocus:H,autoPlay:H,blocking:G,capture:null,charSet:null,checked:H,cite:null,className:G,closedBy:null,colorSpace:null,cols:W,colSpan:W,command:null,commandFor:null,content:null,contentEditable:U,controls:H,controlsList:G,coords:W|ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:at,draggable:U,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:G,height:W,hidden:at,high:W,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:G,itemRef:G,itemScope:H,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:H,optimum:W,pattern:null,ping:G,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:G,required:H,reversed:H,rows:W,rowSpan:W,sandbox:G,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootCustomElementRegistry:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shadowRootSerializable:H,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:U,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:H,useMap:null,value:U,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:U,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:H,disablePictureInPicture:H,disableRemotePlayback:H,exportParts:ot,part:G,prefix:null,property:null,results:W,security:null,unselectable:null},space:`html`,transform:ht}),_t=ft({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:st,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:G,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:H,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ot,g2:ot,glyphName:ot,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:st,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:st,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:st,rev:st,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:st,requiredFeatures:st,requiredFonts:st,requiredFormats:st,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:st,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:st,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:st,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:mt}),vt=ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),yt=ft({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ht}),bt=ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xt={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},St=/[A-Z]/g,Ct=/-[a-z]/g,wt=/^data[-\w.:]+$/i;function Tt(e,t){let n=nt(t),r=t,i=V;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&wt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ct,Dt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ct.test(e)){let n=e.replace(St,Et);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ut}return new i(r,t)}function Et(e){return`-`+e.toLowerCase()}function Dt(e){return e.charAt(1).toUpperCase()}var Ot=tt([pt,gt,vt,yt,bt],`html`),kt=tt([pt,_t,vt,yt,bt],`svg`);function At(e){return e.join(` `).trim()}var jt=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{C as r,G as i,O as a,_ as o,a as s,c,d as l,f as u,g as d,i as f,l as p,lt as m,n as h,p as g,r as _,s as v,t as y,u as b,v as x,x as S,y as C}from"./appCtx-DCiGJFAe.js";import{a as w}from"./preload-helper-B40dBmwL.js";import{d as T,i as E,l as D,r as O}from"./index-Bt13tvIX.js";import{n as k,t as A}from"./RequestStatus-grC0F_SQ.js";import{i as ee,n as j,r as M}from"./workTarget-Cijqq4yH.js";import{n as N,r as te}from"./requestData-w6fhCYmh.js";import{n as P,r as ne,t as F}from"./preflightInput-BAeEJYUK.js";import{i as I,n as L,r as re,s as ie,t as R}from"./draft-CfJeyLOl.js";import{t as ae}from"./progressTree-DgrdDFih.js";import{n as oe}from"./milestoneOrder-N7b5XFJP.js";import{n as se}from"./directTask-Dk3H5Q2B.js";import{t as ce}from"./action-CMjATXqv.js";import{_ as le,c as ue,d as de,f as fe,g as pe,h as me,i as he,l as ge,o as _e,r as ve,t as ye,u as be}from"./TagInput-cIIwXAHA.js";var z=t(m(),1);function xe(e){let t=e.notes.filter(e=>e.pending).length;return`次の Preflight: ${e.previous?`前回 ${e.previous} の結果を引き継ぎます`:e.previousSkipped?`前回の結果は引き継ぎません(${e.previousSkipped})`:`最初の評価です`}。メモ ${t} 件を渡します。`}async function Se(e,t,n,r){let i=n.trim();if(!i)throw Error(`メモが空です`);if(!r)return{kind:`saved`,note:await e.addNote(t,i)};try{return{kind:`started`,run:await e.startPreflight(t,{note:i})}}catch(e){let t=e instanceof C?e.body.note:void 0;if(t)return{kind:`not-started`,note:t,error:e instanceof Error?e.message:String(e)};throw e}}function Ce(e){if(!e.hasHistory)return{mode:`intro`,canSaveAndRun:!1,canSaveOnly:!1,blockPlainRun:!1,hint:e.pending>0?`保存済みのメモ ${e.pending} 件を、最初の Preflight に渡します。`:void 0};let t=e.draft.trim()!==``;return{mode:`input`,canSaveAndRun:t&&!e.busy&&!e.running&&e.engineOk,canSaveOnly:t&&!e.busy,blockPlainRun:t,hint:e.running?`実行中です。ここで保存したメモは、実行中の評価ではなく次の Preflight に渡ります。`:e.engineOk?void 0:`評価エンジンが使えないため、メモの保存だけできます。`}}var we=e=>({name:`codex`,ok:!1,unknown:!0,detail:`Preflight のエンジンの状態を確かめられません(${e})。「再読み込み」でもう一度確かめます`});function Te(e){let[t,n]=(0,z.useState)(),r=(0,z.useRef)(x());return(0,z.useEffect)(()=>{let e=!0;return r.current.run(()=>S.engine()).then(t=>e&&t!==o&&n(t),t=>e&&n(we(t.message))),()=>{e=!1}},[e]),t}var Ee=`タイトルか本文が未保存です。保存するかキャンセルしてください`;function De(e){return[...e.title?[`タイトル`]:[],...e.body?[`本文`]:[]]}function Oe(e,t){if(!e||e.status===`same`)return null;let n=e.status===`changed`?`この評価のあとで要望の${F(e.changed)}が変わりました。`:`この評価が何を評価したか確かめられません(${e.reason??`不明`})。`;return t.done?{title:`表示中の評価は、今の要望とは違う内容に対するものです`,text:`${n}この評価からのタスク化は済んでいます(作ったタスクはそのまま残ります)。今の内容で見直すなら、もう一度 Preflight を実行してください。`}:{title:`表示中の評価と今の要望が違います`,text:`${n}古い評価からはタスク化できません。もう一度 Preflight を実行してください(既存のタスク・過去の評価・メモは残ります)。この評価のままタスク化するなら、要望を評価した時点の内容に戻してください。`}}function ke(e){return r(e)===`rev_conflict`?`置き換えられるタスクが他で更新されました。内容を確かめて、もう一度タスク化してください`:e.message}function Ae(e){return r(e)===`rev_conflict`?`保存できませんでした: 本文が他で更新されています。入力は残してあります。最新の本文を確かめて取り込んでください`:r(e)===`not_found`?`この要望は見つからないので保存しません。入力は残してあります(必要ならコピーしてください)`:`保存できませんでした: ${e.message}。入力は残してあります`}function je(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n||`(空)`}var Me=[`文脈選定`,`評価・細分化`,`レビュー`,`タスク化`];function Ne(e){let t=e.status===`running`?e.log.length>1?2:1:e.materialized?.length||e.adoption?.done?4:e.status===`completed`?3:2;return Me.map((n,r)=>{let i=r+1;return{label:n,state:i<t||i===t&&t===4?`done`:i===t?e.status===`failed`?`failed`:`current`:`todo`,current:i===t}})}var Pe={ok:`読んだ`,unregistered:`見ていない(このマシンのパスが未登録)`,missing:`見ていない(パスが無い)`,notdir:`見ていない(フォルダでない)`},Fe=e=>[e.repo&&e.file?`${e.repo}:${e.file}${e.location?` ${e.location}`:``}`:``,e.commit?`commit ${e.commit}`:``].filter(Boolean).join(` / `),Ie=e=>e?e.status===`ok`?`git の履歴あり`:e.status===`shallow`?`git の履歴は途中まで(${e.reason??`浅い clone`})`:`git の履歴なし(${e.reason??`不明`})`:``,B=i();function Le({scope:e,repos:t,evidence:n}){return(0,B.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,B.jsx)(p,{title:`調べた範囲(参照先)`,children:e?e.length?(0,B.jsx)(`ul`,{className:`space-y-2`,children:e.map(e=>{let n=t.find(t=>t.name===e.name);return(0,B.jsxs)(`li`,{className:`space-y-1 rounded-lg bg-white p-3 ring-1 ring-slate-200 dark:bg-slate-900 dark:ring-slate-800`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsx)(`span`,{className:`font-medium break-all`,children:e.name}),e.role&&(0,B.jsx)(`span`,{className:`text-sm text-slate-500`,children:e.role}),e.readFirst&&(0,B.jsx)(h,{tone:`indigo`,children:`最初に読む`}),(0,B.jsx)(h,{tone:e.status===`ok`?`emerald`:`rose`,children:Pe[e.status]}),e.history&&(0,B.jsx)(h,{tone:e.history.status===`ok`?`slate`:`amber`,title:e.history.reason,children:e.history.status===`ok`?`git の履歴あり`:e.history.status===`shallow`?`git の履歴は途中まで`:`git の履歴なし`})]}),e.history&&e.history.status!==`ok`&&(0,B.jsx)(`p`,{className:`text-sm break-words text-amber-700 dark:text-amber-400`,children:Ie(e.history)}),e.status!==`ok`&&(0,B.jsxs)(`p`,{className:`text-sm break-words text-rose-700 dark:text-rose-300`,children:[e.reason??Pe[e.status],`。中身は確かめていないので、関わる判断は推測です`]}),n&&n.map.length>0&&(0,B.jsxs)(`details`,{className:`text-sm`,children:[(0,B.jsx)(`summary`,{className:`cursor-pointer text-slate-500`,children:`主なフォルダ(今の設定)`}),(0,B.jsx)(`ul`,{className:`mt-1 space-y-0.5 pl-4`,children:n.map.map(e=>(0,B.jsxs)(`li`,{className:`break-words`,children:[(0,B.jsx)(`code`,{className:`font-mono break-all`,children:e.path}),` — `,e.role||`(役割なし)`,e.entry&&(0,B.jsxs)(B.Fragment,{children:[`(入口 `,(0,B.jsx)(`code`,{className:`font-mono break-all`,children:e.entry}),`)`]})]},e.path))})]})]},e.name)})}):(0,B.jsx)(`p`,{className:`text-sm text-slate-500`,children:`参照先なし`}):(0,B.jsx)(`p`,{className:`text-sm text-slate-500`,children:`記録なし(以前の評価)`})}),n!==null&&(0,B.jsx)(p,{title:`判断の根拠`,children:n===void 0?(0,B.jsx)(`p`,{className:`text-sm text-slate-500`,children:`記録なし(以前の評価)`}):n.length?(0,B.jsx)(`ul`,{className:`space-y-1.5`,children:n.map((e,t)=>(0,B.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,B.jsx)(h,{tone:e.kind===`verified`?`emerald`:`amber`,className:`mt-0.5`,children:e.kind===`verified`?`確かめた`:`推測`}),(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(`p`,{className:`break-words`,children:e.claim}),Fe(e)&&(0,B.jsx)(`p`,{className:l(`font-mono text-sm break-all`,e.kind===`verified`?`text-slate-500`:`text-slate-400`),children:Fe(e)}),e.note&&(0,B.jsxs)(`p`,{className:`text-sm text-amber-700 dark:text-amber-300`,children:[`※ `,e.note]})]})]},t))}):(0,B.jsx)(`p`,{className:`text-sm text-slate-500`,children:`なし`})})]})}function Re({requestId:e,run:t}){let n=le(t),r=me(t.ui?.items??[]),[i,a]=(0,z.useState)(null),o=(0,z.useRef)(null),s=e=>{a(e),o.current?.showModal()};return(0,B.jsxs)(p,{title:`画面資料`,aside:(0,B.jsx)(h,{tone:n.tone,children:n.label}),children:[(0,B.jsxs)(`div`,{className:`space-y-3`,children:[n.message&&(0,B.jsx)(`p`,{className:`break-words text-sm text-slate-600 dark:text-slate-400`,children:n.message}),t.ui?.verdictAdjusted&&(0,B.jsx)(`p`,{className:`rounded-md bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:bg-amber-950 dark:text-amber-300`,children:`必要な画面イメージが足りないので、判定を go から clarify にしました`}),r.length>0?(0,B.jsx)(`ul`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3`,children:r.map(n=>(0,B.jsxs)(`li`,{className:`flex min-w-0 flex-col overflow-hidden rounded-lg bg-white ring-1 ring-slate-200 dark:bg-slate-900 dark:ring-slate-800`,children:[(0,B.jsx)(`button`,{type:`button`,className:`block h-44 w-full overflow-hidden border-b border-slate-200 bg-slate-50 dark:border-slate-800 dark:bg-slate-950`,onClick:()=>s(n),"aria-label":`${n.title} を拡大`,children:(0,B.jsx)(`img`,{src:fe(e,t.id,n.id),alt:n.title,loading:`lazy`,className:`h-full w-full object-contain object-top`})}),(0,B.jsxs)(`div`,{className:`flex flex-1 flex-col gap-1.5 p-3 text-sm`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsx)(h,{tone:_e[n.kind],children:de(n.kind)}),(0,B.jsx)(`span`,{className:`min-w-0 break-words font-medium`,children:n.title})]}),(0,B.jsxs)(`p`,{className:`text-slate-500`,children:[n.drafts.length>0&&(0,B.jsxs)(B.Fragment,{children:[`対象`,` `,n.drafts.map(e=>(0,B.jsx)(`a`,{href:`#${ue(e)}`,className:`mr-1 font-mono text-indigo-600 underline dark:text-indigo-400`,children:e},e)),`·`,` `]}),n.viewport?`幅 ${n.viewport} · `:``,n.width,`x`,n.height,` · `,be(n.bytes)]}),n.source&&(0,B.jsxs)(`p`,{className:`break-words text-slate-500`,children:[`出典: `,n.source]}),n.assumptions.length>0&&(0,B.jsxs)(`p`,{className:`break-words text-slate-500`,children:[`前提: `,n.assumptions.join(` / `)]}),n.rendered&&(0,B.jsxs)(`p`,{className:`text-amber-700 dark:text-amber-400`,children:[`P3 が原稿から描いた画像です(Codex は画像を見ていません。読めるかを確かめてください)`,n.rendered.clipped?`。縦に長いので上から切っています`:``]}),n.kind===`proposal`&&(0,B.jsx)(`p`,{className:`text-slate-400`,children:`提案のイメージです(今の画面ではありません)`}),(0,B.jsxs)(`div`,{className:`mt-auto flex flex-wrap gap-2 pt-1`,children:[(0,B.jsx)(_,{onClick:()=>s(n),children:`拡大`}),(0,B.jsx)(`a`,{href:fe(e,t.id,n.id),target:`_blank`,rel:`noreferrer`,className:b(`ghost`),children:`画像を開く`})]})]})]},n.id))}):t.ui&&t.ui.status!==`generating`&&(0,B.jsx)(f,{children:`画像はありません`}),t.ui&&t.ui.problems.length>0&&(0,B.jsxs)(`details`,{className:`text-sm`,children:[(0,B.jsxs)(`summary`,{className:`cursor-pointer text-slate-500`,children:[`取り込めなかった資料 `,t.ui.problems.length,` 件`]}),(0,B.jsx)(`ul`,{className:`mt-1 list-disc space-y-0.5 pl-5 break-words text-slate-600 dark:text-slate-400`,children:t.ui.problems.map(e=>(0,B.jsx)(`li`,{children:e},e))})]}),(0,B.jsx)(ze,{requestId:e,run:t})]}),(0,B.jsx)(`dialog`,{ref:o,onClose:()=>a(null),className:`m-auto max-h-[95vh] w-[min(96vw,1400px)] max-w-none rounded-lg bg-white p-0 text-slate-900 backdrop:bg-black/60 dark:bg-slate-900 dark:text-slate-100`,"aria-label":i?.title??`画像`,children:i&&(0,B.jsxs)(`div`,{className:`flex max-h-[95vh] flex-col`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-slate-200 p-3 dark:border-slate-800`,children:[(0,B.jsx)(h,{tone:_e[i.kind],children:de(i.kind)}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:i.title}),(0,B.jsx)(`a`,{href:fe(e,t.id,i.id),target:`_blank`,rel:`noreferrer`,className:b(`ghost`),children:`画像を開く`}),(0,B.jsx)(_,{autoFocus:!0,onClick:()=>o.current?.close(),children:`閉じる`})]}),(0,B.jsx)(`div`,{className:`overflow-auto bg-slate-50 p-3 dark:bg-slate-950`,children:(0,B.jsx)(`img`,{src:fe(e,t.id,i.id),alt:i.title,className:`mx-auto max-w-full`})})]})})]})}function ze({requestId:e,run:t}){let n=t.attachments??[];return n.length?(0,B.jsxs)(`div`,{className:`space-y-1 rounded-md bg-slate-50 p-3 text-sm dark:bg-slate-950`,children:[(0,B.jsx)(`p`,{className:`font-medium`,children:`この run に固定した添付(Codex に渡したもの)`}),(0,B.jsx)(`ul`,{className:`space-y-1.5`,children:n.map(n=>{let r=n.extract;return(0,B.jsxs)(`li`,{className:`break-words`,children:[(0,B.jsx)(`span`,{className:`text-slate-500`,children:O[n.format]}),` `,n.name,n.description?` — ${n.description}`:``,` `,(0,B.jsx)(`a`,{href:ge(e,t.id,n.id),className:`text-indigo-600 underline dark:text-indigo-400`,children:`原本`}),n.format===`xlsx`&&(0,B.jsxs)(`span`,{className:`block text-slate-500`,children:[r?r.error?`中身を取り出せませんでした(未読): ${r.error}`:`シート ${r.sheets}・セル ${r.cells}・画像 ${r.images.length} を取り出しました`:`まだ取り出していません`,r?.unknownCells?` · 値が保存されていない数式 ${r.unknownCells}(未確認)`:``,r?.truncated.length?` · 打ち切り: ${r.truncated.join(` / `)}`:``,r?.unsupported.length?` · 扱っていないもの(未確認): ${r.unsupported.join(` / `)}`:``,r?.text&&(0,B.jsxs)(B.Fragment,{children:[` `,(0,B.jsx)(`a`,{href:ge(e,t.id,n.id,!0),target:`_blank`,rel:`noreferrer`,className:`text-indigo-600 underline dark:text-indigo-400`,children:`取り出した内容`})]})]})]},n.id)})})]}):null}var Be=`preflight-note`;function Ve(e){let t=document.getElementById(Be);t&&(e.preventDefault(),t.scrollIntoView({block:`center`,behavior:`smooth`}),t.focus({preventScroll:!0}))}function He({ctx:e,request:t,gone:n,hasHistory:r,running:i,engineOk:a,draft:o,onDraft:s,onStarted:c,blocked:l}){let[u,d]=(0,z.useState)(),[f,m]=(0,z.useState)(!1),[g,v]=(0,z.useState)(null),y=Ce({hasHistory:r,running:i,engineOk:a,draft:o,busy:f,pending:u?.notes.filter(e=>e.pending).length??0});(0,z.useEffect)(()=>{S.notes(t.id).then(d,()=>void 0)},[t.id,e.tick]);async function b(e){if(!f){if(n)return v({error:!0,text:`この要望は見つからないので保存しません。入力は残してあります`});m(!0),v(null);try{let n=o,r=await Se(S,t.id,n,e);s(e=>e===n?``:e),r.kind===`started`?v({error:!1,text:`メモを保存して、Preflight を始めました`}):r.kind===`not-started`?v({error:!0,text:`メモ ${r.note.id} は保存済みです(書き直しは不要)。Preflight を始められませんでした: ${r.error}`}):v({error:!1,text:`メモ ${r.note.id} を保存しました。${i?`実行中の評価ではなく、`:``}次の Preflight に渡します`}),r.kind===`started`&&c(r.run),d(await S.notes(t.id))}catch(e){v({error:!0,text:e.message})}finally{m(!1)}}}return y.mode===`intro`&&!u?.notes.length&&!u?.invalid.length?null:(0,B.jsx)(p,{title:`メモ(確認事項への回答・方針の変更)`,aside:(0,B.jsxs)(`span`,{className:`font-mono text-sm text-slate-400`,children:[`requests/`,t.id,`/notes/*.md`]}),children:(0,B.jsxs)(`div`,{className:`space-y-3 rounded-lg bg-white p-4 ring-1 ring-slate-200 dark:bg-slate-900 dark:ring-slate-800`,children:[u&&(0,B.jsxs)(B.Fragment,{children:[u.notes.length>0&&(0,B.jsx)(`ul`,{className:`space-y-2`,children:u.notes.map(e=>(0,B.jsxs)(`li`,{className:`space-y-1`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm text-slate-500`,children:[(0,B.jsx)(h,{tone:e.pending?`amber`:`slate`,children:e.pending?`次に渡す`:`渡し済み`}),(0,B.jsx)(`span`,{className:`font-mono`,children:e.id}),(0,B.jsx)(`span`,{children:e.createdBy??`不明`}),(0,B.jsx)(`span`,{children:e.createdAt.slice(0,16).replace(`T`,` `)})]}),(0,B.jsx)(`p`,{className:`break-words whitespace-pre-wrap`,children:e.body})]},e.id))}),u.invalid.map(e=>(0,B.jsxs)(`p`,{className:`text-sm text-rose-600`,children:[`読めないメモ(渡しません): `,e.file,` — `,e.error]},e.file)),y.mode===`input`&&(0,B.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-400`,children:xe(u)})]}),y.hint&&(0,B.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-400`,children:y.hint}),y.mode===`input`&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`textarea`,{id:`preflight-note`,rows:3,className:`w-full rounded-md border-0 bg-white px-2.5 py-1.5 text-base ring-1 ring-slate-300 ring-inset focus:ring-2 focus:ring-indigo-500 focus:outline-none dark:bg-slate-900 dark:ring-slate-700`,value:o,"aria-label":`Preflight へのメモ`,placeholder:`確認事項への回答や、方針の変更を書きます(例: 対象は CLI だけ。Web は不要)`,onChange:e=>s(e.target.value)}),(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,B.jsx)(_,{variant:`primary`,disabled:!y.canSaveAndRun||n||!!l,title:l??void 0,onClick:()=>void b(!0),children:`保存して再実行`}),(0,B.jsx)(_,{disabled:!y.canSaveOnly||n,onClick:()=>void b(!1),children:i?`メモだけ保存(次回に渡す)`:`メモだけ保存`})]})]}),g&&(0,B.jsx)(`p`,{className:g.error?`text-rose-600`:`text-emerald-700 dark:text-emerald-400`,children:g.text})]})})}var Ue=e=>te(e);function We(){let e=t=>{t.type===`html`&&(t.type=`text`),t.children?.forEach(e)};return e}function Ge(e,t){return!e||e.runId!==t.id?null:t.drafts.find(t=>t.key===e.key)??null}function Ke(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var qe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Je=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ye={};function Xe(e,t){return((t||Ye).jsx?Je:qe).test(e)}var Ze=/[ \t\n\f\r]/g;function Qe(e){return typeof e==`object`?e.type===`text`&&$e(e.value):$e(e)}function $e(e){return e.replace(Ze,``)===``}var et=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};et.prototype.normal={},et.prototype.property={},et.prototype.space=void 0;function tt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new et(n,r,t)}function nt(e){return e.toLowerCase()}var V=class{constructor(e,t){this.attribute=t,this.property=e}};V.prototype.attribute=``,V.prototype.booleanish=!1,V.prototype.boolean=!1,V.prototype.commaOrSpaceSeparated=!1,V.prototype.commaSeparated=!1,V.prototype.defined=!1,V.prototype.mustUseProperty=!1,V.prototype.number=!1,V.prototype.overloadedBoolean=!1,V.prototype.property=``,V.prototype.spaceSeparated=!1,V.prototype.space=void 0;var rt=e({boolean:()=>H,booleanish:()=>U,commaOrSpaceSeparated:()=>st,commaSeparated:()=>ot,number:()=>W,overloadedBoolean:()=>at,spaceSeparated:()=>G}),it=0,H=ct(),U=ct(),at=ct(),W=ct(),G=ct(),ot=ct(),st=ct();function ct(){return 2**++it}var lt=Object.keys(rt),ut=class extends V{constructor(e,t,n,r){let i=-1;if(super(e,t),dt(this,`space`,r),typeof n==`number`)for(;++i<lt.length;){let e=lt[i];dt(this,lt[i],(n&rt[e])===rt[e])}}};ut.prototype.defined=!0;function dt(e,t,n){n&&(e[t]=n)}function ft(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ut(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[nt(r)]=r,n[nt(a.attribute)]=r}return new et(t,n,e.space)}var pt=ft({properties:{ariaActiveDescendant:null,ariaAtomic:U,ariaAutoComplete:null,ariaBusy:U,ariaChecked:U,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:U,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:U,ariaFlowTo:G,ariaGrabbed:U,ariaHasPopup:null,ariaHidden:U,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:W,ariaLive:null,ariaModal:U,ariaMultiLine:U,ariaMultiSelectable:U,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:U,ariaReadOnly:U,ariaRelevant:null,ariaRequired:U,ariaRoleDescription:G,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:U,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function mt(e,t){return t in e?e[t]:t}function ht(e,t){return mt(e,t.toLowerCase())}var gt=ft({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ot,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alpha:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:G,autoFocus:H,autoPlay:H,blocking:G,capture:null,charSet:null,checked:H,cite:null,className:G,closedBy:null,colorSpace:null,cols:W,colSpan:W,command:null,commandFor:null,content:null,contentEditable:U,controls:H,controlsList:G,coords:W|ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:at,draggable:U,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:G,height:W,hidden:at,high:W,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:G,itemRef:G,itemScope:H,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:H,optimum:W,pattern:null,ping:G,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:G,required:H,reversed:H,rows:W,rowSpan:W,sandbox:G,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootCustomElementRegistry:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shadowRootSerializable:H,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:U,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:H,useMap:null,value:U,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:U,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:H,disablePictureInPicture:H,disableRemotePlayback:H,exportParts:ot,part:G,prefix:null,property:null,results:W,security:null,unselectable:null},space:`html`,transform:ht}),_t=ft({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:st,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:G,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:H,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ot,g2:ot,glyphName:ot,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:st,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:st,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:st,rev:st,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:st,requiredFeatures:st,requiredFonts:st,requiredFormats:st,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:st,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:st,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:st,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:mt}),vt=ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),yt=ft({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ht}),bt=ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xt={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},St=/[A-Z]/g,Ct=/-[a-z]/g,wt=/^data[-\w.:]+$/i;function Tt(e,t){let n=nt(t),r=t,i=V;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&wt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ct,Dt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ct.test(e)){let n=e.replace(St,Et);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ut}return new i(r,t)}function Et(e){return`-`+e.toLowerCase()}function Dt(e){return e.charAt(1).toUpperCase()}var Ot=tt([pt,gt,vt,yt,bt],`html`),kt=tt([pt,_t,vt,yt,bt],`svg`);function At(e){return e.join(` `).trim()}var jt=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
2
2
|
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Mt=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(jt());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Nt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Pt=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Mt()),r=Nt();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Ft=Lt(`end`),It=Lt(`start`);function Lt(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Rt(e){let t=It(e),n=Ft(e);if(t&&n)return{start:t,end:n}}function zt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Vt(e.position):`start`in e||`end`in e?Vt(e):`line`in e||`column`in e?Bt(e):``}function Bt(e){return Ht(e&&e.line)+`:`+Ht(e&&e.column)}function Vt(e){return Bt(e&&e.start)+`-`+Bt(e&&e.end)}function Ht(e){return e&&typeof e==`number`?e:1}var K=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=zt(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};K.prototype.file=``,K.prototype.name=``,K.prototype.reason=``,K.prototype.message=``,K.prototype.stack=``,K.prototype.column=void 0,K.prototype.line=void 0,K.prototype.ancestors=void 0,K.prototype.cause=void 0,K.prototype.fatal=void 0,K.prototype.place=void 0,K.prototype.ruleId=void 0,K.prototype.source=void 0;var Ut=t(Pt(),1),Wt={}.hasOwnProperty,Gt=new Map,Kt=/[A-Z]/g,qt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Jt=new Set([`td`,`th`]),Yt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Xt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=cn(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=sn(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?kt:Ot,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Zt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Zt(e,t,n){if(t.type===`element`)return Qt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return $t(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return tn(e,t,n);if(t.type===`mdxjsEsm`)return en(e,t);if(t.type===`root`)return nn(e,t,n);if(t.type===`text`)return rn(e,t)}function Qt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=kt,e.schema=i),e.ancestors.push(t);let a=mn(e,t.tagName,!1),o=ln(e,t),s=dn(e,t);return qt.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Qe(e)})),an(e,o,a,t),on(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $t(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}hn(e,t.position)}function en(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hn(e,t.position)}function tn(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=kt,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:mn(e,t.name,!0),o=un(e,t),s=dn(e,t);return an(e,o,a,t),on(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nn(e,t,n){let r={};return on(r,dn(e,t)),e.create(t,e.Fragment,r,n)}function rn(e,t){return t.value}function an(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function on(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function sn(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function cn(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=It(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ln(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Wt.call(t.properties,i)){let a=fn(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Jt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function un(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else hn(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else hn(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function dn(e,t){let n=[],r=-1,i=e.passKeys?new Map:Gt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Zt(e,a,o);s!==void 0&&n.push(s)}return n}function fn(e,t,n){let r=Tt(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ke(n):At(n)),r.property===`style`){let t=typeof n==`object`?n:pn(e,String(n));return e.stylePropertyNameCase===`css`&&(t=gn(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?xt[r.property]||r.property:r.attribute,n]}}function pn(e,t){try{return(0,Ut.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new K("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Yt+`#cannot-parse-style-attribute`,r}}function mn(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Xe(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Xe(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Wt.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);hn(e)}function hn(e,t){let n=new K("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Yt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function gn(e){let t={},n;for(n in e)Wt.call(e,n)&&(t[_n(n)]=e[n]);return t}function _n(e){let t=e.replace(Kt,vn);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function vn(e){return`-`+e.toLowerCase()}var yn={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},bn={};function xn(e,t){let n=t||bn;return Sn(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Sn(e,t,n){if(wn(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Cn(e.children,t,n)}return Array.isArray(e)?Cn(e,t,n):``}function Cn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Sn(e[i],t,n);return r.join(``)}function wn(e){return!!(e&&typeof e==`object`)}var Tn=document.createElement(`i`);function En(e){let t=`&`+e+`;`;Tn.innerHTML=t;let n=Tn.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Dn(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function On(e,t){return e.length>0?(Dn(e,e.length,0,t),e):t}var kn={}.hasOwnProperty;function An(e){let t={},n=-1;for(;++n<e.length;)jn(t,e[n]);return t}function jn(e,t){let n;for(n in t){let r=(kn.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){kn.call(r,a)||(r[a]=[]);let e=i[a];Mn(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Mn(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Dn(e,0,0,r)}function Nn(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Pn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var q=Hn(/[A-Za-z]/),J=Hn(/[\dA-Za-z]/),Fn=Hn(/[#-'*+\--9=?A-Z^-~]/);function In(e){return e!==null&&(e<32||e===127)}var Ln=Hn(/\d/),Rn=Hn(/[\dA-Fa-f]/),zn=Hn(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function X(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}var Bn=Hn(/\p{P}|\p{S}/u),Vn=Hn(/\s/);function Hn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Un(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&J(e.charCodeAt(n+1))&&J(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Z(r)?(e.enter(n),s(r)):t(r)}function s(r){return Z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Wn(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Z(t)?(e.enter(r),c(t)):l(t)}function c(t){return Z(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Gn={tokenize:Kn};function Kn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Y(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var qn=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Jn(this,e,t,n,!1)}addBefore(e,t,n){Jn(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Jn(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Yn={tokenize:Zn},Xn={tokenize:Qn};function Zn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new qn;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Xn,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Xn,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Y(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new qn;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Qn(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function $n(e){if(e===null||X(e)||Vn(e))return 1;if(Bn(e))return 2}function er(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var tr={name:`attention`,resolveAll:nr,tokenize:rr};function nr(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};ir(o,-a),ir(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=On(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=On(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=On(r,er(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=On(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=On(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),Dn(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function rr(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=$n(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=$n(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function ir(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ar={name:`autolink`,tokenize:or};function or(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return q(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||J(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||J(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||In(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Fn(t)?(e.consume(t),l):n(t)}function u(e){return J(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||J(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var sr={partial:!0,tokenize:cr};function cr(e,t,n){return r;function r(t){return Z(t)?Q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Y(e)?t(e):n(e)}}var lr={continuation:{tokenize:dr},exit:fr,name:`blockQuote`,tokenize:ur};function ur(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function dr(e,t,n){let r=this;return i;function i(t){return Z(t)?Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(lr,t,n)(r)}}function fr(e){e.exit(`blockQuote`)}var pr={name:`characterEscape`,tokenize:mr};function mr(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return zn(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var hr={name:`characterReference`,tokenize:gr};function gr(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=J,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Rn,u):(e.enter(`characterReferenceValue`),a=7,o=Ln,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===J&&!En(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var _r={partial:!0,tokenize:vr};function vr(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var yr={concrete:!0,name:`codeFenced`,tokenize:br};function br(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Y(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(_r,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Y(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Z(t)?Q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Y(t)?e.check(_r,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Z(t)?Q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Y(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var xr={name:`codeIndented`,tokenize:Cr},Sr={partial:!0,tokenize:wr};function Cr(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Wn(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Y(t)?e.attempt(Sr,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function wr(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Y(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Wn(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Y(e)?i(e):n(e)}}var Tr={name:`codeText`,previous:Dr,resolve:Er,tokenize:Or};function Er(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Dr(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Or(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Y(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var kr=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Ar(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Ar(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ar(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Ar(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Ar(this.left,t.reverse())}}}};function Ar(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function jr(e){let t={},n=-1,r,i,a,o,s,c,l,u=new kr(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Mr(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Dn(e,0,1/0,u.slice(0)),!l}function Mr(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Nr={resolve:Fr,tokenize:Ir},Pr={partial:!0,tokenize:Lr};function Fr(e){return jr(e),e}function Ir(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Y(t)?e.check(Pr,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Lr(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,a,`linePrefix`)}function a(i){if(i===null||Y(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Rr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||In(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Y(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||X(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||In(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function zr(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Y(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Y(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Br(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Y(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Vr(e,t){let n;return r;function r(i){return Y(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Z(i)?Q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Hr={name:`definition`,tokenize:Wr},Ur={partial:!0,tokenize:Gr};function Wr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return zr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return X(t)?Vr(e,l)(t):l(t)}function l(t){return Rr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Ur,d,d)(t)}function d(t){return Z(t)?Q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Y(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Gr(e,t,n){return r;function r(t){return X(t)?Vr(e,i)(t):n(t)}function i(t){return Br(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Z(t)?Q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Y(e)?t(e):n(e)}}var Kr={name:`hardBreakEscape`,tokenize:qr};function qr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Y(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Jr={name:`headingAtx`,resolve:Yr,tokenize:Xr};function Yr(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};Dn(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Xr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||X(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Y(n)?(e.exit(`atxHeading`),t(n)):Z(n)?Q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||X(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Zr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Qr=[`pre`,`script`,`style`,`textarea`],$r={concrete:!0,name:`htmlFlow`,resolveTo:ti,tokenize:ni},ei={partial:!0,tokenize:ri};function ti(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ni(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):q(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):q(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return q(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||X(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Qr.includes(l)?(i=1,r.interrupt?t(s):O(s)):Zr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||J(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Z(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||q(t)?(e.consume(t),b):Z(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||J(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Z(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Z(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Y(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||X(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Z(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Y(t)?O(t):Z(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),ne):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):Y(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(ei,F,k)(t)):t===null||Y(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(_r,A,F)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||Y(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),P):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return Qr.includes(n)?(e.consume(t),ne):O(t)}return q(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),ne):t===45&&i===2?(e.consume(t),P):O(t)}function ne(t){return t===null||Y(t)?(e.exit(`htmlFlowData`),F(t)):(e.consume(t),ne)}function F(n){return e.exit(`htmlFlow`),t(n)}}function ri(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(sr,t,n)}}var ii={name:`htmlText`,tokenize:ai};function ai(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):q(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):q(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Y(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Y(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):Y(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Y(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return q(t)?(e.consume(t),S):n(t)}function S(t){return t===45||J(t)?(e.consume(t),S):C(t)}function C(t){return Y(t)?(o=C,M(t)):Z(t)?(e.consume(t),C):j(t)}function w(t){return t===45||J(t)?(e.consume(t),w):t===47||t===62||X(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||q(t)?(e.consume(t),E):Y(t)?(o=T,M(t)):Z(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||J(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Y(t)?(o=D,M(t)):Z(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Y(t)?(o=O,M(t)):Z(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):Y(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||X(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||X(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return Z(t)?Q(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var oi={name:`labelEnd`,resolveAll:ui,resolveTo:di,tokenize:fi},si={tokenize:pi},ci={tokenize:mi},li={tokenize:hi};function ui(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Dn(e,0,e.length,n),e}function di(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=On(o,e.slice(i+1,i+r+3)),o=On(o,[[`enter`,l,t]]),o=On(o,er(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=On(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=On(o,e.slice(a+1)),o=On(o,[[`exit`,s,t]]),Dn(e,i,e.length,o),e}function fi(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Pn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(si,u,o?u:d)(t):t===91?e.attempt(ci,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(li,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function pi(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return X(t)?Vr(e,a)(t):a(t)}function a(t){return t===41?u(t):Rr(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return X(t)?Vr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Br(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return X(t)?Vr(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function mi(e,t,n){let r=this;return i;function i(t){return zr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function hi(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var gi={name:`labelStartImage`,resolveAll:oi.resolveAll,tokenize:_i};function _i(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var vi={name:`labelStartLink`,resolveAll:oi.resolveAll,tokenize:yi};function yi(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var bi={name:`lineEnding`,tokenize:xi};function xi(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}}var Si={name:`thematicBreak`,tokenize:Ci};function Ci(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Y(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Z(t)?Q(e,s,`whitespace`)(t):s(t))}}var $={continuation:{tokenize:Di},exit:ki,name:`list`,tokenize:Ei},wi={partial:!0,tokenize:Ai},Ti={partial:!0,tokenize:Oi};function Ei(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Ln(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Si,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Ln(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(sr,r.interrupt?n:u,e.attempt(wi,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Z(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Di(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(sr,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Z(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ti,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt($,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Oi(e,t,n){let r=this;return Q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function ki(e){e.exit(this.containerState.type)}function Ai(e,t,n){let r=this;return Q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var ji={name:`setextUnderline`,resolveTo:Mi,tokenize:Ni};function Mi(e,t){let n=new qn,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function Ni(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Z(t)?Q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Y(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Pi={tokenize:Fi};function Fi(e){let t=this,n=e.attempt(sr,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Nr,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Ii={resolveAll:Bi()},Li=zi(`string`),Ri=zi(`text`);function zi(e){return{resolveAll:Bi(e===`text`?Vi:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Bi(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Vi(e,t){let n=new qn,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Hi=e({attentionMarkers:()=>Xi,contentInitial:()=>Wi,disable:()=>Zi,document:()=>Ui,flow:()=>Ki,flowInitial:()=>Gi,insideSpan:()=>Yi,string:()=>qi,text:()=>Ji}),Ui={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:lr},Wi={91:Hr},Gi={[-2]:xr,[-1]:xr,32:xr},Ki={35:Jr,42:Si,45:[ji,Si],60:$r,61:ji,95:Si,96:yr,126:yr},qi={38:hr,92:pr},Ji={[-5]:bi,[-4]:bi,[-3]:bi,33:gi,38:hr,42:tr,60:[ar,ii],91:vi,92:[Kr,pr],93:oi,95:tr,96:Tr},Yi={null:[tr,Ii]},Xi={null:[42,95]},Zi={null:[]};function Qi(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=On(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=er(a,l.events,l),l.events):[]}function f(e,t){return ea(p(e),t)}function p(e){return $i(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Y(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Dn(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $i(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ea(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
3
3
|
`;break;case-3:o=`\r
|
|
4
4
|
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function ta(e){let t={constructs:An([Hi,...(e||{}).extensions||[]]),content:n(Gn),defined:[],document:n(Yn),flow:n(Pi),lazy:{},string:n(Li),text:n(Ri)};return t;function n(e){return n;function n(n){return Qi(t,e,n)}}}function na(e){for(;!jr(e););return e}var ra=/[\0\t\n\r]/g;function ia(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){ra.lastIndex=c;let n=ra.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var aa=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function oa(e){return e.replace(aa,sa)}function sa(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Nn(n.slice(t?2:1),t?16:10)}return En(n)||e}var ca={}.hasOwnProperty;function la(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ua(n)(na(ta(n).document().write(ia()(e,t,!0))))}function ua(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(_e),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(pe),blockQuote:o(ce),characterEscape:E,characterReference:E,codeFenced:o(le),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(le,s),codeText:o(ue,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(de),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(fe),hardBreakEscape:o(me),hardBreakTrailing:o(me),htmlFlow:o(he,s),htmlFlowData:E,htmlText:o(he,s),htmlTextData:E,image:o(ge),label:s,link:o(_e),listItem:o(ye),listItemValue:p,listOrdered:o(ve,f),listUnordered:o(ve),paragraph:o(be),reference:L,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(pe),strong:o(z),thematicBreak:o(Se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:R,characterReference:ae,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(j),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(ee),htmlTextData:D,image:l(N),label:P,labelText:te,lineEnding:O,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:ne,resourceTitleString:F,resource:I,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};fa(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),ca.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||ma).call(o,void 0,e[0])}for(r.position={start:da(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:da(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:da(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+zt({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ma).call(this,e,r[0])),n.position.end=da(e.end)}function d(){return xn(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Pn(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:da(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=da(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=da(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=oa(t),n.identifier=Pn(t).toLowerCase()}function P(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function I(){this.data.inReference=void 0}function L(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ie(e){this.data.characterReferenceType=e.type}function R(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Nn(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=En(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=da(e.end)}function oe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[],position:void 0}}function le(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ue(){return{type:`inlineCode`,value:``,position:void 0}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function fe(){return{type:`emphasis`,children:[],position:void 0}}function pe(){return{type:`heading`,depth:0,children:[],position:void 0}}function me(){return{type:`break`,position:void 0}}function he(){return{type:`html`,value:``,position:void 0}}function ge(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function _e(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function be(){return{type:`paragraph`,children:[],position:void 0}}function z(){return{type:`strong`,children:[],position:void 0}}function xe(){return{type:`text`,value:``,position:void 0}}function Se(){return{type:`thematicBreak`,position:void 0}}}function da(e){return{line:e.line,column:e.column,offset:e.offset}}function fa(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?fa(e,r):pa(e,r)}}function pa(e,t){let n;for(n in t)if(ca.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ma(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+zt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zt({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+zt({start:t.start,end:t.end})+`) is still open`)}function ha(e){let t=this;t.parser=n;function n(n){return la(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ga(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function _a(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{G as t,L as n,d as r,i,lt as a,t as o,u as s}from"./appCtx-DCiGJFAe.js";import{a as c}from"./preload-helper-B40dBmwL.js";import{S as l,f as u}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{G as t,L as n,d as r,i,lt as a,t as o,u as s}from"./appCtx-DCiGJFAe.js";import{a as c}from"./preload-helper-B40dBmwL.js";import{S as l,f as u}from"./index-Bt13tvIX.js";import{t as d}from"./TaskDrawer-CSZ7Z0JC.js";import{n as f,t as p}from"./requestData-w6fhCYmh.js";import{n as m,r as h}from"./copy-CKsXEjMi.js";var g=e(a(),1),_=t();function v({id:e,clipboard:t}){let[n,i]=(0,g.useState)(null);(0,g.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>i(null),5e3);return()=>clearTimeout(e)},[n]);let a=m(n,e),o=async()=>{let n=e,r=await h(n,t??globalThis.navigator?.clipboard);i({id:n,result:r})};return(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,_.jsx)(`span`,{className:`font-mono text-sm text-slate-500 select-all dark:text-slate-400`,children:e}),(0,_.jsxs)(`button`,{type:`button`,"aria-label":`要望 ID をコピー`,onMouseDown:e=>e.preventDefault(),onClick:()=>void o(),className:s(`secondary`,`px-2 py-0.5 text-sm focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:outline-none`),children:[a?.ok?(0,_.jsx)(x,{}):(0,_.jsx)(b,{}),`コピー`]}),(0,_.jsx)(`span`,{role:`status`,className:r(`min-w-0 text-sm break-words`,a?.ok?`text-emerald-600 dark:text-emerald-400`:`text-rose-600 dark:text-rose-400`),children:a?.text??``})]})}var y={"aria-hidden":!0,viewBox:`0 0 16 16`,className:`size-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`};function b(){return(0,_.jsxs)(`svg`,{...y,children:[(0,_.jsx)(`rect`,{x:`5.5`,y:`5.5`,width:`8`,height:`8`,rx:`1.5`}),(0,_.jsx)(`path`,{d:`M10.5 3.5v-.5A1.5 1.5 0 0 0 9 1.5H3A1.5 1.5 0 0 0 1.5 3v6A1.5 1.5 0 0 0 3 10.5h.5`})]})}function x(){return(0,_.jsx)(`svg`,{...y,className:`size-3.5 text-emerald-600 dark:text-emerald-400`,children:(0,_.jsx)(`path`,{d:`M3 8.5l3 3 7-7`})})}function S(){let{requestId:e}=u.useParams();return(0,_.jsx)(p,{requestId:e,fallback:(0,_.jsx)(`div`,{className:`p-10`,children:(0,_.jsxs)(i,{children:[e,` は見つかりません`]})}),children:(0,_.jsx)(w,{})},e)}var C=[{to:`/requests/$requestId`,label:`概要・Preflight`,exact:!0},{to:`/requests/$requestId/board`,label:`タスクボード`,exact:!1},{to:`/requests/$requestId/done`,label:`対応済み`,exact:!1,hint:`人が「済み」にしたタスクの一覧(要望のステータスの「対応済」とは別)`}];function w(){let e=o(),t=f(),{request:r,tasks:i}=t,{task:a}=u.useSearch(),s=n(),p=i.filter(e=>e.status===`done`).length;return(0,_.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,_.jsxs)(`div`,{className:`shrink-0 border-b border-slate-200 bg-white px-6 pt-4 dark:border-slate-800 dark:bg-slate-900`,children:[!!t.ancestors?.length&&(0,_.jsx)(`nav`,{"aria-label":`親の要望`,className:`mb-1 flex min-w-0 flex-wrap items-center gap-x-1 gap-y-0.5 text-sm text-slate-500`,children:t.ancestors.map(e=>(0,_.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[(0,_.jsx)(c,{to:`/requests/$requestId`,params:{requestId:e.id},className:`min-w-0 break-all underline hover:text-slate-800 dark:hover:text-slate-200`,children:e.title}),(0,_.jsx)(`span`,{"aria-hidden":`true`,children:`›`})]},e.id))}),(0,_.jsx)(v,{id:r.id}),(0,_.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,_.jsx)(`h1`,{className:`min-w-0 text-xl font-bold break-words`,children:r.title}),i.length>0&&(0,_.jsxs)(`span`,{className:`text-sm whitespace-nowrap text-slate-500`,children:[`タスク `,p,`/`,i.length,` 完了`]})]}),t.gone&&(0,_.jsxs)(`p`,{role:`alert`,className:`mt-2 rounded-md bg-rose-50 px-3 py-2 text-rose-800 dark:bg-rose-950 dark:text-rose-300`,children:[`この要望は見つかりません(外で削除・アーカイブされました)。表示は最後に読み込めた内容で、保存はしません。 入力中の内容は残っているので、必要なら写してから`,` `,(0,_.jsx)(c,{to:`/`,className:`underline`,children:`進捗へ戻って`}),`ください。`]}),t.loadError&&!t.gone&&(0,_.jsxs)(`p`,{role:`alert`,className:`mt-2 rounded-md bg-amber-50 px-3 py-2 text-amber-800 dark:bg-amber-950 dark:text-amber-300`,children:[`最新の内容を読み込めませんでした(表示は前の内容のまま): `,t.loadError,` `,(0,_.jsx)(`button`,{type:`button`,className:`underline`,onClick:()=>t.reload(),children:`もう一度読み込む`})]}),(0,_.jsx)(`nav`,{"aria-label":`要望のタブ`,className:`-mb-px mt-3 flex gap-1 overflow-x-auto`,children:C.map(e=>(0,_.jsx)(c,{title:`hint`in e?e.hint:void 0,to:e.to,params:{requestId:r.id},activeOptions:{exact:e.exact,includeSearch:!1},className:`border-b-2 px-3 py-2 font-medium whitespace-nowrap`,activeProps:{className:`border-indigo-600 text-indigo-700 dark:text-indigo-300`},inactiveProps:{className:`border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-200`},children:e.label},e.to))})]}),(0,_.jsx)(`div`,{className:`relative min-h-0 flex-1 overflow-auto`,"data-testid":`request-content`,children:(0,_.jsx)(l,{})}),a&&(0,_.jsx)(d,{ctx:e,data:t,id:a,onClose:()=>void s({to:`.`,search:e=>({...e,task:void 0})})})]})}export{S as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,G as n,L as r,O as i,a,d as o,f as s,h as c,i as l,lt as u,n as d,r as f,s as p,t as m,x as h}from"./appCtx-DCiGJFAe.js";import{a as g}from"./preload-helper-B40dBmwL.js";import{o as _,u as v}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,G as n,L as r,O as i,a,d as o,f as s,h as c,i as l,lt as u,n as d,r as f,s as p,t as m,x as h}from"./appCtx-DCiGJFAe.js";import{a as g}from"./preload-helper-B40dBmwL.js";import{o as _,u as v}from"./index-Bt13tvIX.js";import{a as y,n as b,r as x,t as S}from"./Outputs-CQi0oba1.js";import{n as C,o as w,s as T,t as E}from"./workTarget-Cijqq4yH.js";import{t as D}from"./format-DuK6P1hb.js";import{n as O}from"./requestData-w6fhCYmh.js";import{t as k}from"./directTask-Dk3H5Q2B.js";var A=e(u(),1),j=n(),M=[`draft`,`preflight`,`reviewed`];function N({dialog:e,request:t,project:n,onCreated:r,onFailed:o,onClose:c}){let l=E(n)??``,[u,d]=(0,A.useState)(``),[p,m]=(0,A.useState)(``),[g,_]=(0,A.useState)(l),[v,y]=(0,A.useState)(!1),[b,x]=(0,A.useState)(null),S=(0,A.useRef)(!1);i(!!(u.trim()||p.trim())),(0,A.useEffect)(()=>{let t=e.current;if(!t)return;let n=()=>{t.open||(d(``),m(``),_(l),x(null))};return t.addEventListener(`close`,n),()=>t.removeEventListener(`close`,n)},[e,l]);async function w(i){if(i.preventDefault(),!S.current){if(!u.trim()){x(`題を入れてください(空白だけの題では作れません)`);return}S.current=!0,y(!0),x(null);try{let i={title:u.trim(),body:p,status:`todo`};n.repos.length&&(i.repo=g===``?null:g);let a=await h.createTask(t.id,i);r(a,!!a.reopened),e.current?.close()}catch(e){x(`保存できませんでした: ${e.message}。タスクの一覧を読み直しました。同じタスクが未着手にできていないか確かめてから、もう一度保存してください。`),o()}finally{S.current=!1,y(!1)}}}let T=C(n,g===``?null:g);return(0,j.jsx)(`dialog`,{ref:e,onClose:c,onCancel:e=>S.current&&e.preventDefault(),"aria-labelledby":`new-task-title`,className:`m-auto max-h-[90vh] w-[min(calc(100vw-1rem),720px)] max-w-none rounded-lg bg-white p-0 text-slate-900 backdrop:bg-black/60 dark:bg-slate-900 dark:text-slate-100`,children:(0,j.jsxs)(`form`,{onSubmit:e=>void w(e),className:`flex max-h-[90vh] flex-col`,children:[(0,j.jsxs)(`div`,{className:`border-b border-slate-200 p-3 sm:p-4 dark:border-slate-800`,children:[(0,j.jsx)(`h2`,{id:`new-task-title`,className:`font-semibold`,children:`タスクを追加(Preflight を通さない)`}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-slate-500`,children:k})]}),(0,j.jsxs)(`div`,{className:`min-h-0 space-y-3 overflow-y-auto p-3 sm:p-4`,children:[(0,j.jsx)(a,{label:`題`,children:(0,j.jsx)(`input`,{className:s,value:u,onChange:e=>d(e.target.value),disabled:v,autoFocus:!0})}),(0,j.jsx)(a,{label:`本文(作業内容・完了条件)`,children:(0,j.jsx)(`textarea`,{rows:8,className:`${s} font-mono`,value:p,onChange:e=>m(e.target.value),disabled:v})}),n.repos.length>0&&(0,j.jsx)(a,{label:`作業先`,children:(0,j.jsx)(`select`,{className:`w-full rounded-md border-0 bg-white px-2.5 py-1.5 text-base ring-1 ring-slate-300 ring-inset focus:ring-2 focus:ring-indigo-500 focus:outline-none dark:bg-slate-900 dark:ring-slate-700`,value:g,onChange:e=>_(e.target.value),disabled:v,children:T.map(e=>(0,j.jsx)(`option`,{value:e.value,children:e.label},e.value))})}),M.includes(t.status)&&(0,j.jsx)(`p`,{className:`text-sm text-slate-500`,children:`タスクを足しても要望のステータスは変わりません。作業を始めるときは、概要のタブでステータスを「進行中」にしてください。`}),t.status===`resolved`&&(0,j.jsx)(`p`,{className:`text-sm text-slate-500`,children:`対応済の要望に未着手のタスクを足すと、要望は進行中に戻ります。`}),b&&(0,j.jsx)(`p`,{role:`alert`,className:`text-rose-600`,children:b})]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2 border-t border-slate-200 p-3 sm:p-4 dark:border-slate-800`,children:[(0,j.jsx)(f,{type:`button`,onClick:()=>e.current?.close(),disabled:v,children:`取消`}),(0,j.jsx)(f,{type:`submit`,variant:`primary`,disabled:v,children:v?`作成中…`:`作成`})]})]})})}function P(){let e=m(),{request:n,tasks:i,reload:a,superseded:o}=O(),[s,c]=(0,A.useState)(null),[u,d]=(0,A.useState)(null),[p,_]=(0,A.useState)(null),y=(0,A.useRef)(null),b=(0,A.useRef)(null),x=(0,A.useRef)(null),{add:S}=v.useSearch(),C=r({from:v.fullPath});(0,A.useEffect)(()=>{S&&(b.current=x.current,_(null),y.current?.showModal(),C({search:e=>({...e,add:void 0}),replace:!0}))},[S,C]);let E=new Set(i.filter(e=>e.status===`done`).map(e=>e.id)),D=i.filter(e=>e.status===`done`&&e.checkedAt).length;async function k(n,r){try{let e=await h.patchTask(n.ref,{...r,rev:n.rev}),t=T(e);d(t?`警告: ${t}`:null)}catch(e){d(t(e)===`rev_conflict`?`${n.id} は他で更新されました。最新を読み込みました。`:String(e))}a(),e.reload()}let M=(e,t)=>{let n=i.find(t=>t.id===e);n&&n.status!==t&&k(n,{status:t})},P=e=>{b.current=e.currentTarget,_(null),y.current?.showModal()},F=(0,j.jsx)(N,{dialog:y,request:n,project:e.info.project,onCreated:(t,n)=>{_(`${t.id} を未着手に作成しました${n?`(要望は進行中に戻りました)`:``}`),a(),e.reload()},onFailed:()=>{a(),e.reload()},onClose:()=>b.current?.focus()}),R=(t,r)=>{let a=i.filter(e=>e.status===t&&!e.checkedAt);return(0,j.jsx)(I,{status:t,count:a.length,aside:r,onDrop:()=>{s&&M(s,t),c(null)},children:a.map(r=>(0,j.jsx)(L,{task:r,done:t===`done`,tasks:i,doneIds:E,replaced:w(o[r.id],n.id),dragging:s===r.id,onDragStart:()=>c(r.id),onOpen:()=>e.open(r.ref),onCheck:()=>void k(r,{checked:!0})},r.id))})};return(0,j.jsxs)(`div`,{className:`flex h-full flex-col`,children:[u&&(0,j.jsx)(`div`,{className:`bg-amber-50 px-5 py-2 text-amber-800 dark:bg-amber-950 dark:text-amber-300`,children:u}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 px-5 pt-4`,children:[(0,j.jsx)(f,{ref:x,onClick:P,title:`Preflight を通さずに、この要望へタスクを直接足す`,children:`+ タスクを追加`}),p&&(0,j.jsx)(`span`,{role:`status`,className:`text-sm text-emerald-700 dark:text-emerald-400`,children:p})]}),F,i.length?(0,j.jsxs)(`div`,{className:`grid gap-4 p-5 md:min-h-0 md:flex-1 md:grid-rows-[minmax(0,3fr)_minmax(0,2fr)]`,children:[(0,j.jsxs)(`div`,{className:`grid gap-4 md:min-h-0 md:grid-cols-2`,children:[R(`todo`),R(`done`,D>0?(0,j.jsxs)(g,{to:`/requests/$requestId/done`,params:{requestId:n.id},className:`text-sm text-slate-500 hover:text-indigo-600 hover:underline`,title:`済みにしたタスクの一覧`,children:[`済み `,D,` 件 →`]}):null)]}),R(`doing`)]}):(0,j.jsx)(`div`,{className:`mx-auto w-full max-w-xl p-5 md:p-10`,children:(0,j.jsx)(l,{children:"タスクはまだありません。概要のタブから Preflight を実行してタスク化するか、「タスクを追加」で直接作ってください(CLI では `p3 new`)。"})})]})}var F={todo:(0,j.jsx)(y,{}),doing:(0,j.jsx)(b,{}),done:(0,j.jsx)(x,{checked:!1})};function I({status:e,count:t,aside:n,onDrop:r,children:i}){let[a,s]=(0,A.useState)(!1);return(0,j.jsxs)(`section`,{onDragOver:e=>(e.preventDefault(),s(!0)),onDragLeave:()=>s(!1),onDrop:()=>(s(!1),r()),className:o(`flex min-h-0 min-w-0 flex-col rounded-lg bg-slate-100 dark:bg-slate-900`,a&&`ring-2 ring-indigo-400`),children:[(0,j.jsxs)(`header`,{className:`flex items-center gap-2 px-3 py-2.5`,children:[F[e],(0,j.jsx)(`span`,{className:`font-semibold`,children:_[e]}),(0,j.jsx)(`span`,{className:`text-sm text-slate-500`,children:t}),(0,j.jsx)(`span`,{className:`ml-auto`,children:n})]}),(0,j.jsx)(`div`,{className:`grid flex-1 auto-rows-min grid-cols-[repeat(auto-fill,minmax(16rem,1fr))] gap-2 overflow-y-auto px-2 pb-3`,children:i})]})}function L({task:e,done:t,tasks:n,doneIds:r,replaced:i,dragging:a,onDragStart:s,onOpen:l,onCheck:u}){let f=e.relations.filter(e=>e.type===`depends_on`&&!e.target.includes(`/`)&&!r.has(e.target)),m=n.filter(t=>t.relations.some(t=>t.type===`depends_on`&&t.target===e.id)).length,h=e.relations.filter(e=>e.origin===`ai`||e.origin===`preflight`).length,{info:g}=c(),_=g.project.repos.length?e.repo:void 0;return(0,j.jsxs)(`article`,{draggable:!0,onDragStart:s,onClick:l,className:o(`cursor-pointer rounded-md bg-white p-3 shadow-sm ring-1 ring-slate-200 transition hover:shadow-md dark:bg-slate-800 dark:ring-slate-700`,a&&`opacity-50`),children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(p,{id:e.id}),_!==void 0&&(0,j.jsx)(d,{tone:_?`emerald`:`slate`,className:`max-w-full`,title:`作業先`,children:(0,j.jsx)(`span`,{className:`truncate`,children:_??`作業先なし`})})]}),e.updatedBy&&(0,j.jsx)(`span`,{className:`truncate text-sm text-slate-400`,children:e.updatedBy})]}),(0,j.jsx)(`p`,{className:`mt-1 leading-snug font-medium wrap-anywhere`,children:e.title}),(f.length>0||m>0||h>0||e.labels.length>0||i)&&(0,j.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:[i&&!t&&(0,j.jsx)(d,{tone:`rose`,title:`新しいタスクに置き換えられています。着手する前に確かめてください`,children:i}),f.length>0&&!t&&(0,j.jsxs)(d,{tone:`amber`,title:f.map(e=>e.target).join(`, `),children:[`待ち `,f.length]}),m>0&&(0,j.jsxs)(d,{tone:`violet`,title:`このタスクに依存しているタスク数`,children:[`後続 `,m]}),h>0&&(0,j.jsxs)(d,{tone:`indigo`,title:`AI / preflight が張った関係`,children:[`AI関係 `,h]}),e.labels.map(e=>(0,j.jsx)(d,{children:e},e))]}),(e.outputs.length>0||!!e.repoOutputs?.length)&&(0,j.jsx)(S,{outputs:e.outputs,repoOutputs:e.repoOutputs,compact:!0}),(0,j.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[(e.doneAt||e.startedAt)&&(0,j.jsx)(`span`,{className:`text-sm text-slate-400`,title:`ステータスを変えたときに記録された日時`,children:e.doneAt?`完了 ${D(e.doneAt)}`:`作業中にした ${D(e.startedAt)}`}),t&&(0,j.jsx)(`button`,{onClick:e=>(e.stopPropagation(),u()),title:`成果物を確認したら済みにする(このボードから消え、対応済みの一覧に移る)`,className:`ml-auto flex items-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium text-emerald-700 ring-1 ring-emerald-300 hover:bg-emerald-50 dark:text-emerald-400 dark:ring-emerald-800 dark:hover:bg-emerald-950`,children:`✓ 済み`})]})]})}export{P as component};
|