gitifact 0.8.3 → 0.8.5

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.
Files changed (81) hide show
  1. package/README.md +5 -2
  2. package/dist/browser/assets/{HgiRefresh-UIdBFt6N.js → HgiRefresh-BSPkIVFZ.js} +1 -1
  3. package/dist/browser/assets/{Markdown-CR_AHfxJ.js → Markdown-B1P3lpA0.js} +1 -1
  4. package/dist/browser/assets/Selector-BG3Gd_OR.js +2 -0
  5. package/dist/browser/assets/{Tab-DL11wx1W.js → Tab-RKLZrCiK.js} +1 -1
  6. package/dist/browser/assets/{Table-BK5793GP.js → Table-DjTkmoR7.js} +2 -2
  7. package/dist/browser/assets/Token-CKcN25HT.css +1 -0
  8. package/dist/browser/assets/Token-D337a1e3.js +2 -0
  9. package/dist/browser/assets/{about-3BiGgi3V.js → about-D06ipt4C.js} +2 -2
  10. package/dist/browser/assets/activity-timeline-Bl6a55GR.js +2 -0
  11. package/dist/browser/assets/changelog-DCvEVceR.js +1 -0
  12. package/dist/browser/assets/commit-Cj7mcn9u.js +4 -0
  13. package/dist/browser/assets/{contributor-Cg_cxulE.js → contributor-D1TZSDq9.js} +1 -1
  14. package/dist/browser/assets/contributors-lkpVuCXS.js +1 -0
  15. package/dist/browser/assets/{contributors._email-BoTYVUTP.js → contributors._email-B7ATmxN1.js} +1 -1
  16. package/dist/browser/assets/{contributors.index-DrdKDOYt.js → contributors.index-Cc0QRJwQ.js} +1 -1
  17. package/dist/browser/assets/dashboard.index-BNTyn3_V.js +1 -0
  18. package/dist/browser/assets/document-7jVYmB_Z.js +2 -0
  19. package/dist/browser/assets/{document-CteWuasx.js → document-kGFspd5u.js} +4 -4
  20. package/dist/browser/assets/features-CBeEOrok.js +2 -0
  21. package/dist/browser/assets/features-FKxsPKab.css +1 -0
  22. package/dist/browser/assets/{features._featureId-CHZA4Y9C.js → features._featureId-DGUBnzjL.js} +1 -1
  23. package/dist/browser/assets/{features.index-BY8ScP1y.js → features.index-Dgw4kiMG.js} +1 -1
  24. package/dist/browser/assets/getting-started-B_LeBSZE.js +1 -0
  25. package/dist/browser/assets/git-DW-pzDOm.js +1 -0
  26. package/dist/browser/assets/index-CswY1wJ4.css +1 -0
  27. package/dist/browser/assets/index-IML0_BCy.js +49 -0
  28. package/dist/browser/assets/instructions-Qhbd8_KG.js +1 -0
  29. package/dist/browser/assets/{instructions._instructionId-D-pztPg5.js → instructions._instructionId-CnX6OyFZ.js} +1 -1
  30. package/dist/browser/assets/instructions.agents-0tKcPahQ.js +1 -0
  31. package/dist/browser/assets/instructions.index-B3v6vtEg.js +1 -0
  32. package/dist/browser/assets/{lazyRouteComponent-DcCLQOpn.js → lazyRouteComponent-tJOK5sxC.js} +1 -1
  33. package/dist/browser/assets/load-more-DVsjzCxE.js +1 -0
  34. package/dist/browser/assets/page-header-AS8jZ1ve.js +248 -0
  35. package/dist/browser/assets/records._recordId-C2qxnLKN.js +1 -0
  36. package/dist/browser/assets/records.commits._commit-CSa3sQ8C.js +1 -0
  37. package/dist/browser/assets/records.docs._docId-SIPsGTwH.js +1 -0
  38. package/dist/browser/assets/records.index-DoE_3GrP.js +1 -0
  39. package/dist/browser/assets/records.working-Cp5ualrr.js +1 -0
  40. package/dist/browser/assets/search-CbtiuqNx.js +1 -0
  41. package/dist/browser/assets/{settings-D2ZdL-Vu.js → settings-tVQIx1Uf.js} +1 -1
  42. package/dist/browser/assets/{useInfiniteQuery-guh_cfSb.js → useInfiniteQuery-C0rB-9Ci.js} +1 -1
  43. package/dist/browser/assets/{useKeyboardHint-BD_Jlpwp.js → useKeyboardHint-D5jGavym.js} +1 -1
  44. package/dist/browser/index.html +24 -24
  45. package/dist/i18n/en/block.md +2 -2
  46. package/dist/i18n/en/changelog.md +22 -0
  47. package/dist/i18n/en/docs/design.md +2 -0
  48. package/dist/i18n/en/docs/spec.md +30 -5
  49. package/dist/i18n/en/docs/workflow.md +4 -4
  50. package/dist/i18n/ko/block.md +2 -2
  51. package/dist/i18n/ko/changelog.md +22 -0
  52. package/dist/i18n/ko/docs/design.md +2 -0
  53. package/dist/i18n/ko/docs/spec.md +30 -5
  54. package/dist/i18n/ko/docs/workflow.md +4 -4
  55. package/dist/main.js +273 -126
  56. package/package.json +3 -3
  57. package/dist/browser/assets/Selector-CPFOT7Wj.js +0 -2
  58. package/dist/browser/assets/Token-BnQGlhSv.js +0 -2
  59. package/dist/browser/assets/Token-Bqkc8eyB.css +0 -1
  60. package/dist/browser/assets/activity-timeline-CCrOFWbb.js +0 -2
  61. package/dist/browser/assets/changelog-DMiOCVuF.js +0 -1
  62. package/dist/browser/assets/commit-CMw0y1Oj.js +0 -4
  63. package/dist/browser/assets/contributors-ol5bZm_T.js +0 -1
  64. package/dist/browser/assets/dashboard.index-BUzgcF91.js +0 -1
  65. package/dist/browser/assets/document-C2htw6u5.js +0 -2
  66. package/dist/browser/assets/features-DUHxz0_L.css +0 -1
  67. package/dist/browser/assets/features-haTu80rD.js +0 -2
  68. package/dist/browser/assets/getting-started-GU6t7LF-.js +0 -1
  69. package/dist/browser/assets/git-D2zVLj_w.js +0 -1
  70. package/dist/browser/assets/index-D1JeDnJc.css +0 -1
  71. package/dist/browser/assets/index-DaKOj2qL.js +0 -49
  72. package/dist/browser/assets/instructions-mU0nkIyN.js +0 -1
  73. package/dist/browser/assets/instructions.agents-WcmyZITb.js +0 -1
  74. package/dist/browser/assets/instructions.index-BEJLVyZD.js +0 -1
  75. package/dist/browser/assets/load-more-YVDkQmcp.js +0 -1
  76. package/dist/browser/assets/page-header-rHElc4Gv.js +0 -246
  77. package/dist/browser/assets/records._recordId-CQAy7eOv.js +0 -1
  78. package/dist/browser/assets/records.commits._commit-BP1KDLvt.js +0 -1
  79. package/dist/browser/assets/records.index-CZ6iNU57.js +0 -1
  80. package/dist/browser/assets/records.working-Bv9veUIm.js +0 -1
  81. package/dist/browser/assets/search-CSSuO-jR.js +0 -1
@@ -0,0 +1,4 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{l as t,q as n}from"./themeProps-CkLe5zXY.js";import{a as r,r as i,s as a}from"./document-kGFspd5u.js";import{Ct as o,L as s,M as c,O as l,St as u,Tt as d,U as f,_ as p,_t as m,a as h,an as g,g as _,gt as v,h as y,j as b,l as x,mn as S,mt as C,t as w,u as T,un as E,v as ee,wt as te,y as D}from"./page-header-AS8jZ1ve.js";import{h as O,i as ne,n as re,r as k,s as ie}from"./document-7jVYmB_Z.js";import{g as ae,p as oe}from"./Table-DjTkmoR7.js";import{t as se}from"./useMediaQuery-twbHF0pO.js";import{w as A}from"./Icon-DPaLmsmh.js";import{n as ce}from"./IconButton-Br-4XhQr.js";import{c as le}from"./Markdown-B1P3lpA0.js";import{t as ue}from"./Selector-BG3Gd_OR.js";import{i as de}from"./lazyRouteComponent-tJOK5sxC.js";import{n as fe,t as j}from"./Tab-RKLZrCiK.js";import{t as M}from"./useInfiniteQuery-C0rB-9Ci.js";import{a as N,n as pe,o as P,r as me,t as F}from"./Token-D337a1e3.js";import{t as I}from"./load-more-DVsjzCxE.js";import{t as he}from"./contributor-D1TZSDq9.js";import{a as ge,i as L,t as R}from"./activity-timeline-Bl6a55GR.js";function z(e){let t=d();return te(t.stores.location,de(e,t))}var B=e(n(),1),_e=4e6;function V(e,t){let n=e.length,r=t.length;if(n*r>_e)return[...e.map(()=>`del`),...t.map(()=>`add`)];let i=r+1,a=new Uint32Array((n+1)*i);for(let o=n-1;o>=0;o--)for(let n=r-1;n>=0;n--)a[o*i+n]=e[o]===t[n]?a[(o+1)*i+n+1]+1:Math.max(a[(o+1)*i+n],a[o*i+n+1]);let o=[],s=0,c=0;for(;s<n&&c<r;)e[s]===t[c]?(o.push(`same`),s++,c++):a[(s+1)*i+c]>=a[s*i+c+1]?(o.push(`del`),s++):(o.push(`add`),c++);for(;s++<n;)o.push(`del`);for(;c++<r;)o.push(`add`);return o}var H=e=>e===null?[]:e.replace(/\r\n/g,`
2
+ `).replace(/\n$/,``).split(`
3
+ `);function ve(e,t){let n=H(e),r=H(t),i=[],a=0,o=0;for(let e of V(n,r))e===`same`?(i.push({type:`same`,text:n[a],old:a+1,new:o+1}),a++,o++):e===`del`?(i.push({type:`del`,text:n[a],old:a+1}),a++):(i.push({type:`add`,text:r[o],new:o+1}),o++);return i}function ye(e,t=3){let n=[],r=0,i=(e,t)=>{if(!t.length)return;let r=n[n.length-1];e===`lines`&&r?.kind===`lines`?r.lines.push(...t):n.push({kind:e,lines:t})};for(;r<e.length;){let n=r,a=e[r].type===`same`;for(;n<e.length&&e[n].type===`same`===a;)n++;let o=e.slice(r,n);if(!a)i(`lines`,o);else{let a=r===0?0:t,s=n===e.length?0:t;o.length>a+s+1?(i(`lines`,o.slice(0,a)),i(`fold`,o.slice(a,o.length-s)),i(`lines`,o.slice(o.length-s))):i(`lines`,o)}r=n}return n}var U=e=>e.match(/\s+|[\p{L}\p{N}_]+|[^\s\p{L}\p{N}_]/gu)??[];function be(e,t){let n=U(e),r=U(t),i={before:[],after:[]},a=0,o=0,s=(e,t,n)=>{let r=e[e.length-1];r&&r.changed===n?r.text+=t:e.push({text:t,changed:n})};for(let e of V(n,r))e===`same`?(s(i.before,n[a],!1),s(i.after,r[o],!1),a++,o++):e===`del`?s(i.before,n[a++],!0):s(i.after,r[o++],!0);return i}function W(e){let t=[],n=0;for(;n<e.length;){if(e[n].type===`same`){t.push([e[n],e[n]]),n++;continue}let r=[],i=[];for(;n<e.length&&e[n].type!==`same`;)(e[n].type===`del`?r:i).push(e[n++]);for(let e=0;e<Math.max(r.length,i.length);e++)t.push([r[e],i[e]])}return t}var G={frame:`_frame_196wm_4`,diff:`_diff_196wm_3`,numberColumn:`_numberColumn_196wm_8`,signColumn:`_signColumn_196wm_9`,number:`_number_196wm_8`,numberRight:`_numberRight_196wm_11`,split:`_split_196wm_11`,sign:`_sign_196wm_9`,code:`_code_196wm_14`,del:`_del_196wm_15`,add:`_add_196wm_16`,empty:`_empty_196wm_19`,word:`_word_196wm_21`,foldRow:`_foldRow_196wm_23`,"token-keyword":`_token-keyword_196wm_28`,"token-string":`_token-string_196wm_29`,"token-comment":`_token-comment_196wm_30`,"token-number":`_token-number_196wm_31`,"token-function":`_token-function_196wm_32`,"token-type":`_token-type_196wm_33`,"token-tag":`_token-tag_196wm_34`,"token-attribute":`_token-attribute_196wm_35`,"token-property":`_token-property_196wm_36`,"token-operator":`_token-operator_196wm_37`,"token-constant":`_token-constant_196wm_38`,"token-punctuation":`_token-punctuation_196wm_39`,"token-variable":`_token-variable_196wm_40`},K=t();function xe(e){let t=new Map;for(let[n,r]of W(e)){if(!n||!r||n===r)continue;let e=be(n.text,r.text);e.after.filter(e=>!e.changed).reduce((e,t)=>e+t.text.trim().length,0)*4<Math.max(n.text.trim().length,r.text.trim().length)||(t.set(n,e.before),t.set(r,e.after))}return t}function Se(e){return{ts:`typescript`,tsx:`tsx`,mts:`typescript`,cts:`typescript`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`jsx`,json:`json`,css:`css`,html:`html`,md:`markdown`,yml:`yaml`,yaml:`yaml`,sh:`bash`,bash:`bash`,py:`python`,sql:`sql`,toml:`toml`}[/\.([A-Za-z0-9]+)$/.exec(e??``)?.[1]?.toLowerCase()??``]??`plaintext`}function Ce({text:e,tokens:t}){if(!t?.length)return(0,K.jsx)(K.Fragment,{children:e});let n=[],r=0;for(let i of t)i.start>r&&n.push(e.slice(r,i.start)),n.push((0,K.jsx)(`span`,{className:G[`token-`+i.type]??``,children:e.slice(i.start,i.end)},i.start)),r=i.end;return r<e.length&&n.push(e.slice(r)),(0,K.jsx)(K.Fragment,{children:n.map((e,t)=>(0,K.jsx)(B.Fragment,{children:e},t))})}function q({line:e,marks:t,tokens:n}){if(!e)return null;let r=t.get(e);return r?(0,K.jsx)(K.Fragment,{children:r.map((e,t)=>e.changed?(0,K.jsx)(`mark`,{className:G.word,children:e.text},t):(0,K.jsx)(B.Fragment,{children:e.text},t))}):(0,K.jsx)(Ce,{text:e.text||` `,tokens:n.get(e)})}var we={same:``,del:`−`,add:`+`};function Te({before:e,after:t,label:n,language:r=`plaintext`}){S();let i=se(`(min-width: 1024px)`)?`split`:`unified`,[a,o]=(0,B.useState)(new Set),s=(0,B.useMemo)(()=>ve(e,t),[e,t]),c=(0,B.useMemo)(()=>xe(s),[s]),l=(0,B.useMemo)(()=>{let n=new Map;for(let[i,a]of[[e,`del`],[t,`add`]]){if(i===null)continue;let e=le(i.replace(/\r\n/g,`
4
+ `).replace(/\n$/,``),r),t=0;for(let r of s)if(r.type===`same`||r.type===a){let i=e[t++];i&&n.set(r,i)}}return n},[e,t,r,s]),u=(0,B.useMemo)(()=>ye(s),[s]);return s.some(e=>e.type!==`same`)?(0,K.jsx)(m,{gap:0,className:G.frame,children:(0,K.jsxs)(`table`,{className:`${G.diff} ${i===`split`?G.split:``}`,"aria-label":n,children:[(0,K.jsx)(`colgroup`,{children:(i===`split`?[`number`,`code`,`number`,`code`]:[`number`,`number`,`sign`,`code`]).map((e,t)=>(0,K.jsx)(`col`,{className:e===`number`?G.numberColumn:e===`sign`?G.signColumn:void 0},t))}),(0,K.jsx)(`tbody`,{children:u.map((e,t)=>e.kind===`fold`&&!a.has(t)?(0,K.jsx)(`tr`,{className:G.foldRow,children:(0,K.jsx)(`td`,{colSpan:4,children:(0,K.jsx)(ce,{variant:`ghost`,size:`sm`,label:E(`diff.unfold`,{count:e.lines.length}),onClick:()=>o(new Set(a).add(t))})})},t):i===`split`?W(e.lines).map(([e,n],r)=>(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`td`,{className:`${G.number} ${e?G[e.type]:G.empty}`,children:e?.old??``}),(0,K.jsx)(`td`,{className:`${G.code} ${e?G[e.type]:G.empty}`,children:(0,K.jsx)(q,{line:e,marks:c,tokens:l})}),(0,K.jsx)(`td`,{className:`${G.number} ${G.numberRight} ${n?G[n.type]:G.empty}`,children:n?.new??``}),(0,K.jsx)(`td`,{className:`${G.code} ${n?G[n.type]:G.empty}`,children:(0,K.jsx)(q,{line:n,marks:c,tokens:l})})]},t+`:`+r)):e.lines.map((e,n)=>(0,K.jsxs)(`tr`,{className:G[e.type],children:[(0,K.jsx)(`td`,{className:G.number,children:e.old??``}),(0,K.jsx)(`td`,{className:`${G.number} ${G.numberRight}`,children:e.new??``}),(0,K.jsx)(`td`,{className:G.sign,"aria-hidden":!0,children:we[e.type]}),(0,K.jsx)(`td`,{className:G.code,children:(0,K.jsx)(q,{line:e,marks:c,tokens:l})})]},t+`:`+n)))})]})}):(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:E(`diff.bodyUnchanged`)})}var J={fields:`_fields_17s6f_2`,field:`_field_17s6f_2`,fieldName:`_fieldName_17s6f_4`,fieldBefore:`_fieldBefore_17s6f_5`,fieldAfter:`_fieldAfter_17s6f_6`},Ee=e=>e.id??e.url??e.title??``;function De(e,t,n){let r=e=>e.title??(e.id?n(e.id):e.url)??``,i=[],a=(e,t,n)=>{t!==n&&i.push({name:e,before:[t||`—`],after:[n||`—`],list:!1})},o=(e,t,n,r,a)=>{let o=new Set(t.map(r)),s=new Set(n.map(r)),c=t.filter(e=>!s.has(r(e))).map(a),l=n.filter(e=>!o.has(r(e))).map(a);(c.length||l.length)&&i.push({name:e,before:c,after:l,list:!0})};return a(`title`,e.title,t.title),a(`description`,e.description,t.description),a(`order`,e.order?.toString()??``,t.order?.toString()??``),o(`requirements`,e.requirements??[],t.requirements??[],e=>e,n),o(`sources`,e.sources??[],t.sources??[],Ee,r),a(`path`,e.path,t.path),i}function Oe({before:e,after:t,features:n}){S();let r=a(),i=De(e,t,e=>n.flatMap(e=>e.requirements).find(t=>t.id===e)?.title??r.instructions?.find(t=>t.id===e)?.title??e);return(0,K.jsxs)(m,{gap:4,children:[!!i.length&&(0,K.jsx)(m,{as:`section`,gap:2,"aria-label":E(`diff.fields`),className:J.fields,children:i.map(e=>(0,K.jsxs)(v,{gap:2,wrap:`wrap`,className:J.field,children:[(0,K.jsx)(A,{type:`supporting`,color:`secondary`,className:J.fieldName,children:e.name}),e.list?(0,K.jsxs)(K.Fragment,{children:[e.before.map(e=>(0,K.jsx)(`del`,{className:J.fieldBefore,children:e},`-`+e)),e.after.map(e=>(0,K.jsx)(`ins`,{className:J.fieldAfter,children:e},`+`+e))]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`del`,{className:J.fieldBefore,children:e.before[0]}),(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:`→`}),(0,K.jsx)(`ins`,{className:J.fieldAfter,children:e.after[0]})]})]},e.name))}),(0,K.jsx)(Te,{before:e.body,after:t.body,label:E(`diff.body`),language:`markdown`})]})}var Y={commitPage:`_commitPage_18dvh_2`,commitHeading:`_commitHeading_18dvh_3`,commitMeta:`_commitMeta_18dvh_5`,commitHash:`_commitHash_18dvh_6`,commitHashLink:`_commitHashLink_18dvh_7`,commitSection:`_commitSection_18dvh_8`,reason:`_reason_18dvh_9`,reasonRecords:`_reasonRecords_18dvh_10`,reasonRecord:`_reasonRecord_18dvh_10`,change:`_change_18dvh_15`,changeHead:`_changeHead_18dvh_17`,changePlace:`_changePlace_18dvh_19`,readingSection:`_readingSection_18dvh_21`,sourceRow:`_sourceRow_18dvh_22`,sourcePath:`_sourcePath_18dvh_23`,sourceAdded:`_sourceAdded_18dvh_24`,sourceRemoved:`_sourceRemoved_18dvh_25`,recordList:`_recordList_18dvh_27`,recordItem:`_recordItem_18dvh_28`,recordLink:`_recordLink_18dvh_30`,recordItemMeta:`_recordItemMeta_18dvh_32`,recordCommit:`_recordCommit_18dvh_34`,recordCommitMessage:`_recordCommitMessage_18dvh_35`,recordSections:`_recordSections_18dvh_36`,documentRow:`_documentRow_18dvh_39`,documentTitle:`_documentTitle_18dvh_40`,commitPanel:`_commitPanel_18dvh_42`,recordEntry:`_recordEntry_18dvh_43`,recordItemHead:`_recordItemHead_18dvh_45`,split:`_split_18dvh_48`,splitList:`_splitList_18dvh_49`,splitContent:`_splitContent_18dvh_53`,splitPicker:`_splitPicker_18dvh_54`,splitPickerMore:`_splitPickerMore_18dvh_54`,recordCommitLinks:`_recordCommitLinks_18dvh_62`,commitBack:`_commitBack_18dvh_63`};function ke({change:{event:e,before:t,after:n},features:r,head:a}){S();let o=n??t,s=t=>e.kind===`design`?(0,K.jsx)(ne,{design:t,path:t.path,features:r}):(0,K.jsx)(i,{headingLevelStart:4,path:t.path,children:t.body});return(0,K.jsxs)(m,{gap:4,children:[(0,K.jsxs)(v,{gap:3,wrap:`wrap`,className:Y.changePlace,children:[(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:e.id}),(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:o?.path}),e.kind===`wiki`?null:e.kind===`instruction`?n&&(0,K.jsx)(u,{to:`/instructions/$instructionId`,params:{instructionId:e.id},children:E(`event.currentInstruction`)}):(0,K.jsx)(u,{to:`/features/$featureId`,params:{featureId:o?.specId??``},search:{...e.kind===`feature`?{}:{selected:e.id,tab:e.kind===`design`?`design`:`requirements`}},...e.kind===`feature`?{}:{hash:e.id},children:E(`event.currentFeature`)}),a&&(0,K.jsx)(u,{to:`/records/docs/$docId`,params:{docId:e.id},children:E(`commit.documentHistory`)})]}),t&&n?(0,K.jsx)(Oe,{before:t,after:n,features:r}):n?s(n):t?s(t):(0,K.jsx)(A,{color:`secondary`,children:E(`event.noContent`)})]})}function Ae({change:e,features:t,head:n,current:r}){S();let i=e.after??e.before;return(0,K.jsxs)(m,{id:e.event.id,as:`section`,gap:4,"aria-label":i?.title??e.event.id,className:Y.change,...r?{"aria-current":`location`}:{},children:[(0,K.jsxs)(v,{gap:2,wrap:`wrap`,className:Y.changeHead,children:[(0,K.jsx)(re,{event:e.event}),(0,K.jsx)(g,{level:3,children:i?.title??e.event.id})]}),(0,K.jsx)(ke,{change:e,features:t,head:n})]})}function je({id:e,source:t,features:n,head:r}){S();let i=C(),{shown:a,isPreparing:o}=me(e,e=>t.prepare(i,e)),s=t.use(a);return(0,K.jsx)(pe,{isPreparing:o,contentKey:a,children:s.error?(0,K.jsx)(N,{error:s.error,retry:()=>{s.refetch()}}):s.data?(0,K.jsx)(Ae,{change:s.data,features:n,head:r,current:!1}):(0,K.jsx)(N,{})})}function Me({label:e,summary:t,footer:n,items:r,children:i}){let a=o(),s=r.find(e=>e.selected),c=e=>{let t=e.closest?.(`a[href]`)?.getAttribute(`href`);r.find(e=>e.href===t)?.onIntent?.()};return(0,K.jsxs)(v,{gap:0,className:Y.split,children:[(0,K.jsxs)(m,{as:`nav`,gap:2,"aria-label":e,className:Y.splitList,onMouseOver:e=>c(e.target),onFocus:e=>c(e.target),children:[t,(0,K.jsx)(ae,{density:`compact`,children:r.map(e=>(0,K.jsx)(oe,{label:e.label,description:e.description,href:e.href,isSelected:e.selected,startContent:e.start,endContent:e.end},e.key))}),n]}),(0,K.jsxs)(m,{gap:3,className:Y.splitContent,children:[(0,K.jsx)(m,{gap:0,className:Y.splitPicker,children:(0,K.jsx)(ue,{label:e,isLabelHidden:!0,width:`100%`,value:s?.key??``,options:r.map(e=>({value:e.key,label:e.label,...e.description?{description:e.description}:{}})),onChange:e=>{let t=r.find(t=>t.key===e);t&&a({href:t.href})}})}),n&&(0,K.jsx)(m,{gap:0,className:Y.splitPickerMore,children:n}),i]})]})}function X({label:e,changes:t,source:n,features:r,head:i,documentId:a,href:o,more:s}){S();let c=C(),l=t.find(e=>e.id===a)??t[0];return l?(0,K.jsx)(Me,{label:e,footer:s,items:t.map(e=>({key:e.key,label:e.title,description:e.types.map(e=>E(`change.${e}`)).join(` · `),start:(0,K.jsx)(k,{kind:e.kind}),href:o(e.id),selected:e===l,onIntent:()=>{n.prepare(c,e.id).catch(()=>void 0)}})),children:(0,K.jsx)(je,{id:l.id,source:n,features:r,head:i})}):null}var Ne=e=>({key:e.key,id:e.id,kind:e.kind,types:e.types,title:(e.after??e.before)?.title??e.id});function Pe(e){let t=e?.pages,n=t?.[0];return n?{...n,changes:t.flatMap(e=>e.changes)}:void 0}var Fe=(e,t)=>({use:function(n){return f(y(e,t,n))},prepare:async(n,i)=>{let a=await n.ensureQueryData(y(e,t,i));await r([a.before?.body,a.after?.body])}});function Ie({session:e,commit:t,file:n}){S();let r=f(_(e,t,n.path));return r.error?(0,K.jsx)(A,{type:`supporting`,color:`secondary`,role:`alert`,children:E(`source.fileFailed`)}):r.data?r.data.binary?(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:E(`source.binary`)}):r.data.tooLarge?(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:E(`source.tooLarge`)}):(0,K.jsx)(Te,{before:r.data.before,after:r.data.after,label:E(`source.fileDiff`,{path:n.path}),language:Se(n.path)}):(0,K.jsx)(N,{placeholder:(0,K.jsx)(P,{label:E(`source.fileLoading`)})})}var Le={added:`green`,modified:`blue`,deleted:`red`,renamed:`purple`},Re={added:`A`,modified:`M`,deleted:`D`,renamed:`R`},ze=()=>({added:E(`source.added`),modified:E(`source.modified`),deleted:E(`source.deleted`),renamed:E(`source.renamed`)}),Be=e=>{let t=e.lastIndexOf(`/`);return t<0?{name:e,folder:``}:{name:e.slice(t+1),folder:e.slice(0,t)}};function Ve({session:e,commit:t,file:n,href:r}){S();let i=M(p(e,t)),a=i.data?.pages.flatMap(e=>e.files)??[],o=a.find(e=>e.path===n),s=f({..._(e,t,n??``),enabled:!!i.data&&!!n&&!o});if(i.error)return(0,K.jsx)(A,{type:`supporting`,color:`secondary`,role:`alert`,children:E(`source.listFailed`)});if(!i.data)return(0,K.jsx)(N,{placeholder:(0,K.jsx)(P,{label:E(`source.listLoading`)})});if(!a.length)return(0,K.jsx)(A,{color:`secondary`,children:E(`source.none`)});let c=o??(n?s.data?.file:a[0]);return(0,K.jsx)(Me,{label:E(`source.title`),summary:(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:E(`source.count`,{count:i.data.pages[0].total})}),footer:(0,K.jsx)(I,{label:E(`source.more`),query:i}),items:a.map(e=>{let{name:t,folder:n}=Be(e.path);return{key:e.path,label:t,description:e.previousPath?`${e.previousPath} →`:n||void 0,href:r(e.path),selected:e===c,start:(0,K.jsx)(F,{label:Re[e.status],color:Le[e.status],size:`sm`}),end:(0,K.jsxs)(v,{gap:1,children:[e.additions!==null&&(0,K.jsxs)(A,{type:`supporting`,className:Y.sourceAdded,children:[`+`,e.additions]}),e.deletions!==null&&(0,K.jsxs)(A,{type:`supporting`,className:Y.sourceRemoved,children:[`−`,e.deletions]})]})}}),children:c?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(v,{gap:2,className:Y.sourceRow,children:[(0,K.jsx)(F,{label:ze()[c.status],color:Le[c.status],size:`sm`}),(0,K.jsx)(A,{className:Y.sourcePath,children:c.previousPath?`${c.previousPath} → ${c.path}`:c.path})]}),(0,K.jsx)(Ie,{session:e,commit:t,file:c},c.path)]}):s.error?(0,K.jsx)(A,{type:`supporting`,color:`secondary`,role:`alert`,children:E(`source.fileFailed`)}):(0,K.jsx)(N,{placeholder:(0,K.jsx)(P,{label:E(`source.fileLoading`)})})})}function He({title:e,commit:t,hash:n,children:r}){return S(),(0,K.jsxs)(m,{gap:4,className:Y.commitHeading,children:[(0,K.jsx)(g,{level:1,children:e}),(0,K.jsxs)(v,{gap:4,wrap:`wrap`,className:Y.commitMeta,children:[(0,K.jsx)(he,{name:t.author,email:t.email}),(0,K.jsx)(ie,{value:t.date,format:`relative`}),(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:new Date(t.date).toLocaleString()}),n??(0,K.jsx)(A,{type:`supporting`,color:`secondary`,className:Y.commitHash,children:t.commit.slice(0,12)}),t.committer!==t.author&&(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:E(`event.committer`,{name:t.committer})})]}),r]})}function Ue({commit:e}){return S(),(0,K.jsx)(h,{kind:`not-found`,title:E(`commit.notFoundTitle`),description:E(`commit.notFoundDescription`,{commit:e}),actions:(0,K.jsx)(u,{to:`/records`,children:E(`commit.backToList`)})})}function We({commit:e,search:t,documentId:n,session:r,features:i,head:a}){S();let c=o(),l=M(D(r,e)),d=M(p(r,e)),f=Pe((0,B.useDeferredValue)(l.data)),g=f?ge(f.changes):[],_=g.filter(e=>e.record),y=t.tab??(n||!_.length?`documents`:`records`);if((0,B.useEffect)(()=>{f&&n&&y===`documents`&&document.getElementById(n)?.scrollIntoView({block:`start`})},[f,n,y]),l.error instanceof s&&l.error.code===`NOT_FOUND`)return(0,K.jsx)(Ue,{commit:e});if(l.error)return(0,K.jsx)(N,{error:l.error,retry:()=>{l.refetch()}});if(!f)return(0,K.jsx)(N,{});let b=g.find(e=>!e.record&&e.missing),x=t=>{c({to:`/records/commits/$commit`,params:{commit:e},search:{tab:t}})},C=e=>e===void 0?``:` ${e}`;return(0,K.jsxs)(m,{gap:0,as:`article`,"aria-label":E(`commit.title`),className:Y.commitPage,children:[(0,K.jsx)(u,{to:`/records`,className:Y.commitBack,children:E(`commit.back`)}),(0,K.jsx)(He,{title:f.message,commit:f}),(0,K.jsxs)(fe,{role:`tablist`,value:y,onChange:x,hasDivider:!0,children:[(0,K.jsx)(j,{value:`records`,label:E(`commit.tab.records`)+C(_.length),panelId:`commit-records`}),(0,K.jsx)(j,{value:`documents`,label:E(`commit.tab.documents`)+C(f.total),panelId:`commit-documents`}),(0,K.jsx)(j,{value:`code`,label:E(`commit.tab.code`)+C(d.data?.pages[0]?.total),panelId:`commit-code`})]}),y===`records`&&(0,K.jsxs)(m,{id:`commit-records`,role:`tabpanel`,"aria-label":E(`event.records`),gap:3,className:Y.commitPanel,children:[_.length?(0,K.jsx)(m,{as:`ul`,gap:0,className:Y.recordList,children:_.map(e=>{let t=L(e.record);return(0,K.jsxs)(m,{as:`li`,gap:1,className:Y.recordEntry,children:[(0,K.jsxs)(v,{gap:3,className:Y.recordItemHead,children:[(0,K.jsx)(u,{to:`/records/$recordId`,params:{recordId:e.record.id},className:Y.recordLink,children:e.record.title}),(0,K.jsx)(A,{type:`supporting`,color:`secondary`,className:Y.recordItemMeta,children:E(`activity.recordCount`,{count:e.events.length})})]}),t&&(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:t})]},e.key)})}):(0,K.jsx)(A,{color:`secondary`,children:E(`event.noRecords`)}),(0,K.jsx)(I,{label:E(`commit.moreRecords`),query:l}),b&&(0,K.jsxs)(m,{gap:2,children:[(0,K.jsx)(A,{color:`secondary`,children:E(`event.noRecord`)}),(0,K.jsx)(v,{gap:2,wrap:`wrap`,className:Y.reasonRecords,children:b.events.map(t=>(0,K.jsxs)(u,{to:`/records/commits/$commit`,params:{commit:e},search:{tab:`documents`},hash:t.id,className:Y.reasonRecord,children:[(0,K.jsx)(k,{kind:t.kind}),(t.after??t.before)?.title??t.id]},t.key))})]})]}),y===`documents`&&(0,K.jsx)(m,{id:`commit-documents`,role:`tabpanel`,"aria-label":E(`commit.documents`),gap:0,className:Y.commitPanel,children:f.changes.length?(0,K.jsx)(X,{label:E(`commit.documents`),changes:f.changes.map(Ne),source:Fe(r,e),features:i,head:a,documentId:n,more:(0,K.jsx)(I,{label:E(`commit.moreDocuments`),query:l}),href:t=>`/records/commits/${encodeURIComponent(e)}?tab=documents#${encodeURIComponent(t)}`}):(0,K.jsx)(h,{isCompact:!0,title:E(`commit.noDocuments`),description:E(`commit.noDocumentsDescription`)})}),y===`code`&&(0,K.jsx)(m,{id:`commit-code`,role:`tabpanel`,"aria-label":E(`source.title`),gap:0,className:Y.commitPanel,children:(0,K.jsx)(Ve,{session:r,commit:e,file:t.file,href:t=>`/records/commits/${encodeURIComponent(e)}?tab=code&file=${encodeURIComponent(t)}`})})]})}var Z=e=>/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/.test(e),Ge=e=>/^[0-9a-f]{7,64}$/i.test(e)&&!Z(e);function Ke({commit:e,search:t}){S();let n=z({select:e=>e.hash})||void 0;return(0,K.jsx)(O,{header:w,title:E(`nav.history`),root:`/records`,hasTitle:!1,isWide:!0,trail:()=>[{label:e.slice(0,12)}],children:({checkout:r,session:i})=>Z(e)?(0,K.jsx)(We,{commit:e,search:t,documentId:n,session:i,features:r.index.features,head:r.head}):(0,K.jsx)(Ue,{commit:e})})}function qe({session:e,commit:t,others:n}){S();let r=M(p(e,t)).data?.pages[0]?.total;return!n&&!r?null:(0,K.jsxs)(v,{gap:4,wrap:`wrap`,className:Y.recordCommitLinks,children:[n>0&&(0,K.jsx)(u,{to:`/records/commits/$commit`,params:{commit:t},search:{tab:`records`},children:E(`record.otherRecords`,{count:n})}),!!r&&(0,K.jsx)(u,{to:`/records/commits/$commit`,params:{commit:t},search:{tab:`code`},children:E(`record.codeFiles`,{count:r})})]})}function Je({record:e}){return S(),(0,K.jsx)(m,{gap:6,className:Y.recordSections,children:e.sections.map(e=>(0,K.jsxs)(m,{as:`section`,gap:2,"aria-label":R[e.key](),children:[(0,K.jsx)(g,{level:2,children:R[e.key]()}),(0,K.jsx)(i,{headingLevelStart:3,children:e.body})]},e.key))})}var Q=e=>({key:e.id,id:e.id,kind:e.kind,types:e.types,title:e.title}),Ye=e=>({use:function(t){let n=f(b(e,t));return{data:n.data&&{event:Q(n.data.change),before:n.data.before,after:n.data.after},error:n.error,refetch:n.refetch}},prepare:async(t,n)=>{let i=await t.ensureQueryData(b(e,n));await r([i.before?.body,i.after?.body])}});function Xe({recordId:e,documentId:t,session:n,features:r,head:i}){S();let a=f(c(n));if(a.error)return(0,K.jsx)(N,{error:a.error,retry:()=>{a.refetch()}});if(!a.data)return(0,K.jsx)(N,{});let o=a.data.records.find(t=>t.id===e);if(!o)return(0,K.jsx)(h,{isCompact:!0,title:E(`record.missing`)});let s=a.data.changes.filter(e=>o.docs.includes(e.id)).map(Q);return(0,K.jsxs)(m,{gap:0,as:`article`,"aria-label":E(`record.title`),className:Y.commitPage,children:[(0,K.jsx)(u,{to:`/records`,className:Y.commitBack,children:E(`commit.back`)}),(0,K.jsxs)(m,{gap:4,className:Y.commitHeading,children:[(0,K.jsx)(g,{level:1,children:o.title}),(0,K.jsxs)(v,{gap:2,className:Y.recordCommit,children:[(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:o.id}),(0,K.jsx)(A,{type:`supporting`,color:`secondary`,"aria-hidden":!0,children:`·`}),(0,K.jsx)(u,{to:`/records/working`,className:Y.recordCommitMessage,children:E(`working.title`)}),o.draft&&(0,K.jsx)(F,{label:E(`working.draft`),color:`yellow`,size:`sm`})]})]}),(0,K.jsx)(Je,{record:o}),(0,K.jsxs)(m,{as:`section`,gap:3,"aria-label":E(`record.documents`),className:Y.commitSection,children:[(0,K.jsx)(g,{level:2,children:E(`record.documents`)}),s.length?(0,K.jsx)(X,{label:E(`record.documents`),changes:s,source:Ye(n),features:r,head:i,documentId:t,href:t=>`/records/${encodeURIComponent(e)}#${encodeURIComponent(t)}`}):(0,K.jsx)(A,{color:`secondary`,children:E(`working.noExplained`)})]})]})}function Ze({recordId:e,documentId:t,session:n,features:r,head:i}){S();let a=f(l(n,i,e)),o=a.data?.commit,c=M({...D(n,o??``,e),enabled:!!o}),d=Pe((0,B.useDeferredValue)(c.data));if((0,B.useEffect)(()=>{d&&t&&document.getElementById(t)?.scrollIntoView({block:`start`})},[d,t]),a.error instanceof s&&a.error.code===`NOT_FOUND`)return(0,K.jsx)(Xe,{recordId:e,documentId:t,session:n,features:r,head:i});let p=a.error??c.error;if(p)return(0,K.jsx)(N,{error:p,retry:()=>{a.error?a.refetch():c.refetch()}});if(!d||!o||!a.data)return(0,K.jsx)(N,{});let h=a.data.record,_=d.changes.map(Ne);return(0,K.jsxs)(m,{gap:0,as:`article`,"aria-label":E(`record.title`),className:Y.commitPage,children:[(0,K.jsx)(u,{to:`/records`,className:Y.commitBack,children:E(`commit.back`)}),(0,K.jsxs)(He,{title:h.title,commit:d,hash:(0,K.jsx)(u,{to:`/records/commits/$commit`,params:{commit:o},className:Y.commitHashLink,children:o.slice(0,12)}),children:[(0,K.jsxs)(v,{gap:2,className:Y.recordCommit,children:[(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:h.id}),(0,K.jsx)(A,{type:`supporting`,color:`secondary`,"aria-hidden":!0,children:`·`}),(0,K.jsx)(u,{to:`/records/commits/$commit`,params:{commit:o},className:Y.recordCommitMessage,children:d.message})]}),(0,K.jsx)(qe,{session:n,commit:o,others:a.data.others})]}),(0,K.jsx)(Je,{record:h}),(0,K.jsxs)(m,{as:`section`,gap:3,"aria-label":E(`record.documents`),className:Y.commitSection,children:[(0,K.jsx)(g,{level:2,children:E(`record.documents`)}),(0,K.jsx)(X,{label:E(`record.documents`),changes:_,source:Fe(n,o),features:r,head:i,documentId:t,more:(0,K.jsx)(I,{label:E(`commit.moreDocuments`),query:c}),href:t=>`/records/${encodeURIComponent(e)}#${encodeURIComponent(t)}`})]})]})}function Qe({recordId:e}){S();let t=z({select:e=>e.hash})||void 0;return(0,K.jsx)(O,{header:w,title:E(`nav.history`),root:`/records`,hasTitle:!1,isWide:!0,trail:()=>[{label:e}],children:({checkout:n,session:r})=>n.head?(0,K.jsx)(Ze,{recordId:e,documentId:t,session:r,features:n.index.features,head:n.head}):(0,K.jsx)(h,{kind:`empty`,title:E(`history.emptyTitle`),description:E(`history.emptyDescription`)})})}function $e({search:e,documentId:t,session:n,features:r,head:i}){S();let a=o(),s=f(c(n)),l=s.data;if(s.error)return(0,K.jsx)(N,{error:s.error,retry:()=>{s.refetch()}});if(!l)return(0,K.jsx)(N,{});let d=e.tab??(t||!l.records.length?`documents`:`records`),p=l.changes.filter(e=>l.withoutRecord.includes(e.id));return(0,K.jsxs)(m,{gap:0,as:`article`,"aria-label":E(`working.title`),className:Y.commitPage,children:[(0,K.jsx)(u,{to:`/records`,className:Y.commitBack,children:E(`commit.back`)}),(0,K.jsxs)(m,{gap:2,className:Y.commitHeading,children:[(0,K.jsx)(g,{level:1,children:E(`working.title`)}),(0,K.jsx)(A,{color:`secondary`,children:E(`working.description`)})]}),(0,K.jsxs)(fe,{role:`tablist`,value:d,onChange:e=>{a({to:`/records/working`,search:{tab:e}})},hasDivider:!0,children:[(0,K.jsx)(j,{value:`records`,label:`${E(`commit.tab.records`)} ${l.records.length}`,panelId:`working-records`}),(0,K.jsx)(j,{value:`documents`,label:`${E(`commit.tab.documents`)} ${l.changes.length}`,panelId:`working-documents`})]}),d===`records`&&(0,K.jsxs)(m,{id:`working-records`,role:`tabpanel`,"aria-label":E(`event.records`),gap:3,className:Y.commitPanel,children:[l.records.length?(0,K.jsx)(m,{as:`ul`,gap:0,className:Y.recordList,children:l.records.map(e=>{let t=L(e);return(0,K.jsxs)(m,{as:`li`,gap:1,className:Y.recordEntry,children:[(0,K.jsxs)(v,{gap:3,className:Y.recordItemHead,children:[(0,K.jsxs)(v,{gap:2,vAlign:`center`,children:[(0,K.jsx)(u,{to:`/records/$recordId`,params:{recordId:e.id},className:Y.recordLink,children:e.title}),e.draft&&(0,K.jsx)(F,{label:E(`working.draft`),color:`yellow`,size:`sm`})]}),(0,K.jsx)(A,{type:`supporting`,color:`secondary`,className:Y.recordItemMeta,children:E(`activity.recordCount`,{count:e.docs.length})})]}),t&&(0,K.jsx)(A,{type:`supporting`,color:`secondary`,children:t})]},e.id)})}):(0,K.jsx)(A,{color:`secondary`,children:E(`working.noRecords`)}),!!p.length&&(0,K.jsxs)(m,{gap:2,children:[(0,K.jsx)(A,{color:`secondary`,children:E(`event.noRecord`)}),(0,K.jsx)(v,{gap:2,wrap:`wrap`,className:Y.reasonRecords,children:p.map(e=>(0,K.jsxs)(u,{to:`/records/working`,search:{tab:`documents`},hash:e.id,className:Y.reasonRecord,children:[(0,K.jsx)(k,{kind:e.kind}),e.title]},e.id))})]})]}),d===`documents`&&(0,K.jsx)(m,{id:`working-documents`,role:`tabpanel`,"aria-label":E(`commit.documents`),gap:0,className:Y.commitPanel,children:l.changes.length?(0,K.jsx)(X,{label:E(`commit.documents`),changes:l.changes.map(Q),source:Ye(n),features:r,head:i,documentId:t,href:e=>`/records/working?tab=documents#${encodeURIComponent(e)}`}):(0,K.jsx)(h,{isCompact:!0,title:E(`working.noDocuments`)})})]})}function et({search:e}){S();let t=z({select:e=>e.hash})||void 0;return(0,K.jsx)(O,{header:w,title:E(`nav.history`),root:`/records`,hasTitle:!1,isWide:!0,trail:()=>[{label:E(`working.title`)}],children:({checkout:n,session:r})=>(0,K.jsx)($e,{search:e,documentId:t,session:r,features:n.index.features,head:n.head})})}var tt=(e,t)=>{let n=decodeURIComponent(t);return e.includes(n)?n:e[0]};async function $(e,t,n,i,a){let o=tt(i,a);if(!o)return;let s=await e.ensureQueryData(y(t,n,o)).catch(()=>void 0);s&&await r([s.before?.body,s.after?.body])}async function nt(e,t){if(Z(t))return t;if(!Ge(t))return;let{session:n}=await x(e);if(n)return await e.ensureQueryData(ee(n,t.toLowerCase())).catch(()=>null)??void 0}async function rt(e,t,n,r){let{session:i}=await x(e);if(!i||!Z(t))return;let[a]=await Promise.all([e.ensureInfiniteQueryData(D(i,t)).catch(()=>void 0),T(e.ensureInfiniteQueryData(p(i,t)))]),o=a?.pages[0];o&&(n??(r||!o.changes.some(e=>e.records.length)?`documents`:`records`))===`documents`&&await $(e,i,t,o.changes.map(e=>e.id),r)}async function it(e,t,n){let{session:r,checkout:i}=await x(e);if(!r||!i?.head)return;let a=await e.ensureQueryData(l(r,i.head,t)).catch(()=>void 0);if(!a){await T(e.ensureQueryData(c(r)));return}let o=(await e.ensureInfiniteQueryData(D(r,a.commit,t)).catch(()=>void 0))?.pages[0];o&&await $(e,r,a.commit,o.changes.map(e=>e.id),n)}async function at(e,t,n){let{session:i}=await x(e);if(!i)return;let a=await e.ensureQueryData(c(i)).catch(()=>void 0);if(!a||(t??(n||!a.records.length?`documents`:`records`))!==`documents`)return;let o=tt(a.changes.map(e=>e.id),n),s=o?await e.ensureQueryData(b(i,o)).catch(()=>void 0):void 0;s&&await r([s.before?.body,s.after?.body])}export{et as a,nt as i,it as n,Qe as o,at as r,Ke as s,rt as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,l as n,n as r,q as i}from"./themeProps-CkLe5zXY.js";import{n as ee}from"./useIsomorphicLayoutEffect-BiEJxDg_.js";import{bt as a,mt as o}from"./page-header-rHElc4Gv.js";import{C as s}from"./Table-BK5793GP.js";import{a as c}from"./useMediaQuery-twbHF0pO.js";import{E as te,W as ne,_ as re}from"./Icon-DPaLmsmh.js";import{r as ie}from"./IconButton-Br-4XhQr.js";import{t as ae}from"./useDevWarning-Dudfg3qF.js";var l=e(i(),1),oe=(0,l.createContext)(36);oe.displayName=`AvatarSizeContext`;var u=(0,l.createContext)(null);u.displayName=`AvatarStatusLabelContext`;var d=(0,l.createContext)(null);d.displayName=`AvatarGroupContext`;function f(){return(0,l.use)(d)}var p=n(),m=(1-1/Math.SQRT2)/2,h=.4;function g(e){if(typeof e==`number`)return e;switch(e){case`xsm`:return 20;case`sm`:return 24;case`md`:return 36;case`lg`:return 48;case`xl`:return 128}}var _={circle:{"--_avatar-radius":`xeincmr`,$$css:!0},rounded:{"--_avatar-radius":`xdarwi0`,$$css:!0},square:{"--_avatar-radius":`x877142`,$$css:!0}},v={wrapper:{kVAEAm:`x1n2onr6`,k1xSpc:`x3nfvp2`,kmuXW:`x2lah0s`,kaIpWk:`xbc78cj`,$$css:!0},fallback:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kzqmXN:`xh8yej3`,kZKoxP:`x5yr21d`,kWkggS:`x17x4s8c`,kMwMTN:`xv1l7n4`,kMv6JI:`x9ynric`,k63SB2:`x1e4wzip`,kP9fke:`xtvhhri`,$$css:!0},status:{kVAEAm:`x10l6tqk`,$$css:!0},interactive:{kysU6D:`xjyslct`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kWkggS:`xjbqb8w`,kMwMTN:`x1heor9g`,kVVagm:`xln7xf2`,kybGjl:`x1hl2dhg`,kkrTdU:`x1ypdohk x16khyan`,kaIpWk:`xbc78cj`,$$css:!0}},y={kGuDYH:`xdmh292`,$$css:!0},b={krVfgx:`x1nqzi6q`,kt4wiu:`xqxgn94`,k3aq6I:`x4v1no5 xqgnvz5`,$$css:!0},x={size:e=>[{kzqmXN:e==null?e:`x5lhr3w`,kZKoxP:e==null?e:`x16ye13r`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],fontSize:e=>[y,{"--x-fontSize":(e=>typeof e==`number`?e+`px`:e??void 0)(`${e*h}px`)}],statusPositionCircle:e=>[b,{"--x-bottom":(e=>typeof e==`number`?e+`px`:e??void 0)(e*m),"--x-insetInlineEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(e*m)}],statusPositionCorner:{krVfgx:`x1ey2m1c`,kt4wiu:`xtijo5x`,k3aq6I:`xv8yid9 x10fxb7p`,$$css:!0}},se={ring:{kMzoRj:`xdh2fpr`,ksu8eU:`x1y0btm7`,kVAM5u:`x1touxvs`,kWkggS:`x10xzikg`,kB7OPa:`x1afcbsf`,$$css:!0},overlap:{keTefX:`x1sik18w`,$$css:!0}},ce={"--_avatar-group-overlap":`xlz5hwt`,$$css:!0},le={overlap:e=>[ce,{"--x---_avatar-group-overlap":`${e}px`==null?void 0:`${e}px`}]};function ue(e){let t=e.trim().split(/\s+/);return t.length===0?``:t.length===1?s(t[0]).toUpperCase():(s(t[0])+s(t[t.length-1])).toUpperCase()}function S(e){if(!(0,l.isValidElement)(e))return;let{label:t}=e.props;return typeof t==`string`&&t!==``?t:void 0}function C(e){return typeof e==`string`&&e.trim()!==``?e:void 0}function de(e){return e!=null&&e!==``?{role:`img`,"aria-label":e}:{role:`presentation`,"aria-hidden":`true`}}function w(e,t,n){return t&&n?e(`@astryx.avatar.nameWithStatus`,{name:t,status:n}):t||n}function T(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function fe({size:e}){return(0,p.jsx)(`svg`,{width:e*.6,height:e*.6,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,p.jsx)(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`})})}function E({alt:e,"data-testid":n,fallbackSrc:i,name:a,size:o=`md`,shape:s=`circle`,src:d,status:m,tooltip:h=!0,href:y,as:b,target:ce,rel:E,onClick:D,xstyle:O,className:k,style:A,ref:j,...M}){let[pe,me]=(0,l.useState)(void 0),[he,ge]=(0,l.useState)(void 0),N=d&&pe!==d,P=!N&&i&&he!==i,F=C(a),_e=C(e),ve=!N&&!P&&F,ye=!N&&!P&&!F,I=re(),L=_e||F,R=w(I,L,S(m)),be=de(R),z=R?{"aria-label":R}:void 0,B=f(),V=B?.size??o,H=B?.shape??s,U=(0,l.useMemo)(()=>g(V),[V]),W=(h===!1?void 0:typeof h==`string`?h:F)?.trim(),G=W!=null&&W!==``,xe=typeof h==`string`,K=ee({placement:`above`,isEnabled:G}),q=G&&xe?{"aria-describedby":[M[`aria-describedby`],K.describedBy].filter(Boolean).join(` `)||void 0}:null,J=y!=null,Y=!J&&D!=null,X=J||Y,Se=ie(b),Ce=C(M[`aria-label`])??C(M[`aria-labelledby`]);ae(`Avatar`,"an interactive avatar (with `href` or `onClick`) needs a meaningful accessible name. Pass `alt` or `name`.",X&&!L&&Ce==null);let we=(0,l.useRef)({label:void 0,update:null}),{"aria-hidden":Te,"aria-label":Ee,role:De}=M,Oe=(0,l.useCallback)(e=>{if(e==null)return;let t=we.current;return t.update=()=>{let n=w(I,L,C(t.label)??S(m));Ee??T(e,`aria-label`,n),X||(De??e.setAttribute(`role`,n?`img`:`presentation`),Te??T(e,`aria-hidden`,n?void 0:`true`))},t.update(),()=>{t.update=null}},[Te,Ee,De,X,L,m,I]),Z=te(j,G?K.ref:void 0,Oe),Q=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xb3r6kr x87ps6o xbc78cj`,children:[N&&(0,p.jsx)(`img`,{src:d,alt:``,onError:()=>me(d),className:`xh8yej3 x5yr21d xl1xv1r`}),P&&(0,p.jsx)(`img`,{src:i,alt:``,onError:()=>ge(i),className:`xh8yej3 x5yr21d xl1xv1r`}),ve&&(0,p.jsx)(`div`,{...c(r(`avatar-fallback`,{size:V}),t(v.fallback,x.fontSize(U))),children:ue(F)}),ye&&(0,p.jsx)(`div`,{...c(r(`avatar-fallback`,{size:V}),{className:`x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d x17x4s8c xv1l7n4 x9ynric x1e4wzip xtvhhri`}),children:(0,p.jsx)(fe,{size:U})})]}),m&&(0,p.jsx)(`div`,{...t(v.status,H===`circle`?x.statusPositionCircle(U):x.statusPositionCorner),children:m})]}),$=c(r(`avatar`,{size:V,shape:H}),ne.focusVisible(v.wrapper,x.size(U),X&&v.interactive,B&&se.ring,B&&se.overlap,B&&le.overlap(-B.overlap),_[H],O),k,A),ke,Ae=M;return ke=J?(0,p.jsx)(Se,{...z,...Ae,...q,ref:Z,href:y,target:ce,rel:E,"data-avatar-item":``,"data-testid":n,onClick:D,...$,children:Q}):Y?(0,p.jsx)(`button`,{...z,...Ae,...q,ref:Z,type:`button`,"data-avatar-item":``,"data-testid":n,onClick:D,...$,children:Q}):(0,p.jsx)(`div`,{...be,...M,ref:Z,tabIndex:G&&!B?0:void 0,"data-testid":n,...q,...$,children:Q}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(oe,{value:U,children:(0,p.jsx)(u,{value:we,children:ke})}),G?K.renderTooltip(W):null]})}E.displayName=`Avatar`;var D={person:`_person_1q3et_2`,personName:`_personName_1q3et_3`},O=[`#96a27b`,`#f5dfa1`,`#fac2a7`,`#a8bbc5`,`#b4c49f`,`#c7bbd2`],k=[`<path d="M28 92C18 72 29 38 52 34C60 32 71 32 79 36C99 45 109 75 101 92C95 105 37 106 28 92Z"/><path d="M63 34C69 29 70 24 68 21M66 34C73 32 77 29 78 25" fill="none"/><g fill="#193b30" stroke="none"><circle cx="47" cy="69" r="4"/><circle cx="80" cy="64" r="4"/></g><path d="M59 79Q65 84 71 78" fill="none"/>`,`<path d="M29 48Q29 29 48 29H75L99 53V86Q99 102 82 102H47Q28 102 28 84Z"/><path d="M75 30V45Q75 55 86 54H98" fill="none"/><ellipse cx="47" cy="67" rx="6" ry="7"/><ellipse cx="79" cy="67" rx="6" ry="7"/><g fill="#193b30" stroke="none"><ellipse cx="49" cy="67" rx="3" ry="5"/><ellipse cx="81" cy="67" rx="3" ry="5"/></g><path d="M61 83H65" fill="none"/>`,`<path d="M28 91C20 70 31 45 51 40Q64 36 78 41C98 48 107 72 101 91C95 105 37 105 28 91Z"/><path d="M62 38C43 34 39 24 40 19C53 19 62 26 62 38ZM68 37C68 23 79 15 90 16C88 29 80 35 68 37Z"/><g fill="#193b30" stroke="none"><circle cx="48" cy="69" r="4"/><circle cx="80" cy="69" r="4"/></g><path d="M59 82Q64 87 70 81" fill="none"/>`];function A(e){let t=2166136261;for(let n of e.toLowerCase())t=Math.imul(t^n.charCodeAt(0),16777619)>>>0;let n=k[t%k.length],r=O[Math.floor(t/k.length)%O.length];return`data:image/svg+xml,`+encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><rect width="128" height="128" fill="${r}"/><g fill="#fff4df" stroke="#193b30" stroke-width="4.5" stroke-linecap="round" stroke-linejoin="round">${n}</g></svg>`)}var j=e=>`/contributors/`+encodeURIComponent(e);function M({name:e,email:t,avatarOnly:n=!1,size:r=`sm`}){return(0,p.jsxs)(o,{gap:2,className:D.person,children:[(0,p.jsx)(E,{name:e,src:A(t),shape:`circle`,size:r,href:j(t)}),!n&&(0,p.jsx)(a,{to:`/contributors/$email`,params:{email:t},className:D.personName,children:e})]})}export{g as a,f as c,E as i,A as n,_ as o,j as r,d as s,M as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,l as n,n as r,q as i}from"./themeProps-CkLe5zXY.js";import{n as ee}from"./useIsomorphicLayoutEffect-BiEJxDg_.js";import{St as a,gt as o}from"./page-header-AS8jZ1ve.js";import{C as s}from"./Table-DjTkmoR7.js";import{a as c}from"./useMediaQuery-twbHF0pO.js";import{E as te,W as ne,_ as re}from"./Icon-DPaLmsmh.js";import{r as ie}from"./IconButton-Br-4XhQr.js";import{t as ae}from"./useDevWarning-Dudfg3qF.js";var l=e(i(),1),oe=(0,l.createContext)(36);oe.displayName=`AvatarSizeContext`;var u=(0,l.createContext)(null);u.displayName=`AvatarStatusLabelContext`;var d=(0,l.createContext)(null);d.displayName=`AvatarGroupContext`;function f(){return(0,l.use)(d)}var p=n(),m=(1-1/Math.SQRT2)/2,h=.4;function g(e){if(typeof e==`number`)return e;switch(e){case`xsm`:return 20;case`sm`:return 24;case`md`:return 36;case`lg`:return 48;case`xl`:return 128}}var _={circle:{"--_avatar-radius":`xeincmr`,$$css:!0},rounded:{"--_avatar-radius":`xdarwi0`,$$css:!0},square:{"--_avatar-radius":`x877142`,$$css:!0}},v={wrapper:{kVAEAm:`x1n2onr6`,k1xSpc:`x3nfvp2`,kmuXW:`x2lah0s`,kaIpWk:`xbc78cj`,$$css:!0},fallback:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kzqmXN:`xh8yej3`,kZKoxP:`x5yr21d`,kWkggS:`x17x4s8c`,kMwMTN:`xv1l7n4`,kMv6JI:`x9ynric`,k63SB2:`x1e4wzip`,kP9fke:`xtvhhri`,$$css:!0},status:{kVAEAm:`x10l6tqk`,$$css:!0},interactive:{kysU6D:`xjyslct`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kWkggS:`xjbqb8w`,kMwMTN:`x1heor9g`,kVVagm:`xln7xf2`,kybGjl:`x1hl2dhg`,kkrTdU:`x1ypdohk x16khyan`,kaIpWk:`xbc78cj`,$$css:!0}},y={kGuDYH:`xdmh292`,$$css:!0},b={krVfgx:`x1nqzi6q`,kt4wiu:`xqxgn94`,k3aq6I:`x4v1no5 xqgnvz5`,$$css:!0},x={size:e=>[{kzqmXN:e==null?e:`x5lhr3w`,kZKoxP:e==null?e:`x16ye13r`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],fontSize:e=>[y,{"--x-fontSize":(e=>typeof e==`number`?e+`px`:e??void 0)(`${e*h}px`)}],statusPositionCircle:e=>[b,{"--x-bottom":(e=>typeof e==`number`?e+`px`:e??void 0)(e*m),"--x-insetInlineEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(e*m)}],statusPositionCorner:{krVfgx:`x1ey2m1c`,kt4wiu:`xtijo5x`,k3aq6I:`xv8yid9 x10fxb7p`,$$css:!0}},se={ring:{kMzoRj:`xdh2fpr`,ksu8eU:`x1y0btm7`,kVAM5u:`x1touxvs`,kWkggS:`x10xzikg`,kB7OPa:`x1afcbsf`,$$css:!0},overlap:{keTefX:`x1sik18w`,$$css:!0}},ce={"--_avatar-group-overlap":`xlz5hwt`,$$css:!0},le={overlap:e=>[ce,{"--x---_avatar-group-overlap":`${e}px`==null?void 0:`${e}px`}]};function ue(e){let t=e.trim().split(/\s+/);return t.length===0?``:t.length===1?s(t[0]).toUpperCase():(s(t[0])+s(t[t.length-1])).toUpperCase()}function S(e){if(!(0,l.isValidElement)(e))return;let{label:t}=e.props;return typeof t==`string`&&t!==``?t:void 0}function C(e){return typeof e==`string`&&e.trim()!==``?e:void 0}function de(e){return e!=null&&e!==``?{role:`img`,"aria-label":e}:{role:`presentation`,"aria-hidden":`true`}}function w(e,t,n){return t&&n?e(`@astryx.avatar.nameWithStatus`,{name:t,status:n}):t||n}function T(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function fe({size:e}){return(0,p.jsx)(`svg`,{width:e*.6,height:e*.6,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,p.jsx)(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`})})}function E({alt:e,"data-testid":n,fallbackSrc:i,name:a,size:o=`md`,shape:s=`circle`,src:d,status:m,tooltip:h=!0,href:y,as:b,target:ce,rel:E,onClick:D,xstyle:O,className:k,style:A,ref:j,...M}){let[pe,me]=(0,l.useState)(void 0),[he,ge]=(0,l.useState)(void 0),N=d&&pe!==d,P=!N&&i&&he!==i,F=C(a),_e=C(e),ve=!N&&!P&&F,ye=!N&&!P&&!F,I=re(),L=_e||F,R=w(I,L,S(m)),be=de(R),z=R?{"aria-label":R}:void 0,B=f(),V=B?.size??o,H=B?.shape??s,U=(0,l.useMemo)(()=>g(V),[V]),W=(h===!1?void 0:typeof h==`string`?h:F)?.trim(),G=W!=null&&W!==``,xe=typeof h==`string`,K=ee({placement:`above`,isEnabled:G}),q=G&&xe?{"aria-describedby":[M[`aria-describedby`],K.describedBy].filter(Boolean).join(` `)||void 0}:null,J=y!=null,Y=!J&&D!=null,X=J||Y,Se=ie(b),Ce=C(M[`aria-label`])??C(M[`aria-labelledby`]);ae(`Avatar`,"an interactive avatar (with `href` or `onClick`) needs a meaningful accessible name. Pass `alt` or `name`.",X&&!L&&Ce==null);let we=(0,l.useRef)({label:void 0,update:null}),{"aria-hidden":Te,"aria-label":Ee,role:De}=M,Oe=(0,l.useCallback)(e=>{if(e==null)return;let t=we.current;return t.update=()=>{let n=w(I,L,C(t.label)??S(m));Ee??T(e,`aria-label`,n),X||(De??e.setAttribute(`role`,n?`img`:`presentation`),Te??T(e,`aria-hidden`,n?void 0:`true`))},t.update(),()=>{t.update=null}},[Te,Ee,De,X,L,m,I]),Z=te(j,G?K.ref:void 0,Oe),Q=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xb3r6kr x87ps6o xbc78cj`,children:[N&&(0,p.jsx)(`img`,{src:d,alt:``,onError:()=>me(d),className:`xh8yej3 x5yr21d xl1xv1r`}),P&&(0,p.jsx)(`img`,{src:i,alt:``,onError:()=>ge(i),className:`xh8yej3 x5yr21d xl1xv1r`}),ve&&(0,p.jsx)(`div`,{...c(r(`avatar-fallback`,{size:V}),t(v.fallback,x.fontSize(U))),children:ue(F)}),ye&&(0,p.jsx)(`div`,{...c(r(`avatar-fallback`,{size:V}),{className:`x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d x17x4s8c xv1l7n4 x9ynric x1e4wzip xtvhhri`}),children:(0,p.jsx)(fe,{size:U})})]}),m&&(0,p.jsx)(`div`,{...t(v.status,H===`circle`?x.statusPositionCircle(U):x.statusPositionCorner),children:m})]}),$=c(r(`avatar`,{size:V,shape:H}),ne.focusVisible(v.wrapper,x.size(U),X&&v.interactive,B&&se.ring,B&&se.overlap,B&&le.overlap(-B.overlap),_[H],O),k,A),ke,Ae=M;return ke=J?(0,p.jsx)(Se,{...z,...Ae,...q,ref:Z,href:y,target:ce,rel:E,"data-avatar-item":``,"data-testid":n,onClick:D,...$,children:Q}):Y?(0,p.jsx)(`button`,{...z,...Ae,...q,ref:Z,type:`button`,"data-avatar-item":``,"data-testid":n,onClick:D,...$,children:Q}):(0,p.jsx)(`div`,{...be,...M,ref:Z,tabIndex:G&&!B?0:void 0,"data-testid":n,...q,...$,children:Q}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(oe,{value:U,children:(0,p.jsx)(u,{value:we,children:ke})}),G?K.renderTooltip(W):null]})}E.displayName=`Avatar`;var D={person:`_person_1q3et_2`,personName:`_personName_1q3et_3`},O=[`#96a27b`,`#f5dfa1`,`#fac2a7`,`#a8bbc5`,`#b4c49f`,`#c7bbd2`],k=[`<path d="M28 92C18 72 29 38 52 34C60 32 71 32 79 36C99 45 109 75 101 92C95 105 37 106 28 92Z"/><path d="M63 34C69 29 70 24 68 21M66 34C73 32 77 29 78 25" fill="none"/><g fill="#193b30" stroke="none"><circle cx="47" cy="69" r="4"/><circle cx="80" cy="64" r="4"/></g><path d="M59 79Q65 84 71 78" fill="none"/>`,`<path d="M29 48Q29 29 48 29H75L99 53V86Q99 102 82 102H47Q28 102 28 84Z"/><path d="M75 30V45Q75 55 86 54H98" fill="none"/><ellipse cx="47" cy="67" rx="6" ry="7"/><ellipse cx="79" cy="67" rx="6" ry="7"/><g fill="#193b30" stroke="none"><ellipse cx="49" cy="67" rx="3" ry="5"/><ellipse cx="81" cy="67" rx="3" ry="5"/></g><path d="M61 83H65" fill="none"/>`,`<path d="M28 91C20 70 31 45 51 40Q64 36 78 41C98 48 107 72 101 91C95 105 37 105 28 91Z"/><path d="M62 38C43 34 39 24 40 19C53 19 62 26 62 38ZM68 37C68 23 79 15 90 16C88 29 80 35 68 37Z"/><g fill="#193b30" stroke="none"><circle cx="48" cy="69" r="4"/><circle cx="80" cy="69" r="4"/></g><path d="M59 82Q64 87 70 81" fill="none"/>`];function A(e){let t=2166136261;for(let n of e.toLowerCase())t=Math.imul(t^n.charCodeAt(0),16777619)>>>0;let n=k[t%k.length],r=O[Math.floor(t/k.length)%O.length];return`data:image/svg+xml,`+encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><rect width="128" height="128" fill="${r}"/><g fill="#fff4df" stroke="#193b30" stroke-width="4.5" stroke-linecap="round" stroke-linejoin="round">${n}</g></svg>`)}var j=e=>`/contributors/`+encodeURIComponent(e);function M({name:e,email:t,avatarOnly:n=!1,size:r=`sm`}){return(0,p.jsxs)(o,{gap:2,className:D.person,children:[(0,p.jsx)(E,{name:e,src:A(t),shape:`circle`,size:r,href:j(t)}),!n&&(0,p.jsx)(a,{to:`/contributors/$email`,params:{email:t},className:D.personName,children:e})]})}export{g as a,f as c,E as i,A as n,_ as o,j as r,d as s,M as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{l as t,n,q as r}from"./themeProps-CkLe5zXY.js";import{L as i,St as a,T as o,U as s,_t as c,a as l,an as u,b as d,dn as f,gt as p,it as m,l as h,mn as g,sn as _,t as v,u as y,un as b,x}from"./page-header-AS8jZ1ve.js";import{c as S,h as C,n as w,s as T}from"./document-7jVYmB_Z.js";import{a as E}from"./useMediaQuery-twbHF0pO.js";import{E as D,W as O,w as k}from"./Icon-DPaLmsmh.js";import{r as A}from"./IconButton-Br-4XhQr.js";import{t as j}from"./useInfiniteQuery-C0rB-9Ci.js";import{n as M,t as N}from"./Grid-DCCm_m5g.js";import{a as P}from"./Token-D337a1e3.js";import{t as F}from"./load-more-DVsjzCxE.js";import{i as I,n as L,r as R}from"./contributor-D1TZSDq9.js";var z=e(r(),1),B=t(),V={interactive:{kVAEAm:`x1n2onr6`,kkrTdU:`x1ypdohk x16khyan`,kybGjl:`x1hl2dhg`,kMwMTN:`x1heor9g`,$$css:!0},overlay:{k5JduY:`x1s928wv`,kwXMNM:`x1j6awrg`,kv0HGH:`xarstr8`,kloYau:`x2q1x1w`,kRicXK:`x1ywzrc5`,kPNhGg:`x97pup0`,kA8PQs:`x1dlmc9c`,ks3ayO:`xyhc2n1`,kAcZsS:`x1k7wiig`,$$css:!0},hoverOnPointer:{k8t4tK:`x1912f9e`,$$css:!0},borderless:{kMzoRj:`xc342km`,$$css:!0},bordered:{kVAM5u:`x14i3s5s`,kZCmMZ:`xs19ii7`,kwRFfy:`x12frdag`,kLKAdn:`x1nex4ik`,kGO01o:`xbv1mwh`,k1ekBW:`xshfolx`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,$$css:!0},borderedHoverOnPointer:{kpsWHe:`x1xwh4np`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,kSiTet:`xbyyjgo`,$$css:!0}};function H({label:e,onClick:t,onMouseUp:r,href:i,target:a,isDisabled:o=!1,children:s,padding:c,variant:l=`default`,elevation:u=`none`,width:d,height:f,maxWidth:p,ref:m,xstyle:h,className:g,style:v,...y}){let b=(0,z.useRef)(null),x=(0,z.useRef)(null),S=A(),{onClick:C,onMouseUp:w}=_({containerRef:b,interactiveRef:x,onClick:t,href:i,target:a,disabled:o}),T=r?e=>{w(e),r(e)}:w,k=i!=null,j=l==="default";return(0,B.jsxs)(M,{ref:D(m,b),width:d,height:f,maxWidth:p,padding:c,variant:l,elevation:u,...E(n(`clickable-card`,{variant:l}),O.focusWithin(),g,v),xstyle:[V.interactive,j?V.bordered:V.borderless,!o&&V.overlay,!o&&V.hoverOnPointer,!o&&j&&V.borderedHoverOnPointer,o&&V.disabled,h],onClick:o?void 0:C,onMouseUp:o?void 0:T,...y,children:[k?(0,B.jsx)(S,{ref:x,href:i,target:a,"aria-label":e,"aria-disabled":o||void 0,tabIndex:o?-1:0,className:`x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr xzpqnlu xuxw1ft xc342km`}):(0,B.jsx)(`button`,{ref:x,type:`button`,"aria-label":e,disabled:o,onClick:t,className:`x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr xzpqnlu xuxw1ft xc342km`}),s]})}H.displayName=`ClickableCard`;var U={featureDetail:`_featureDetail_yozgk_1`,featureBack:`_featureBack_yozgk_2`,entryBody:`_entryBody_yozgk_7`,entryTitle:`_entryTitle_yozgk_8`,personCard:`_personCard_yozgk_10`,personCardBody:`_personCardBody_yozgk_11`,personStats:`_personStats_yozgk_12`,personHero:`_personHero_yozgk_13`,personActivityRow:`_personActivityRow_yozgk_14`,personSection:`_personSection_yozgk_16`,oneLine:`_oneLine_yozgk_19`};async function W(e,t,n){let{session:r,checkout:i}=await h(e);if(!r)return;if(!t){await y(e.ensureInfiniteQueryData(x(r,n.q)));return}let a=await e.ensureQueryData(d(r,t)).catch(()=>void 0);a&&i?.head&&await y(e.ensureInfiniteQueryData(o(r,i.head,{author:a.person.email},10)))}function G({session:e,head:t,email:n,search:r}){return g(),n?(0,B.jsx)(K,{session:e,head:t,email:n}):(0,B.jsx)(q,{session:e,search:r})}function K({session:e,head:t,email:n}){let r=s(d(e,n));return r.error instanceof i&&r.error.code===`NOT_FOUND`?(0,B.jsx)(l,{kind:`not-found`,title:b(`contributors.notFoundTitle`),description:b(`contributors.notFoundDescription`,{email:n}),actions:(0,B.jsx)(a,{to:`/contributors`,children:b(`contributors.backToList`)})}):r.error?(0,B.jsx)(P,{error:r.error,retry:()=>{r.refetch()}}):r.data?(0,B.jsx)(J,{session:e,head:t,person:r.data.person,features:r.data.features}):(0,B.jsx)(P,{})}function q({session:e,search:t}){g();let n=j({...x(e,t.q),placeholderData:m}),r=(0,z.useDeferredValue)(n.data);if(n.error)return(0,B.jsx)(P,{error:n.error,retry:()=>{n.refetch()}});if(!r)return(0,B.jsx)(P,{});let i=r.pages.flatMap(e=>e.people);return i.length?(0,B.jsxs)(c,{gap:3,children:[(0,B.jsx)(k,{type:`supporting`,color:`secondary`,children:b(`contributors.count`,{count:r.pages[0].total})}),(0,B.jsx)(N,{columns:{minWidth:220,repeat:`fill`},gap:3,children:i.map(e=>(0,B.jsx)(H,{label:e.name,href:R(e.email),padding:4,elevation:`none`,children:(0,B.jsxs)(c,{gap:3,className:U.personCard,children:[(0,B.jsx)(I,{name:e.name,src:L(e.email),shape:`circle`,size:`lg`}),(0,B.jsxs)(c,{gap:1,className:U.personCardBody,children:[(0,B.jsx)(k,{weight:`semibold`,className:U.oneLine,children:e.name}),(0,B.jsx)(k,{type:`supporting`,color:`secondary`,className:U.oneLine,children:e.email})]}),(0,B.jsxs)(p,{gap:3,wrap:`wrap`,className:U.personStats,children:[(0,B.jsx)(k,{type:`supporting`,color:`secondary`,children:b(`contributors.cardCommits`,{count:e.commits})}),(0,B.jsx)(k,{type:`supporting`,color:`secondary`,children:b(`contributors.cardFeatures`,{count:e.features})}),(0,B.jsx)(T,{value:e.latest,format:`relative`})]})]})},e.email))}),(0,B.jsx)(p,{gap:0,children:(0,B.jsx)(F,{label:b(`contributors.more`),query:n})})]}):(0,B.jsx)(l,{kind:t.q?`search`:`empty`,title:b(`contributors.emptyTitle`),description:b(`contributors.emptyDescription`)})}function J({session:e,head:t,person:n,features:r}){g();let i=j({...o(e,t??``,{author:n.email},10),enabled:!!t}).data?.pages[0]?.events??[];return(0,B.jsxs)(c,{as:`article`,"aria-label":b(`contributors.detail`),gap:0,className:U.featureDetail,children:[(0,B.jsx)(a,{to:`/contributors`,className:U.featureBack,children:b(`contributors.back`)}),(0,B.jsxs)(p,{gap:5,className:U.personHero,children:[(0,B.jsx)(I,{name:n.name,src:L(n.email),shape:`circle`,size:72}),(0,B.jsxs)(c,{gap:2,className:U.entryBody,children:[(0,B.jsx)(u,{level:1,children:n.name}),(0,B.jsx)(k,{color:`secondary`,children:n.email}),(0,B.jsxs)(p,{gap:4,wrap:`wrap`,children:[(0,B.jsx)(k,{type:`supporting`,color:`secondary`,children:b(`contributors.gitCommits`,{count:n.commits})}),(0,B.jsx)(k,{type:`supporting`,color:`secondary`,children:f(`contributors.latest`,{time:(0,B.jsx)(T,{value:n.latest,format:`relative`,type:`inherit`,color:`inherit`})})}),(0,B.jsx)(a,{to:`/records`,search:{author:n.email},children:b(`contributors.activity`)})]})]})]}),(0,B.jsxs)(c,{gap:4,className:U.personSection,children:[(0,B.jsx)(u,{level:3,children:b(`contributors.features`)}),r.length?(0,B.jsx)(N,{columns:{minWidth:220,repeat:`fill`},gap:3,children:r.map(e=>(0,B.jsx)(H,{label:e.title,href:`/features/${encodeURIComponent(e.id)}`,padding:4,elevation:`none`,children:(0,B.jsxs)(c,{gap:1,children:[(0,B.jsx)(k,{weight:`semibold`,className:U.oneLine,children:e.title}),(0,B.jsx)(k,{type:`supporting`,color:`secondary`,children:b(`contributors.featureShare`,{commits:e.commits,requirements:e.requirements})})]})},e.id))}):(0,B.jsx)(k,{color:`secondary`,children:b(`contributors.noSpecCommits`)})]}),(0,B.jsxs)(c,{gap:4,className:U.personSection,children:[(0,B.jsx)(u,{level:3,children:b(`activity.recent`)}),i.length?(0,B.jsx)(c,{gap:0,className:U.personActivity,children:i.map(e=>(0,B.jsxs)(p,{gap:3,className:U.personActivityRow,children:[(0,B.jsx)(w,{event:e}),(0,B.jsx)(a,{to:`/records/commits/$commit`,params:{commit:e.commit},hash:e.id,className:U.entryTitle,children:(e.after??e.before)?.title??e.id}),(0,B.jsx)(T,{value:e.date,format:`relative`})]},e.key))}):(0,B.jsx)(k,{color:`secondary`,children:b(`contributors.noRecentActivity`)})]})]})}function Y({email:e,search:t,change:n}){return g(),(0,B.jsx)(C,{header:v,title:b(`nav.contributors`),root:`/contributors`,hasTitle:!e,trail:t=>{let n=e?t.index.people.find(t=>t.email===e):void 0;return n?[{label:n.name}]:[]},...e?{}:{filters:()=>(0,B.jsx)(S,{label:b(`filters.search`),placeholder:b(`filters.searchContributors`),value:t.q??``,onChange:e=>n({...t,q:e||void 0},!0)})},children:({checkout:n,session:r})=>(0,B.jsx)(G,{session:r,head:n.head,email:e,search:t})})}export{W as n,Y as t};
@@ -1 +1 @@
1
- import{l as e}from"./themeProps-CkLe5zXY.js";import{t}from"./contributors-ol5bZm_T.js";import{u as n}from"./index-DaKOj2qL.js";var r=e();function i(){let e=n.useSearch(),{email:i}=n.useParams(),a=n.useNavigate();return(0,r.jsx)(t,{email:i,search:e,change:(e,t)=>{a({search:e,replace:t??!1})}})}export{i as component};
1
+ import{l as e}from"./themeProps-CkLe5zXY.js";import{t}from"./contributors-lkpVuCXS.js";import{f as n}from"./index-IML0_BCy.js";var r=e();function i(){let e=n.useSearch(),{email:i}=n.useParams(),a=n.useNavigate();return(0,r.jsx)(t,{email:i,search:e,change:(e,t)=>{a({search:e,replace:t??!1})}})}export{i as component};
@@ -1 +1 @@
1
- import{l as e}from"./themeProps-CkLe5zXY.js";import{t}from"./contributors-ol5bZm_T.js";import{d as n}from"./index-DaKOj2qL.js";var r=e();function i(){let e=n.useSearch(),i=n.useNavigate();return(0,r.jsx)(t,{search:e,change:(e,t)=>{i({search:e,replace:t??!1})}})}export{i as component};
1
+ import{l as e}from"./themeProps-CkLe5zXY.js";import{t}from"./contributors-lkpVuCXS.js";import{p as n}from"./index-IML0_BCy.js";var r=e();function i(){let e=n.useSearch(),i=n.useNavigate();return(0,r.jsx)(t,{search:e,change:(e,t)=>{i({search:e,replace:t??!1})}})}export{i as component};
@@ -0,0 +1 @@
1
+ import{l as e}from"./themeProps-CkLe5zXY.js";import{d as t}from"./index-IML0_BCy.js";var n=e();function r(){return(0,n.jsx)(t,{})}export{r as component};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TimestampHoverCard-B5JBaQDZ.js","assets/rolldown-runtime-hePW80VL.js","assets/themeProps-CkLe5zXY.js","assets/Icon-DPaLmsmh.js","assets/useMediaQuery-twbHF0pO.js","assets/preload-helper-BZ1Pz5am.js","assets/IconButton-Br-4XhQr.js","assets/useIsomorphicLayoutEffect-BiEJxDg_.js","assets/HoverCard-Bpt8LVFT.js","assets/useClipboard-Cqx6Upy7.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,l as n,n as r,q as i}from"./themeProps-CkLe5zXY.js";import{c as a,n as o,o as s,r as c,s as l}from"./document-kGFspd5u.js";import{n as u}from"./useIsomorphicLayoutEffect-BiEJxDg_.js";import{L as d,P as f,St as p,U as m,_t as h,an as g,dn as _,fn as ee,gt as v,ht as y,k as b,m as x,mn as S,mt as C,p as w,r as T,un as E}from"./page-header-AS8jZ1ve.js";import{g as D,p as O}from"./Table-DjTkmoR7.js";import{a as k}from"./useMediaQuery-twbHF0pO.js";import{C as A,E as te,G as j,S as M,_ as N,n as ne,t as P,v as re,w as F}from"./Icon-DPaLmsmh.js";import{t as I}from"./preload-helper-BZ1Pz5am.js";import{n as L,s as ie,t as R}from"./IconButton-Br-4XhQr.js";import{a as ae,i as oe,o as se}from"./Markdown-B1P3lpA0.js";import{t as ce}from"./useDevWarning-Dudfg3qF.js";import{t as le}from"./HoverCard-Bpt8LVFT.js";import{a as z,t as B}from"./Token-D337a1e3.js";import{n as V,t as H}from"./HgiRefresh-BSPkIVFZ.js";var U=e(i(),1),W=n();function ue(e,t){let n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`,calendar:`gregory`}).formatToParts(new Date(e)),r=Object.fromEntries(n.filter(e=>e.type!==`literal`).map(e=>[e.type,Number(e.value)]));return{year:r.year,month:r.month,day:r.day,hour:r.hour,minute:r.minute,second:r.second}}var G={date:{month:`short`,day:`numeric`,year:`numeric`},date_long:{year:`numeric`,month:`long`,day:`numeric`},date_weekday:{weekday:`short`,month:`short`,day:`numeric`,year:`numeric`}};function de(...e){let t=e.flatMap(e=>typeof e==`string`?e.trim().split(/\s+/):[]).filter(Boolean);if(t.length!==0)return Array.from(new Set(t)).join(` `)}function fe(e,t=[],n){return{ariaLabelledBy:n?de(n.labelID,e):void 0,ariaDescribedBy:de(n?.describedByIDs,...t)}}function pe(){return(0,U.use)(re).locale}var K={warning:`warning`,error:`error`,success:`success`},q={warning:`@astryx.input.statusButton.warning`,error:`@astryx.input.statusButton.error`,success:`@astryx.input.statusButton.success`},me={statusButton:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMwMTN:`x1heor9g`,kkrTdU:`x1ypdohk x16khyan`,kfzvcC:`x67bb7w`,kaIpWk:`xjspbzw`,kInvED:`x7s97pk`,$$css:!0}};function he({status:e,statusVariant:n=`attached`,isInGroup:i=!1,size:a=`md`}){let o=N(),s=n===`tooltip`&&!!e?.message,[c,l]=(0,U.useState)(void 0),d=u({placement:`above`,isEnabled:s,isOpen:c}),f=(0,U.useCallback)(()=>{l(void 0)},[]),p=(0,U.useCallback)(()=>{typeof window>`u`||typeof window.matchMedia!=`function`||!window.matchMedia(`(hover: none)`).matches||l(e=>e!==!0)},[]);if((0,U.useEffect)(()=>{if(c!==!0)return;let e=e=>{e.key===`Escape`&&l(void 0)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[c]),!e||i||n===`detached`)return{statusIcon:null,describedBy:void 0};let m=(0,W.jsx)(P,{icon:K[e.type],size:a,color:e.type,...r(`input-status-icon`,{size:a,status:e.type})});return s?{statusIcon:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,ref:d.ref,"aria-label":o(q[e.type]),"aria-describedby":d.describedBy,onClick:p,onBlur:f,...t(j.focusVisible,me.statusButton),children:m}),d.renderTooltip(e.message)]}),describedBy:d.describedBy}:{statusIcon:m,describedBy:void 0}}var ge=[[`path`,{d:`M3.49902 14.9656C4.72475 18.4791 8.06749 21 11.999 21C16.9696 21 20.999 16.9706 20.999 12C20.999 7.02944 16.9696 3 11.999 3C8.29827 3 4.8984 5.6756 3.68943 8.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.999 7V12L14.999 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M7.49751 8.74363C7.49751 8.74363 3.81388 9.3026 3.25487 8.7436C2.69585 8.1846 3.25488 4.50098 3.25488 4.50098`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],_e=[[`path`,{d:`M9 14L11 16L15 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8.00002 4L8 4.99997C7.99998 5.94279 7.99998 6.4142 8.29287 6.7071C8.58577 7 9.05718 7 10 7L14 7C14.9428 7 15.4142 7 15.7071 6.70711C16 6.41421 16 5.94281 16 5V4`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14.45 4L13.7149 4.1492C13.7853 4.49569 14.088 4.746 14.4416 4.74995L14.45 4ZM9.54997 4L9.55835 4.74995C9.91188 4.746 10.2146 4.49569 10.285 4.1492L9.54997 4ZM19.1213 4.87868L19.6517 4.34835L19.6517 4.34835L19.1213 4.87868ZM19.1213 21.1213L19.6517 21.6517V21.6517L19.1213 21.1213ZM16 4.01732L16.0226 3.26766C16.0179 3.26752 16.0131 3.26742 16.0084 3.26737L16 4.01732ZM4.87868 4.87868L5.40901 5.40901V5.40901L4.87868 4.87868ZM8 4.01732L7.99162 3.26737C7.98688 3.26742 7.98215 3.26752 7.97741 3.26766L8 4.01732ZM14.45 4L15.185 3.8508C14.8838 2.36703 13.5732 1.25 12 1.25V2V2.75C12.8457 2.75 13.5529 3.35073 13.7149 4.1492L14.45 4ZM12 2V1.25C10.4268 1.25 9.11615 2.36703 8.81496 3.8508L9.54997 4L10.285 4.1492C10.4471 3.35073 11.1542 2.75 12 2.75V2ZM20 10H20.75C20.75 8.60699 20.7516 7.48678 20.6335 6.60825C20.5125 5.70814 20.2536 4.95027 19.6517 4.34835L19.1213 4.87868L18.591 5.40901C18.8678 5.68577 19.0482 6.07435 19.1469 6.80812C19.2484 7.56347 19.25 8.56458 19.25 10H20ZM20 16H20.75V10H20H19.25V16H20ZM20 16H19.25C19.25 17.4354 19.2484 18.4365 19.1469 19.1919C19.0482 19.9257 18.8678 20.3142 18.591 20.591L19.1213 21.1213L19.6517 21.6517C20.2536 21.0497 20.5125 20.2919 20.6335 19.3918C20.7516 18.5132 20.75 17.393 20.75 16H20ZM14 22V22.75C15.393 22.75 16.5132 22.7516 17.3918 22.6335C18.2919 22.5125 19.0497 22.2536 19.6517 21.6517L19.1213 21.1213L18.591 20.591C18.3142 20.8678 17.9257 21.0482 17.1919 21.1469C16.4365 21.2484 15.4354 21.25 14 21.25V22ZM16 4.01732L15.9774 4.76698C17.5421 4.81413 18.1804 4.99842 18.591 5.40901L19.1213 4.87868L19.6517 4.34835C18.7796 3.47633 17.5648 3.31413 16.0226 3.26766L16 4.01732ZM10 22V22.75H14V22V21.25H10V22ZM10 22V21.25C8.56458 21.25 7.56347 21.2484 6.80812 21.1469C6.07434 21.0482 5.68577 20.8678 5.40901 20.591L4.87868 21.1213L4.34835 21.6517C4.95027 22.2536 5.70814 22.5125 6.60825 22.6335C7.48678 22.7516 8.60699 22.75 10 22.75V22ZM4 16H3.25C3.25 17.393 3.24841 18.5132 3.36652 19.3918C3.48754 20.2919 3.74643 21.0497 4.34835 21.6517L4.87868 21.1213L5.40901 20.591C5.13225 20.3142 4.9518 19.9257 4.85315 19.1919C4.75159 18.4365 4.75 17.4354 4.75 16H4ZM4 10H4.75C4.75 8.56458 4.75159 7.56347 4.85315 6.80812C4.9518 6.07435 5.13225 5.68577 5.40901 5.40901L4.87868 4.87868L4.34835 4.34835C3.74643 4.95027 3.48754 5.70814 3.36652 6.60825C3.24841 7.48678 3.25 8.60699 3.25 10H4ZM8 4.01732L7.97741 3.26766C6.43521 3.31413 5.22037 3.47633 4.34835 4.34835L4.87868 4.87868L5.40901 5.40901C5.8196 4.99842 6.4579 4.81413 8.02259 4.76698L8 4.01732ZM4 10H3.25V16H4H4.75V10H4ZM8 4.01732L8.00838 4.76728L9.55835 4.74995L9.54997 4L9.54159 3.25005L7.99162 3.26737L8 4.01732ZM16 4.01732L16.0084 3.26737L14.4583 3.25005L14.45 4L14.4416 4.74995L15.9916 4.76728L16 4.01732Z`,fill:`currentColor`,key:`2`}]],ve={base:{kB7OPa:`x9f619`,kVAEAm:`x1n2onr6`,kY2c9j:`x1vjfegm`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,kMzoRj:`x1litavf`,ksu8eU:`x1y0btm7`,kVAM5u:`xvy26l8 x6q1khz`,"--_field-radius":`x1832zxr`,kaIpWk:`xvdfih8`,kWkggS:`x10xzikg`,k1ekBW:`x12zzom9`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,kGVxlE:`x1gnnqk1 x1xqjsvb xuihb5h`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,kSiTet:`xbyyjgo`,kVAM5u:`xvy26l8`,kGVxlE:`x1gnnqk1`,$$css:!0}},ye={warning:{kVAM5u:`x8wg1ba`,$$css:!0},error:{kVAM5u:`x1ofxpqo`,$$css:!0},success:{kVAM5u:`x16m2moy`,$$css:!0}},be={warning:{kGVxlE:`x1gnnqk1 x9156jc`,$$css:!0},error:{kGVxlE:`x1gnnqk1 x1bgmis8`,$$css:!0},success:{kGVxlE:`x1gnnqk1 x8wp45d`,$$css:!0}},xe={warning:{kVAM5u:`x8wg1ba xa1yw2k`,$$css:!0},error:{kVAM5u:`x1ofxpqo xk2sxw7`,$$css:!0},success:{kVAM5u:`x16m2moy xyq33ac`,$$css:!0}},Se={button:{kZKoxP:`x1qx5ct2`,kmuXW:`x2lah0s`,kVAEAm:`x1n2onr6`,"--_input-clear-hit-inset":`xtoycft x181bpwf`,"--_input-clear-hit-content":`xqxtgf4 xp8r40j`,k5JduY:`xh3pasq`,kwXMNM:`x1j6awrg`,kv0HGH:`xht581f`,$$css:!0}};function Ce({label:e,onClick:t,onPointerDown:n,onClickCapture:i,xstyle:a,iconClassName:o}){let{className:s}=r(`input-clear-icon`),{className:c}=r(`input-clear-button`);return(0,W.jsx)(L,{variant:`ghost`,size:`sm`,label:e,className:c,icon:(0,W.jsx)(P,{icon:`close`,size:`sm`,color:`secondary`,className:o==null?s:`${s} ${o}`}),onClick:t,onPointerDown:n,onClickCapture:i,isIconOnly:!0,xstyle:[Se.button,a]})}function we(e){return Ce(e)}function Te(e){return Ce(e)}we.displayName=`InputClearButton`;var Ee={inGroup:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kZKoxP:`x5yr21d`,keTefX:`xd10s4z x1pwwqoy`,krdFHd:`x15mokao x8eehn2`,kVL7Gh:`xbiv7yw x1xrp5p4`,kfmiAY:`x1ga7v0g x1tzxhge`,kT0f0o:`x16uus16 x1rmb4wm`,kXnDq0:`x1rm9qnc`,$$css:!0}},De=(0,U.createContext)(null);De.displayName=`InputGroupContext`;function Oe(){return(0,U.use)(De)}var ke={sm:{kZKoxP:`x6k0iem`,$$css:!0},md:{kZKoxP:`x1ueg155`,$$css:!0},lg:{kZKoxP:`xssyfek`,$$css:!0}};function Ae({type:e=`text`,label:n,isLabelHidden:i=!1,description:a,isOptional:o=!1,isRequired:s=!1,isDisabled:c=!1,isReadOnly:l=!1,disabledMessage:d,startIcon:f,status:p,statusVariant:m=`attached`,size:h,onChange:g,changeAction:_,isLoading:ee=!1,value:v,placeholder:y,labelTooltip:b,hasClear:x=!1,hasAutoFocus:S=!1,htmlName:C,onEnter:w,onKeyDown:T,width:E,xstyle:D,className:O,style:j,ref:P,...re}){let F=N(),I=oe({isRequired:s,isOptional:o}),L=M(h,`md`),R=(0,U.useId)(),ce=(0,U.useId)(),le=(0,U.useId)(),z=(0,U.useId)(),B=(0,U.useRef)(null),V=(0,U.useRef)(null),H=Oe(),[,ue]=(0,U.useTransition)(),[G,de]=(0,U.useOptimistic)(v),pe=ee||G!==v,K=c&&!!d,q=u({placement:`above`,focusTrigger:`always`,isEnabled:K}),{statusIcon:me,describedBy:ge}=he({status:p,statusVariant:m,isInGroup:!!H}),{ariaLabelledBy:_e,ariaDescribedBy:Se}=fe(ce,[a?le:null,!H&&m!==`tooltip`&&p?.message?z:null,ge,K?q.describedBy:null],H),Ce=e=>{if(c||l)return;let t=e.target.value;g?.(t,e),_&&!e.defaultPrevented&&ue(async()=>{de(t),await _(t,e)})},Te=(0,U.useCallback)(()=>{g?.(``,null),B.current?.focus()},[g]),{onClick:De,onMouseUp:Ae}=se({containerRef:V,inputRef:B,disabled:c}),J=(0,W.jsxs)(`div`,{ref:e=>{V.current=e,q.ref(e)},onClick:De,onMouseUp:Ae,...k(r(`text-input`,{size:L,status:p?.type??null,disabled:c?`disabled`:null,readonly:l?`readonly`:null}),t(ve.base,ke[L],c&&ve.disabled,p&&ye[p.type],p&&!c&&be[p.type],p&&xe[p.type],H&&Ee.inGroup,D),O,j),children:[f&&ne(f,{size:`sm`,color:`secondary`}),H&&(0,W.jsx)(ie,{id:ce,children:n}),(0,W.jsx)(`input`,{...re,ref:te(P,B),id:R,name:c?void 0:C,type:e,value:G,onChange:Ce,onKeyDown:w||T?e=>{e.key===`Enter`&&w?.(),T?.(e)}:void 0,placeholder:y,disabled:c&&!K,"aria-disabled":K?`true`:void 0,readOnly:l||K||void 0,autoFocus:S,"data-autofocus":S||void 0,"aria-describedby":Se,"aria-required":I?`true`:void 0,"aria-invalid":p?.type===`error`?`true`:void 0,"aria-busy":pe||void 0,"aria-labelledby":_e,...{0:{className:`x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5`},1:{className:`x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5 xt0e3qv`}}[!!c<<0]}),x&&v!==``&&!c&&!l&&(0,W.jsx)(we,{label:F(`@astryx.textInput.clearLabel`,{label:n}),onClick:Te}),pe&&(0,W.jsx)(A,{size:`sm`}),me]});return H?(0,W.jsxs)(W.Fragment,{children:[J,K&&q.renderTooltip(d)]}):(0,W.jsxs)(ae,{label:n,isLabelHidden:i,description:a,inputID:R,descriptionID:a?le:void 0,isOptional:o,isRequired:s,isDisabled:c,status:p?{type:p.type,message:p.message,messageID:p.message?z:void 0}:void 0,statusVariant:m,labelTooltip:b,width:E,children:[J,K&&q.renderTooltip(d)]})}Ae.displayName=`TextInput`;var J={page:`_page_otq4r_3`,content:`_content_otq4r_5`,reveal:`_reveal_otq4r_1`,column:`_column_otq4r_10`,pageTitle:`_pageTitle_otq4r_11`,filters:`_filters_otq4r_12`,filtersSticky:`_filtersSticky_otq4r_13`,entryBody:`_entryBody_otq4r_15`,headerActions:`_headerActions_otq4r_17`,headerTime:`_headerTime_otq4r_22`,wide:`_wide_otq4r_30`,staleNotice:`_staleNotice_otq4r_33`},je=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 9.5C9.5 8.11929 10.6193 7 12 7C13.3807 7 14.5 8.11929 14.5 9.5C14.5 10.3569 14.0689 11.1131 13.4117 11.5636C12.7283 12.0319 12 12.6716 12 13.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]];function Me({size:e=16}){return(0,W.jsx)(y,{data:je,size:e})}var Ne={helpCard:`_helpCard_wqyxv_1`};function Pe({title:e,description:t}){S();let[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(!1),[o,s]=(0,U.useState)(!1),c=!o&&(i||n),l=(0,U.useRef)(null);(0,U.useEffect)(()=>{if(!c)return;let e=()=>{a(!1),r(!1)},t=t=>{let n=t.target;if(!(n instanceof Node)||l.current?.contains(n))return;let r=l.current?.getAttribute(`aria-controls`);r&&document.getElementById(r)?.contains(n)||e()},n=t=>{t.key===`Escape`&&(e(),s(!0))};return document.addEventListener(`pointerdown`,t,!0),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`pointerdown`,t,!0),document.removeEventListener(`keydown`,n)}},[c]);let u=(0,U.useRef)(void 0),d=(e,t)=>{clearTimeout(u.current),u.current=setTimeout(()=>r(e),t)};return(0,U.useEffect)(()=>()=>clearTimeout(u.current),[]),(0,W.jsx)(le,{label:e,content:(0,W.jsx)(F,{children:t}),className:Ne.helpCard,placement:`below`,alignment:`start`,touchTrigger:`none`,focusTrigger:`never`,hasHoverIndication:!1,isOpen:c,children:(0,W.jsx)(R,{ref:l,label:E(`common.description`,{title:e}),icon:(0,W.jsx)(Me,{}),variant:`ghost`,size:`sm`,onClick:()=>{i?(a(!1),s(!0)):(a(!0),s(!1))},onMouseEnter:()=>d(!0,150),onMouseLeave:()=>{s(!1),d(!1,150)},onFocus:()=>d(!0,0),onBlur:()=>d(!1,0)})})}function Fe(e,t,n){let r=C(),[i,a]=(0,U.useState)(void 0);return(0,U.useEffect)(()=>{a(void 0)},[n]),(0,U.useEffect)(()=>{if(t===void 0)return;let n=!1,i=()=>{document.visibilityState===`visible`&&r.fetchQuery(b(e)).then(e=>{n||a(e.stamp)},()=>void 0)};return document.addEventListener(`visibilitychange`,i),window.addEventListener(`focus`,i),()=>{n=!0,document.removeEventListener(`visibilitychange`,i),window.removeEventListener(`focus`,i)}},[r,e,t]),t!==void 0&&i!==void 0&&i!==t}function Ie({isRefreshing:e,onRefresh:t}){return S(),(0,W.jsx)(V,{status:`info`,title:E(`stale.title`),description:E(`stale.description`),endContent:(0,W.jsx)(L,{label:E(`common.refresh`),isDisabled:e,onClick:t})})}function Le(e){let t=m(f());return!t.data||t.error?(0,W.jsx)(z,{error:t.error,retry:()=>{t.refetch()}}):(0,W.jsx)(Re,{session:t.data,...e},t.data.sessionId)}function Re({session:e,header:t,title:n,description:r,root:i,trail:a,hasTitle:s,isWide:c=!1,filters:l,children:u}){S();let f=m(w(e)),p=C(),y=new Set([...x,`browser-working`,`browser-working-change`]),b=()=>{f.refetch(),p.invalidateQueries({predicate:e=>y.has(String(e.queryKey[0]))})},T=Fe(e,f.data?.stamp,f.dataUpdatedAt),D=f.error instanceof d&&f.error.code===`SESSION_CHANGED`,O=D?void 0:f.data,k=!!O,A=[{label:n,to:i},...O&&a?a(O):[]],te=(0,W.jsxs)(v,{gap:3,className:J.headerActions,children:[O&&(0,W.jsx)(F,{type:`supporting`,color:`secondary`,className:J.headerTime,children:_(`header.observedAt`,{time:(0,W.jsx)(`time`,{dateTime:O.observedAt,children:new Date(O.observedAt).toLocaleString(ee())})})}),(0,W.jsx)(R,{label:E(`common.refresh`),icon:(0,W.jsx)(H,{}),variant:`ghost`,size:`sm`,isLoading:f.isFetching,isDisabled:f.isFetching,onClick:b})]});return(0,W.jsxs)(h,{gap:0,className:J.page,children:[(0,W.jsx)(t,{trail:A,actions:te}),(0,W.jsxs)(h,{gap:0,className:c?`${J.column} ${J.wide}`:J.column,children:[s&&(0,W.jsxs)(v,{gap:2,vAlign:`center`,className:J.pageTitle,children:[(0,W.jsx)(g,{level:1,children:n}),r&&(0,W.jsx)(Pe,{title:n,description:r})]}),T&&O&&(0,W.jsx)(h,{gap:0,className:J.staleNotice,children:(0,W.jsx)(Ie,{isRefreshing:f.isFetching,onRefresh:b})}),f.error&&O&&(0,W.jsxs)(h,{padding:4,role:`alert`,children:[(0,W.jsx)(F,{children:f.error.message}),(0,W.jsx)(F,{children:E(`history.staleData`)})]}),!O&&f.error&&(0,W.jsx)(z,{error:f.error,retry:()=>{D?window.location.reload():f.refetch()}}),k&&l&&(0,W.jsx)(v,{gap:3,wrap:`wrap`,className:`${J.filters} ${J.filtersSticky}`,children:l(O,e)}),k&&(0,W.jsx)(h,{gap:3,className:J.content,children:(0,W.jsx)(o,{index:O.index,children:u({checkout:O,session:e})})})]})]})}var ze=[[`path`,{d:`M8 7L16 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 11L12 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Be=[[`path`,{d:`M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12`,cy:`6.99988`,r:`4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ve=[[`path`,{d:`M15.2141 5.98239L16.6158 4.58063C17.39 3.80646 18.6452 3.80646 19.4194 4.58063C20.1935 5.3548 20.1935 6.60998 19.4194 7.38415L18.0176 8.78591M15.2141 5.98239L6.98023 14.2163C5.93493 15.2616 5.41226 15.7842 5.05637 16.4211C4.70047 17.058 4.3424 18.5619 4 20C5.43809 19.6576 6.94199 19.2995 7.57889 18.9436C8.21579 18.5877 8.73844 18.0651 9.78375 17.0198L18.0176 8.78591M15.2141 5.98239L18.0176 8.78591`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11 20H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]];function Y(e){return function(t){return(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,focusable:`false`,...t,children:e.map(([e,t],n)=>(0,U.createElement)(e,{...t,key:n}))})}}var He=Y(T),Ue=Y(_e),We=Y(ze),Ge=Y(ge),Ke=Y(Be),qe=Y(Ve);function Je({label:e,placeholder:t,value:n,onChange:r}){let[i,a]=(0,U.useState)(n),o=(0,U.useRef)(n),s=(0,U.useRef)([]),c=(0,U.useRef)(void 0);return(0,U.useEffect)(()=>()=>{clearTimeout(c.current)},[]),(0,U.useEffect)(()=>{if(n===o.current){s.current=[];return}let e=s.current.indexOf(n);if(e>=0){s.current.splice(0,e+1);return}s.current=[],o.current=n,a(n)},[n]),(0,W.jsx)(Ae,{label:e,isLabelHidden:!0,placeholder:t,value:i,startIcon:He,hasClear:!0,onChange:e=>{o.current=e,a(e),clearTimeout(c.current),c.current=setTimeout(()=>{s.current.push(e),r(e)},500)}})}var Ye={year:`numeric`,month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`},Xe={hour:`numeric`,minute:`2-digit`},Ze={year:`numeric`,month:`short`,day:`numeric`,...Xe};function X(e){return String(e).padStart(2,`0`)}function Qe(e,t){return t===void 0?{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds()}:ue(e.getTime(),t)}function Z(e,t,n,{timeZone:r,isTimezoneShown:i=!1,timeZoneNameStyle:a=`short`}={}){let o=r===void 0?{}:{timeZone:r},s=i?{timeZoneName:`short`}:{};switch(t){case`full`:return new Intl.DateTimeFormat(n,{...Ye,timeZoneName:a,...o,calendar:`gregory`}).format(e);case`date`:return new Intl.DateTimeFormat(n,{...G.date,...o,calendar:`gregory`}).format(e);case`date_long`:return new Intl.DateTimeFormat(n,{...G.date_long,...o,calendar:`gregory`}).format(e);case`date_weekday`:return new Intl.DateTimeFormat(n,{...G.date_weekday,...o,calendar:`gregory`}).format(e);case`date_time`:return new Intl.DateTimeFormat(n,{...Ze,...s,...o,calendar:`gregory`}).format(e);case`time`:return new Intl.DateTimeFormat(n,{...Xe,...s,...o}).format(e);case`system_date`:{let t=Qe(e,r);return`${t.year}-${X(t.month)}-${X(t.day)}`}case`system_date_time`:{let t=Qe(e,r);return`${t.year}-${X(t.month)}-${X(t.day)} ${X(t.hour)}:${X(t.minute)}:${X(t.second)}`}case`system_time`:{let t=Qe(e,r);return`${X(t.hour)}:${X(t.minute)}:${X(t.second)}`}case`unix_seconds`:return String(Math.floor(e.getTime()/1e3))}}var $e=60,et=3600,Q=86400,tt=30*Q,nt=365*Q,rt=30,it=new Map;function at(e,t,n){let r=JSON.stringify([e,t,n]),i=it.get(r);return i??(i=new Intl.RelativeTimeFormat(e,{numeric:n,style:t}),it.set(r,i)),i}function ot(e,t,n,r){let i=Math.round((t.getTime()-e.getTime())/1e3),a=Math.abs(i);if(a<10||i<0&&a<=rt)return at(n,r,`auto`).format(0,`second`);let o,s;a<$e?(o=a,s=`second`):a<et?(o=Math.floor(a/$e),s=`minute`):a<Q?(o=Math.floor(a/et),s=`hour`):a<tt?(o=Math.floor(a/Q),s=`day`):a<nt?(o=Math.floor(a/tt),s=`month`):(o=Math.floor(a/nt),s=`year`);let c=i<0?o:-o;return at(n,r,r===`long`&&s===`day`&&c===-1?`auto`:`always`).format(c,s)}var st=`local`,ct=new Set;function lt(e){if(e!==void 0&&e.toLowerCase()!==st){try{new Intl.DateTimeFormat(`en-US`,{timeZone:e})}catch{ct.has(e)||(ct.add(e),`${JSON.stringify(e)}`);return}return e}}function ut(e){return e===void 0?st:e.toLowerCase()}function dt(e,t,n){return e===`full`?!0:e===`date_time`||e===`time`?t||n:!1}function ft(e,t,n){let r=t.map(e=>lt(e.timezoneID)),i=new Set(r.map(ut)).size>1;return t.map((t,a)=>{let o=t.format??`full`,s=r[a];return{...t.label===void 0?{}:{label:t.label},isCopyable:t.isCopyable??!1,value:Z(e,o,n,{timeZone:s,isTimezoneShown:dt(o,i,s!==void 0)})}})}var pt=(0,U.lazy)(async()=>I(()=>import(`./TimestampHoverCard-B5JBaQDZ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),mt=60,ht=3600,gt=86400,_t=7*gt;function vt(e){return typeof e==`number`?new Date(e<0xe8d4a51000?e*1e3:e):new Date(e)}function yt(e){let t=Math.abs(e);return t<mt?1e3:t<ht?3e4:t<gt?6e4:3e5}function bt(e){return e!==`relative`&&e!==`relative_short`&&e!==`auto`}function xt(e){return e===`relative`||e===`relative_short`}function St({value:e,format:t=`auto`,autoThreshold:n=_t,hasTooltip:i=!0,tooltipEntries:a,isTimezoneShown:o=!1,isLive:s=!1,type:c=`supporting`,size:l,color:u=`secondary`,weight:d,xstyle:f,className:p,style:m,ref:h,"data-testid":g,..._}){let ee=N(),v=pe(),y=(0,U.useRef)(null),b=te(h,y),[x,S]=(0,U.useState)(()=>new Date),C=vt(e),w=!Number.isNaN(C.getTime()),T=w?C.toISOString():``,E=Math.round((x.getTime()-C.getTime())/1e3),D=t===`auto`?Math.abs(E)<=n?`relative`:`date_time`:t,O=w?D===`relative`?ot(C,x,v,`long`):D===`relative_short`?ot(C,x,v,`narrow`):bt(D)?Z(C,D,v,{isTimezoneShown:o}):``:``,A=w?Z(C,`full`,v):``,j=w?Z(C,`full`,v,{timeZoneNameStyle:`long`}):``;if((0,U.useEffect)(()=>{if(!s||!w||!xt(D))return;let e=yt(E),t=setInterval(()=>{S(new Date)},e);return()=>clearInterval(t)},[s,w,D,E]),ce(`Timestamp`,`could not parse value ${JSON.stringify(e)} as a date. Rendering nothing.`,!w),!w)return null;let M=a!==void 0&&a.length>0?a:void 0,ne=i&&(xt(D)||M!==void 0),P=M===void 0?[{value:A,isCopyable:!0}]:ft(C,M,v),re=k(r(`timestamp`,{format:D}),{className:p,style:m}),I=(0,W.jsx)(F,{type:c,size:l,color:u,weight:d,xstyle:f,...re,children:(0,W.jsx)(`time`,{ref:b,dateTime:T,"data-testid":g,className:`xt0psk2 xjb2p0i x1j61x8r x1qlqyl8 x15bjb6t x1heor9g x1pd3egz`,..._,...xt(D)&&j!==``?{"aria-label":j}:{},...ne?{tabIndex:0}:{},children:O})});return ne?(0,W.jsx)(U.Suspense,{fallback:I,children:(0,W.jsx)(pt,{lines:P,label:ee(`@astryx.timestamp.detailsLabel`),children:I})}):I}St.displayName=`Timestamp`;var Ct={related:`_related_zz4ck_2`};function wt({label:e,children:t}){return(0,W.jsxs)(h,{as:`section`,gap:1,"aria-label":e,className:Ct.related,children:[(0,W.jsx)(F,{type:`supporting`,color:`secondary`,children:e}),(0,W.jsx)(D,{density:`compact`,children:t})]})}function $({title:e,description:t}){return(0,W.jsx)(O,{label:e,...t?{description:typeof t==`string`?(0,W.jsx)(F,{type:`supporting`,color:`secondary`,children:t}):t}:{}})}var Tt={titleMark:`_titleMark_w8ln4_2`,relations:`_relations_w8ln4_4`};function Et({sources:e,path:t}){S();let n=l();return(0,W.jsx)(wt,{label:E(`design.sources`),children:e.map((e,r)=>{let i=e.url?a(e.url,t,n):e.path?a(Ot(t,e.path),t,n):{kind:`missing`,path:e.id??``},o=i.kind===`external`?Dt(i.href):i.kind===`instruction`?i.path.replace(/^\.gitifact\//,``):i.kind===`agents`?i.path:i.kind===`missing`?E(`link.missing`,{path:i.path}):i.kind===`outside`?i.path:``;return(0,W.jsx)($,{title:(0,W.jsx)(s,{link:i,children:e.title??e.id}),description:(e.note||o)&&(0,W.jsxs)(v,{gap:2,wrap:`wrap`,children:[e.note&&(0,W.jsx)(F,{type:`supporting`,color:`secondary`,children:e.note}),o&&(0,W.jsx)(F,{type:`supporting`,color:`secondary`,children:o})]})},r)})})}var Dt=e=>{try{return new URL(e).hostname}catch{return e}};function Ot(e,t){let n=e.split(`/`).slice(0,-1),r=t.split(`/`),i=0;for(;i<n.length&&i<r.length-1&&n[i]===r[i];)i++;return[...Array(n.length-i).fill(`..`),...r.slice(i)].join(`/`)}function kt({design:e,path:t,features:n,eyebrow:r,footer:i}){S();let a=e.requirements??[];return(0,W.jsxs)(h,{gap:4,children:[(0,W.jsxs)(h,{gap:2,children:[r,(0,W.jsx)(g,{level:3,children:(0,W.jsx)(`mark`,{className:Tt.titleMark,children:e.title})}),e.description&&(0,W.jsx)(F,{type:`supporting`,color:`secondary`,children:e.description})]}),(0,W.jsx)(c,{headingLevelStart:4,path:t,children:e.body}),(!!a.length||!!e.sources?.length||i)&&(0,W.jsxs)(h,{gap:4,className:Tt.relations,children:[!!a.length&&(0,W.jsx)(wt,{label:E(`design.relatedRequirements`),children:a.map(e=>{let t=n.find(t=>t.requirements.some(t=>t.id===e)),r=t?.requirements.find(t=>t.id===e);return t&&r?(0,W.jsx)($,{title:(0,W.jsx)(p,{to:`/features/$featureId`,params:{featureId:t.id},search:{selected:e,tab:`requirements`},hash:e,children:r.title}),description:r.description},e):(0,W.jsx)($,{title:(0,W.jsx)(F,{color:`secondary`,children:E(`design.missingRequirement`,{id:e})})},e)})}),!!e.sources?.length&&(0,W.jsx)(Et,{sources:e.sources,path:t}),i]})]})}var At={feature:`default`,requirement:`teal`,design:`orange`,wiki:`pink`,instruction:`cyan`};function jt({kind:e}){S();let t={feature:E(`kind.feature`),requirement:E(`kind.requirement`),design:E(`kind.design`),wiki:E(`kind.wiki`),instruction:E(`kind.instruction`)};return(0,W.jsx)(B,{label:t[e],color:At[e],size:`sm`})}var Mt={badge:`_badge_sibhz_3`,"#":`_#_sibhz_1`},Nt={created:`green`,modified:`blue`,deleted:`red`,moved:`purple`},Pt=e=>e.types.includes(`deleted`)?`deleted`:e.types.includes(`modified`)?`modified`:e.types.includes(`moved`)?`moved`:`created`;function Ft({event:e}){S();let t={created:E(`change.created`),modified:E(`change.modified`),deleted:E(`change.deleted`),moved:E(`change.moved`)};return(0,W.jsxs)(`span`,{className:Mt.badge,children:[(0,W.jsx)(B,{label:e.types.map(e=>t[e]).join(` · `),color:Nt[Pt(e)],size:`sm`}),(0,W.jsx)(jt,{kind:e.kind})]})}var It={added:`green`,modified:`blue`,deleted:`red`};function Lt({state:e}){if(S(),e===`committed`)return null;let t={added:E(`state.added`),modified:E(`state.modified`),deleted:E(`state.deleted`)};return(0,W.jsx)(B,{label:t[e],color:It[e],size:`sm`})}export{_e as C,ve as S,fe as T,Ee as _,$ as a,ye as b,Je as c,Ue as d,Ke as f,Oe as g,Le as h,kt as i,qe as l,ze as m,Ft as n,wt as o,Ge as p,jt as r,St as s,Lt as t,We as u,we as v,ge as w,be as x,Te as y};